H::DynamicBuffer< DataType > Class Template Reference

Implementation of a simple, highly efficient, dynamic buffer. More...

#include <DynamicBuffer.hpp>

Collaboration diagram for H::DynamicBuffer< DataType >:

Collaboration graph
[legend]

List of all members.

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.


Detailed Description

template<class DataType>
class H::DynamicBuffer< DataType >

Implementation of a simple, highly efficient, dynamic buffer.

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.


Constructor & Destructor Documentation

template<class DataType>
H::DynamicBuffer< DataType >::DynamicBuffer (  )  [inline]

Default Constructor.

DynamicBuffer Default Constructor.

Definition at line 51 of file DynamicBuffer.cpp.

template<class DataType>
H::DynamicBuffer< DataType >::~DynamicBuffer (  )  [inline, virtual]

Destructor.

DynamicBuffer Destructor.

Definition at line 60 of file DynamicBuffer.cpp.

References H::DynamicBuffer< DataType >::clear().


Member Function Documentation

template<class DataType>
void H::DynamicBuffer< DataType >::addToBuffer ( const DataType *  AddBuf,
size_t  BufLen 
) [inline]

Add data to the buffer.

Parameters:
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().

template<class DataType>
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().

template<class DataType>
const DataType * H::DynamicBuffer< DataType >::getBuffer (  )  const [inline]

Get the buffer.

Returns:
The buffer itself

Definition at line 127 of file DynamicBuffer.cpp.

Referenced by H::Socket::addToMessageBuffer(), Gizmod::GizmoEventLIRC::buildEventsVectorFromBuffer(), and H::DynamicBufferConverter< DataType, ConvertTo >::convert().

template<class DataType>
size_t H::DynamicBuffer< DataType >::length (  )  const [inline]

Get the buffer length.

Returns:
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().


The documentation for this class was generated from the following files:
Generated on Wed Nov 7 10:07:14 2007 for gizmod by  doxygen 1.5.3