Public Member Functions
eip::serialization::Writer Class Reference

#include <writer.h>

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

List of all members.

Public Member Functions

virtual size_t getByteCount ()=0
template<typename T >
void write (const T &v)
virtual void writeBuffer (const_buffer b)=0
virtual void writeBytes (const void *p, size_t n)=0

Detailed Description

Generic interface for writing binary data for serialization

Definition at line 41 of file writer.h.


Member Function Documentation

virtual size_t eip::serialization::Writer::getByteCount ( ) [pure virtual]

Get the number of bytes writen to the buffer

Returns:
number of bytes writen to the buffer

Implemented in eip::serialization::BufferWriter, and eip::serialization::StreamWriter.

template<typename T >
void eip::serialization::Writer::write ( const T &  v) [inline]

Write a value

Parameters:
vValue to write
Exceptions:
std::length_errorif buffer is too small to hold the serialized value

Definition at line 50 of file writer.h.

virtual void eip::serialization::Writer::writeBuffer ( const_buffer  b) [pure virtual]

Write out the contents of a buffer

Parameters:
bbuffer of data to add to the current buffer at the current location
Exceptions:
std::length_errorif the output buffer is too small to contain the contents of b

Implemented in eip::serialization::StreamWriter, and eip::serialization::BufferWriter.

virtual void eip::serialization::Writer::writeBytes ( const void *  p,
size_t  n 
) [pure virtual]

Write a set of bytes

Parameters:
ppointer to data to write
nnumber of bytes to write
Exceptions:
std::length_errorif the buffer is too small to contain that many bytes

Implemented in eip::serialization::StreamWriter, and eip::serialization::BufferWriter.


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