i6engine
1.0
|
Derive from this templated class to make a class a singleton. Refer to the Singleton Design Pattern if it is not clear what a singleton is. Declare the ctor private but destructor public (because of destruction is handled by shared_ptr) T = type of new Singleton class Dependencies = dependencies of this Singleton, will be initialized before this Singleton is initialized and destroyed after this one is destroyed. More...
#include <D:/Projekte/i6engine/libs/i6engine-utils/include/i6engine/utils/Singleton.h>
Static Public Member Functions | |
static T * | GetSingletonPtr () |
Returns a pointer to the Singleton class. More... | |
static T & | GetSingleton () |
Returns a reference to the Singleton class. More... | |
Protected Member Functions | |
Singleton () | |
virtual | ~Singleton () |
Derive from this templated class to make a class a singleton. Refer to the Singleton Design Pattern if it is not clear what a singleton is. Declare the ctor private but destructor public (because of destruction is handled by shared_ptr) T = type of new Singleton class Dependencies = dependencies of this Singleton, will be initialized before this Singleton is initialized and destroyed after this one is destroyed.
Definition at line 44 of file Singleton.h.
|
inlineprotected |
Definition at line 61 of file Singleton.h.
|
inlineprotectedvirtual |
Definition at line 64 of file Singleton.h.
|
inlinestatic |
Returns a reference to the Singleton class.
Definition at line 56 of file Singleton.h.
|
inlinestatic |
Returns a pointer to the Singleton class.
Definition at line 49 of file Singleton.h.