#include <buffer_reader.h>
Helper class to read values out of a buffer to assist in deserializing.
Definition at line 45 of file buffer_reader.h.
eip::serialization::BufferReader::BufferReader |
( |
mutable_buffer |
buf | ) |
|
|
inline |
Create a reader to use the buffer given
- Parameters
-
buf | Buffer from which to read data |
Definition at line 53 of file buffer_reader.h.
virtual size_t eip::serialization::BufferReader::getByteCount |
( |
| ) |
|
|
inlinevirtual |
virtual mutable_buffer eip::serialization::BufferReader::readBuffer |
( |
size_t |
n | ) |
|
|
inlinevirtual |
Read a set of bytes from the buffer without copying.
- Parameters
-
- Returns
- buffer of resulting data
- Exceptions
-
std::length_error | if the buffer is too small to contain that many bytes |
Definition at line 83 of file buffer_reader.h.
virtual void eip::serialization::BufferReader::readBuffer |
( |
mutable_buffer |
buf | ) |
|
|
inlinevirtual |
Read a set of bytes from the input buffer and copy into the given buffer. Automatically increases the number of bytes read and advances the pointer in the buffer
- Parameters
-
buf | Buffer into which to copy data |
- Exceptions
-
std::length_error | if the buffer is too small to contain that many bytes |
Implements eip::serialization::Reader.
Definition at line 102 of file buffer_reader.h.
virtual void eip::serialization::BufferReader::readBytes |
( |
void * |
buf, |
|
|
size_t |
n |
|
) |
| |
|
inlinevirtual |
Copy a set of bytes from the buffer into a given buffer.
- Parameters
-
buf | Buffer into which to copy bytes |
n | Number of bytes to copy |
- Exceptions
-
std::length_error | if the buffer is too small to contain that many bytes |
Implements eip::serialization::Reader.
Definition at line 61 of file buffer_reader.h.
virtual void* eip::serialization::BufferReader::readBytes |
( |
size_t |
n | ) |
|
|
inlinevirtual |
Read a set of bytes from the input buffer without copying
- Parameters
-
- Returns
- pointer into the output buffer
- Exceptions
-
std::length_error | if the buffer is too small to contain that many bytes |
Definition at line 72 of file buffer_reader.h.
virtual void eip::serialization::BufferReader::skip |
( |
size_t |
n | ) |
|
|
inlinevirtual |
Skip forward in input by n bytes
- Parameters
-
n | number of bytes to skip forward |
- Exceptions
-
std::length_error | if end of output buffer reached |
Implements eip::serialization::Reader.
Definition at line 128 of file buffer_reader.h.
mutable_buffer eip::serialization::BufferReader::buf_ |
|
private |
size_t eip::serialization::BufferReader::byte_count_ |
|
private |
The documentation for this class was generated from the following file: