Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Phx::LogicalInputEngine::DigitalButtonDriver Class Reference

A LogicalInputEngine driver that triggers a logical button when a set of raw buttons enter specified states. More...

#include <PhxLogicalInputEngine.h>

Inheritance diagram for Phx::LogicalInputEngine::DigitalButtonDriver:

Phx::LogicalInputEngine::ButtonDriver Phx::LockedPtrInterface< ButtonDriver > List of all members.

Public Member Functions

virtual void buttons (const std::vector< ButtonSpecState > &buttons)=0
 Sets the sequence of buttons that must be pressed in order for the logical button to be pressed.
virtual std::vector< ButtonSpecStatebuttons (void) const =0
 Returns the buttons that must be pressed in order for the logical button to be pressed.

Detailed Description

A LogicalInputEngine driver that triggers a logical button when a set of raw buttons enter specified states.

Specifically: The logical button supported by this driver is considered PRESSED if the last button in the sequence transitions into the "trigger state" (as specified by the ButtonSpecState in buttons()) and all of the buttons preceding it in the sequence are currently in their respective trigger states. The logical button will remain PRESSED until the last button in the sequence exits its trigger state (regardless of the state of the other keys).

If the buttons() collection is empty, the logical button is always in the RELEASED state.


Member Function Documentation

virtual std::vector<ButtonSpecState> Phx::LogicalInputEngine::DigitalButtonDriver::buttons void   )  const [pure virtual]
 

Returns the buttons that must be pressed in order for the logical button to be pressed.

Returns:
The vector of buttons, as set in buttons(const std::vector<ButtonSpecState>&). Returns an empty vector if none has been set.

virtual void Phx::LogicalInputEngine::DigitalButtonDriver::buttons const std::vector< ButtonSpecState > &  buttons  )  [pure virtual]
 

Sets the sequence of buttons that must be pressed in order for the logical button to be pressed.

The logical button is triggered when the last button in the buttons() sequence is pressed while all of the previous buttons are currently held. It is relased when the last button is released.

Parameters:
buttons A vector of ButtonSpecState values that specifies the button states, for buttons in the RawInputEngine, that must be acheived in order for the logical button to be triggered. Passing an empty vector will essentially clear this attribute, causing the button to always report the RELEASED state.


The documentation for this class was generated from the following file:
Generated on Mon Jul 10 19:45:30 2006 for Phoenix OSFS by  doxygen 1.4.2