|
PTLib
Version 2.14.3
|
Template class for a simple singleton object. More...
#include <object.h>

Public Member Functions | |
| PSingleton () | |
| Type * | operator-> () const |
| Type & | operator* () const |
Protected Attributes | |
| Type * | m_instance |
Template class for a simple singleton object.
Usage is typically like:
typedef PSingleton<MyClass> MySingleton;
MySingleton()->DoSomething();
Default is not thread safe, however the following is:
typedef PSingleton<MyClass, PAtomicInteger> MySafeSingleton;
MySafeSingleton()->DoSomething();
|
inline |
|
inline |
|
inline |
|
protected |