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

Public Member Functions

 CPhysicalPort (std::string portId, std::vector< std::string > accepts)
 Create a controller port. More...
 
void Reset ()
 
const std::string & ID () const
 Get the ID of the port. More...
 
const std::vector< std::string > & Accepts () const
 Get the controllers that can connect to this port. More...
 
bool IsCompatible (const std::string &controllerId) const
 Check if the controller is compatible with this port. More...
 
bool Deserialize (const tinyxml2::XMLElement *pElement)
 

Constructor & Destructor Documentation

◆ CPhysicalPort()

CPhysicalPort::CPhysicalPort ( std::string  portId,
std::vector< std::string >  accepts 
)

Create a controller port.

Parameters
portIdThe port's ID
acceptsA list of controller IDs that this port accepts

Member Function Documentation

◆ Accepts()

const std::vector<std::string>& KODI::GAME::CPhysicalPort::Accepts ( ) const
inline

Get the controllers that can connect to this port.

Returns
A list of controllers that are physically compatible with this port

◆ ID()

const std::string& KODI::GAME::CPhysicalPort::ID ( ) const
inline

Get the ID of the port.

Returns
The port's ID, e.g. "1", as a string

◆ IsCompatible()

bool CPhysicalPort::IsCompatible ( const std::string &  controllerId) const

Check if the controller is compatible with this port.

Returns
True if the controller is accepted, false otherwise

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