Check to see if a subcommand is part of this command and get a shared_ptr to it
| 5543 | |
| 5544 | /// Check to see if a subcommand is part of this command and get a shared_ptr to it |
| 5545 | CLI::App_p get_subcommand_ptr(App *subcom) const { |
| 5546 | if (subcom == nullptr) throw OptionNotFound("nullptr passed"); |
| 5547 | for (const App_p &subcomptr : subcommands_) |
| 5548 | if (subcomptr.get() == subcom) return subcomptr; |
| 5549 | throw OptionNotFound(subcom->get_name()); |
| 5550 | } |
| 5551 | |
| 5552 | /// Check to see if a subcommand is part of this command (text version) |
| 5553 | CLI::App_p get_subcommand_ptr(std::string subcom) const { |
no test coverage detected