Public Member Functions

gamepad::SourceDevice Class Reference
[Source Device Interface]

An object that supplies gamepad input. More...

#include <source-device.h>

Inheritance diagram for gamepad::SourceDevice:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~SourceDevice (void) throw ()
 interface destructors
virtual const char * getPublicName (void)=0 throw ()
 a "pretty" name, often the manufacturer and model, for instance.
virtual const char * getUniqueId (void)=0 throw ()
 each source device MUST supply a unique ID.
virtual eDeviceState getState (void)=0 throw ()
 returns the current state of the source device.
virtual int getNumPots (void)=0 throw ()
 the source must say how many pots (potentiometers) are exposed.
virtual int getNumButtons (void)=0 throw ()
 the source must say how many buttons are exposed.
virtual void poll (void)=0 throw ()
 the source will be asked to poll all of its inputs.
virtual const pot_value_tgetPotValue (IN int potIndex)=0
 retrieves the value of a particular potentiometer.
virtual eButton getButtonValue (IN int buttonIndex)=0
 retrieves the state of a particular button.

Detailed Description

An object that supplies gamepad input.

Often this is a USB device, for instance, that may support multiple different types of gamepads plugged in at once. Regardless of how many gamepads are plugged in, a SourceDevice is supposed to represent a physical or logical device (USB device or the bluetooth subsystem as respective examples) that supports polling independent of other SourceDevice objects.

Force feedback support is purposely limited for now. If you want rich force feedback support, you should probably work closer to the native drivers.

Definition at line 163 of file source-device.h.


Constructor & Destructor Documentation

gamepad::SourceDevice::~SourceDevice ( void   )  throw () [virtual]

interface destructors

Definition at line 41 of file source-device.cpp.


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