diff options
author | Derek Bailey <derekbailey@google.com> | 2021-12-13 13:56:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-13 13:56:47 -0800 |
commit | 3cbc120a08edf6db9ab8f5c2c44f8a40be70d6bc (patch) | |
tree | d8fec48bc3e570437f3398264d8632bbd392fec7 /include | |
parent | 8dcd2682c7596ac0e5c4fe5cf46298f7148f447c (diff) | |
download | flatbuffers-3cbc120a08edf6db9ab8f5c2c44f8a40be70d6bc.tar.gz flatbuffers-3cbc120a08edf6db9ab8f5c2c44f8a40be70d6bc.tar.bz2 flatbuffers-3cbc120a08edf6db9ab8f5c2c44f8a40be70d6bc.zip |
Refractor Flatc Options (#6987)
* Moved error/warnings to bottom of std error
* Refactor flatc options
* pass program name to flatc
* extra -- in one option
* merge of upstream
Diffstat (limited to 'include')
-rw-r--r-- | include/flatbuffers/flatc.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/flatbuffers/flatc.h b/include/flatbuffers/flatc.h index c6a651be..a9eacf01 100644 --- a/include/flatbuffers/flatc.h +++ b/include/flatbuffers/flatc.h @@ -31,6 +31,13 @@ namespace flatbuffers { extern void LogCompilerWarn(const std::string &warn); extern void LogCompilerError(const std::string &err); +struct FlatCOption { + std::string short_opt; + std::string long_opt; + std::string parameter; + std::string description; +}; + class FlatCompiler { public: // Output generator for the various programming languages and formats we @@ -44,13 +51,11 @@ class FlatCompiler { const std::string &file_name); GenerateFn generate; - const char *generator_opt_short; - const char *generator_opt_long; const char *lang_name; bool schema_only; GenerateFn generateGRPC; flatbuffers::IDLOptions::Language lang; - const char *generator_help; + FlatCOption option; MakeRuleFn make_rule; BfbsGenerator *bfbs_generator; }; |