Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::GAME::CPortNode Class Reference

Collection of nodes that can be connected to this port. More...

#include <PortNode.h>

Public Member Functions

 CPortNode ()=default
 
 CPortNode (const CPortNode &other)
 
 CPortNode (CPortNode &&other)=default
 
CPortNodeoperator= (const CPortNode &rhs)
 
CPortNodeoperator= (CPortNode &&rhs) noexcept
 
 ~CPortNode ()
 
bool IsConnected () const
 Connection state of the port.
 
void SetConnected (bool bConnected)
 
const CControllerNodeGetActiveController () const
 The controller that is active on this port.
 
CControllerNodeGetActiveController ()
 
void SetActiveController (unsigned int controllerIndex)
 
bool SetActiveController (const std::string &controllerId)
 
PORT_TYPE GetPortType () const
 The port type.
 
void SetPortType (PORT_TYPE type)
 
const std::string & GetPortID () const
 The hardware or controller port ID.
 
void SetPortID (std::string portId)
 
const std::string & GetAddress () const
 Address given to the node by the implementation.
 
void SetAddress (std::string address)
 
bool IsForceConnected () const
 If true, prevents a disconnection option from being shown for this port.
 
void SetForceConnected (bool forceConnected)
 
const ControllerNodeVecGetCompatibleControllers () const
 Return the controller profiles that are compatible with this port.
 
ControllerNodeVecGetCompatibleControllers ()
 
void SetCompatibleControllers (ControllerNodeVec controllers)
 
bool IsControllerAccepted (const std::string &controllerId) const
 Check to see if a controller is compatible with this tree.
 
bool IsControllerAccepted (const std::string &portAddress, const std::string &controllerId) const
 Check to see if a controller is compatible with this tree.
 
void GetInputPorts (std::vector< std::string > &inputPorts) const
 Get a list of ports that accept player input.
 

Detailed Description

Collection of nodes that can be connected to this port.

Constructor & Destructor Documentation

◆ CPortNode() [1/3]

KODI::GAME::CPortNode::CPortNode ( )
default

◆ CPortNode() [2/3]

KODI::GAME::CPortNode::CPortNode ( const CPortNode & other)
inline

◆ CPortNode() [3/3]

KODI::GAME::CPortNode::CPortNode ( CPortNode && other)
default

◆ ~CPortNode()

CPortNode::~CPortNode ( )
default

Member Function Documentation

◆ GetActiveController() [1/2]

CControllerNode & CPortNode::GetActiveController ( )

◆ GetActiveController() [2/2]

const CControllerNode & CPortNode::GetActiveController ( ) const

The controller that is active on this port.

Returns
The active controller, or invalid if port is disconnected

◆ GetAddress()

const std::string & KODI::GAME::CPortNode::GetAddress ( ) const
inline

Address given to the node by the implementation.

◆ GetCompatibleControllers() [1/2]

ControllerNodeVec & KODI::GAME::CPortNode::GetCompatibleControllers ( )
inline

◆ GetCompatibleControllers() [2/2]

const ControllerNodeVec & KODI::GAME::CPortNode::GetCompatibleControllers ( ) const
inline

Return the controller profiles that are compatible with this port.

Returns
The controller profiles, or empty if this port doesn't support any controller profiles

◆ GetInputPorts()

void CPortNode::GetInputPorts ( std::vector< std::string > & inputPorts) const

Get a list of ports that accept player input.

Parameters
[out]inputPortsThe list of input ports

◆ GetPortID()

const std::string & KODI::GAME::CPortNode::GetPortID ( ) const
inline

The hardware or controller port ID.

Returns
The port ID of the hardware port or controller port, or empty if the port is only identified by its type

◆ GetPortType()

PORT_TYPE KODI::GAME::CPortNode::GetPortType ( ) const
inline

The port type.

Returns
The port type, if known

◆ IsConnected()

bool KODI::GAME::CPortNode::IsConnected ( ) const
inline

Connection state of the port.

Returns
True if a controller is connected, false otherwise

◆ IsControllerAccepted() [1/2]

bool CPortNode::IsControllerAccepted ( const std::string & controllerId) const

Check to see if a controller is compatible with this tree.

Parameters
controllerIdThe ID of the controller
Returns
True if the controller is compatible with the tree, false otherwise

◆ IsControllerAccepted() [2/2]

bool CPortNode::IsControllerAccepted ( const std::string & portAddress,
const std::string & controllerId ) const

Check to see if a controller is compatible with this tree.

Parameters
portAddressThe port address
controllerIdThe ID of the controller
Returns
True if the controller is compatible with the tree, false otherwise

◆ IsForceConnected()

bool KODI::GAME::CPortNode::IsForceConnected ( ) const
inline

If true, prevents a disconnection option from being shown for this port.

◆ operator=() [1/2]

CPortNode & CPortNode::operator= ( const CPortNode & rhs)

◆ operator=() [2/2]

CPortNode & CPortNode::operator= ( CPortNode && rhs)
noexcept

◆ SetActiveController() [1/2]

bool CPortNode::SetActiveController ( const std::string & controllerId)

◆ SetActiveController() [2/2]

void KODI::GAME::CPortNode::SetActiveController ( unsigned int controllerIndex)
inline

◆ SetAddress()

void CPortNode::SetAddress ( std::string address)

◆ SetCompatibleControllers()

void CPortNode::SetCompatibleControllers ( ControllerNodeVec controllers)

◆ SetConnected()

void KODI::GAME::CPortNode::SetConnected ( bool bConnected)
inline

◆ SetForceConnected()

void KODI::GAME::CPortNode::SetForceConnected ( bool forceConnected)
inline

◆ SetPortID()

void CPortNode::SetPortID ( std::string portId)

◆ SetPortType()

void KODI::GAME::CPortNode::SetPortType ( PORT_TYPE type)
inline

The documentation for this class was generated from the following files: