Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Template base class for singletons. More...
#include <Singleton.h>
Public Member Functions | |
Singleton () | |
~Singleton () | |
Static Public Member Functions | |
static T & | GetSingleton () |
static T * | GetSingletonPtr () |
static bool | IsInitialised () |
Private Member Functions | |
NONCOPYABLE (Singleton) | |
Static Private Attributes | |
static T * | ms_singleton = nullptr |
Template base class for singletons.
Usage: class MyClass : public Singleton<MyClass> {}; MyClass::GetSingleton().MyMethod();
Modified from http://gamedev.net/reference/articles/article1954.asp
|
inline |