Equalizer
1.4.1
|
A helper class providing command packet dispatch functionality to networked objects. More...
#include <dispatcher.h>
Public Member Functions | |
CO_API | Dispatcher (const Dispatcher &from) |
const Dispatcher & | operator= (const Dispatcher &) |
NOP assignment operator. | |
virtual CO_API bool | dispatchCommand (Command &command) |
Dispatch a command from the receiver thread to the registered queue. | |
Public Types | |
typedef CommandFunc< Dispatcher > | Func |
Protected Member Functions | |
template<typename T > | |
void | registerCommand (const uint32_t command, const CommandFunc< T > &func, CommandQueue *destinationQueue) |
Registers a command member function for a command. | |
CO_API bool | _cmdUnknown (Command &command) |
The default handler for handling commands. |
A helper class providing command packet dispatch functionality to networked objects.
Provides packet dispatch through a command queue and command handler table.
Definition at line 36 of file dispatcher.h.
CO_API bool co::Dispatcher::_cmdUnknown | ( | Command & | command | ) | [protected] |
The default handler for handling commands.
command | the command |
virtual CO_API bool co::Dispatcher::dispatchCommand | ( | Command & | command | ) | [virtual] |
Dispatch a command from the receiver thread to the registered queue.
command | the command. |
Reimplemented in co::LocalNode, and eq::fabric::Client.
const Dispatcher& co::Dispatcher::operator= | ( | const Dispatcher & | ) | [inline] |
NOP assignment operator.
Definition at line 46 of file dispatcher.h.
void co::Dispatcher::registerCommand | ( | const uint32_t | command, |
const CommandFunc< T > & | func, | ||
CommandQueue * | destinationQueue | ||
) | [protected] |
Registers a command member function for a command.
If the destination queue is 0, the command function is invoked directly upon dispatch, otherwise it is invoked during the processing of the command queue.
command | the command. |
func | the functor to handle the command. |
destinationQueue | the queue to which the receiver thread dispatches the command. |
Definition at line 92 of file dispatcher.h.