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

Method make_option_usage

simcore/framework/src/cli/cli.hpp:8095–8105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8093inline std::string Formatter::make_option_desc(const Option *opt) const { return opt->get_description(); }
8094
8095inline std::string Formatter::make_option_usage(const Option *opt) const {
8096 // Note that these are positionals usages
8097 std::stringstream out;
8098 out << make_option_name(opt, true);
8099 if (opt->get_expected_max() >= detail::expected_max_vector_size)
8100 out << "...";
8101 else if (opt->get_expected_max() > 1)
8102 out << "(" << opt->get_expected() << "x)";
8103
8104 return opt->get_required() ? out.str() : "[" + out.str() + "]";
8105}
8106
8107} // namespace CLI

Callers

nothing calls this directly

Calls 4

get_expected_maxMethod · 0.80
get_expectedMethod · 0.80
strMethod · 0.80
get_requiredMethod · 0.45

Tested by

no test coverage detected