Command for removing SVCS repository structure.
More...
#include <ClearCommand.hxx>
|
| | ClearCommand (std::shared_ptr< ISubject > subject, std::shared_ptr< RepositoryManager > repoManager) |
| | Constructs the ClearCommand.
|
| bool | execute (const std::vector< std::string > &args) override |
| | Executes the clear command.
|
| std::string | getName () const override |
| | Gets the name of the command.
|
| std::string | getDescription () const override |
| | Gets the description of the command.
|
| std::string | getUsage () const override |
| | Gets the usage syntax of the command.
|
| void | showHelp () const override |
| | Shows detailed help information for this command.
|
| Public Member Functions inherited from svcs::cli::ICommand |
| virtual | ~ICommand ()=default |
| | Virtual destructor.
|
Command for removing SVCS repository structure.
The ClearCommand safely removes the .svcs directory and all repository data.
◆ ClearCommand()
| svcs::cli::ClearCommand::ClearCommand |
( |
std::shared_ptr< ISubject > | subject, |
|
|
std::shared_ptr< RepositoryManager > | repoManager ) |
Constructs the ClearCommand.
- Parameters
-
| subject | Shared pointer to the event bus for notifications. |
| repoManager | Shared pointer to the repository manager. |
◆ execute()
| bool svcs::cli::ClearCommand::execute |
( |
const std::vector< std::string > & | args | ) |
|
|
overridevirtual |
Executes the clear command.
- Parameters
-
| args | Command arguments (–force to skip confirmation). |
- Returns
- true if clear succeeded, false otherwise.
Implements svcs::cli::ICommand.
◆ getDescription()
| std::string svcs::cli::ClearCommand::getDescription |
( |
| ) |
const |
|
nodiscardoverridevirtual |
Gets the description of the command.
- Returns
- "Remove SVCS repository from current directory"
Implements svcs::cli::ICommand.
◆ getName()
| std::string svcs::cli::ClearCommand::getName |
( |
| ) |
const |
|
inlinenodiscardoverridevirtual |
◆ getUsage()
| std::string svcs::cli::ClearCommand::getUsage |
( |
| ) |
const |
|
nodiscardoverridevirtual |
Gets the usage syntax of the command.
- Returns
- "svcs clear [--force]"
Implements svcs::cli::ICommand.
◆ showHelp()
| void svcs::cli::ClearCommand::showHelp |
( |
| ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following files: