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

#include <buffer_writer.h>

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

Public Member Functions

 BufferWriter (mutable_buffer buf)
 
size_t getByteCount ()
 
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

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 ( )
inlinevirtual

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)
inlinevirtual

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 
)
inlinevirtual

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.

size_t eip::serialization::BufferWriter::byte_count_
private

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 Mon Jun 10 2019 14:00:16