Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
Serializer Class Reference

Serialization general interface. Serializer API works with: More...

Inheritance diagram for Serializer:
Managed FileSerializer JsonSerializer ScriptInputUserData ScriptJunctureData ScriptRemoteInputUserData ScriptRPC

Detailed Description

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;
    autoptr map<string, float> m_values;
    string m_dbg; // I don't want to serialize this variable
    }
    {
    int statArray[4] = {6,9,2,3};
    array<int> dynArray = {8,5,6,4};
    autoptr MyData data = new MyData();
    data.m_id = 965;
    data.m_values = map<string, float>;
    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];
    array<int> dynArray;
    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:
Serializer
Serialization general interface. Serializer API works with:
Definition: serializer.c:55
map
map
Definition: controlsxboxnew.c:3
Serialize
void Serialize()
Definition: inventory.c:193
NonSerialized
TODO doc.
Definition: enscript.c:122
array
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition: isboxcollidinggeometryproxyclasses.c:27
Deserialize
void Deserialize()
Definition: inventory.c:199