a type of gamepad (Dualshock, Xbox, N64, etc) More...
#include <gamepad-type.h>
Public Member Functions | |
virtual | ~Type (void) throw () |
virtual const char * | getId (void) const =0 throw () |
returns the ID of this type. This should be a UUID | |
virtual const char * | getName (void) const =0 throw () |
returns the name of this type of gamepad. | |
virtual int | getInputCount (IN eInputType type) const =0 throw () |
given a type of input (button, joystick, etc. | |
virtual const char * | getLogicalName (IN eInputType type, IN int idx) const =0 throw () |
given the index of a particular input, returns the logical name. | |
virtual void | getAllInputs (OUT VecString &logicalNames) const =0 |
returns all known logical inputs on the gamepad, regardless of type | |
virtual eInputType | getInputTypes (IN const char *logicalName) const =0 throw () |
given a logical name for an input object on the gamepad, returns all of the types (eInputType values OR'd together). | |
virtual int | getLogicalIndex (IN const char *logicalName, IN eInputType type)=0 throw () |
given a logical name and input type, return index for that type. | |
virtual const char * | getMainButton (void) const =0 throw () |
get the logical name for the most commonly used button | |
virtual smart_ptr < nstream::Stream > | getVgfx (void)=0 |
get the vector graphics (vgfx) request that describes this controller. | |
virtual void | dump (void) const =0 throw () |
debugging only: dump type information to stdout |
a type of gamepad (Dualshock, Xbox, N64, etc)
Definition at line 63 of file gamepad-type.h.
gamepad::Type::~Type | ( | void | ) | throw () [virtual] |
Definition at line 48 of file gamepad-type.cpp.
virtual const char* gamepad::Type::getId | ( | void | ) | const throw () [pure virtual] |
returns the ID of this type. This should be a UUID
virtual const char* gamepad::Type::getName | ( | void | ) | const throw () [pure virtual] |
returns the name of this type of gamepad.
This is usually a string such as "XBox 360" or "Playstation 3" or "Nintendo 64", etc. The string is intended for internal use only (so it is stable across locales, but therefore not appropriate for display).
virtual int gamepad::Type::getInputCount | ( | IN eInputType | type | ) | const throw () [pure virtual] |
given a type of input (button, joystick, etc.
) this returns the number of such inputs available on this type of gamepad.
virtual const char* gamepad::Type::getLogicalName | ( | IN eInputType | type, | |
IN int | idx | |||
) | const throw () [pure virtual] |
given the index of a particular input, returns the logical name.
Returns NULL in some cases (no such type, etc.). Program will crash (with error) if you pass in a bad index, so call Type::getInputCount() first!
virtual void gamepad::Type::getAllInputs | ( | OUT VecString & | logicalNames | ) | const [pure virtual] |
returns all known logical inputs on the gamepad, regardless of type
virtual eInputType gamepad::Type::getInputTypes | ( | IN const char * | logicalName | ) | const throw () [pure virtual] |
given a logical name for an input object on the gamepad, returns all of the types (eInputType values OR'd together).
Returns eInput_Invalid if name is unrecognized.
virtual int gamepad::Type::getLogicalIndex | ( | IN const char * | logicalName, | |
IN eInputType | type | |||
) | throw () [pure virtual] |
given a logical name and input type, return index for that type.
returns -1 if logical name or type are incorrect
virtual const char* gamepad::Type::getMainButton | ( | void | ) | const throw () [pure virtual] |
get the logical name for the most commonly used button
virtual smart_ptr<nstream::Stream> gamepad::Type::getVgfx | ( | void | ) | [pure virtual] |
get the vector graphics (vgfx) request that describes this controller.
Returns NULL if no vector graphics request was provided. See vgfx::processRequest() for details about the vgfx request stream.
virtual void gamepad::Type::dump | ( | void | ) | const throw () [pure virtual] |
debugging only: dump type information to stdout