Class EventConsumer
Defined in File EventConsumer.hpp
Class Documentation
-
class EventConsumer
Simple wrapper for a function that consumes an event.
Public Functions
-
inline EventConsumer(std::function<void(Event&)> consumer)
Create an event consumer.
- Parameters:
consumer – The function to call when an event is received
-
inline void Consume(Event &event)
Consume an event.
Forwards the event to the consuming function
-
inline bool operator==(const EventConsumer &rhs) const
Check if two EventConsumers are equal.
Compares GUIDs (which should basically never overlap)
-
inline EventConsumer(std::function<void(Event&)> consumer)