eq::net::CommandQueue Class Reference

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

#include <commandQueue.h>

Inheritance diagram for eq::net::CommandQueue:
Inheritance graph
[legend]
Collaboration diagram for eq::net::CommandQueue:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void push (Command &packet)
 Push a command to the queue.
virtual 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 Commandpop ()
 Pop a command from the queue.
virtual CommandtryPop ()
 Try to pop a command from the queue.
bool isEmpty () const
virtual void flush ()
 Flush all cached commands.
size_t getSize () const
 CHECK_THREAD_DECLARE (_thread)

Detailed Description

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

Definition at line 35 of file net/commandQueue.h.


Member Function Documentation

void eq::net::CommandQueue::push ( Command packet  )  [virtual]

Push a command to the queue.

Parameters:
packet the command packet.

Reimplemented in eq::CommandQueue.

Definition at line 54 of file net/commandQueue.cpp.

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::net::CommandQueue::pushFront ( Command packet  )  [virtual]

Push a command to the front of the queue.

Reimplemented in eq::CommandQueue.

Definition at line 62 of file net/commandQueue.cpp.

References eq::base::MTQueue< T >::pushFront().

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

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void eq::net::CommandQueue::wakeup (  )  [inline, virtual]

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

Reimplemented in eq::CommandQueue.

Definition at line 52 of file net/commandQueue.h.

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

Referenced by eq::CommandQueue::wakeup().

Here is the call graph for this function:

Here is the caller graph for this function:

Command * eq::net::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.

Definition at line 70 of file net/commandQueue.cpp.

References eq::base::MTQueue< T >::pop().

Referenced by eq::CommandQueue::pop().

Here is the call graph for this function:

Here is the caller graph for this function:

Command * eq::net::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.

Definition at line 76 of file net/commandQueue.cpp.

References eq::base::MTQueue< T >::tryPop().

Referenced by eq::CommandQueue::tryPop().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 76 of file net/commandQueue.h.

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

Referenced by eq::Config::checkEvent(), flush(), eq::Client::hasCommands(), and eq::CommandQueue::pop().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::net::CommandQueue::flush (  )  [virtual]

Flush all cached commands.

Reimplemented in eq::CommandQueue.

Definition at line 40 of file net/commandQueue.cpp.

References EQWARN, isEmpty(), and eq::base::MTQueue< T >::tryPop().

Referenced by eq::CommandQueue::flush().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 82 of file net/commandQueue.h.

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

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Sat Feb 6 13:08:45 2010 for Equalizer 0.9.1 by  doxygen 1.6.1