#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.
virtual Reader& eip::serialization::Serializable::deserialize | ( | Reader & | reader, |
size_t | length | ||
) | [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 >.
virtual Reader& eip::serialization::Serializable::deserialize | ( | Reader & | reader | ) | [pure virtual] |
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 >.
virtual size_t eip::serialization::Serializable::getLength | ( | ) | const [pure virtual] |
Get the length of serialized data that would be produced if serialized
Implemented in eip::serialization::SerializableBuffer, and eip::serialization::SerializablePrimitive< T >.
virtual Writer& eip::serialization::Serializable::serialize | ( | Writer & | writer | ) | const [pure virtual] |
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 >.