Back to index

salome-kernel  6.5.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Attributes | Static Private Attributes
BASICS_EXPORT Protocol Reference

The PROTECTED_DELETE base class provides a protected destructor. More...

#include <BasicsGenericDestructor.hxx>

Collaboration diagram for BASICS_EXPORT:
Collaboration graph

List of all members.

Public Member Functions

virtual void operator() (void)=0

Static Public Member Functions

static void deleteInstance (PROTECTED_DELETE *anObject)
static void addObj (PROTECTED_DELETE *anObject)
static const int Add (GENERIC_DESTRUCTOR &anObject)

Static Public Attributes

static std::list

Protected Member Functions


Static Protected Attributes

static std::list

Static Private Attributes

static pthread_mutex_t _listMutex

Detailed Description

The PROTECTED_DELETE base class provides a protected destructor.

The GENERIC_DESTRUCTOR abstract class describes the comportement of any destruction object.

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.

This type is used to create a list of miscellaneous destruction objects.

The only way to use the GENERIC_DESTRUCTOR class is inheritance: class SPECIFIC_DESTRUCTOR : public GENERIC_DESTRUCTOR

A generic destructor provides two methods:

  1. a static method to add a destruction (object) to be performed: GENERIC_DESTRUCTOR::Add(GENERIC_DESTRUCTOR &anObject); The Destruction object is stored in a list of pointer to GENERIC_DESTRUCTOR objects.
  2. an object method to execute the destruction : operator()().

Definition at line 74 of file BasicsGenericDestructor.hxx.

Constructor & Destructor Documentation

virtual BASICS_EXPORT::~PROTECTED_DELETE ( ) [protected, virtual]
virtual BASICS_EXPORT::~GENERIC_DESTRUCTOR ( ) [inline, virtual]

Definition at line 111 of file BasicsGenericDestructor.hxx.


Member Function Documentation

static const int BASICS_EXPORT::Add ( GENERIC_DESTRUCTOR &  anObject) [static]
static void BASICS_EXPORT::addObj ( PROTECTED_DELETE *  anObject) [static]
static void BASICS_EXPORT::deleteInstance ( PROTECTED_DELETE *  anObject) [static]
virtual void BASICS_EXPORT::operator() ( void  ) [pure virtual]

Member Data Documentation

pthread_mutex_t BASICS_EXPORT::_listMutex [static, private]

Definition at line 85 of file BasicsGenericDestructor.hxx.

std::list<PROTECTED_DELETE*> BASICS_EXPORT::_objList [static, protected]

Definition at line 82 of file BasicsGenericDestructor.hxx.

std::list<GENERIC_DESTRUCTOR*>* BASICS_EXPORT::Destructors [static]

Definition at line 109 of file BasicsGenericDestructor.hxx.

The documentation for this protocol was generated from the following file: