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, 18 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
RevLine 
[5143]1/*!
[5039]2 * @file event_listener.h
[5239]3 *  Definition of an event listener base class
[4329]4*/
5
[4346]6#ifndef _EVENT_LISTENER_H
7#define _EVENT_LISTENER_H
[4329]8
9#include "base_object.h"
[4365]10#include "event.h"
[7868]11#include "event_def.h"
[4329]12
[4346]13//! A class for event listener
[9869]14class EventListener : virtual public BaseObject
15{
16  ObjectListDeclaration(EventListener);
17public:
[4346]18  EventListener();
19  virtual ~EventListener();
[4329]20
[7868]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
[4454]27  /**
[7868]28   * @brief abstract function that processes events from the handler
[4836]29   * @param event: the event
[5291]30   */
[5279]31  virtual void process(const Event &event) = 0;
[7868]32
[4329]33};
34
[4346]35#endif /* _EVENT_LISTENER_H */
Note: See TracBrowser for help on using the repository browser.