Homepage Demos Overview Downloads Tutorials Reference
Credits
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Search

EventTrapper.h

Go to the documentation of this file.
00001 #ifndef INCLUDED_EventTrapper_h
00002 #define INCLUDED_EventTrapper_h
00003 
00004 #include "EventBase.h"
00005 
00006 //! An interface to allow a standard method of trapping events
00007 /*! Trappers get first dibs on events and can prevent the event from being sent any further\n
00008  *  This is handy in situations where an event is more than a notification, and must be "handled" - 
00009  *  the trapper which handles it returns true, otherwise it is passed to the next one\n
00010  *  A trapper can filter any and all events, EXCEPT timers.  This *could* be changed, if a good
00011  *  reason is presented. */
00012 class EventTrapper {
00013  public:
00014   //! destructor
00015   virtual ~EventTrapper() {}
00016 
00017   //! for receiving events - you must override this to inherit
00018   /*! @see EventRouter
00019    *  @param event the event being received
00020    *  @return @c true if the event was trapped (shouldn't be sent to listeners), @c false otherwise*/
00021   virtual bool trapEvent(const EventBase& event)=0;
00022 };
00023 
00024 /*! @file
00025  * @brief Defines EventTrapper class, an interface for anything that wants to trap events
00026  * @author ejt (Creator)
00027  *
00028  * $Author: alokl $
00029  * $Name: tekkotsu-1_4_1 $
00030  * $Revision: 1.1.1.1 $
00031  * $State: Exp $
00032  * $Date: 2002/09/30 18:19:47 $
00033  */
00034 
00035 #endif

Tekkotsu v1.4
Generated Sat Jul 19 00:06:30 2003 by Doxygen 1.3.2