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