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 2deefaa86b521f38981674983317e15534652e52..e68f67bb53c6ca87c752ed0f65f5f171d2865870 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 |
@@ -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 |
@@ -35,6 +35,10 @@ |
#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_FILE_H__ |
#define GOOGLE_PROTOBUF_COMPILER_CPP_FILE_H__ |
+#include <memory> |
+#ifndef _SHARED_PTR_H |
+#include <google/protobuf/stubs/shared_ptr.h> |
+#endif |
#include <string> |
#include <vector> |
#include <google/protobuf/stubs/common.h> |
@@ -76,16 +80,44 @@ class FileGenerator { |
void GenerateNamespaceOpeners(io::Printer* printer); |
void GenerateNamespaceClosers(io::Printer* printer); |
+ // Generates top or bottom of a header file. |
+ void GenerateTopHeaderGuard(io::Printer* printer); |
+ void GenerateBottomHeaderGuard(io::Printer* printer); |
+ |
+ // Generates #include directives. |
+ void GenerateLibraryIncludes(io::Printer* printer); |
+ void GenerateDependencyIncludes(io::Printer* printer); |
+ |
+ // Generates a couple of different pieces before definitions: |
+ void GenerateGlobalStateFunctionDeclarations(io::Printer* printer); |
+ |
+ // Generates types for classes. |
+ void GenerateMessageForwardDeclarations(io::Printer* printer); |
+ void GenerateMessageDefinitions(io::Printer* printer); |
+ |
+ // Generates enum definitions. |
+ void GenerateEnumDefinitions(io::Printer* printer); |
+ |
+ // Generates generic service definitions. |
+ void GenerateServiceDefinitions(io::Printer* printer); |
+ |
+ // Generates extension identifiers. |
+ void GenerateExtensionIdentifiers(io::Printer* printer); |
+ |
+ // Generates inline function defintions. |
+ void GenerateInlineFunctionDefinitions(io::Printer* printer); |
+ |
+ void GenerateProto2NamespaceEnumSpecializations(io::Printer* printer); |
+ |
const FileDescriptor* file_; |
- scoped_array<scoped_ptr<MessageGenerator> > message_generators_; |
- scoped_array<scoped_ptr<EnumGenerator> > enum_generators_; |
- scoped_array<scoped_ptr<ServiceGenerator> > service_generators_; |
- scoped_array<scoped_ptr<ExtensionGenerator> > extension_generators_; |
+ 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"}. |
vector<string> package_parts_; |
- |
const Options options_; |
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator); |