Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: event class members defined

File size: 908 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
12class EventListener;
13template<class T> class tList;
14
15typedef enum elState
16  {
17    ES_GAME,
18    ES_GAME_MENU,
19    ES_MENU,
20
21    ES_NUMBER,
22  };
23
24
25//! The one Event Handler from Orxonox
26class EventHandler : public BaseObject {
27
28 public:
29  static EventHandler* getInstance(void);
30  virtual ~EventHandler(void);
31
32  void setState(elState state);
33
34  void subscribeListener(EventListener* el, elState state);
35  void unsubscribeListener(EventListener* el, elState state);
36  void flush();
37 
38  void loadKeyBindings(const char* fileName);
39
40  void tick(float t);
41
42 private:
43  EventHandler(void);
44  static EventHandler* singletonRef;
45
46  EventListener** listeners;                         //!< a list of registered listeners
47 
48};
49
50#endif /* _EVENT_HANDLER_H */
Note: See TracBrowser for help on using the repository browser.