MNE-CPP
0.1.9
A Framework for Electrophysiology
|
The TEMPLATE CIRCULAR BUFFER provides a template for thread safe circular buffers. More...
#include <circularbuffer.h>
Public Types | |
typedef QSharedPointer< CircularBuffer > | SPtr |
typedef QSharedPointer< const CircularBuffer > | ConstSPtr |
Public Member Functions | |
CircularBuffer (unsigned int uiMaxNumElements) | |
~CircularBuffer () | |
bool | push (const _Tp *pArray, unsigned int size) |
bool | push (const _Tp &newElement) |
bool | pop (_Tp &element) |
void | clear () |
void | pause (bool) |
int | getFreeElementsRead () |
int | getFreeElementsWrite () |
The TEMPLATE CIRCULAR BUFFER provides a template for thread safe circular buffers.
TEMPLATE CIRCULAR BUFFER
Definition at line 73 of file circularbuffer.h.
typedef QSharedPointer<const CircularBuffer> UTILSLIB::CircularBuffer< _Tp >::ConstSPtr |
Const shared pointer type for CircularBuffer.
Definition at line 77 of file circularbuffer.h.
typedef QSharedPointer<CircularBuffer> UTILSLIB::CircularBuffer< _Tp >::SPtr |
Shared pointer type for CircularBuffer.
Definition at line 76 of file circularbuffer.h.
|
explicit |
Constructs a CircularBuffer.
[in] | uiMaxNumElements | length of buffer. |
Definition at line 167 of file circularbuffer.h.
UTILSLIB::CircularBuffer< _Tp >::~CircularBuffer |
Destroys the CircularBuffer.
Definition at line 182 of file circularbuffer.h.
|
inline |
Clears the buffer.
Definition at line 252 of file circularbuffer.h.
|
inline |
Returns the number of free elements for thread safe reading.
Definition at line 274 of file circularbuffer.h.
|
inline |
Returns the number of free elements for thread safe reading.
Definition at line 282 of file circularbuffer.h.
|
inline |
Pauses the buffer. Skpis any incoming matrices and only pops zero matrices.
Definition at line 266 of file circularbuffer.h.
|
inline |
Returns the first element (first in first out).
Definition at line 226 of file circularbuffer.h.
|
inline |
Adds an element at the end of the buffer.
[in] | newElement | pointer to an Array which should be apend to the end. |
Definition at line 211 of file circularbuffer.h.
|
inline |
Adds a whole array at the end buffer.
[in] | pArray | pointer to an Array which should be apend to the end. |
[in] | size | number of elements containing the array. |
Definition at line 192 of file circularbuffer.h.