60 std::shared_ptr<ISubject> eventBus_;
69 std::shared_ptr<RepositoryManager> repoManager_;
84 std::shared_ptr<RepositoryManager> repoManager);
97 bool execute(
const std::vector<std::string>& args)
override;
108 [[nodiscard]] std::string
getName()
const override {
return "save"; }
130 [[nodiscard]] std::string
getUsage()
const override;
153 [[nodiscard]]
static std::string parseMessage(
const std::vector<std::string>& args);
166 [[nodiscard]]
bool validateMessage(
const std::string& message)
const;
177 [[nodiscard]]
bool hasStagedChanges()
const;
190 [[nodiscard]]
bool createSavePoint(
const std::string& message)
const;
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
std::string getName() const override
Gets the name of the command.
Definition SaveCommand.hxx:74
SaveCommand(std::shared_ptr< ISubject > subject, std::shared_ptr< RepositoryManager > repoManager)
Constructs the SaveCommand.
Definition SaveCommand.cxx:21
void showHelp() const override
Shows detailed help information for this command.
Definition SaveCommand.cxx:80
std::string getUsage() const override
Gets the usage syntax of the command.
Definition SaveCommand.cxx:76
bool execute(const std::vector< std::string > &args) override
Executes the save command.
Definition SaveCommand.cxx:26
std::string getDescription() const override
Gets the description of the command.
Definition SaveCommand.cxx:72
Command-line interface components and command implementations.
Core VCS data structures and object model.