diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-20 15:39:27 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-20 15:39:27 +0100 |
commit | ce14236bd08469737185962d0be11d72c442b60e (patch) | |
tree | 90955cc17ce2573785e9010f5f3925e4ea683d5e /src/crepe/api/EventHandler.h | |
parent | 881e8f286a553f393af7c698652521b5c125b1f7 (diff) |
most tests done
Diffstat (limited to 'src/crepe/api/EventHandler.h')
-rw-r--r-- | src/crepe/api/EventHandler.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/crepe/api/EventHandler.h b/src/crepe/api/EventHandler.h index db51d04..90886aa 100644 --- a/src/crepe/api/EventHandler.h +++ b/src/crepe/api/EventHandler.h @@ -13,6 +13,8 @@ namespace crepe { * indicating whether the event is handled. * * \tparam EventType The type of event this handler will handle. + * + * Returning \c false from an event handler results in the event being propogated to other listeners for the same event type, while returning \c true stops propogation altogether. */ template <typename EventType> using EventHandler = std::function<bool(const EventType & e)>; @@ -105,9 +107,9 @@ private: std::string get_type() const override; //! The event handler function. - EventHandler<EventType> m_handler; + EventHandler<EventType> handler; //! The type name of the handler function. - const std::string m_handler_type; + const std::string handler_type; }; } // namespace crepe |