9 #ifndef RAD_DISPATCHER_HPP
10 #define RAD_DISPATCHER_HPP
12 #include <unordered_map>
15 #include <rad/AnyEvent.hpp>
24 using handler_t = std::function<void(AnyEvent const&)>;
25 using token_t = std::unordered_multimap<std::string, handler_t>::iterator;
59 std::unordered_multimap<std::string, handler_t> m_handlers;
std::unordered_multimap< std::string, handler_t >::iterator token_t
Definition: Dispatcher.hpp:25
Definition: Dispatcher.hpp:22
void unregisterHandler(token_t token)
Definition: Dispatcher.cpp:18
Definition: AnyEvent.hpp:55
void dispatch(AnyEvent const &e) const
Definition: Dispatcher.cpp:24
def handler
Definition: test_dispatcher.py:11
std::function< void(AnyEvent const &)> handler_t
Definition: Dispatcher.hpp:24
token_t registerHandler(char const *eventId, handler_t handler)
Definition: Dispatcher.cpp:12