![]() |
LibCarna Version 3.4.0
|
Singleton base class More...
#include <Singleton.hpp>
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 62 of file Singleton.hpp.
typedef InstanceType LibCarna::base::Singleton< InstanceType >::Instance |
Denotes the class, that is derived from this class template.
Definition at line 99 of file Singleton.hpp.
|
inlineprotected |
Denotes that the instance was created. Default constructor is hidden.
Definition at line 77 of file Singleton.hpp.
|
inlinevirtual |
Denotes that the instance was deleted.
Definition at line 104 of file Singleton.hpp.
|
inlinestatic |
Tells whether the instance from class InstanceType currently exists.
Definition at line 120 of file Singleton.hpp.
|
inlinestatic |
Returns the only instance from class InstanceType.
Definition at line 112 of file Singleton.hpp.
|
inlinestaticprotected |
Deletes the only instance from class InstanceType.
Definition at line 86 of file Singleton.hpp.
Written by Leonid Kostrykin © 2021–2025. Based on Carna (© 2010-2016).
Documentation generated by Doxygen