blip  0.1
Event.hpp
Go to the documentation of this file.
1 #ifndef __blip_Event_hpp
2 #define __blip_Event_hpp
3 
4 #include <blip/Blip.hpp>
5 
6 namespace blip {
7 
12 class Event
13 {
14  public:
15 
17  enum Type { Type_Key ,
21 
23  virtual ~Event();
24 
26  inline Type getType() const
27  { return(_type); }
28 
30  virtual time_ms_t getEventTime() const = 0;
31 
32  protected:
33 
35  Event(Type type);
36 
37  private:
38 
39  Type _type;
40 };
41 
42 } // namespace blip
43 
44 #endif // __blip_Event_hpp
Event(Type type)
Constructor.
Definition: Event.cpp:8
An abstract base class for all application events.
Definition: Event.hpp:12
Timer events.
Definition: Event.hpp:20
Key input events.
Definition: Event.hpp:17
Sensor events.
Definition: Event.hpp:19
Type
Event types.
Definition: Event.hpp:17
WAV file format details at: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/.
Definition: AccelerometerSensorEvent.cpp:3
Motion input events.
Definition: Event.hpp:18
virtual ~Event()
Destructor.
Definition: Event.cpp:16
Type getType() const
Get the event type.
Definition: Event.hpp:26
virtual time_ms_t getEventTime() const =0
Get the time at which this event occurred.