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

Command for merging branches in the version control system. More...

#include <MergeCommand.hxx>

Inheritance diagram for svcs::cli::MergeCommand:
svcs::cli::ICommand

Public Member Functions

 MergeCommand (std::shared_ptr< ISubject > event_bus, std::shared_ptr< RepositoryManager > repo_manager)
 Constructs a MergeCommand with event bus and repository manager.
 ~MergeCommand () override=default
 Destructor.
std::string getName () const override
 Gets the command name.
std::string getDescription () const override
 Gets the command description.
std::string getUsage () const override
 Gets the command usage syntax.
bool execute (const std::vector< std::string > &args) override
 Executes the merge command with given arguments.
void showHelp () const override
 Displays help information for the command.
Public Member Functions inherited from svcs::cli::ICommand
virtual ~ICommand ()=default
 Virtual destructor.

Detailed Description

Command for merging branches in the version control system.

Constructor & Destructor Documentation

◆ MergeCommand()

svcs::cli::MergeCommand::MergeCommand ( std::shared_ptr< ISubject > event_bus,
std::shared_ptr< RepositoryManager > repo_manager )

Constructs a MergeCommand with event bus and repository manager.

Parameters
event_busThe event bus for notifications
repo_managerThe repository manager for merge operations

Member Function Documentation

◆ execute()

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

Executes the merge command with given arguments.

Parameters
argsCommand line arguments
Returns
true if execution succeeded, false otherwise

Implements svcs::cli::ICommand.

◆ getDescription()

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

Gets the command description.

Returns
A brief description of the command

Implements svcs::cli::ICommand.

◆ getName()

std::string svcs::cli::MergeCommand::getName ( ) const
nodiscardoverridevirtual

Gets the command name.

Returns
The command name "merge"

Implements svcs::cli::ICommand.

◆ getUsage()

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

Gets the command usage syntax.

Returns
The usage syntax string

Implements svcs::cli::ICommand.

◆ showHelp()

void svcs::cli::MergeCommand::showHelp ( ) const
overridevirtual

Displays help information for the command.

Implements svcs::cli::ICommand.


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