Added IDObject
This commit is contained in:
parent
0c90f638de
commit
1b5ee2a877
@ -1,5 +1,7 @@
|
|||||||
#ifndef HGL__OBJECT_INCLUDE
|
#pragma once
|
||||||
#define HGL__OBJECT_INCLUDE
|
|
||||||
|
#include <typeindex>
|
||||||
|
#include <typeinfo>
|
||||||
|
|
||||||
namespace hgl
|
namespace hgl
|
||||||
{
|
{
|
||||||
@ -32,5 +34,17 @@ namespace hgl
|
|||||||
return ((u *)(&Mthd))->v;
|
return ((u *)(&Mthd))->v;
|
||||||
}
|
}
|
||||||
};//struct MethodPtr
|
};//struct MethodPtr
|
||||||
|
|
||||||
|
template<size_t ClassCounter> class IDObject:public _Object
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
static const size_t GetClassID(){return ClassID;}
|
||||||
|
static const char *GetClassName(){return ClassName;}
|
||||||
|
static const char *GetClassRawName(){return ClassRawName;}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
virtual ~IDObject()=default;
|
||||||
|
};
|
||||||
}//namespace hgl
|
}//namespace hgl
|
||||||
#endif//HGL__OBJECT_INCLUDE
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user