20 #ifndef __OpenKarto_Meta_h__ 21 #define __OpenKarto_Meta_h__ 45 return MetaClassManager::GetInstance().GetSize();
56 return MetaClassManager::GetInstance()[index];
67 return MetaClassManager::GetInstance().GetByName(rName);
79 return MetaClassManager::GetInstance().GetById(GetTypeId(rObject));
90 return MetaClassManager::GetInstance().GetById(GetTypeId<T>());
103 return MetaEnumManager::GetInstance().GetSize();
114 return MetaEnumManager::GetInstance()[index];
125 return MetaEnumManager::GetInstance().GetByName(rName);
134 template <
typename T>
137 return MetaEnumManager::GetInstance().GetById(GetTypeId<T>(rObject));
145 template <
typename T>
148 return MetaEnumManager::GetInstance().GetById(GetTypeId<T>());
170 #define KARTO_TYPE(type) \ 171 template <> struct KartoTypeId<type> \ 173 static const char* Get(kt_bool = true) {return #type;} \ 180 #define KARTO_AUTO_TYPE(type, registerFunc) \ 181 template <> struct KartoTypeId<type> \ 183 static const char* Get(kt_bool checkRegister = true) \ 186 CheckTypeRegistered(#type, registerFunc); \ 198 #define KARTO_RTTI() \ 199 public: virtual const char* GetKartoClassId() const {return GetKartoTypeIdTemplate(this);} \ 206 #endif // __OpenKarto_Meta_h__
const MetaClass & GetMetaClassByIndex(kt_size_t index)
const MetaEnum & GetMetaEnumByType()
const MetaEnum & GetMetaEnumByIndex(kt_size_t index)
kt_size_t GetRegisteredMetaEnumSize()
const MetaClass & GetMetaClassByName(const karto::String &rName)
const MetaEnum & GetMetaEnumByObject(const T &rObject)
const MetaEnum & GetMetaEnumByName(const karto::String &rName)
const MetaClass & GetMetaClassByType()
void CheckTypeRegistered(const char *pName, void(*registerFunc)())
kt_size_t GetRegisteredMetaClassSize()
const MetaClass & GetMetaClassByObject(const T &rObject)