MNE-CPP  beta 1.0
Public Types | Public Member Functions | List of all members
IOBuffer::CircularBuffer< _Tp > Class Template Reference

The TEMPLATE CIRCULAR BUFFER provides a template for thread safe circular buffers. More...

#include <circularbuffer.h>

Public Types

typedef QSharedPointer< CircularBufferSPtr
 
typedef QSharedPointer< const CircularBufferConstSPtr
 

Public Member Functions

 CircularBuffer (unsigned int uiMaxNumElements)
 
 ~CircularBuffer ()
 
void push (const _Tp *pArray, unsigned int size)
 
void push (const _Tp &newElement)
 
_Tp pop ()
 
void clear ()
 
void pause (bool)
 
bool releaseFromPop ()
 
bool releaseFromPush ()
 

Detailed Description

template<typename _Tp>
class IOBuffer::CircularBuffer< _Tp >

The TEMPLATE CIRCULAR BUFFER provides a template for thread safe circular buffers.

TEMPLATE CIRCULAR BUFFER

Definition at line 80 of file circularbuffer.h.

Member Typedef Documentation

template<typename _Tp >
typedef QSharedPointer<const CircularBuffer> IOBuffer::CircularBuffer< _Tp >::ConstSPtr

Const shared pointer type for CircularBuffer.

Definition at line 84 of file circularbuffer.h.

template<typename _Tp >
typedef QSharedPointer<CircularBuffer> IOBuffer::CircularBuffer< _Tp >::SPtr

Shared pointer type for CircularBuffer.

Definition at line 83 of file circularbuffer.h.

Constructor & Destructor Documentation

template<typename _Tp >
IOBuffer::CircularBuffer< _Tp >::CircularBuffer ( unsigned int  uiMaxNumElements)
explicit

Constructs a CircularBuffer.

Parameters
[in]uiMaxNumElementslength of buffer.

Definition at line 177 of file circularbuffer.h.

template<typename _Tp >
IOBuffer::CircularBuffer< _Tp >::~CircularBuffer ( )

Destroys the CircularBuffer.

Definition at line 193 of file circularbuffer.h.

Member Function Documentation

template<typename _Tp >
void IOBuffer::CircularBuffer< _Tp >::clear ( )
inline

Clears the buffer.

Definition at line 259 of file circularbuffer.h.

template<typename _Tp >
void IOBuffer::CircularBuffer< _Tp >::pause ( bool  bPause)
inline

Pauses the buffer. Skpis any incoming matrices and only pops zero matrices.

Definition at line 274 of file circularbuffer.h.

template<typename _Tp >
_Tp IOBuffer::CircularBuffer< _Tp >::pop ( )
inline

Returns the first element (first in first out).

Returns
the first element

Definition at line 230 of file circularbuffer.h.

template<typename _Tp >
void IOBuffer::CircularBuffer< _Tp >::push ( const _Tp *  pArray,
unsigned int  size 
)
inline

Adds a whole array at the end buffer.

Parameters
[in]pArraypointer to an Array which should be apend to the end.
[in]sizenumber of elements containing the array.

Definition at line 204 of file circularbuffer.h.

template<typename _Tp >
void IOBuffer::CircularBuffer< _Tp >::push ( const _Tp &  newElement)
inline

Adds an element at the end of the buffer.

Parameters
[in]newElementpointer to an Array which should be apend to the end.

Definition at line 219 of file circularbuffer.h.

template<typename _Tp >
bool IOBuffer::CircularBuffer< _Tp >::releaseFromPop ( )
inline

Releases the circular buffer from the acquire statement in the pop() function.

Parameters
[out]boolreturns true if resources were freed so that the aquire statement in the pop function can release, otherwise false.

Definition at line 283 of file circularbuffer.h.

template<typename _Tp >
bool IOBuffer::CircularBuffer< _Tp >::releaseFromPush ( )
inline

Releases the circular buffer from the acquire statement in the push() function.

Parameters
[out]boolreturns true if resources were freed so that the aquire statement in the push function can release, otherwise false.

Definition at line 303 of file circularbuffer.h.


The documentation for this class was generated from the following file: