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

Node in the controller tree. More...

#include <ControllerNode.h>

Public Member Functions

 CControllerNode ()
 
 CControllerNode (const CControllerNode &other)
 
 CControllerNode (CControllerNode &&other)=default
 
CControllerNodeoperator= (const CControllerNode &rhs)
 
CControllerNodeoperator= (CControllerNode &&rhs) noexcept
 
 ~CControllerNode ()
 
void Clear ()
 
const ControllerPtrGetController () const
 Controller profile of this code.
 
void SetController (ControllerPtr controller)
 
void GetControllers (ControllerVector &controllers) const
 
const std::string & GetPortAddress () const
 Address given to the controller's port by the implementation.
 
void SetPortAddress (std::string portAddress)
 
const std::string & GetControllerAddress () const
 Address given to the controller node by the implementation.
 
void SetControllerAddress (std::string controllerAddress)
 
const CControllerHubGetHub () const
 Collection of ports on this controller.
 
CControllerHubGetHub ()
 
void SetHub (CControllerHub hub)
 
bool IsValid () const
 Check if this node has a valid controller profile.
 
bool IsControllerAccepted (const std::string &controllerId) const
 Check to see if a controller is compatible with a controller port.
 
bool IsControllerAccepted (const std::string &portAddress, const std::string &controllerId) const
 Check to see if a controller is compatible with a controller port.
 
bool ProvidesInput () const
 Check if this node provides input.
 
void GetInputPorts (std::vector< std::string > &activePorts) const
 Get a list of ports that accept player input.
 

Detailed Description

Node in the controller tree.

The node identifies the controller profile, and optionally the available controller ports.

Constructor & Destructor Documentation

◆ CControllerNode() [1/3]

CControllerNode::CControllerNode ( )

◆ CControllerNode() [2/3]

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

◆ CControllerNode() [3/3]

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

◆ ~CControllerNode()

CControllerNode::~CControllerNode ( )
default

Member Function Documentation

◆ Clear()

void CControllerNode::Clear ( )

◆ GetController()

const ControllerPtr & KODI::GAME::CControllerNode::GetController ( ) const
inline

Controller profile of this code.

Returns
Controller profile, or empty if this node is invalid
See also
IsValid()

◆ GetControllerAddress()

const std::string & KODI::GAME::CControllerNode::GetControllerAddress ( ) const
inline

Address given to the controller node by the implementation.

◆ GetControllers()

void CControllerNode::GetControllers ( ControllerVector & controllers) const

◆ GetHub() [1/2]

CControllerHub & KODI::GAME::CControllerNode::GetHub ( )
inline

◆ GetHub() [2/2]

const CControllerHub & KODI::GAME::CControllerNode::GetHub ( ) const
inline

Collection of ports on this controller.

Returns
A hub with controller ports, or an empty hub if this controller has no available ports

◆ GetInputPorts()

void CControllerNode::GetInputPorts ( std::vector< std::string > & activePorts) const

Get a list of ports that accept player input.

Parameters
[out]inputPortsThe list of input ports

◆ GetPortAddress()

const std::string & KODI::GAME::CControllerNode::GetPortAddress ( ) const
inline

Address given to the controller's port by the implementation.

◆ IsControllerAccepted() [1/2]

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

Check to see if a controller is compatible with a controller port.

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

◆ IsControllerAccepted() [2/2]

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

Check to see if a controller is compatible with a controller port.

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

◆ IsValid()

bool KODI::GAME::CControllerNode::IsValid ( ) const
inline

Check if this node has a valid controller profile.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ ProvidesInput()

bool CControllerNode::ProvidesInput ( ) const

Check if this node provides input.

◆ SetController()

void CControllerNode::SetController ( ControllerPtr controller)

◆ SetControllerAddress()

void CControllerNode::SetControllerAddress ( std::string controllerAddress)

◆ SetHub()

void CControllerNode::SetHub ( CControllerHub hub)

◆ SetPortAddress()

void CControllerNode::SetPortAddress ( std::string portAddress)

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