![]() |
Carna Version 3.3.3
|
Singleton base class More...
#include <Singleton.h>
Public Types | |
typedef InstanceType | Instance |
Denotes the class, that is derived from this class template. | |
Public Member Functions | |
virtual | ~Singleton () |
Denotes that the instance was deleted. | |
Static Public Member Functions | |
static InstanceType & | instance () |
Returns the only instance from class InstanceType. | |
static bool | exists () |
Tells whether the instance from class InstanceType currently exists. | |
Protected Member Functions | |
Singleton () | |
Denotes that the instance was created. Default constructor is hidden. | |
Static Protected Member Functions | |
static void | reset () |
Deletes the only instance from class InstanceType. | |
Singleton base class
InstanceType | Names the class, which derives from this class. |
Example of usage:
If you do require a special implementation of the default constructor, than there is no need for the friend class declaration.
Definition at line 59 of file Singleton.h.
typedef InstanceType Carna::base::Singleton< InstanceType >::Instance |
Denotes the class, that is derived from this class template.
Definition at line 96 of file Singleton.h.
|
inlineprotected |
Denotes that the instance was created. Default constructor is hidden.
Definition at line 74 of file Singleton.h.
|
inlinevirtual |
Denotes that the instance was deleted.
Definition at line 101 of file Singleton.h.
|
inlinestatic |
Tells whether the instance from class InstanceType currently exists.
Definition at line 117 of file Singleton.h.
|
inlinestatic |
Returns the only instance from class InstanceType.
Definition at line 109 of file Singleton.h.
|
inlinestaticprotected |
Deletes the only instance from class InstanceType.
Definition at line 83 of file Singleton.h.
Documentation generated by Doxygen