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::ActionData Union Reference

A union that may contain any one of SimpleActionData, OneAxisActionData, TwoAxisActionData, ThreeAxisActionData. More...

#include <input_data.hpp>

Public Member Functions

 ActionData (ActionType actionType)
 Construct a new action data object of a particular type. Called prior to all other ActionData constructors.
 
 ActionData ()
 Construct a new SIMPLE action data object.
 
 ActionData (SimpleActionData simpleData)
 Construct a new SIMPLE action data object, based on already existing SimpleActionData.
 
 ActionData (OneAxisActionData oneAxisActionData)
 Construct a new ONE_AXIS action data object based on already existing OneAxisActionData.
 
 ActionData (TwoAxisActionData twoAxisActionData)
 Construct a new action data object based on already existing TwoAxisActionData.
 
 ActionData (ThreeAxisActionData threeAxisActionData)
 Construct a new THREE_AXIS action data object based on already existing ThreeAxisActionData.
 
 ActionData (uint8_t nAxes)
 Construct a new Action Data object with nAxes axes.
 

Public Attributes

CommonActionData mCommonData
 Common or simple data.
 
SimpleActionData mSimpleData
 Common or simple data.
 
OneAxisActionData mOneAxisActionData
 One axis action data.
 
TwoAxisActionData mTwoAxisActionData
 Two axis action data.
 
ThreeAxisActionData mThreeAxisActionData
 Three axis action data.
 

Static Public Attributes

static constexpr ActionType toType [4]
 Array of action types so that 0 - BUTTON, 1 - ONE_AXIS, and so on.
 

Detailed Description

Constructor & Destructor Documentation

◆ ActionData() [1/6]

ToyMaker::ActionData::ActionData ( ActionType actionType)
inline

Construct a new action data object of a particular type. Called prior to all other ActionData constructors.

Parameters
actionTypeThe type of action data object to construct.

◆ ActionData() [2/6]

ToyMaker::ActionData::ActionData ( SimpleActionData simpleData)
inline

Construct a new SIMPLE action data object, based on already existing SimpleActionData.

Parameters
simpleDataPreexisting SimpleActionData.

◆ ActionData() [3/6]

ToyMaker::ActionData::ActionData ( OneAxisActionData oneAxisActionData)
inline

Construct a new ONE_AXIS action data object based on already existing OneAxisActionData.

Parameters
oneAxisActionDataPreexisting OneAxisActionData.

◆ ActionData() [4/6]

ToyMaker::ActionData::ActionData ( TwoAxisActionData twoAxisActionData)
inline

Construct a new action data object based on already existing TwoAxisActionData.

Parameters
twoAxisActionDataPreexisting TwoAxisActionData.

◆ ActionData() [5/6]

ToyMaker::ActionData::ActionData ( ThreeAxisActionData threeAxisActionData)
inline

Construct a new THREE_AXIS action data object based on already existing ThreeAxisActionData.

Parameters
threeAxisActionDataPreexisting ThreeAxisActionData.

◆ ActionData() [6/6]

ToyMaker::ActionData::ActionData ( uint8_t nAxes)
inline

Construct a new Action Data object with nAxes axes.

Parameters
nAxesNumber of axes for this action data.

Member Data Documentation

◆ toType

ActionType ToyMaker::ActionData::toType[4]
staticconstexpr
Initial value:
{
ActionType::BUTTON, ActionType::ONE_AXIS,
ActionType::TWO_AXIS, ActionType::THREE_AXIS
}

Array of action types so that 0 - BUTTON, 1 - ONE_AXIS, and so on.


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