39using namespace svcs::core;
70 std::shared_ptr<ISubject> eventBus_;
79 std::shared_ptr<RepositoryManager> repoManager_;
94 std::shared_ptr<RepositoryManager> repoManager);
107 bool execute(
const std::vector<std::string>& args)
override;
118 [[nodiscard]] std::string
getName()
const override {
return "status"; }
140 [[nodiscard]] std::string
getUsage()
const override;
161 [[nodiscard]]
bool showFullStatus()
const;
174 [[nodiscard]]
bool showFileStatus(
const std::vector<std::string>& files)
const;
183 void showBranchInfo()
const;
192 void showStagedChanges()
const;
201 void showUnstagedChanges()
const;
210 void showUntrackedFiles()
const;
221 [[nodiscard]] std::string getCurrentBranch()
const;
234 [[nodiscard]]
bool isFileModified(
const std::filesystem::path& filePath)
const;
245 [[nodiscard]] std::vector<std::filesystem::path> findUntrackedFiles()
const;
260 [[nodiscard]]
static std::string formatFileStatus(
char status,
const std::string& filePath);
273 [[nodiscard]] std::pair<char, std::string> getFileStatus(
const std::string& filePath)
const;
Объявление интерфейса ICommand для всех исполняемых CLI команд.
Определяет интерфейс для компонента Subject (Издатель) шаблона Observer.
Declaration of the RepositoryManager class, managing all repository-level file operations.
Интерфейс (абстрактный базовый класс) для всех команд, выполняемых через CLI.
Определения ICommand.hxx:31
void showHelp() const override
Показывает подробную справочную информацию для этой команды.
Определения StatusCommand.cxx:129
std::string getUsage() const override
Получает синтаксис использования команды.
Определения StatusCommand.cxx:125
std::string getName() const override
Получает имя команды.
Определения StatusCommand.hxx:72
std::string getDescription() const override
Получает описание команды.
Определения StatusCommand.cxx:121
StatusCommand(std::shared_ptr< ISubject > subject, std::shared_ptr< RepositoryManager > repoManager)
Конструирует StatusCommand.
Определения StatusCommand.cxx:25
bool execute(const std::vector< std::string > &args) override
Выполняет команду status.
Определения StatusCommand.cxx:30
Компоненты командной строки и реализации команд.
Компоненты сервисного слоя и инфраструктурные сервисы.