#pragma once #include "CommandCopy.cpp" #include "CommandLink.cpp" #include "CommandList.cpp" #include "CommandListDisks.cpp" #include "CommandMove.cpp" #include "CommandRead.cpp" #include "CommandRemove.cpp" #include "CommandWrite.cpp" #include #include #include #include #include #include namespace DB { using CommandPtr = std::unique_ptr; class DisksApp : public Poco::Util::Application, public Loggers { public: DisksApp() = default; void init(std::vector & common_arguments); int main(const std::vector & args) override; protected: static String getDefaultConfigFileName(); void addOptions( std::optional & options_description, boost::program_options::positional_options_description & positional_options_description); void processOptions(); void printHelpMessage(std::optional & command_option_description); size_t findCommandPos(std::vector & common_arguments); private: void parseAndCheckOptions( std::optional & options_description, boost::program_options::positional_options_description & positional_options_description, std::vector & arguments); protected: ContextMutablePtr global_context; SharedContextHolder shared_context; String command_name; std::vector command_flags; std::unordered_set supported_commands; std::unordered_map command_descriptions; po::variables_map options; }; }