|
CeresEngine 0.2.0
A game development framework
|
A wrapper class that stores and manages an engine Service.
More...
#include <CeresEngine/Engine.hpp>
Public Member Functions | |
| Service () noexcept=default | |
Creates a new Service wrapper. | |
| Service (const Service &) noexcept=delete | |
| Service & | operator= (const Service &) noexcept=delete |
| Service (Service &&) noexcept=delete | |
| Service & | operator= (Service &&) noexcept=delete |
| ~Service () noexcept | |
| bool | has () const noexcept |
| T & | get () const noexcept |
| T * | getPointer () const noexcept |
| template<typename TT = T, typename... Args> | |
| TT & | create (Args &&... args) |
| Creates a new service. | |
| void | destroy () noexcept |
| Destroys a service. | |
| void | assign (UPtr< T > &&service) noexcept |
| Assigns a new service. | |
| template<typename TT > | |
| bool | is () const noexcept |
| operator bool () const noexcept | |
| operator T& () const | |
| operator T* () const | |
| T & | operator* () const |
| T * | operator-> () const |
| Service & | operator= (UPtr< T > &&service) noexcept |
| Assigns a new service. | |
Private Attributes | |
| UPtr< T > | mService = nullptr |
| A pointer to the service instance. | |
A wrapper class that stores and manages an engine Service.
| T | the service interface type |
|
explicitdefaultnoexcept |
Creates a new Service wrapper.
|
deletenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Assigns a new service.
| service | The service to be assigned |
|
inline |
Creates a new service.
The service is created as an instance of TT. If a service is already present it is replaced.
| TT | the service implementation type |
| Args | the service constructor argument types |
| args | The service constructor arguments |
|
inlinenoexcept |
Destroys a service.
If the service is not present, this method is a no-op.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
true if the service is available
|
inlinenoexcept |
| TT | the service type to check for |
true if the service is of type TT.
|
inlineexplicitnoexcept |
true if the service is available
|
inline |
|
inline |
|
inline |
|
inline |
|
deletenoexcept |
|
deletenoexcept |
|
inlinenoexcept |
Assigns a new service.
| service | The service to be assigned |
A pointer to the service instance.