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__ |