DART
6.7.3
|
Singleton template class. More...
#include <Singleton.hpp>
Static Public Member Functions | |
template<typename... Args> | |
static T & | getSingleton (Args... _args) |
Returns reference of the singleton. More... | |
template<typename ... Args> | |
static T * | getSingletonPtr (Args... _args) |
Returns pointer of the singleton. More... | |
Protected Member Functions | |
Singleton ()=default | |
Constructor. More... | |
virtual | ~Singleton ()=default |
Destructor. More... | |
Private Member Functions | |
Singleton (const T &)=delete | |
Don't implement copy constructor. More... | |
const T & | operator= (const T &)=delete |
Don't assignment operator. More... | |
Static Private Attributes | |
static T * | mInstance = nullptr |
Singleton instance. More... | |
Singleton template class.
// Singletone class Engine class Engine : public Singleton<Engine> {};
// Call before main() and use theT only instead of calling getSingleton() static T& theT = T::getSingleton();
|
protecteddefault |
Constructor.
|
protectedvirtualdefault |
Destructor.
|
privatedelete |
Don't implement copy constructor.
|
static |
Returns reference of the singleton.
|
static |
Returns pointer of the singleton.
|
privatedelete |
Don't assignment operator.
|
staticprivate |
Singleton instance.