Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: event_handler subscribe functionality improved

File size: 854 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 setState(elState state);
25
26  void subscribe(EventListener* el, elState state, int eventType);
27  void unsubscribe(int eventType, elState state);
28  void flush(elState state);
29
30  void tick(float t);
31  void process();
32
33  void test();
34
35 private:
36  EventHandler(void);
37 
38
39 private:
40  static EventHandler* singletonRef;
41  EventListener*** listeners;                         //!< a list of registered listeners
42  elState state;
43
44};
45
46#endif /* _EVENT_HANDLER_H */
Note: See TracBrowser for help on using the repository browser.