11 #include "games/controllers/ControllerTypes.h" 59 void SetPortAddress(std::string portAddress);
65 void SetControllerAddress(std::string controllerAddress);
80 bool IsValid()
const {
return static_cast<bool>(m_controller); }
99 bool IsControllerAccepted(
const std::string& portAddress,
const std::string& controllerId)
const;
111 void GetInputPorts(std::vector<std::string>& activePorts)
const;
117 std::string m_portAddress;
120 std::string m_controllerAddress;
122 std::unique_ptr<CControllerHub> m_hub;
125 using ControllerNodeVec = std::vector<CControllerNode>;
Node in the controller tree.
Definition: ControllerNode.h:31
const std::string & GetPortAddress() const
Address given to the controller's port by the implementation.
Definition: ControllerNode.h:58
const std::string & GetControllerAddress() const
Address given to the controller node by the implementation.
Definition: ControllerNode.h:64
bool IsControllerAccepted(const std::string &controllerId) const
Check to see if a controller is compatible with a controller port.
Definition: ControllerNode.cpp:101
Definition: AudioDecoder.h:18
std::shared_ptr< CController > ControllerPtr
Smart pointer to a game controller (CController)
Definition: ControllerTypes.h:25
A branch in the controller tree.
Definition: ControllerHub.h:25
bool ProvidesInput() const
Check if this node provides input.
Definition: ControllerNode.cpp:134
void GetInputPorts(std::vector< std::string > &activePorts) const
Get a list of ports that accept player input.
Definition: ControllerNode.cpp:139
const ControllerPtr & GetController() const
Controller profile of this code.
Definition: ControllerNode.h:50
const CControllerHub & GetHub() const
Collection of ports on this controller.
Definition: ControllerNode.h:73
bool IsValid() const
Check if this node has a valid controller profile.
Definition: ControllerNode.h:80
std::vector< ControllerPtr > ControllerVector
Vector of smart pointers to a game controller (CController)
Definition: ControllerTypes.h:32