Marsyas  0.5.0-beta1
Public Member Functions | Friends
realvec_queue Class Reference

#include <realvec_queue.h>

Public Member Functions

mrs_natural capacity ()
void clear ()
 Equivalent to popping all data off queue. (NOT THREAD-SAFE)
mrs_natural observations ()
mrs_natural read_capacity ()
 realvec_queue ()
 Constructs a queue of size 0.
 realvec_queue (mrs_natural observations, mrs_natural samples)
 Constructs a queue of desired size.
 realvec_queue (mrs_natural observations, mrs_natural samples, mrs_natural capacity)
void resize (mrs_natural observations, mrs_natural samples, bool clear=true)
 Changes queue size. (NOT THREAD-SAFE)
void resize (mrs_natural observations, mrs_natural samples, mrs_natural capacity, bool clear=true)
mrs_natural samples ()
mrs_natural set_capacity (mrs_natural capacity)
mrs_natural write_capacity ()

Friends

class realvec_queue_consumer
class realvec_queue_producer

Detailed Description

Definition at line 67 of file realvec_queue.h.


Constructor & Destructor Documentation

realvec_queue ( ) [inline]

Constructs a queue of size 0.

Definition at line 83 of file realvec_queue.h.

realvec_queue ( mrs_natural  observations,
mrs_natural  samples 
) [inline]

Constructs a queue of desired size.

Parameters:
observationsNumber of channels.
samplesNumber of samples.

Definition at line 94 of file realvec_queue.h.

realvec_queue ( mrs_natural  observations,
mrs_natural  samples,
mrs_natural  capacity 
) [inline]

Definition at line 101 of file realvec_queue.h.


Member Function Documentation

mrs_natural capacity ( ) [inline]

Definition at line 139 of file realvec_queue.h.

void clear ( ) [inline]

Equivalent to popping all data off queue. (NOT THREAD-SAFE)

Definition at line 134 of file realvec_queue.h.

mrs_natural observations ( ) [inline]
Returns:
The amount of channels the queue holds. (THREAD-SAFE)

Definition at line 154 of file realvec_queue.h.

mrs_natural read_capacity ( ) [inline]
Returns:
The amount of samples that can be popped from the queue. (THREAD-SAFE)

Definition at line 189 of file realvec_queue.h.

void resize ( mrs_natural  observations,
mrs_natural  samples,
bool  clear = true 
) [inline]

Changes queue size. (NOT THREAD-SAFE)

Parameters:
observationsNumber of channels.
samplesNumber of samples.
clearWheather to initialize all new space to 0, or keep data that overlaps with the old data.

Definition at line 115 of file realvec_queue.h.

void resize ( mrs_natural  observations,
mrs_natural  samples,
mrs_natural  capacity,
bool  clear = true 
) [inline]

Definition at line 120 of file realvec_queue.h.

mrs_natural samples ( ) [inline]
Returns:
The maximum amount of samples the queue can hold. (THREAD-SAFE)

Definition at line 159 of file realvec_queue.h.

mrs_natural set_capacity ( mrs_natural  capacity) [inline]

Definition at line 144 of file realvec_queue.h.

mrs_natural write_capacity ( ) [inline]
Returns:
The amount of samples that can be pushed into the queue. (THREAD-SAFE)

Definition at line 164 of file realvec_queue.h.


Friends And Related Function Documentation

friend class realvec_queue_consumer [friend]

Definition at line 78 of file realvec_queue.h.

friend class realvec_queue_producer [friend]

Definition at line 77 of file realvec_queue.h.


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