MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / get_subcommand_ptr

Method get_subcommand_ptr

simcore/framework/src/cli/cli.hpp:5545–5550  ·  view source on GitHub ↗

Check to see if a subcommand is part of this command and get a shared_ptr to it

Source from the content-addressed store, hash-verified

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 {

Callers 1

add_subcommandMethod · 0.80

Calls 6

OptionNotFoundClass · 0.85
to_stringFunction · 0.85
getMethod · 0.45
get_nameMethod · 0.45
check_nameMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected