enum RTTIFieldDataType
Data types we can serialize: - Reflectable - Reference to an object implementing the IReflectable interface.
Each field in its RTTI information will be iterated over and visited recursively. Fields can contain other IReflectable objects, which will be iterated recursively. Supports versioning via field IDs, so you are freed to add/remove fields as long as they have unique IDs.
- Reflectable pointer - A SPtr
. Same as Reflectable type, except the object is not referenced by value, and is instead referenced by pointer. If multiple fields point to the same object the serialization system will ensure a single object instance is serialized and deserialized.
- Plain - Native data types, POD (Plain old data) structures, or in general types we don't want to (or can't) inherit from IReflectable.
Type must specialize RTTIPlainType
<T
template.
- DataBlock - Array of bytes of a certain size. When returning a data block you may specify if its managed or unmanaged.
Managed data blocks have their buffers deleted after they go out of scope. This is useful if you need to return some
temporary data. On the other hand if the data in the block belongs to your class, and isn't temporary, keep the data unmanaged.
Values
| Name | Value | Description |
|---|---|---|
Plain |
0 |
|
DataBlock |
1 |
|
Reflectable |
2 |
|
ReflectablePointer |
3 |