48 virtual void process(
const std::string& key,
49 const std::optional<sf::Event>& event);
61 template<
typename ENUM_TYPE>
62 void process(ENUM_TYPE eventName,
const std::optional<sf::Event>& event);
74 std::vector<EventCallback>& getCallbacks(
const std::string& key);
78 std::map<std::string, std::vector<EventCallback>> _callbacks;
83#include "../../../../src/Engine/Events/EventReceiver.tpp"
Base class for all event-receiving traits.
virtual ~EventReceiver()=default
void process(ENUM_TYPE eventName, const std::optional< sf::Event > &event)
Invoke all callbacks registered for eventName.
virtual void process(const std::string &key, const std::optional< sf::Event > &event)
Invoke all callbacks registered for key.