GPBSourceContext.pbobjc.m 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/source_context.proto
  3. // This CPP symbol can be defined to use imports that match up to the framework
  4. // imports needed when using CocoaPods.
  5. #if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
  6. #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
  7. #endif
  8. #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
  9. #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
  10. #else
  11. #import "GPBProtocolBuffers_RuntimeSupport.h"
  12. #endif
  13. #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
  14. #import <Protobuf/GPBSourceContext.pbobjc.h>
  15. #else
  16. #import "GPBSourceContext.pbobjc.h"
  17. #endif
  18. // @@protoc_insertion_point(imports)
  19. #pragma clang diagnostic push
  20. #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  21. #pragma mark - GPBSourceContextRoot
  22. @implementation GPBSourceContextRoot
  23. // No extensions in the file and no imports, so no need to generate
  24. // +extensionRegistry.
  25. @end
  26. #pragma mark - GPBSourceContextRoot_FileDescriptor
  27. static GPBFileDescriptor *GPBSourceContextRoot_FileDescriptor(void) {
  28. // This is called by +initialize so there is no need to worry
  29. // about thread safety of the singleton.
  30. static GPBFileDescriptor *descriptor = NULL;
  31. if (!descriptor) {
  32. GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
  33. descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf"
  34. objcPrefix:@"GPB"
  35. syntax:GPBFileSyntaxProto3];
  36. }
  37. return descriptor;
  38. }
  39. #pragma mark - GPBSourceContext
  40. @implementation GPBSourceContext
  41. @dynamic fileName;
  42. typedef struct GPBSourceContext__storage_ {
  43. uint32_t _has_storage_[1];
  44. NSString *fileName;
  45. } GPBSourceContext__storage_;
  46. // This method is threadsafe because it is initially called
  47. // in +initialize for each subclass.
  48. + (GPBDescriptor *)descriptor {
  49. static GPBDescriptor *descriptor = nil;
  50. if (!descriptor) {
  51. static GPBMessageFieldDescription fields[] = {
  52. {
  53. .name = "fileName",
  54. .dataTypeSpecific.clazz = Nil,
  55. .number = GPBSourceContext_FieldNumber_FileName,
  56. .hasIndex = 0,
  57. .offset = (uint32_t)offsetof(GPBSourceContext__storage_, fileName),
  58. .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
  59. .dataType = GPBDataTypeString,
  60. },
  61. };
  62. GPBDescriptor *localDescriptor =
  63. [GPBDescriptor allocDescriptorForClass:[GPBSourceContext class]
  64. rootClass:[GPBSourceContextRoot class]
  65. file:GPBSourceContextRoot_FileDescriptor()
  66. fields:fields
  67. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  68. storageSize:sizeof(GPBSourceContext__storage_)
  69. flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)];
  70. #if defined(DEBUG) && DEBUG
  71. NSAssert(descriptor == nil, @"Startup recursed!");
  72. #endif // DEBUG
  73. descriptor = localDescriptor;
  74. }
  75. return descriptor;
  76. }
  77. @end
  78. #pragma clang diagnostic pop
  79. // @@protoc_insertion_point(global_scope)