Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 | // source: google/protobuf/api.proto |
| 3 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 4 | // This CPP symbol can be defined to use imports that match up to the framework |
| 5 | // imports needed when using CocoaPods. |
| 6 | #if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) |
| 7 | #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 |
| 8 | #endif |
| 9 | |
| 10 | #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS |
| 11 | #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h> |
| 12 | #else |
| 13 | #import "GPBProtocolBuffers_RuntimeSupport.h" |
| 14 | #endif |
| 15 | |
| 16 | #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS |
| 17 | #import <Protobuf/Api.pbobjc.h> |
| 18 | #import <Protobuf/SourceContext.pbobjc.h> |
| 19 | #import <Protobuf/Type.pbobjc.h> |
| 20 | #else |
| 21 | #import "google/protobuf/Api.pbobjc.h" |
| 22 | #import "google/protobuf/SourceContext.pbobjc.h" |
| 23 | #import "google/protobuf/Type.pbobjc.h" |
| 24 | #endif |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 25 | // @@protoc_insertion_point(imports) |
| 26 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 27 | #pragma clang diagnostic push |
| 28 | #pragma clang diagnostic ignored "-Wdeprecated-declarations" |
| 29 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 30 | #pragma mark - GPBApiRoot |
| 31 | |
| 32 | @implementation GPBApiRoot |
| 33 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 34 | // No extensions in the file and none of the imports (direct or indirect) |
| 35 | // defined extensions, so no need to generate +extensionRegistry. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 36 | |
| 37 | @end |
| 38 | |
| 39 | #pragma mark - GPBApiRoot_FileDescriptor |
| 40 | |
| 41 | static GPBFileDescriptor *GPBApiRoot_FileDescriptor(void) { |
| 42 | // This is called by +initialize so there is no need to worry |
| 43 | // about thread safety of the singleton. |
| 44 | static GPBFileDescriptor *descriptor = NULL; |
| 45 | if (!descriptor) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 46 | GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 47 | descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 48 | objcPrefix:@"GPB" |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 49 | syntax:GPBFileSyntaxProto3]; |
| 50 | } |
| 51 | return descriptor; |
| 52 | } |
| 53 | |
| 54 | #pragma mark - GPBApi |
| 55 | |
| 56 | @implementation GPBApi |
| 57 | |
| 58 | @dynamic name; |
| 59 | @dynamic methodsArray, methodsArray_Count; |
| 60 | @dynamic optionsArray, optionsArray_Count; |
| 61 | @dynamic version; |
| 62 | @dynamic hasSourceContext, sourceContext; |
| 63 | @dynamic mixinsArray, mixinsArray_Count; |
| 64 | @dynamic syntax; |
| 65 | |
| 66 | typedef struct GPBApi__storage_ { |
| 67 | uint32_t _has_storage_[1]; |
| 68 | GPBSyntax syntax; |
| 69 | NSString *name; |
| 70 | NSMutableArray *methodsArray; |
| 71 | NSMutableArray *optionsArray; |
| 72 | NSString *version; |
| 73 | GPBSourceContext *sourceContext; |
| 74 | NSMutableArray *mixinsArray; |
| 75 | } GPBApi__storage_; |
| 76 | |
| 77 | // This method is threadsafe because it is initially called |
| 78 | // in +initialize for each subclass. |
| 79 | + (GPBDescriptor *)descriptor { |
| 80 | static GPBDescriptor *descriptor = nil; |
| 81 | if (!descriptor) { |
| 82 | static GPBMessageFieldDescription fields[] = { |
| 83 | { |
| 84 | .name = "name", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 85 | .dataTypeSpecific.className = NULL, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 86 | .number = GPBApi_FieldNumber_Name, |
| 87 | .hasIndex = 0, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 88 | .offset = (uint32_t)offsetof(GPBApi__storage_, name), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 89 | .flags = GPBFieldOptional, |
| 90 | .dataType = GPBDataTypeString, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 91 | }, |
| 92 | { |
| 93 | .name = "methodsArray", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 94 | .dataTypeSpecific.className = GPBStringifySymbol(GPBMethod), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 95 | .number = GPBApi_FieldNumber_MethodsArray, |
| 96 | .hasIndex = GPBNoHasBit, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 97 | .offset = (uint32_t)offsetof(GPBApi__storage_, methodsArray), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 98 | .flags = GPBFieldRepeated, |
| 99 | .dataType = GPBDataTypeMessage, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 100 | }, |
| 101 | { |
| 102 | .name = "optionsArray", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 103 | .dataTypeSpecific.className = GPBStringifySymbol(GPBOption), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 104 | .number = GPBApi_FieldNumber_OptionsArray, |
| 105 | .hasIndex = GPBNoHasBit, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 106 | .offset = (uint32_t)offsetof(GPBApi__storage_, optionsArray), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 107 | .flags = GPBFieldRepeated, |
| 108 | .dataType = GPBDataTypeMessage, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 109 | }, |
| 110 | { |
| 111 | .name = "version", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 112 | .dataTypeSpecific.className = NULL, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 113 | .number = GPBApi_FieldNumber_Version, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 114 | .hasIndex = 1, |
| 115 | .offset = (uint32_t)offsetof(GPBApi__storage_, version), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 116 | .flags = GPBFieldOptional, |
| 117 | .dataType = GPBDataTypeString, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 118 | }, |
| 119 | { |
| 120 | .name = "sourceContext", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 121 | .dataTypeSpecific.className = GPBStringifySymbol(GPBSourceContext), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 122 | .number = GPBApi_FieldNumber_SourceContext, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 123 | .hasIndex = 2, |
| 124 | .offset = (uint32_t)offsetof(GPBApi__storage_, sourceContext), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 125 | .flags = GPBFieldOptional, |
| 126 | .dataType = GPBDataTypeMessage, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 127 | }, |
| 128 | { |
| 129 | .name = "mixinsArray", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 130 | .dataTypeSpecific.className = GPBStringifySymbol(GPBMixin), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 131 | .number = GPBApi_FieldNumber_MixinsArray, |
| 132 | .hasIndex = GPBNoHasBit, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 133 | .offset = (uint32_t)offsetof(GPBApi__storage_, mixinsArray), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 134 | .flags = GPBFieldRepeated, |
| 135 | .dataType = GPBDataTypeMessage, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 136 | }, |
| 137 | { |
| 138 | .name = "syntax", |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 139 | .dataTypeSpecific.enumDescFunc = GPBSyntax_EnumDescriptor, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 140 | .number = GPBApi_FieldNumber_Syntax, |
| 141 | .hasIndex = 3, |
| 142 | .offset = (uint32_t)offsetof(GPBApi__storage_, syntax), |
| 143 | .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor), |
| 144 | .dataType = GPBDataTypeEnum, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 145 | }, |
| 146 | }; |
| 147 | GPBDescriptor *localDescriptor = |
| 148 | [GPBDescriptor allocDescriptorForClass:[GPBApi class] |
| 149 | rootClass:[GPBApiRoot class] |
| 150 | file:GPBApiRoot_FileDescriptor() |
| 151 | fields:fields |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 152 | fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 153 | storageSize:sizeof(GPBApi__storage_) |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 154 | flags:GPBDescriptorInitializationFlag_None]; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 155 | NSAssert(descriptor == nil, @"Startup recursed!"); |
| 156 | descriptor = localDescriptor; |
| 157 | } |
| 158 | return descriptor; |
| 159 | } |
| 160 | |
| 161 | @end |
| 162 | |
| 163 | int32_t GPBApi_Syntax_RawValue(GPBApi *message) { |
| 164 | GPBDescriptor *descriptor = [GPBApi descriptor]; |
| 165 | GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBApi_FieldNumber_Syntax]; |
| 166 | return GPBGetMessageInt32Field(message, field); |
| 167 | } |
| 168 | |
| 169 | void SetGPBApi_Syntax_RawValue(GPBApi *message, int32_t value) { |
| 170 | GPBDescriptor *descriptor = [GPBApi descriptor]; |
| 171 | GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBApi_FieldNumber_Syntax]; |
| 172 | GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); |
| 173 | } |
| 174 | |
| 175 | #pragma mark - GPBMethod |
| 176 | |
| 177 | @implementation GPBMethod |
| 178 | |
| 179 | @dynamic name; |
| 180 | @dynamic requestTypeURL; |
| 181 | @dynamic requestStreaming; |
| 182 | @dynamic responseTypeURL; |
| 183 | @dynamic responseStreaming; |
| 184 | @dynamic optionsArray, optionsArray_Count; |
| 185 | @dynamic syntax; |
| 186 | |
| 187 | typedef struct GPBMethod__storage_ { |
| 188 | uint32_t _has_storage_[1]; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 189 | GPBSyntax syntax; |
| 190 | NSString *name; |
| 191 | NSString *requestTypeURL; |
| 192 | NSString *responseTypeURL; |
| 193 | NSMutableArray *optionsArray; |
| 194 | } GPBMethod__storage_; |
| 195 | |
| 196 | // This method is threadsafe because it is initially called |
| 197 | // in +initialize for each subclass. |
| 198 | + (GPBDescriptor *)descriptor { |
| 199 | static GPBDescriptor *descriptor = nil; |
| 200 | if (!descriptor) { |
| 201 | static GPBMessageFieldDescription fields[] = { |
| 202 | { |
| 203 | .name = "name", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 204 | .dataTypeSpecific.className = NULL, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 205 | .number = GPBMethod_FieldNumber_Name, |
| 206 | .hasIndex = 0, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 207 | .offset = (uint32_t)offsetof(GPBMethod__storage_, name), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 208 | .flags = GPBFieldOptional, |
| 209 | .dataType = GPBDataTypeString, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 210 | }, |
| 211 | { |
| 212 | .name = "requestTypeURL", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 213 | .dataTypeSpecific.className = NULL, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 214 | .number = GPBMethod_FieldNumber_RequestTypeURL, |
| 215 | .hasIndex = 1, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 216 | .offset = (uint32_t)offsetof(GPBMethod__storage_, requestTypeURL), |
| 217 | .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 218 | .dataType = GPBDataTypeString, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 219 | }, |
| 220 | { |
| 221 | .name = "requestStreaming", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 222 | .dataTypeSpecific.className = NULL, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 223 | .number = GPBMethod_FieldNumber_RequestStreaming, |
| 224 | .hasIndex = 2, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 225 | .offset = 3, // Stored in _has_storage_ to save space. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 226 | .flags = GPBFieldOptional, |
| 227 | .dataType = GPBDataTypeBool, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 228 | }, |
| 229 | { |
| 230 | .name = "responseTypeURL", |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 231 | .dataTypeSpecific.className = NULL, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 232 | .number = GPBMethod_FieldNumber_ResponseTypeURL, |
| 233 | .hasIndex = 4, |
| 234 | .offset = (uint32_t)offsetof(GPBMethod__storage_, responseTypeURL), |
| 235 | .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom), |
| 236 | .dataType = GPBDataTypeString, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 237 | }, |
| 238 | { |
| 239 | .name = "responseStreaming", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 240 | .dataTypeSpecific.className = NULL, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 241 | .number = GPBMethod_FieldNumber_ResponseStreaming, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 242 | .hasIndex = 5, |
| 243 | .offset = 6, // Stored in _has_storage_ to save space. |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 244 | .flags = GPBFieldOptional, |
| 245 | .dataType = GPBDataTypeBool, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 246 | }, |
| 247 | { |
| 248 | .name = "optionsArray", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 249 | .dataTypeSpecific.className = GPBStringifySymbol(GPBOption), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 250 | .number = GPBMethod_FieldNumber_OptionsArray, |
| 251 | .hasIndex = GPBNoHasBit, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 252 | .offset = (uint32_t)offsetof(GPBMethod__storage_, optionsArray), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 253 | .flags = GPBFieldRepeated, |
| 254 | .dataType = GPBDataTypeMessage, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 255 | }, |
| 256 | { |
| 257 | .name = "syntax", |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 258 | .dataTypeSpecific.enumDescFunc = GPBSyntax_EnumDescriptor, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 259 | .number = GPBMethod_FieldNumber_Syntax, |
| 260 | .hasIndex = 7, |
| 261 | .offset = (uint32_t)offsetof(GPBMethod__storage_, syntax), |
| 262 | .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor), |
| 263 | .dataType = GPBDataTypeEnum, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 264 | }, |
| 265 | }; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 266 | GPBDescriptor *localDescriptor = |
| 267 | [GPBDescriptor allocDescriptorForClass:[GPBMethod class] |
| 268 | rootClass:[GPBApiRoot class] |
| 269 | file:GPBApiRoot_FileDescriptor() |
| 270 | fields:fields |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 271 | fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 272 | storageSize:sizeof(GPBMethod__storage_) |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 273 | flags:GPBDescriptorInitializationFlag_None]; |
| 274 | #if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS |
| 275 | static const char *extraTextFormatInfo = |
| 276 | "\002\002\007\244\241!!\000\004\010\244\241!!\000"; |
| 277 | [localDescriptor setupExtraTextInfo:extraTextFormatInfo]; |
| 278 | #endif // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 279 | NSAssert(descriptor == nil, @"Startup recursed!"); |
| 280 | descriptor = localDescriptor; |
| 281 | } |
| 282 | return descriptor; |
| 283 | } |
| 284 | |
| 285 | @end |
| 286 | |
| 287 | int32_t GPBMethod_Syntax_RawValue(GPBMethod *message) { |
| 288 | GPBDescriptor *descriptor = [GPBMethod descriptor]; |
| 289 | GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBMethod_FieldNumber_Syntax]; |
| 290 | return GPBGetMessageInt32Field(message, field); |
| 291 | } |
| 292 | |
| 293 | void SetGPBMethod_Syntax_RawValue(GPBMethod *message, int32_t value) { |
| 294 | GPBDescriptor *descriptor = [GPBMethod descriptor]; |
| 295 | GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBMethod_FieldNumber_Syntax]; |
| 296 | GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); |
| 297 | } |
| 298 | |
| 299 | #pragma mark - GPBMixin |
| 300 | |
| 301 | @implementation GPBMixin |
| 302 | |
| 303 | @dynamic name; |
| 304 | @dynamic root; |
| 305 | |
| 306 | typedef struct GPBMixin__storage_ { |
| 307 | uint32_t _has_storage_[1]; |
| 308 | NSString *name; |
| 309 | NSString *root; |
| 310 | } GPBMixin__storage_; |
| 311 | |
| 312 | // This method is threadsafe because it is initially called |
| 313 | // in +initialize for each subclass. |
| 314 | + (GPBDescriptor *)descriptor { |
| 315 | static GPBDescriptor *descriptor = nil; |
| 316 | if (!descriptor) { |
| 317 | static GPBMessageFieldDescription fields[] = { |
| 318 | { |
| 319 | .name = "name", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 320 | .dataTypeSpecific.className = NULL, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 321 | .number = GPBMixin_FieldNumber_Name, |
| 322 | .hasIndex = 0, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 323 | .offset = (uint32_t)offsetof(GPBMixin__storage_, name), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 324 | .flags = GPBFieldOptional, |
| 325 | .dataType = GPBDataTypeString, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 326 | }, |
| 327 | { |
| 328 | .name = "root", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 329 | .dataTypeSpecific.className = NULL, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 330 | .number = GPBMixin_FieldNumber_Root, |
| 331 | .hasIndex = 1, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 332 | .offset = (uint32_t)offsetof(GPBMixin__storage_, root), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 333 | .flags = GPBFieldOptional, |
| 334 | .dataType = GPBDataTypeString, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 335 | }, |
| 336 | }; |
| 337 | GPBDescriptor *localDescriptor = |
| 338 | [GPBDescriptor allocDescriptorForClass:[GPBMixin class] |
| 339 | rootClass:[GPBApiRoot class] |
| 340 | file:GPBApiRoot_FileDescriptor() |
| 341 | fields:fields |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 342 | fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 343 | storageSize:sizeof(GPBMixin__storage_) |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 344 | flags:GPBDescriptorInitializationFlag_None]; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 345 | NSAssert(descriptor == nil, @"Startup recursed!"); |
| 346 | descriptor = localDescriptor; |
| 347 | } |
| 348 | return descriptor; |
| 349 | } |
| 350 | |
| 351 | @end |
| 352 | |
| 353 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 354 | #pragma clang diagnostic pop |
| 355 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 356 | // @@protoc_insertion_point(global_scope) |