Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/event/event_listener.h

Last change on this file was 9876, checked in by bensch, 18 years ago

compiles better on Windows

File size: 795 bytes
Line 
1/*!
2 * @file event_listener.h
3 *  Definition of an event listener base class
4*/
5
6#ifndef _EVENT_LISTENER_H
7#define _EVENT_LISTENER_H
8
9#include "base_object.h"
10#include "event_def.h"
11#include "event.h"
12
13//! A class for event listener
14class EventListener : virtual public BaseObject
15{
16  ObjectListDeclaration(EventListener);
17public:
18  EventListener();
19  virtual ~EventListener();
20
21  bool isEventSubscribed(elState state, int eventType) const;
22
23  void subscribeEvent(elState state, int eventType);
24  void unsubscribeEvent(elState state, int eventType);
25  void unsubscribeEvents(elState state = ES_ALL);
26
27  /**
28   * @brief abstract function that processes events from the handler
29   * @param event: the event
30   */
31  virtual void process(const Event &event) = 0;
32
33};
34
35#endif /* _EVENT_LISTENER_H */
Note: See TracBrowser for help on using the repository browser.