Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/util/event/event_handler.h @ 4407

Last change on this file since 4407 was 4407, checked in by patrick, 19 years ago

orxonox/trunk: event management now runs with new event-handler: no chance to kill current game without killall…

File size: 893 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 "key_mapper.h"
12#include "event_def.h"
13
14class EventListener;
15
16
17//! The one Event Handler from Orxonox
18class EventHandler : public BaseObject {
19
20 public:
21  static EventHandler* getInstance(void);
22  virtual ~EventHandler(void);
23
24  void init();
25
26  void setState(elState state);
27
28  void subscribe(EventListener* el, elState state, int eventType);
29  void unsubscribe(int eventType, elState state);
30  void flush(elState state);
31
32  void tick(float t);
33  void process();
34
35  void test();
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  KeyMapper* keyMapper;
46};
47
48#endif /* _EVENT_HANDLER_H */
Note: See TracBrowser for help on using the repository browser.