#include <buffer_writer.h>
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_ |
Helper class to write values into a buffer to assist in serializing.
Definition at line 44 of file buffer_writer.h.
eip::serialization::BufferWriter::BufferWriter | ( | mutable_buffer | buf | ) | [inline] |
Create a writer to use the buffer given
buf | Buffer to which to write data |
Definition at line 52 of file buffer_writer.h.
size_t eip::serialization::BufferWriter::getByteCount | ( | ) | [inline, virtual] |
Get the 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.
b | buffer of data to add to the current buffer at the current location |
std::length_error | if 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
p | pointer to data to write |
n | number of bytes to write |
std::length_error | if the buffer is too small to contain that many bytes |
Implements eip::serialization::Writer.
Definition at line 61 of file buffer_writer.h.
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.