#include <buffer_writer.h>
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
- Parameters
-
buf | Buffer to which to write data |
Definition at line 52 of file buffer_writer.h.
size_t eip::serialization::BufferWriter::getByteCount |
( |
| ) |
|
|
inlinevirtual |
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
-
b | buffer of data to add to the current buffer at the current location |
- Exceptions
-
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 |
|
) |
| |
|
inlinevirtual |
Write a set of bytes to the buffer. Automatically increases the number of bytes writen and advances the pointer in the buffer
- Parameters
-
p | pointer to data to write |
n | number of bytes to write |
- Exceptions
-
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 |
size_t eip::serialization::BufferWriter::byte_count_ |
|
private |
The documentation for this class was generated from the following file: