20 union FFieldObjectUnion
33 Container.Field =
nullptr;
39 Container.Field =
const_cast<FField*
>(InField);
44 decltype(ImplicitConv<const UObject*>(std::declval<T>()))* =
nullptr
49 Container.Object =
const_cast<UObject*
>(ImplicitConv<const UObject*>(InObject));
52 inline bool IsUObject()
const
58 return !!Container.Object;
60 bool IsValidLowLevel()
const;
61 inline operator bool()
const
65 bool IsA(
const UClass* InClass)
const;
70 static_assert(
sizeof(T) > 0,
"T must not be an incomplete type");
71 return IsA(T::StaticClass());
102 return Container.Object;
113 return Container.Field;
123 return Container.Field;
128 return Container.Object;
131 void* GetRawPointer()
const
133 return Container.Field;
135 FFieldVariant GetOwnerVariant()
const;
136 UClass* GetOwnerClass()
const;
137 const std::string& GetFullName()
const;
138 const std::string& GetPathName()
const;
139 const std::string& GetName()
const;
140 const std::string& GetClassName()
const;
141 const std::string& GetFName()
const;
142 bool IsNative()
const;
145 bool operator==(
const FFieldVariant& Other)
const
147 return Container.Field == Other.Container.Field;
149 bool operator!=(
const FFieldVariant& Other)
const
151 return Container.Field != Other.Container.Field;
180 uint64_t m_CastFlags;
183 EClassFlags ClassFlags;
198 FField* ConstructDefaultObject();
212 inline const std::string& GetName()
const
217 inline uint64_t GetId()
const
221 inline uint64_t GetCastFlags()
const
225 inline bool HasAnyCastFlags(
const uint64_t InCastFlags)
const
227 return !!(m_CastFlags & InCastFlags);
229 inline bool HasAllCastFlags(
const uint64_t InCastFlags)
const
231 return (m_CastFlags & InCastFlags) == InCastFlags;
233 inline bool IsChildOf(
const FFieldClass* InClass)
const
235 const uint64_t OtherClassId = InClass->GetId();
236 return OtherClassId ? !!(m_CastFlags & OtherClassId) : IsChildOf_Walk(InClass);
238 const std::string& GetDescription()
const;
239 const std::string& GetDisplayNameText()
const;
241 FField* Construct(
const FFieldVariant& InOwner,
const std::string& InName, EObjectFlags InFlags = RF_NoFlags)
const
243 return ConstructFn(InOwner, InName, InFlags);
246 FFieldClass* GetSuperClass()
const
251 FField* GetDefaultObject()
255 DefaultObject = ConstructDefaultObject();
256 KR_CORE_ASSERT(DefaultObject,
"Default object is null");
258 return DefaultObject;
280 bool IsChildOf_Walk(
const FFieldClass* InBaseClass)
const
282 for (
const FFieldClass* TempField =
this; TempField; TempField = TempField->GetSuperClass())
284 if (TempField == InBaseClass)