#include <serializable.h>
Public Member Functions | |
virtual Reader & | deserialize (Reader &reader, size_t length)=0 |
virtual Reader & | deserialize (Reader &reader)=0 |
virtual size_t | getLength () const =0 |
virtual Writer & | serialize (Writer &writer) const =0 |
Interface for all serializable data
Definition at line 38 of file serializable.h.
|
pure virtual |
Deserialize data from the given reader with the length given
reader | Reader to use for deserialization |
length | Length expected for data |
std::length_error | if the buffer is overrun while deserializing |
Implemented in eip::serialization::SerializableBuffer, and eip::serialization::SerializablePrimitive< T >.
Deserialize data from the given reader without length information
reader | Reader to use for deserialization |
std::length_error | if the buffer is overrun while deserializing |
Implemented in eip::serialization::SerializableBuffer, and eip::serialization::SerializablePrimitive< T >.
|
pure virtual |
Get the length of serialized data that would be produced if serialized
Implemented in eip::serialization::SerializableBuffer, and eip::serialization::SerializablePrimitive< T >.
Serialize data into the given buffer
writer | Writer to use for serialization |
std::length_error | if the buffer is too small for the header data |
Implemented in eip::serialization::SerializableBuffer, and eip::serialization::SerializablePrimitive< T >.