Homepage Demos Overview Downloads Tutorials Reference
Credits

ButtonEvent Class Reference

#include <ButtonEvent.h>

Inheritance diagram for ButtonEvent:

Inheritance graph
[legend]
List of all members.

Detailed Description

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)

Definition at line 8 of file ButtonEvent.h.

Public Member Functions

virtual std::string getDescription (bool showTypeSpecific=true, unsigned int verbosity=0) const
 generates a description of the event with variable verbosity
Constructors/Destructors
 ButtonEvent ()
 constructor
 ButtonEvent (unsigned int sid, EventTypeID_t tid, unsigned int dur, float mag)
 constructor
virtual ~ButtonEvent ()
 destructor
LoadSave interface
Useful for serializing events to send between processes

virtual unsigned int getBinSize () const
 calculates space needed to save - if you can't precisely add up the size, overestimate and things will still work.
virtual unsigned int LoadBuffer (const char buf[], unsigned int len)
 Load from a saved buffer.
virtual unsigned int SaveBuffer (char buf[], unsigned int len) const
 Save to a given buffer.

Protected Member Functions

virtual void genName ()
 This does the actual generation of names based on genID, sourceID, and typeID.


Constructor & Destructor Documentation

ButtonEvent::ButtonEvent  )  [inline]
 

constructor

See also:
EventRouter::postEvent()

Definition at line 13 of file ButtonEvent.h.

ButtonEvent::ButtonEvent unsigned int  sid,
EventTypeID_t  tid,
unsigned int  dur,
float  mag
[inline]
 

constructor

See also:
EventRouter::postEvent()

Definition at line 14 of file ButtonEvent.h.

virtual ButtonEvent::~ButtonEvent  )  [inline, virtual]
 

destructor

Definition at line 15 of file ButtonEvent.h.


Member Function Documentation

void ButtonEvent::genName  )  [protected, virtual]
 

This does the actual generation of names based on genID, sourceID, and typeID.

Reimplemented from EventBase.

Definition at line 59 of file ButtonEvent.cc.

unsigned int ButtonEvent::getBinSize  )  const [virtual]
 

calculates space needed to save - if you can't precisely add up the size, overestimate and things will still work.

Returns:
number of bytes read/written, 0 if error (or empty)

Reimplemented from EventBase.

Definition at line 29 of file ButtonEvent.cc.

std::string ButtonEvent::getDescription bool  showTypeSpecific = true,
unsigned int  verbosity = 0
const [virtual]
 

generates a description of the event with variable verbosity

Parameters:
showTypeSpecific will signal subclasses to add additional information
verbosity can be one of the following values:
  • 0 - the name and type
  • 1 - the name, type, duration, and timestamp
  • 2 and above - the name, type, duration, and magnitude if showTypeSpecific, additional fields will be added after the common fields listed above.

Reimplemented from EventBase.

Definition at line 5 of file ButtonEvent.cc.

unsigned int ButtonEvent::LoadBuffer const char  buf[],
unsigned int  len
[virtual]
 

Load from a saved buffer.

Parameters:
buf pointer to the memory where you should begin loading
len length of buf available (this isn't all yours, might be more stuff saved after yours)
Returns:
the number of bytes actually used

Reimplemented from EventBase.

Definition at line 37 of file ButtonEvent.cc.

unsigned int ButtonEvent::SaveBuffer char  buf[],
unsigned int  len
const [virtual]
 

Save to a given buffer.

Parameters:
buf pointer to the memory where you should begin writing
len length of buf available. (this isn't all yours, constrain yourself to what you returned in getBinSize() )
Returns:
the number of bytes actually used

Reimplemented from EventBase.

Definition at line 48 of file ButtonEvent.cc.


The documentation for this class was generated from the following files:

Tekkotsu v2.2
Generated Tue Oct 19 14:20:15 2004 by Doxygen 1.3.9.1