class
ManagedSerializableFieldData
Contains value of a single field in a managed object.
This class can contain any data type and should be overridden for specific types.
Stored values can be serialized and stored for later use, and deserialized back to managed objects when needed. You must call serialize() before performing RTTI serialization. After field data has been serialized you should not call any methods on it before calling deserialize().
Public
Methods
~ManagedSerializableFieldData
staticCreate
Creates a new data wrapper for some field data.
- typeInfo
- Type of the data we're storing.
- value
- Managed boxed value to store in the field. Value will be copied into the internal buffer and stored.
staticCreateDefault
Creates a new data wrapper containing default instance of the provided type.
- typeInfo
- Type of the data we're storing.
GetValue
Returns the internal value.
- typeInfo
- Type of the data we're looking to retrieve. This isn't required for actually retrieving the data but is used as an extra check to ensure the field contains the data type we're looking for.
Returns: Pointer to the internal serialized data. Caller must ensure the pointer is cast to the proper type.
GetValueBoxed
Boxes the internal value and returns it.
- typeInfo
- Type of the data we're looking to retrieve. This isn't required for actually retrieving the data but is used as an extra check to ensure the field contains the data type we're looking for.
Returns: Boxed representation of the internal value.
Equals
Checks if the internal value stored in this object matches the value stored in another.
Does shallow comparison for complex objects.
GetHash
Returns a hash value for the internally stored value.
Serialize
Serializes the internal value so that it may be stored and deserialized later.
Deserialize
Deserializes the internal value so that the managed instance can be retrieved.
staticGetRttiStatic
Private
Methods
staticCreate
Creates a new data wrapper for some field data.
- typeInfo
- Type of the data we're storing.
- value
- Managed boxed value to store in the field. Value will be copied into the internal buffer and stored.
- allowNull
- Determines should null values be allowed. If false the objects with null values will instead be instantiated to their default values.