22 Command(CLI::App &parent_app,
const std::string &name,
const std::string &desc,
const std::string &group)
29 app_ = parent_app.add_subcommand(name, desc);
36 app_->callback([
this] { this->
Run(); });
47 if (app_ ==
nullptr) {
54 virtual void Run() = 0;
Command is an abstract class that provides basic command functionality for the Porytiles CLI driver.
Command & operator=(const Command &)=delete
Command(const Command &)=delete
Command(Command &&)=delete
virtual ~Command()=default
Command(CLI::App &parent_app, const std::string &name, const std::string &desc, const std::string &group)
CLI::App & get_app() const
Command & operator=(Command &&)=delete
void panic(const StringViewSourceLoc &s)
Unconditionally terminates the program with a panic message.
void assert_or_panic(const bool condition, const StringViewSourceLoc &s)
Conditionally panics if the given condition is false.