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

Side by Side Diff: third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.h

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved. 2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/ 3 // https://developers.google.com/protocol-buffers/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 class FileGenerator { 56 class FileGenerator {
57 public: 57 public:
58 FileGenerator(const FileDescriptor* file, const Options& options); 58 FileGenerator(const FileDescriptor* file, const Options& options);
59 ~FileGenerator(); 59 ~FileGenerator();
60 60
61 void GenerateSource(io::Printer* printer); 61 void GenerateSource(io::Printer* printer);
62 void GenerateHeader(io::Printer* printer); 62 void GenerateHeader(io::Printer* printer);
63 63
64 const string& RootClassName() const { return root_class_name_; } 64 const string& RootClassName() const { return root_class_name_; }
65 const string Path() const;
66
67 bool IsPublicDependency() const { return is_public_dep_; }
68
69 protected:
70 void SetIsPublicDependency(bool is_public_dep) {
71 is_public_dep_ = is_public_dep;
72 }
73 65
74 private: 66 private:
75 const FileDescriptor* file_; 67 const FileDescriptor* file_;
76 string root_class_name_; 68 string root_class_name_;
77 69
78 // Access this field through the DependencyGenerators accessor call below.
79 // Do not reference it directly.
80 vector<FileGenerator*> dependency_generators_;
81
82 vector<EnumGenerator*> enum_generators_; 70 vector<EnumGenerator*> enum_generators_;
83 vector<MessageGenerator*> message_generators_; 71 vector<MessageGenerator*> message_generators_;
84 vector<ExtensionGenerator*> extension_generators_; 72 vector<ExtensionGenerator*> extension_generators_;
85 bool is_public_dep_;
86 73
87 const Options options_; 74 const Options options_;
88 75
89 const vector<FileGenerator*>& DependencyGenerators(); 76 void PrintFileRuntimePreamble(
77 io::Printer* printer, const string& header_to_import) const;
90 78
91 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator); 79 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator);
92 }; 80 };
93 81
94 } // namespace objectivec 82 } // namespace objectivec
95 } // namespace compiler 83 } // namespace compiler
96 } // namespace protobuf 84 } // namespace protobuf
97 } // namespace google 85 } // namespace google
98 86
99 #endif // GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_FILE_H__ 87 #endif // GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_FILE_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698