|
3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
|
Base interface for a game class. More...
#include <IGame.hpp>

Public Member Functions | |
| void | Exit () |
| void | AppendScene (string path) |
| template<Service S> | |
| void | AddService (S *service) |
| Adds an service to this game. The service must be derived from IService. | |
| IService * | GetService (const std::type_index &type) |
| Gets the service of the given type. If the service is not found, nullptr is returned. | |
| template<Service S> | |
| S * | GetService (Tag< S > dummy) |
| Gets the service of type S. If the service is not found, nullptr is returned. | |
| virtual IService * | RequireService (const std::type_index &type) |
| Requires a service of the given type. If the service is not found, it is attempted to be created. | |
| template<Service S> | |
| S * | RequireService (Tag< S > dummy) |
| Requires a service of type S. If the service is not found, it is attempted to be created. | |
| virtual void | Exit ()=0 |
| Exits the game. | |
| std::unordered_map< std::type_index, IService * >::iterator | begin () |
| Begin iterator for services in the game. | |
| std::unordered_map< std::type_index, IService * >::iterator | end () |
| End iterator for services in the game. | |
| virtual bool | WasInitialized () const noexcept=0 |
| Was ::Initialized() called on this instance? | |
| virtual bool | WasLoaded () const noexcept=0 |
| Was ::Load() called on this instance? | |
| virtual bool | IsEditor () const noexcept=0 |
| Is this game instance an editor? | |
| virtual void | AppendScene (const std::filesystem::path &path)=0 |
| virtual | ~IGame ()=default |
Protected Member Functions | |
| IGame ()=default | |
| IGame (const IGame &)=delete | |
| IGame & | operator= (const IGame &)=delete |
| IGame (IGame &&) noexcept=default | |
| IGame & | operator= (IGame &&) noexcept=default |
Protected Attributes | |
| std::unordered_map< std::type_index, IService * > | _services |
Properties | |
| bool | WasInitialized [get] |
| bool | WasLoaded [get] |
Base interface for a game class.
|
protecteddefault |
|
protecteddelete |
|
protecteddefaultnoexcept |
|
virtualdefault |
|
inline |
Adds an service to this game. The service must be derived from IService.
| S | Type of the service to add. |
| service | Pointer to the service to add. |
| void Engine3DRadSpace.IGame.AppendScene | ( | string | path | ) |
|
pure virtual |
Implemented in Engine3DRadSpace.Game.
| std::unordered_map< std::type_index, IService * >::iterator IGame::begin | ( | ) |
Begin iterator for services in the game.
| std::unordered_map< std::type_index, IService * >::iterator IGame::end | ( | ) |
End iterator for services in the game.
| void Engine3DRadSpace.IGame.Exit | ( | ) |
|
pure virtual |
Exits the game.
Implemented in Engine3DRadSpace.Game, and Engine3DRadSpace.InstIGame.
| IService * IGame::GetService | ( | const std::type_index & | type | ) |
Gets the service of the given type. If the service is not found, nullptr is returned.
| type | Type of the service to get. |
|
inline |
Gets the service of type S. If the service is not found, nullptr is returned.
| S | Type of the service to get. |
| dummy | A dummy parameter to deduce the type S. |
|
pure virtualnoexcept |
Is this game instance an editor?
summary> Appends a scene to the game.
| path | Path to the scene to append. |
Implemented in EditorGame, and Engine3DRadSpace.Game.
|
virtual |
Requires a service of the given type. If the service is not found, it is attempted to be created.
| type | Type of the service to require. |
Reimplemented in Engine3DRadSpace.Game.
|
inline |
Requires a service of type S. If the service is not found, it is attempted to be created.
| S | Type of the service to require. |
|
pure virtualnoexcept |
Was ::Initialized() called on this instance?
Implemented in Engine3DRadSpace.Game.
|
pure virtualnoexcept |
Was ::Load() called on this instance?
Implemented in Engine3DRadSpace.Game.
|
protected |
|
get |
|
get |