#include <DynamicBuffer.hpp>
Public Member Functions | |
void | addToBuffer (const DataType *AddBuf, size_t BufLen) |
Add data to the buffer. | |
void | clear () |
Clear the buffer's contents. | |
const DataType * | getBuffer () const |
Get the buffer. | |
size_t | length () const |
Get the buffer length. | |
DynamicBuffer () | |
Default Constructor. | |
virtual | ~DynamicBuffer () |
Destructor. |
Nothing in STL can currently be used as a buffer efficiently This uses realloc, and memcpy to be as fast as possible
Definition at line 61 of file DynamicBuffer.hpp.
H::DynamicBuffer< DataType >::DynamicBuffer | ( | ) | [inline] |
Default Constructor.
DynamicBuffer Default Constructor.
Definition at line 51 of file DynamicBuffer.cpp.
H::DynamicBuffer< DataType >::~DynamicBuffer | ( | ) | [inline, virtual] |
Destructor.
DynamicBuffer Destructor.
Definition at line 60 of file DynamicBuffer.cpp.
References H::DynamicBuffer< DataType >::clear().
void H::DynamicBuffer< DataType >::addToBuffer | ( | const DataType * | AddBuf, | |
size_t | BufLen | |||
) | [inline] |
Add data to the buffer.
AddBuf | Pointer to the data to be added | |
BufLen | Length of data to be added |
Definition at line 88 of file DynamicBuffer.cpp.
Referenced by H::Socket::addToMessageBuffer(), and H::Socket::readIntoBuffer().
void H::DynamicBuffer< DataType >::clear | ( | ) | [inline] |
Clear the buffer's contents.
Clear the buffer.
Definition at line 101 of file DynamicBuffer.cpp.
Referenced by H::Socket::addToMessageBuffer(), and H::DynamicBuffer< DataType >::~DynamicBuffer().
const DataType * H::DynamicBuffer< DataType >::getBuffer | ( | ) | const [inline] |
Get the buffer.
Definition at line 127 of file DynamicBuffer.cpp.
Referenced by H::Socket::addToMessageBuffer(), Gizmod::GizmoEventLIRC::buildEventsVectorFromBuffer(), and H::DynamicBufferConverter< DataType, ConvertTo >::convert().
size_t H::DynamicBuffer< DataType >::length | ( | ) | const [inline] |
Get the buffer length.
Definition at line 136 of file DynamicBuffer.cpp.
Referenced by H::Socket::addToMessageBuffer(), Gizmod::GizmoEventLIRC::buildEventsVectorFromBuffer(), H::DynamicBufferConverter< DataType, ConvertTo >::convert(), H::SocketClient::onSocketClientRead(), and H::SocketServer::onSocketServerRead().