9#pragma warning(disable : 4521)
37 :
public CommandHelper<CommandGroupBase, SequentialCommandGroup> {
47 std::vector<std::unique_ptr<Command>>&& commands);
56 template <
class... Types,
58 std::is_base_of<Command, std::remove_reference_t<Types>>...>>>
71 template <
class... Types,
73 std::is_base_of<Command, std::remove_reference_t<Types>>...>>>
75 std::vector<std::unique_ptr<Command>> foo;
76 ((void)foo.emplace_back(std::make_unique<std::remove_reference_t<Types>>(
77 std::forward<Types>(commands))),
86 void End(
bool interrupted) final;
101 bool m_runWhenDisabled{
true};
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 list of commands in sequence.
Definition: SequentialCommandGroup.h:37
void Initialize() final
The initial subroutine of a command.
void Execute() final
The main body of a command.
bool RunsWhenDisabled() const override
Whether the given command should run when the robot is disabled.
SequentialCommandGroup(SequentialCommandGroup &&other)=default
SequentialCommandGroup(std::vector< std::unique_ptr< Command > > &&commands)
Creates a new SequentialCommandGroup.
void End(bool interrupted) final
The action to take when the command ends.
SequentialCommandGroup(Types &&... commands)
Creates a new SequentialCommandGroup.
Definition: SequentialCommandGroup.h:59
Command::InterruptionBehavior GetInterruptionBehavior() const override
How the command behaves when another command with a shared requirement is scheduled.
void InitSendable(wpi::SendableBuilder &builder) override
Initializes this Sendable object.
void AddCommands(Types &&... commands)
Definition: SequentialCommandGroup.h:74
SequentialCommandGroup(SequentialCommandGroup &)=delete
bool IsFinished() final
Whether the command has finished.
SequentialCommandGroup(const SequentialCommandGroup &)=delete
typename std::enable_if< B, T >::type enable_if_t
Definition: core.h:298
constexpr common_t< T1, T2 > max(const T1 x, const T2 y) noexcept
Compile-time pairwise maximum function.
Definition: max.hpp:35
Definition: InstantCommand.h:14
const size_t invalid_index
Definition: SequentialCommandGroup.h:24
Definition: StdDeque.h:50
/file This file defines the SmallVector class.
Definition: AprilTagFieldLayout.h:18
class LLVM_GSL_OWNER SmallVector
Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference s...
Definition: SmallVector.h:1112