class IReflectable

Interface implemented by classes that provide run time type information.

Public

Methods

~IReflectable

virtual ~IReflectable() noexcept = default

GetRtti

virtual RTTIType *GetRtti() const = 0

Returns an interface you can use to access class' Run Time Type Information.

IsDerivedFrom

bool IsDerivedFrom(const RTTIType *base) const

Returns true if current RTTI class is derived from (Or if it is the same type as base).

GetTypeId

u32 GetTypeId() const

Returns an unique type identifier of the class.

GetTypeName

const String &GetTypeName() const

Returns the type name of the class.

GetReflectableObjectFlags

ReflectableObjectFlags &GetReflectableObjectFlags()

Returns mutable flags specific to reflectable objects.

GetReflectableObjectFlags

const ReflectableObjectFlags &GetReflectableObjectFlags() const

Returns flags specific to reflectable objects.

staticCreateInstanceFromTypeId

static SPtr<IReflectable> CreateInstanceFromTypeId(u32 rttiTypeId)

Creates an empty instance of a class from a type identifier.

staticGetAllRttiTypes

static UnorderedMap<u32, RTTIType *> &GetAllRttiTypes()

Returns all available RTTI types.

staticGetRTTITypeFromTypeId

static RTTIType *GetRTTITypeFromTypeId(u32 rttiTypeId)

Returns class' RTTI type from type id.

Internal

Methods

staticRegisterRTTITypeInternal

static void RegisterRTTITypeInternal(RTTIType *rttiType)

Called by each type implementing RTTITypeBase, on program load.

staticIsTypeIdDuplicateInternal

static bool IsTypeIdDuplicateInternal(u32 typeId)

Checks if the provided type id is unique.

staticGetRttiStatic

static RTTIType *GetRttiStatic()

Returns an interface you can use to access class' Run Time Type Information.

Private

Fields

mReflectableObjectFlags

ReflectableObjectFlags mReflectableObjectFlags