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);
Объявление интерфейса ICommand для всех исполняемых CLI команд.
Определяет интерфейс для компонента Subject (Издатель) шаблона Observer.
Declaration of the RepositoryManager class, managing all repository-level file operations.
HistoryCommand(std::shared_ptr< ISubject > subject, std::shared_ptr< RepositoryManager > repoManager)
Конструктор для HistoryCommand.
Определения HistoryCommand.cxx:22
std::string getDescription() const override
Получает краткое описание команды.
Определения HistoryCommand.cxx:75
void showHelp() const override
Отображает подробную справочную информацию для команды.
Определения HistoryCommand.cxx:83
std::string getName() const override
Получает имя команды.
Определения HistoryCommand.hxx:69
std::string getUsage() const override
Получает синтаксис использования команды.
Определения HistoryCommand.cxx:79
bool execute(const std::vector< std::string > &args) override
Выполняет команду "history" с заданными аргументами.
Определения HistoryCommand.cxx:27
Интерфейс (абстрактный базовый класс) для всех команд, выполняемых через CLI.
Определения ICommand.hxx:31
Компоненты командной строки и реализации команд.
Основные структуры данных СКВ и модель объектов.