MNE-CPP
beta 1.0
|
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 () | |
void | push (const _Tp *pArray, unsigned int size) |
void | push (const _Tp &newElement) |
_Tp | pop () |
void | clear () |
void | pause (bool) |
bool | releaseFromPop () |
bool | releaseFromPush () |
The TEMPLATE CIRCULAR BUFFER provides a template for thread safe circular buffers.
TEMPLATE CIRCULAR BUFFER
Definition at line 80 of file circularbuffer.h.
typedef QSharedPointer<const CircularBuffer> IOBuffer::CircularBuffer< _Tp >::ConstSPtr |
Const shared pointer type for CircularBuffer.
Definition at line 84 of file circularbuffer.h.
typedef QSharedPointer<CircularBuffer> IOBuffer::CircularBuffer< _Tp >::SPtr |
Shared pointer type for CircularBuffer.
Definition at line 83 of file circularbuffer.h.
|
explicit |
Constructs a CircularBuffer.
[in] | uiMaxNumElements | length of buffer. |
Definition at line 177 of file circularbuffer.h.
IOBuffer::CircularBuffer< _Tp >::~CircularBuffer | ( | ) |
Destroys the CircularBuffer.
Definition at line 193 of file circularbuffer.h.
|
inline |
Clears the buffer.
Definition at line 259 of file circularbuffer.h.
|
inline |
Pauses the buffer. Skpis any incoming matrices and only pops zero matrices.
Definition at line 274 of file circularbuffer.h.
|
inline |
Returns the first element (first in first out).
Definition at line 230 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 204 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 219 of file circularbuffer.h.
|
inline |
Releases the circular buffer from the acquire statement in the pop() function.
[out] | bool | returns 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.
|
inline |
Releases the circular buffer from the acquire statement in the push() function.
[out] | bool | returns 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.