Implemented option --scoped-enum for C++ generator

This generates C++11 style scoped and strongly typed enums.
Enabling this option also implies --no-prefix.
This commit is contained in:
vijairaj
2015-09-15 13:41:29 +05:30
parent 169df65df4
commit c02b16e195
5 changed files with 32 additions and 6 deletions

View File

@@ -425,6 +425,7 @@ struct GeneratorOptions {
int indent_step;
bool output_enum_identifiers;
bool prefixed_enums;
bool scoped_enums;
bool include_dependence_headers;
bool mutable_buffer;
bool one_file;
@@ -437,7 +438,7 @@ struct GeneratorOptions {
GeneratorOptions() : strict_json(false),
output_default_scalars_in_json(false),
indent_step(2),
output_enum_identifiers(true), prefixed_enums(true),
output_enum_identifiers(true), prefixed_enums(true), scoped_enums(false),
include_dependence_headers(true),
mutable_buffer(false),
one_file(false),