9#pragma warning(disable : 4521)
32 :
public CommandHelper<CommandGroupBase, ParallelCommandGroup> {
43 std::vector<std::unique_ptr<Command>>&& commands);
53 template <
class... Types,
55 std::is_base_of<Command, std::remove_reference_t<Types>>...>>>
68 template <
class... Types,
70 std::is_base_of<Command, std::remove_reference_t<Types>>...>>>
72 std::vector<std::unique_ptr<Command>> foo;
73 ((void)foo.emplace_back(std::make_unique<std::remove_reference_t<Types>>(
74 std::forward<Types>(commands))),
83 void End(
bool interrupted) final;
95 bool m_runWhenDisabled{
true};
98 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 command composition that runs a set of commands in parallel, ending when the last command ends.
Definition: ParallelCommandGroup.h:32
ParallelCommandGroup(ParallelCommandGroup &)=delete
bool IsFinished() final
Whether the command has finished.
void Execute() final
The main body of a command.
ParallelCommandGroup(ParallelCommandGroup &&other)=default
ParallelCommandGroup(std::vector< std::unique_ptr< Command > > &&commands)
Creates a new ParallelCommandGroup.
ParallelCommandGroup(Types &&... commands)
Creates a new ParallelCommandGroup.
Definition: ParallelCommandGroup.h:56
void AddCommands(Types &&... commands)
Definition: ParallelCommandGroup.h:71
Command::InterruptionBehavior GetInterruptionBehavior() const override
How the command behaves when another command with a shared requirement is scheduled.
void End(bool interrupted) final
The action to take when the command ends.
void Initialize() final
The initial subroutine of a command.
ParallelCommandGroup(const ParallelCommandGroup &)=delete
bool RunsWhenDisabled() const override
Whether the given command should run when the robot is disabled.
typename std::enable_if< B, T >::type enable_if_t
Definition: core.h:298
Definition: InstantCommand.h:14
Definition: StdDeque.h:50