58 std::shared_ptr<ISubject> eventBus_;
67 std::shared_ptr<RepositoryManager> repoManager_;
82 std::shared_ptr<RepositoryManager> repoManager);
95 bool execute(
const std::vector<std::string>& args)
override;
106 [[nodiscard]] std::string
getName()
const override {
return "clear"; }
128 [[nodiscard]] std::string
getUsage()
const override;
149 [[nodiscard]]
static bool confirmClear();
160 [[nodiscard]]
bool removeRepository()
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.
std::string getName() const override
Gets the name of the command.
Definition ClearCommand.hxx:73
std::string getDescription() const override
Gets the description of the command.
Definition ClearCommand.cxx:99
void showHelp() const override
Shows detailed help information for this command.
Definition ClearCommand.cxx:107
bool execute(const std::vector< std::string > &args) override
Executes the clear command.
Definition ClearCommand.cxx:26
ClearCommand(std::shared_ptr< ISubject > subject, std::shared_ptr< RepositoryManager > repoManager)
Constructs the ClearCommand.
Definition ClearCommand.cxx:21
std::string getUsage() const override
Gets the usage syntax of the command.
Definition ClearCommand.cxx:103
Interface (abstract base class) for all commands executed via the CLI.
Definition ICommand.hxx:34
Command-line interface components and command implementations.
Core VCS data structures and object model.