![]() |
MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Provides singleton amenities for a type T. More...
#include <mdsSingleton.h>

Public Types | |
| enum | { TEMPLATE_PARAMETER_IS_NOT_SINGLETON = T::CLASS_SINGLETON } |
| Check that T is singleton. More... | |
| enum | { LONGEVITY = T::LONGEVITY } |
| Singleton longevity. More... | |
| typedef CLibraryLockableClass < CSingletonHolder< T > >::CLock | tLock |
| Lock type. | |
| typedef T | tPointee |
| Pointee type. | |
| typedef T * | tPointer |
| Pointer type. | |
Static Public Member Functions | |
| static T & | getInstance () |
| Returns reference to the singleton instance. | |
| static void | lock () |
| Locks the object. | |
| static void | unlock () |
| Locks the object. | |
Provides singleton amenities for a type T.
To protect that type from spurious instantiations, you have to protect it yourself.
| typedef CLibraryLockableClass<CSingletonHolder<T> >::CLock mds::base::CSingletonHolder< T >::tLock |
Lock type.
| typedef T mds::base::CSingletonHolder< T >::tPointee |
Pointee type.
| typedef T* mds::base::CSingletonHolder< T >::tPointer |
Pointer type.
| anonymous enum |
| T & CSingletonHolder::getInstance | ( | ) | [static] |
Returns reference to the singleton instance.
| static void mds::base::CLockableClass< CSingletonHolder< T > >::lock | ( | ) | [static, inherited] |
Locks the object.
| static void mds::base::CLockableClass< CSingletonHolder< T > >::unlock | ( | ) | [static, inherited] |
Locks the object.
1.7.6.1