62 std::shared_ptr<ISubject> eventBus_;
71 std::shared_ptr<RepositoryManager> repoManager_;
86 std::shared_ptr<RepositoryManager> repoManager);
103 bool execute(
const std::vector<std::string>& args)
override;
114 [[nodiscard]] std::string
getName()
const override {
return "history"; }
136 [[nodiscard]] std::string
getUsage()
const override;
165 bool parseArguments(
const std::vector<std::string>& args,
166 bool& showOneline,
int& limit,
bool& showFull)
const;
177 void showDefaultHistory(
const std::vector<CommitInfo>& entries)
const;
188 void showOnelineHistory(
const std::vector<CommitInfo>& entries)
const;
199 void showDetailedHistory(
const std::vector<CommitInfo>& entries)
const;
212 [[nodiscard]]
static std::string formatTimestamp(
const std::string& timestamp);
227 [[nodiscard]]
static std::string truncateString(
const std::string& str,
size_t length);
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.
HistoryCommand(std::shared_ptr< ISubject > subject, std::shared_ptr< RepositoryManager > repoManager)
Constructor for HistoryCommand.
Definition HistoryCommand.cxx:23
std::string getDescription() const override
Gets a brief description of the command.
Definition HistoryCommand.cxx:76
void showHelp() const override
Displays the detailed help information for the command.
Definition HistoryCommand.cxx:84
std::string getName() const override
Gets the name of the command.
Definition HistoryCommand.hxx:77
std::string getUsage() const override
Gets the command's usage syntax.
Definition HistoryCommand.cxx:80
bool execute(const std::vector< std::string > &args) override
Executes the "history" command with the given arguments.
Definition HistoryCommand.cxx:28
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.