#include <Singleton.h>
Public Member Functions | |
const ACE_TCHAR * | dll_name (void) |
const ACE_TCHAR * | name (void) |
Static Public Member Functions | |
static TYPE * | instance (void) |
Global access point to the Singleton. | |
static void | close (void) |
Explicitly delete the Singleton instance. | |
static void | close_singleton (void) |
static void | dump (void) |
Dump the state of the object. | |
Protected Member Functions | |
ACE_DLL_Singleton_T (void) | |
Default constructor. | |
~ACE_DLL_Singleton_T (void) | |
Destructor. | |
Static Protected Member Functions | |
static ACE_DLL_Singleton_T < TYPE, ACE_LOCK > *& | instance_i (void) |
Get pointer to the singleton instance. | |
Protected Attributes | |
TYPE | instance_ |
Contained instance. | |
Static Protected Attributes | |
static ACE_DLL_Singleton_T < TYPE, ACE_LOCK > * | singleton_ = 0 |
Pointer to the Singleton instance. |
This version of ACE_Singleton should be used for singletons that live in a dll loaded either directly by ACE_DLL or indirectly by the ACE Service Configuration framework. Whenever ACE_DLL is ready to actually unload the dll, ACE_DLL_Singleton based dlls associated with that dll will be destroyed first. In fact, any singleton can safely use ACE_DLL_Singleton, even those that don't live in dlls. In that case, the singleton will be destroyed at normal program shutdown.
The only additional requirement is that the contained class export name() and dll_name() methods. See ACE_DLL_Singleton_Adapter_T below for a convenient example of how to satisfy this requirement for the dll_name().
Usage is the same as for ACE_Singleton, but note that if you you declare a friend, the friend class must still be an *ACE_Singleton*<T, [ACE_LOCK]>, not an ACE_Unmanaged_Singleton.
ACE_DLL_Singleton_T< TYPE, ACE_LOCK >::ACE_DLL_Singleton_T | ( | void | ) | [inline, protected] |
Default constructor.
ACE_DLL_Singleton_T< TYPE, ACE_LOCK >::~ACE_DLL_Singleton_T | ( | void | ) | [inline, protected] |
Destructor.
void ACE_DLL_Singleton_T< TYPE, ACE_LOCK >::close | ( | void | ) | [inline, static] |
Explicitly delete the Singleton instance.
void ACE_DLL_Singleton_T< TYPE, ACE_LOCK >::close_singleton | ( | void | ) | [inline, static] |
const ACE_TCHAR * ACE_DLL_Singleton_T< TYPE, ACE_LOCK >::dll_name | ( | void | ) | [inline] |
void ACE_DLL_Singleton_T< TYPE, ACE_LOCK >::dump | ( | void | ) | [inline, static] |
Dump the state of the object.
TYPE * ACE_DLL_Singleton_T< TYPE, ACE_LOCK >::instance | ( | void | ) | [inline, static] |
Global access point to the Singleton.
ACE_DLL_Singleton_T< TYPE, ACE_LOCK > *& ACE_DLL_Singleton_T< TYPE, ACE_LOCK >::instance_i | ( | void | ) | [inline, static, protected] |
Get pointer to the singleton instance.
const ACE_TCHAR * ACE_DLL_Singleton_T< TYPE, ACE_LOCK >::name | ( | void | ) | [inline] |
TYPE ACE_DLL_Singleton_T< TYPE, ACE_LOCK >::instance_ [protected] |
Contained instance.
ACE_DLL_Singleton_T< TYPE, ACE_LOCK > * ACE_DLL_Singleton_T< TYPE, ACE_LOCK >::singleton_ = 0 [inline, static, protected] |
Pointer to the Singleton instance.