Public Member Functions | Private Member Functions | Private Attributes
eip::serialization::SerializableBuffer Class Reference

#include <serializable_buffer.h>

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

List of all members.

Public Member Functions

virtual Readerdeserialize (Reader &reader, size_t length)
virtual Readerdeserialize (Reader &reader)
virtual mutable_buffer getData () const
virtual size_t getLength () const
void operator= (mutable_buffer b)
 SerializableBuffer ()
 SerializableBuffer (mutable_buffer data)
virtual Writerserialize (Writer &writer) const
virtual void setData (mutable_buffer data)
virtual ~SerializableBuffer ()

Private Member Functions

void deleteAllocatedBuffer ()

Private Attributes

char * allocated_buffer_
mutable_buffer data_

Detailed Description

Generic buffer of data that can be serialized

Definition at line 45 of file serializable_buffer.h.


Constructor & Destructor Documentation

Construct an empty serializable buffer

Parameters:
dataData to hold in the buffer

Definition at line 53 of file serializable_buffer.h.

Construct a serializable buffer for the given data buffer

Parameters:
dataData to hold in the buffer

Definition at line 59 of file serializable_buffer.h.

Definition at line 61 of file serializable_buffer.h.


Member Function Documentation

Helper to delete an allocated buffer if needed

Definition at line 166 of file serializable_buffer.h.

virtual Reader& eip::serialization::SerializableBuffer::deserialize ( Reader reader,
size_t  length 
) [inline, virtual]

Deserialize buffer data from the given reader, up to the length given. Will use the buffer already allocated.

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

Implements eip::serialization::Serializable.

Definition at line 118 of file serializable_buffer.h.

virtual Reader& eip::serialization::SerializableBuffer::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 148 of file serializable_buffer.h.

virtual mutable_buffer eip::serialization::SerializableBuffer::getData ( ) const [inline, virtual]

Get the data held in this buffer

Returns:
current data buffer

Definition at line 80 of file serializable_buffer.h.

virtual size_t eip::serialization::SerializableBuffer::getLength ( ) const [inline, virtual]

Get the length of the current data buffer

Returns:
Total length in bytes to be serialized

Implements eip::serialization::Serializable.

Definition at line 71 of file serializable_buffer.h.

void eip::serialization::SerializableBuffer::operator= ( mutable_buffer  b) [inline]

Definition at line 154 of file serializable_buffer.h.

virtual Writer& eip::serialization::SerializableBuffer::serialize ( Writer writer) const [inline, virtual]

Serialize the buffer into the writer

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

Implements eip::serialization::Serializable.

Definition at line 103 of file serializable_buffer.h.

virtual void eip::serialization::SerializableBuffer::setData ( mutable_buffer  data) [inline, virtual]

Set the data for the buffer

Parameters:
dataData to assign to the buffer

Definition at line 89 of file serializable_buffer.h.


Member Data Documentation

Definition at line 161 of file serializable_buffer.h.

Definition at line 160 of file serializable_buffer.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