The PROTECTED_DELETE base class provides a protected destructor. More...
#include <BasicsGenericDestructor.hxx>
Static Public Member Functions | |
static void | deleteInstance (PROTECTED_DELETE *anObject) |
deleteInstance deletes only once the object. More... | |
static void | addObj (PROTECTED_DELETE *anObject) |
To allow a further destruction of a PRTECTED_DELETE object, it must be added to the static list of PROTECTED_DELETE*. More... | |
Protected Member Functions | |
virtual | ~PROTECTED_DELETE () |
Herited classes have there own destructors. More... | |
Static Protected Attributes | |
static std::list < PROTECTED_DELETE * > | _objList |
Static Private Attributes | |
static pthread_mutex_t | _listMutex |
The PROTECTED_DELETE base class provides a protected destructor.
The only way to use PROTECTED_DELETE is inheritance: example: class LocalTraceBufferPool : public PROTECTED_DELETE Herited class destructor must stay protected. Normal use is:
This class is utilised with GENERIC_DESTRUCTOR and DESTRUCTOR_OF, to program automatic deletion of objects at the end of the process, while keeping the possibility of an early destruction, if required. This is used for unit testing and trace mecanism.
|
protectedvirtual |
Herited classes have there own destructors.
References DEVTRACE.
|
static |
To allow a further destruction of a PRTECTED_DELETE object, it must be added to the static list of PROTECTED_DELETE*.
References _objList, and DEVTRACE.
Referenced by DESTRUCTOR_OF< TYPE >::DESTRUCTOR_OF().
|
static |
deleteInstance deletes only once the object.
Only object present on the static list of PROTECTED_DELETE* are deleted, then removed of the list. The operation is protected by a mutex.
References _listMutex, _objList, and DEVTRACE.
Referenced by DESTRUCTOR_OF< TYPE >::operator()(), UtilsTest::setUp(), LifeCycleCORBATest::setUp(), NamingServiceTest::setUp(), UtilsTest::tearDown(), LifeCycleCORBATest::tearDown(), NamingServiceTest::tearDown(), SALOMETraceCollectorTest::testLoadBufferPoolCORBA(), SALOMELocalTraceTest::testLoadBufferPoolFile(), SALOMELocalTraceTest::testLoadBufferPoolLocal(), and SALOMELocalTraceTest::testSingletonBufferPool().
|
staticprivate |
Referenced by deleteInstance().
|
staticprotected |
Referenced by addObj(), and deleteInstance().