| Index: third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h
|
| diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h
|
| index f3aa72e4409addc31e1507826e31cf5ff8297812..90edf0017d55eb2637b7f3566c58e8cc3b9cbe15 100644
|
| --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h
|
| +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h
|
| @@ -35,12 +35,12 @@
|
| #ifndef GOOGLE_PROTOBUF_COMPILER_CPP_ENUM_H__
|
| #define GOOGLE_PROTOBUF_COMPILER_CPP_ENUM_H__
|
|
|
| +#include <map>
|
| #include <set>
|
| #include <string>
|
| #include <google/protobuf/compiler/cpp/cpp_options.h>
|
| #include <google/protobuf/descriptor.h>
|
|
|
| -
|
| namespace google {
|
| namespace protobuf {
|
| namespace io {
|
| @@ -55,8 +55,7 @@ namespace cpp {
|
| class EnumGenerator {
|
| public:
|
| // See generator.cc for the meaning of dllexport_decl.
|
| - explicit EnumGenerator(const EnumDescriptor* descriptor,
|
| - const Options& options);
|
| + EnumGenerator(const EnumDescriptor* descriptor, const Options& options);
|
| ~EnumGenerator();
|
|
|
| // Header stuff.
|
| @@ -64,8 +63,10 @@ class EnumGenerator {
|
| // Fills the name to use when declaring the enum. This is for use when
|
| // generating other .proto.h files. This code should be placed within the
|
| // enum's package namespace, but NOT within any class, even for nested
|
| - // enums.
|
| - void FillForwardDeclaration(set<string>* enum_names);
|
| + // enums. A given key in enum_names will map from an enum class name to the
|
| + // EnumDescriptor that was responsible for its inclusion in the map. This can
|
| + // be used to associate the descriptor with the code generated for it.
|
| + void FillForwardDeclaration(map<string, const EnumDescriptor*>* enum_names);
|
|
|
| // Generate header code defining the enum. This code should be placed
|
| // within the enum's package namespace, but NOT within any class, even for
|
| @@ -94,10 +95,10 @@ class EnumGenerator {
|
|
|
| private:
|
| const EnumDescriptor* descriptor_;
|
| - string classname_;
|
| - Options options_;
|
| + const string classname_;
|
| + const Options& options_;
|
| // whether to generate the *_ARRAYSIZE constant.
|
| - bool generate_array_size_;
|
| + const bool generate_array_size_;
|
|
|
| GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator);
|
| };
|
|
|