|
virtual SubscriptionId | Subscribe (std::string_view eventType, EventHandler handler)=0 |
|
virtual void | Unsubscribe (SubscriptionId id)=0 |
|
virtual void | Publish (std::string_view eventType, std::any data)=0 |
|
template<typename T > |
SubscriptionId | Subscribe (std::function< void(const T &)> handler) |
|
template<typename T > |
void | Publish (T &&data) |
|
Definition at line 9 of file event_bus.hpp.
◆ EventHandler
using plugify::IEventBus::EventHandler = std::function<void(const std::any&)> |
◆ SubscriptionId
using plugify::IEventBus::SubscriptionId = size_t |
◆ Publish()
template<typename T >
void plugify::IEventBus::Publish |
( |
T && |
data | ) |
|
|
inline |
◆ Subscribe()
template<typename T >
SubscriptionId plugify::IEventBus::Subscribe |
( |
std::function< void(const T &)> |
handler | ) |
|
|
inline |
The documentation for this class was generated from the following file: