.. _dispatcher: .. include:: ../../defs.hrst Dispatcher ########## The dispatcher is responsible for collecting emitted events and calling listeners with the respective events. We use an additional term in this documentation: addressable listener. With that we mean a listener that for one receives all the normal events but also addressable events. We support the feature to emit an event that is addressed to a specific listener. In |Obscura| no particular base class is required for creating a listener. All you need is a class that implements the defined callbacks. These callbacks are defined via event definitions. In addition to defining your own events many events are pre-defined: .. doxygenclass:: obscura::ConfigurableDispatcher :members: :undoc-members: .. doxygentypedef:: obscura::Dispatcher Helper functions **************** These are functions that are internally used in the dispatcher implementation .. doxygenfunction:: obscura::appendToEventQueue(typename Definition::Event&& event, Queue& eventQueue) .. doxygenfunction:: obscura::appendToEventQueue(const typename Definition::Event& event, Queue& eventQueue) .. doxygenfunction:: obscura::appendToEventQueue(const Address& address, typename Definition::Event&& event, Queue& eventQueue) .. doxygenfunction:: obscura::appendToEventQueue(const Address& address, const typename Definition::Event& event, Queue& eventQueue) .. doxygenfunction:: obscura::checkIfHasListener(std::size_t code, const Queue& eventQueue) .. doxygenfunction:: obscura::appendToListenerQueue(Listener& listener, Queue& queue, ListenerRegistry& registry)