Version: 8.3.0
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
DESTRUCTEUR_DE_< TYPE > Class Template Reference
Inheritance diagram for DESTRUCTEUR_DE_< TYPE >:
Inheritance graph

Public Member Functions

 DESTRUCTEUR_DE_ (TYPE &objet)
 
virtual void operator() (void)
 performs the destruction More...
 

Static Public Member Functions

static const int Ajout (DESTRUCTEUR_GENERIQUE_ &objet)
 adds a destruction object to the list of destructions More...
 

Static Public Attributes

static std::list
< DESTRUCTEUR_GENERIQUE_ * > * 
Destructeurs =0
 

Detailed Description

template<class TYPE>
class DESTRUCTEUR_DE_< TYPE >

Purpose

The DESTRUCTEUR_DE_ class allows the user to program - at any moment - the destruction of an object at the end of the process.

Usage

 In this example the POINT_ ptrPoint will be destroyed at the end of the process (atexit).

 POINT_ *ptrPoint = new POINT_ ;<BR>
 DESTRUCTEUR_DE_<POINT_> *ptrDestruction = new DESTRUCTEUR_DE_<POINT_>( *ptrPoint ) ;

 Note that neither ptrPoint, nor ptrDestruction should be destroyed by the user.

Design description

 The destruction object must be created dynamicaly because it suscribes himself in the list of
 destruction to be performed at the end of the process.

Member Function Documentation

template<class TYPE >
virtual void DESTRUCTEUR_DE_< TYPE >::operator() ( void  )
inlinevirtual

performs the destruction

Implements DESTRUCTEUR_GENERIQUE_.

const int DESTRUCTEUR_GENERIQUE_::Ajout ( DESTRUCTEUR_GENERIQUE_ objet)
staticinherited

adds a destruction object to the list of destructions

Adds a destruction object to the list of actions to be performed at the end of the process