00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
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
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
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
00120 template<class T, typename P1, typename P2> friend class CL_TMPL_DBL_MANAGER;
00121
00122
00123 };
00124
00125 };
00126 #if SG_TLS_MEMORY_MANAGER
00127 #include "SugoiTools\debug_new_off.h"
00128 #endif
00129
00130 #endif //SG_TLS_CL_BASE_DBL_OBJ_H