82 #define ASSA_DECL_SINGLETON(K) \
83 template <> K* ASSA::Singleton<K>::m_instance = NULL; \
84 template <class T> ASSA::Destroyer<T> ASSA::Singleton<T>::m_destroyer; \
85 template ASSA::Destroyer<K> ASSA::Singleton<K>::m_destroyer;
Destroyer is the helper class for class Singleton.
static Destroyer< T > m_destroyer
Destroyer that owns object T.
virtual ~Singleton()
Virtual Destructor.
Singleton()
Protected Constructor.
static T * get_instance()
Return an instance of templated class T.
static T * m_instance
Pointer to the object T instance.