From fd74cbce0fbf865a1fbcd448eb13f2a23a333f19 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Thu, 12 Oct 2006 13:21:46 -0400 Subject: [PATCH] Created an Event abstract class ~Tom --- src/Events/Event.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/Events/Event.h diff --git a/src/Events/Event.h b/src/Events/Event.h new file mode 100644 index 0000000..1d34c18 --- /dev/null +++ b/src/Events/Event.h @@ -0,0 +1,30 @@ +#ifndef __OpenArena_Event_h__ +#define __OpenArena_Event_h__ + +namespace OpenArena +{ + class Event + { + public: + enum EventType + { + InputEventType, + DrawEventType + }; + + class EventHandler + { + public: + virtual bool Handles(Event::EventType eventType) = 0; + virtual void HandleEvent(Event* event) = 0; +// virtual ~EventHandler(){}; + }; + + virtual EventType GetEventType() = 0; + + //remove this + Event(){}; + virtual ~Event(){}; + }; +}; +#endif //__OpenArena_Event_h__