The Serializable class, when herited from, allows you to serialize your own classes.
More...
#include <bas.hpp>
The Serializable class, when herited from, allows you to serialize your own classes.
- See also
- makeSerialization()
-
makeUnserialization()
- Examples
- intrication.cpp, and serialization.cpp.
◆ ~Serializable()
virtual bas::Serializable::~Serializable |
( |
| ) |
|
|
virtualdefault |
◆ makeSerialization()
Allow serialization of your class.
This function should be overriden, and contain the serialization process of your class.
Note that this function is called by serialize() should not be called directly bu user end. (see Examples)
- Parameters
-
obj | The object to push the data into. |
- Examples
- intrication.cpp, and serialization.cpp.
◆ makeUnserialization()
Allow unserialization of your class.
This function should be overriden, and contain the unserialization process of your class.
Note that this function is called by unserialize() should not be called directly bu user end. (see Examples)
- Parameters
-
obj | The object to pop the data from. |
- Examples
- intrication.cpp, and serialization.cpp.
◆ serialize()
Serialize the class.
This function create a SerializedObject of your class.
The serializing process of this function is defined by overriding makeSerialization.
- Returns
- The SerializedObject containing the data of the class.
◆ unserialize()
Reconstruct object from a SerializedObject.
This function copies the SerializedObject before unserializing, meaning that the same object can be used to unserialize multiple times.
The unserializing process of this function is defined by overriding makeUnserialization.
- Parameters
-
The documentation for this class was generated from the following file: