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

Method add_subcommand

simcore/framework/src/cli/cli.hpp:7334–7339  ·  view source on GitHub ↗

Add an existing subcommand to be a member of an option_group

Source from the content-addressed store, hash-verified

7332 using App::add_subcommand;
7333 /// Add an existing subcommand to be a member of an option_group
7334 App *add_subcommand(App *subcom) {
7335 App_p subc = subcom->get_parent()->get_subcommand_ptr(subcom);
7336 subc->get_parent()->remove_subcommand(subcom);
7337 add_subcommand(std::move(subc));
7338 return subcom;
7339 }
7340};
7341/// Helper function to enable one option group/subcommand when another is used
7342inline void TriggerOn(App *trigger_app, App *app_to_enable) {

Callers

nothing calls this directly

Calls 3

get_subcommand_ptrMethod · 0.80
get_parentMethod · 0.80
remove_subcommandMethod · 0.80

Tested by

no test coverage detected