| 331 | } |
| 332 | |
| 333 | std::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 | |
| 356 | std::string FlatCompiler::GetUsageString( |
| 357 | const std::string &program_name) const { |
no test coverage detected