9#pragma warning(disable : 4521)
43 template <
class... Types,
45 std::is_base_of<Command, std::remove_reference_t<Types>>...>>>
58 template <
class... Types>
60 std::vector<std::unique_ptr<Command>> foo;
61 ((void)foo.emplace_back(std::make_unique<std::remove_reference_t<Types>>(
62 std::forward<Types>(commands))),
71 void End(
bool interrupted) final;
83 bool m_runWhenDisabled{
true};
86 bool m_finished{
false};
87 bool isRunning =
false;
CRTP implementation to allow polymorphic decorator functions in Command.
Definition: CommandHelper.h:26
A state machine representing a complete action to be performed by the robot.
Definition: Command.h:47
InterruptionBehavior
An enum describing the command's behavior when another command with a shared requirement is scheduled...
Definition: Command.h:104
@ kCancelIncoming
This command continues, and the incoming command is not scheduled.
A composition that runs a set of commands in parallel, ending when any one of the commands ends and i...
Definition: ParallelRaceGroup.h:32
ParallelRaceGroup(const ParallelRaceGroup &)=delete
bool IsFinished() final
Whether the command has finished.
Command::InterruptionBehavior GetInterruptionBehavior() const override
How the command behaves when another command with a shared requirement is scheduled.
ParallelRaceGroup(ParallelRaceGroup &&other)=default
void Execute() final
The main body of a command.
void Initialize() final
The initial subroutine of a command.
ParallelRaceGroup(ParallelRaceGroup &)=delete
void End(bool interrupted) final
The action to take when the command ends.
ParallelRaceGroup(std::vector< std::unique_ptr< Command > > &&commands)
Creates a new ParallelCommandRace.
ParallelRaceGroup(Types &&... commands)
Definition: ParallelRaceGroup.h:46
bool RunsWhenDisabled() const override
Whether the given command should run when the robot is disabled.
void AddCommands(Types &&... commands)
Definition: ParallelRaceGroup.h:59
typename std::enable_if< B, T >::type enable_if_t
Definition: core.h:298
Definition: InstantCommand.h:14
Definition: StdDeque.h:50