[commands] Add pointer overload of AddRequirements (artf6003) (#3669)

Also update documentation in CommandBase.
This commit is contained in:
sciencewhiz
2021-10-25 08:57:22 -07:00
committed by GitHub
parent 737b57ed5f
commit 6bc1db44bc
3 changed files with 26 additions and 5 deletions

View File

@@ -24,21 +24,38 @@ class CommandBase : public Command,
public wpi::SendableHelper<CommandBase> {
public:
/**
* Adds the specified requirements to the command.
* Adds the specified Subsystem requirements to the command.
*
* @param requirements the requirements to add
* @param requirements the Subsystem requirements to add
*/
void AddRequirements(std::initializer_list<Subsystem*> requirements);
/**
* Adds the specified requirements to the command.
* Adds the specified Subsystem requirements to the command.
*
* @param requirements the requirements to add
* @param requirements the Subsystem requirements to add
*/
void AddRequirements(wpi::span<Subsystem* const> requirements);
/**
* Adds the specified Subsystem requirements to the command.
*
* @param requirements the Subsystem requirements to add
*/
void AddRequirements(wpi::SmallSet<Subsystem*, 4> requirements);
/**
* Adds the specified Subsystem requirement to the command.
*
* @param requirement the Subsystem requirement to add
*/
void AddRequirements(Subsystem* requirement);
/**
* Gets the Subsystem requirements of the command.
*
* @return the Command's Subsystem requirements
*/
wpi::SmallSet<Subsystem*, 4> GetRequirements() const override;
/**