Index: third_party/protobuf/src/google/protobuf/compiler/python/python_generator.h |
diff --git a/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.h b/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.h |
index a3f22cee6197ed58f834ee6262b30c987ede722b..aa0f5fced68e01a1cea8ed8036a686958579fe6b 100644 |
--- a/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.h |
+++ b/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.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 |
@@ -38,6 +38,7 @@ |
#include <string> |
#include <google/protobuf/compiler/code_generator.h> |
+#include <google/protobuf/stubs/mutex.h> |
#include <google/protobuf/stubs/common.h> |
namespace google { |
@@ -94,8 +95,11 @@ class LIBPROTOC_EXPORT Generator : public CodeGenerator { |
void PrintNestedDescriptors(const Descriptor& containing_descriptor) const; |
void PrintMessages() const; |
- void PrintMessage(const Descriptor& message_descriptor) const; |
- void PrintNestedMessages(const Descriptor& containing_descriptor) const; |
+ void PrintMessage(const Descriptor& message_descriptor, const string& prefix, |
+ vector<string>* to_register) const; |
+ void PrintNestedMessages(const Descriptor& containing_descriptor, |
+ const string& prefix, |
+ vector<string>* to_register) const; |
void FixForeignFieldsInDescriptors() const; |
void FixForeignFieldsInDescriptor( |
@@ -105,6 +109,8 @@ class LIBPROTOC_EXPORT Generator : public CodeGenerator { |
const FieldDescriptor& field, |
const string& python_dict_name) const; |
void AddMessageToFileDescriptor(const Descriptor& descriptor) const; |
+ void AddEnumToFileDescriptor(const EnumDescriptor& descriptor) const; |
+ void AddExtensionToFileDescriptor(const FieldDescriptor& descriptor) const; |
string FieldReferencingExpression(const Descriptor* containing_type, |
const FieldDescriptor& field, |
const string& python_dict_name) const; |
@@ -122,6 +128,8 @@ class LIBPROTOC_EXPORT Generator : public CodeGenerator { |
void PrintServiceDescriptor(const ServiceDescriptor& descriptor) const; |
void PrintServiceClass(const ServiceDescriptor& descriptor) const; |
void PrintServiceStub(const ServiceDescriptor& descriptor) const; |
+ void PrintDescriptorKeyAndModuleName( |
+ const ServiceDescriptor& descriptor) const ; |
void PrintEnumValueDescriptor(const EnumValueDescriptor& descriptor) const; |
string OptionsValue(const string& class_name, |
@@ -143,6 +151,9 @@ class LIBPROTOC_EXPORT Generator : public CodeGenerator { |
void FixOptionsForEnum(const EnumDescriptor& descriptor) const; |
void FixOptionsForMessage(const Descriptor& descriptor) const; |
+ void CopyPublicDependenciesAliases( |
+ const string& copy_from, const FileDescriptor* file) const; |
+ |
// Very coarse-grained lock to ensure that Generate() is reentrant. |
// Guards file_, printer_ and file_descriptor_serialized_. |
mutable Mutex mutex_; |