xoreos
0.0.5
|
Generic template base class for implementing the singleton design pattern. More...
#include <singleton.h>
Static Public Member Functions | |
static T & | instance () |
static void | destroy () |
Protected Types | |
typedef T | SingletonBaseType |
Protected Member Functions | |
Singleton () | |
virtual | ~Singleton () |
Private Member Functions | |
Singleton (const Singleton< T > &) | |
Singleton< T > & | operator= (const Singleton< T > &) |
template<> | |
Aurora::TwoDARegistry * | _singleton |
Static Private Member Functions | |
static T * | makeInstance () |
The default object factory used by the template class Singleton. More... | |
static void | destroyInstance () |
Static Private Attributes | |
static T * | _singleton |
Generic template base class for implementing the singleton design pattern.
Definition at line 61 of file singleton.h.
|
protected |
Definition at line 111 of file singleton.h.
|
private |
|
inlineprotected |
Definition at line 108 of file singleton.h.
|
inlineprotectedvirtual |
Definition at line 109 of file singleton.h.
|
private |
Definition at line 35 of file 2dareg.cpp.
Referenced by Common::Singleton< TimerManager >::destroyInstance(), and Common::Singleton< TimerManager >::instance().
|
inlinestatic |
Definition at line 104 of file singleton.h.
Referenced by Events::RequestManager::destroy().
|
inlinestaticprivate |
Definition at line 84 of file singleton.h.
|
inlinestatic |
Definition at line 91 of file singleton.h.
|
inlinestaticprivate |
The default object factory used by the template class Singleton.
By specialising this template function, one can make a singleton use a custom object factory. For example, to support encapsulation, your singleton class might be pure virtual (or "abstract" in Java terminology), and you specialise makeInstance to return an instance of a subclass.
Definition at line 80 of file singleton.h.
|
private |
|
staticprivate |
Definition at line 66 of file singleton.h.