xbmc
Public Member Functions | List of all members
KODI::GAME::CControllerNode Class Reference

Node in the controller tree. More...

#include <ControllerNode.h>

Public Member Functions

 CControllerNode (const CControllerNode &other)
 
 CControllerNode (CControllerNode &&other)=default
 
CControllerNodeoperator= (const CControllerNode &rhs)
 
CControllerNodeoperator= (CControllerNode &&rhs) noexcept
 
void Clear ()
 
const ControllerPtr & GetController () const
 Controller profile of this code. More...
 
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. More...
 
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. More...
 
bool IsControllerAccepted (const std::string &portAddress, const std::string &controllerId) const
 Check to see if a controller is compatible with a controller port. More...
 
bool ProvidesInput () const
 Check if this node provides input.
 

Detailed Description

Node in the controller tree.

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

Member Function Documentation

◆ 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()

◆ GetHub()

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

◆ 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

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