class ReflectExport( reflect ) ArrayProperty : public Property
ArrayProperties represent numerically indexed data. The data represented may be either resizable, like a vector, or not, like a plain array.
ArrayProperty | ArrayProperties represent numerically indexed data. |
Functions | |
SerializeItem | Reads/writes a single item to the reflector. |
Size | Gets the current size of the array/vector in the object. |
Resizable | Checks if the array/vector represented by this property is resizable. |
Resize | Resizes the array/vector in the object. |
ReadData | Reads the array and stores the value into the Variant. |
WriteData | Writes the Variant value to the array. |
RefData | Refs the Variant to the array index. |
ItemType | returns the type of the items in the property. |
Serialize | Serializes the entire array/vector. |
virtual void SerializeItem( const void * in, void * out, unsigned index, Reflector & reflector ) const = 0
Reads/writes a single item to the reflector. Used by the ArrayProperty::Serialize.
virtual bool ReadData( const void * , unsigned item_index, Variant & ) const = 0
Reads the array and stores the value into the Variant.
true | when the index is valid and the value is read/converted successfully. |
int i; array_prop->ReadData(opaque_cast(object), 3, Variant::RefValue(i));
Variant value; array_prop->ReadData(opaque_cast(object), 3, value); printf("object->array_prop[3] is %s of type %s\n", value.ToString().c_str(), value.GetType()->Name());
virtual bool WriteData( void * object, unsigned item_index, const Variant & value ) const = 0
Writes the Variant value to the array.
true | when the index is valid and the value is written/converted successfully. |
virtual bool RefData( const void * in, void * out, unsigned item_index, Variant & ) const = 0
Refs the Variant to the array index.
true | when the index is valid and the value can be referenced |
false | otherwise |
void Serialize( const void * in, void * out, Reflector & reflector ) const
Serializes the entire array/vector.
If the property is Resizable then a [size=%d] SerializationTag::AttributeTag will be emitted here.
Implements Property::Serialize
ArrayProperties represent numerically indexed data.
class ReflectExport( reflect ) ArrayProperty : public Property
Reads/writes a single item to the reflector.
virtual void SerializeItem( const void * in, void * out, unsigned index, Reflector & reflector ) const = 0
Gets the current size of the array/vector in the object.
virtual unsigned Size( const void * object ) const = 0
Checks if the array/vector represented by this property is resizable.
virtual bool Resizable( const void * ) const = 0
Resizes the array/vector in the object.
virtual bool Resize( void * , unsigned size ) const = 0
Reads the array and stores the value into the Variant.
virtual bool ReadData( const void * , unsigned item_index, Variant & ) const = 0
Variants represent objects of any reflected type.
class ReflectExport( reflect ) Variant
Writes the Variant value to the array.
virtual bool WriteData( void * object, unsigned item_index, const Variant & value ) const = 0
Refs the Variant to the array index.
virtual bool RefData( const void * in, void * out, unsigned item_index, Variant & ) const = 0
returns the type of the items in the property.
virtual Type *ItemType() const = 0
Serializes the entire array/vector.
void Serialize( const void * in, void * out, Reflector & reflector ) const
Properties represent data in a reflected type, and can be used to Serialize that data through a Reflector.
class ReflectExport( reflect ) Property : public Dynamic
Reads or writes the represented data using a Reflector.
virtual void Serialize( const void * in, void * out, Reflector & reflector ) const = 0