Prefixing of enum value identifiers in C++ is now optional.

See -P option to flatc.

Bug: 16814856
Change-Id: I855973df6afa27e0efa27cf9c4b4aee8a1fcdd22
Tested: on OS X.
This commit is contained in:
Wouter van Oortmerssen
2014-08-21 16:11:18 -07:00
parent 51ba48ae40
commit ffb3dec573
4 changed files with 29 additions and 11 deletions

View File

@@ -90,6 +90,7 @@ static void Error(const char *err, const char *obj, bool usage) {
printf(" -%s %s.\n", generators[i].extension, generators[i].help);
printf(" -o PATH Prefix PATH to all generated files.\n"
" -S Strict JSON: add quotes to field names.\n"
" -P Don\'t prefix enum values with the enum name in C++.\n"
"FILEs may depend on declarations in earlier files.\n"
"FILEs after the -- must be binary flatbuffer format files.\n"
"Output files are named using the base file name of the input,"
@@ -129,6 +130,9 @@ int main(int argc, const char *argv[]) {
case 'S':
opts.strict_json = true;
break;
case 'P':
opts.prefixed_enums = false;
break;
case '-': // Separator between text and binary input files.
binary_files_from = filenames.size();
break;