1 /* Generated by the protocol buffer compiler. DO NOT EDIT! */
2 /* Generated from: modules/pb_tests/pb_tests.proto */
3
4 /* Do not generate deprecated warnings for self */
5 #ifndef PROTOBUF_C__NO_DEPRECATED
6 #define PROTOBUF_C__NO_DEPRECATED
7 #endif
8
9 #include "modules/pb_tests/pb_tests.pb-c.h"
test__struct__nested_struct__init(Test__Struct__NestedStruct * message)10 void test__struct__nested_struct__init(Test__Struct__NestedStruct *message)
11 {
12 static const Test__Struct__NestedStruct init_value =
13 TEST__STRUCT__NESTED_STRUCT__INIT;
14 *message = init_value;
15 }
test__struct__init(Test__Struct * message)16 void test__struct__init(Test__Struct *message)
17 {
18 static const Test__Struct init_value = TEST__STRUCT__INIT;
19 *message = init_value;
20 }
test__struct__get_packed_size(const Test__Struct * message)21 size_t test__struct__get_packed_size(const Test__Struct *message)
22 {
23 assert(message->base.descriptor == &test__struct__descriptor);
24 return protobuf_c_message_get_packed_size(
25 (const ProtobufCMessage *) (message));
26 }
test__struct__pack(const Test__Struct * message,uint8_t * out)27 size_t test__struct__pack(const Test__Struct *message, uint8_t *out)
28 {
29 assert(message->base.descriptor == &test__struct__descriptor);
30 return protobuf_c_message_pack((const ProtobufCMessage *) message, out);
31 }
test__struct__pack_to_buffer(const Test__Struct * message,ProtobufCBuffer * buffer)32 size_t test__struct__pack_to_buffer(
33 const Test__Struct *message,
34 ProtobufCBuffer *buffer)
35 {
36 assert(message->base.descriptor == &test__struct__descriptor);
37 return protobuf_c_message_pack_to_buffer(
38 (const ProtobufCMessage *) message, buffer);
39 }
test__struct__unpack(ProtobufCAllocator * allocator,size_t len,const uint8_t * data)40 Test__Struct *test__struct__unpack(
41 ProtobufCAllocator *allocator,
42 size_t len,
43 const uint8_t *data)
44 {
45 return (Test__Struct *) protobuf_c_message_unpack(
46 &test__struct__descriptor, allocator, len, data);
47 }
test__struct__free_unpacked(Test__Struct * message,ProtobufCAllocator * allocator)48 void test__struct__free_unpacked(
49 Test__Struct *message,
50 ProtobufCAllocator *allocator)
51 {
52 if (!message)
53 return;
54 assert(message->base.descriptor == &test__struct__descriptor);
55 protobuf_c_message_free_unpacked((ProtobufCMessage *) message, allocator);
56 }
test__map_struct__init(Test__MapStruct * message)57 void test__map_struct__init(Test__MapStruct *message)
58 {
59 static const Test__MapStruct init_value = TEST__MAP_STRUCT__INIT;
60 *message = init_value;
61 }
test__map_struct__get_packed_size(const Test__MapStruct * message)62 size_t test__map_struct__get_packed_size(const Test__MapStruct *message)
63 {
64 assert(message->base.descriptor == &test__map_struct__descriptor);
65 return protobuf_c_message_get_packed_size(
66 (const ProtobufCMessage *) (message));
67 }
test__map_struct__pack(const Test__MapStruct * message,uint8_t * out)68 size_t test__map_struct__pack(const Test__MapStruct *message, uint8_t *out)
69 {
70 assert(message->base.descriptor == &test__map_struct__descriptor);
71 return protobuf_c_message_pack((const ProtobufCMessage *) message, out);
72 }
test__map_struct__pack_to_buffer(const Test__MapStruct * message,ProtobufCBuffer * buffer)73 size_t test__map_struct__pack_to_buffer(
74 const Test__MapStruct *message,
75 ProtobufCBuffer *buffer)
76 {
77 assert(message->base.descriptor == &test__map_struct__descriptor);
78 return protobuf_c_message_pack_to_buffer(
79 (const ProtobufCMessage *) message, buffer);
80 }
test__map_struct__unpack(ProtobufCAllocator * allocator,size_t len,const uint8_t * data)81 Test__MapStruct *test__map_struct__unpack(
82 ProtobufCAllocator *allocator,
83 size_t len,
84 const uint8_t *data)
85 {
86 return (Test__MapStruct *) protobuf_c_message_unpack(
87 &test__map_struct__descriptor, allocator, len, data);
88 }
test__map_struct__free_unpacked(Test__MapStruct * message,ProtobufCAllocator * allocator)89 void test__map_struct__free_unpacked(
90 Test__MapStruct *message,
91 ProtobufCAllocator *allocator)
92 {
93 if (!message)
94 return;
95 assert(message->base.descriptor == &test__map_struct__descriptor);
96 protobuf_c_message_free_unpacked((ProtobufCMessage *) message, allocator);
97 }
test__root_message__fmap_int32_entry__init(Test__RootMessage__FMapInt32Entry * message)98 void test__root_message__fmap_int32_entry__init(
99 Test__RootMessage__FMapInt32Entry *message)
100 {
101 static const Test__RootMessage__FMapInt32Entry init_value =
102 TEST__ROOT_MESSAGE__FMAP_INT32_ENTRY__INIT;
103 *message = init_value;
104 }
test__root_message__fmap_bool_entry__init(Test__RootMessage__FMapBoolEntry * message)105 void test__root_message__fmap_bool_entry__init(
106 Test__RootMessage__FMapBoolEntry *message)
107 {
108 static const Test__RootMessage__FMapBoolEntry init_value =
109 TEST__ROOT_MESSAGE__FMAP_BOOL_ENTRY__INIT;
110 *message = init_value;
111 }
test__root_message__fmap_string_entry__init(Test__RootMessage__FMapStringEntry * message)112 void test__root_message__fmap_string_entry__init(
113 Test__RootMessage__FMapStringEntry *message)
114 {
115 static const Test__RootMessage__FMapStringEntry init_value =
116 TEST__ROOT_MESSAGE__FMAP_STRING_ENTRY__INIT;
117 *message = init_value;
118 }
test__root_message__fmap_float_entry__init(Test__RootMessage__FMapFloatEntry * message)119 void test__root_message__fmap_float_entry__init(
120 Test__RootMessage__FMapFloatEntry *message)
121 {
122 static const Test__RootMessage__FMapFloatEntry init_value =
123 TEST__ROOT_MESSAGE__FMAP_FLOAT_ENTRY__INIT;
124 *message = init_value;
125 }
test__root_message__fmap_struct_entry__init(Test__RootMessage__FMapStructEntry * message)126 void test__root_message__fmap_struct_entry__init(
127 Test__RootMessage__FMapStructEntry *message)
128 {
129 static const Test__RootMessage__FMapStructEntry init_value =
130 TEST__ROOT_MESSAGE__FMAP_STRUCT_ENTRY__INIT;
131 *message = init_value;
132 }
test__root_message__init(Test__RootMessage * message)133 void test__root_message__init(Test__RootMessage *message)
134 {
135 static const Test__RootMessage init_value = TEST__ROOT_MESSAGE__INIT;
136 *message = init_value;
137 }
test__root_message__get_packed_size(const Test__RootMessage * message)138 size_t test__root_message__get_packed_size(const Test__RootMessage *message)
139 {
140 assert(message->base.descriptor == &test__root_message__descriptor);
141 return protobuf_c_message_get_packed_size(
142 (const ProtobufCMessage *) (message));
143 }
test__root_message__pack(const Test__RootMessage * message,uint8_t * out)144 size_t test__root_message__pack(const Test__RootMessage *message, uint8_t *out)
145 {
146 assert(message->base.descriptor == &test__root_message__descriptor);
147 return protobuf_c_message_pack((const ProtobufCMessage *) message, out);
148 }
test__root_message__pack_to_buffer(const Test__RootMessage * message,ProtobufCBuffer * buffer)149 size_t test__root_message__pack_to_buffer(
150 const Test__RootMessage *message,
151 ProtobufCBuffer *buffer)
152 {
153 assert(message->base.descriptor == &test__root_message__descriptor);
154 return protobuf_c_message_pack_to_buffer(
155 (const ProtobufCMessage *) message, buffer);
156 }
test__root_message__unpack(ProtobufCAllocator * allocator,size_t len,const uint8_t * data)157 Test__RootMessage *test__root_message__unpack(
158 ProtobufCAllocator *allocator,
159 size_t len,
160 const uint8_t *data)
161 {
162 return (Test__RootMessage *) protobuf_c_message_unpack(
163 &test__root_message__descriptor, allocator, len, data);
164 }
test__root_message__free_unpacked(Test__RootMessage * message,ProtobufCAllocator * allocator)165 void test__root_message__free_unpacked(
166 Test__RootMessage *message,
167 ProtobufCAllocator *allocator)
168 {
169 if (!message)
170 return;
171 assert(message->base.descriptor == &test__root_message__descriptor);
172 protobuf_c_message_free_unpacked((ProtobufCMessage *) message, allocator);
173 }
174 static const ProtobufCFieldDescriptor
175 test__struct__nested_struct__field_descriptors[2] = {
176 {
177 "f_int32",
178 1,
179 PROTOBUF_C_LABEL_OPTIONAL,
180 PROTOBUF_C_TYPE_INT32,
181 offsetof(Test__Struct__NestedStruct, has_f_int32),
182 offsetof(Test__Struct__NestedStruct, f_int32),
183 NULL,
184 NULL,
185 0, /* flags */
186 0,
187 NULL,
188 NULL /* reserved1,reserved2, etc */
189 },
190 {
191 "f_string",
192 2,
193 PROTOBUF_C_LABEL_OPTIONAL,
194 PROTOBUF_C_TYPE_STRING,
195 0, /* quantifier_offset */
196 offsetof(Test__Struct__NestedStruct, f_string),
197 NULL,
198 NULL,
199 0, /* flags */
200 0,
201 NULL,
202 NULL /* reserved1,reserved2, etc */
203 },
204 };
205 static const unsigned test__struct__nested_struct__field_indices_by_name[] = {
206 0, /* field[0] = f_int32 */
207 1, /* field[1] = f_string */
208 };
209 static const ProtobufCIntRange
210 test__struct__nested_struct__number_ranges[1 + 1] = {{1, 0}, {0, 2}};
211 const ProtobufCMessageDescriptor test__struct__nested_struct__descriptor = {
212 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
213 "test.Struct.NestedStruct",
214 "NestedStruct",
215 "Test__Struct__NestedStruct",
216 "test",
217 sizeof(Test__Struct__NestedStruct),
218 2,
219 test__struct__nested_struct__field_descriptors,
220 test__struct__nested_struct__field_indices_by_name,
221 1,
222 test__struct__nested_struct__number_ranges,
223 (ProtobufCMessageInit) test__struct__nested_struct__init,
224 NULL,
225 NULL,
226 NULL /* reserved[123] */
227 };
228 static const ProtobufCEnumValue test__struct__enum__enum_values_by_number[2] = {
229 {"FIRST", "TEST__STRUCT__ENUM__FIRST", 0},
230 {"SECOND", "TEST__STRUCT__ENUM__SECOND", 1},
231 };
232 static const ProtobufCIntRange test__struct__enum__value_ranges[] = {
233 {0, 0},
234 {0, 2}};
235 static const ProtobufCEnumValueIndex
236 test__struct__enum__enum_values_by_name[2] = {
237 {"FIRST", 0},
238 {"SECOND", 1},
239 };
240 const ProtobufCEnumDescriptor test__struct__enum__descriptor = {
241 PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
242 "test.Struct.Enum",
243 "Enum",
244 "Test__Struct__Enum",
245 "test",
246 2,
247 test__struct__enum__enum_values_by_number,
248 2,
249 test__struct__enum__enum_values_by_name,
250 1,
251 test__struct__enum__value_ranges,
252 NULL,
253 NULL,
254 NULL,
255 NULL /* reserved[1234] */
256 };
257 static const ProtobufCFieldDescriptor test__struct__field_descriptors[4] = {
258 {
259 "f_string",
260 1,
261 PROTOBUF_C_LABEL_REQUIRED,
262 PROTOBUF_C_TYPE_STRING,
263 0, /* quantifier_offset */
264 offsetof(Test__Struct, f_string),
265 NULL,
266 NULL,
267 0, /* flags */
268 0,
269 NULL,
270 NULL /* reserved1,reserved2, etc */
271 },
272 {
273 "f_enum",
274 2,
275 PROTOBUF_C_LABEL_OPTIONAL,
276 PROTOBUF_C_TYPE_ENUM,
277 offsetof(Test__Struct, has_f_enum),
278 offsetof(Test__Struct, f_enum),
279 &test__struct__enum__descriptor,
280 NULL,
281 0, /* flags */
282 0,
283 NULL,
284 NULL /* reserved1,reserved2, etc */
285 },
286 {
287 "f_nested_struct",
288 3,
289 PROTOBUF_C_LABEL_OPTIONAL,
290 PROTOBUF_C_TYPE_MESSAGE,
291 0, /* quantifier_offset */
292 offsetof(Test__Struct, f_nested_struct),
293 &test__struct__nested_struct__descriptor,
294 NULL,
295 0, /* flags */
296 0,
297 NULL,
298 NULL /* reserved1,reserved2, etc */
299 },
300 {
301 "f_nested_struct_array",
302 4,
303 PROTOBUF_C_LABEL_REPEATED,
304 PROTOBUF_C_TYPE_MESSAGE,
305 offsetof(Test__Struct, n_f_nested_struct_array),
306 offsetof(Test__Struct, f_nested_struct_array),
307 &test__struct__nested_struct__descriptor,
308 NULL,
309 0, /* flags */
310 0,
311 NULL,
312 NULL /* reserved1,reserved2, etc */
313 },
314 };
315 static const unsigned test__struct__field_indices_by_name[] = {
316 1, /* field[1] = f_enum */
317 2, /* field[2] = f_nested_struct */
318 3, /* field[3] = f_nested_struct_array */
319 0, /* field[0] = f_string */
320 };
321 static const ProtobufCIntRange test__struct__number_ranges[1 + 1] = {
322 {1, 0},
323 {0, 4}};
324 const ProtobufCMessageDescriptor test__struct__descriptor = {
325 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
326 "test.Struct",
327 "Struct",
328 "Test__Struct",
329 "test",
330 sizeof(Test__Struct),
331 4,
332 test__struct__field_descriptors,
333 test__struct__field_indices_by_name,
334 1,
335 test__struct__number_ranges,
336 (ProtobufCMessageInit) test__struct__init,
337 NULL,
338 NULL,
339 NULL /* reserved[123] */
340 };
341 static const ProtobufCFieldDescriptor test__map_struct__field_descriptors[2] = {
342 {
343 "f_int32",
344 1,
345 PROTOBUF_C_LABEL_OPTIONAL,
346 PROTOBUF_C_TYPE_INT32,
347 offsetof(Test__MapStruct, has_f_int32),
348 offsetof(Test__MapStruct, f_int32),
349 NULL,
350 NULL,
351 0, /* flags */
352 0,
353 NULL,
354 NULL /* reserved1,reserved2, etc */
355 },
356 {
357 "f_int64",
358 2,
359 PROTOBUF_C_LABEL_OPTIONAL,
360 PROTOBUF_C_TYPE_INT64,
361 offsetof(Test__MapStruct, has_f_int64),
362 offsetof(Test__MapStruct, f_int64),
363 NULL,
364 NULL,
365 0, /* flags */
366 0,
367 NULL,
368 NULL /* reserved1,reserved2, etc */
369 },
370 };
371 static const unsigned test__map_struct__field_indices_by_name[] = {
372 0, /* field[0] = f_int32 */
373 1, /* field[1] = f_int64 */
374 };
375 static const ProtobufCIntRange test__map_struct__number_ranges[1 + 1] = {
376 {1, 0},
377 {0, 2}};
378 const ProtobufCMessageDescriptor test__map_struct__descriptor = {
379 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
380 "test.MapStruct",
381 "MapStruct",
382 "Test__MapStruct",
383 "test",
384 sizeof(Test__MapStruct),
385 2,
386 test__map_struct__field_descriptors,
387 test__map_struct__field_indices_by_name,
388 1,
389 test__map_struct__number_ranges,
390 (ProtobufCMessageInit) test__map_struct__init,
391 NULL,
392 NULL,
393 NULL /* reserved[123] */
394 };
395 static const ProtobufCFieldDescriptor
396 test__root_message__fmap_int32_entry__field_descriptors[2] = {
397 {
398 "key",
399 1,
400 PROTOBUF_C_LABEL_OPTIONAL,
401 PROTOBUF_C_TYPE_STRING,
402 0, /* quantifier_offset */
403 offsetof(Test__RootMessage__FMapInt32Entry, key),
404 NULL,
405 NULL,
406 0, /* flags */
407 0,
408 NULL,
409 NULL /* reserved1,reserved2, etc */
410 },
411 {
412 "value",
413 2,
414 PROTOBUF_C_LABEL_OPTIONAL,
415 PROTOBUF_C_TYPE_INT32,
416 offsetof(Test__RootMessage__FMapInt32Entry, has_value),
417 offsetof(Test__RootMessage__FMapInt32Entry, value),
418 NULL,
419 NULL,
420 0, /* flags */
421 0,
422 NULL,
423 NULL /* reserved1,reserved2, etc */
424 },
425 };
426 static const unsigned
427 test__root_message__fmap_int32_entry__field_indices_by_name[] = {
428 0, /* field[0] = key */
429 1, /* field[1] = value */
430 };
431 static const ProtobufCIntRange
432 test__root_message__fmap_int32_entry__number_ranges[1 + 1] = {
433 {1, 0},
434 {0, 2}};
435 const ProtobufCMessageDescriptor
436 test__root_message__fmap_int32_entry__descriptor = {
437 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
438 "test.RootMessage.FMapInt32Entry",
439 "FMapInt32Entry",
440 "Test__RootMessage__FMapInt32Entry",
441 "test",
442 sizeof(Test__RootMessage__FMapInt32Entry),
443 2,
444 test__root_message__fmap_int32_entry__field_descriptors,
445 test__root_message__fmap_int32_entry__field_indices_by_name,
446 1,
447 test__root_message__fmap_int32_entry__number_ranges,
448 (ProtobufCMessageInit) test__root_message__fmap_int32_entry__init,
449 NULL,
450 NULL,
451 NULL /* reserved[123] */
452 };
453 static const ProtobufCFieldDescriptor
454 test__root_message__fmap_bool_entry__field_descriptors[2] = {
455 {
456 "key",
457 1,
458 PROTOBUF_C_LABEL_OPTIONAL,
459 PROTOBUF_C_TYPE_STRING,
460 0, /* quantifier_offset */
461 offsetof(Test__RootMessage__FMapBoolEntry, key),
462 NULL,
463 NULL,
464 0, /* flags */
465 0,
466 NULL,
467 NULL /* reserved1,reserved2, etc */
468 },
469 {
470 "value",
471 2,
472 PROTOBUF_C_LABEL_OPTIONAL,
473 PROTOBUF_C_TYPE_BOOL,
474 offsetof(Test__RootMessage__FMapBoolEntry, has_value),
475 offsetof(Test__RootMessage__FMapBoolEntry, value),
476 NULL,
477 NULL,
478 0, /* flags */
479 0,
480 NULL,
481 NULL /* reserved1,reserved2, etc */
482 },
483 };
484 static const unsigned
485 test__root_message__fmap_bool_entry__field_indices_by_name[] = {
486 0, /* field[0] = key */
487 1, /* field[1] = value */
488 };
489 static const ProtobufCIntRange
490 test__root_message__fmap_bool_entry__number_ranges[1 + 1] = {
491 {1, 0},
492 {0, 2}};
493 const ProtobufCMessageDescriptor
494 test__root_message__fmap_bool_entry__descriptor = {
495 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
496 "test.RootMessage.FMapBoolEntry",
497 "FMapBoolEntry",
498 "Test__RootMessage__FMapBoolEntry",
499 "test",
500 sizeof(Test__RootMessage__FMapBoolEntry),
501 2,
502 test__root_message__fmap_bool_entry__field_descriptors,
503 test__root_message__fmap_bool_entry__field_indices_by_name,
504 1,
505 test__root_message__fmap_bool_entry__number_ranges,
506 (ProtobufCMessageInit) test__root_message__fmap_bool_entry__init,
507 NULL,
508 NULL,
509 NULL /* reserved[123] */
510 };
511 static const ProtobufCFieldDescriptor
512 test__root_message__fmap_string_entry__field_descriptors[2] = {
513 {
514 "key",
515 1,
516 PROTOBUF_C_LABEL_OPTIONAL,
517 PROTOBUF_C_TYPE_STRING,
518 0, /* quantifier_offset */
519 offsetof(Test__RootMessage__FMapStringEntry, key),
520 NULL,
521 NULL,
522 0, /* flags */
523 0,
524 NULL,
525 NULL /* reserved1,reserved2, etc */
526 },
527 {
528 "value",
529 2,
530 PROTOBUF_C_LABEL_OPTIONAL,
531 PROTOBUF_C_TYPE_STRING,
532 0, /* quantifier_offset */
533 offsetof(Test__RootMessage__FMapStringEntry, value),
534 NULL,
535 NULL,
536 0, /* flags */
537 0,
538 NULL,
539 NULL /* reserved1,reserved2, etc */
540 },
541 };
542 static const unsigned
543 test__root_message__fmap_string_entry__field_indices_by_name[] = {
544 0, /* field[0] = key */
545 1, /* field[1] = value */
546 };
547 static const ProtobufCIntRange
548 test__root_message__fmap_string_entry__number_ranges[1 + 1] = {
549 {1, 0},
550 {0, 2}};
551 const ProtobufCMessageDescriptor
552 test__root_message__fmap_string_entry__descriptor = {
553 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
554 "test.RootMessage.FMapStringEntry",
555 "FMapStringEntry",
556 "Test__RootMessage__FMapStringEntry",
557 "test",
558 sizeof(Test__RootMessage__FMapStringEntry),
559 2,
560 test__root_message__fmap_string_entry__field_descriptors,
561 test__root_message__fmap_string_entry__field_indices_by_name,
562 1,
563 test__root_message__fmap_string_entry__number_ranges,
564 (ProtobufCMessageInit) test__root_message__fmap_string_entry__init,
565 NULL,
566 NULL,
567 NULL /* reserved[123] */
568 };
569 static const ProtobufCFieldDescriptor
570 test__root_message__fmap_float_entry__field_descriptors[2] = {
571 {
572 "key",
573 1,
574 PROTOBUF_C_LABEL_OPTIONAL,
575 PROTOBUF_C_TYPE_STRING,
576 0, /* quantifier_offset */
577 offsetof(Test__RootMessage__FMapFloatEntry, key),
578 NULL,
579 NULL,
580 0, /* flags */
581 0,
582 NULL,
583 NULL /* reserved1,reserved2, etc */
584 },
585 {
586 "value",
587 2,
588 PROTOBUF_C_LABEL_OPTIONAL,
589 PROTOBUF_C_TYPE_FLOAT,
590 offsetof(Test__RootMessage__FMapFloatEntry, has_value),
591 offsetof(Test__RootMessage__FMapFloatEntry, value),
592 NULL,
593 NULL,
594 0, /* flags */
595 0,
596 NULL,
597 NULL /* reserved1,reserved2, etc */
598 },
599 };
600 static const unsigned
601 test__root_message__fmap_float_entry__field_indices_by_name[] = {
602 0, /* field[0] = key */
603 1, /* field[1] = value */
604 };
605 static const ProtobufCIntRange
606 test__root_message__fmap_float_entry__number_ranges[1 + 1] = {
607 {1, 0},
608 {0, 2}};
609 const ProtobufCMessageDescriptor
610 test__root_message__fmap_float_entry__descriptor = {
611 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
612 "test.RootMessage.FMapFloatEntry",
613 "FMapFloatEntry",
614 "Test__RootMessage__FMapFloatEntry",
615 "test",
616 sizeof(Test__RootMessage__FMapFloatEntry),
617 2,
618 test__root_message__fmap_float_entry__field_descriptors,
619 test__root_message__fmap_float_entry__field_indices_by_name,
620 1,
621 test__root_message__fmap_float_entry__number_ranges,
622 (ProtobufCMessageInit) test__root_message__fmap_float_entry__init,
623 NULL,
624 NULL,
625 NULL /* reserved[123] */
626 };
627 static const ProtobufCFieldDescriptor
628 test__root_message__fmap_struct_entry__field_descriptors[2] = {
629 {
630 "key",
631 1,
632 PROTOBUF_C_LABEL_OPTIONAL,
633 PROTOBUF_C_TYPE_STRING,
634 0, /* quantifier_offset */
635 offsetof(Test__RootMessage__FMapStructEntry, key),
636 NULL,
637 NULL,
638 0, /* flags */
639 0,
640 NULL,
641 NULL /* reserved1,reserved2, etc */
642 },
643 {
644 "value",
645 2,
646 PROTOBUF_C_LABEL_OPTIONAL,
647 PROTOBUF_C_TYPE_MESSAGE,
648 0, /* quantifier_offset */
649 offsetof(Test__RootMessage__FMapStructEntry, value),
650 &test__map_struct__descriptor,
651 NULL,
652 0, /* flags */
653 0,
654 NULL,
655 NULL /* reserved1,reserved2, etc */
656 },
657 };
658 static const unsigned
659 test__root_message__fmap_struct_entry__field_indices_by_name[] = {
660 0, /* field[0] = key */
661 1, /* field[1] = value */
662 };
663 static const ProtobufCIntRange
664 test__root_message__fmap_struct_entry__number_ranges[1 + 1] = {
665 {1, 0},
666 {0, 2}};
667 const ProtobufCMessageDescriptor
668 test__root_message__fmap_struct_entry__descriptor = {
669 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
670 "test.RootMessage.FMapStructEntry",
671 "FMapStructEntry",
672 "Test__RootMessage__FMapStructEntry",
673 "test",
674 sizeof(Test__RootMessage__FMapStructEntry),
675 2,
676 test__root_message__fmap_struct_entry__field_descriptors,
677 test__root_message__fmap_struct_entry__field_indices_by_name,
678 1,
679 test__root_message__fmap_struct_entry__number_ranges,
680 (ProtobufCMessageInit) test__root_message__fmap_struct_entry__init,
681 NULL,
682 NULL,
683 NULL /* reserved[123] */
684 };
685 static const ProtobufCFieldDescriptor
686 test__root_message__field_descriptors[19] = {
687 {
688 "f_int32",
689 1,
690 PROTOBUF_C_LABEL_OPTIONAL,
691 PROTOBUF_C_TYPE_INT32,
692 offsetof(Test__RootMessage, has_f_int32),
693 offsetof(Test__RootMessage, f_int32),
694 NULL,
695 NULL,
696 0, /* flags */
697 0,
698 NULL,
699 NULL /* reserved1,reserved2, etc */
700 },
701 {
702 "f_int64",
703 2,
704 PROTOBUF_C_LABEL_OPTIONAL,
705 PROTOBUF_C_TYPE_INT64,
706 offsetof(Test__RootMessage, has_f_int64),
707 offsetof(Test__RootMessage, f_int64),
708 NULL,
709 NULL,
710 0, /* flags */
711 0,
712 NULL,
713 NULL /* reserved1,reserved2, etc */
714 },
715 {
716 "f_sint32",
717 5,
718 PROTOBUF_C_LABEL_OPTIONAL,
719 PROTOBUF_C_TYPE_SINT32,
720 offsetof(Test__RootMessage, has_f_sint32),
721 offsetof(Test__RootMessage, f_sint32),
722 NULL,
723 NULL,
724 0, /* flags */
725 0,
726 NULL,
727 NULL /* reserved1,reserved2, etc */
728 },
729 {
730 "f_sint64",
731 6,
732 PROTOBUF_C_LABEL_OPTIONAL,
733 PROTOBUF_C_TYPE_SINT64,
734 offsetof(Test__RootMessage, has_f_sint64),
735 offsetof(Test__RootMessage, f_sint64),
736 NULL,
737 NULL,
738 0, /* flags */
739 0,
740 NULL,
741 NULL /* reserved1,reserved2, etc */
742 },
743 {
744 "f_sfixed32",
745 9,
746 PROTOBUF_C_LABEL_OPTIONAL,
747 PROTOBUF_C_TYPE_SFIXED32,
748 offsetof(Test__RootMessage, has_f_sfixed32),
749 offsetof(Test__RootMessage, f_sfixed32),
750 NULL,
751 NULL,
752 0, /* flags */
753 0,
754 NULL,
755 NULL /* reserved1,reserved2, etc */
756 },
757 {
758 "f_sfixed64",
759 10,
760 PROTOBUF_C_LABEL_OPTIONAL,
761 PROTOBUF_C_TYPE_SFIXED64,
762 offsetof(Test__RootMessage, has_f_sfixed64),
763 offsetof(Test__RootMessage, f_sfixed64),
764 NULL,
765 NULL,
766 0, /* flags */
767 0,
768 NULL,
769 NULL /* reserved1,reserved2, etc */
770 },
771 {
772 "f_bool",
773 11,
774 PROTOBUF_C_LABEL_OPTIONAL,
775 PROTOBUF_C_TYPE_BOOL,
776 offsetof(Test__RootMessage, has_f_bool),
777 offsetof(Test__RootMessage, f_bool),
778 NULL,
779 NULL,
780 0, /* flags */
781 0,
782 NULL,
783 NULL /* reserved1,reserved2, etc */
784 },
785 {
786 "f_string",
787 12,
788 PROTOBUF_C_LABEL_OPTIONAL,
789 PROTOBUF_C_TYPE_STRING,
790 0, /* quantifier_offset */
791 offsetof(Test__RootMessage, f_string),
792 NULL,
793 NULL,
794 0, /* flags */
795 0,
796 NULL,
797 NULL /* reserved1,reserved2, etc */
798 },
799 {
800 "f_bytes",
801 13,
802 PROTOBUF_C_LABEL_OPTIONAL,
803 PROTOBUF_C_TYPE_BYTES,
804 offsetof(Test__RootMessage, has_f_bytes),
805 offsetof(Test__RootMessage, f_bytes),
806 NULL,
807 NULL,
808 0, /* flags */
809 0,
810 NULL,
811 NULL /* reserved1,reserved2, etc */
812 },
813 {
814 "f_struct_array",
815 14,
816 PROTOBUF_C_LABEL_REPEATED,
817 PROTOBUF_C_TYPE_MESSAGE,
818 offsetof(Test__RootMessage, n_f_struct_array),
819 offsetof(Test__RootMessage, f_struct_array),
820 &test__struct__descriptor,
821 NULL,
822 0, /* flags */
823 0,
824 NULL,
825 NULL /* reserved1,reserved2, etc */
826 },
827 {
828 "f_map_int32",
829 15,
830 PROTOBUF_C_LABEL_REPEATED,
831 PROTOBUF_C_TYPE_MESSAGE,
832 offsetof(Test__RootMessage, n_f_map_int32),
833 offsetof(Test__RootMessage, f_map_int32),
834 &test__root_message__fmap_int32_entry__descriptor,
835 NULL,
836 0, /* flags */
837 0,
838 NULL,
839 NULL /* reserved1,reserved2, etc */
840 },
841 {
842 "f_map_bool",
843 16,
844 PROTOBUF_C_LABEL_REPEATED,
845 PROTOBUF_C_TYPE_MESSAGE,
846 offsetof(Test__RootMessage, n_f_map_bool),
847 offsetof(Test__RootMessage, f_map_bool),
848 &test__root_message__fmap_bool_entry__descriptor,
849 NULL,
850 0, /* flags */
851 0,
852 NULL,
853 NULL /* reserved1,reserved2, etc */
854 },
855 {
856 "f_map_string",
857 17,
858 PROTOBUF_C_LABEL_REPEATED,
859 PROTOBUF_C_TYPE_MESSAGE,
860 offsetof(Test__RootMessage, n_f_map_string),
861 offsetof(Test__RootMessage, f_map_string),
862 &test__root_message__fmap_string_entry__descriptor,
863 NULL,
864 0, /* flags */
865 0,
866 NULL,
867 NULL /* reserved1,reserved2, etc */
868 },
869 {
870 "f_map_float",
871 18,
872 PROTOBUF_C_LABEL_REPEATED,
873 PROTOBUF_C_TYPE_MESSAGE,
874 offsetof(Test__RootMessage, n_f_map_float),
875 offsetof(Test__RootMessage, f_map_float),
876 &test__root_message__fmap_float_entry__descriptor,
877 NULL,
878 0, /* flags */
879 0,
880 NULL,
881 NULL /* reserved1,reserved2, etc */
882 },
883 {
884 "f_map_struct",
885 19,
886 PROTOBUF_C_LABEL_REPEATED,
887 PROTOBUF_C_TYPE_MESSAGE,
888 offsetof(Test__RootMessage, n_f_map_struct),
889 offsetof(Test__RootMessage, f_map_struct),
890 &test__root_message__fmap_struct_entry__descriptor,
891 NULL,
892 0, /* flags */
893 0,
894 NULL,
895 NULL /* reserved1,reserved2, etc */
896 },
897 {
898 "f_oneof_string",
899 20,
900 PROTOBUF_C_LABEL_OPTIONAL,
901 PROTOBUF_C_TYPE_STRING,
902 offsetof(Test__RootMessage, f_oneof_case),
903 offsetof(Test__RootMessage, f_oneof_string),
904 NULL,
905 NULL,
906 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */
907 0,
908 NULL,
909 NULL /* reserved1,reserved2, etc */
910 },
911 {
912 "f_oneof_struct",
913 21,
914 PROTOBUF_C_LABEL_OPTIONAL,
915 PROTOBUF_C_TYPE_MESSAGE,
916 offsetof(Test__RootMessage, f_oneof_case),
917 offsetof(Test__RootMessage, f_oneof_struct),
918 &test__map_struct__descriptor,
919 NULL,
920 0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */
921 0,
922 NULL,
923 NULL /* reserved1,reserved2, etc */
924 },
925 {
926 "f_ignored",
927 22,
928 PROTOBUF_C_LABEL_OPTIONAL,
929 PROTOBUF_C_TYPE_STRING,
930 0, /* quantifier_offset */
931 offsetof(Test__RootMessage, f_ignored),
932 NULL,
933 NULL,
934 0, /* flags */
935 0,
936 NULL,
937 NULL /* reserved1,reserved2, etc */
938 },
939 {
940 "f_renamed",
941 23,
942 PROTOBUF_C_LABEL_OPTIONAL,
943 PROTOBUF_C_TYPE_STRING,
944 0, /* quantifier_offset */
945 offsetof(Test__RootMessage, f_renamed),
946 NULL,
947 NULL,
948 0, /* flags */
949 0,
950 NULL,
951 NULL /* reserved1,reserved2, etc */
952 },
953 };
954 static const unsigned test__root_message__field_indices_by_name[] = {
955 6, /* field[6] = f_bool */
956 8, /* field[8] = f_bytes */
957 17, /* field[17] = f_ignored */
958 0, /* field[0] = f_int32 */
959 1, /* field[1] = f_int64 */
960 11, /* field[11] = f_map_bool */
961 13, /* field[13] = f_map_float */
962 10, /* field[10] = f_map_int32 */
963 12, /* field[12] = f_map_string */
964 14, /* field[14] = f_map_struct */
965 15, /* field[15] = f_oneof_string */
966 16, /* field[16] = f_oneof_struct */
967 18, /* field[18] = f_renamed */
968 4, /* field[4] = f_sfixed32 */
969 5, /* field[5] = f_sfixed64 */
970 2, /* field[2] = f_sint32 */
971 3, /* field[3] = f_sint64 */
972 7, /* field[7] = f_string */
973 9, /* field[9] = f_struct_array */
974 };
975 static const ProtobufCIntRange test__root_message__number_ranges[3 + 1] = {
976 {1, 0},
977 {5, 2},
978 {9, 4},
979 {0, 19}};
980 const ProtobufCMessageDescriptor test__root_message__descriptor = {
981 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
982 "test.RootMessage",
983 "RootMessage",
984 "Test__RootMessage",
985 "test",
986 sizeof(Test__RootMessage),
987 19,
988 test__root_message__field_descriptors,
989 test__root_message__field_indices_by_name,
990 3,
991 test__root_message__number_ranges,
992 (ProtobufCMessageInit) test__root_message__init,
993 NULL,
994 NULL,
995 NULL /* reserved[123] */
996 };
997