Meta

July 1, 2023 ยท View on GitHub

Members

define AE_REGISTER_CLASS

define AE_REGISTER_CLASS_PROPERTY

define AE_REGISTER_CLASS_PROPERTY_VALUE

define AE_REGISTER_CLASS_VAR

define AE_REGISTER_CLASS_VAR_PROPERTY

define AE_REGISTER_CLASS_VAR_PROPERTY_VALUE

define AE_DEFINE_ENUM_CLASS

Define a new enum (must register with AE_REGISTER_ENUM_CLASS)

define AE_REGISTER_ENUM_CLASS

Register an enum defined with AE_DEFINE_ENUM_CLASS.

define AE_REGISTER_ENUM

Register an already defined c-style enum type.

define AE_REGISTER_ENUM_PREFIX

Register an already defined c-style enum type where each value has a prefix.

define AE_REGISTER_ENUM_VALUE

Register c-style enum value.

define AE_REGISTER_ENUM_VALUE_NAME

Register c-style enum value with a manually specified name.

define AE_REGISTER_ENUM_CLASS2

Register an already defined enum class type.

define AE_REGISTER_ENUM_CLASS2_VALUE

Register enum class value.

enum BasicType

ValuesDescriptions
String
UInt8
UInt16
UInt32
UInt64
Int8
Int16
Int32
Int64
Int2
Int3
Bool
Float
Double
Vec2
Vec3
Vec4
Matrix4
Color
Enum
Pointer
CustomRef

public uint32_t GetTypeCount()

Get the number of registered ae::Type's.

public const Type * GetTypeByIndex(uint32_t i)

Get a registered ae::Type by index.

public const Type * GetTypeById(ae::TypeId id)

Get a registered ae::Type by id. Same as ae::Type::GetId()

public const Type * GetTypeByName(const char * typeName)

Get a registered ae::Type from a type name.

public const Type * GetTypeFromObject(const ae::Object & obj)

Get a registered ae::Type from an ae::Object.

public const Type * GetTypeFromObject(const ae::Object * obj)

Get a registered ae::Type from a pointer to an ae::Object.

public template<>
const Type *
GetType()

Get a registered ae::Type directly from a type.

public const class Enum * GetEnum(const char * enumName)

Get a registered ae::Enum by name.

public ae::TypeId GetObjectTypeId(const ae::Object * obj)

Get a registered ae::TypeId from an ae::Object.

public ae::TypeId GetTypeIdFromName(const char * name)

Get a registered ae::TypeId from a type name.

public template<>
const T *
Cast(const C * obj)

public template<>
T *
Cast(C * obj)



ae::Object class

Base class for all meta registered objects.

Inherit from this using ae::Inheritor and register your classes with AE_REGISTER_CLASS.

public ae::TypeId _metaTypeId

public ae::Str32 _typeName

public inline virtual ~Object()

public inline ae::TypeId GetTypeId() const



ae::Inheritor class

class ae::Inheritor
  : public Parent

public Inheritor()

typedef aeBaseType



ae::Enum class

public inline const char * GetName() const

public inline uint32_t TypeSize() const

public inline bool TypeIsSigned() const

public template<>
std::string
GetNameByValue(T value) const

public template<>
bool
GetValueFromString(const char * str,T * valueOut) const

public template<>
T
GetValueFromString(const char * str,T defaultValue) const

public template<>
bool
HasValue(T value) const

public int32_t GetValueByIndex(int32_t index) const

public std::string GetNameByIndex(int32_t index) const

public uint32_t Length() const

public Enum(const char * name,uint32_t size,bool isSigned)

public void m_AddValue(const char * name,int32_t value)



ae::Var class

Information about a member variable registered with AE_REGISTER_CLASS_VAR().

public const ae::Type * m_owner

public ae::Str32 m_name

public BasicType m_type

public ae::Str32 m_typeName

public uint32_t m_offset

public uint32_t m_size

public const ae::VarTypeBase * m_varType

public ae::TypeId m_subTypeId

public const class Enum * m_enum

public const ArrayAdapter * m_arrayAdapter

