84 std::shared_ptr<RepositoryManager> repo_manager);
106 [[nodiscard]]
virtual std::string
getName()
const override = 0;
119 [[nodiscard]]
virtual std::string
getDescription()
const override = 0;
132 [[nodiscard]]
virtual std::string
getUsage()
const override = 0;
147 virtual bool execute(
const std::vector<std::string>& args)
override = 0;
158 virtual void showHelp()
const override = 0;
172 void notifyInfo(
const std::string& message)
const;
185 void notifyError(
const std::string& message)
const;
Defines the event structure used for the Observer pattern notifications.
Declaration of the ICommand interface for all executable CLI commands.
Defines the interface for the Subject (Publisher) component of the Observer pattern.
Declaration of the RepositoryManager class, managing all repository-level file operations.
Interface (abstract base class) for all commands executed via the CLI.
Definition ICommand.hxx:34
virtual std::string getDescription() const override=0
Pure virtual method to get the command description.
virtual ~ServerBaseCommand()=default
Virtual destructor for proper cleanup of derived classes.
virtual std::string getName() const override=0
Pure virtual method to get the command name.
std::shared_ptr< ISubject > event_bus_
Shared pointer to the event bus for system notifications.
Definition ServerBaseCommand.hxx:126
virtual std::string getUsage() const override=0
Pure virtual method to get the command usage syntax.
void notifyInfo(const std::string &message) const
Sends an informational notification via the event bus.
Definition ServerBaseCommand.cxx:24
virtual void showHelp() const override=0
Pure virtual method to display detailed help information.
ServerBaseCommand(std::shared_ptr< ISubject > event_bus, std::shared_ptr< RepositoryManager > repo_manager)
Constructs a ServerBaseCommand with necessary dependencies.
Definition ServerBaseCommand.cxx:17
virtual bool execute(const std::vector< std::string > &args) override=0
Pure virtual method to execute the command logic.
std::shared_ptr< RepositoryManager > repo_manager_
Shared pointer to the repository manager for repository operations.
Definition ServerBaseCommand.hxx:132
void notifyError(const std::string &message) const
Sends an error notification via the event bus.
Definition ServerBaseCommand.cxx:31
Command-line interface components and command implementations.
Core VCS data structures and object model.
Server administration command-line interface components.
Service layer components and infrastructure services.