From 1b5ee2a877346bb1159a62c154dfda91e416235f Mon Sep 17 00:00:00 2001 From: hyzboy Date: Thu, 11 Jul 2024 03:11:58 +0800 Subject: [PATCH] Added IDObject --- inc/hgl/type/_Object.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/inc/hgl/type/_Object.h b/inc/hgl/type/_Object.h index 5252593..2bef05b 100644 --- a/inc/hgl/type/_Object.h +++ b/inc/hgl/type/_Object.h @@ -1,5 +1,7 @@ -#ifndef HGL__OBJECT_INCLUDE -#define HGL__OBJECT_INCLUDE +#pragma once + +#include +#include namespace hgl { @@ -32,5 +34,17 @@ namespace hgl return ((u *)(&Mthd))->v; } };//struct MethodPtr + + template 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 -#endif//HGL__OBJECT_INCLUDE