Main Page   Class Hierarchy   Compound List   File List   Compound Members  

TSingletonDestroyerT.hh

00001 #ifndef _T_SINGLETON_DESTROYER_T_HH
00002 #define _T_SINGLETON_DESTROYER_T_HH
00003 
00005 
00006 template <class T>
00007 class TSingletonDestroyerT
00008 {
00009 public:
00010   
00011   TSingletonDestroyerT (T *object= 0) { myObject = object; }
00012   
00013   ~TSingletonDestroyerT ()
00014   {
00015     if (myObject)
00016       delete myObject;
00017   }
00018   
00019   void SetObject (T *object) { myObject = object; }
00020   
00021 private:
00022   
00023   TSingletonDestroyerT (const TSingletonDestroyerT<T>&);
00024   
00025   void operator=(const TSingletonDestroyerT<T>&);
00026   
00027   T *myObject;
00028 };
00029 
00030 #endif // _T_SINGLETON_DESTROYER_T_HH

Generated on Sat Feb 15 18:37:16 2003 for Tools by doxygen1.3-rc2