34 #ifndef CDISPATCHER_HPP
35 #define CDISPATCHER_HPP
37 #include "messages/ModuleMessage.pb.h"
39 #include <boost/noncopyable.hpp>
40 #include <boost/smart_ptr/shared_ptr.hpp>
41 #include <boost/thread/mutex.hpp>
53 :
private boost::noncopyable
60 void HandleRequest(boost::shared_ptr<const ModuleMessage> msg, std::string uuid);
71 boost::shared_ptr<IDGIModule> h,
72 boost::shared_ptr<const ModuleMessage> msg,
82 #endif // CDISPATCHER_HPP
void ReadHandlerCallback(boost::shared_ptr< IDGIModule > h, boost::shared_ptr< const ModuleMessage > msg, std::string uuid)
Making the handler calls bindable.
Definition: CDispatcher.cpp:113
void HandleRequest(boost::shared_ptr< const ModuleMessage > msg, std::string uuid)
Schedules a message delivery to the receiving modules.
Definition: CDispatcher.cpp:68
void RegisterReadHandler(boost::shared_ptr< IDGIModule > p_handler, std::string id)
Registers a module's identifier with the dispatcher.
Definition: CDispatcher.cpp:144
std::multimap< boost::shared_ptr< IDGIModule >, const std::string > m_registrations
Reverse map to get the calling module from the handler pointer.
Definition: CDispatcher.hpp:76
CDispatcher()
Private constructor for the singleton instance.
Definition: CDispatcher.hpp:67
static CDispatcher & Instance()
Access the singleton instance of the CDispatcher.
Definition: CDispatcher.cpp:52
Handles applying read handlers to incoming messages.
Definition: CDispatcher.hpp:52