#include <tjhandler.h>
Inheritance diagram for SingletonHandler< T, thread_safe >:


Public Member Functions | |
| SingletonHandler () | |
| void | init (const char *unique_label) |
| void | destroy () |
| void | copy (T &destination) const |
| T * | unlocked_ptr () |
| LockProxy< T > | operator-> () |
| const T * | operator-> () const |
| operator bool () const | |
Its main purpose is to share singletons across DLL boundaries on Windows and/or thread-safe access to global resources. This class has an pointer-to-T-like interface.
Definition at line 144 of file tjhandler.h.
| void SingletonHandler< T, thread_safe >::init | ( | const char * | unique_label | ) |
Initialize the singleton with the unique identifier 'unique_label'. The singleton object will be allocated if it does not already exist somewhere in the program.
Definition at line 104 of file tjhandler_code.h.
| void SingletonHandler< T, thread_safe >::destroy | ( | ) |
Deletes the singleton
Definition at line 120 of file tjhandler_code.h.
| void SingletonHandler< T, thread_safe >::copy | ( | T & | destination | ) | const |
Copies this to 'destination'
Definition at line 127 of file tjhandler_code.h.
| T* SingletonHandler< T, thread_safe >::unlocked_ptr | ( | ) | [inline] |
Returns unlocked ptr to object (know what you are doing)
Definition at line 174 of file tjhandler.h.
| LockProxy<T> SingletonHandler< T, thread_safe >::operator-> | ( | ) | [inline] |
Returns mutex-locked pointer to handled singleton
Definition at line 182 of file tjhandler.h.
| const T* SingletonHandler< T, thread_safe >::operator-> | ( | ) | const [inline] |
Returns read-only pointer to handled singleton
Definition at line 187 of file tjhandler.h.
| SingletonHandler< T, thread_safe >::operator bool | ( | ) | const [inline] |
Returns whether singleton is already initialized
Definition at line 192 of file tjhandler.h.
1.5.1