Public Member Functions | List of all members
eip::serialization::Serializable Class Referenceabstract

#include <serializable.h>

Inheritance diagram for eip::serialization::Serializable:
Inheritance graph
[legend]

Public Member Functions

virtual Readerdeserialize (Reader &reader, size_t length)=0
 
virtual Readerdeserialize (Reader &reader)=0
 
virtual size_t getLength () const =0
 
virtual Writerserialize (Writer &writer) const =0
 

Detailed Description

Interface for all serializable data

Definition at line 38 of file serializable.h.

Member Function Documentation

virtual Reader& eip::serialization::Serializable::deserialize ( Reader reader,
size_t  length 
)
pure virtual

Deserialize data from the given reader with the length given

Parameters
readerReader to use for deserialization
lengthLength expected for data
Returns
the reader again
Exceptions
std::length_errorif 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

Parameters
readerReader to use for deserialization
Returns
the reader again
Exceptions
std::length_errorif 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

Returns
Total length in bytes to be 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

Parameters
writerWriter to use for serialization
Returns
the writer again
Exceptions
std::length_errorif the buffer is too small for the header data

Implemented in eip::serialization::SerializableBuffer, and eip::serialization::SerializablePrimitive< T >.


The documentation for this class was generated from the following file:


odva_ethernetip
Author(s): Kareem Shehata
autogenerated on Mon Jun 10 2019 14:00:16