libassa
3.5.0
|
#include <Singleton.h>
Static Public Member Functions | |
static T * | get_instance () |
Return an instance of templated class T. | |
Protected Member Functions | |
Singleton () | |
Protected Constructor. | |
virtual | ~Singleton () |
Virtual Destructor. | |
Static Private Attributes | |
static T * | m_instance |
Pointer to the object T instance. | |
static Destroyer< T > | m_destroyer |
Destroyer that owns object T. | |
Friends | |
class | Destroyer< T > |
Definition at line 42 of file Singleton.h.
ASSA::Singleton< T >::Singleton | ( | ) | [inline, protected] |
virtual ASSA::Singleton< T >::~Singleton | ( | ) | [inline, protected, virtual] |
static T* ASSA::Singleton< T >::get_instance | ( | ) | [inline, static] |
Return an instance of templated class T.
Definition at line 47 of file Singleton.h.
{ if (m_instance == 0) { m_instance = new T; m_destroyer.setGuard (m_instance); } return m_instance; }
friend class Destroyer< T > [friend] |
Definition at line 59 of file Singleton.h.
Destroyer<T> ASSA::Singleton< T >::m_destroyer [static, private] |
Destroyer that owns object T.
Definition at line 69 of file Singleton.h.
Referenced by ASSA::Singleton< Logger >::get_instance().
T* ASSA::Singleton< T >::m_instance [static, private] |
Pointer to the object T instance.
Definition at line 66 of file Singleton.h.
Referenced by ASSA::Singleton< Logger >::get_instance().