Class ToggleCommandMapping

Inheritance Relationships

Base Type

Class Documentation

class ToggleCommandMapping : public tap::control::CommandMapping

A CommandMapping that adds Commands when the contained mapping is toggled, and removes the Commands when the mapping is untoggled.

When all of the commands in the toggle command mapping naturally ends, the toggle command mapping’s internal state is reset to being not toggled.

Public Functions

inline ToggleCommandMapping(Drivers *drivers, const std::vector<Command*> cmds, const RemoteMapState &rms)

Constructor must take the set of Commands and the RemoteMapState.

virtual ~ToggleCommandMapping() = default
virtual void executeCommandMapping(const RemoteMapState &currState) override

See the class description details about how the commands are added and removed.

Parameters:

currState[in] The current RemoteMapState of the remote.