aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/EventHandler.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-06 20:07:24 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-06 20:07:45 +0100
commitfdb4c99e139a264d4e15e6913a3756fc6cccb2f2 (patch)
tree144b0e9efecd4c10d6d79a17b4bf571336d45961 /src/crepe/api/EventHandler.h
parent9c1fb8b2253149d4a15a94b7ee576a0f9e791033 (diff)
nitpick #59
Diffstat (limited to 'src/crepe/api/EventHandler.h')
-rw-r--r--src/crepe/api/EventHandler.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/crepe/api/EventHandler.h b/src/crepe/api/EventHandler.h
index 7bdd9a3..7bb501b 100644
--- a/src/crepe/api/EventHandler.h
+++ b/src/crepe/api/EventHandler.h
@@ -8,12 +8,12 @@
namespace crepe {
/**
* \brief A type alias for an event handler function.
- *
- * The EventHandler is a std::function that takes an EventType reference and returns a boolean value
+ *
+ * The EventHandler is a std::function that takes an EventType reference and returns a boolean value
* 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>
@@ -22,7 +22,7 @@ using EventHandler = std::function<bool(const EventType & e)>;
/**
* \class IEventHandlerWrapper
* \brief An abstract base class for event handler wrappers.
- *
+ *
* This class provides the interface for handling events. Derived classes must implement the
* `call()` method to process events
*/
@@ -35,9 +35,9 @@ public:
/**
* \brief Executes the handler with the given event.
- *
+ *
* This method calls the `call()` method of the derived class, passing the event to the handler.
- *
+ *
* \param e The event to be processed.
* \return A boolean value indicating whether the event is handled.
*/
@@ -46,9 +46,9 @@ public:
private:
/**
* \brief The method responsible for handling the event.
- *
+ *
* This method is implemented by derived classes to process the event.
- *
+ *
* \param e The event to be processed.
* \return A boolean value indicating whether the event is handled.
*/
@@ -58,11 +58,11 @@ private:
/**
* \class EventHandlerWrapper
* \brief A wrapper for event handler functions.
- *
- * This class wraps an event handler function of a specific event type. It implements the
- * `call()` and `get_type()` methods to allow the handler to be executed and its type to be
+ *
+ * This class wraps an event handler function of a specific event type. It implements the
+ * `call()` and `get_type()` methods to allow the handler to be executed and its type to be
* queried.
- *
+ *
* \tparam EventType The type of event this handler will handle.
*/
template <typename EventType>
@@ -70,9 +70,9 @@ class EventHandlerWrapper : public IEventHandlerWrapper {
public:
/**
* \brief Constructs an EventHandlerWrapper with a given handler.
- *
+ *
* The constructor takes an event handler function and stores it in the wrapper.
- *
+ *
* \param handler The event handler function.
*/
explicit EventHandlerWrapper(const EventHandler<EventType> & handler);
@@ -80,9 +80,9 @@ public:
private:
/**
* \brief Calls the stored event handler with the event.
- *
+ *
* This method casts the event to the appropriate type and calls the handler.
- *
+ *
* \param e The event to be handled.
* \return A boolean value indicating whether the event is handled.
*/