Index: third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h |
diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h |
index a5ed68a5c4265d556281318cdcab6050d813aae3..35efd0fa7c06c823632b146e199f058b894f283b 100644 |
--- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h |
+++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h |
@@ -1,6 +1,6 @@ |
// Protocol Buffers - Google's data interchange format |
// Copyright 2008 Google Inc. All rights reserved. |
-// http://code.google.com/p/protobuf/ |
+// https://developers.google.com/protocol-buffers/ |
// |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
@@ -52,8 +52,12 @@ class MessageFieldGenerator : public FieldGenerator { |
// implements FieldGenerator --------------------------------------- |
void GeneratePrivateMembers(io::Printer* printer) const; |
+ void GenerateDependentAccessorDeclarations(io::Printer* printer) const; |
void GenerateAccessorDeclarations(io::Printer* printer) const; |
- void GenerateInlineAccessorDefinitions(io::Printer* printer) const; |
+ void GenerateDependentInlineAccessorDefinitions(io::Printer* printer) const; |
+ void GenerateInlineAccessorDefinitions(io::Printer* printer, |
+ bool is_inline) const; |
+ void GenerateNonInlineAccessorDefinitions(io::Printer* printer) const; |
void GenerateClearingCode(io::Printer* printer) const; |
void GenerateMergingCode(io::Printer* printer) const; |
void GenerateSwappingCode(io::Printer* printer) const; |
@@ -63,13 +67,47 @@ class MessageFieldGenerator : public FieldGenerator { |
void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; |
void GenerateByteSize(io::Printer* printer) const; |
- private: |
+ protected: |
+ void GenerateArenaManipulationCode(const map<string, string>& variables, |
+ io::Printer* printer) const; |
+ |
+ virtual void GenerateGetterDeclaration(io::Printer* printer) const; |
+ |
const FieldDescriptor* descriptor_; |
+ const bool dependent_field_; |
map<string, string> variables_; |
+ private: |
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator); |
}; |
+class MessageOneofFieldGenerator : public MessageFieldGenerator { |
+ public: |
+ explicit MessageOneofFieldGenerator(const FieldDescriptor* descriptor, |
+ const Options& options); |
+ ~MessageOneofFieldGenerator(); |
+ |
+ // implements FieldGenerator --------------------------------------- |
+ void GenerateDependentAccessorDeclarations(io::Printer* printer) const; |
+ void GenerateDependentInlineAccessorDefinitions(io::Printer* printer) const; |
+ void GenerateInlineAccessorDefinitions(io::Printer* printer, |
+ bool is_inline) const; |
+ void GenerateNonInlineAccessorDefinitions(io::Printer* printer) const; |
+ void GenerateClearingCode(io::Printer* printer) const; |
+ void GenerateSwappingCode(io::Printer* printer) const; |
+ void GenerateConstructorCode(io::Printer* printer) const; |
+ |
+ protected: |
+ void GenerateGetterDeclaration(io::Printer* printer) const; |
+ |
+ private: |
+ void InternalGenerateInlineAccessorDefinitions( |
+ const map<string, string>& variables, io::Printer* printer) const; |
+ |
+ const bool dependent_base_; |
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageOneofFieldGenerator); |
+}; |
+ |
class RepeatedMessageFieldGenerator : public FieldGenerator { |
public: |
explicit RepeatedMessageFieldGenerator(const FieldDescriptor* descriptor, |
@@ -78,8 +116,11 @@ class RepeatedMessageFieldGenerator : public FieldGenerator { |
// implements FieldGenerator --------------------------------------- |
void GeneratePrivateMembers(io::Printer* printer) const; |
+ void GenerateDependentAccessorDeclarations(io::Printer* printer) const; |
void GenerateAccessorDeclarations(io::Printer* printer) const; |
- void GenerateInlineAccessorDefinitions(io::Printer* printer) const; |
+ void GenerateDependentInlineAccessorDefinitions(io::Printer* printer) const; |
+ void GenerateInlineAccessorDefinitions(io::Printer* printer, |
+ bool is_inline) const; |
void GenerateClearingCode(io::Printer* printer) const; |
void GenerateMergingCode(io::Printer* printer) const; |
void GenerateSwappingCode(io::Printer* printer) const; |
@@ -90,7 +131,12 @@ class RepeatedMessageFieldGenerator : public FieldGenerator { |
void GenerateByteSize(io::Printer* printer) const; |
private: |
+ void InternalGenerateTypeDependentAccessorDeclarations( |
+ io::Printer* printer) const; |
+ |
const FieldDescriptor* descriptor_; |
+ const bool dependent_field_; |
+ const bool dependent_getter_; |
map<string, string> variables_; |
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedMessageFieldGenerator); |