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

Method add_subcommand

simcore/framework/src/cli/cli.hpp:5483–5489  ·  view source on GitHub ↗

Add a subcommand. Inherits INHERITABLE and OptionDefaults, and help flag

Source from the content-addressed store, hash-verified

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) {

Callers 7

ConfCmdMethod · 0.45
ConfShowMethod · 0.45
ConfRestoreMethod · 0.45
ConfRmMethod · 0.45
ConfUpdMethod · 0.45
ConfAddMethod · 0.45
ConfSetSysMethod · 0.45

Calls 7

valid_name_stringFunction · 0.85
OptionAlreadyAddedClass · 0.85
backMethod · 0.80
emptyMethod · 0.45
push_backMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected