mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[commands] Add C++ Requirements struct (#5504)
This commit is contained in:
@@ -88,18 +88,7 @@ class CommandPtr final {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
CommandPtr AndThen(std::function<void()> toRun,
|
||||
std::span<Subsystem* const> requirements = {}) &&;
|
||||
|
||||
/**
|
||||
* Decorates this command with a runnable to run after the command finishes.
|
||||
*
|
||||
* @param toRun the Runnable to run
|
||||
* @param requirements the required subsystems
|
||||
* @return the decorated command
|
||||
*/
|
||||
[[nodiscard]]
|
||||
CommandPtr AndThen(std::function<void()> toRun,
|
||||
std::initializer_list<Subsystem*> requirements) &&;
|
||||
Requirements requirements = {}) &&;
|
||||
|
||||
/**
|
||||
* Decorates this command with a set of commands to run after it in sequence.
|
||||
@@ -121,18 +110,7 @@ class CommandPtr final {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
CommandPtr BeforeStarting(std::function<void()> toRun,
|
||||
std::initializer_list<Subsystem*> requirements) &&;
|
||||
|
||||
/**
|
||||
* Decorates this command with a runnable to run before this command starts.
|
||||
*
|
||||
* @param toRun the Runnable to run
|
||||
* @param requirements the required subsystems
|
||||
* @return the decorated command
|
||||
*/
|
||||
[[nodiscard]]
|
||||
CommandPtr BeforeStarting(std::function<void()> toRun,
|
||||
std::span<Subsystem* const> requirements = {}) &&;
|
||||
Requirements requirements = {}) &&;
|
||||
|
||||
/**
|
||||
* Decorates this command with another command to run before this command
|
||||
|
||||
Reference in New Issue
Block a user