21 #ifndef CO_DISPATCHER_H
22 #define CO_DISPATCHER_H
25 #include <co/commandFunc.h>
30 namespace detail {
class Dispatcher; }
59 template<
typename T >
void
87 detail::Dispatcher*
const _impl;
89 CO_API
void _registerCommand(
const uint32_t command,
93 template<
typename T >
101 #endif // CO_DISPATCHER_H
A class providing command dispatch functionality to networked objects.
A class managing received commands.
CommandFunc< Dispatcher > Func
The signature of the base Dispatcher callback.
A wrapper to register a function callback on an object instance.
CO_API bool _cmdUnknown(ICommand &command)
The default handler for handling commands.
void registerCommand(const uint32_t command, const CommandFunc< T > &func, CommandQueue *queue)
Register a command member function for a command.
virtual CO_API bool dispatchCommand(ICommand &command)
Dispatch a command from the receiver thread to the registered queue.
A thread-safe queue for ICommand buffers.