D:/WorkDir/SugoiProjects/SugoiTools/include/SugoiTools/cl_base_DBL_obj.h

00001 /* LICENSE_BEGIN
00002 SutoiTools library supply support for debugging, testing and 
00003 setting good bases for you application. It is part of the 
00004 SugoiEngine project.
00005 Copyright (C) 2006 Allusse Yannick (yannick dot allusse at laposte dot net)
00006 
00007 
00008 This program is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU General Public License
00010 as published by the Free Software Foundation; either version 2
00011 of the License, or (at your option) any later version.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License for more details.
00017 
00018 You should have received a copy of the GNU General Public License
00019 along with this program; if not, write to the Free Software
00020 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00021 LICENSE_END
00022 */
00023 
00024 /* \file SG_TLS_cl_base_dbl_obj.h
00025  * \brief Supply two basic class used by the CL_template_manager.
00026  * \author Yannick Allusse
00027 */
00028 #ifndef SG_TLS_CL_BASE_DBL_OBJ_H
00029 #define SG_TLS_CL_BASE_DBL_OBJ_H
00030 
00031 #include "SugoiTools\config.h"
00032 #include "SugoiTools\cl_base_obj.h"
00033 #include <sys/stat.h>
00034 #include <time.h>
00035 
00036 
00037 #if SG_TLS_MEMORY_MANAGER
00038           #include "SugoiTools\debug_new.h"
00039 #endif 
00040 
00041 namespace SGE{
00042 
00043 //template <typename IDType2>class CL_BASE_OBJ_FILE;
00044 
00045 
00046 
00052 template <typename IDType1=std::string, typename IDType2=int>
00053 class CL_BASE_DBL_OBJ : 
00054           protected CL_BASE_OBJ<IDType1>, 
00055           protected CL_BASE_OBJ<IDType2>
00056 {
00057 public:
00058 
00063           _SG_TLS_INLINE 
00064                     CL_BASE_DBL_OBJ(const IDType1 & _ID1)
00065                               :CL_BASE_OBJ<IDType1>(_ID1),
00066                               CL_BASE_OBJ<IDType2>(0)
00067                               {
00068                               }
00069 
00073           _SG_TLS_INLINE 
00074                     CL_BASE_DBL_OBJ(const IDType2 & _ID2)
00075                               :CL_BASE_OBJ<IDType1>(0),
00076                               CL_BASE_OBJ<IDType2>(_ID2)
00077                               {
00078                               }
00079 
00084           _SG_TLS_INLINE 
00085                     CL_BASE_DBL_OBJ(const IDType1 & _ID1, const IDType2 & _ID2)
00086                               :CL_BASE_OBJ<IDType1>(_ID1),
00087                               CL_BASE_OBJ<IDType2>(_ID2)
00088                               {
00089                               }
00090 
00094           _SG_TLS_INLINE 
00095                     ~CL_BASE_DBL_OBJ(){};
00096 
00097 
00098           template <typename IDType>
00099                     IDType    
00100                               GetID()
00101                               { return CL_BASE_OBJ<IDType>::GetID();}
00102 
00103 
00108           //_SG_TLS_INLINE 
00109                     template <typename IDType>
00110                     const CL_BASE_OBJ<IDType> *   
00111                               GetObj()const
00112                               {return  (CL_BASE_OBJ<IDType>*)this;}
00113 
00114                     template <typename IDType>
00115                     void      
00116                               SetID(IDType _ID)
00117                               {CL_BASE_OBJ<IDType>::SetID(_ID);}
00118 
00119           //friend class
00120           template<class T, typename P1, typename P2>  friend class CL_TMPL_DBL_MANAGER;
00121 //        template <typename IDType2>                                            friend class CL_BASE_OBJ_FILE;
00122 
00123 };
00124 
00125 };//namespace
00126 #if SG_TLS_MEMORY_MANAGER
00127           #include "SugoiTools\debug_new_off.h"//Must be the last....
00128 #endif 
00129 
00130 #endif //SG_TLS_CL_BASE_DBL_OBJ_H

Generated on Mon Mar 19 23:15:10 2007 for SugoiTools by  doxygen 1.4.6-NO