- `--force-empty-vectors` : When serializing from object API representation, force
vectors to empty rather than null.
+- `--flexbuffers` : Used with "binary" and "json" options, it generates
+ data using schema-less FlexBuffers.
+
+- `--no-warnings` : Inhibit all warning messages.
+
NOTE: short-form options for generators are deprecated, use the long form
whenever possible.
std::string proto_namespace_suffix;
std::string filename_suffix;
std::string filename_extension;
+ bool no_warnings;
// Possible options for the more general generator below.
enum Language {
cs_gen_json_serializer(false),
filename_suffix("_generated"),
filename_extension(),
+ no_warnings(false),
lang(IDLOptions::kJava),
mini_reflect(IDLOptions::kNone),
require_explicit_ids(false),
" force vectors to empty rather than null.\n"
" --flexbuffers Used with \"binary\" and \"json\" options, it generates\n"
" data using schema-less FlexBuffers.\n"
+ " --no-warnings Inhibit all warning messages.\n"
"FILEs may be schemas (must end in .fbs), binary schemas (must end in .bfbs),\n"
"or JSON files (conforming to preceding schema). FILEs after the -- must be\n"
"binary flatbuffer format files.\n"
opts.use_flexbuffers = true;
} else if (arg == "--gen-jvmstatic") {
opts.gen_jvmstatic = true;
+ } else if (arg == "--no-warnings") {
+ opts.no_warnings = true;
} else if (arg == "--cpp-std") {
if (++argi >= argc)
Error("missing C++ standard specification" + arg, true);
error_ += ": " + msg;
}
-void Parser::Warning(const std::string &msg) { Message("warning: " + msg); }
+void Parser::Warning(const std::string &msg) {
+ if (!opts.no_warnings)
+ Message("warning: " + msg);
+}
CheckedError Parser::Error(const std::string &msg) {
Message("error: " + msg);