#include <serializable_primitive.h>
Public Member Functions | |
virtual Reader & | deserialize (Reader &reader, size_t length) |
virtual Reader & | deserialize (Reader &reader) |
virtual size_t | getLength () const |
SerializablePrimitive () | |
SerializablePrimitive (const T &d) | |
virtual Writer & | serialize (Writer &writer) const |
Public Attributes | |
T | data |
Data as the primitive type to be serialized or deserialized. More... | |
Serialization of a generic primitive class that can be serialized as just the in memory data as is.
Definition at line 41 of file serializable_primitive.h.
|
inline |
Create a primitive with default values. Useful for deserialization.
Definition at line 51 of file serializable_primitive.h.
|
inline |
Create serializable version of the data given
d | data to use for serialization |
Definition at line 57 of file serializable_primitive.h.
|
inlinevirtual |
Deserialization is always done with the length of the type in the template
reader | Reader to use for deserialization |
length | Ignored |
std::length_error | if the given length is greater than allocated data buffer |
Implements eip::serialization::Serializable.
Definition at line 88 of file serializable_primitive.h.
|
inlinevirtual |
Deserialize data into this buffer, using the size of the buffer already allocated
reader | Reader to use for deserialization |
std::length_error | if the buffer is overrun while deserializing |
Implements eip::serialization::Serializable.
Definition at line 101 of file serializable_primitive.h.
|
inlinevirtual |
Length to be serialized is the memory size of the type given
Implements eip::serialization::Serializable.
Definition at line 63 of file serializable_primitive.h.
|
inlinevirtual |
Serialize the data instance into the writer.
writer | Writer to use for serialization |
std::length_error | if the buffer is too small |
Implements eip::serialization::Serializable.
Definition at line 74 of file serializable_primitive.h.
T eip::serialization::SerializablePrimitive< T >::data |
Data as the primitive type to be serialized or deserialized.
Definition at line 46 of file serializable_primitive.h.