#include <command_mapping.hpp>
A class that combines a vector of Commands and a RemoteMapState whose behavior is defined by derived classes. Used in conjunction with the CommandMapper to add and remove Commands from the scheduler when the derived CommandMapping sees fit, depending on the current state of the remote data.
- See also
- HoldCommandMapping
-
HoldRepeatCommandMapping
-
PressCommandMapping
-
ToggleCommandMapping
◆ CommandMapping()
Initializes the CommandMapping with the set of passed in Commands mapped to a particular RemoteMapState.
- Note
- All nullptr
Commands in cmds will be removed.
- Parameters
-
| [in] | cmds | A list of Commands that are associated with the mapping. |
| [in] | rms | The map state that will be compared to the actual remote state to determine whether or not to add cmds. |
◆ ~CommandMapping()
| virtual tap::control::CommandMapping::~CommandMapping |
( |
| ) |
|
|
virtualdefault |
Nothing dynamically allocated that isn't taken care of automatically.
◆ addCommands()
| void tap::control::CommandMapping::addCommands |
( |
| ) |
|
|
protected |
◆ executeCommandMapping()
| virtual void tap::control::CommandMapping::executeCommandMapping |
( |
const RemoteMapState & |
currState | ) |
|
|
pure virtual |
◆ getAssociatedCommands()
| const std::vector< Command * > & tap::control::CommandMapping::getAssociatedCommands |
( |
| ) |
const |
|
inline |
◆ getAssociatedRemoteMapState()
| const RemoteMapState & tap::control::CommandMapping::getAssociatedRemoteMapState |
( |
| ) |
const |
|
inline |
◆ mappingSubset()
| bool tap::control::CommandMapping::mappingSubset |
( |
const RemoteMapState & |
mapState | ) |
|
|
virtual |
- Returns
true if this's mapState is a subset of the passed in mapState. Returns false otherwise.
◆ negKeysSubset()
- Returns
true if state1's neg keys are a subset of state2's keys pressed, false otherwise.
◆ noCommandsScheduled()
| bool tap::control::CommandMapping::noCommandsScheduled |
( |
| ) |
const |
|
protected |
- Returns
- True if none of the associated commands are scheduled.
◆ removeCommands()
| void tap::control::CommandMapping::removeCommands |
( |
| ) |
|
|
protected |
◆ mapStateEqual
Checks for equality between the mapStates of cm1 and cm2.
◆ operator==
Straight equality of the mapState and mappedCommands between cm1 and cm2.
◆ drivers
| Drivers* tap::control::CommandMapping::drivers |
|
protected |
◆ mappedCommands
| std::vector<Command *> tap::control::CommandMapping::mappedCommands |
|
protected |
A map of commands to add to and remove from the scheduler.
◆ mapState
The documentation for this class was generated from the following files: