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

#include <stream_reader.h>

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

List of all members.

Public Member Functions

size_t getByteCount ()
void readBuffer (mutable_buffer buf)
void readBytes (void *buf, size_t n)
virtual void skip (size_t n)
 StreamReader (shared_ptr< istream > isp)

Private Attributes

shared_ptr< istream > isp_

Detailed Description

Helper class to read values out of a stream to assist in deserializing. Really just an adapter so that classes can use the Reader interface for all deserialization tasks.

Definition at line 49 of file stream_reader.h.


Constructor & Destructor Documentation

eip::serialization::StreamReader::StreamReader ( shared_ptr< istream >  isp) [inline]

Create a reader to use the input stream given

Parameters:
ispInput stream to use for inputs

Definition at line 57 of file stream_reader.h.


Member Function Documentation

size_t eip::serialization::StreamReader::getByteCount ( ) [inline, virtual]

Get the number of bytes read from the buffer

Returns:
number of bytes read from the buffer

Implements eip::serialization::Reader.

Definition at line 83 of file stream_reader.h.

void eip::serialization::StreamReader::readBuffer ( mutable_buffer  buf) [inline, virtual]

Read a set of bytes into the given buffer

Parameters:
bufBuffer to use for reading
Exceptions:
std::length_errorif the buffer is too small to contain that many bytes

Implements eip::serialization::Reader.

Definition at line 74 of file stream_reader.h.

void eip::serialization::StreamReader::readBytes ( void *  buf,
size_t  n 
) [inline, virtual]

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

Parameters:
bufBuffer into which to copy bytes
nnumber of bytes to read

Implements eip::serialization::Reader.

Definition at line 64 of file stream_reader.h.

virtual void eip::serialization::StreamReader::skip ( size_t  n) [inline, virtual]

Skip forward in input by n bytes

Parameters:
nnumber of bytes to skip forward

Implements eip::serialization::Reader.

Definition at line 92 of file stream_reader.h.


Member Data Documentation

shared_ptr<istream> eip::serialization::StreamReader::isp_ [private]

Definition at line 97 of file stream_reader.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