29 # if !defined( __SINGLETON__H__ )
30 # define __SINGLETON__H__
32 #include "SALOME_Utils.hxx"
34 # include "Utils_DESTRUCTEUR_GENERIQUE.hxx"
110 if ( ! PtrSingleton )
116 return &PtrSingleton->_Instance ;
122 return PtrSingleton ?
true : false ;
151 std::list<DESTRUCTEUR_GENERIQUE_ *>::iterator k ;
152 for( k=DESTRUCTEUR_GENERIQUE_::Destructeurs->begin() ; k!=DESTRUCTEUR_GENERIQUE_::Destructeurs->end();k++)
154 if ( *k == PtrSingleton->_Instance )
156 DESTRUCTEUR_GENERIQUE_::Destructeurs->erase( k ) ;
160 delete PtrSingleton ;
161 PtrSingleton = NULL ;
static bool IsAlreadyExisting(void)
returns True if the singleton is already existing
Definition: Utils_SINGLETON.hxx:120
Definition: Utils_SINGLETON.hxx:73
static TYPE * Instance(void)
Singleton dynamic creation using the default builder.
Definition: Utils_SINGLETON.hxx:108
Definition: Utils_DESTRUCTEUR_GENERIQUE.hxx:96
static int Destruction(void)
destroys the Singleton before the end of the application process
Definition: Utils_SINGLETON.hxx:142