summaryrefslogtreecommitdiff
path: root/src/core/managed/Events.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/managed/Events.hpp')
-rw-r--r--src/core/managed/Events.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/managed/Events.hpp b/src/core/managed/Events.hpp
index 177824c..768f0aa 100644
--- a/src/core/managed/Events.hpp
+++ b/src/core/managed/Events.hpp
@@ -173,6 +173,18 @@ struct EventHandlerDescriptor {
: type(type), handler(handler), owner(owner), data(data)
{
}
+
+ /**
+ * Returns a human readable name of the given event type.
+ */
+ static const char *getEventTypeName(EventType type);
+
+ /**
+ * Returns the name of the current event type.
+ */
+ const char *getEventTypeName() const {
+ return getEventTypeName(this->type);
+ }
};
}