Masterarbeit Richard Stern. Flutter App, sich mit einem Bluetooth-Gerät verbindet und Berührungen auf einem Sensor visualisiert.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Struct.pbobjc.m 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/struct.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. #import <stdatomic.h>
  14. #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
  15. #import <Protobuf/Struct.pbobjc.h>
  16. #else
  17. #import "google/protobuf/Struct.pbobjc.h"
  18. #endif
  19. // @@protoc_insertion_point(imports)
  20. #pragma clang diagnostic push
  21. #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  22. #pragma clang diagnostic ignored "-Wdirect-ivar-access"
  23. #pragma mark - GPBStructRoot
  24. @implementation GPBStructRoot
  25. // No extensions in the file and no imports, so no need to generate
  26. // +extensionRegistry.
  27. @end
  28. #pragma mark - GPBStructRoot_FileDescriptor
  29. static GPBFileDescriptor *GPBStructRoot_FileDescriptor(void) {
  30. // This is called by +initialize so there is no need to worry
  31. // about thread safety of the singleton.
  32. static GPBFileDescriptor *descriptor = NULL;
  33. if (!descriptor) {
  34. GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
  35. descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf"
  36. objcPrefix:@"GPB"
  37. syntax:GPBFileSyntaxProto3];
  38. }
  39. return descriptor;
  40. }
  41. #pragma mark - Enum GPBNullValue
  42. GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void) {
  43. static _Atomic(GPBEnumDescriptor*) descriptor = nil;
  44. if (!descriptor) {
  45. static const char *valueNames =
  46. "NullValue\000";
  47. static const int32_t values[] = {
  48. GPBNullValue_NullValue,
  49. };
  50. GPBEnumDescriptor *worker =
  51. [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBNullValue)
  52. valueNames:valueNames
  53. values:values
  54. count:(uint32_t)(sizeof(values) / sizeof(int32_t))
  55. enumVerifier:GPBNullValue_IsValidValue];
  56. GPBEnumDescriptor *expected = nil;
  57. if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
  58. [worker release];
  59. }
  60. }
  61. return descriptor;
  62. }
  63. BOOL GPBNullValue_IsValidValue(int32_t value__) {
  64. switch (value__) {
  65. case GPBNullValue_NullValue:
  66. return YES;
  67. default:
  68. return NO;
  69. }
  70. }
  71. #pragma mark - GPBStruct
  72. @implementation GPBStruct
  73. @dynamic fields, fields_Count;
  74. typedef struct GPBStruct__storage_ {
  75. uint32_t _has_storage_[1];
  76. NSMutableDictionary *fields;
  77. } GPBStruct__storage_;
  78. // This method is threadsafe because it is initially called
  79. // in +initialize for each subclass.
  80. + (GPBDescriptor *)descriptor {
  81. static GPBDescriptor *descriptor = nil;
  82. if (!descriptor) {
  83. static GPBMessageFieldDescription fields[] = {
  84. {
  85. .name = "fields",
  86. .dataTypeSpecific.className = GPBStringifySymbol(GPBValue),
  87. .number = GPBStruct_FieldNumber_Fields,
  88. .hasIndex = GPBNoHasBit,
  89. .offset = (uint32_t)offsetof(GPBStruct__storage_, fields),
  90. .flags = GPBFieldMapKeyString,
  91. .dataType = GPBDataTypeMessage,
  92. },
  93. };
  94. GPBDescriptor *localDescriptor =
  95. [GPBDescriptor allocDescriptorForClass:[GPBStruct class]
  96. rootClass:[GPBStructRoot class]
  97. file:GPBStructRoot_FileDescriptor()
  98. fields:fields
  99. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  100. storageSize:sizeof(GPBStruct__storage_)
  101. flags:GPBDescriptorInitializationFlag_None];
  102. NSAssert(descriptor == nil, @"Startup recursed!");
  103. descriptor = localDescriptor;
  104. }
  105. return descriptor;
  106. }
  107. @end
  108. #pragma mark - GPBValue
  109. @implementation GPBValue
  110. @dynamic kindOneOfCase;
  111. @dynamic nullValue;
  112. @dynamic numberValue;
  113. @dynamic stringValue;
  114. @dynamic boolValue;
  115. @dynamic structValue;
  116. @dynamic listValue;
  117. typedef struct GPBValue__storage_ {
  118. uint32_t _has_storage_[2];
  119. GPBNullValue nullValue;
  120. NSString *stringValue;
  121. GPBStruct *structValue;
  122. GPBListValue *listValue;
  123. double numberValue;
  124. } GPBValue__storage_;
  125. // This method is threadsafe because it is initially called
  126. // in +initialize for each subclass.
  127. + (GPBDescriptor *)descriptor {
  128. static GPBDescriptor *descriptor = nil;
  129. if (!descriptor) {
  130. static GPBMessageFieldDescription fields[] = {
  131. {
  132. .name = "nullValue",
  133. .dataTypeSpecific.enumDescFunc = GPBNullValue_EnumDescriptor,
  134. .number = GPBValue_FieldNumber_NullValue,
  135. .hasIndex = -1,
  136. .offset = (uint32_t)offsetof(GPBValue__storage_, nullValue),
  137. .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
  138. .dataType = GPBDataTypeEnum,
  139. },
  140. {
  141. .name = "numberValue",
  142. .dataTypeSpecific.className = NULL,
  143. .number = GPBValue_FieldNumber_NumberValue,
  144. .hasIndex = -1,
  145. .offset = (uint32_t)offsetof(GPBValue__storage_, numberValue),
  146. .flags = GPBFieldOptional,
  147. .dataType = GPBDataTypeDouble,
  148. },
  149. {
  150. .name = "stringValue",
  151. .dataTypeSpecific.className = NULL,
  152. .number = GPBValue_FieldNumber_StringValue,
  153. .hasIndex = -1,
  154. .offset = (uint32_t)offsetof(GPBValue__storage_, stringValue),
  155. .flags = GPBFieldOptional,
  156. .dataType = GPBDataTypeString,
  157. },
  158. {
  159. .name = "boolValue",
  160. .dataTypeSpecific.className = NULL,
  161. .number = GPBValue_FieldNumber_BoolValue,
  162. .hasIndex = -1,
  163. .offset = 0, // Stored in _has_storage_ to save space.
  164. .flags = GPBFieldOptional,
  165. .dataType = GPBDataTypeBool,
  166. },
  167. {
  168. .name = "structValue",
  169. .dataTypeSpecific.className = GPBStringifySymbol(GPBStruct),
  170. .number = GPBValue_FieldNumber_StructValue,
  171. .hasIndex = -1,
  172. .offset = (uint32_t)offsetof(GPBValue__storage_, structValue),
  173. .flags = GPBFieldOptional,
  174. .dataType = GPBDataTypeMessage,
  175. },
  176. {
  177. .name = "listValue",
  178. .dataTypeSpecific.className = GPBStringifySymbol(GPBListValue),
  179. .number = GPBValue_FieldNumber_ListValue,
  180. .hasIndex = -1,
  181. .offset = (uint32_t)offsetof(GPBValue__storage_, listValue),
  182. .flags = GPBFieldOptional,
  183. .dataType = GPBDataTypeMessage,
  184. },
  185. };
  186. GPBDescriptor *localDescriptor =
  187. [GPBDescriptor allocDescriptorForClass:[GPBValue class]
  188. rootClass:[GPBStructRoot class]
  189. file:GPBStructRoot_FileDescriptor()
  190. fields:fields
  191. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  192. storageSize:sizeof(GPBValue__storage_)
  193. flags:GPBDescriptorInitializationFlag_None];
  194. static const char *oneofs[] = {
  195. "kind",
  196. };
  197. [localDescriptor setupOneofs:oneofs
  198. count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
  199. firstHasIndex:-1];
  200. NSAssert(descriptor == nil, @"Startup recursed!");
  201. descriptor = localDescriptor;
  202. }
  203. return descriptor;
  204. }
  205. @end
  206. int32_t GPBValue_NullValue_RawValue(GPBValue *message) {
  207. GPBDescriptor *descriptor = [GPBValue descriptor];
  208. GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBValue_FieldNumber_NullValue];
  209. return GPBGetMessageInt32Field(message, field);
  210. }
  211. void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value) {
  212. GPBDescriptor *descriptor = [GPBValue descriptor];
  213. GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBValue_FieldNumber_NullValue];
  214. GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
  215. }
  216. void GPBValue_ClearKindOneOfCase(GPBValue *message) {
  217. GPBDescriptor *descriptor = [message descriptor];
  218. GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  219. GPBMaybeClearOneof(message, oneof, -1, 0);
  220. }
  221. #pragma mark - GPBListValue
  222. @implementation GPBListValue
  223. @dynamic valuesArray, valuesArray_Count;
  224. typedef struct GPBListValue__storage_ {
  225. uint32_t _has_storage_[1];
  226. NSMutableArray *valuesArray;
  227. } GPBListValue__storage_;
  228. // This method is threadsafe because it is initially called
  229. // in +initialize for each subclass.
  230. + (GPBDescriptor *)descriptor {
  231. static GPBDescriptor *descriptor = nil;
  232. if (!descriptor) {
  233. static GPBMessageFieldDescription fields[] = {
  234. {
  235. .name = "valuesArray",
  236. .dataTypeSpecific.className = GPBStringifySymbol(GPBValue),
  237. .number = GPBListValue_FieldNumber_ValuesArray,
  238. .hasIndex = GPBNoHasBit,
  239. .offset = (uint32_t)offsetof(GPBListValue__storage_, valuesArray),
  240. .flags = GPBFieldRepeated,
  241. .dataType = GPBDataTypeMessage,
  242. },
  243. };
  244. GPBDescriptor *localDescriptor =
  245. [GPBDescriptor allocDescriptorForClass:[GPBListValue class]
  246. rootClass:[GPBStructRoot class]
  247. file:GPBStructRoot_FileDescriptor()
  248. fields:fields
  249. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  250. storageSize:sizeof(GPBListValue__storage_)
  251. flags:GPBDescriptorInitializationFlag_None];
  252. NSAssert(descriptor == nil, @"Startup recursed!");
  253. descriptor = localDescriptor;
  254. }
  255. return descriptor;
  256. }
  257. @end
  258. #pragma clang diagnostic pop
  259. // @@protoc_insertion_point(global_scope)