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

Method make_help

simcore/framework/src/cli/cli.hpp:7976–7996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7974}
7975
7976inline std::string Formatter::make_help(const App *app, std::string name, AppFormatMode mode) const {
7977 // This immediately forwards to the make_expanded method. This is done this way so that subcommands can
7978 // have overridden formatters
7979 if (mode == AppFormatMode::Sub) return make_expanded(app);
7980
7981 std::stringstream out;
7982 if ((app->get_name().empty()) && (app->get_parent() != nullptr)) {
7983 if (app->get_group() != "Subcommands") {
7984 out << app->get_group() << ':';
7985 }
7986 }
7987
7988 out << make_description(app);
7989 out << make_usage(app, name);
7990 out << make_positionals(app);
7991 out << make_groups(app, mode);
7992 out << make_subcommands(app, mode);
7993 out << '\n' << make_footer(app);
7994
7995 return out.str();
7996}
7997
7998inline std::string Formatter::make_subcommands(const App *app, AppFormatMode mode) const {
7999 std::stringstream out;

Callers 1

helpMethod · 0.45

Calls 4

get_parentMethod · 0.80
strMethod · 0.80
emptyMethod · 0.45
get_nameMethod · 0.45

Tested by

no test coverage detected