User Manual, Developers Guide and API Documentation

wns::events::scheduler::CommandQueue Class Reference

Thread safe command queue. More...

#include <events/scheduler/CommandQueue.hpp>

Collaboration diagram for wns::events::scheduler::CommandQueue:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CommandQueue ()
 Default constructor.
void dequeueCommand (const ICommandPtr &command)
 Remove a command from the queue.
ICommandPtr queueCommand (const Callable &callee)
 Queue a command for thread safe execution from within the main loop.
void reset ()
 Remove all commands.
void runCommands ()
 This "brings" us back into the main event loop ...
virtual ~CommandQueue ()
 Destructor.

Private Types

typedef
wns::container::FastList
< CommandPtr
CommandContainer
typedef wns::SmartPtr< CommandCommandPtr

Private Attributes

pthread_mutex_t mutex_
CommandContainer queue_

Classes

class  Command
 internal representation of ICommand More...


Detailed Description

Fabian Debus <fabian.debus@illator.de> Marc Schinnenburg <marc@schinnenburg.com>

This thread safe command queue is used to insert commands from other threads into the main event loop. The command queue will be paged before a new event is executed and will run all available commands.

Definition at line 50 of file CommandQueue.hpp.


Member Typedef Documentation

Definition at line 161 of file CommandQueue.hpp.

Definition at line 159 of file CommandQueue.hpp.


Constructor & Destructor Documentation

CommandQueue::CommandQueue (  ) 

Definition at line 32 of file CommandQueue.cpp.

CommandQueue::~CommandQueue (  )  [virtual]

Definition at line 39 of file CommandQueue.cpp.


Member Function Documentation

void CommandQueue::dequeueCommand ( const ICommandPtr command  ) 

Definition at line 96 of file CommandQueue.cpp.

wns::events::scheduler::ICommandPtr CommandQueue::queueCommand ( const Callable callee  ) 

Definition at line 77 of file CommandQueue.cpp.

void CommandQueue::reset (  ) 

Definition at line 68 of file CommandQueue.cpp.

void CommandQueue::runCommands (  ) 

Definition at line 44 of file CommandQueue.cpp.


Member Data Documentation

Definition at line 165 of file CommandQueue.hpp.

Definition at line 163 of file CommandQueue.hpp.


The documentation for this class was generated from the following files:

Generated on Sat May 26 03:32:53 2012 for openWNS by  doxygen 1.5.5