#pragma once #include "field.h" namespace refl { template consteval auto fetch_method_t(R(T::*)(Args...)) { using MethodType = R(*)(const void*, Args...); return MethodType{ nullptr }; } template consteval auto fetch_method_t(R(*)(Args...)) { using MethodType = R(*)(Args...); return MethodType{ nullptr }; } template consteval int fetch_meta_size() { auto fields = T::__MakeStaticFields(); int size = 0; for (auto& field : fields) { size += field.data.member.offset; } return size; } enum MetaFlag :uint32_t { META_NONE_FLAG = 0, META_SERIZLE_FLAG = 1 << 0, META_UI_FLAG = 1 << 0, }; class UClass; class MemberDataValue; class MethodDataValue; class Meta { public: UClass* cls; uint32_t flag{ 0 }; template static FieldPtr MemberField(T Obj::* ptr, const Name& name, char*& memory, const MemberDataValue& data = {}); template static FieldPtr MethodField(R(*ptr)(Args...), const Name& name,char*& memory, const MethodDataValue& data = {}); template static FieldPtr MethodField(R(T::*ptr)(Args...), const Name& name,char*& memory, const MethodDataValue& data = {}); }; }