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

Command for removing files from the staging area. More...

#include <RemoveCommand.hxx>

Inheritance diagram for svcs::cli::RemoveCommand:
svcs::cli::ICommand

Public Member Functions

 RemoveCommand (std::shared_ptr< ISubject > subject, std::shared_ptr< RepositoryManager > repoManager)
 Constructs the RemoveCommand.
bool execute (const std::vector< std::string > &args) override
 Executes the remove 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 files from the staging area.

The RemoveCommand removes files from the staging area (index), effectively unstaging them while keeping the actual files intact.

Constructor & Destructor Documentation

◆ RemoveCommand()

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

Constructs the RemoveCommand.

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

Member Function Documentation

◆ execute()

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

Executes the remove command.

Parameters
argsCommand arguments - file paths to remove from staging.
Returns
true if remove succeeded, false otherwise.

Implements svcs::cli::ICommand.

◆ getDescription()

std::string svcs::cli::RemoveCommand::getDescription ( ) const
nodiscardoverridevirtual

Gets the description of the command.

Returns
"Remove files from staging area"

Implements svcs::cli::ICommand.

◆ getName()

std::string svcs::cli::RemoveCommand::getName ( ) const
inlinenodiscardoverridevirtual

Gets the name of the command.

Returns
"remove"

Implements svcs::cli::ICommand.

◆ getUsage()

std::string svcs::cli::RemoveCommand::getUsage ( ) const
nodiscardoverridevirtual

Gets the usage syntax of the command.

Returns
"svcs remove <file> [file2 ...]"

Implements svcs::cli::ICommand.

◆ showHelp()

void svcs::cli::RemoveCommand::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: