diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-04 01:54:54 +0100 |
---|---|---|
committer | Andreas Stöckel <andreas@somweyr.de> | 2015-01-04 01:54:54 +0100 |
commit | b66dc3f5f5b4fe25069c30080ed83e47d4eda79d (patch) | |
tree | cf5c41ed513a30799ff52f96e302b0df733e9962 /src/core/managed/Events.hpp | |
parent | 5096dc30222e346de5d78b02214b623db7ca8c52 (diff) |
Allowing to return human readable name of an event
Diffstat (limited to 'src/core/managed/Events.hpp')
-rw-r--r-- | src/core/managed/Events.hpp | 12 |
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); + } }; } |