Homepage Demos Overview Downloads Tutorials Reference
Credits

ButtonEvent.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_ButtonEvent_h_
00003 #define INCLUDED_ButtonEvent_h_
00004 
00005 #include "EventBase.h"
00006 
00007 //! redefines getName and getDescription to use the button names instead of numerical source IDs (doesn't define any new data members - magnitude is used for pressure sensitive buttons)
00008 class ButtonEvent : public EventBase {
00009 public:
00010   /*! @name Constructors/Destructors */
00011   //! constructor
00012   /*! @see EventRouter::postEvent() */
00013   ButtonEvent() : EventBase() {}
00014   ButtonEvent(unsigned int sid, EventTypeID_t tid, unsigned int dur, float mag) : EventBase(buttonEGID,sid,tid) { setDuration(dur); setMagnitude(mag); }
00015   virtual ~ButtonEvent() {} //!< destructor
00016   //@}
00017   
00018   virtual std::string getDescription(bool showTypeSpecific=true, unsigned int verbosity=0) const; 
00019 
00020   //! Useful for serializing events to send between processes
00021   /*! @name LoadSave interface */
00022   virtual unsigned int getBinSize() const;
00023   virtual unsigned int LoadBuffer(const char buf[], unsigned int len);
00024   virtual unsigned int SaveBuffer(char buf[], unsigned int len) const;
00025   //@}
00026 protected:
00027   virtual void genName();
00028 };
00029 
00030 /*! @file
00031  * @brief Describes ButtonEvent, redefines getName and getDescription to use the button names instead of numerical source IDs
00032  * @author ejt (Creator)
00033  *
00034  * $Author: ejt $
00035  * $Name: tekkotsu-2_2_1 $
00036  * $Revision: 1.1 $
00037  * $State: Exp $
00038  * $Date: 2004/09/16 20:39:53 $
00039  */
00040 
00041 #endif

Tekkotsu v2.2.1
Generated Tue Nov 23 16:36:37 2004 by Doxygen 1.3.9.1