Equalizer  1.2.1
Public Member Functions
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 (const uint32_t timeout=EQ_TIMEOUT_INDEFINITE)
 Pop a command from the queue.
virtual CO_API CommandtryPop ()
 Try to pop a command from the queue.
bool isEmpty () const
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

CO_API void co::CommandQueue::flush ( )

Flush all cached commands.

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

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

References co::base::MTQueue< T, S >::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 78 of file co/commandQueue.h.

References co::base::MTQueue< T, S >::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 ( const uint32_t  timeout = EQ_TIMEOUT_INDEFINITE) [virtual]

Pop a command from the queue.

The returned command has to be released after usage.

Parameters:
timeoutthe time in ms to wait for the operation.
Returns:
the next command in the queue.
Exceptions:
Exceptionon timeout.
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, S >::push().

+ Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Fri Jun 8 2012 15:44:33 for Equalizer 1.2.1 by  doxygen 1.8.0