Serialization general interface. Serializer API works with:
More...
Serialization general interface. Serializer API works with:
- primitive types: int, float, string, bool, vector
- dynamic containers: array, set, map
- static arrays
- complex types: classes
- Note
- Serializer provides deep serialization (it serialize class memebers and their members etc). To avoid serialization of certain class variable, use NonSerialized attribute.
- usage:
class MyData
{
int m_id;
string m_dbg;
}
{
int statArray[4] = {6,9,2,3};
autoptr MyData data = new MyData();
data.m_id = 965;
data.m_values.Insert("value1", 5.98);
data.m_values.Insert("value2", 4.36);
s.Write(10);
s.Write("Hello");
s.Write(statArray);
s.Write(dynArray);
s.Write(data);
}
{
int statArray[4];
MyData data;
int someInt;
string someString;
s.Read(someInt);
s.Read(someString);
s.Read(statArray);
s.Read(dynArray);
s.Read(data);
}
Definition at line 55 of file serializer.c.
The documentation for this class was generated from the following file: