aboutsummaryrefslogtreecommitdiffstats
path: root/src/google/protobuf/compiler/cpp/cpp_enum_field.h
diff options
context:
space:
mode:
authorJeff Davidson <jpd@google.com>2015-01-16 00:06:01 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-01-16 00:06:01 +0000
commitc346ca161fce1976ee044960d7b0316767a91d31 (patch)
tree3cecb8acc160fc13944e75d1d97af0afcbd4edc4 /src/google/protobuf/compiler/cpp/cpp_enum_field.h
parentb2a9d4321578139677c146ce37eba5e27e8f5c79 (diff)
parentc4616e7140586f06dce57a7fe970a22832f50ccc (diff)
downloadexternal_protobuf-c346ca161fce1976ee044960d7b0316767a91d31.zip
external_protobuf-c346ca161fce1976ee044960d7b0316767a91d31.tar.gz
external_protobuf-c346ca161fce1976ee044960d7b0316767a91d31.tar.bz2
am c4616e71: am 77a6b2f4: Merge "Update protobuf library from 2.3 to 2.6."
* commit 'c4616e7140586f06dce57a7fe970a22832f50ccc': Update protobuf library from 2.3 to 2.6.
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_enum_field.h')
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_enum_field.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_enum_field.h b/src/google/protobuf/compiler/cpp/cpp_enum_field.h
index 0793430..1da1623 100644
--- a/src/google/protobuf/compiler/cpp/cpp_enum_field.h
+++ b/src/google/protobuf/compiler/cpp/cpp_enum_field.h
@@ -46,7 +46,8 @@ namespace cpp {
class EnumFieldGenerator : public FieldGenerator {
public:
- explicit EnumFieldGenerator(const FieldDescriptor* descriptor);
+ explicit EnumFieldGenerator(const FieldDescriptor* descriptor,
+ const Options& options);
~EnumFieldGenerator();
// implements FieldGenerator ---------------------------------------
@@ -62,16 +63,34 @@ class EnumFieldGenerator : public FieldGenerator {
void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const;
void GenerateByteSize(io::Printer* printer) const;
- private:
+ protected:
const FieldDescriptor* descriptor_;
map<string, string> variables_;
+ private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator);
};
+class EnumOneofFieldGenerator : public EnumFieldGenerator {
+ public:
+ explicit EnumOneofFieldGenerator(const FieldDescriptor* descriptor,
+ const Options& options);
+ ~EnumOneofFieldGenerator();
+
+ // implements FieldGenerator ---------------------------------------
+ void GenerateInlineAccessorDefinitions(io::Printer* printer) const;
+ void GenerateClearingCode(io::Printer* printer) const;
+ void GenerateSwappingCode(io::Printer* printer) const;
+ void GenerateConstructorCode(io::Printer* printer) const;
+
+ private:
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumOneofFieldGenerator);
+};
+
class RepeatedEnumFieldGenerator : public FieldGenerator {
public:
- explicit RepeatedEnumFieldGenerator(const FieldDescriptor* descriptor);
+ explicit RepeatedEnumFieldGenerator(const FieldDescriptor* descriptor,
+ const Options& options);
~RepeatedEnumFieldGenerator();
// implements FieldGenerator ---------------------------------------