zengine-old/engine/3rdparty/zlib/include/refl/object.h

25 lines
565 B
C
Raw Normal View History

2024-04-04 18:18:04 +08:00
#include <string>
namespace refl {
class UClass;
class FieldPtr;
class ObjectView {
public:
const char* ptr;
const UClass* cls;
const FieldPtr* cache{nullptr};
ObjectView(void* ptr, const UClass* cls) : ptr((const char*)ptr), cls(cls){}
public:
template<typename T>
bool Get(const Name& name, T& t);
template<typename T>
bool Set(const Name& name, const T& t);
template<typename ...Args>
bool Invoke(const Name& name, Args... args);
2024-04-05 16:03:58 +08:00
template<typename R, typename ...Args>
bool InvokeRet(const Name& name,R& ret, Args... args);
2024-04-04 18:18:04 +08:00
};
}