Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_message.h

Issue 1842653006: Update //third_party/protobuf to version 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_message.h
diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_message.h b/third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_message.h
similarity index 70%
copy from third_party/protobuf/src/google/protobuf/compiler/java/java_message.h
copy to third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_message.h
index a30f020267557cc659f6e7d2921000a89a4d755f..281ec64fdda85767a75deef80487f4c884f563d1 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/java/java_message.h
+++ b/third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_message.h
@@ -32,12 +32,14 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_H__
-#define GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_H__
+#ifndef GOOGLE_PROTOBUF_COMPILER_JAVANANO_MESSAGE_H__
+#define GOOGLE_PROTOBUF_COMPILER_JAVANANO_MESSAGE_H__
#include <string>
+#include <google/protobuf/compiler/javanano/javanano_helpers.h>
+#include <google/protobuf/compiler/javanano/javanano_field.h>
+#include <google/protobuf/compiler/javanano/javanano_params.h>
#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/compiler/java/java_field.h>
namespace google {
namespace protobuf {
@@ -48,11 +50,11 @@ namespace protobuf {
namespace protobuf {
namespace compiler {
-namespace java {
+namespace javanano {
class MessageGenerator {
public:
- explicit MessageGenerator(const Descriptor* descriptor);
+ explicit MessageGenerator(const Descriptor* descriptor, const Params& params);
~MessageGenerator();
// All static variables have to be declared at the top-level of the file
@@ -67,46 +69,29 @@ class MessageGenerator {
// Generate the class itself.
void Generate(io::Printer* printer);
- // Generates the base interface that both the class and its builder implement
- void GenerateInterface(io::Printer* printer);
-
- // Generate code to register all contained extensions with an
- // ExtensionRegistry.
- void GenerateExtensionRegistrationCode(io::Printer* printer);
-
private:
- enum UseMemoization {
- MEMOIZE,
- DONT_MEMOIZE
- };
-
void GenerateMessageSerializationMethods(io::Printer* printer);
+ void GenerateMergeFromMethods(io::Printer* printer);
void GenerateParseFromMethods(io::Printer* printer);
void GenerateSerializeOneField(io::Printer* printer,
const FieldDescriptor* field);
- void GenerateSerializeOneExtensionRange(
- io::Printer* printer, const Descriptor::ExtensionRange* range);
-
- void GenerateBuilder(io::Printer* printer);
- void GenerateCommonBuilderMethods(io::Printer* printer);
- void GenerateDescriptorMethods(io::Printer* printer);
- void GenerateBuilderParsingMethods(io::Printer* printer);
- void GenerateIsInitialized(io::Printer* printer,
- UseMemoization useMemoization);
- void GenerateEqualsAndHashCode(io::Printer* printer);
- void GenerateParser(io::Printer* printer);
- void GenerateParsingConstructor(io::Printer* printer);
+ void GenerateClear(io::Printer* printer);
+ void GenerateFieldInitializers(io::Printer* printer);
+ void GenerateEquals(io::Printer* printer);
+ void GenerateHashCode(io::Printer* printer);
+ void GenerateClone(io::Printer* printer);
+ const Params& params_;
const Descriptor* descriptor_;
FieldGeneratorMap field_generators_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator);
};
-} // namespace java
+} // namespace javanano
} // namespace compiler
} // namespace protobuf
} // namespace google
-#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_H__
+#endif // GOOGLE_PROTOBUF_COMPILER_JAVANANO_MESSAGE_H__

Powered by Google App Engine
This is Rietveld 408576698