![]() |
WPILibC++ 2025.3.2
|
A class used internally to wrap commands while overriding a specific method; all other methods will call through to the wrapped command. More...
#include <frc2/command/WrapperCommand.h>
Public Member Functions | |
| WrapperCommand (std::unique_ptr< Command > &&command) | |
| Wrap a command. | |
| template<std::derived_from< Command > T> | |
| WrapperCommand (T &&command) | |
| Wrap a command. | |
| WrapperCommand (WrapperCommand &&other)=default | |
| WrapperCommand (const WrapperCommand &other)=delete | |
| WrapperCommand (WrapperCommand &)=delete | |
| void | Initialize () override |
| void | Execute () override |
| bool | IsFinished () override |
| void | End (bool interrupted) override |
| bool | RunsWhenDisabled () const override |
| InterruptionBehavior | GetInterruptionBehavior () const override |
| wpi::SmallSet< Subsystem *, 4 > | GetRequirements () const override |
Public Member Functions inherited from frc2::CommandHelper< Command, WrapperCommand > | |
| CommandHelper ()=default | |
| CommandPtr | ToPtr () &&override |
Protected Attributes | |
| std::unique_ptr< Command > | m_command |
| Command being wrapped. | |
A class used internally to wrap commands while overriding a specific method; all other methods will call through to the wrapped command.
Wrapped commands may only be used through the wrapper, trying to directly schedule them or add them to a group will throw an exception.
|
explicit |
Wrap a command.
| command | the command being wrapped. Trying to directly schedule this command or add it to a group will throw an exception. |
|
inlineexplicit |
Wrap a command.
| command | the command being wrapped. Trying to directly schedule this command or add it to a group will throw an exception. |
|
default |
|
delete |
|
delete |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |