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

#include <ControllerLayout.h>

Public Member Functions

 CControllerLayout ()
 
 CControllerLayout (const CControllerLayout &other)
 
 ~CControllerLayout ()
 
void Reset (void)
 
int LabelID (void) const
 
const std::string & Icon (void) const
 
const std::string & Image (void) const
 
bool IsValid (bool bLog) const
 Ensures the layout was deserialized correctly, and optionally logs if not.
 
std::string Label (void) const
 Get the label of the primary layout used when mapping the controller.
 
std::string ImagePath (void) const
 Get the image path of the primary layout used when mapping the controller.
 
const CPhysicalTopologyTopology (void) const
 Get the physical topology of this controller.
 
void Deserialize (const tinyxml2::XMLElement *pLayoutElement, const CController *controller, std::vector< CPhysicalFeature > &features)
 Deserialize the specified XML element.
 

Constructor & Destructor Documentation

◆ CControllerLayout() [1/2]

CControllerLayout::CControllerLayout ( )

◆ CControllerLayout() [2/2]

CControllerLayout::CControllerLayout ( const CControllerLayout & other)

◆ ~CControllerLayout()

CControllerLayout::~CControllerLayout ( )
default

Member Function Documentation

◆ Deserialize()

void CControllerLayout::Deserialize ( const tinyxml2::XMLElement * pLayoutElement,
const CController * controller,
std::vector< CPhysicalFeature > & features )

Deserialize the specified XML element.

Parameters
pLayoutElementThe XML element
controllerThe controller, used to obtain read-only properties
featuresThe deserialized features, if any

◆ Icon()

const std::string & KODI::GAME::CControllerLayout::Icon ( void ) const
inline

◆ Image()

const std::string & KODI::GAME::CControllerLayout::Image ( void ) const
inline

◆ ImagePath()

std::string CControllerLayout::ImagePath ( void ) const

Get the image path of the primary layout used when mapping the controller.

Returns
The image path, or empty if unknown

◆ IsValid()

bool CControllerLayout::IsValid ( bool bLog) const

Ensures the layout was deserialized correctly, and optionally logs if not.

Parameters
bLogIf true, output the cause of invalidness to the log
Returns
True if the layout is valid and can be used in the GUI, false otherwise

◆ Label()

std::string CControllerLayout::Label ( void ) const

Get the label of the primary layout used when mapping the controller.

Returns
The label, or empty if unknown

◆ LabelID()

int KODI::GAME::CControllerLayout::LabelID ( void ) const
inline

◆ Reset()

void CControllerLayout::Reset ( void )

◆ Topology()

const CPhysicalTopology & KODI::GAME::CControllerLayout::Topology ( void ) const
inline

Get the physical topology of this controller.

The topology of a controller defines its ports and which controllers can physically be connected to them. Also, the topology defines if the controller can provide player input, which is false in the case of hubs.

Returns
The physical topology of the controller

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