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

Phx::RawInputEngine Class Reference

RawInputEngine is the engine that manages raw user input for the simulator. More...

#include <PhxRawInputEngine.h>

Inheritance diagram for Phx::RawInputEngine:

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

Public Types

typedef uint32_t AxisState
 A value type for the position of analog axes.
typedef ValueType< AxisIdentifierClass,
uint32_t > 
AxisIdentifier
 A value type used to identify raw analog axes.
typedef ValueType< ButtonIdentifierClass,
uint32_t > 
ButtonIdentifier
 A value type used to identify raw buttons.
typedef ValueType< ButtonStateClass,
uint32_t > 
ButtonState
 A value type for the state of digital buttons.

Public Member Functions

virtual Ptr< DrivernewDriver (const String &driverName)=0
 Constructs a new Driver interface with the requested name.
virtual Ptr< ClientnewClient (const String &driverName)=0
 Constructs a new Client interface that provides access to the button/axis state from the Driver of the given name.
virtual std::vector< String > driverNames (void) const =0
 Returns a list of names of all known drivers.
virtual void listener (Listener *listener)=0
 Sets a listener to be notified of events involving the RawInputEngine.

Static Public Attributes

static const NamedInterface::Type INTERFACE_TYPE
static const String INTERFACE_TYPE_NAME
static const NamedInterface::Identifier RAW_INPUT_ENGINE_IDENTIFIER
static const String RAW_INPUT_ENGINE_NAME
static const AxisIdentifier INVALID_AXIS_IDENTIFIER
 An AxisIdentifier value that represents an invalid identifier.
static const ButtonIdentifier INVALID_BUTTON_IDENTIFIER
 A ButtonIdentifier value that represents an invalid identifier.
static const ButtonState PRESSED
 A standard value for the "pressed" state of a 2-state button.
static const ButtonState RELEASED
 A standard value for the "released" state of a 2-state button.

Classes

class  Client
 The Client interface that allows access to the state of buttons and axes reported by a corresponding Driver. More...
class  Driver
 The driver interface through which device drivers deposit the current device state to be read by clients. More...
class  Listener
 Listener that receives notifications when a driver is created or deleted. More...

Detailed Description

RawInputEngine is the engine that manages raw user input for the simulator.

This layer is responsible for managing raw input from devices like mice, keyboards, and joysticks. This interface provides two sub-interfaces -- a client and a driver. A new driver interface can be constructed to represent a new device in the raw input layer. The device driver code then sets the current device state in this interface. The state that is set in the driver interface will be mirrored to attached client interfaces.


Member Function Documentation

virtual std::vector<String> Phx::RawInputEngine::driverNames void   )  const [pure virtual]
 

Returns a list of names of all known drivers.

Note:
This method is safely accessible from multiple clients.
Returns:
A list of the known driver names at the time of the call.

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

Sets a listener to be notified of events involving the RawInputEngine.

Parameters:
listener The listener to be notified when drivers are created and deleted.

virtual Ptr<Client> Phx::RawInputEngine::newClient const String &  driverName  )  [pure virtual]
 

Constructs a new Client interface that provides access to the button/axis state from the Driver of the given name.

If no corresponding driver exists, the client will still be created, but the driver will not have any axes or buttons registered. If a Driver is later created with the same name, it will automatically begin supplying data.

Parameters:
driverName The name of the Driver providing the input data.

virtual Ptr<Driver> Phx::RawInputEngine::newDriver const String &  driverName  )  [pure virtual]
 

Constructs a new Driver interface with the requested name.

Parameters:
driverName The name of the driver being created. This is usually something to indicate what device is being exposed or the mechanism by which it is being accessed, if the device name itself cannot be determined (e.g., "TM Cougar", or "SDL Joystick").
Returns:
A pointer to a new Driver sub-interface.
Exceptions:
InUseException thrown if driverName is being used by another Driver.


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