Base class for joystick feature primitives
More...
Base class for joystick feature primitives
Class for joystick features. A feature can be:
- scalar [1]
- analog stick
- accelerometer
- motor
- relative pointer [2]
- absolute pointer
- wheel
- throttle
- keyboard key
[1] All three driver primitives (buttons, hats and axes) have a state that can be represented using a single scalar value. For this reason, features that map to a single primitive are called "scalar features".
[2] Relative pointers are similar to analog sticks, but they use relative distances instead of positions.
◆ IsValid()
bool kodi::addon::JoystickFeature::IsValid |
( |
| ) |
const |
|
inline |
Check this feature is valid.
- Returns
- True if valid (type != JOYSTICK_FEATURE_TYPE_UNKNOWN), false otherwise
◆ JoystickFeature() [1/2]
kodi::addon::JoystickFeature::JoystickFeature |
( |
const JoystickFeature & | other | ) |
|
|
inline |
Class copy constructor.
- Parameters
-
[in] | other | Other class to copy on construct here |
◆ JoystickFeature() [2/2]
Class constructor.
- Parameters
-
◆ Name()
const std::string & kodi::addon::JoystickFeature::Name |
( |
void | | ) |
const |
|
inline |
Get name of feature.
- Returns
- Name of feature
◆ operator=()
Copy data from another JoystickFeature class to here.
- Parameters
-
[in] | other | Other class to copy here |
◆ operator==()
Compare this with another class of this type.
- Parameters
-
[in] | other | Other class to compare |
- Returns
- True if they are equal, false otherwise
◆ Primitive()
Get primitive of feature by wanted type.
- Parameters
-
- Returns
- Primitive of asked type
◆ Primitives() [1/2]
Get all primitives on this class.
- Returns
- Array list of primitives
◆ Primitives() [2/2]
Get all primitives on this class (as constant).
- Returns
- Constant array list of primitives
◆ SetInvalid()
void kodi::addon::JoystickFeature::SetInvalid |
( |
void | | ) |
|
|
inline |
◆ SetName()
void kodi::addon::JoystickFeature::SetName |
( |
const std::string & | name | ) |
|
|
inline |
Set name of feature.
- Parameters
-
◆ SetPrimitive()
Set primitive for feature by wanted type.
- Parameters
-
◆ SetType()
Set type of feature.
- Parameters
-
◆ Type()