#include <serializable.h>
Public Member Functions | |
virtual Reader & | deserialize (Reader &reader)=0 |
virtual Reader & | deserialize (Reader &reader, size_t length)=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.
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::ForwardOpenRequest, eip::EncapPacket, eip::CPFItem, eip::serialization::SerializableBuffer, eip::MessageRouterRequest, eip::ForwardOpenSuccess, eip::ForwardCloseRequest, eip::ForwardCloseSuccess, eip::EncapHeader, eip::MessageRouterResponse, eip::CPFPacket, eip::serialization::SerializablePrimitive< T >, eip::RRData, eip::RegisterSessionData, eip::SequencedAddressItem, and eip::IdentityItemData.
|
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::ForwardOpenRequest, eip::EncapPacket, eip::CPFItem, eip::MessageRouterRequest, eip::serialization::SerializableBuffer, eip::ForwardOpenSuccess, eip::ForwardCloseRequest, eip::ForwardCloseSuccess, eip::MessageRouterResponse, eip::CPFPacket, eip::EncapHeader, eip::RRData, eip::serialization::SerializablePrimitive< T >, eip::SequencedAddressItem, eip::RegisterSessionData, and eip::IdentityItemData.
|
pure virtual |
Get the length of serialized data that would be produced if serialized
Implemented in eip::ForwardOpenRequest, eip::CPFItem, eip::EncapPacket, eip::MessageRouterRequest, eip::MessageRouterResponse, eip::ForwardOpenSuccess, eip::CPFPacket, eip::ForwardCloseSuccess, eip::ForwardCloseRequest, eip::serialization::SerializableBuffer, eip::EncapHeader, eip::RRData, eip::IdentityItemData, eip::serialization::SerializablePrimitive< T >, eip::SequencedAddressItem, and eip::RegisterSessionData.
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::ForwardOpenRequest, eip::EncapPacket, eip::CPFItem, eip::MessageRouterRequest, eip::serialization::SerializableBuffer, eip::ForwardOpenSuccess, eip::ForwardCloseSuccess, eip::MessageRouterResponse, eip::ForwardCloseRequest, eip::CPFPacket, eip::RRData, eip::EncapHeader, eip::serialization::SerializablePrimitive< T >, eip::IdentityItemData, eip::SequencedAddressItem, and eip::RegisterSessionData.