diff options
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_field.h')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_field.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_field.h b/src/google/protobuf/compiler/cpp/cpp_field.h index 7e7c7f83..00ec2c7c 100644 --- a/src/google/protobuf/compiler/cpp/cpp_field.h +++ b/src/google/protobuf/compiler/cpp/cpp_field.h @@ -35,6 +35,9 @@ #ifndef GOOGLE_PROTOBUF_COMPILER_CPP_FIELD_H__ #define GOOGLE_PROTOBUF_COMPILER_CPP_FIELD_H__ +#include <map> +#include <string> + #include <google/protobuf/stubs/common.h> #include <google/protobuf/descriptor.h> @@ -49,6 +52,13 @@ namespace protobuf { namespace compiler { namespace cpp { +// Helper function: set variables in the map that are the same for all +// field code generators. +// ['name', 'index', 'number', 'classname', 'declared_type', 'tag_size', +// 'deprecation']. +void SetCommonFieldVariables(const FieldDescriptor* descriptor, + map<string, string>* variables); + class FieldGenerator { public: FieldGenerator() {} |