Last change
on this file since 4386 was
4386,
checked in by patrick, 19 years ago
|
orxonox/trunk: key mapper implementation precess
|
File size:
835 bytes
|
Line | |
---|
1 | /*! |
---|
2 | \file event_handler.h |
---|
3 | \brief Definition of the EventHandler |
---|
4 | |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef _EVENT_HANDLER_H |
---|
8 | #define _EVENT_HANDLER_H |
---|
9 | |
---|
10 | #include "base_object.h" |
---|
11 | #include "event_def.h" |
---|
12 | |
---|
13 | class EventListener; |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | |
---|
21 | //! The one Event Handler from Orxonox |
---|
22 | class EventHandler : public BaseObject { |
---|
23 | |
---|
24 | public: |
---|
25 | static EventHandler* getInstance(void); |
---|
26 | virtual ~EventHandler(void); |
---|
27 | |
---|
28 | void setState(elState state); |
---|
29 | |
---|
30 | void subscribeListener(EventListener* el, elState state, int eventType); |
---|
31 | void unsubscribeListener(int eventType, elState state); |
---|
32 | void flush(elState state); |
---|
33 | |
---|
34 | void tick(float t); |
---|
35 | void process(); |
---|
36 | |
---|
37 | private: |
---|
38 | EventHandler(void); |
---|
39 | |
---|
40 | |
---|
41 | private: |
---|
42 | static EventHandler* singletonRef; |
---|
43 | EventListener*** listeners; //!< a list of registered listeners |
---|
44 | elState state; |
---|
45 | |
---|
46 | }; |
---|
47 | |
---|
48 | #endif /* _EVENT_HANDLER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.