[command] Rename PerpetualCommand to EndlessCommand (#4177)

This commit is contained in:
Starlight220
2022-04-28 19:38:38 +03:00
committed by GitHub
parent a06b3f0307
commit f7ca72fb41
8 changed files with 212 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ std::string GetTypeName(const T& type) {
return wpi::Demangle(typeid(type).name());
}
class EndlessCommand;
class ParallelCommandGroup;
class ParallelRaceGroup;
class ParallelDeadlineGroup;
@@ -183,9 +184,19 @@ class Command {
* conditions. The decorated command can still be interrupted or canceled.
*
* @return the decorated command
* @deprecated replace with EndlessCommand
*/
WPI_DEPRECATED("Replace with Endlessly()")
virtual PerpetualCommand Perpetually() &&;
/**
* Decorates this command to run endlessly, ignoring its ordinary end
* conditions. The decorated command can still be interrupted or canceled.
*
* @return the decorated command
*/
virtual EndlessCommand Endlessly() &&;
/**
* Decorates this command to run repeatedly, restarting it when it ends, until
* this command is interrupted. The decorated command can still be canceled.