GPBSourceContext.pbobjc.m 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // clang-format off
  3. // source: google/protobuf/source_context.proto
  4. #import "GPBProtocolBuffers_RuntimeSupport.h"
  5. #import "GPBSourceContext.pbobjc.h"
  6. #if GOOGLE_PROTOBUF_OBJC_VERSION < 30007
  7. #error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
  8. #endif
  9. #if 30007 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
  10. #error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
  11. #endif
  12. // @@protoc_insertion_point(imports)
  13. #pragma clang diagnostic push
  14. #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  15. #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
  16. #pragma mark - Objective-C Class declarations
  17. // Forward declarations of Objective-C classes that we can use as
  18. // static values in struct initializers.
  19. // We don't use [Foo class] because it is not a static value.
  20. GPBObjCClassDeclaration(GPBSourceContext);
  21. #pragma mark - GPBSourceContextRoot
  22. @implementation GPBSourceContextRoot
  23. // No extensions in the file and no imports or none of the imports (direct or
  24. // indirect) defined extensions, so no need to generate +extensionRegistry.
  25. @end
  26. static GPBFileDescription GPBSourceContextRoot_FileDescription = {
  27. .package = "google.protobuf",
  28. .prefix = "GPB",
  29. .syntax = GPBFileSyntaxProto3
  30. };
  31. #pragma mark - GPBSourceContext
  32. @implementation GPBSourceContext
  33. @dynamic fileName;
  34. typedef struct GPBSourceContext__storage_ {
  35. uint32_t _has_storage_[1];
  36. NSString *fileName;
  37. } GPBSourceContext__storage_;
  38. // This method is threadsafe because it is initially called
  39. // in +initialize for each subclass.
  40. + (GPBDescriptor *)descriptor {
  41. static GPBDescriptor *descriptor = nil;
  42. if (!descriptor) {
  43. GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
  44. static GPBMessageFieldDescription fields[] = {
  45. {
  46. .name = "fileName",
  47. .dataTypeSpecific.clazz = Nil,
  48. .number = GPBSourceContext_FieldNumber_FileName,
  49. .hasIndex = 0,
  50. .offset = (uint32_t)offsetof(GPBSourceContext__storage_, fileName),
  51. .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
  52. .dataType = GPBDataTypeString,
  53. },
  54. };
  55. GPBDescriptor *localDescriptor =
  56. [GPBDescriptor allocDescriptorForClass:GPBObjCClass(GPBSourceContext)
  57. messageName:@"SourceContext"
  58. fileDescription:&GPBSourceContextRoot_FileDescription
  59. fields:fields
  60. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  61. storageSize:sizeof(GPBSourceContext__storage_)
  62. flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
  63. #if defined(DEBUG) && DEBUG
  64. NSAssert(descriptor == nil, @"Startup recursed!");
  65. #endif // DEBUG
  66. descriptor = localDescriptor;
  67. }
  68. return descriptor;
  69. }
  70. @end
  71. #pragma clang diagnostic pop
  72. // @@protoc_insertion_point(global_scope)
  73. // clang-format on