10#include "LkEngine/Core/Log/Log.h"
29 enum class EObjectFlag : uint32_t
38 LK_ENUM_CLASS(EObjectFlag);
42 template<
typename TObject>
45 { Object.GetName() } -> std::same_as<std::string>;
62 template<
typename OtherClassType>
63 FORCEINLINE
bool IsA(OtherClassType OtherObject)
const
65 const LClass* OtherClass = OtherObject;
66 LK_CORE_ASSERT(OtherClass,
"IsA failed, other class object is nullptr");
71 LK_ASSUME(OtherClass);
81 template<
typename ClassType>
82 static FORCEINLINE
bool IsChildOf(
const ClassType* InObjectClass,
const ClassType* InOtherClass)
84 LK_CORE_ASSERT(InObjectClass);
85 return InObjectClass->IsChildOf(InOtherClass);
110 return (ClassPrivate !=
nullptr);
117 LClass* ClassPrivate =
nullptr;
124 template<
typename,
typename =
void>
128 struct HasGetClass<T,
std::void_t<decltype(std::declval<T>().GetClass())>> : std::true_type {};
136 { T::StaticClassName() } -> std::convertible_to<std::string_view>;
137 { T::StaticClass() } -> std::same_as<const LClass*>;
138 { std::declval<T>().ClassName() } -> std::convertible_to<std::string>;
139 { std::declval<T>().ClassRegistration() } -> std::same_as<const LClass*>;
140 typename T::BaseClass;
141 typename T::ThisClass;
Definition ObjectBase.h:57
static FORCEINLINE bool IsChildOf(const ClassType *InObjectClass, const ClassType *InOtherClass)
Check if the object is a child of another class.
Definition ObjectBase.h:82
FORCEINLINE const LClass * GetClass() const
Get the private class member.
Definition ObjectBase.h:99
FORCEINLINE bool IsA(OtherClassType OtherObject) const
Check if the object is the same type as the passed object's.
Definition ObjectBase.h:63
void SetClass(LClass *InClass)
Set the class.
Definition ObjectBase.cpp:9
FORCEINLINE bool IsClassValid() const
Check if LObjectBase has a valid LClass object.
Definition ObjectBase.h:108
Definition ObjectBase.h:134
Definition ObjectBase.h:43
Definition ObjectBase.h:125