9#pragma warning(disable : 4521)
43 Command, std::remove_reference_t<T>>>>
46 std::forward<T>(command))) {}
62 void End(
bool interrupted)
override;
CRTP implementation to allow polymorphic decorator functions in Command.
Definition: CommandHelper.h:26
InterruptionBehavior
An enum describing the command's behavior when another command with a shared requirement is scheduled...
Definition: Command.h:104
A class used internally to wrap commands while overriding a specific method; all other methods will c...
Definition: WrapperCommand.h:26
WrapperCommand(const WrapperCommand &other)=delete
WrapperCommand(T &&command)
Wrap a command.
Definition: WrapperCommand.h:44
void Execute() override
The main body of a command.
WrapperCommand(std::unique_ptr< Command > &&command)
Wrap a command.
bool RunsWhenDisabled() const override
Whether the given command should run when the robot is disabled.
void Initialize() override
The initial subroutine of a command.
bool IsFinished() override
Whether the command has finished.
std::unique_ptr< Command > m_command
Definition: WrapperCommand.h:71
void End(bool interrupted) override
The action to take when the command ends.
WrapperCommand(WrapperCommand &&other)=default
InterruptionBehavior GetInterruptionBehavior() const override
How the command behaves when another command with a shared requirement is scheduled.
wpi::SmallSet< Subsystem *, 4 > GetRequirements() const override
Gets the Subsystem requirements of the command.
WrapperCommand(WrapperCommand &)=delete
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...
Definition: SmallSet.h:135
typename std::enable_if< B, T >::type enable_if_t
Definition: core.h:298
typename std::remove_reference< T >::type remove_reference_t
Definition: core.h:303
Definition: InstantCommand.h:14
Definition: StdDeque.h:50