public ae::Map< ae::Str32](DataStructures.md#classae_1_1_str), ae::Array< [ae::Str32, kMaxMetaPropListLength >, kMaxMetaProps > m_props

public const char * GetName() const

public BasicType GetType() const

public const char * GetTypeName() const

public uint32_t GetOffset() const

public uint32_t GetSize() const

public std::string GetObjectValueAsString(const ae::Object * obj,int32_t arrayIdx) const

Get the value of this variable from the given obj.

If the type of this variable is a reference then ae::SetSerializer() must be called in advance, otherwise this function will assert.

Parameters

  • obj The object to get the value from.

  • arrayIdx Must be negative for non-array types. For array types this specifies which array element to return. Must be a valid array index, less than ae::Var::GetGetArrayLength().

Returns

Returns a string representation of the value of this variable from the given obj.

public bool SetObjectValueFromString(ae::Object * obj,const char * value,int32_t arrayIdx) const

Set the value of this variable on the given obj.

If the type of this variable is a reference then ae::SetSerializer() must be called in advance, otherwise this function will assert.

Parameters

  • obj The object to set the value on.

  • value A string representation of the value to set.

  • arrayIdx Must be negative for non-array types. For array types this specifies which array element to set. Must be a valid array index, less than ae::Var::GetGetArrayLength().

Returns

True if obj was modified, and false otherwise. Reference types fail to be set if the value does not represent null or a valid reference to an existing object of the correct type.

public template<>
bool
GetObjectValue(ae::Object * obj,T * valueOut,int32_t arrayIdx) const

Get the value of this variable from the given obj.

If the type of this variable is a reference then ae::SetSerializer() must be called in advance, otherwise this function will assert.

Parameters

  • T The type of the value to return.

Parameters

  • obj The object to get the value from.

  • valueOut A pointer to the value to set. Will only be set if the type matches this variable's type.

  • arrayIdx Must be negative for non-array types. For array types this specifies which array element to return. Must be a valid array index, less than ae::Var::GetGetArrayLength().

Returns

Returns true if valueOut was set, and false otherwise.

public template<>
bool
SetObjectValue(ae::Object * obj,const T & value,int32_t arrayIdx) const

Set the value of this variable on the given obj.

If the type of this variable is a reference then ae::SetSerializer() must be called in advance, otherwise this function will assert.

Parameters

  • T The type of the value to set.

Parameters

  • obj The object to set the value on.

  • value The value to set.

  • arrayIdx Must be negative for non-array types. For array types this specifies which array element to set. Must be a valid array index, less than ae::Var::GetGetArrayLength().

Returns

True if obj was modified, and false otherwise. Reference types fail to be set if the value does not represent null or a valid reference to an existing object of the correct type.

public const class Enum * GetEnum() const

public const ae::Type * GetSubType() const

For Ref and Array types.

public bool IsArray() const

public bool IsArrayFixedLength() const

public uint32_t SetArrayLength(ae::Object * obj,uint32_t length) const

Returns new length of array.

public uint32_t GetArrayLength(const ae::Object * obj) const

public uint32_t GetArrayMaxLength() const

public bool HasProperty(const char * prop) const

public int32_t GetPropertyIndex(const char * prop) const

public int32_t GetPropertyCount() const

public const char * GetPropertyName(int32_t propIndex) const

public uint32_t GetPropertyValueCount(int32_t propIndex) const

public uint32_t GetPropertyValueCount(const char * propName) const

public const char * GetPropertyValue(int32_t propIndex,uint32_t valueIndex) const

public const char * GetPropertyValue(const char * propName,uint32_t valueIndex) const

public void m_AddProp(const char * prop,const char * value)



ae::Type class

public ae::TypeId GetId() const

public bool HasProperty(const char * property) const

Check if this ae::Type has a property registered with AE_REGISTER_CLASS_PROPERTY() or AE_REGISTER_CLASS_PROPERTY_VALUE().

Returns

True if property is found.

public const Type * GetTypeWithProperty(const char * property) const

Search for an inherited type (starting from this one) that has a property registered with AE_REGISTER_CLASS_PROPERTY() or AE_REGISTER_CLASS_PROPERTY_VALUE().

Returns

The first ae::Type found with property.

public int32_t GetPropertyIndex(const char * prop) const

public int32_t GetPropertyCount() const

public const char * GetPropertyName(int32_t propIndex) const

public uint32_t GetPropertyValueCount(int32_t propIndex) const

public uint32_t GetPropertyValueCount(const char * propName) const

public const char * GetPropertyValue(int32_t propIndex,uint32_t valueIndex) const

public const char * GetPropertyValue(const char * propName,uint32_t valueIndex) const

public uint32_t GetVarCount(bool parents) const

public const ae::Var*GetVarByIndex(uint32_t i,bool parents) const

public const ae::Var*GetVarByName(const char * name,bool parents) const

public template<>
T *
New(void * obj) const

public uint32_t GetSize() const

public uint32_t GetAlignment() const

public const char * GetName() const

public bool HasNew() const

public bool IsAbstract() const

public bool IsPolymorphic() const

public bool IsDefaultConstructible() const

public bool IsFinal() const

public const char * GetParentTypeName() const

public const Type * GetParentType() const

public bool IsType(const Type * otherType) const

public template<>
bool
IsType() const

public template<>
std::enable_if< !std::is_abstract< T >::value &&std::is_default_constructible< T >::value, void >::type
Init(const char * name,uint32_t index)

public template<>
std::enable_if< std::is_abstract< T >::value||!std::is_default_constructible< T >::value, void >::type
Init(const char * name,uint32_t index)

public void m_AddProp(const char * prop,const char * value)

public void m_AddVar(const Var & var)