MCPcopy Create free account
hub / github.com/catboost/catboost / GetShortUsageString

Method GetShortUsageString

contrib/libs/flatbuffers/src/flatc.cpp:333–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331}
332
333std::string FlatCompiler::GetShortUsageString(
334 const std::string &program_name) const {
335 std::stringstream ss;
336 ss << "Usage: " << program_name << " [";
337
338 for (const FlatCOption &option : language_options) {
339 AppendShortOption(ss, option);
340 ss << ", ";
341 }
342
343 for (const FlatCOption &option : flatc_options) {
344 AppendShortOption(ss, option);
345 ss << ", ";
346 }
347
348 ss.seekp(-2, ss.cur);
349 ss << "]... FILE... [-- BINARY_FILE...]";
350 std::string help = ss.str();
351 std::stringstream ss_textwrap;
352 AppendTextWrappedString(ss_textwrap, help, 80, 0);
353 return ss_textwrap.str();
354}
355
356std::string FlatCompiler::GetUsageString(
357 const std::string &program_name) const {

Callers 1

ErrorFunction · 0.80

Calls 3

AppendShortOptionFunction · 0.85
AppendTextWrappedStringFunction · 0.85
strMethod · 0.45

Tested by

no test coverage detected