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

Phx::RawInputEngine::Client Class Reference

The Client interface that allows access to the state of buttons and axes reported by a corresponding Driver. More...

#include <PhxRawInputEngine.h>

Inheritance diagram for Phx::RawInputEngine::Client:

Phx::LockedPtrInterface< Client > List of all members.

Public Types

typedef RawInputEngine::ButtonIdentifier ButtonIdentifier
typedef RawInputEngine::AxisIdentifier AxisIdentifier
typedef RawInputEngine::ButtonState ButtonState
typedef RawInputEngine::AxisState AxisState

Public Member Functions

virtual void listener (Listener *listener)=0
 Sets the listener to be notified about changes to the axes and buttons.
virtual String buttonName (ButtonIdentifier button) const =0
 Retrieves the text name for the button set by the driver.
virtual ButtonState buttonState (ButtonIdentifier button) const =0
 Retrieves the current state of a button.
virtual ButtonState previousButtonState (ButtonIdentifier button) const =0
 Retrieves the previous state of the button.
virtual String axisName (AxisIdentifier axis) const =0
 Retrieves the text name for the axis set by the driver.
virtual AxisState axisState (AxisIdentifier axis) const =0
 Retrieves the current state of a axis.
virtual AxisState previousAxisState (AxisIdentifier axis) const =0
 Retrieves the previous state of the axis.
virtual std::vector< ButtonIdentifierbuttonIdentifiers (void) const =0
 Returns a list of all known button identifiers for this device.
virtual std::vector< AxisIdentifieraxisIdentifiers (void) const =0
 Returns a list of all known axis identifiers for this device.
const String & driverName () const
 Returns the name of this client's underlying Driver.

Protected Member Functions

void setDriverName (const String &driverName)

Classes

class  Listener
 A listener that can be notified of changes to the state of buttons or axes. More...

Detailed Description

The Client interface that allows access to the state of buttons and axes reported by a corresponding Driver.

The RawInputEngine keeps track of Driver interfaces that deposit the current state of raw input devices into the system. The Client interface provides access to this data.


Member Function Documentation

virtual std::vector<AxisIdentifier> Phx::RawInputEngine::Client::axisIdentifiers void   )  const [pure virtual]
 

Returns a list of all known axis identifiers for this device.

Returns:
A vector containing all of the identifiers for axes that were mentioned by the driver before the time of this call.

virtual String Phx::RawInputEngine::Client::axisName AxisIdentifier  axis  )  const [pure virtual]
 

Retrieves the text name for the axis set by the driver.

Parameters:
axis The axis whose name should be returned.
Returns:
The name of the axis as set by the driver, which is "" by default (i.e., if the driver did not set a name).

virtual AxisState Phx::RawInputEngine::Client::axisState AxisIdentifier  axis  )  const [pure virtual]
 

Retrieves the current state of a axis.

Parameters:
axis The identifier of the axis whose state should be returned.
Returns:
The state of the axis whose identifier is given.

virtual std::vector<ButtonIdentifier> Phx::RawInputEngine::Client::buttonIdentifiers void   )  const [pure virtual]
 

Returns a list of all known button identifiers for this device.

Returns:
A vector containing all of the identifiers for buttons that were mentioned by the driver before the time of this call.

virtual String Phx::RawInputEngine::Client::buttonName ButtonIdentifier  button  )  const [pure virtual]
 

Retrieves the text name for the button set by the driver.

Parameters:
button The button whose name should be returned.
Returns:
The name of the button as set by the driver, which is "" by default (i.e., if the driver did not set a name).

virtual ButtonState Phx::RawInputEngine::Client::buttonState ButtonIdentifier  button  )  const [pure virtual]
 

Retrieves the current state of a button.

Parameters:
button The identifier of the button whose state should be returned.
Returns:
The state of the button whose identifier is given.

const String& Phx::RawInputEngine::Client::driverName  )  const [inline]
 

Returns the name of this client's underlying Driver.

Returns:
The name of the underlying driver, as passed to RawInputEngine::newClient().

virtual void Phx::RawInputEngine::Client::listener Listener listener  )  [pure virtual]
 

Sets the listener to be notified about changes to the axes and buttons.

Parameters:
listener The listener to be notified of events.

virtual AxisState Phx::RawInputEngine::Client::previousAxisState AxisIdentifier  axis  )  const [pure virtual]
 

Retrieves the previous state of the axis.

This is the state of the axis as it was presented during the last frame.

Parameters:
axis The identifier of the axis whose previous state should be returned.
Returns:
The state of the axis whose identifier is given, as it was reported last frame.

virtual ButtonState Phx::RawInputEngine::Client::previousButtonState ButtonIdentifier  button  )  const [pure virtual]
 

Retrieves the previous state of the button.

This is the state of the button as it was presented during the last frame.

Parameters:
button The identifier of the button whose previous state should be returned.
Returns:
The state of the button whose identifier is given, as it was reported last frame.


The documentation for this class was generated from the following file:
Generated on Wed Dec 21 22:05:38 2005 for Phoenix OSFS by  doxygen 1.4.2