Orxonox
0.0.5 Codename: Arcturus
|
This class partially spezializes ClassScopedSingletonWrapper for classes T that are allowed to fail. More...
#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/singleton/ScopedSingletonWrapper.h>
Public Member Functions | |
ClassScopedSingletonWrapper (const std::string &className) | |
~ClassScopedSingletonWrapper () | |
virtual void | activated () override |
Called if the Scope of the Singleton gets active (creates the instance) More... | |
virtual void | deactivated () override |
Called if the Scope of this Singleton gets deactivated (destroys the instance) More... | |
void | destroy (Destroyable *) |
Destroys the singleton instance - overloaded for Destroyable, calls Destroyable::destroy() More... | |
void | destroy (void *) |
Destroys the singleton instance - overloaded for void*, calls delete. More... | |
Public Member Functions inherited from orxonox::ScopedSingletonWrapper | |
ScopedSingletonWrapper (const std::string &className) | |
Constructor: Initializes all the values. More... | |
virtual | ~ScopedSingletonWrapper ()=default |
Private Attributes | |
T * | singletonPtr_ |
Unique instance of the singleton class T. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from orxonox::ScopeListener | |
ScopeListener () | |
virtual | ~ScopeListener ()=default |
Protected Attributes inherited from orxonox::ScopedSingletonWrapper | |
const std::string | className_ |
The name of the scoped singleton class that is managed by this object. More... | |
This class partially spezializes ClassScopedSingletonWrapper for classes T that are allowed to fail.
T | The managed singleton class |
Because T could fail when being created, this partial spezialization of ClassScopedSingletonWrapper uses a try-catch block to handle exceptions.
See ClassScopedSingletonWrapper for a full documentation of the basis template.
|
inline |
|
inline |
|
inlineoverridevirtual |
Called if the Scope of the Singleton gets active (creates the instance)
Implements orxonox::ScopeListener.
|
inlineoverridevirtual |
Called if the Scope of this Singleton gets deactivated (destroys the instance)
Implements orxonox::ScopeListener.
|
inline |
Destroys the singleton instance - overloaded for Destroyable, calls Destroyable::destroy()
|
inline |
Destroys the singleton instance - overloaded for void*, calls delete.
|
private |
Unique instance of the singleton class T.