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

The circular matrix buffer. More...

#include <circularmatrixbuffer.h>

Inheritance diagram for IOBuffer::CircularMatrixBuffer< _Tp >:
IOBuffer::Buffer

Public Types

typedef QSharedPointer< CircularMatrixBufferSPtr
 
typedef QSharedPointer< const CircularMatrixBufferConstSPtr
 
- Public Types inherited from IOBuffer::Buffer
typedef QSharedPointer< BufferSPtr
 
typedef QSharedPointer< const BufferConstSPtr
 

Public Member Functions

 CircularMatrixBuffer (unsigned int uiMaxNumMatrices, unsigned int uiRows, unsigned int uiCols)
 
 ~CircularMatrixBuffer ()
 
void push (const Matrix< _Tp, Dynamic, Dynamic > *pMatrix)
 
Matrix< _Tp, Dynamic, Dynamic > pop ()
 
void clear ()
 
quint32 size () const
 
quint32 rows () const
 
quint32 cols () const
 
void pause (bool)
 
bool releaseFromPop ()
 
bool releaseFromPush ()
 
- Public Member Functions inherited from IOBuffer::Buffer
 Buffer (const char *type_id)
 
const char * getTypeId ()
 

Detailed Description

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

The circular matrix buffer.

Circular Matrix buffer provides a template for thread safe circular matrix buffers.

Definition at line 93 of file circularmatrixbuffer.h.

Member Typedef Documentation

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

Const shared pointer type for CircularMatrixBuffer.

Definition at line 97 of file circularmatrixbuffer.h.

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

Shared pointer type for CircularMatrixBuffer.

Definition at line 96 of file circularmatrixbuffer.h.

Constructor & Destructor Documentation

template<typename _Tp >
IOBuffer::CircularMatrixBuffer< _Tp >::CircularMatrixBuffer ( unsigned int  uiMaxNumMatrices,
unsigned int  uiRows,
unsigned int  uiCols 
)
explicit

Constructs a CircularMatrixBuffer. length of buffer = uiMaxNumMatrizes*rows*cols

Parameters
[in]uiMaxNumMatriceslength of buffer.
[in]uiRowsNumber of rows.
[in]uiColsNumber of columns.

Definition at line 205 of file circularmatrixbuffer.h.

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

Destroys the CircularBuffer.

Definition at line 225 of file circularmatrixbuffer.h.

Member Function Documentation

template<typename _Tp >
void IOBuffer::CircularMatrixBuffer< _Tp >::clear ( )

Clears the buffer.

Definition at line 290 of file circularmatrixbuffer.h.

template<typename _Tp >
quint32 IOBuffer::CircularMatrixBuffer< _Tp >::cols ( ) const
inline

Cols of the stored matrices of the buffer.

Definition at line 323 of file circularmatrixbuffer.h.

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

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

Definition at line 332 of file circularmatrixbuffer.h.

template<typename _Tp >
Matrix< _Tp, Dynamic, Dynamic > IOBuffer::CircularMatrixBuffer< _Tp >::pop ( )
inline

Returns the first matrix (first in first out).

Returns
the first matrix

Definition at line 257 of file circularmatrixbuffer.h.

template<typename _Tp>
void IOBuffer::CircularMatrixBuffer< _Tp >::push ( const Matrix< _Tp, Dynamic, Dynamic > *  pMatrix)
inline

Adds a whole matrix at the end buffer.

Parameters
[in]pMatrixpointer to a Matrix which should be apend to the end.

Definition at line 236 of file circularmatrixbuffer.h.

template<typename _Tp >
bool IOBuffer::CircularMatrixBuffer< _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 341 of file circularmatrixbuffer.h.

template<typename _Tp >
bool IOBuffer::CircularMatrixBuffer< _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 363 of file circularmatrixbuffer.h.

template<typename _Tp >
quint32 IOBuffer::CircularMatrixBuffer< _Tp >::rows ( ) const
inline

Rows of the stored matrices of the buffer.

Definition at line 314 of file circularmatrixbuffer.h.

template<typename _Tp >
quint32 IOBuffer::CircularMatrixBuffer< _Tp >::size ( ) const
inline

Size of the buffer.

Definition at line 305 of file circularmatrixbuffer.h.


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