1ffe3c632Sopenharmony_ci// Generated by the protocol buffer compiler. DO NOT EDIT! 2ffe3c632Sopenharmony_ci// source: google/protobuf/struct.proto 3ffe3c632Sopenharmony_ci 4ffe3c632Sopenharmony_ci// This CPP symbol can be defined to use imports that match up to the framework 5ffe3c632Sopenharmony_ci// imports needed when using CocoaPods. 6ffe3c632Sopenharmony_ci#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) 7ffe3c632Sopenharmony_ci #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 8ffe3c632Sopenharmony_ci#endif 9ffe3c632Sopenharmony_ci 10ffe3c632Sopenharmony_ci#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 11ffe3c632Sopenharmony_ci #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h> 12ffe3c632Sopenharmony_ci#else 13ffe3c632Sopenharmony_ci #import "GPBProtocolBuffers_RuntimeSupport.h" 14ffe3c632Sopenharmony_ci#endif 15ffe3c632Sopenharmony_ci 16ffe3c632Sopenharmony_ci#import <stdatomic.h> 17ffe3c632Sopenharmony_ci 18ffe3c632Sopenharmony_ci#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 19ffe3c632Sopenharmony_ci #import <Protobuf/GPBStruct.pbobjc.h> 20ffe3c632Sopenharmony_ci#else 21ffe3c632Sopenharmony_ci #import "GPBStruct.pbobjc.h" 22ffe3c632Sopenharmony_ci#endif 23ffe3c632Sopenharmony_ci// @@protoc_insertion_point(imports) 24ffe3c632Sopenharmony_ci 25ffe3c632Sopenharmony_ci#pragma clang diagnostic push 26ffe3c632Sopenharmony_ci#pragma clang diagnostic ignored "-Wdeprecated-declarations" 27ffe3c632Sopenharmony_ci#pragma clang diagnostic ignored "-Wdirect-ivar-access" 28ffe3c632Sopenharmony_ci#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" 29ffe3c632Sopenharmony_ci 30ffe3c632Sopenharmony_ci#pragma mark - Objective C Class declarations 31ffe3c632Sopenharmony_ci// Forward declarations of Objective C classes that we can use as 32ffe3c632Sopenharmony_ci// static values in struct initializers. 33ffe3c632Sopenharmony_ci// We don't use [Foo class] because it is not a static value. 34ffe3c632Sopenharmony_ciGPBObjCClassDeclaration(GPBListValue); 35ffe3c632Sopenharmony_ciGPBObjCClassDeclaration(GPBStruct); 36ffe3c632Sopenharmony_ciGPBObjCClassDeclaration(GPBValue); 37ffe3c632Sopenharmony_ci 38ffe3c632Sopenharmony_ci#pragma mark - GPBStructRoot 39ffe3c632Sopenharmony_ci 40ffe3c632Sopenharmony_ci@implementation GPBStructRoot 41ffe3c632Sopenharmony_ci 42ffe3c632Sopenharmony_ci// No extensions in the file and no imports, so no need to generate 43ffe3c632Sopenharmony_ci// +extensionRegistry. 44ffe3c632Sopenharmony_ci 45ffe3c632Sopenharmony_ci@end 46ffe3c632Sopenharmony_ci 47ffe3c632Sopenharmony_ci#pragma mark - GPBStructRoot_FileDescriptor 48ffe3c632Sopenharmony_ci 49ffe3c632Sopenharmony_cistatic GPBFileDescriptor *GPBStructRoot_FileDescriptor(void) { 50ffe3c632Sopenharmony_ci // This is called by +initialize so there is no need to worry 51ffe3c632Sopenharmony_ci // about thread safety of the singleton. 52ffe3c632Sopenharmony_ci static GPBFileDescriptor *descriptor = NULL; 53ffe3c632Sopenharmony_ci if (!descriptor) { 54ffe3c632Sopenharmony_ci GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); 55ffe3c632Sopenharmony_ci descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" 56ffe3c632Sopenharmony_ci objcPrefix:@"GPB" 57ffe3c632Sopenharmony_ci syntax:GPBFileSyntaxProto3]; 58ffe3c632Sopenharmony_ci } 59ffe3c632Sopenharmony_ci return descriptor; 60ffe3c632Sopenharmony_ci} 61ffe3c632Sopenharmony_ci 62ffe3c632Sopenharmony_ci#pragma mark - Enum GPBNullValue 63ffe3c632Sopenharmony_ci 64ffe3c632Sopenharmony_ciGPBEnumDescriptor *GPBNullValue_EnumDescriptor(void) { 65ffe3c632Sopenharmony_ci static _Atomic(GPBEnumDescriptor*) descriptor = nil; 66ffe3c632Sopenharmony_ci if (!descriptor) { 67ffe3c632Sopenharmony_ci static const char *valueNames = 68ffe3c632Sopenharmony_ci "NullValue\000"; 69ffe3c632Sopenharmony_ci static const int32_t values[] = { 70ffe3c632Sopenharmony_ci GPBNullValue_NullValue, 71ffe3c632Sopenharmony_ci }; 72ffe3c632Sopenharmony_ci GPBEnumDescriptor *worker = 73ffe3c632Sopenharmony_ci [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBNullValue) 74ffe3c632Sopenharmony_ci valueNames:valueNames 75ffe3c632Sopenharmony_ci values:values 76ffe3c632Sopenharmony_ci count:(uint32_t)(sizeof(values) / sizeof(int32_t)) 77ffe3c632Sopenharmony_ci enumVerifier:GPBNullValue_IsValidValue]; 78ffe3c632Sopenharmony_ci GPBEnumDescriptor *expected = nil; 79ffe3c632Sopenharmony_ci if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { 80ffe3c632Sopenharmony_ci [worker release]; 81ffe3c632Sopenharmony_ci } 82ffe3c632Sopenharmony_ci } 83ffe3c632Sopenharmony_ci return descriptor; 84ffe3c632Sopenharmony_ci} 85ffe3c632Sopenharmony_ci 86ffe3c632Sopenharmony_ciBOOL GPBNullValue_IsValidValue(int32_t value__) { 87ffe3c632Sopenharmony_ci switch (value__) { 88ffe3c632Sopenharmony_ci case GPBNullValue_NullValue: 89ffe3c632Sopenharmony_ci return YES; 90ffe3c632Sopenharmony_ci default: 91ffe3c632Sopenharmony_ci return NO; 92ffe3c632Sopenharmony_ci } 93ffe3c632Sopenharmony_ci} 94ffe3c632Sopenharmony_ci 95ffe3c632Sopenharmony_ci#pragma mark - GPBStruct 96ffe3c632Sopenharmony_ci 97ffe3c632Sopenharmony_ci@implementation GPBStruct 98ffe3c632Sopenharmony_ci 99ffe3c632Sopenharmony_ci@dynamic fields, fields_Count; 100ffe3c632Sopenharmony_ci 101ffe3c632Sopenharmony_citypedef struct GPBStruct__storage_ { 102ffe3c632Sopenharmony_ci uint32_t _has_storage_[1]; 103ffe3c632Sopenharmony_ci NSMutableDictionary *fields; 104ffe3c632Sopenharmony_ci} GPBStruct__storage_; 105ffe3c632Sopenharmony_ci 106ffe3c632Sopenharmony_ci// This method is threadsafe because it is initially called 107ffe3c632Sopenharmony_ci// in +initialize for each subclass. 108ffe3c632Sopenharmony_ci+ (GPBDescriptor *)descriptor { 109ffe3c632Sopenharmony_ci static GPBDescriptor *descriptor = nil; 110ffe3c632Sopenharmony_ci if (!descriptor) { 111ffe3c632Sopenharmony_ci static GPBMessageFieldDescription fields[] = { 112ffe3c632Sopenharmony_ci { 113ffe3c632Sopenharmony_ci .name = "fields", 114ffe3c632Sopenharmony_ci .dataTypeSpecific.clazz = GPBObjCClass(GPBValue), 115ffe3c632Sopenharmony_ci .number = GPBStruct_FieldNumber_Fields, 116ffe3c632Sopenharmony_ci .hasIndex = GPBNoHasBit, 117ffe3c632Sopenharmony_ci .offset = (uint32_t)offsetof(GPBStruct__storage_, fields), 118ffe3c632Sopenharmony_ci .flags = GPBFieldMapKeyString, 119ffe3c632Sopenharmony_ci .dataType = GPBDataTypeMessage, 120ffe3c632Sopenharmony_ci }, 121ffe3c632Sopenharmony_ci }; 122ffe3c632Sopenharmony_ci GPBDescriptor *localDescriptor = 123ffe3c632Sopenharmony_ci [GPBDescriptor allocDescriptorForClass:[GPBStruct class] 124ffe3c632Sopenharmony_ci rootClass:[GPBStructRoot class] 125ffe3c632Sopenharmony_ci file:GPBStructRoot_FileDescriptor() 126ffe3c632Sopenharmony_ci fields:fields 127ffe3c632Sopenharmony_ci fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) 128ffe3c632Sopenharmony_ci storageSize:sizeof(GPBStruct__storage_) 129ffe3c632Sopenharmony_ci flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; 130ffe3c632Sopenharmony_ci #if defined(DEBUG) && DEBUG 131ffe3c632Sopenharmony_ci NSAssert(descriptor == nil, @"Startup recursed!"); 132ffe3c632Sopenharmony_ci #endif // DEBUG 133ffe3c632Sopenharmony_ci descriptor = localDescriptor; 134ffe3c632Sopenharmony_ci } 135ffe3c632Sopenharmony_ci return descriptor; 136ffe3c632Sopenharmony_ci} 137ffe3c632Sopenharmony_ci 138ffe3c632Sopenharmony_ci@end 139ffe3c632Sopenharmony_ci 140ffe3c632Sopenharmony_ci#pragma mark - GPBValue 141ffe3c632Sopenharmony_ci 142ffe3c632Sopenharmony_ci@implementation GPBValue 143ffe3c632Sopenharmony_ci 144ffe3c632Sopenharmony_ci@dynamic kindOneOfCase; 145ffe3c632Sopenharmony_ci@dynamic nullValue; 146ffe3c632Sopenharmony_ci@dynamic numberValue; 147ffe3c632Sopenharmony_ci@dynamic stringValue; 148ffe3c632Sopenharmony_ci@dynamic boolValue; 149ffe3c632Sopenharmony_ci@dynamic structValue; 150ffe3c632Sopenharmony_ci@dynamic listValue; 151ffe3c632Sopenharmony_ci 152ffe3c632Sopenharmony_citypedef struct GPBValue__storage_ { 153ffe3c632Sopenharmony_ci uint32_t _has_storage_[2]; 154ffe3c632Sopenharmony_ci GPBNullValue nullValue; 155ffe3c632Sopenharmony_ci NSString *stringValue; 156ffe3c632Sopenharmony_ci GPBStruct *structValue; 157ffe3c632Sopenharmony_ci GPBListValue *listValue; 158ffe3c632Sopenharmony_ci double numberValue; 159ffe3c632Sopenharmony_ci} GPBValue__storage_; 160ffe3c632Sopenharmony_ci 161ffe3c632Sopenharmony_ci// This method is threadsafe because it is initially called 162ffe3c632Sopenharmony_ci// in +initialize for each subclass. 163ffe3c632Sopenharmony_ci+ (GPBDescriptor *)descriptor { 164ffe3c632Sopenharmony_ci static GPBDescriptor *descriptor = nil; 165ffe3c632Sopenharmony_ci if (!descriptor) { 166ffe3c632Sopenharmony_ci static GPBMessageFieldDescription fields[] = { 167ffe3c632Sopenharmony_ci { 168ffe3c632Sopenharmony_ci .name = "nullValue", 169ffe3c632Sopenharmony_ci .dataTypeSpecific.enumDescFunc = GPBNullValue_EnumDescriptor, 170ffe3c632Sopenharmony_ci .number = GPBValue_FieldNumber_NullValue, 171ffe3c632Sopenharmony_ci .hasIndex = -1, 172ffe3c632Sopenharmony_ci .offset = (uint32_t)offsetof(GPBValue__storage_, nullValue), 173ffe3c632Sopenharmony_ci .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor), 174ffe3c632Sopenharmony_ci .dataType = GPBDataTypeEnum, 175ffe3c632Sopenharmony_ci }, 176ffe3c632Sopenharmony_ci { 177ffe3c632Sopenharmony_ci .name = "numberValue", 178ffe3c632Sopenharmony_ci .dataTypeSpecific.clazz = Nil, 179ffe3c632Sopenharmony_ci .number = GPBValue_FieldNumber_NumberValue, 180ffe3c632Sopenharmony_ci .hasIndex = -1, 181ffe3c632Sopenharmony_ci .offset = (uint32_t)offsetof(GPBValue__storage_, numberValue), 182ffe3c632Sopenharmony_ci .flags = GPBFieldOptional, 183ffe3c632Sopenharmony_ci .dataType = GPBDataTypeDouble, 184ffe3c632Sopenharmony_ci }, 185ffe3c632Sopenharmony_ci { 186ffe3c632Sopenharmony_ci .name = "stringValue", 187ffe3c632Sopenharmony_ci .dataTypeSpecific.clazz = Nil, 188ffe3c632Sopenharmony_ci .number = GPBValue_FieldNumber_StringValue, 189ffe3c632Sopenharmony_ci .hasIndex = -1, 190ffe3c632Sopenharmony_ci .offset = (uint32_t)offsetof(GPBValue__storage_, stringValue), 191ffe3c632Sopenharmony_ci .flags = GPBFieldOptional, 192ffe3c632Sopenharmony_ci .dataType = GPBDataTypeString, 193ffe3c632Sopenharmony_ci }, 194ffe3c632Sopenharmony_ci { 195ffe3c632Sopenharmony_ci .name = "boolValue", 196ffe3c632Sopenharmony_ci .dataTypeSpecific.clazz = Nil, 197ffe3c632Sopenharmony_ci .number = GPBValue_FieldNumber_BoolValue, 198ffe3c632Sopenharmony_ci .hasIndex = -1, 199ffe3c632Sopenharmony_ci .offset = 0, // Stored in _has_storage_ to save space. 200ffe3c632Sopenharmony_ci .flags = GPBFieldOptional, 201ffe3c632Sopenharmony_ci .dataType = GPBDataTypeBool, 202ffe3c632Sopenharmony_ci }, 203ffe3c632Sopenharmony_ci { 204ffe3c632Sopenharmony_ci .name = "structValue", 205ffe3c632Sopenharmony_ci .dataTypeSpecific.clazz = GPBObjCClass(GPBStruct), 206ffe3c632Sopenharmony_ci .number = GPBValue_FieldNumber_StructValue, 207ffe3c632Sopenharmony_ci .hasIndex = -1, 208ffe3c632Sopenharmony_ci .offset = (uint32_t)offsetof(GPBValue__storage_, structValue), 209ffe3c632Sopenharmony_ci .flags = GPBFieldOptional, 210ffe3c632Sopenharmony_ci .dataType = GPBDataTypeMessage, 211ffe3c632Sopenharmony_ci }, 212ffe3c632Sopenharmony_ci { 213ffe3c632Sopenharmony_ci .name = "listValue", 214ffe3c632Sopenharmony_ci .dataTypeSpecific.clazz = GPBObjCClass(GPBListValue), 215ffe3c632Sopenharmony_ci .number = GPBValue_FieldNumber_ListValue, 216ffe3c632Sopenharmony_ci .hasIndex = -1, 217ffe3c632Sopenharmony_ci .offset = (uint32_t)offsetof(GPBValue__storage_, listValue), 218ffe3c632Sopenharmony_ci .flags = GPBFieldOptional, 219ffe3c632Sopenharmony_ci .dataType = GPBDataTypeMessage, 220ffe3c632Sopenharmony_ci }, 221ffe3c632Sopenharmony_ci }; 222ffe3c632Sopenharmony_ci GPBDescriptor *localDescriptor = 223ffe3c632Sopenharmony_ci [GPBDescriptor allocDescriptorForClass:[GPBValue class] 224ffe3c632Sopenharmony_ci rootClass:[GPBStructRoot class] 225ffe3c632Sopenharmony_ci file:GPBStructRoot_FileDescriptor() 226ffe3c632Sopenharmony_ci fields:fields 227ffe3c632Sopenharmony_ci fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) 228ffe3c632Sopenharmony_ci storageSize:sizeof(GPBValue__storage_) 229ffe3c632Sopenharmony_ci flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; 230ffe3c632Sopenharmony_ci static const char *oneofs[] = { 231ffe3c632Sopenharmony_ci "kind", 232ffe3c632Sopenharmony_ci }; 233ffe3c632Sopenharmony_ci [localDescriptor setupOneofs:oneofs 234ffe3c632Sopenharmony_ci count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) 235ffe3c632Sopenharmony_ci firstHasIndex:-1]; 236ffe3c632Sopenharmony_ci #if defined(DEBUG) && DEBUG 237ffe3c632Sopenharmony_ci NSAssert(descriptor == nil, @"Startup recursed!"); 238ffe3c632Sopenharmony_ci #endif // DEBUG 239ffe3c632Sopenharmony_ci descriptor = localDescriptor; 240ffe3c632Sopenharmony_ci } 241ffe3c632Sopenharmony_ci return descriptor; 242ffe3c632Sopenharmony_ci} 243ffe3c632Sopenharmony_ci 244ffe3c632Sopenharmony_ci@end 245ffe3c632Sopenharmony_ci 246ffe3c632Sopenharmony_ciint32_t GPBValue_NullValue_RawValue(GPBValue *message) { 247ffe3c632Sopenharmony_ci GPBDescriptor *descriptor = [GPBValue descriptor]; 248ffe3c632Sopenharmony_ci GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBValue_FieldNumber_NullValue]; 249ffe3c632Sopenharmony_ci return GPBGetMessageRawEnumField(message, field); 250ffe3c632Sopenharmony_ci} 251ffe3c632Sopenharmony_ci 252ffe3c632Sopenharmony_civoid SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value) { 253ffe3c632Sopenharmony_ci GPBDescriptor *descriptor = [GPBValue descriptor]; 254ffe3c632Sopenharmony_ci GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBValue_FieldNumber_NullValue]; 255ffe3c632Sopenharmony_ci GPBSetMessageRawEnumField(message, field, value); 256ffe3c632Sopenharmony_ci} 257ffe3c632Sopenharmony_ci 258ffe3c632Sopenharmony_civoid GPBValue_ClearKindOneOfCase(GPBValue *message) { 259ffe3c632Sopenharmony_ci GPBDescriptor *descriptor = [GPBValue descriptor]; 260ffe3c632Sopenharmony_ci GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; 261ffe3c632Sopenharmony_ci GPBClearOneof(message, oneof); 262ffe3c632Sopenharmony_ci} 263ffe3c632Sopenharmony_ci#pragma mark - GPBListValue 264ffe3c632Sopenharmony_ci 265ffe3c632Sopenharmony_ci@implementation GPBListValue 266ffe3c632Sopenharmony_ci 267ffe3c632Sopenharmony_ci@dynamic valuesArray, valuesArray_Count; 268ffe3c632Sopenharmony_ci 269ffe3c632Sopenharmony_citypedef struct GPBListValue__storage_ { 270ffe3c632Sopenharmony_ci uint32_t _has_storage_[1]; 271ffe3c632Sopenharmony_ci NSMutableArray *valuesArray; 272ffe3c632Sopenharmony_ci} GPBListValue__storage_; 273ffe3c632Sopenharmony_ci 274ffe3c632Sopenharmony_ci// This method is threadsafe because it is initially called 275ffe3c632Sopenharmony_ci// in +initialize for each subclass. 276ffe3c632Sopenharmony_ci+ (GPBDescriptor *)descriptor { 277ffe3c632Sopenharmony_ci static GPBDescriptor *descriptor = nil; 278ffe3c632Sopenharmony_ci if (!descriptor) { 279ffe3c632Sopenharmony_ci static GPBMessageFieldDescription fields[] = { 280ffe3c632Sopenharmony_ci { 281ffe3c632Sopenharmony_ci .name = "valuesArray", 282ffe3c632Sopenharmony_ci .dataTypeSpecific.clazz = GPBObjCClass(GPBValue), 283ffe3c632Sopenharmony_ci .number = GPBListValue_FieldNumber_ValuesArray, 284ffe3c632Sopenharmony_ci .hasIndex = GPBNoHasBit, 285ffe3c632Sopenharmony_ci .offset = (uint32_t)offsetof(GPBListValue__storage_, valuesArray), 286ffe3c632Sopenharmony_ci .flags = GPBFieldRepeated, 287ffe3c632Sopenharmony_ci .dataType = GPBDataTypeMessage, 288ffe3c632Sopenharmony_ci }, 289ffe3c632Sopenharmony_ci }; 290ffe3c632Sopenharmony_ci GPBDescriptor *localDescriptor = 291ffe3c632Sopenharmony_ci [GPBDescriptor allocDescriptorForClass:[GPBListValue class] 292ffe3c632Sopenharmony_ci rootClass:[GPBStructRoot class] 293ffe3c632Sopenharmony_ci file:GPBStructRoot_FileDescriptor() 294ffe3c632Sopenharmony_ci fields:fields 295ffe3c632Sopenharmony_ci fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) 296ffe3c632Sopenharmony_ci storageSize:sizeof(GPBListValue__storage_) 297ffe3c632Sopenharmony_ci flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; 298ffe3c632Sopenharmony_ci #if defined(DEBUG) && DEBUG 299ffe3c632Sopenharmony_ci NSAssert(descriptor == nil, @"Startup recursed!"); 300ffe3c632Sopenharmony_ci #endif // DEBUG 301ffe3c632Sopenharmony_ci descriptor = localDescriptor; 302ffe3c632Sopenharmony_ci } 303ffe3c632Sopenharmony_ci return descriptor; 304ffe3c632Sopenharmony_ci} 305ffe3c632Sopenharmony_ci 306ffe3c632Sopenharmony_ci@end 307ffe3c632Sopenharmony_ci 308ffe3c632Sopenharmony_ci 309ffe3c632Sopenharmony_ci#pragma clang diagnostic pop 310ffe3c632Sopenharmony_ci 311ffe3c632Sopenharmony_ci// @@protoc_insertion_point(global_scope) 312