OIS::LinuxJoyStick Class Reference

#include <LinuxJoyStick.h>

Inheritance diagram for OIS::LinuxJoyStick:
[legend]
Collaboration diagram for OIS::LinuxJoyStick:
[legend]

List of all members.

Public Member Functions

 LinuxJoyStick (bool buffered, const JoyStickInfo &js)
virtual ~LinuxJoyStick ()
virtual void setBuffered (bool buffered)
virtual void capture ()
virtual InterfacequeryInterface (Interface::IType)
virtual void setEventCallback (JoyStickListener *joyListener)
virtual void _initialize ()
JoyStickInfo _getJoyInfo ()
 LinuxJoyStick (bool buffered, const JoyStickInfo &js)
virtual ~LinuxJoyStick ()
virtual void setBuffered (bool buffered)
virtual void capture ()
virtual InterfacequeryInterface (Interface::IType type)
virtual void _initialize ()
JoyStickInfo _getJoyInfo ()

Static Public Member Functions

static JoyStickInfoList _scanJoys ()
static void _clearJoys (JoyStickInfoList &joys)
static JoyStickInfoList _scanJoys ()
static void _clearJoys (JoyStickInfoList &joys)

Protected Attributes

int mJoyStick
LinuxForceFeedbackff_effect
std::map< int, int > mButtonMap
std::map< int, int > mAxisMap
std::map< int, RangemRanges


Detailed Description

Linux specialization of JoyStick class.. This one however, does not include force feedback support.. Do *NOT* "--disable-joyevents" during configure to build the other FF enabled JoyStick class instead

Linux specialization of JoyStick class.. This version is favored over the other.. and has the possibility* of Force Feedback.. notice I say possibility, i make no gaurantees under linux, as FF support is sketchy at best AFAIK.

Definition at line 44 of file LinuxJoyStick.h.


Constructor & Destructor Documentation

LinuxJoyStick::LinuxJoyStick ( bool  buffered,
const JoyStickInfo js 
)

Definition at line 50 of file LinuxJoyStickEvents.cpp.

References OIS::JoyStickInfo::axes, OIS::JoyStickInfo::axis_map, OIS::JoyStickInfo::axis_range, OIS::JoyStickInfo::button_map, OIS::JoyStickInfo::buttons, OIS::JoyStickInfo::devId, ff_effect, OIS::JoyStickInfo::hats, OIS::JoyStickInfo::joyFileD, mAxisMap, OIS::Object::mBuffered, mButtonMap, OIS::Object::mDevID, mJoyStick, mRanges, OIS::Object::mType, OIS::Object::mVendor, OIS::JoyStick::numAxes, OIS::JoyStick::numButtons, OIS::JoyStick::numHats, OISJoyStick, and OIS::JoyStickInfo::vendor.

LinuxJoyStick::~LinuxJoyStick (  )  [virtual]

Definition at line 69 of file LinuxJoyStickEvents.cpp.

References ff_effect, and OIS::EventUtils::removeForceFeedback().

OIS::LinuxJoyStick::LinuxJoyStick ( bool  buffered,
const JoyStickInfo js 
)

virtual OIS::LinuxJoyStick::~LinuxJoyStick (  )  [virtual]


Member Function Documentation

void LinuxJoyStick::setBuffered ( bool  buffered  )  [virtual]

Remarks:
Sets buffered mode

Implements OIS::Object.

Definition at line 208 of file LinuxJoyStickEvents.cpp.

References _initialize(), and OIS::Object::mBuffered.

void LinuxJoyStick::capture (  )  [virtual]

Remarks:
Used for updating call once per frame before checking state or to update events

Implements OIS::Object.

Definition at line 89 of file LinuxJoyStickEvents.cpp.

References OIS::JoyStickListener::axisMoved(), OIS::JoyStickListener::buttonPressed(), OIS::JoyStickListener::buttonReleased(), OIS::JoyStickState::buttons, OIS::Pov::direction, OIS::Pov::East, JOY_BUFFERSIZE, OIS::JoyStick::listener, OIS::JoyStick::MAX_AXIS, OIS::JoyStickState::mAxes, mAxisMap, OIS::Object::mBuffered, mButtonMap, OIS::JoyStick::MIN_AXIS, mJoyStick, OIS::JoyStickState::mPOV, mRanges, OIS::JoyStick::mState, OIS::Pov::North, OIS::JoyStickListener::povMoved(), OIS::Pov::South, OIS::Object::type(), and OIS::Pov::West.

Interface * LinuxJoyStick::queryInterface ( Interface::IType  type  )  [inline, virtual]

Remarks:
If available, get an interface to write to some devices. Examples include, turning on and off LEDs, ForceFeedback, etc
Parameters:
type The type of interface you are looking for

Implements OIS::Object.

Definition at line 57 of file LinuxJoyStick.h.

