Go to the documentation of this file.
42 namespace objectivec {
47 root_class_and_method_name_(root_class_name +
"_" + method_name_),
52 std::cerr <<
"error: Extension is a map<>!"
53 <<
" That used to be blocked by the compiler." << std::endl;
62 std::map<string, string> vars;
65 vars[
"storage_attribute"] =
" NS_RETURNS_NOT_RETAINED";
67 vars[
"storage_attribute"] =
"";
73 vars[
"comments"] =
"";
80 "+ (GPBExtensionDescriptor *)$method_name$$storage_attribute$$deprecated_attribute$;\n");
85 std::map<string, string> vars;
94 options.push_back(
"GPBExtensionSetWireFormat");
101 vars[
"type"] =
string(
"GPBStringifySymbol(") +
104 vars[
"type"] =
"NULL";
109 vars[
"default"] =
"nil";
114 vars[
"extension_type"] =
string(
"GPBDataType") +
type;
117 vars[
"enum_desc_func_name"] =
120 vars[
"enum_desc_func_name"] =
"NULL";
125 " .defaultValue.$default_name$ = $default$,\n"
126 " .singletonName = GPBStringifySymbol($root_class_and_method_name$),\n"
127 " .extendedClass = GPBStringifySymbol($extended_type$),\n"
128 " .messageOrGroupClassName = $type$,\n"
129 " .enumDescriptorFunc = $enum_desc_func_name$,\n"
130 " .fieldNumber = $number$,\n"
131 " .dataType = $extension_type$,\n"
132 " .options = $options$,\n"
138 "[registry addExtension:$root_class_and_method_name$];\n",
void GenerateMembersHeader(io::Printer *printer)
void Print(const std::map< std::string, std::string > &variables, const char *text)
const EnumDescriptor * enum_type() const
string StrCat(const AlphaNum &a, const AlphaNum &b)
string ExtensionMethodName(const FieldDescriptor *descriptor)
const Descriptor * containing_type() const
string root_class_and_method_name_
GLsizei const GLchar *const * string
string BuildCommentsString(const SourceLocation &location, bool prefer_single_line)
const MessageOptions & options() const
string DefaultValue(const FieldDescriptor *field)
void GenerateRegistrationSource(io::Printer *printer)
const FileDescriptor * file() const
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)
const FieldDescriptor * descriptor_
bool IsRetainedName(const string &name)
bool GetSourceLocation(SourceLocation *out_location) const
const Descriptor * message_type() const
const Descriptor * descriptor_
void GenerateStaticVariablesInitialization(io::Printer *printer)
string EnumName(const EnumDescriptor *descriptor)
ExtensionGenerator(const string &root_class_name, const FieldDescriptor *descriptor)
ObjectiveCType GetObjectiveCType(FieldDescriptor::Type field_type)
bool message_set_wire_format() const
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:57