22#include <condition_variable>
29#include "events/observer.hpp"
30#include "events/event.hpp"
31#include "events/observerList.hpp"
32#include "singleton.hpp"
65 std::condition_variable _eventCV;
68 std::queue<anch::events::Event<T>> _events;
150 void fireEvent(
const T& event,
const std::map<std::string,std::string>& headers = {})
noexcept;
166 static void FireEvent(
const T& event,
const std::map<std::string,std::string>& headers = {})
noexcept;
185 void processEvents() noexcept;
192#include "events/impl/eventBus.hpp"
Meyers' singleton implementation.
Definition singleton.hpp:50
static void FireEvent(const T &event, const std::map< std::string, std::string > &headers={}) noexcept
void removeObserver(anch::events::Observer< T > &observer) noexcept
static void FireEvent(const anch::events::Event< T > &event) noexcept
static bool AddObserver(anch::events::Observer< T > &observer) noexcept
bool addObserver(anch::events::Observer< T > &observer) noexcept
EventBus(const EventBus &)=delete
void fireEvent(const anch::events::Event< T > &event) noexcept
static void RemoveObserver(anch::events::Observer< T > &observer) noexcept
void fireEvent(const T &event, const std::map< std::string, std::string > &headers={}) noexcept
EventBus & operator=(const EventBus &)=delete
An observer interface of the observers/observable design pattern.
Definition observer.hpp:42
Thread safe observers list (internal usage).
Definition observerList.hpp:54
Events management namespace.
Definition event.hpp:25
Event representation.
Definition event.hpp:37