Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
Loading...
Searching...
No Matches
ToyMaker::InputSourceDescription Struct Reference

Identifies a single control, such as a button, trigger, or joystick, on a single device. More...

#include <input_data.hpp>

Public Member Functions

bool operator== (const InputSourceDescription &other) const
 Compares one description to another for equality.
 
bool operator< (const InputSourceDescription &other) const
 Compares one description to another, for use by the equality operator.
 
 operator bool () const
 Explicitly defines what are considered truthy and falsey values for this type.
 

Public Attributes

InputAttributesType mAttributes {0}
 The attributes of the input control, queryable using values from InputAttributes.
 
uint8_t mDevice {0}
 The ID of a device, assuming several of the same devices can be connected to a single platform.
 
uint32_t mControl {0}
 The ID of the control on a single device, if the device has multiple controls (buttons, triggers, and the like).
 
DeviceType mDeviceType {DeviceType::NA}
 The type of device described by this object.
 
ControlType mControlType {ControlType::NA}
 The type of control belonging to this device, described by this object.
 

Detailed Description

Identifies a single control, such as a button, trigger, or joystick, on a single device.

Member Function Documentation

◆ operator bool()

ToyMaker::InputSourceDescription::operator bool ( ) const
inline

Explicitly defines what are considered truthy and falsey values for this type.

Return values
trueAt least one of mDeviceType or mControlType is defined;
falseNeither of mDeviceType or mControlType are defined;

◆ operator<()

bool ToyMaker::InputSourceDescription::operator< ( const InputSourceDescription & other) const
inline

Compares one description to another, for use by the equality operator.

Also used for sorting.

Parameters
otherThe input source description being compared to this one.
Return values
trueThis input source is "less than";
falseThe input source is not "less than"

◆ operator==()

bool ToyMaker::InputSourceDescription::operator== ( const InputSourceDescription & other) const
inline

Compares one description to another for equality.

Used mainly to ensure that when used in containers like maps, that different input sources are seen as unique.

Parameters
otherThe other input source description, being compared to this one.
Return values
trueThe input sources are different;
falseThe input sources are the same;

The documentation for this struct was generated from the following file: