Equalizer 1.0

co::CommandQueue Class Reference

A CommandQueue is a thread-safe queue for command packets. More...

#include <commandQueue.h>

Inheritance diagram for co::CommandQueue:
Collaboration diagram for co::CommandQueue:

List of all members.

Public Member Functions

virtual CO_API void push (Command &packet)
 Push a command to the queue.
virtual CO_API void pushFront (Command &packet)
 Push a command to the front of the queue.
virtual void wakeup ()
 Wake up the command queue, pop() will return 0.
virtual CO_API Commandpop ()
 Pop a command from the queue.
virtual CO_API CommandtryPop ()
 Try to pop a command from the queue.
bool isEmpty () const
virtual CO_API void flush ()
 Flush all cached commands.
size_t getSize () const
 EQ_TS_VAR (_thread)

Detailed Description

A CommandQueue is a thread-safe queue for command packets.

Definition at line 34 of file co/commandQueue.h.


Member Function Documentation

virtual CO_API void co::CommandQueue::flush ( ) [virtual]

Flush all cached commands.

size_t co::CommandQueue::getSize ( ) const [inline]
Returns:
the size of the queue.

Definition at line 81 of file co/commandQueue.h.

References co::base::MTQueue< T >::getSize().

Here is the call graph for this function:

bool co::CommandQueue::isEmpty ( ) const [inline]
Returns:
true if the command queue is empty, false if not.

Definition at line 75 of file co/commandQueue.h.

References co::base::MTQueue< T >::isEmpty().

Referenced by eq::Config::checkEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual CO_API Command* co::CommandQueue::pop ( ) [virtual]

Pop a command from the queue.

The returned command has to be released after usage.

Returns:
the next command in the queue.

Reimplemented in eq::CommandQueue.

virtual CO_API void co::CommandQueue::push ( Command packet) [virtual]

Push a command to the queue.

Parameters:
packetthe command packet.

Reimplemented in eq::CommandQueue.

virtual CO_API void co::CommandQueue::pushFront ( Command packet) [virtual]

Push a command to the front of the queue.

Reimplemented in eq::CommandQueue.

virtual CO_API Command* co::CommandQueue::tryPop ( ) [virtual]

Try to pop a command from the queue.

The returned command has to be released after usage.

Returns:
the next command in the queue, or 0 if no command is queued.

Reimplemented in eq::CommandQueue.

virtual void co::CommandQueue::wakeup ( ) [inline, virtual]

Wake up the command queue, pop() will return 0.

Reimplemented in eq::CommandQueue.

Definition at line 51 of file co/commandQueue.h.

References co::base::MTQueue< T >::push().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Sun May 8 2011 19:11:08 for Equalizer 1.0 by  doxygen 1.7.3