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/any.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/Any.pbobjc.h> |
| 18 | #else |
| 19 | #import "google/protobuf/Any.pbobjc.h" |
| 20 | #endif |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 21 | // @@protoc_insertion_point(imports) |
| 22 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 23 | #pragma clang diagnostic push |
| 24 | #pragma clang diagnostic ignored "-Wdeprecated-declarations" |
| 25 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 26 | #pragma mark - GPBAnyRoot |
| 27 | |
| 28 | @implementation GPBAnyRoot |
| 29 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 30 | // No extensions in the file and no imports, so no need to generate |
| 31 | // +extensionRegistry. |
| 32 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 33 | @end |
| 34 | |
| 35 | #pragma mark - GPBAnyRoot_FileDescriptor |
| 36 | |
| 37 | static GPBFileDescriptor *GPBAnyRoot_FileDescriptor(void) { |
| 38 | // This is called by +initialize so there is no need to worry |
| 39 | // about thread safety of the singleton. |
| 40 | static GPBFileDescriptor *descriptor = NULL; |
| 41 | if (!descriptor) { |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 42 | GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 43 | descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 44 | objcPrefix:@"GPB" |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 45 | syntax:GPBFileSyntaxProto3]; |
| 46 | } |
| 47 | return descriptor; |
| 48 | } |
| 49 | |
| 50 | #pragma mark - GPBAny |
| 51 | |
| 52 | @implementation GPBAny |
| 53 | |
| 54 | @dynamic typeURL; |
| 55 | @dynamic value; |
| 56 | |
| 57 | typedef struct GPBAny__storage_ { |
| 58 | uint32_t _has_storage_[1]; |
| 59 | NSString *typeURL; |
| 60 | NSData *value; |
| 61 | } GPBAny__storage_; |
| 62 | |
| 63 | // This method is threadsafe because it is initially called |
| 64 | // in +initialize for each subclass. |
| 65 | + (GPBDescriptor *)descriptor { |
| 66 | static GPBDescriptor *descriptor = nil; |
| 67 | if (!descriptor) { |
| 68 | static GPBMessageFieldDescription fields[] = { |
| 69 | { |
| 70 | .name = "typeURL", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 71 | .dataTypeSpecific.className = NULL, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 72 | .number = GPBAny_FieldNumber_TypeURL, |
| 73 | .hasIndex = 0, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 74 | .offset = (uint32_t)offsetof(GPBAny__storage_, typeURL), |
| 75 | .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 76 | .dataType = GPBDataTypeString, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 77 | }, |
| 78 | { |
| 79 | .name = "value", |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 80 | .dataTypeSpecific.className = NULL, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 81 | .number = GPBAny_FieldNumber_Value, |
| 82 | .hasIndex = 1, |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 83 | .offset = (uint32_t)offsetof(GPBAny__storage_, value), |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 84 | .flags = GPBFieldOptional, |
| 85 | .dataType = GPBDataTypeBytes, |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 86 | }, |
| 87 | }; |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 88 | GPBDescriptor *localDescriptor = |
| 89 | [GPBDescriptor allocDescriptorForClass:[GPBAny class] |
| 90 | rootClass:[GPBAnyRoot class] |
| 91 | file:GPBAnyRoot_FileDescriptor() |
| 92 | fields:fields |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 93 | fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 94 | storageSize:sizeof(GPBAny__storage_) |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 95 | flags:GPBDescriptorInitializationFlag_None]; |
| 96 | #if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS |
| 97 | static const char *extraTextFormatInfo = |
| 98 | "\001\001\004\241!!\000"; |
| 99 | [localDescriptor setupExtraTextInfo:extraTextFormatInfo]; |
| 100 | #endif // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 101 | NSAssert(descriptor == nil, @"Startup recursed!"); |
| 102 | descriptor = localDescriptor; |
| 103 | } |
| 104 | return descriptor; |
| 105 | } |
| 106 | |
| 107 | @end |
| 108 | |
| 109 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 110 | #pragma clang diagnostic pop |
| 111 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 112 | // @@protoc_insertion_point(global_scope) |