eq::base::MTQueue< T > Class Template Reference

A queue with a blocking read access, typically used between two execution threads. More...

#include <mtQueue.h>

Collaboration diagram for eq::base::MTQueue< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MTQueue ()
 Construct a new queue.
 MTQueue (const MTQueue< T > &from)
 Construct a copy of a queue.
 ~MTQueue ()
 Destruct this Queue.
MTQueue< T > & operator= (const MTQueue< T > &from)
 Assign the values of another queue.
bool isEmpty () const
size_t getSize () const
pop ()
 Retrieve and pop the front element from the queue, may block.
tryPop ()
back () const
void push (const T &element)
 Push a new element to the back of the queue.
void pushFront (const T &element)
 Push a new element to the front of the queue.

Static Public Attributes

static const T NONE
 None element, returned by tryPop() and back().


Detailed Description

template<typename T>
class eq::base::MTQueue< T >

A queue with a blocking read access, typically used between two execution threads.

Definition at line 37 of file mtQueue.h.


Constructor & Destructor Documentation

template<typename T>
eq::base::MTQueue< T >::MTQueue (  ) 

Construct a new queue.

template<typename T>
eq::base::MTQueue< T >::MTQueue ( const MTQueue< T > &  from  ) 

Construct a copy of a queue.

template<typename T>
eq::base::MTQueue< T >::~MTQueue (  ) 

Destruct this Queue.


Member Function Documentation

template<typename T>
bool eq::base::MTQueue< T >::isEmpty (  )  const [inline]

Returns:
true if the queue is empty, false otherwise.

Definition at line 53 of file mtQueue.h.

Referenced by eq::net::CommandQueue::isEmpty().

Here is the caller graph for this function:

template<typename T>
size_t eq::base::MTQueue< T >::getSize (  )  const [inline]

Returns:
the number of items currently in the queue.

Definition at line 56 of file mtQueue.h.

Referenced by eq::net::CommandQueue::getSize().

Here is the caller graph for this function:

template<typename T>
T eq::base::MTQueue< T >::pop (  ) 

Retrieve and pop the front element from the queue, may block.

Referenced by eq::net::CommandQueue::pop(), and eq::net::FullSlaveCM::sync().

Here is the caller graph for this function:

template<typename T>
T eq::base::MTQueue< T >::tryPop (  ) 

Returns:
the first element of the queue, or NONE if the queue is empty.

Referenced by eq::net::CommandQueue::flush(), and eq::net::CommandQueue::tryPop().

Here is the caller graph for this function:

template<typename T>
T eq::base::MTQueue< T >::back (  )  const

Returns:
the last element of the queue, or NONE if the queue is empty.

Referenced by eq::net::CommandQueue::back(), and eq::net::FullSlaveCM::getHeadVersion().

Here is the caller graph for this function:

template<typename T>
void eq::base::MTQueue< T >::push ( const T &  element  ) 

Push a new element to the back of the queue.

Referenced by eq::net::CommandQueue::push(), and eq::net::CommandQueue::wakeup().

Here is the caller graph for this function:

template<typename T>
void eq::base::MTQueue< T >::pushFront ( const T &  element  ) 

Push a new element to the front of the queue.

Referenced by eq::net::CommandQueue::pushFront().

Here is the caller graph for this function:


Member Data Documentation

template<typename T>
const T eq::base::MTQueue< T >::NONE [static]

None element, returned by tryPop() and back().

Definition at line 80 of file mtQueue.h.


The documentation for this class was generated from the following file:
Generated on Mon Aug 10 18:58:44 2009 for Equalizer 0.9 by  doxygen 1.5.8