Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 4404 was 4388, checked in by patrick, 20 years ago

orxonox/trunk: running first pre-tests with key-mapping

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