Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
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: ejt $ 00029 * $Name: tekkotsu-2_0 $ 00030 * $Revision: 1.2 $ 00031 * $State: Rel $ 00032 * $Date: 2003/09/25 15:27:10 $ 00033 */ 00034 00035 #endif
Tekkotsu v2.0 |
Generated Wed Jan 21 03:20:28 2004 by Doxygen 1.3.4 |