A singleton design pattern implementation. More...
#include <Singleton.h>
Static Public Member Functions | |
static T * | instance () |
static void | destroy () |
Private Member Functions | |
Singleton (const Singleton &) | |
Singleton & | operator= (const Singleton &) |
Static Private Attributes | |
static T * | inst = NULL |
A singleton design pattern implementation.
A singleton has a unique instance accessible through the method instance().
Definition at line 31 of file Singleton.h.
static void Singleton< T >::destroy | ( | ) | [inline, static] |
Destroy the unique instance of the class.
Definition at line 54 of file Singleton.h.
static T* Singleton< T >::instance | ( | ) | [inline, static] |
Returns a pointer to the unique instance of the class or create one if there is none.
Definition at line 42 of file Singleton.h.