protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
Go to the documentation of this file.
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 // Helper functions for generating ObjectiveC code.
32 
33 #ifndef GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_HELPERS_H__
34 #define GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_HELPERS_H__
35 
36 #include <string>
37 #include <vector>
38 
39 #include <google/protobuf/descriptor.h>
40 #include <google/protobuf/descriptor.pb.h>
41 #include <google/protobuf/io/zero_copy_stream.h>
42 
43 #include <google/protobuf/port_def.inc>
44 
45 namespace google {
46 namespace protobuf {
47 namespace compiler {
48 namespace objectivec {
49 
50 // Get/Set if the proto package should be used to make the default prefix for
51 // symbols. This will then impact most of the type naming apis below. It is done
52 // as a global to not break any other generator reusing the methods since they
53 // are exported.
54 bool PROTOC_EXPORT UseProtoPackageAsDefaultPrefix();
55 void PROTOC_EXPORT SetUseProtoPackageAsDefaultPrefix(bool on_or_off);
56 // Get/Set the path to a file to load as exceptions when
57 // `UseProtoPackageAsDefaultPrefixUseProtoPackageAsDefaultPrefix()` is `true`.
58 // And empty string means there should be no exceptions loaded.
60 void PROTOC_EXPORT SetProtoPackagePrefixExceptionList(
61  const std::string& file_path);
62 
63 // Generator options (see objectivec_generator.cc for a description of each):
64 struct Options {
65  Options();
67  std::vector<std::string> expected_prefixes_suppressions;
73 };
74 
75 // Escape C++ trigraphs by escaping question marks to "\?".
76 std::string PROTOC_EXPORT EscapeTrigraphs(const std::string& to_escape);
77 
78 // Remove white space from either end of a StringPiece.
79 void PROTOC_EXPORT TrimWhitespace(StringPiece* input);
80 
81 // Returns true if the name requires a ns_returns_not_retained attribute applied
82 // to it.
83 bool PROTOC_EXPORT IsRetainedName(const std::string& name);
84 
85 // Returns true if the name starts with "init" and will need to have special
86 // handling under ARC.
87 bool PROTOC_EXPORT IsInitName(const std::string& name);
88 
89 // Gets the objc_class_prefix or the prefix made from the proto package.
90 std::string PROTOC_EXPORT FileClassPrefix(const FileDescriptor* file);
91 
92 // Gets the path of the file we're going to generate (sans the .pb.h
93 // extension). The path will be dependent on the objectivec package
94 // declared in the proto package.
95 std::string PROTOC_EXPORT FilePath(const FileDescriptor* file);
96 
97 // Just like FilePath(), but without the directory part.
98 std::string PROTOC_EXPORT FilePathBasename(const FileDescriptor* file);
99 
100 // Gets the name of the root class we'll generate in the file. This class
101 // is not meant for external consumption, but instead contains helpers that
102 // the rest of the classes need
103 std::string PROTOC_EXPORT FileClassName(const FileDescriptor* file);
104 
105 // These return the fully-qualified class name corresponding to the given
106 // descriptor.
107 std::string PROTOC_EXPORT ClassName(const Descriptor* descriptor);
108 std::string PROTOC_EXPORT ClassName(const Descriptor* descriptor,
109  std::string* out_suffix_added);
110 std::string PROTOC_EXPORT EnumName(const EnumDescriptor* descriptor);
111 
112 // Returns the fully-qualified name of the enum value corresponding to the
113 // the descriptor.
115 
116 // Returns the name of the enum value corresponding to the descriptor.
118 
119 // Reverse what an enum does.
121 
122 // Returns the name to use for the extension (used as the method off the file's
123 // Root class).
125 
126 // Returns the transformed field name.
127 std::string PROTOC_EXPORT FieldName(const FieldDescriptor* field);
129 
130 // Returns the transformed oneof name.
132 std::string PROTOC_EXPORT OneofName(const OneofDescriptor* descriptor);
134 
135 // Returns a symbol that can be used in C code to refer to an Objective C
136 // class without initializing the class.
137 std::string PROTOC_EXPORT ObjCClass(const std::string& class_name);
138 
139 // Declares an Objective C class without initializing the class so that it can
140 // be refrerred to by ObjCClass.
142 
144  return file->syntax() == FileDescriptor::SYNTAX_PROTO3;
145 }
146 
147 inline bool IsMapEntryMessage(const Descriptor* descriptor) {
148  return descriptor->options().map_entry();
149 }
150 
151 // Reverse of the above.
152 std::string PROTOC_EXPORT UnCamelCaseFieldName(const std::string& name,
153  const FieldDescriptor* field);
154 
167 };
168 
169 enum FlagType {
173 };
174 
175 template <class TDescriptor>
177  const FileDescriptor* file = NULL,
178  bool preSpace = true,
179  bool postNewline = false) {
180  bool isDeprecated = descriptor->options().deprecated();
181  // The file is only passed when checking Messages & Enums, so those types
182  // get tagged. At the moment, it doesn't seem to make sense to tag every
183  // field or enum value with when the file is deprecated.
184  bool isFileLevelDeprecation = false;
185  if (!isDeprecated && file) {
186  isFileLevelDeprecation = file->options().deprecated();
187  isDeprecated = isFileLevelDeprecation;
188  }
189  if (isDeprecated) {
191  const FileDescriptor* sourceFile = descriptor->file();
192  if (isFileLevelDeprecation) {
193  message = sourceFile->name() + " is deprecated.";
194  } else {
195  message = descriptor->full_name() + " is deprecated (see " +
196  sourceFile->name() + ").";
197  }
198 
199  std::string result = std::string("GPB_DEPRECATED_MSG(\"") + message + "\")";
200  if (preSpace) {
201  result.insert(0, " ");
202  }
203  if (postNewline) {
204  result.append("\n");
205  }
206  return result;
207  } else {
208  return "";
209  }
210 }
211 
213 
214 ObjectiveCType PROTOC_EXPORT
216 
218  return GetObjectiveCType(field->type());
219 }
220 
221 bool PROTOC_EXPORT IsPrimitiveType(const FieldDescriptor* field);
222 bool PROTOC_EXPORT IsReferenceType(const FieldDescriptor* field);
223 
224 std::string PROTOC_EXPORT
226 std::string PROTOC_EXPORT DefaultValue(const FieldDescriptor* field);
227 bool PROTOC_EXPORT HasNonZeroDefaultValue(const FieldDescriptor* field);
228 
229 std::string PROTOC_EXPORT
230 BuildFlagsString(const FlagType type, const std::vector<std::string>& strings);
231 
232 // Builds HeaderDoc/appledoc style comments out of the comments in the .proto
233 // file.
234 std::string PROTOC_EXPORT BuildCommentsString(const SourceLocation& location,
235  bool prefer_single_line);
236 
237 // The name the commonly used by the library when built as a framework.
238 // This lines up to the name used in the CocoaPod.
239 extern PROTOC_EXPORT const char* const ProtobufLibraryFrameworkName;
240 // Returns the CPP symbol name to use as the gate for framework style imports
241 // for the given framework name to use.
242 std::string PROTOC_EXPORT
243 ProtobufFrameworkImportSymbol(const std::string& framework_name);
244 
245 // Checks if the file is one of the proto's bundled with the library.
246 bool PROTOC_EXPORT
248 
249 // Checks the prefix for the given files and outputs any warnings as needed. If
250 // there are flat out errors, then out_error is filled in with the first error
251 // and the result is false.
252 bool PROTOC_EXPORT ValidateObjCClassPrefixes(
253  const std::vector<const FileDescriptor*>& files,
254  const Options& generation_options, std::string* out_error);
255 
256 // Generate decode data needed for ObjC's GPBDecodeTextFormatName() to transform
257 // the input into the expected output.
258 class PROTOC_EXPORT TextFormatDecodeData {
259  public:
260  TextFormatDecodeData();
261  ~TextFormatDecodeData();
262 
263  TextFormatDecodeData(const TextFormatDecodeData&) = delete;
264  TextFormatDecodeData& operator=(const TextFormatDecodeData&) = delete;
265 
266  void AddString(int32_t key, const std::string& input_for_decode,
267  const std::string& desired_output);
268  size_t num_entries() const { return entries_.size(); }
269  std::string Data() const;
270 
271  static std::string DecodeDataForString(const std::string& input_for_decode,
272  const std::string& desired_output);
273 
274  private:
275  typedef std::pair<int32_t, std::string> DataEntry;
276  std::vector<DataEntry> entries_;
277 };
278 
279 // Helper for parsing simple files.
280 class PROTOC_EXPORT LineConsumer {
281  public:
282  LineConsumer();
283  virtual ~LineConsumer();
284  virtual bool ConsumeLine(const StringPiece& line, std::string* out_error) = 0;
285 };
286 
287 bool PROTOC_EXPORT ParseSimpleFile(const std::string& path,
288  LineConsumer* line_consumer,
289  std::string* out_error);
290 
291 bool PROTOC_EXPORT ParseSimpleStream(io::ZeroCopyInputStream& input_stream,
292  const std::string& stream_name,
293  LineConsumer* line_consumer,
294  std::string* out_error);
295 
296 // Helper class for parsing framework import mappings and generating
297 // import statements.
298 class PROTOC_EXPORT ImportWriter {
299  public:
300  ImportWriter(const std::string& generate_for_named_framework,
301  const std::string& named_framework_to_proto_path_mappings_path,
302  const std::string& runtime_import_prefix,
303  bool include_wkt_imports);
304  ~ImportWriter();
305 
306  void AddFile(const FileDescriptor* file, const std::string& header_extension);
307  void Print(io::Printer* printer) const;
308 
309  static void PrintRuntimeImports(io::Printer* printer,
310  const std::vector<std::string>& header_to_import,
311  const std::string& runtime_import_prefix,
312  bool default_cpp_symbol = false);
313 
314  private:
315  class ProtoFrameworkCollector : public LineConsumer {
316  public:
317  ProtoFrameworkCollector(std::map<std::string, std::string>* inout_proto_file_to_framework_name)
318  : map_(inout_proto_file_to_framework_name) {}
319 
320  virtual bool ConsumeLine(const StringPiece& line, std::string* out_error) override;
321 
322  private:
323  std::map<std::string, std::string>* map_;
324  };
325 
326  void ParseFrameworkMappings();
327 
331  const bool include_wkt_imports_;
332  std::map<std::string, std::string> proto_file_to_framework_name_;
333  bool need_to_parse_mapping_file_;
334 
335  std::vector<std::string> protobuf_imports_;
336  std::vector<std::string> other_framework_imports_;
337  std::vector<std::string> other_imports_;
338 };
339 
340 } // namespace objectivec
341 } // namespace compiler
342 } // namespace protobuf
343 } // namespace google
344 
345 #include <google/protobuf/port_undef.inc>
346 
347 #endif // GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_HELPERS_H__
google::protobuf::compiler::objectivec::ProtobufLibraryFrameworkName
const char *const ProtobufLibraryFrameworkName
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:984
google::protobuf::compiler::objectivec::IsReferenceType
bool IsReferenceType(const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:732
google::protobuf::FieldDescriptor::Type
Type
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:521
google::protobuf::compiler::objectivec::ParseSimpleFile
bool ParseSimpleFile(const string &path, LineConsumer *line_consumer, string *out_error)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:1525
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
google::protobuf::compiler::objectivec::ImportWriter::proto_file_to_framework_name_
std::map< std::string, std::string > proto_file_to_framework_name_
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:332
google::protobuf::compiler::objectivec::OBJECTIVECTYPE_UINT32
@ OBJECTIVECTYPE_UINT32
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:139
google::protobuf::compiler::objectivec::FLAGTYPE_DESCRIPTOR_INITIALIZATION
@ FLAGTYPE_DESCRIPTOR_INITIALIZATION
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:152
google::protobuf::compiler::objectivec::FileClassPrefix
string FileClassPrefix(const FileDescriptor *file)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:398
google::protobuf::FieldDescriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:515
google::protobuf::compiler::objectivec::FilePathBasename
string FilePathBasename(const FileDescriptor *file)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:421
google::protobuf::compiler::objectivec::SetUseProtoPackageAsDefaultPrefix
void SetUseProtoPackageAsDefaultPrefix(bool on_or_off)
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:158
google::protobuf::compiler::objectivec::ObjCClassDeclaration
std::string ObjCClassDeclaration(const std::string &class_name)
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:734
google::protobuf::compiler::objectivec::OneofEnumName
string OneofEnumName(const OneofDescriptor *descriptor)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:563
google::protobuf::compiler::objectivec::FileClassName
string FileClassName(const FileDescriptor *file)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:434
google::protobuf::compiler::objectivec::HasPreservingUnknownEnumSemantics
bool HasPreservingUnknownEnumSemantics(const FileDescriptor *file)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:125
google::protobuf::compiler::objectivec::DefaultValue
string DefaultValue(const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:794
google::protobuf::compiler::objectivec::Options::generate_for_named_framework
std::string generate_for_named_framework
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:68
google::protobuf::compiler::objectivec::ImportWriter::runtime_import_prefix_
const std::string runtime_import_prefix_
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:330
google::protobuf::compiler::objectivec::Options::expected_prefixes_suppressions
std::vector< std::string > expected_prefixes_suppressions
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:67
testing::gtest_printers_test::Print
std::string Print(const T &value)
Definition: bloaty/third_party/googletest/googletest/test/googletest-printers-test.cc:233
google::protobuf::compiler::objectivec::ObjCClass
std::string ObjCClass(const std::string &class_name)
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:730
google::protobuf::compiler::objectivec::ClassName
string ClassName(const Descriptor *descriptor)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:460
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
google::protobuf::compiler::annotation_test_util::AddFile
void AddFile(const std::string &filename, const std::string &data)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/annotation_test_util.cc:72
file
Definition: bloaty/third_party/zlib/examples/gzappend.c:170
google::protobuf
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:12
google::protobuf::compiler::objectivec::UnCamelCaseFieldName
string UnCamelCaseFieldName(const string &name, const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:587
google::protobuf::compiler::objectivec::FLAGTYPE_FIELD
@ FLAGTYPE_FIELD
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:154
google::protobuf::OneofDescriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:843
setup.name
name
Definition: setup.py:542
check_documentation.path
path
Definition: check_documentation.py:57
google::protobuf::SourceLocation
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:145
google::protobuf::compiler::objectivec::OBJECTIVECTYPE_DATA
@ OBJECTIVECTYPE_DATA
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:146
google::protobuf::compiler::objectivec::EnumValueName
string EnumValueName(const EnumValueDescriptor *descriptor)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:486
google::protobuf::compiler::objectivec::ImportWriter::protobuf_imports_
std::vector< std::string > protobuf_imports_
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:335
message
char * message
Definition: libuv/docs/code/tty-gravity/main.c:12
google::protobuf::compiler::objectivec::OBJECTIVECTYPE_UINT64
@ OBJECTIVECTYPE_UINT64
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:141
google::protobuf::compiler::objectivec::ExtensionMethodName
string ExtensionMethodName(const FieldDescriptor *descriptor)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:532
google::protobuf::compiler::objectivec::OBJECTIVECTYPE_FLOAT
@ OBJECTIVECTYPE_FLOAT
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:142
google::protobuf::compiler::objectivec::EnumValueShortName
string EnumValueShortName(const EnumValueDescriptor *descriptor)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:501
google::protobuf::FileDescriptor::SYNTAX_PROTO3
@ SYNTAX_PROTO3
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1394
google::protobuf::compiler::objectivec::OBJECTIVECTYPE_DOUBLE
@ OBJECTIVECTYPE_DOUBLE
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:143
google::protobuf::compiler::objectivec::HasNonZeroDefaultValue
bool HasNonZeroDefaultValue(const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:865
google::protobuf::compiler::objectivec::OBJECTIVECTYPE_ENUM
@ OBJECTIVECTYPE_ENUM
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:147
google::protobuf::compiler::objectivec::LineConsumer
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:261
google::protobuf::compiler::objectivec::Options::prefixes_must_be_registered
bool prefixes_must_be_registered
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:71
google::protobuf::compiler::objectivec::Options::expected_prefixes_path
std::string expected_prefixes_path
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:66
google::protobuf::compiler::objectivec::IsMapEntryMessage
bool IsMapEntryMessage(const Descriptor *descriptor)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:129
google::protobuf::compiler::objectivec::IsPrimitiveType
bool IsPrimitiveType(const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:714
google::protobuf::compiler::objectivec::OBJECTIVECTYPE_INT32
@ OBJECTIVECTYPE_INT32
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:138
google::protobuf::compiler::objectivec::IsInitName
bool IsInitName(const string &name)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:386
google::protobuf::compiler::objectivec::GetOptionalDeprecatedAttribute
string GetOptionalDeprecatedAttribute(const TDescriptor *descriptor, const FileDescriptor *file=NULL, bool preSpace=true, bool postNewline=false)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:158
google::protobuf::compiler::objectivec::FlagType
FlagType
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:151
google::protobuf::StringPiece
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/stringpiece.h:180
google::protobuf::compiler::objectivec::BuildFlagsString
string BuildFlagsString(const FlagType flag_type, const std::vector< string > &strings)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:910
google::protobuf::compiler::objectivec::ImportWriter::generate_for_named_framework_
const std::string generate_for_named_framework_
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:328
google::protobuf::compiler::objectivec::ImportWriter::ProtoFrameworkCollector::ProtoFrameworkCollector
ProtoFrameworkCollector(std::map< std::string, std::string > *inout_proto_file_to_framework_name)
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:317
google::protobuf::compiler::objectivec::TrimWhitespace
void TrimWhitespace(StringPiece *input)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:367
google::protobuf::compiler::objectivec::FieldName
string FieldName(const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:538
google::protobuf::compiler::objectivec::GetCapitalizedType
string GetCapitalizedType(const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:619
google::protobuf::compiler::objectivec::FLAGTYPE_EXTENSION
@ FLAGTYPE_EXTENSION
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:153
google::protobuf::compiler::objectivec::OneofName
string OneofName(const OneofDescriptor *descriptor)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:571
google::protobuf::compiler::objectivec::ValidateObjCClassPrefixes
bool ValidateObjCClassPrefixes(const std::vector< const FileDescriptor * > &files, const Options &generation_options, string *out_error)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:1202
google::protobuf::compiler::objectivec::OneofNameCapitalized
string OneofNameCapitalized(const OneofDescriptor *descriptor)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:578
class_name
static const char * class_name(int dnsclass)
Definition: adig.c:901
google::protobuf::io::Printer
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/printer.h:181
google::protobuf::compiler::objectivec::UnCamelCaseEnumShortName
string UnCamelCaseEnumShortName(const string &name)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:520
google::protobuf::io::ZeroCopyInputStream
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h:126
google::protobuf::compiler::objectivec::Options::named_framework_to_proto_path_mappings_path
std::string named_framework_to_proto_path_mappings_path
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:69
google::protobuf::compiler::objectivec::FieldNameCapitalized
string FieldNameCapitalized(const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:553
google::protobuf::FileDescriptor::name
const std::string & name() const
google::protobuf::compiler::objectivec::Options::require_prefixes
bool require_prefixes
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:72
google::protobuf::compiler::objectivec::ProtobufFrameworkImportSymbol
string ProtobufFrameworkImportSymbol(const string &framework_name)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:986
field
const FieldDescriptor * field
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc:2692
key
const char * key
Definition: hpack_parser_table.cc:164
google::protobuf::compiler::objectivec::OBJECTIVECTYPE_INT64
@ OBJECTIVECTYPE_INT64
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:140
google::protobuf::compiler::objectivec::ObjectiveCType
ObjectiveCType
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:137
google::protobuf::compiler::objectivec::ImportWriter::ProtoFrameworkCollector::map_
std::map< std::string, std::string > * map_
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:323
google::protobuf::compiler::objectivec::TextFormatDecodeData::num_entries
size_t num_entries() const
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:268
google::protobuf::compiler::objectivec::OBJECTIVECTYPE_BOOLEAN
@ OBJECTIVECTYPE_BOOLEAN
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:144
google::protobuf::compiler::objectivec::OBJECTIVECTYPE_STRING
@ OBJECTIVECTYPE_STRING
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:145
google::protobuf::compiler::objectivec::GetProtoPackagePrefixExceptionList
std::string GetProtoPackagePrefixExceptionList()
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:162
google::protobuf::compiler::objectivec::SetProtoPackagePrefixExceptionList
void SetProtoPackagePrefixExceptionList(const std::string &file_path)
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:166
field_type
zend_class_entry * field_type
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/message.c:2030
regen-readme.line
line
Definition: regen-readme.py:30
google::protobuf::EnumValueDescriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1075
google::protobuf::compiler::objectivec::OBJECTIVECTYPE_MESSAGE
@ OBJECTIVECTYPE_MESSAGE
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:148
google::protobuf::Descriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:231
google::protobuf::compiler::objectivec::ImportWriter::other_imports_
std::vector< std::string > other_imports_
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:337
google::protobuf::compiler::objectivec::IsRetainedName
bool IsRetainedName(const string &name)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:377
input
std::string input
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc:197
google::protobuf::FileDescriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1320
google::protobuf::compiler::objectivec::IsProtobufLibraryBundledProtoFile
bool IsProtobufLibraryBundledProtoFile(const FileDescriptor *file)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:994
google::protobuf::compiler::objectivec::EnumName
string EnumName(const EnumDescriptor *descriptor)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:472
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
int32_t
signed int int32_t
Definition: stdint-msvc2008.h:77
google::protobuf::compiler::objectivec::TextFormatDecodeData::DataEntry
std::pair< int32_t, std::string > DataEntry
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:275
google::protobuf::EnumDescriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:918
google::protobuf::compiler::objectivec::GetObjectiveCType
ObjectiveCType GetObjectiveCType(FieldDescriptor::Type field_type)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:665
google::protobuf::compiler::objectivec::FilePath
string FilePath(const FileDescriptor *file)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:404
google::protobuf::compiler::objectivec::EscapeTrigraphs
string EscapeTrigraphs(const string &to_escape)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:355
descriptor
static const char descriptor[1336]
Definition: certs.upbdefs.c:16
google::protobuf::compiler::objectivec::GPBGenericValueFieldName
string GPBGenericValueFieldName(const FieldDescriptor *field)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:754
amalgamate.files
list files
Definition: amalgamate.py:115
google::protobuf::compiler::objectivec::ImportWriter::other_framework_imports_
std::vector< std::string > other_framework_imports_
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:336
compiler
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc:21
google
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:11
google::protobuf::compiler::objectivec::UseProtoPackageAsDefaultPrefix
bool UseProtoPackageAsDefaultPrefix()
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:154
google::protobuf::compiler::objectivec::ParseSimpleStream
bool ParseSimpleStream(io::ZeroCopyInputStream &input_stream, const std::string &stream_name, LineConsumer *line_consumer, std::string *out_error)
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:1729
google::protobuf::compiler::objectivec::BuildCommentsString
string BuildCommentsString(const SourceLocation &location, bool prefer_single_line)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:928
google::protobuf::compiler::objectivec::Options::Options
Options()
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc:72
google::protobuf::compiler::objectivec::Options::runtime_import_prefix
std::string runtime_import_prefix
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:70
google::protobuf::compiler::objectivec::ImportWriter::named_framework_to_proto_path_mappings_path_
const std::string named_framework_to_proto_path_mappings_path_
Definition: protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h:329


grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:34