Add a subcommand. Inherits INHERITABLE and OptionDefaults, and help flag
| 5481 | |
| 5482 | /// Add a subcommand. Inherits INHERITABLE and OptionDefaults, and help flag |
| 5483 | App *add_subcommand(std::string subcommand_name = "", std::string subcommand_description = "") { |
| 5484 | if (!subcommand_name.empty() && !detail::valid_name_string(subcommand_name)) { |
| 5485 | throw IncorrectConstruction("subcommand name is not valid"); |
| 5486 | } |
| 5487 | CLI::App_p subcom = std::shared_ptr<App>(new App(std::move(subcommand_description), subcommand_name, this)); |
| 5488 | return add_subcommand(std::move(subcom)); |
| 5489 | } |
| 5490 | |
| 5491 | /// Add a previously created app as a subcommand |
| 5492 | App *add_subcommand(CLI::App_p subcom) { |
no test coverage detected