|
SVCS - English Documentation
|
Interface (abstract base class) for all commands executed via the CLI. More...
#include <ICommand.hxx>
Public Member Functions | |
| virtual | ~ICommand ()=default |
| Virtual destructor. | |
| virtual std::string | getName () const =0 |
| Retrieves the unique name of the command (e.g., "init"). | |
| virtual std::string | getDescription () const =0 |
| Retrieves a brief description of what the command does. | |
| virtual std::string | getUsage () const =0 |
| Retrieves the command's usage syntax. | |
| virtual bool | execute (const std::vector< std::string > &args)=0 |
| Executes the main logic of the command. | |
| virtual void | showHelp () const =0 |
| Displays detailed help information about the command (Usage and Description). | |
Interface (abstract base class) for all commands executed via the CLI.
Every concrete command (e.g., InitCommand, CommitCommand) must inherit this interface and implement all its pure virtual methods.
|
virtualdefault |
Virtual destructor.
Ensures correct cleanup of derived classes via a base class pointer.
|
pure virtual |
Executes the main logic of the command.
| args | A vector of string arguments passed to the command (excluding the command name itself). |
Implemented in svcs::cli::AddCommand, svcs::cli::BranchCommand, svcs::cli::ClearCommand, svcs::cli::HelpCommand, svcs::cli::HistoryCommand, svcs::cli::InitCommand, svcs::cli::MergeCommand, svcs::cli::RemoveCommand, svcs::cli::SaveCommand, svcs::cli::StatusCommand, svcs::cli::UndoCommand, svcs::cli::VersionCommand, svcs::server::cli::HubCommand, svcs::server::cli::RepoCommand, svcs::server::cli::ServerBaseCommand, svcs::test::cli::HelpCommand, svcs::test::cli::utils::HelpCommand, svcs::test::cli::utils::HistoryCommand, svcs::test::cli::utils::InitCommand, svcs::test::cli::utils::RemoveCommand, svcs::test::cli::utils::SaveCommand, svcs::test::cli::utils::StatusCommand, svcs::test::cli::utils::UndoCommand, and svcs::test::cli::utils::VersionCommand.
|
nodiscardpure virtual |
Retrieves a brief description of what the command does.
Implemented in svcs::cli::AddCommand, svcs::cli::BaseCommand, svcs::cli::BranchCommand, svcs::cli::ClearCommand, svcs::cli::HelpCommand, svcs::cli::HistoryCommand, svcs::cli::InitCommand, svcs::cli::MergeCommand, svcs::cli::RemoveCommand, svcs::cli::SaveCommand, svcs::cli::StatusCommand, svcs::cli::UndoCommand, svcs::cli::VersionCommand, svcs::server::cli::HubCommand, svcs::server::cli::RepoCommand, svcs::server::cli::ServerBaseCommand, svcs::test::cli::HelpCommand, svcs::test::cli::utils::HelpCommand, svcs::test::cli::utils::HistoryCommand, svcs::test::cli::utils::InitCommand, svcs::test::cli::utils::RemoveCommand, svcs::test::cli::utils::SaveCommand, svcs::test::cli::utils::StatusCommand, svcs::test::cli::utils::UndoCommand, and svcs::test::cli::utils::VersionCommand.
|
nodiscardpure virtual |
Retrieves the unique name of the command (e.g., "init").
Implemented in svcs::cli::AddCommand, svcs::cli::BaseCommand, svcs::cli::BranchCommand, svcs::cli::ClearCommand, svcs::cli::HelpCommand, svcs::cli::HistoryCommand, svcs::cli::InitCommand, svcs::cli::MergeCommand, svcs::cli::RemoveCommand, svcs::cli::SaveCommand, svcs::cli::StatusCommand, svcs::cli::UndoCommand, svcs::cli::VersionCommand, svcs::server::cli::HubCommand, svcs::server::cli::RepoCommand, svcs::server::cli::ServerBaseCommand, svcs::test::cli::HelpCommand, svcs::test::cli::utils::HelpCommand, svcs::test::cli::utils::HistoryCommand, svcs::test::cli::utils::InitCommand, svcs::test::cli::utils::RemoveCommand, svcs::test::cli::utils::SaveCommand, svcs::test::cli::utils::StatusCommand, svcs::test::cli::utils::UndoCommand, and svcs::test::cli::utils::VersionCommand.
|
nodiscardpure virtual |
Retrieves the command's usage syntax.
Implemented in svcs::cli::AddCommand, svcs::cli::BaseCommand, svcs::cli::BranchCommand, svcs::cli::ClearCommand, svcs::cli::HelpCommand, svcs::cli::HistoryCommand, svcs::cli::InitCommand, svcs::cli::MergeCommand, svcs::cli::RemoveCommand, svcs::cli::SaveCommand, svcs::cli::StatusCommand, svcs::cli::UndoCommand, svcs::cli::VersionCommand, svcs::server::cli::HubCommand, svcs::server::cli::RepoCommand, svcs::server::cli::ServerBaseCommand, svcs::test::cli::HelpCommand, svcs::test::cli::utils::HelpCommand, svcs::test::cli::utils::HistoryCommand, svcs::test::cli::utils::InitCommand, svcs::test::cli::utils::RemoveCommand, svcs::test::cli::utils::SaveCommand, svcs::test::cli::utils::StatusCommand, svcs::test::cli::utils::UndoCommand, and svcs::test::cli::utils::VersionCommand.
|
pure virtual |
Displays detailed help information about the command (Usage and Description).
Implemented in svcs::cli::AddCommand, svcs::cli::BaseCommand, svcs::cli::BranchCommand, svcs::cli::ClearCommand, svcs::cli::HelpCommand, svcs::cli::HistoryCommand, svcs::cli::InitCommand, svcs::cli::MergeCommand, svcs::cli::RemoveCommand, svcs::cli::SaveCommand, svcs::cli::StatusCommand, svcs::cli::UndoCommand, svcs::cli::VersionCommand, svcs::server::cli::HubCommand, svcs::server::cli::RepoCommand, svcs::server::cli::ServerBaseCommand, svcs::test::cli::HelpCommand, svcs::test::cli::utils::HelpCommand, svcs::test::cli::utils::HistoryCommand, svcs::test::cli::utils::InitCommand, svcs::test::cli::utils::RemoveCommand, svcs::test::cli::utils::SaveCommand, svcs::test::cli::utils::StatusCommand, svcs::test::cli::utils::UndoCommand, and svcs::test::cli::utils::VersionCommand.