[commands] Change grouping decorator impl to flatten nested group structures (#3335)

This commit is contained in:
Starlight220
2021-06-14 02:05:14 +03:00
committed by GitHub
parent b422665a3c
commit ef4ea84cb5
12 changed files with 126 additions and 17 deletions

View File

@@ -84,6 +84,15 @@ class SequentialCommandGroup
bool RunsWhenDisabled() const override;
SequentialCommandGroup BeforeStarting(
std::function<void()> toRun,
wpi::ArrayRef<Subsystem*> requirements = {}) &&
override;
SequentialCommandGroup AndThen(std::function<void()> toRun,
wpi::ArrayRef<Subsystem*> requirements = {}) &&
override;
private:
void AddCommands(std::vector<std::unique_ptr<Command>>&& commands) final;