Dispatcher.ixx File
Dispatches events to registered callbacks. More...
Included Headers
#include <functional>
#include <memory>
#include <typeindex>
#include <helios.event.Event>
Namespaces Index
| namespace | helios |
| namespace | event |
Classes Index
| class | Dispatcher |
|
A generic event Dispatcher for type-safe event handling. More... | |
Description
Dispatches events to registered callbacks.
File Listing
The file content with the documentation metadata removed is:
16export namespace helios::event {
27 class Dispatcher {
33 std::unordered_map<std::type_index, std::vector<std::function<void(const Event&)>>> callbacks_;
53 const auto& typedEvent = static_cast<const EventType&>(event);
71 const auto idx = std::type_index(typeid(*event));
75 callback(*event);
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.