11 #include "games/controllers/ControllerTypes.h" 12 #include "games/controllers/types/ControllerNode.h" 44 void SetConnected(
bool bConnected) { m_bConnected = bConnected; }
53 void SetActiveController(
unsigned int controllerIndex) { m_active = controllerIndex; }
54 bool SetActiveController(
const std::string& controllerId);
62 void SetPortType(
PORT_TYPE type) { m_portType = type; }
70 const std::string&
GetPortID()
const {
return m_portId; }
71 void SetPortID(std::string portId);
76 const std::string&
GetAddress()
const {
return m_address; }
77 void SetAddress(std::string address);
84 void SetForceConnected(
bool forceConnected) { m_forceConnected = forceConnected; }
94 void SetCompatibleControllers(ControllerNodeVec controllers);
113 bool IsControllerAccepted(
const std::string& portAddress,
const std::string& controllerId)
const;
120 void GetInputPorts(std::vector<std::string>& inputPorts)
const;
125 bool m_bConnected =
false;
126 unsigned int m_active = 0;
127 PORT_TYPE m_portType = PORT_TYPE::UNKNOWN;
128 std::string m_portId;
129 std::string m_address;
130 bool m_forceConnected{
true};
131 ControllerNodeVec m_controllers;
137 using PortVec = std::vector<CPortNode>;
bool IsControllerAccepted(const std::string &controllerId) const
Check to see if a controller is compatible with this tree.
Definition: PortNode.cpp:104
const CControllerNode & GetActiveController() const
The controller that is active on this port.
Definition: PortNode.cpp:55
Node in the controller tree.
Definition: ControllerNode.h:31
const std::string & GetPortID() const
The hardware or controller port ID.
Definition: PortNode.h:70
const ControllerNodeVec & GetCompatibleControllers() const
Return the controller profiles that are compatible with this port.
Definition: PortNode.h:92
Collection of nodes that can be connected to this port.
Definition: PortNode.h:28
bool IsForceConnected() const
If true, prevents a disconnection option from being shown for this port.
Definition: PortNode.h:83
Definition: AudioDecoder.h:18
Definition: PhysicalPort.h:27
const std::string & GetAddress() const
Address given to the node by the implementation.
Definition: PortNode.h:76
PORT_TYPE
Type of input provided by a hardware or controller port.
Definition: ControllerTypes.h:39
bool IsConnected() const
Connection state of the port.
Definition: PortNode.h:43
void GetInputPorts(std::vector< std::string > &inputPorts) const
Get a list of ports that accept player input.
Definition: PortNode.cpp:145
PORT_TYPE GetPortType() const
The port type.
Definition: PortNode.h:61