Singleton Class Template Reference
#include <Singleton.h>
Inheritance diagram for Singleton:
Static Public Member Functions | |
T * | instance () |
Detailed Description
template<class T, class InstantiationPolicy = LazyInstantiation, class LockType = FastMutex>
class ZThread::Singleton< T, InstantiationPolicy, LockType >
- Author:
- Eric Crahen <http://www.code-foo.com>
- Date:
- <2003-07-16T17:57:45-0400>
- Version:
- 2.2.0
This is a thread safe wrapper for creating Singleton classes. The synchronization method and instantiation methods can be changed easily by specifying different policy implementations as the templates parameters.
// Most common Singleton Singletion<LonesomeType> // Singleton that uses static storage Singletion<LonesomeType, StaticInstantiation> // Single-threaded singleton that uses static storage (Meyers-like) Singletion<LonesomeType, LocalStaticInstantiation, NotLocked>
Member Function Documentation
|
Provide access to the single instance through double-checked locking
|
The documentation for this class was generated from the following file:
- Singleton.h