![]() |
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 std::uint8_t * | Serialize (std::uint8_t *buffer) const =0 |
| Serialize the object into the passed buffer. More... | |
| virtual const std::uint8_t * | Deserialize (const std::uint8_t *buffer, const std::uint8_t *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 |
|
pure virtual |
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.
|
pure virtual |
Serialize the object into the passed buffer.
Implemented in CNetMessage, CSimulationMessage, and CGameSetupMessage.