virtual void OIS::LinuxJoyStick::setEventCallback ( JoyStickListener joyListener  )  [inline, virtual]

Remarks:
Register/unregister a JoyStick Listener - Only one allowed for simplicity. If broadcasting is neccessary, just broadcast from the callback you registered.
Parameters:
joyListener Send a pointer to a class derived from JoyStickListener or 0 to clear the callback

Reimplemented from OIS::JoyStick.

Definition at line 60 of file LinuxJoyStick.h.

References OIS::JoyStick::listener.

void LinuxJoyStick::_initialize (  )  [virtual]

Remarks:
Internal... Do not call this directly.

Implements OIS::Object.

Definition at line 75 of file LinuxJoyStickEvents.cpp.

References OIS::JoyStickState::clear(), E_InputDeviceNonExistant, OIS::EventUtils::enumerateForceFeedback(), ff_effect, OIS::JoyStickState::mAxes, mAxisMap, mJoyStick, OIS::JoyStick::mState, and OIS_EXCEPT.

Referenced by setBuffered().

JoyStickInfo LinuxJoyStick::_getJoyInfo (  ) 

Remarks:
For internal use only... Returns a strucure to the manager, to make the device availiable for use again

Definition at line 218 of file LinuxJoyStickEvents.cpp.

References OIS::JoyStickInfo::axes, OIS::JoyStickInfo::axis_map, OIS::JoyStickInfo::axis_range, OIS::JoyStickInfo::button_map, OIS::JoyStickInfo::buttons, OIS::JoyStickInfo::devId, OIS::JoyStickInfo::hats, OIS::JoyStickInfo::joyFileD, mAxisMap, mButtonMap, OIS::Object::mDevID, mJoyStick, mRanges, OIS::Object::mVendor, OIS::JoyStick::numAxes, OIS::JoyStick::numButtons, OIS::JoyStick::numHats, and OIS::JoyStickInfo::vendor.

JoyStickInfoList LinuxJoyStick::_scanJoys (  )  [static]

Definition at line 236 of file LinuxJoyStickEvents.cpp.

References OIS::EventUtils::isJoyStick().

Referenced by OIS::LinuxInputManager::_enumerateDevices().

void LinuxJoyStick::_clearJoys ( JoyStickInfoList joys  )  [static]

Definition at line 281 of file LinuxJoyStickEvents.cpp.

Referenced by OIS::LinuxInputManager::~LinuxInputManager().

virtual void OIS::LinuxJoyStick::setBuffered ( bool  buffered  )  [virtual]

Remarks:
Sets buffered mode

Implements OIS::Object.

virtual void OIS::LinuxJoyStick::capture (  )  [virtual]

Remarks:
Used for updating call once per frame before checking state or to update events

Implements OIS::Object.

virtual Interface* OIS::LinuxJoyStick::queryInterface ( Interface::IType  type  )  [virtual]

Remarks:
If available, get an interface to write to some devices. Examples include, turning on and off LEDs, ForceFeedback, etc
Parameters:
type The type of interface you are looking for

Implements OIS::Object.

virtual void OIS::LinuxJoyStick::_initialize (  )  [virtual]

Remarks:
Internal... Do not call this directly.

Implements OIS::Object.

JoyStickInfo OIS::LinuxJoyStick::_getJoyInfo (  ) 

Remarks:
For internal use only... Returns a structure to the manager, to make the device availiable for use again

static JoyStickInfoList OIS::LinuxJoyStick::_scanJoys (  )  [static]

static void OIS::LinuxJoyStick::_clearJoys ( JoyStickInfoList joys  )  [static]


Member Data Documentation

int OIS::LinuxJoyStick::mJoyStick [protected]

Definition at line 76 of file LinuxJoyStick.h.

Referenced by _getJoyInfo(), _initialize(), capture(), and LinuxJoyStick().

LinuxForceFeedback* OIS::LinuxJoyStick::ff_effect [protected]

Definition at line 66 of file LinuxJoyStickEvents.h.

Referenced by _initialize(), LinuxJoyStick(), and ~LinuxJoyStick().

std::map<int, int> OIS::LinuxJoyStick::mButtonMap [protected]

Definition at line 67 of file LinuxJoyStickEvents.h.

Referenced by _getJoyInfo(), capture(), and LinuxJoyStick().

std::map<int, int> OIS::LinuxJoyStick::mAxisMap [protected]

Definition at line 68 of file LinuxJoyStickEvents.h.

Referenced by _getJoyInfo(), _initialize(), capture(), and LinuxJoyStick().

std::map<int, Range> OIS::LinuxJoyStick::mRanges [protected]

Definition at line 69 of file LinuxJoyStickEvents.h.

Referenced by _getJoyInfo(), capture(), and LinuxJoyStick().


The documentation for this class was generated from the following files:
Generated on Sat Dec 1 20:13:54 2007 for OIS by  doxygen 1.5.4