![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
An interface for serializable objects. More...
#include <Serialization.h>

Public Member Functions | |
| virtual | ~ISerializable () |
| virtual size_t | GetSerializedLength () const =0 |
| Return the length of the serialized form of this object. More... | |
| virtual u8 * | Serialize (u8 *buffer) const =0 |
| Serialize the object into the passed buffer. More... | |
| virtual const u8 * | Deserialize (const u8 *buffer, const u8 *end)=0 |
| Deserialize the object (i.e. More... | |
An interface for serializable objects.
For a serializable object to be usable as a network message field, it must have a constructor without arguments.
|
inlinevirtual |
Deserialize the object (i.e.
read in data from the buffer and initialize the object's fields). Note that it is up to the deserializer to detect errors in data format.
| buffer | A pointer pointing to the start of the serialized data. |
| end | A pointer to the end of the message. |
Implemented in CNetMessage, CSimulationMessage, and CGameSetupMessage.
|
pure virtual |
Return the length of the serialized form of this object.
Implemented in CNetMessage, CSimulationMessage, and CGameSetupMessage.
Serialize the object into the passed buffer.
Implemented in CNetMessage, CSimulationMessage, and CGameSetupMessage.