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

#include <buffer_writer.h>

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

List of all members.

Public Member Functions

 BufferWriter (mutable_buffer buf)
size_t getByteCount ()
void writeBuffer (const_buffer b)
void writeBytes (const void *p, size_t n)

Private Attributes

mutable_buffer buf_
size_t byte_count_

Detailed Description

Helper class to write values into a buffer to assist in serializing.

Definition at line 44 of file buffer_writer.h.


Constructor & Destructor Documentation

eip::serialization::BufferWriter::BufferWriter ( mutable_buffer  buf) [inline]

Create a writer to use the buffer given

Parameters:
bufBuffer to which to write data

Definition at line 52 of file buffer_writer.h.


Member Function Documentation

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

Get the number of bytes writen to the buffer

Returns:
number of bytes writen to the buffer

Implements eip::serialization::Writer.

Definition at line 90 of file buffer_writer.h.

void eip::serialization::BufferWriter::writeBuffer ( const_buffer  b) [inline, virtual]

Write out the contents of a buffer into the current buffer. Automatically increases the bytes written and advances the pointer into the current output 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

Implements eip::serialization::Writer.

Definition at line 74 of file buffer_writer.h.

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

Write a set of bytes to the buffer. Automatically increases the number of bytes writen and advances the pointer in the buffer

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

Implements eip::serialization::Writer.

Definition at line 61 of file buffer_writer.h.


Member Data Documentation

mutable_buffer eip::serialization::BufferWriter::buf_ [private]

Definition at line 96 of file buffer_writer.h.

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