Go to the documentation of this file.
34 #include <google/protobuf/compiler/objectivec/objectivec_oneof.h>
35 #include <google/protobuf/compiler/objectivec/objectivec_helpers.h>
36 #include <google/protobuf/io/printer.h>
37 #include <google/protobuf/stubs/strutil.h>
42 namespace objectivec {
74 "typedef GPB_ENUM($enum_name$) {\n");
78 "$enum_name$_GPBUnsetOneOfCase = 0,\n");
84 "$enum_name$_$field_name$ = $field_number$,\n",
85 "enum_name", enum_name,
86 "field_name", field_name,
100 "@property(nonatomic, readonly) $enum_name$ $name$OneOfCase;\n"
108 " * Clears whatever value was set for the oneof '$name$'.\n"
110 "void $owning_message_class$_Clear$capitalized_name$OneOfCase($owning_message_class$ *message);\n");
116 "@dynamic $name$OneOfCase;\n");
122 "void $owning_message_class$_Clear$capitalized_name$OneOfCase($owning_message_class$ *message) {\n"
123 " GPBDescriptor *descriptor = [$owning_message_class$ descriptor];\n"
124 " GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:$raw_index$];\n"
125 " GPBClearOneof(message, oneof);\n"
string OneofEnumName(const OneofDescriptor *descriptor)
const OneofDescriptor * descriptor_
string ClassName(const Descriptor *descriptor)
void GenerateClearFunctionDeclaration(io::Printer *printer)
GRPC_CUSTOM_PRINTER Printer
void GeneratePropertyImplementation(io::Printer *printer)
string HasIndexAsString(void) const
string StrCat(const AlphaNum &a, const AlphaNum &b)
const FieldDescriptor * field(int index) const
bool GetSourceLocation(SourceLocation *out_location) const
OneofGenerator(const OneofDescriptor *descriptor)
string OneofName(const OneofDescriptor *descriptor)
string OneofNameCapitalized(const OneofDescriptor *descriptor)
string FieldNameCapitalized(const FieldDescriptor *field)
const FieldDescriptor * field
string DescriptorName(void) const
std::map< string, string > variables_
void SetOneofIndexBase(int index_base)
void GenerateCaseEnum(io::Printer *printer)
void GenerateClearFunctionImplementation(io::Printer *printer)
void GeneratePublicCasePropertyDeclaration(io::Printer *printer)
GRPC_CUSTOM_SOURCELOCATION SourceLocation
static const char descriptor[1336]
const Descriptor * containing_type() const
string BuildCommentsString(const SourceLocation &location, bool prefer_single_line)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:34