11 #include "ControllerTypes.h" 12 #include "addons/Addon.h" 13 #include "games/controllers/input/PhysicalFeature.h" 25 class CControllerLayout;
26 class CPhysicalTopology;
28 using JOYSTICK::FEATURE_TYPE;
36 explicit CController(
const ADDON::AddonInfoPtr& addonInfo);
50 const std::vector<CPhysicalFeature>&
Features(
void)
const {
return m_features; }
69 unsigned int FeatureCount(FEATURE_TYPE type = FEATURE_TYPE::UNKNOWN,
77 void GetFeatures(std::vector<std::string>& features,
78 FEATURE_TYPE type = FEATURE_TYPE::UNKNOWN)
const;
87 FEATURE_TYPE
FeatureType(
const std::string& feature)
const;
120 std::unique_ptr<CControllerLayout> m_layout;
121 std::vector<CPhysicalFeature> m_features;
122 bool m_bLoaded =
false;
INPUT_TYPE
Types of input available for scalar features.
Definition: JoystickTypes.h:140
Represents the physical topology of controller add-ons.
Definition: PhysicalTopology.h:34
unsigned int FeatureCount(FEATURE_TYPE type=FEATURE_TYPE::UNKNOWN, JOYSTICK::INPUT_TYPE inputType=JOYSTICK::INPUT_TYPE::UNKNOWN) const
Get the count of controller features matching the specified types.
Definition: Controller.cpp:79
Definition: ControllerLayout.h:31
const CControllerLayout & Layout(void) const
Get the controller layout.
Definition: Controller.h:108
void GetFeatures(std::vector< std::string > &features, FEATURE_TYPE type=FEATURE_TYPE::UNKNOWN) const
Get the features matching the specified type.
Definition: Controller.cpp:88
bool LoadLayout(void)
Load the controller layout.
Definition: Controller.cpp:118
Definition: AudioDecoder.h:18
JOYSTICK::INPUT_TYPE GetInputType(const std::string &feature) const
Get the input type of the specified feature.
Definition: Controller.cpp:108
std::shared_ptr< CController > ControllerPtr
Smart pointer to a game controller (CController)
Definition: ControllerTypes.h:25
Definition: Controller.h:33
const CPhysicalFeature & GetFeature(const std::string &name) const
Get a feature by its name.
Definition: Controller.cpp:66
const CPhysicalTopology & Topology() const
Get the controller's physical topology.
Definition: Controller.cpp:156
Definition: PhysicalFeature.h:30
const std::vector< CPhysicalFeature > & Features(void) const
Get all controller features.
Definition: Controller.h:50
bool CanHaveAddonOrInstanceSettings() override
Check whether this add-on can be configured by the user.
Definition: Controller.h:43
FEATURE_TYPE FeatureType(const std::string &feature) const
Get the type of the specified feature.
Definition: Controller.cpp:98