| Index: third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h
|
| diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h
|
| index 25d6eabf937851952636982c3c8055aa81069626..5dcf692bcdeaf03ebb2847d3ea47939994801ad1 100644
|
| --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h
|
| +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h
|
| @@ -68,9 +68,6 @@ class FileGenerator {
|
| FileGenerator(const FileDescriptor* file, const Options& options);
|
| ~FileGenerator();
|
|
|
| - // Shared code between the two header generators below.
|
| - void GenerateHeader(io::Printer* printer);
|
| -
|
| // info_path, if non-empty, should be the path (relative to printer's output)
|
| // to the metadata file describing this proto header.
|
| void GenerateProtoHeader(io::Printer* printer,
|
| @@ -120,6 +117,18 @@ class FileGenerator {
|
| // Generates types for classes.
|
| void GenerateMessageDefinitions(io::Printer* printer);
|
|
|
| + // Generates forward-declarations for just this file's classes. This is
|
| + // used for .pb.h headers, but not in proto_h mode.
|
| + void GenerateMessageForwardDeclarations(io::Printer* printer);
|
| +
|
| + // Fills in types for forward declarations. This is used internally, and
|
| + // also by other FileGenerators to determine imports' declarations.
|
| + void FillMessageForwardDeclarations(ForwardDeclarations* decls);
|
| + void FillMessageDefinitions(ForwardDeclarations* decls);
|
| +
|
| + // Generates enum definitions.
|
| + void GenerateEnumForwardDeclarations(io::Printer* printer);
|
| + void FillEnumForwardDeclarations(ForwardDeclarations* decls);
|
| void GenerateEnumDefinitions(io::Printer* printer);
|
|
|
| // Generates generic service definitions.
|
| @@ -136,25 +145,13 @@ class FileGenerator {
|
| const FileDescriptor* file_;
|
| const Options options_;
|
|
|
| - // Contains the post-order walk of all the messages (and child messages) in
|
| - // this file. If you need a pre-order walk just reverse iterate.
|
| - std::vector<MessageGenerator*> message_generators_;
|
| - std::vector<EnumGenerator*> enum_generators_;
|
| - std::vector<ServiceGenerator*> service_generators_;
|
| - std::vector<ExtensionGenerator*> extension_generators_;
|
| -
|
| - // These members are just for owning (and thus proper deleting). Some of the
|
| - // message_ and enum_generators above are owned by child messages.
|
| - google::protobuf::scoped_array<google::protobuf::scoped_ptr<MessageGenerator> >
|
| - message_generators_owner_;
|
| - google::protobuf::scoped_array<google::protobuf::scoped_ptr<EnumGenerator> > enum_generators_owner_;
|
| - google::protobuf::scoped_array<google::protobuf::scoped_ptr<ServiceGenerator> >
|
| - service_generators_owner_;
|
| - google::protobuf::scoped_array<google::protobuf::scoped_ptr<ExtensionGenerator> >
|
| - extension_generators_owner_;
|
| + google::protobuf::scoped_array<google::protobuf::scoped_ptr<MessageGenerator> > message_generators_;
|
| + google::protobuf::scoped_array<google::protobuf::scoped_ptr<EnumGenerator> > enum_generators_;
|
| + google::protobuf::scoped_array<google::protobuf::scoped_ptr<ServiceGenerator> > service_generators_;
|
| + google::protobuf::scoped_array<google::protobuf::scoped_ptr<ExtensionGenerator> > extension_generators_;
|
|
|
| // E.g. if the package is foo.bar, package_parts_ is {"foo", "bar"}.
|
| - std::vector<string> package_parts_;
|
| + vector<string> package_parts_;
|
|
|
| GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator);
|
| };
|
|
|