-// SALOME Utils : general SALOME's definitions and tools
+// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// SALOME Utils : general SALOME's definitions and tools
// File : Utils_SINGLETON.hxx
// Author : Antoine YESSAYAN, EDF
// Module : SALOME
// $Header$
-
+//
# if !defined( __SINGLETON__H__ )
# define __SINGLETON__H__
+#include "SALOME_Utils.hxx"
+
# include "Utils_DESTRUCTEUR_GENERIQUE.hxx"
# include <list>
{
if ( ! PtrSingleton )
{
- MESSAGE("SINGLETON_<TYPE>::Instance( void )") ;
+ //MESSAGE("SINGLETON_<TYPE>::Instance( void )") ;
PtrSingleton = new SINGLETON_<TYPE> ;
new DESTRUCTEUR_DE_<TYPE>( PtrSingleton->_Instance ) ;
}
template <class TYPE> SINGLETON_<TYPE>::SINGLETON_( void )
{
- MESSAGE("CREATION d'un SINGLETON_") ;
+ //MESSAGE("CREATION d'un SINGLETON_") ;
}
template <class TYPE> int SINGLETON_<TYPE>::Destruction( void )
{
int k = - 1 ;
- BEGIN_OF("SINGLETON_<TYPE>::Destruction( void )") ;
+ //BEGIN_OF("SINGLETON_<TYPE>::Destruction( void )") ;
if ( PtrSingleton )
{
- MESSAGE("Destruction du SINGLETON_") ;
+ //MESSAGE("Destruction du SINGLETON_") ;
- list<DESTRUCTEUR_GENERIQUE_ *>::iterator k ;
- for( k=DESTRUCTEUR_GENERIQUE_::Destructeurs.begin() ; k!=DESTRUCTEUR_GENERIQUE_::Destructeurs.end();k++)
+ std::list<DESTRUCTEUR_GENERIQUE_ *>::iterator k ;
+ for( k=DESTRUCTEUR_GENERIQUE_::Destructeurs->begin() ; k!=DESTRUCTEUR_GENERIQUE_::Destructeurs->end();k++)
{
if ( *k == PtrSingleton->_Instance )
{
- DESTRUCTEUR_GENERIQUE_::Destructeurs.erase( k ) ;
+ DESTRUCTEUR_GENERIQUE_::Destructeurs->erase( k ) ;
break ;
}
}
delete PtrSingleton ;
PtrSingleton = NULL ;
}
- END_OF("SINGLETON_<TYPE>::Destruction( void )") ;
+ //END_OF("SINGLETON_<TYPE>::Destruction( void )") ;
return k ;
}
template <class TYPE> SINGLETON_<TYPE>::~SINGLETON_()
{
- MESSAGE("passage dans SINGLETON_<TYPE>::~SINGLETON_( void )") ;
+ //MESSAGE("passage dans SINGLETON_<TYPE>::~SINGLETON_( void )") ;
}
# endif /* # if !defined( __SINGLETON__H__ ) */