aboutsummaryrefslogtreecommitdiff
path: root/include/cru/base/Event.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/base/Event.h')
-rw-r--r--include/cru/base/Event.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/cru/base/Event.h b/include/cru/base/Event.h
index bdaf3ea6..71c0ac6b 100644
--- a/include/cru/base/Event.h
+++ b/include/cru/base/Event.h
@@ -141,6 +141,13 @@ class Event : public EventBase, public IEvent<TEventArgs> {
public: \
::cru::IEvent<arg_type>* name##Event() { return &name##Event_; }
+#define CRU_DEFINE_EVENT_OVERRIDE(name, arg_type) \
+ private: \
+ ::cru::Event<arg_type> name##Event_; \
+ \
+ public: \
+ ::cru::IEvent<arg_type>* name##Event() override { return &name##Event_; }
+
namespace details {
struct EventHandlerRevokerCaller {
void operator()(const EventHandlerRevoker& revoker) { revoker(); }