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

#include <reader.h>

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

Public Member Functions

virtual size_t getByteCount ()=0
 
template<typename T >
void read (T &v)
 
virtual void readBuffer (mutable_buffer buf)=0
 
virtual void readBytes (void *buf, size_t n)=0
 
virtual void skip (size_t n)=0
 

Detailed Description

Generic interface for reading binary data

Definition at line 42 of file reader.h.

Member Function Documentation

virtual size_t eip::serialization::Reader::getByteCount ( )
pure virtual

Get the number of bytes read from the buffer

Returns
number of bytes read from the buffer

Implemented in eip::serialization::BufferReader, and eip::serialization::StreamReader.

template<typename T >
void eip::serialization::Reader::read ( T &  v)
inline

Read a value

Returns
value read from input of type T
Exceptions
std::length_errorif buffer is too small to deserialize value

Definition at line 51 of file reader.h.

virtual void eip::serialization::Reader::readBuffer ( mutable_buffer  buf)
pure virtual

Read input into the given buffer

Parameters
bufBuffer into which to copy input

Implemented in eip::serialization::BufferReader, and eip::serialization::StreamReader.

virtual void eip::serialization::Reader::readBytes ( void *  buf,
size_t  n 
)
pure virtual

Read a set of bytes from the input into the given buffer

Parameters
bufbuffer to use for reading
nnumber of bytes to read
Returns
pointer into the buffer
Exceptions
std::length_errorif the buffer is too small to contain that many bytes

Implemented in eip::serialization::StreamReader, and eip::serialization::BufferReader.

virtual void eip::serialization::Reader::skip ( size_t  n)
pure virtual

Skip forward in input by n bytes

Parameters
nnumber of bytes to skip forward
Exceptions
std::length_errorif end of output buffer reached

Implemented in eip::serialization::BufferReader, and eip::serialization::StreamReader.


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