| 354 | } |
| 355 | |
| 356 | std::string FlatCompiler::GetUsageString( |
| 357 | const std::string &program_name) const { |
| 358 | std::stringstream ss; |
| 359 | ss << "Usage: " << program_name |
| 360 | << " [OPTION]... FILE... [-- BINARY_FILE...]\n"; |
| 361 | |
| 362 | for (const FlatCOption &option : language_options) { |
| 363 | AppendOption(ss, option, 80, 25); |
| 364 | } |
| 365 | ss << "\n"; |
| 366 | |
| 367 | for (const FlatCOption &option : flatc_options) { |
| 368 | AppendOption(ss, option, 80, 25); |
| 369 | } |
| 370 | ss << "\n"; |
| 371 | |
| 372 | std::string files_description = |
| 373 | "FILEs may be schemas (must end in .fbs), binary schemas (must end in " |
| 374 | ".bfbs) or JSON files (conforming to preceding schema). BINARY_FILEs " |
| 375 | "after the -- must be binary flatbuffer format files. Output files are " |
| 376 | "named using the base file name of the input, and written to the current " |
| 377 | "directory or the path given by -o. example: " + |
| 378 | program_name + " -c -b schema1.fbs schema2.fbs data.json"; |
| 379 | AppendTextWrappedString(ss, files_description, 80, 0); |
| 380 | ss << "\n"; |
| 381 | return ss.str(); |
| 382 | } |
| 383 | |
| 384 | void FlatCompiler::AnnotateBinaries(const uint8_t *binary_schema, |
| 385 | const uint64_t binary_schema_size, |
nothing calls this directly
no test coverage detected