Equalizer  1.4.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 CO_API void wakeup ()
 Wake up the command queue, pop() will return 0.
virtual CO_API Commandpop (const uint32_t timeout=LB_TIMEOUT_INDEFINITE)
 Pop a command from the queue.
virtual CO_API CommandtryPop ()
 Try to pop a command from the queue.
CO_API bool isEmpty () const
CO_API void flush ()
 Flush all cached commands.
CO_API size_t getSize () const
 LB_TS_VAR (_thread)

Detailed Description

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

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


Member Function Documentation

CO_API void co::CommandQueue::flush ( )

Flush all cached commands.

CO_API size_t co::CommandQueue::getSize ( ) const
Returns:
the size of the queue.
CO_API bool co::CommandQueue::isEmpty ( ) const
Returns:
true if the command queue is empty, false if not.
virtual CO_API Command* co::CommandQueue::pop ( const uint32_t  timeout = LB_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 CO_API void co::CommandQueue::wakeup ( ) [virtual]

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

Reimplemented in eq::CommandQueue.


The documentation for this class was generated from the following file:
Generated on Mon Nov 26 2012 14:41:50 for Equalizer 1.4.1 by  doxygen 1.7.6.1