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

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

#include <BranchCommand.hxx>

Inheritance diagram for svcs::cli::BranchCommand:
svcs::cli::ICommand

Public Member Functions

 BranchCommand (std::shared_ptr< ISubject > event_bus, std::shared_ptr< BranchManager > branch_manager)
 Constructor for BranchCommand.
 ~BranchCommand () 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 branch 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 managing branches in the version control system.

Implements the 'svcs branch' functionality, providing an interface for the user to interact with the repository's branch structure.

Constructor & Destructor Documentation

◆ BranchCommand()

svcs::cli::BranchCommand::BranchCommand ( std::shared_ptr< ISubject > event_bus,
std::shared_ptr< BranchManager > branch_manager )

Constructor for BranchCommand.

Parameters
event_busThe event bus for user communication.
branch_managerThe branch manager for core operations.

Member Function Documentation

◆ execute()

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

Executes the branch command with given arguments.

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

Implements svcs::cli::ICommand.

◆ getDescription()

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

Gets the command description.

Returns
A brief description of the command.

Implements svcs::cli::ICommand.

◆ getName()

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

Gets the command name.

Returns
The command name "branch".

Implements svcs::cli::ICommand.

◆ getUsage()

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

Gets the command usage syntax.

Returns
The usage syntax string.

Implements svcs::cli::ICommand.

◆ showHelp()

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

Displays help information for the command.

Implements svcs::cli::ICommand.


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