Public Member Functions | Public Attributes
eip::serialization::SerializablePrimitive< T > Class Template Reference

#include <serializable_primitive.h>

Inheritance diagram for eip::serialization::SerializablePrimitive< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual Readerdeserialize (Reader &reader, size_t length)
virtual Readerdeserialize (Reader &reader)
virtual size_t getLength () const
 SerializablePrimitive ()
 SerializablePrimitive (const T &d)
virtual Writerserialize (Writer &writer) const

Public Attributes

data
 Data as the primitive type to be serialized or deserialized.

Detailed Description

template<typename T>
class eip::serialization::SerializablePrimitive< T >

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.


Constructor & Destructor Documentation

template<typename T >
eip::serialization::SerializablePrimitive< T >::SerializablePrimitive ( ) [inline]

Create a primitive with default values. Useful for deserialization.

Definition at line 51 of file serializable_primitive.h.

template<typename T >
eip::serialization::SerializablePrimitive< T >::SerializablePrimitive ( const T &  d) [inline]

Create serializable version of the data given

Parameters:
ddata to use for serialization

Definition at line 57 of file serializable_primitive.h.


Member Function Documentation

template<typename T >
virtual Reader& eip::serialization::SerializablePrimitive< T >::deserialize ( Reader reader,
size_t  length 
) [inline, virtual]

Deserialization is always done with the length of the type in the template

Parameters:
readerReader to use for deserialization
lengthIgnored
Returns:
the reader again
Exceptions:
std::length_errorif the given length is greater than allocated data buffer

Implements eip::serialization::Serializable.

Definition at line 88 of file serializable_primitive.h.

template<typename T >
virtual Reader& eip::serialization::SerializablePrimitive< T >::deserialize ( Reader reader) [inline, virtual]

Deserialize data into this buffer, using the size of the buffer already allocated

Parameters:
readerReader to use for deserialization
Returns:
the reader again
Exceptions:
std::length_errorif the buffer is overrun while deserializing

Implements eip::serialization::Serializable.

Definition at line 101 of file serializable_primitive.h.

template<typename T >
virtual size_t eip::serialization::SerializablePrimitive< T >::getLength ( ) const [inline, virtual]

Length to be serialized is the memory size of the type given

Returns:
Total length in bytes to be serialized

Implements eip::serialization::Serializable.

Definition at line 63 of file serializable_primitive.h.

template<typename T >
virtual Writer& eip::serialization::SerializablePrimitive< T >::serialize ( Writer writer) const [inline, virtual]

Serialize the data instance into the writer.

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

Implements eip::serialization::Serializable.

Definition at line 74 of file serializable_primitive.h.


Member Data Documentation

template<typename T >
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.


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


odva_ethernetip
Author(s): Kareem Shehata
autogenerated on Sat Jun 8 2019 20:21:23