struct
RTTIDataBlockField
template<class InterfaceType, class DataType, class ObjectType>
Inherits:
RTTIDataBlockFieldBase
Class containing a data block field containing a specific type.
Public
Methods
InitSingle
void InitSingle(String name, u16 uniqueId, GetterType getter, SetterType setter, const RTTIFieldInfo &info)
Initializes a field that returns a block of bytes.
Can be used for serializing pretty much anything.
- name
- Name of the field.
- uniqueId
- Unique identifier for this field. Although name is also a unique identifier we want a small data type that can be used for efficiently serializing data to disk and similar. It is primarily used for compatibility between different versions of serialized data.
- getter
- The getter method for the field.
- setter
- The setter method for the field.
- info
- Various optional information about the field.
InitSchema
void InitSchema() override
Initializes the field's RTTI schema.
Should be called once after construction.
GetValue
Retrieves a data block from the specified instance.
SetValue
Sets a data block on the specified instance.
~RTTIField
virtual ~RTTIField() noexcept = default
CheckIsArray
void CheckIsArray(bool array) const
Throws an exception depending if the field is or isn't an array.
- array
- If true, then exception will be thrown if field is not an array. If false, then it will be thrown if field is an array.
Fields
Name
String Name
Schema
RTTIFieldSchema Schema
Protected
Methods
Init
Private
Fields
getter
GetterType getter
setter
SetterType setter