Go to the documentation of this file.
33 #ifndef GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_HELPERS_H__
34 #define GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_HELPERS_H__
42 #include <google/protobuf/port_def.inc>
47 namespace objectivec {
62 string PROTOC_EXPORT
StripProto(
const string& filename);
95 string* out_suffix_added);
157 template<
class TDescriptor>
161 bool preSpace =
true,
bool postNewline =
false) {
162 bool isDeprecated =
descriptor->options().deprecated();
166 bool isFileLevelDeprecation =
false;
167 if (!isDeprecated && file) {
168 isFileLevelDeprecation = file->options().deprecated();
169 isDeprecated = isFileLevelDeprecation;
174 if (isFileLevelDeprecation) {
178 sourceFile->
name() +
").";
181 string result =
string(
"GPB_DEPRECATED_MSG(\"") +
message +
"\")";
183 result.insert(0,
" ");
211 const std::vector<string>&
strings);
216 bool prefer_single_line);
235 const Options& generation_options,
string* out_error);
247 void AddString(
int32 key,
const string& input_for_decode,
248 const string& desired_output);
252 static string DecodeDataForString(
const string& input_for_decode,
253 const string& desired_output);
265 virtual bool ConsumeLine(
const StringPiece& line,
string* out_error) = 0;
276 ImportWriter(
const string& generate_for_named_framework,
277 const string& named_framework_to_proto_path_mappings_path,
278 bool include_wkt_imports);
288 : map_(inout_proto_file_to_framework_name) {}
290 virtual bool ConsumeLine(
const StringPiece& line,
string* out_error);
293 std::map<string, string>*
map_;
296 void ParseFrameworkMappings();
315 #include <google/protobuf/port_undef.inc>
317 #endif // GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_HELPERS_H__
const char *const ProtobufLibraryFrameworkName
bool IsReferenceType(const FieldDescriptor *field)
bool ParseSimpleFile(const string &path, LineConsumer *line_consumer, string *out_error)
string named_framework_to_proto_path_mappings_path
bool HasFieldPresence(const FileDescriptor *file)
std::vector< string > other_framework_imports_
GLuint const GLchar * name
const string generate_for_named_framework_
std::map< string, string > * map_
string OneofNameCapitalized(const OneofDescriptor *descriptor)
string generate_for_named_framework
zend_class_entry * field_type
bool HasPreservingUnknownEnumSemantics(const FileDescriptor *file)
string EnumValueShortName(const EnumValueDescriptor *descriptor)
std::string Print(const T &value)
string ExtensionMethodName(const FieldDescriptor *descriptor)
void AddFile(const std::string &filename, const std::string &data)
GLsizei const GLchar *const * strings
std::vector< string > protobuf_framework_imports_
string UnCamelCaseFieldName(const string &name, const FieldDescriptor *field)
GLsizei const GLchar *const * string
string BuildCommentsString(const SourceLocation &location, bool prefer_single_line)
string OneofName(const OneofDescriptor *descriptor)
const string named_framework_to_proto_path_mappings_path_
bool HasNonZeroDefaultValue(const FieldDescriptor *field)
std::vector< string > other_imports_
string FileClassPrefix(const FileDescriptor *file)
string DefaultValue(const FieldDescriptor *field)
string FilePath(const FileDescriptor *file)
string StripProto(const string &filename)
string EnumValueName(const EnumValueDescriptor *descriptor)
bool need_to_parse_mapping_file_
bool IsMapEntryMessage(const Descriptor *descriptor)
bool IsPrimitiveType(const FieldDescriptor *field)
GLsizei const GLchar ** path
std::vector< string > expected_prefixes_suppressions
bool IsInitName(const string &name)
string GetOptionalDeprecatedAttribute(const TDescriptor *descriptor, const FileDescriptor *file=NULL, bool preSpace=true, bool postNewline=false)
string BuildFlagsString(const FlagType flag_type, const std::vector< string > &strings)
string ClassName(const Descriptor *descriptor)
string GPBGenericValueFieldName(const FieldDescriptor *field)
string GetCapitalizedType(const FieldDescriptor *field)
void TrimWhitespace(StringPiece *input)
string expected_prefixes_path
std::map< string, string > proto_file_to_framework_name_
string FieldName(const FieldDescriptor *field)
string FieldNameCapitalized(const FieldDescriptor *field)
std::vector< DataEntry > entries_
std::vector< string > protobuf_non_framework_imports_
const FieldDescriptor * field
ProtoFrameworkCollector(std::map< string, string > *inout_proto_file_to_framework_name)
const SETUP_TEARDOWN_TESTCONTEXT char * key
bool ValidateObjCClassPrefixes(const std::vector< const FileDescriptor * > &files, const Options &generation_options, string *out_error)
std::pair< int32, string > DataEntry
string UnCamelCaseEnumShortName(const string &name)
const std::string & name() const
string ProtobufFrameworkImportSymbol(const string &framework_name)
string OneofEnumName(const OneofDescriptor *descriptor)
size_t num_entries() const
string FilePathBasename(const FileDescriptor *file)
bool IsRetainedName(const string &name)
bool IsProtobufLibraryBundledProtoFile(const FileDescriptor *file)
string EnumName(const EnumDescriptor *descriptor)
const bool include_wkt_imports_
string FileClassName(const FileDescriptor *file)
ObjectiveCType GetObjectiveCType(FieldDescriptor::Type field_type)
string EscapeTrigraphs(const string &to_escape)
GLenum GLuint GLenum GLsizei const GLchar * message
@ FLAGTYPE_DESCRIPTOR_INITIALIZATION
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:57