WPILibC++ 2024.3.2
|
Schedules the given command when this command is initialized, and ends when it ends. More...
#include <frc2/command/ProxyCommand.h>
Public Member Functions | |
ProxyCommand (wpi::unique_function< Command *()> supplier) | |
Creates a new ProxyCommand that schedules the supplied command when initialized, and ends when it is no longer scheduled. More... | |
ProxyCommand (wpi::unique_function< CommandPtr()> supplier) | |
Creates a new ProxyCommand that schedules the supplied command when initialized, and ends when it is no longer scheduled. More... | |
ProxyCommand (Command *command) | |
Creates a new ProxyCommand that schedules the given command when initialized, and ends when it is no longer scheduled. More... | |
ProxyCommand (std::unique_ptr< Command > command) | |
Creates a new ProxyCommand that schedules the given command when initialized, and ends when it is no longer scheduled. More... | |
ProxyCommand (ProxyCommand &&other)=default | |
void | Initialize () override |
void | End (bool interrupted) override |
bool | IsFinished () override |
void | InitSendable (wpi::SendableBuilder &builder) override |
Public Member Functions inherited from frc2::CommandHelper< Command, ProxyCommand > | |
CommandHelper ()=default | |
CommandPtr | ToPtr () &&override |
Additional Inherited Members | |
Protected Member Functions inherited from frc2::CommandHelper< Command, ProxyCommand > | |
std::unique_ptr< Command > | TransferOwnership () &&override |
Schedules the given command when this command is initialized, and ends when it ends.
Useful for forking off from CommandGroups. If this command is interrupted, it will cancel the command.
This class is provided by the NewCommands VendorDep
|
explicit |
Creates a new ProxyCommand that schedules the supplied command when initialized, and ends when it is no longer scheduled.
Useful for lazily creating commands at runtime.
supplier | the command supplier |
|
explicit |
Creates a new ProxyCommand that schedules the supplied command when initialized, and ends when it is no longer scheduled.
Useful for lazily creating commands at runtime.
supplier | the command supplier |
|
explicit |
Creates a new ProxyCommand that schedules the given command when initialized, and ends when it is no longer scheduled.
command | the command to run by proxy |
|
explicit |
Creates a new ProxyCommand that schedules the given command when initialized, and ends when it is no longer scheduled.
Note that this constructor passes ownership of the given command to the returned ProxyCommand.
command | the command to schedule |
|
default |
|
override |
|
override |
|
override |
|
override |