Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

rutz::circular_queue< T > Class Template Reference

#include <rutz/circular_queue.h>

List of all members.


Detailed Description

template<class T>
class rutz::circular_queue< T >

Circular fixed-size queue; T must have a default constructor.

This class is designed to be used in a situation where one thread is filling the queue while another thread is emptying the queue; in that situation, no locks should be needed to access the queue safely.

Definition at line 48 of file circular_queue.h.

Public Member Functions

 circular_queue (const size_t n)
 ~circular_queue ()
size_t size () const
 Get the number of spaces in the queue (not all of which may be currently occupied).
bool pop_front (T &dest)
 Returns true of the pop succeeded.
bool push_back (const T &val)
 Returns true if the push succeeded.

Classes

struct  entry


Member Function Documentation

template<class T>
bool rutz::circular_queue< T >::pop_front T &  dest  )  [inline]
 

Returns true of the pop succeeded.

Definition at line 68 of file circular_queue.h.

Referenced by BufferedInputFrameSeries::get(), and BufferedFrameIstream::readFrame().

template<class T>
bool rutz::circular_queue< T >::push_back const T &  val  )  [inline]
 

Returns true if the push succeeded.

Definition at line 87 of file circular_queue.h.

template<class T>
size_t rutz::circular_queue< T >::size  )  const [inline]
 

Get the number of spaces in the queue (not all of which may be currently occupied).

Definition at line 65 of file circular_queue.h.

Referenced by BufferedFrameIstream::startStream().


The documentation for this class was generated from the following file:
Generated on Sun Nov 22 13:51:42 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4