[commands] Add missing C++ decorators (#6599)

This commit is contained in:
Joseph Eng
2024-05-24 13:14:15 -07:00
committed by GitHub
parent 237ebfd0f2
commit 5c5e5af0c6
4 changed files with 235 additions and 65 deletions

View File

@@ -99,11 +99,19 @@ CommandPtr Command::BeforeStarting(std::function<void()> toRun,
requirements);
}
CommandPtr Command::BeforeStarting(CommandPtr&& before) && {
return std::move(*this).ToPtr().BeforeStarting(std::move(before));
}
CommandPtr Command::AndThen(std::function<void()> toRun,
Requirements requirements) && {
return std::move(*this).ToPtr().AndThen(std::move(toRun), requirements);
}
CommandPtr Command::AndThen(CommandPtr&& next) && {
return std::move(*this).ToPtr().AndThen(std::move(next));
}
CommandPtr Command::Repeatedly() && {
return std::move(*this).ToPtr().Repeatedly();
}
@@ -120,6 +128,18 @@ CommandPtr Command::OnlyIf(std::function<bool()> condition) && {
return std::move(*this).ToPtr().OnlyIf(std::move(condition));
}
CommandPtr Command::DeadlineFor(CommandPtr&& parallel) && {
return std::move(*this).ToPtr().DeadlineFor(std::move(parallel));
}
CommandPtr Command::AlongWith(CommandPtr&& parallel) && {
return std::move(*this).ToPtr().AlongWith(std::move(parallel));
}
CommandPtr Command::RaceWith(CommandPtr&& parallel) && {
return std::move(*this).ToPtr().RaceWith(std::move(parallel));
}
CommandPtr Command::FinallyDo(std::function<void(bool)> end) && {
return std::move(*this).ToPtr().FinallyDo(std::move(end));
}