Public Member Functions | Private Attributes | List of all members
eip::serialization::StreamWriter Class Reference

#include <stream_writer.h>

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

Public Member Functions

size_t getByteCount ()
 
 StreamWriter (shared_ptr< ostream > osp)
 
template<typename T >
void write (T &v)
 
void writeBuffer (const_buffer b)
 
void writeBytes (const void *p, size_t n)
 
- Public Member Functions inherited from eip::serialization::Writer
template<typename T >
void write (const T &v)
 

Private Attributes

shared_ptr< ostream > osp_
 

Detailed Description

Helper class to write values into an output stream. This is really an adapter so that classes can use the Writer interface for all writing

Definition at line 47 of file stream_writer.h.

Constructor & Destructor Documentation

eip::serialization::StreamWriter::StreamWriter ( shared_ptr< ostream >  osp)
inline

Create a writer to use the output stream given

Parameters
ostOutput stream to use

Definition at line 55 of file stream_writer.h.

Member Function Documentation

size_t eip::serialization::StreamWriter::getByteCount ( )
inlinevirtual

Get the number of bytes writen to the stream

Returns
number of bytes writen to the stream

Implements eip::serialization::Writer.

Definition at line 90 of file stream_writer.h.

template<typename T >
void eip::serialization::StreamWriter::write ( T &  v)
inline

Write a value to the output stream

Parameters
vValue to write to the output stream

Definition at line 62 of file stream_writer.h.

void eip::serialization::StreamWriter::writeBuffer ( const_buffer  b)
inlinevirtual

Write out the contents of a buffer to the stream

Parameters
bbuffer of data to add to the current buffer at the current location

Implements eip::serialization::Writer.

Definition at line 81 of file stream_writer.h.

void eip::serialization::StreamWriter::writeBytes ( const void *  p,
size_t  n 
)
inlinevirtual

Write a set of bytes to the stream

Parameters
ppointer to data to write
nnumber of bytes to write

Implements eip::serialization::Writer.

Definition at line 72 of file stream_writer.h.

Member Data Documentation

shared_ptr<ostream> eip::serialization::StreamWriter::osp_
private

Definition at line 96 of file stream_writer.h.


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