78 std::shared_ptr<RepositoryManager> repoManager);
95 bool execute(
const std::vector<std::string>& args)
override;
106 [[nodiscard]] std::string
getName()
const override;
128 [[nodiscard]] std::string
getUsage()
const override;
151 bool undoLastCommit(
bool force)
const;
166 bool undoSpecificCommit(
const std::string& commitHash,
bool force)
const;
185 static bool confirmUndo(
const std::string& commitMessage,
const std::string& commitHash,
bool force);
196 bool forceResetRepository()
const;
206 std::shared_ptr<ISubject> event_bus;
215 std::shared_ptr<RepositoryManager> repo_manager;
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 command's primary name.
Definition UndoCommand.cxx:27
void showHelp() const override
Displays detailed help information for the command.
Definition UndoCommand.cxx:265
std::string getDescription() const override
Gets the short description of the command.
Definition UndoCommand.cxx:31
bool execute(const std::vector< std::string > &args) override
Executes the undo command based on the provided arguments.
Definition UndoCommand.cxx:39
std::string getUsage() const override
Gets the usage syntax of the command.
Definition UndoCommand.cxx:35
UndoCommand(std::shared_ptr< ISubject > subject, std::shared_ptr< RepositoryManager > repoManager)
Constructor for UndoCommand.
Definition UndoCommand.cxx:22
Command-line interface components and command implementations.
Core VCS data structures and object model.