SVCS - English Documentation
Loading...
Searching...
No Matches
svcs::cli::ClearCommand Class Reference

Command for removing SVCS repository structure. More...

#include <ClearCommand.hxx>

Inheritance diagram for svcs::cli::ClearCommand:
svcs::cli::ICommand

Public Member Functions

 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.

Detailed Description

Command for removing SVCS repository structure.

The ClearCommand safely removes the .svcs directory and all repository data.

Constructor & Destructor Documentation

◆ ClearCommand()

svcs::cli::ClearCommand::ClearCommand ( std::shared_ptr< ISubject > subject,
std::shared_ptr< RepositoryManager > repoManager )

Constructs the ClearCommand.

Parameters
subjectShared pointer to the event bus for notifications.
repoManagerShared pointer to the repository manager.

Member Function Documentation

◆ execute()

bool svcs::cli::ClearCommand::execute ( const std::vector< std::string > & args)
overridevirtual

Executes the clear command.

Parameters
argsCommand 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

Gets the name of the command.

Returns
"clear"

Implements svcs::cli::ICommand.

◆ 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

Shows detailed help information for this command.

Implements svcs::cli::ICommand.


The documentation for this class was generated from the following files: