Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 9869 was 9869, checked in by bensch, 17 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

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.h"
11#include "event_def.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.