Debian Codegraph @

tests/auto/protobufgen/data/cmake_generated/generate_package_subfolders/qt/protobuf/qtprotobufgen.qpb.cpp

raw
1 /* This file is autogenerated. DO NOT CHANGE. All changes will be lost */
2
3
4 #include "qt/protobuf/qtprotobufgen.qpb.h"
5
6 #include <QtProtobuf/qprotobufregistration.h>
7
8 #include <cmath>
9
10 namespace qt::protobuf {
11 static QtProtobuf::ProtoTypeRegistrar ProtoTypeRegistrarGlobalEnumGadget(GlobalEnumGadget::registerTypes);
12 void GlobalEnumGadget::registerTypes()
13 {
14 qRegisterMetaType<GlobalEnum>();
15 qRegisterMetaType<qt::protobuf::GlobalEnumGadget::GlobalEnum>();
16 qRegisterProtobufEnumType<qt::protobuf::GlobalEnumGadget::GlobalEnum>();
17 }
18
19
20 class EnumTypes_QtProtobufData : public QSharedData
21 {
22 public:
23 EnumTypes_QtProtobufData()
24 : QSharedData(),
25 m_field1(GlobalEnumGadget::GlobalEnum::EnumValue1),
26 m_field2(EnumTypes_QtProtobufNested::NestedEnum::EnumValue1)
27 {
28 }
29
30 EnumTypes_QtProtobufData(const EnumTypes_QtProtobufData &other)
31 : QSharedData(other),
32 m_field1(other.m_field1),
33 m_field2(other.m_field2),
34 m_fieldOneOf(other.m_fieldOneOf)
35 {
36 }
37
38 GlobalEnumGadget::GlobalEnum m_field1;
39 EnumTypes_QtProtobufNested::NestedEnum m_field2;
40 QtProtobufPrivate::QProtobufOneof m_fieldOneOf;
41 };
42
43 EnumTypes::~EnumTypes() = default;
44
45 static constexpr struct {
46 QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
47 const std::array<uint, 17> qt_protobuf_EnumTypes_uint_data;
48 const char qt_protobuf_EnumTypes_char_data[51];
49 } qt_protobuf_EnumTypes_metadata {
50 // data
51 {
52 0, /* = version */
53 4, /* = num fields */
54 5, /* = field number offset */
55 9, /* = property index offset */
56 13, /* = field flags offset */
57 21, /* = message full name length */
58 },
59 // uint_data
60 {
61 // JSON name offsets:
62 22, /* = field1 */
63 29, /* = field2 */
64 36, /* = field3 */
65 43, /* = field4 */
66 50, /* = end-of-string-marker */
67 // Field numbers:
68 1, /* = field1 */
69 2, /* = field2 */
70 3, /* = field3 */
71 4, /* = field4 */
72 // Property indices:
73 0, /* = field1 */
74 1, /* = field2 */
75 2, /* = field3 */
76 4, /* = field4 */
77 // Field flags:
78 uint(QtProtobufPrivate::FieldFlag::Enum), /* = field1 */
79 uint(QtProtobufPrivate::FieldFlag::Enum), /* = field2 */
80 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Enum), /* = field3 */
81 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Enum), /* = field4 */
82 },
83 // char_data
84 /* metadata char_data: */
85 "qt.protobuf.EnumTypes\0" /* = full message name */
86 /* field char_data: */
87 "field1\0field2\0field3\0field4\0"
88 };
89
90 const QtProtobufPrivate::QProtobufPropertyOrdering EnumTypes::staticPropertyOrdering = {
91 &qt_protobuf_EnumTypes_metadata.data
92 };
93
94 void EnumTypes::registerTypes()
95 {
96 qRegisterMetaType<EnumTypes>();
97 qRegisterMetaType<QList<EnumTypes>>();
98 qRegisterProtobufEnumType<EnumTypes_QtProtobufNested::NestedEnum>();
99 qRegisterMetaType<NestedEnum>();
100 qRegisterMetaType<QList<NestedEnum>>();
101 }
102
103 EnumTypes::EnumTypes()
104 : QProtobufMessage(&EnumTypes::staticMetaObject, &EnumTypes::staticPropertyOrdering),
105 dptr(new EnumTypes_QtProtobufData)
106 {
107 }
108
109 EnumTypes::EnumTypes(const EnumTypes &other)
110 = default;
111 EnumTypes &EnumTypes::operator =(const EnumTypes &other)
112 {
113 EnumTypes temp(other);
114 swap(temp);
115 return *this;
116 }
117 EnumTypes::EnumTypes(EnumTypes &&other) noexcept
118 = default;
119 EnumTypes::operator QVariant() const
120 {
121 return QVariant::fromValue(*this);
122 }
123 bool comparesEqual(const EnumTypes &lhs, const EnumTypes &rhs) noexcept
124 {
125 return operator ==(static_cast<const QProtobufMessage&>(lhs),
126 static_cast<const QProtobufMessage&>(rhs))
127 && lhs.dptr->m_field1 == rhs.dptr->m_field1
128 && lhs.dptr->m_field2 == rhs.dptr->m_field2
129 && lhs.dptr->m_fieldOneOf == rhs.dptr->m_fieldOneOf;
130 }
131
132 GlobalEnumGadget::GlobalEnum EnumTypes::field1() const
133 {
134 return dptr->m_field1;
135 }
136
137 EnumTypes_QtProtobufNested::NestedEnum EnumTypes::field2() const
138 {
139 return dptr->m_field2;
140 }
141
142 GlobalEnumGadget::GlobalEnum EnumTypes::field3_p() const
143 {
144 return dptr->m_fieldOneOf.holdsField(3) ?
145 dptr->m_fieldOneOf.value<GlobalEnumGadget::GlobalEnum>() : GlobalEnumGadget::GlobalEnum(GlobalEnumGadget::GlobalEnum::EnumValue1);
146 }
147
148 bool EnumTypes::hasField3() const
149 {
150 return dptr->m_fieldOneOf.holdsField(3);
151 }
152 GlobalEnumGadget::GlobalEnum EnumTypes::field3() const
153 {
154 Q_ASSERT(dptr->m_fieldOneOf.holdsField(3));
155 return dptr->m_fieldOneOf.value<GlobalEnumGadget::GlobalEnum>();
156 }
157
158 EnumTypes_QtProtobufNested::NestedEnum EnumTypes::field4_p() const
159 {
160 return dptr->m_fieldOneOf.holdsField(4) ?
161 dptr->m_fieldOneOf.value<EnumTypes_QtProtobufNested::NestedEnum>() : EnumTypes_QtProtobufNested::NestedEnum(EnumTypes_QtProtobufNested::NestedEnum::EnumValue1);
162 }
163
164 bool EnumTypes::hasField4() const
165 {
166 return dptr->m_fieldOneOf.holdsField(4);
167 }
168 EnumTypes_QtProtobufNested::NestedEnum EnumTypes::field4() const
169 {
170 Q_ASSERT(dptr->m_fieldOneOf.holdsField(4));
171 return dptr->m_fieldOneOf.value<EnumTypes_QtProtobufNested::NestedEnum>();
172 }
173
174 void EnumTypes::setField1(GlobalEnumGadget::GlobalEnum field1)
175 {
176 if (dptr->m_field1 != field1) {
177 dptr.detach();
178 dptr->m_field1 = field1;
179 }
180 }
181
182 void EnumTypes::setField2(EnumTypes_QtProtobufNested::NestedEnum field2)
183 {
184 if (dptr->m_field2 != field2) {
185 dptr.detach();
186 dptr->m_field2 = field2;
187 }
188 }
189
190 void EnumTypes::setField3(GlobalEnumGadget::GlobalEnum field3)
191 {
192 if (!dptr->m_fieldOneOf.isEqual(field3, 3)) {
193 dptr.detach();
194 dptr->m_fieldOneOf.setValue(field3, 3);
195 }
196 }
197
198 void EnumTypes::setField3_p(GlobalEnumGadget::GlobalEnum field3)
199 {
200 if (!dptr->m_fieldOneOf.isEqual(field3, 3)) {
201 dptr.detach();
202 dptr->m_fieldOneOf.setValue(field3, 3);
203 }
204 }
205
206 void EnumTypes::setField4(EnumTypes_QtProtobufNested::NestedEnum field4)
207 {
208 if (!dptr->m_fieldOneOf.isEqual(field4, 4)) {
209 dptr.detach();
210 dptr->m_fieldOneOf.setValue(field4, 4);
211 }
212 }
213
214 void EnumTypes::setField4_p(EnumTypes_QtProtobufNested::NestedEnum field4)
215 {
216 if (!dptr->m_fieldOneOf.isEqual(field4, 4)) {
217 dptr.detach();
218 dptr->m_fieldOneOf.setValue(field4, 4);
219 }
220 }
221
222 EnumTypes::FieldOneOfFields EnumTypes::fieldOneOfField() const
223 {
224 return static_cast<FieldOneOfFields>(dptr->m_fieldOneOf.fieldNumber());
225 }
226 void EnumTypes::clearFieldOneOf()
227 {
228 if (dptr->m_fieldOneOf.fieldNumber() != QtProtobuf::InvalidFieldNumber) {
229 dptr.detach();
230 dptr->m_fieldOneOf = QtProtobufPrivate::QProtobufOneof();
231 }
232 }
233
234 class ScalarTypes_QtProtobufData : public QSharedData
235 {
236 public:
237 ScalarTypes_QtProtobufData()
238 : QSharedData(),
239 m_field1(0),
240 m_field2(0),
241 m_field3(0),
242 m_field4(0),
243 m_field6(0),
244 m_field7(0),
245 m_field8(0),
246 m_field9(0),
247 m_field11(0.0),
248 m_field12(0.0)
249 {
250 }
251
252 ScalarTypes_QtProtobufData(const ScalarTypes_QtProtobufData &other)
253 : QSharedData(other),
254 m_field1(other.m_field1),
255 m_field2(other.m_field2),
256 m_field3(other.m_field3),
257 m_field4(other.m_field4),
258 m_field5(other.m_field5),
259 m_field6(other.m_field6),
260 m_field7(other.m_field7),
261 m_field8(other.m_field8),
262 m_field9(other.m_field9),
263 m_field10(other.m_field10),
264 m_field11(other.m_field11),
265 m_field12(other.m_field12),
266 m_field13(other.m_field13),
267 m_field14(other.m_field14)
268 {
269 }
270
271 QtProtobuf::int32 m_field1;
272 QtProtobuf::uint32 m_field2;
273 QtProtobuf::sint32 m_field3;
274 QtProtobuf::fixed32 m_field4;
275 QtProtobuf::sfixed32 m_field5;
276 QtProtobuf::int64 m_field6;
277 QtProtobuf::uint64 m_field7;
278 QtProtobuf::sint64 m_field8;
279 QtProtobuf::fixed64 m_field9;
280 QtProtobuf::sfixed64 m_field10;
281 float m_field11;
282 double m_field12;
283 QString m_field13;
284 QByteArray m_field14;
285 };
286
287 ScalarTypes::~ScalarTypes() = default;
288
289 static constexpr struct {
290 QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
291 const std::array<uint, 57> qt_protobuf_ScalarTypes_uint_data;
292 const char qt_protobuf_ScalarTypes_char_data[128];
293 } qt_protobuf_ScalarTypes_metadata {
294 // data
295 {
296 0, /* = version */
297 14, /* = num fields */
298 15, /* = field number offset */
299 29, /* = property index offset */
300 43, /* = field flags offset */
301 23, /* = message full name length */
302 },
303 // uint_data
304 {
305 // JSON name offsets:
306 24, /* = field1 */
307 31, /* = field2 */
308 38, /* = field3 */
309 45, /* = field4 */
310 52, /* = field5 */
311 59, /* = field6 */
312 66, /* = field7 */
313 73, /* = field8 */
314 80, /* = field9 */
315 87, /* = field10 */
316 95, /* = field11 */
317 103, /* = field12 */
318 111, /* = field13 */
319 119, /* = field14 */
320 127, /* = end-of-string-marker */
321 // Field numbers:
322 1, /* = field1 */
323 2, /* = field2 */
324 3, /* = field3 */
325 4, /* = field4 */
326 5, /* = field5 */
327 6, /* = field6 */
328 7, /* = field7 */
329 8, /* = field8 */
330 9, /* = field9 */
331 10, /* = field10 */
332 11, /* = field11 */
333 12, /* = field12 */
334 13, /* = field13 */
335 14, /* = field14 */
336 // Property indices:
337 0, /* = field1 */
338 1, /* = field2 */
339 2, /* = field3 */
340 3, /* = field4 */
341 4, /* = field5 */
342 5, /* = field6 */
343 6, /* = field7 */
344 7, /* = field8 */
345 8, /* = field9 */
346 9, /* = field10 */
347 10, /* = field11 */
348 11, /* = field12 */
349 12, /* = field13 */
350 13, /* = field14 */
351 // Field flags:
352 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field1 */
353 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field2 */
354 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field3 */
355 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field4 */
356 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field5 */
357 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field6 */
358 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field7 */
359 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field8 */
360 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field9 */
361 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field10 */
362 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field11 */
363 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field12 */
364 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field13 */
365 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field14 */
366 },
367 // char_data
368 /* metadata char_data: */
369 "qt.protobuf.ScalarTypes\0" /* = full message name */
370 /* field char_data: */
371 "field1\0field2\0field3\0field4\0field5\0"
372 "field6\0field7\0field8\0field9\0field10\0"
373 "field11\0field12\0field13\0field14\0"
374 };
375
376 const QtProtobufPrivate::QProtobufPropertyOrdering ScalarTypes::staticPropertyOrdering = {
377 &qt_protobuf_ScalarTypes_metadata.data
378 };
379
380 void ScalarTypes::registerTypes()
381 {
382 qRegisterMetaType<ScalarTypes>();
383 qRegisterMetaType<QList<ScalarTypes>>();
384 }
385
386 ScalarTypes::ScalarTypes()
387 : QProtobufMessage(&ScalarTypes::staticMetaObject, &ScalarTypes::staticPropertyOrdering),
388 dptr(new ScalarTypes_QtProtobufData)
389 {
390 }
391
392 ScalarTypes::ScalarTypes(const ScalarTypes &other)
393 = default;
394 ScalarTypes &ScalarTypes::operator =(const ScalarTypes &other)
395 {
396 ScalarTypes temp(other);
397 swap(temp);
398 return *this;
399 }
400 ScalarTypes::ScalarTypes(ScalarTypes &&other) noexcept
401 = default;
402 ScalarTypes::operator QVariant() const
403 {
404 return QVariant::fromValue(*this);
405 }
406 bool comparesEqual(const ScalarTypes &lhs, const ScalarTypes &rhs) noexcept
407 {
408 return operator ==(static_cast<const QProtobufMessage&>(lhs),
409 static_cast<const QProtobufMessage&>(rhs))
410 && lhs.dptr->m_field1 == rhs.dptr->m_field1
411 && lhs.dptr->m_field2 == rhs.dptr->m_field2
412 && lhs.dptr->m_field3 == rhs.dptr->m_field3
413 && lhs.dptr->m_field4 == rhs.dptr->m_field4
414 && lhs.dptr->m_field5 == rhs.dptr->m_field5
415 && lhs.dptr->m_field6 == rhs.dptr->m_field6
416 && lhs.dptr->m_field7 == rhs.dptr->m_field7
417 && lhs.dptr->m_field8 == rhs.dptr->m_field8
418 && lhs.dptr->m_field9 == rhs.dptr->m_field9
419 && lhs.dptr->m_field10 == rhs.dptr->m_field10
420 && lhs.dptr->m_field11 == rhs.dptr->m_field11
421 && lhs.dptr->m_field12 == rhs.dptr->m_field12
422 && lhs.dptr->m_field13 == rhs.dptr->m_field13
423 && lhs.dptr->m_field14 == rhs.dptr->m_field14;
424 }
425
426 QtProtobuf::int32 ScalarTypes::field1() const
427 {
428 return dptr->m_field1;
429 }
430
431 QtProtobuf::uint32 ScalarTypes::field2() const
432 {
433 return dptr->m_field2;
434 }
435
436 QtProtobuf::sint32 ScalarTypes::field3() const
437 {
438 return dptr->m_field3;
439 }
440
441 QtProtobuf::fixed32 ScalarTypes::field4() const
442 {
443 return dptr->m_field4;
444 }
445
446 QtProtobuf::sfixed32 ScalarTypes::field5() const
447 {
448 return dptr->m_field5;
449 }
450
451 QtProtobuf::int64 ScalarTypes::field6() const
452 {
453 return dptr->m_field6;
454 }
455
456 QtProtobuf::uint64 ScalarTypes::field7() const
457 {
458 return dptr->m_field7;
459 }
460
461 QtProtobuf::sint64 ScalarTypes::field8() const
462 {
463 return dptr->m_field8;
464 }
465
466 QtProtobuf::fixed64 ScalarTypes::field9() const
467 {
468 return dptr->m_field9;
469 }
470
471 QtProtobuf::sfixed64 ScalarTypes::field10() const
472 {
473 return dptr->m_field10;
474 }
475
476 float ScalarTypes::field11() const
477 {
478 return dptr->m_field11;
479 }
480
481 double ScalarTypes::field12() const
482 {
483 return dptr->m_field12;
484 }
485
486 const QString &ScalarTypes::field13() const &
487 {
488 return dptr->m_field13;
489 }
490
491 const QByteArray &ScalarTypes::field14() const &
492 {
493 return dptr->m_field14;
494 }
495
496 void ScalarTypes::setField1(QtProtobuf::int32 field1)
497 {
498 if (dptr->m_field1 != field1) {
499 dptr.detach();
500 dptr->m_field1 = field1;
501 }
502 }
503
504 void ScalarTypes::setField2(QtProtobuf::uint32 field2)
505 {
506 if (dptr->m_field2 != field2) {
507 dptr.detach();
508 dptr->m_field2 = field2;
509 }
510 }
511
512 void ScalarTypes::setField3(QtProtobuf::sint32 field3)
513 {
514 if (dptr->m_field3 != field3) {
515 dptr.detach();
516 dptr->m_field3 = field3;
517 }
518 }
519
520 void ScalarTypes::setField4(QtProtobuf::fixed32 field4)
521 {
522 if (dptr->m_field4 != field4) {
523 dptr.detach();
524 dptr->m_field4 = field4;
525 }
526 }
527
528 void ScalarTypes::setField5(QtProtobuf::sfixed32 field5)
529 {
530 if (dptr->m_field5 != field5) {
531 dptr.detach();
532 dptr->m_field5 = field5;
533 }
534 }
535
536 void ScalarTypes::setField6(QtProtobuf::int64 field6)
537 {
538 if (dptr->m_field6 != field6) {
539 dptr.detach();
540 dptr->m_field6 = field6;
541 }
542 }
543
544 void ScalarTypes::setField7(QtProtobuf::uint64 field7)
545 {
546 if (dptr->m_field7 != field7) {
547 dptr.detach();
548 dptr->m_field7 = field7;
549 }
550 }
551
552 void ScalarTypes::setField8(QtProtobuf::sint64 field8)
553 {
554 if (dptr->m_field8 != field8) {
555 dptr.detach();
556 dptr->m_field8 = field8;
557 }
558 }
559
560 void ScalarTypes::setField9(QtProtobuf::fixed64 field9)
561 {
562 if (dptr->m_field9 != field9) {
563 dptr.detach();
564 dptr->m_field9 = field9;
565 }
566 }
567
568 void ScalarTypes::setField10(QtProtobuf::sfixed64 field10)
569 {
570 if (dptr->m_field10 != field10) {
571 dptr.detach();
572 dptr->m_field10 = field10;
573 }
574 }
575
576 void ScalarTypes::setField11(float field11)
577 {
578 if (dptr->m_field11 != field11 ||
579 std::signbit(dptr->m_field11) != std::signbit(field11)) {
580 dptr.detach();
581 dptr->m_field11 = field11;
582 }
583 }
584
585 void ScalarTypes::setField12(double field12)
586 {
587 if (dptr->m_field12 != field12 ||
588 std::signbit(dptr->m_field12) != std::signbit(field12)) {
589 dptr.detach();
590 dptr->m_field12 = field12;
591 }
592 }
593
594 void ScalarTypes::setField13(const QString &field13)
595 {
596 if (dptr->m_field13 != field13) {
597 dptr.detach();
598 dptr->m_field13 = field13;
599 }
600 }
601
602 void ScalarTypes::setField13(QString &&field13)
603 {
604 if (dptr->m_field13 != field13) {
605 dptr.detach();
606 dptr->m_field13 = std::move(field13);
607 }
608 }
609
610 void ScalarTypes::setField14(const QByteArray &field14)
611 {
612 if (dptr->m_field14 != field14) {
613 dptr.detach();
614 dptr->m_field14 = field14;
615 }
616 }
617
618 void ScalarTypes::setField14(QByteArray &&field14)
619 {
620 if (dptr->m_field14 != field14) {
621 dptr.detach();
622 dptr->m_field14 = std::move(field14);
623 }
624 }
625
626
627 class ScalarRepeatedTypes_QtProtobufData : public QSharedData
628 {
629 public:
630 ScalarRepeatedTypes_QtProtobufData()
631 : QSharedData()
632 {
633 }
634
635 ScalarRepeatedTypes_QtProtobufData(const ScalarRepeatedTypes_QtProtobufData &other)
636 : QSharedData(other),
637 m_field1(other.m_field1),
638 m_field2(other.m_field2),
639 m_field3(other.m_field3),
640 m_field4(other.m_field4),
641 m_field5(other.m_field5),
642 m_field6(other.m_field6),
643 m_field7(other.m_field7),
644 m_field8(other.m_field8),
645 m_field9(other.m_field9),
646 m_field10(other.m_field10),
647 m_field11(other.m_field11),
648 m_field12(other.m_field12),
649 m_field13(other.m_field13),
650 m_field14(other.m_field14)
651 {
652 }
653
654 QtProtobuf::int32List m_field1;
655 QtProtobuf::uint32List m_field2;
656 QtProtobuf::sint32List m_field3;
657 QtProtobuf::fixed32List m_field4;
658 QtProtobuf::sfixed32List m_field5;
659 QtProtobuf::int64List m_field6;
660 QtProtobuf::uint64List m_field7;
661 QtProtobuf::sint64List m_field8;
662 QtProtobuf::fixed64List m_field9;
663 QtProtobuf::sfixed64List m_field10;
664 QtProtobuf::floatList m_field11;
665 QtProtobuf::doubleList m_field12;
666 QStringList m_field13;
667 QByteArrayList m_field14;
668 };
669
670 ScalarRepeatedTypes::~ScalarRepeatedTypes() = default;
671
672 static constexpr struct {
673 QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
674 const std::array<uint, 57> qt_protobuf_ScalarRepeatedTypes_uint_data;
675 const char qt_protobuf_ScalarRepeatedTypes_char_data[136];
676 } qt_protobuf_ScalarRepeatedTypes_metadata {
677 // data
678 {
679 0, /* = version */
680 14, /* = num fields */
681 15, /* = field number offset */
682 29, /* = property index offset */
683 43, /* = field flags offset */
684 31, /* = message full name length */
685 },
686 // uint_data
687 {
688 // JSON name offsets:
689 32, /* = field1 */
690 39, /* = field2 */
691 46, /* = field3 */
692 53, /* = field4 */
693 60, /* = field5 */
694 67, /* = field6 */
695 74, /* = field7 */
696 81, /* = field8 */
697 88, /* = field9 */
698 95, /* = field10 */
699 103, /* = field11 */
700 111, /* = field12 */
701 119, /* = field13 */
702 127, /* = field14 */
703 135, /* = end-of-string-marker */
704 // Field numbers:
705 1, /* = field1 */
706 2, /* = field2 */
707 3, /* = field3 */
708 4, /* = field4 */
709 5, /* = field5 */
710 6, /* = field6 */
711 7, /* = field7 */
712 8, /* = field8 */
713 9, /* = field9 */
714 10, /* = field10 */
715 11, /* = field11 */
716 12, /* = field12 */
717 13, /* = field13 */
718 14, /* = field14 */
719 // Property indices:
720 0, /* = field1 */
721 1, /* = field2 */
722 2, /* = field3 */
723 3, /* = field4 */
724 4, /* = field5 */
725 5, /* = field6 */
726 6, /* = field7 */
727 7, /* = field8 */
728 8, /* = field9 */
729 9, /* = field10 */
730 10, /* = field11 */
731 11, /* = field12 */
732 12, /* = field13 */
733 13, /* = field14 */
734 // Field flags:
735 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field1 */
736 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field2 */
737 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field3 */
738 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field4 */
739 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field5 */
740 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field6 */
741 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field7 */
742 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field8 */
743 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field9 */
744 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field10 */
745 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field11 */
746 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field12 */
747 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field13 */
748 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field14 */
749 },
750 // char_data
751 /* metadata char_data: */
752 "qt.protobuf.ScalarRepeatedTypes\0" /* = full message name */
753 /* field char_data: */
754 "field1\0field2\0field3\0field4\0field5\0"
755 "field6\0field7\0field8\0field9\0field10\0"
756 "field11\0field12\0field13\0field14\0"
757 };
758
759 const QtProtobufPrivate::QProtobufPropertyOrdering ScalarRepeatedTypes::staticPropertyOrdering = {
760 &qt_protobuf_ScalarRepeatedTypes_metadata.data
761 };
762
763 void ScalarRepeatedTypes::registerTypes()
764 {
765 qRegisterMetaType<ScalarRepeatedTypes>();
766 qRegisterMetaType<QList<ScalarRepeatedTypes>>();
767 }
768
769 ScalarRepeatedTypes::ScalarRepeatedTypes()
770 : QProtobufMessage(&ScalarRepeatedTypes::staticMetaObject, &ScalarRepeatedTypes::staticPropertyOrdering),
771 dptr(new ScalarRepeatedTypes_QtProtobufData)
772 {
773 }
774
775 ScalarRepeatedTypes::ScalarRepeatedTypes(const ScalarRepeatedTypes &other)
776 = default;
777 ScalarRepeatedTypes &ScalarRepeatedTypes::operator =(const ScalarRepeatedTypes &other)
778 {
779 ScalarRepeatedTypes temp(other);
780 swap(temp);
781 return *this;
782 }
783 ScalarRepeatedTypes::ScalarRepeatedTypes(ScalarRepeatedTypes &&other) noexcept
784 = default;
785 ScalarRepeatedTypes::operator QVariant() const
786 {
787 return QVariant::fromValue(*this);
788 }
789 bool comparesEqual(const ScalarRepeatedTypes &lhs, const ScalarRepeatedTypes &rhs) noexcept
790 {
791 return operator ==(static_cast<const QProtobufMessage&>(lhs),
792 static_cast<const QProtobufMessage&>(rhs))
793 && lhs.dptr->m_field1 == rhs.dptr->m_field1
794 && lhs.dptr->m_field2 == rhs.dptr->m_field2
795 && lhs.dptr->m_field3 == rhs.dptr->m_field3
796 && lhs.dptr->m_field4 == rhs.dptr->m_field4
797 && lhs.dptr->m_field5 == rhs.dptr->m_field5
798 && lhs.dptr->m_field6 == rhs.dptr->m_field6
799 && lhs.dptr->m_field7 == rhs.dptr->m_field7
800 && lhs.dptr->m_field8 == rhs.dptr->m_field8
801 && lhs.dptr->m_field9 == rhs.dptr->m_field9
802 && lhs.dptr->m_field10 == rhs.dptr->m_field10
803 && lhs.dptr->m_field11 == rhs.dptr->m_field11
804 && lhs.dptr->m_field12 == rhs.dptr->m_field12
805 && lhs.dptr->m_field13 == rhs.dptr->m_field13
806 && lhs.dptr->m_field14 == rhs.dptr->m_field14;
807 }
808
809 const QtProtobuf::int32List &ScalarRepeatedTypes::field1() const &
810 {
811 return dptr->m_field1;
812 }
813
814 const QtProtobuf::uint32List &ScalarRepeatedTypes::field2() const &
815 {
816 return dptr->m_field2;
817 }
818
819 const QtProtobuf::sint32List &ScalarRepeatedTypes::field3() const &
820 {
821 return dptr->m_field3;
822 }
823
824 const QtProtobuf::fixed32List &ScalarRepeatedTypes::field4() const &
825 {
826 return dptr->m_field4;
827 }
828
829 const QtProtobuf::sfixed32List &ScalarRepeatedTypes::field5() const &
830 {
831 return dptr->m_field5;
832 }
833
834 const QtProtobuf::int64List &ScalarRepeatedTypes::field6() const &
835 {
836 return dptr->m_field6;
837 }
838
839 const QtProtobuf::uint64List &ScalarRepeatedTypes::field7() const &
840 {
841 return dptr->m_field7;
842 }
843
844 const QtProtobuf::sint64List &ScalarRepeatedTypes::field8() const &
845 {
846 return dptr->m_field8;
847 }
848
849 const QtProtobuf::fixed64List &ScalarRepeatedTypes::field9() const &
850 {
851 return dptr->m_field9;
852 }
853
854 const QtProtobuf::sfixed64List &ScalarRepeatedTypes::field10() const &
855 {
856 return dptr->m_field10;
857 }
858
859 const QtProtobuf::floatList &ScalarRepeatedTypes::field11() const &
860 {
861 return dptr->m_field11;
862 }
863
864 const QtProtobuf::doubleList &ScalarRepeatedTypes::field12() const &
865 {
866 return dptr->m_field12;
867 }
868
869 const QStringList &ScalarRepeatedTypes::field13() const &
870 {
871 return dptr->m_field13;
872 }
873
874 const QByteArrayList &ScalarRepeatedTypes::field14() const &
875 {
876 return dptr->m_field14;
877 }
878
879 void ScalarRepeatedTypes::setField1(const QtProtobuf::int32List &field1)
880 {
881 if (dptr->m_field1 != field1) {
882 dptr.detach();
883 dptr->m_field1 = field1;
884 }
885 }
886
887 void ScalarRepeatedTypes::setField1(QtProtobuf::int32List &&field1)
888 {
889 if (dptr->m_field1 != field1) {
890 dptr.detach();
891 dptr->m_field1 = std::move(field1);
892 }
893 }
894
895 void ScalarRepeatedTypes::setField2(const QtProtobuf::uint32List &field2)
896 {
897 if (dptr->m_field2 != field2) {
898 dptr.detach();
899 dptr->m_field2 = field2;
900 }
901 }
902
903 void ScalarRepeatedTypes::setField2(QtProtobuf::uint32List &&field2)
904 {
905 if (dptr->m_field2 != field2) {
906 dptr.detach();
907 dptr->m_field2 = std::move(field2);
908 }
909 }
910
911 void ScalarRepeatedTypes::setField3(const QtProtobuf::sint32List &field3)
912 {
913 if (dptr->m_field3 != field3) {
914 dptr.detach();
915 dptr->m_field3 = field3;
916 }
917 }
918
919 void ScalarRepeatedTypes::setField3(QtProtobuf::sint32List &&field3)
920 {
921 if (dptr->m_field3 != field3) {
922 dptr.detach();
923 dptr->m_field3 = std::move(field3);
924 }
925 }
926
927 void ScalarRepeatedTypes::setField4(const QtProtobuf::fixed32List &field4)
928 {
929 if (dptr->m_field4 != field4) {
930 dptr.detach();
931 dptr->m_field4 = field4;
932 }
933 }
934
935 void ScalarRepeatedTypes::setField4(QtProtobuf::fixed32List &&field4)
936 {
937 if (dptr->m_field4 != field4) {
938 dptr.detach();
939 dptr->m_field4 = std::move(field4);
940 }
941 }
942
943 void ScalarRepeatedTypes::setField5(const QtProtobuf::sfixed32List &field5)
944 {
945 if (dptr->m_field5 != field5) {
946 dptr.detach();
947 dptr->m_field5 = field5;
948 }
949 }
950
951 void ScalarRepeatedTypes::setField5(QtProtobuf::sfixed32List &&field5)
952 {
953 if (dptr->m_field5 != field5) {
954 dptr.detach();
955 dptr->m_field5 = std::move(field5);
956 }
957 }
958
959 void ScalarRepeatedTypes::setField6(const QtProtobuf::int64List &field6)
960 {
961 if (dptr->m_field6 != field6) {
962 dptr.detach();
963 dptr->m_field6 = field6;
964 }
965 }
966
967 void ScalarRepeatedTypes::setField6(QtProtobuf::int64List &&field6)
968 {
969 if (dptr->m_field6 != field6) {
970 dptr.detach();
971 dptr->m_field6 = std::move(field6);
972 }
973 }
974
975 void ScalarRepeatedTypes::setField7(const QtProtobuf::uint64List &field7)
976 {
977 if (dptr->m_field7 != field7) {
978 dptr.detach();
979 dptr->m_field7 = field7;
980 }
981 }
982
983 void ScalarRepeatedTypes::setField7(QtProtobuf::uint64List &&field7)
984 {
985 if (dptr->m_field7 != field7) {
986 dptr.detach();
987 dptr->m_field7 = std::move(field7);
988 }
989 }
990
991 void ScalarRepeatedTypes::setField8(const QtProtobuf::sint64List &field8)
992 {
993 if (dptr->m_field8 != field8) {
994 dptr.detach();
995 dptr->m_field8 = field8;
996 }
997 }
998
999 void ScalarRepeatedTypes::setField8(QtProtobuf::sint64List &&field8)
1000 {
1001 if (dptr->m_field8 != field8) {
1002 dptr.detach();
1003 dptr->m_field8 = std::move(field8);
1004 }
1005 }
1006
1007 void ScalarRepeatedTypes::setField9(const QtProtobuf::fixed64List &field9)
1008 {
1009 if (dptr->m_field9 != field9) {
1010 dptr.detach();
1011 dptr->m_field9 = field9;
1012 }
1013 }
1014
1015 void ScalarRepeatedTypes::setField9(QtProtobuf::fixed64List &&field9)
1016 {
1017 if (dptr->m_field9 != field9) {
1018 dptr.detach();
1019 dptr->m_field9 = std::move(field9);
1020 }
1021 }
1022
1023 void ScalarRepeatedTypes::setField10(const QtProtobuf::sfixed64List &field10)
1024 {
1025 if (dptr->m_field10 != field10) {
1026 dptr.detach();
1027 dptr->m_field10 = field10;
1028 }
1029 }
1030
1031 void ScalarRepeatedTypes::setField10(QtProtobuf::sfixed64List &&field10)
1032 {
1033 if (dptr->m_field10 != field10) {
1034 dptr.detach();
1035 dptr->m_field10 = std::move(field10);
1036 }
1037 }
1038
1039 void ScalarRepeatedTypes::setField11(const QtProtobuf::floatList &field11)
1040 {
1041 if (dptr->m_field11 != field11) {
1042 dptr.detach();
1043 dptr->m_field11 = field11;
1044 }
1045 }
1046
1047 void ScalarRepeatedTypes::setField11(QtProtobuf::floatList &&field11)
1048 {
1049 if (dptr->m_field11 != field11) {
1050 dptr.detach();
1051 dptr->m_field11 = std::move(field11);
1052 }
1053 }
1054
1055 void ScalarRepeatedTypes::setField12(const QtProtobuf::doubleList &field12)
1056 {
1057 if (dptr->m_field12 != field12) {
1058 dptr.detach();
1059 dptr->m_field12 = field12;
1060 }
1061 }
1062
1063 void ScalarRepeatedTypes::setField12(QtProtobuf::doubleList &&field12)
1064 {
1065 if (dptr->m_field12 != field12) {
1066 dptr.detach();
1067 dptr->m_field12 = std::move(field12);
1068 }
1069 }
1070
1071 void ScalarRepeatedTypes::setField13(const QStringList &field13)
1072 {
1073 if (dptr->m_field13 != field13) {
1074 dptr.detach();
1075 dptr->m_field13 = field13;
1076 }
1077 }
1078
1079 void ScalarRepeatedTypes::setField13(QStringList &&field13)
1080 {
1081 if (dptr->m_field13 != field13) {
1082 dptr.detach();
1083 dptr->m_field13 = std::move(field13);
1084 }
1085 }
1086
1087 void ScalarRepeatedTypes::setField14(const QByteArrayList &field14)
1088 {
1089 if (dptr->m_field14 != field14) {
1090 dptr.detach();
1091 dptr->m_field14 = field14;
1092 }
1093 }
1094
1095 void ScalarRepeatedTypes::setField14(QByteArrayList &&field14)
1096 {
1097 if (dptr->m_field14 != field14) {
1098 dptr.detach();
1099 dptr->m_field14 = std::move(field14);
1100 }
1101 }
1102
1103
1104 class ScalarRepeatedNoPackedTypes_QtProtobufData : public QSharedData
1105 {
1106 public:
1107 ScalarRepeatedNoPackedTypes_QtProtobufData()
1108 : QSharedData()
1109 {
1110 }
1111
1112 ScalarRepeatedNoPackedTypes_QtProtobufData(const ScalarRepeatedNoPackedTypes_QtProtobufData &other)
1113 : QSharedData(other),
1114 m_field1(other.m_field1),
1115 m_field2(other.m_field2),
1116 m_field3(other.m_field3),
1117 m_field4(other.m_field4),
1118 m_field5(other.m_field5),
1119 m_field6(other.m_field6),
1120 m_field7(other.m_field7),
1121 m_field8(other.m_field8),
1122 m_field9(other.m_field9),
1123 m_field10(other.m_field10),
1124 m_field11(other.m_field11),
1125 m_field12(other.m_field12),
1126 m_field13(other.m_field13),
1127 m_field14(other.m_field14),
1128 m_field15(other.m_field15)
1129 {
1130 }
1131
1132 QtProtobuf::int32List m_field1;
1133 QtProtobuf::uint32List m_field2;
1134 QtProtobuf::sint32List m_field3;
1135 QtProtobuf::fixed32List m_field4;
1136 QtProtobuf::sfixed32List m_field5;
1137 QtProtobuf::int64List m_field6;
1138 QtProtobuf::uint64List m_field7;
1139 QtProtobuf::sint64List m_field8;
1140 QtProtobuf::fixed64List m_field9;
1141 QtProtobuf::sfixed64List m_field10;
1142 QtProtobuf::floatList m_field11;
1143 QtProtobuf::doubleList m_field12;
1144 QStringList m_field13;
1145 QByteArrayList m_field14;
1146 QList<GlobalEnumGadget::GlobalEnum> m_field15;
1147 };
1148
1149 ScalarRepeatedNoPackedTypes::~ScalarRepeatedNoPackedTypes() = default;
1150
1151 static constexpr struct {
1152 QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
1153 const std::array<uint, 61> qt_protobuf_ScalarRepeatedNoPackedTypes_uint_data;
1154 const char qt_protobuf_ScalarRepeatedNoPackedTypes_char_data[152];
1155 } qt_protobuf_ScalarRepeatedNoPackedTypes_metadata {
1156 // data
1157 {
1158 0, /* = version */
1159 15, /* = num fields */
1160 16, /* = field number offset */
1161 31, /* = property index offset */
1162 46, /* = field flags offset */
1163 39, /* = message full name length */
1164 },
1165 // uint_data
1166 {
1167 // JSON name offsets:
1168 40, /* = field1 */
1169 47, /* = field2 */
1170 54, /* = field3 */
1171 61, /* = field4 */
1172 68, /* = field5 */
1173 75, /* = field6 */
1174 82, /* = field7 */
1175 89, /* = field8 */
1176 96, /* = field9 */
1177 103, /* = field10 */
1178 111, /* = field11 */
1179 119, /* = field12 */
1180 127, /* = field13 */
1181 135, /* = field14 */
1182 143, /* = field15 */
1183 151, /* = end-of-string-marker */
1184 // Field numbers:
1185 1, /* = field1 */
1186 2, /* = field2 */
1187 3, /* = field3 */
1188 4, /* = field4 */
1189 5, /* = field5 */
1190 6, /* = field6 */
1191 7, /* = field7 */
1192 8, /* = field8 */
1193 9, /* = field9 */
1194 10, /* = field10 */
1195 11, /* = field11 */
1196 12, /* = field12 */
1197 13, /* = field13 */
1198 14, /* = field14 */
1199 15, /* = field15 */
1200 // Property indices:
1201 0, /* = field1 */
1202 1, /* = field2 */
1203 2, /* = field3 */
1204 3, /* = field4 */
1205 4, /* = field5 */
1206 5, /* = field6 */
1207 6, /* = field7 */
1208 7, /* = field8 */
1209 8, /* = field9 */
1210 9, /* = field10 */
1211 10, /* = field11 */
1212 11, /* = field12 */
1213 12, /* = field13 */
1214 13, /* = field14 */
1215 14, /* = field15 */
1216 // Field flags:
1217 uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field1 */
1218 uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field2 */
1219 uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field3 */
1220 uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field4 */
1221 uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field5 */
1222 uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field6 */
1223 uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field7 */
1224 uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field8 */
1225 uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field9 */
1226 uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field10 */
1227 uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field11 */
1228 uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated), /* = field12 */
1229 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field13 */
1230 uint(QtProtobufPrivate::FieldFlag::Repeated), /* = field14 */
1231 uint(QtProtobufPrivate::FieldFlag::NonPacked | QtProtobufPrivate::FieldFlag::Repeated | QtProtobufPrivate::FieldFlag::Enum), /* = field15 */
1232 },
1233 // char_data
1234 /* metadata char_data: */
1235 "qt.protobuf.ScalarRepeatedNoPackedTypes\0" /* = full message name */
1236 /* field char_data: */
1237 "field1\0field2\0field3\0field4\0field5\0"
1238 "field6\0field7\0field8\0field9\0field10\0"
1239 "field11\0field12\0field13\0field14\0field15\0"
1240 };
1241
1242 const QtProtobufPrivate::QProtobufPropertyOrdering ScalarRepeatedNoPackedTypes::staticPropertyOrdering = {
1243 &qt_protobuf_ScalarRepeatedNoPackedTypes_metadata.data
1244 };
1245
1246 void ScalarRepeatedNoPackedTypes::registerTypes()
1247 {
1248 qRegisterMetaType<ScalarRepeatedNoPackedTypes>();
1249 qRegisterMetaType<QList<ScalarRepeatedNoPackedTypes>>();
1250 }
1251
1252 ScalarRepeatedNoPackedTypes::ScalarRepeatedNoPackedTypes()
1253 : QProtobufMessage(&ScalarRepeatedNoPackedTypes::staticMetaObject, &ScalarRepeatedNoPackedTypes::staticPropertyOrdering),
1254 dptr(new ScalarRepeatedNoPackedTypes_QtProtobufData)
1255 {
1256 }
1257
1258 ScalarRepeatedNoPackedTypes::ScalarRepeatedNoPackedTypes(const ScalarRepeatedNoPackedTypes &other)
1259 = default;
1260 ScalarRepeatedNoPackedTypes &ScalarRepeatedNoPackedTypes::operator =(const ScalarRepeatedNoPackedTypes &other)
1261 {
1262 ScalarRepeatedNoPackedTypes temp(other);
1263 swap(temp);
1264 return *this;
1265 }
1266 ScalarRepeatedNoPackedTypes::ScalarRepeatedNoPackedTypes(ScalarRepeatedNoPackedTypes &&other) noexcept
1267 = default;
1268 ScalarRepeatedNoPackedTypes::operator QVariant() const
1269 {
1270 return QVariant::fromValue(*this);
1271 }
1272 bool comparesEqual(const ScalarRepeatedNoPackedTypes &lhs, const ScalarRepeatedNoPackedTypes &rhs) noexcept
1273 {
1274 return operator ==(static_cast<const QProtobufMessage&>(lhs),
1275 static_cast<const QProtobufMessage&>(rhs))
1276 && lhs.dptr->m_field1 == rhs.dptr->m_field1
1277 && lhs.dptr->m_field2 == rhs.dptr->m_field2
1278 && lhs.dptr->m_field3 == rhs.dptr->m_field3
1279 && lhs.dptr->m_field4 == rhs.dptr->m_field4
1280 && lhs.dptr->m_field5 == rhs.dptr->m_field5
1281 && lhs.dptr->m_field6 == rhs.dptr->m_field6
1282 && lhs.dptr->m_field7 == rhs.dptr->m_field7
1283 && lhs.dptr->m_field8 == rhs.dptr->m_field8
1284 && lhs.dptr->m_field9 == rhs.dptr->m_field9
1285 && lhs.dptr->m_field10 == rhs.dptr->m_field10
1286 && lhs.dptr->m_field11 == rhs.dptr->m_field11
1287 && lhs.dptr->m_field12 == rhs.dptr->m_field12
1288 && lhs.dptr->m_field13 == rhs.dptr->m_field13
1289 && lhs.dptr->m_field14 == rhs.dptr->m_field14
1290 && lhs.dptr->m_field15 == rhs.dptr->m_field15;
1291 }
1292
1293 const QtProtobuf::int32List &ScalarRepeatedNoPackedTypes::field1() const &
1294 {
1295 return dptr->m_field1;
1296 }
1297
1298 const QtProtobuf::uint32List &ScalarRepeatedNoPackedTypes::field2() const &
1299 {
1300 return dptr->m_field2;
1301 }
1302
1303 const QtProtobuf::sint32List &ScalarRepeatedNoPackedTypes::field3() const &
1304 {
1305 return dptr->m_field3;
1306 }
1307
1308 const QtProtobuf::fixed32List &ScalarRepeatedNoPackedTypes::field4() const &
1309 {
1310 return dptr->m_field4;
1311 }
1312
1313 const QtProtobuf::sfixed32List &ScalarRepeatedNoPackedTypes::field5() const &
1314 {
1315 return dptr->m_field5;
1316 }
1317
1318 const QtProtobuf::int64List &ScalarRepeatedNoPackedTypes::field6() const &
1319 {
1320 return dptr->m_field6;
1321 }
1322
1323 const QtProtobuf::uint64List &ScalarRepeatedNoPackedTypes::field7() const &
1324 {
1325 return dptr->m_field7;
1326 }
1327
1328 const QtProtobuf::sint64List &ScalarRepeatedNoPackedTypes::field8() const &
1329 {
1330 return dptr->m_field8;
1331 }
1332
1333 const QtProtobuf::fixed64List &ScalarRepeatedNoPackedTypes::field9() const &
1334 {
1335 return dptr->m_field9;
1336 }
1337
1338 const QtProtobuf::sfixed64List &ScalarRepeatedNoPackedTypes::field10() const &
1339 {
1340 return dptr->m_field10;
1341 }
1342
1343 const QtProtobuf::floatList &ScalarRepeatedNoPackedTypes::field11() const &
1344 {
1345 return dptr->m_field11;
1346 }
1347
1348 const QtProtobuf::doubleList &ScalarRepeatedNoPackedTypes::field12() const &
1349 {
1350 return dptr->m_field12;
1351 }
1352
1353 const QStringList &ScalarRepeatedNoPackedTypes::field13() const &
1354 {
1355 return dptr->m_field13;
1356 }
1357
1358 const QByteArrayList &ScalarRepeatedNoPackedTypes::field14() const &
1359 {
1360 return dptr->m_field14;
1361 }
1362
1363 const QList<GlobalEnumGadget::GlobalEnum> &ScalarRepeatedNoPackedTypes::field15() const &
1364 {
1365 return dptr->m_field15;
1366 }
1367
1368 void ScalarRepeatedNoPackedTypes::setField1(const QtProtobuf::int32List &field1)
1369 {
1370 if (dptr->m_field1 != field1) {
1371 dptr.detach();
1372 dptr->m_field1 = field1;
1373 }
1374 }
1375
1376 void ScalarRepeatedNoPackedTypes::setField1(QtProtobuf::int32List &&field1)
1377 {
1378 if (dptr->m_field1 != field1) {
1379 dptr.detach();
1380 dptr->m_field1 = std::move(field1);
1381 }
1382 }
1383
1384 void ScalarRepeatedNoPackedTypes::setField2(const QtProtobuf::uint32List &field2)
1385 {
1386 if (dptr->m_field2 != field2) {
1387 dptr.detach();
1388 dptr->m_field2 = field2;
1389 }
1390 }
1391
1392 void ScalarRepeatedNoPackedTypes::setField2(QtProtobuf::uint32List &&field2)
1393 {
1394 if (dptr->m_field2 != field2) {
1395 dptr.detach();
1396 dptr->m_field2 = std::move(field2);
1397 }
1398 }
1399
1400 void ScalarRepeatedNoPackedTypes::setField3(const QtProtobuf::sint32List &field3)
1401 {
1402 if (dptr->m_field3 != field3) {
1403 dptr.detach();
1404 dptr->m_field3 = field3;
1405 }
1406 }
1407
1408 void ScalarRepeatedNoPackedTypes::setField3(QtProtobuf::sint32List &&field3)
1409 {
1410 if (dptr->m_field3 != field3) {
1411 dptr.detach();
1412 dptr->m_field3 = std::move(field3);
1413 }
1414 }
1415
1416 void ScalarRepeatedNoPackedTypes::setField4(const QtProtobuf::fixed32List &field4)
1417 {
1418 if (dptr->m_field4 != field4) {
1419 dptr.detach();
1420 dptr->m_field4 = field4;
1421 }
1422 }
1423
1424 void ScalarRepeatedNoPackedTypes::setField4(QtProtobuf::fixed32List &&field4)
1425 {
1426 if (dptr->m_field4 != field4) {
1427 dptr.detach();
1428 dptr->m_field4 = std::move(field4);
1429 }
1430 }
1431
1432 void ScalarRepeatedNoPackedTypes::setField5(const QtProtobuf::sfixed32List &field5)
1433 {
1434 if (dptr->m_field5 != field5) {
1435 dptr.detach();
1436 dptr->m_field5 = field5;
1437 }
1438 }
1439
1440 void ScalarRepeatedNoPackedTypes::setField5(QtProtobuf::sfixed32List &&field5)
1441 {
1442 if (dptr->m_field5 != field5) {
1443 dptr.detach();
1444 dptr->m_field5 = std::move(field5);
1445 }
1446 }
1447
1448 void ScalarRepeatedNoPackedTypes::setField6(const QtProtobuf::int64List &field6)
1449 {
1450 if (dptr->m_field6 != field6) {
1451 dptr.detach();
1452 dptr->m_field6 = field6;
1453 }
1454 }
1455
1456 void ScalarRepeatedNoPackedTypes::setField6(QtProtobuf::int64List &&field6)
1457 {
1458 if (dptr->m_field6 != field6) {
1459 dptr.detach();
1460 dptr->m_field6 = std::move(field6);
1461 }
1462 }
1463
1464 void ScalarRepeatedNoPackedTypes::setField7(const QtProtobuf::uint64List &field7)
1465 {
1466 if (dptr->m_field7 != field7) {
1467 dptr.detach();
1468 dptr->m_field7 = field7;
1469 }
1470 }
1471
1472 void ScalarRepeatedNoPackedTypes::setField7(QtProtobuf::uint64List &&field7)
1473 {
1474 if (dptr->m_field7 != field7) {
1475 dptr.detach();
1476 dptr->m_field7 = std::move(field7);
1477 }
1478 }
1479
1480 void ScalarRepeatedNoPackedTypes::setField8(const QtProtobuf::sint64List &field8)
1481 {
1482 if (dptr->m_field8 != field8) {
1483 dptr.detach();
1484 dptr->m_field8 = field8;
1485 }
1486 }
1487
1488 void ScalarRepeatedNoPackedTypes::setField8(QtProtobuf::sint64List &&field8)
1489 {
1490 if (dptr->m_field8 != field8) {
1491 dptr.detach();
1492 dptr->m_field8 = std::move(field8);
1493 }
1494 }
1495
1496 void ScalarRepeatedNoPackedTypes::setField9(const QtProtobuf::fixed64List &field9)
1497 {
1498 if (dptr->m_field9 != field9) {
1499 dptr.detach();
1500 dptr->m_field9 = field9;
1501 }
1502 }
1503
1504 void ScalarRepeatedNoPackedTypes::setField9(QtProtobuf::fixed64List &&field9)
1505 {
1506 if (dptr->m_field9 != field9) {
1507 dptr.detach();
1508 dptr->m_field9 = std::move(field9);
1509 }
1510 }
1511
1512 void ScalarRepeatedNoPackedTypes::setField10(const QtProtobuf::sfixed64List &field10)
1513 {
1514 if (dptr->m_field10 != field10) {
1515 dptr.detach();
1516 dptr->m_field10 = field10;
1517 }
1518 }
1519
1520 void ScalarRepeatedNoPackedTypes::setField10(QtProtobuf::sfixed64List &&field10)
1521 {
1522 if (dptr->m_field10 != field10) {
1523 dptr.detach();
1524 dptr->m_field10 = std::move(field10);
1525 }
1526 }
1527
1528 void ScalarRepeatedNoPackedTypes::setField11(const QtProtobuf::floatList &field11)
1529 {
1530 if (dptr->m_field11 != field11) {
1531 dptr.detach();
1532 dptr->m_field11 = field11;
1533 }
1534 }
1535
1536 void ScalarRepeatedNoPackedTypes::setField11(QtProtobuf::floatList &&field11)
1537 {
1538 if (dptr->m_field11 != field11) {
1539 dptr.detach();
1540 dptr->m_field11 = std::move(field11);
1541 }
1542 }
1543
1544 void ScalarRepeatedNoPackedTypes::setField12(const QtProtobuf::doubleList &field12)
1545 {
1546 if (dptr->m_field12 != field12) {
1547 dptr.detach();
1548 dptr->m_field12 = field12;
1549 }
1550 }
1551
1552 void ScalarRepeatedNoPackedTypes::setField12(QtProtobuf::doubleList &&field12)
1553 {
1554 if (dptr->m_field12 != field12) {
1555 dptr.detach();
1556 dptr->m_field12 = std::move(field12);
1557 }
1558 }
1559
1560 void ScalarRepeatedNoPackedTypes::setField13(const QStringList &field13)
1561 {
1562 if (dptr->m_field13 != field13) {
1563 dptr.detach();
1564 dptr->m_field13 = field13;
1565 }
1566 }
1567
1568 void ScalarRepeatedNoPackedTypes::setField13(QStringList &&field13)
1569 {
1570 if (dptr->m_field13 != field13) {
1571 dptr.detach();
1572 dptr->m_field13 = std::move(field13);
1573 }
1574 }
1575
1576 void ScalarRepeatedNoPackedTypes::setField14(const QByteArrayList &field14)
1577 {
1578 if (dptr->m_field14 != field14) {
1579 dptr.detach();
1580 dptr->m_field14 = field14;
1581 }
1582 }
1583
1584 void ScalarRepeatedNoPackedTypes::setField14(QByteArrayList &&field14)
1585 {
1586 if (dptr->m_field14 != field14) {
1587 dptr.detach();
1588 dptr->m_field14 = std::move(field14);
1589 }
1590 }
1591
1592 void ScalarRepeatedNoPackedTypes::setField15(const QList<GlobalEnumGadget::GlobalEnum> &field15)
1593 {
1594 if (dptr->m_field15 != field15) {
1595 dptr.detach();
1596 dptr->m_field15 = field15;
1597 }
1598 }
1599
1600 void ScalarRepeatedNoPackedTypes::setField15(QList<GlobalEnumGadget::GlobalEnum> &&field15)
1601 {
1602 if (dptr->m_field15 != field15) {
1603 dptr.detach();
1604 dptr->m_field15 = std::move(field15);
1605 }
1606 }
1607
1608
1609 class ScalarOneOfTypes_QtProtobufData : public QSharedData
1610 {
1611 public:
1612 ScalarOneOfTypes_QtProtobufData()
1613 : QSharedData()
1614 {
1615 }
1616
1617 ScalarOneOfTypes_QtProtobufData(const ScalarOneOfTypes_QtProtobufData &other)
1618 : QSharedData(other),
1619 m_fieldOneOf(other.m_fieldOneOf)
1620 {
1621 }
1622
1623 QtProtobufPrivate::QProtobufOneof m_fieldOneOf;
1624 };
1625
1626 ScalarOneOfTypes::~ScalarOneOfTypes() = default;
1627
1628 static constexpr struct {
1629 QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
1630 const std::array<uint, 57> qt_protobuf_ScalarOneOfTypes_uint_data;
1631 const char qt_protobuf_ScalarOneOfTypes_char_data[133];
1632 } qt_protobuf_ScalarOneOfTypes_metadata {
1633 // data
1634 {
1635 0, /* = version */
1636 14, /* = num fields */
1637 15, /* = field number offset */
1638 29, /* = property index offset */
1639 43, /* = field flags offset */
1640 28, /* = message full name length */
1641 },
1642 // uint_data
1643 {
1644 // JSON name offsets:
1645 29, /* = field1 */
1646 36, /* = field2 */
1647 43, /* = field3 */
1648 50, /* = field4 */
1649 57, /* = field5 */
1650 64, /* = field6 */
1651 71, /* = field7 */
1652 78, /* = field8 */
1653 85, /* = field9 */
1654 92, /* = field10 */
1655 100, /* = field11 */
1656 108, /* = field12 */
1657 116, /* = field13 */
1658 124, /* = field14 */
1659 132, /* = end-of-string-marker */
1660 // Field numbers:
1661 1, /* = field1 */
1662 2, /* = field2 */
1663 3, /* = field3 */
1664 4, /* = field4 */
1665 5, /* = field5 */
1666 6, /* = field6 */
1667 7, /* = field7 */
1668 8, /* = field8 */
1669 9, /* = field9 */
1670 10, /* = field10 */
1671 11, /* = field11 */
1672 12, /* = field12 */
1673 13, /* = field13 */
1674 14, /* = field14 */
1675 // Property indices:
1676 0, /* = field1 */
1677 2, /* = field2 */
1678 4, /* = field3 */
1679 6, /* = field4 */
1680 8, /* = field5 */
1681 10, /* = field6 */
1682 12, /* = field7 */
1683 14, /* = field8 */
1684 16, /* = field9 */
1685 18, /* = field10 */
1686 20, /* = field11 */
1687 22, /* = field12 */
1688 24, /* = field13 */
1689 26, /* = field14 */
1690 // Field flags:
1691 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field1 */
1692 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field2 */
1693 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field3 */
1694 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field4 */
1695 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field5 */
1696 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field6 */
1697 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field7 */
1698 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field8 */
1699 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field9 */
1700 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field10 */
1701 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field11 */
1702 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field12 */
1703 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field13 */
1704 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field14 */
1705 },
1706 // char_data
1707 /* metadata char_data: */
1708 "qt.protobuf.ScalarOneOfTypes\0" /* = full message name */
1709 /* field char_data: */
1710 "field1\0field2\0field3\0field4\0field5\0"
1711 "field6\0field7\0field8\0field9\0field10\0"
1712 "field11\0field12\0field13\0field14\0"
1713 };
1714
1715 const QtProtobufPrivate::QProtobufPropertyOrdering ScalarOneOfTypes::staticPropertyOrdering = {
1716 &qt_protobuf_ScalarOneOfTypes_metadata.data
1717 };
1718
1719 void ScalarOneOfTypes::registerTypes()
1720 {
1721 qRegisterMetaType<ScalarOneOfTypes>();
1722 qRegisterMetaType<QList<ScalarOneOfTypes>>();
1723 }
1724
1725 ScalarOneOfTypes::ScalarOneOfTypes()
1726 : QProtobufMessage(&ScalarOneOfTypes::staticMetaObject, &ScalarOneOfTypes::staticPropertyOrdering),
1727 dptr(new ScalarOneOfTypes_QtProtobufData)
1728 {
1729 }
1730
1731 ScalarOneOfTypes::ScalarOneOfTypes(const ScalarOneOfTypes &other)
1732 = default;
1733 ScalarOneOfTypes &ScalarOneOfTypes::operator =(const ScalarOneOfTypes &other)
1734 {
1735 ScalarOneOfTypes temp(other);
1736 swap(temp);
1737 return *this;
1738 }
1739 ScalarOneOfTypes::ScalarOneOfTypes(ScalarOneOfTypes &&other) noexcept
1740 = default;
1741 ScalarOneOfTypes::operator QVariant() const
1742 {
1743 return QVariant::fromValue(*this);
1744 }
1745 bool comparesEqual(const ScalarOneOfTypes &lhs, const ScalarOneOfTypes &rhs) noexcept
1746 {
1747 return operator ==(static_cast<const QProtobufMessage&>(lhs),
1748 static_cast<const QProtobufMessage&>(rhs))
1749 && lhs.dptr->m_fieldOneOf == rhs.dptr->m_fieldOneOf;
1750 }
1751
1752 QtProtobuf::int32 ScalarOneOfTypes::field1_p() const
1753 {
1754 return dptr->m_fieldOneOf.holdsField(1) ?
1755 dptr->m_fieldOneOf.value<QtProtobuf::int32>() : QtProtobuf::int32(0);
1756 }
1757
1758 bool ScalarOneOfTypes::hasField1() const
1759 {
1760 return dptr->m_fieldOneOf.holdsField(1);
1761 }
1762 QtProtobuf::int32 ScalarOneOfTypes::field1() const
1763 {
1764 Q_ASSERT(dptr->m_fieldOneOf.holdsField(1));
1765 return dptr->m_fieldOneOf.value<QtProtobuf::int32>();
1766 }
1767
1768 QtProtobuf::uint32 ScalarOneOfTypes::field2_p() const
1769 {
1770 return dptr->m_fieldOneOf.holdsField(2) ?
1771 dptr->m_fieldOneOf.value<QtProtobuf::uint32>() : QtProtobuf::uint32(0);
1772 }
1773
1774 bool ScalarOneOfTypes::hasField2() const
1775 {
1776 return dptr->m_fieldOneOf.holdsField(2);
1777 }
1778 QtProtobuf::uint32 ScalarOneOfTypes::field2() const
1779 {
1780 Q_ASSERT(dptr->m_fieldOneOf.holdsField(2));
1781 return dptr->m_fieldOneOf.value<QtProtobuf::uint32>();
1782 }
1783
1784 QtProtobuf::sint32 ScalarOneOfTypes::field3_p() const
1785 {
1786 return dptr->m_fieldOneOf.holdsField(3) ?
1787 dptr->m_fieldOneOf.value<QtProtobuf::sint32>() : QtProtobuf::sint32(0);
1788 }
1789
1790 bool ScalarOneOfTypes::hasField3() const
1791 {
1792 return dptr->m_fieldOneOf.holdsField(3);
1793 }
1794 QtProtobuf::sint32 ScalarOneOfTypes::field3() const
1795 {
1796 Q_ASSERT(dptr->m_fieldOneOf.holdsField(3));
1797 return dptr->m_fieldOneOf.value<QtProtobuf::sint32>();
1798 }
1799
1800 QtProtobuf::fixed32 ScalarOneOfTypes::field4_p() const
1801 {
1802 return dptr->m_fieldOneOf.holdsField(4) ?
1803 dptr->m_fieldOneOf.value<QtProtobuf::fixed32>() : QtProtobuf::fixed32(0);
1804 }
1805
1806 bool ScalarOneOfTypes::hasField4() const
1807 {
1808 return dptr->m_fieldOneOf.holdsField(4);
1809 }
1810 QtProtobuf::fixed32 ScalarOneOfTypes::field4() const
1811 {
1812 Q_ASSERT(dptr->m_fieldOneOf.holdsField(4));
1813 return dptr->m_fieldOneOf.value<QtProtobuf::fixed32>();
1814 }
1815
1816 QtProtobuf::sfixed32 ScalarOneOfTypes::field5_p() const
1817 {
1818 return dptr->m_fieldOneOf.holdsField(5) ?
1819 dptr->m_fieldOneOf.value<QtProtobuf::sfixed32>() : QtProtobuf::sfixed32();
1820 }
1821
1822 bool ScalarOneOfTypes::hasField5() const
1823 {
1824 return dptr->m_fieldOneOf.holdsField(5);
1825 }
1826 QtProtobuf::sfixed32 ScalarOneOfTypes::field5() const
1827 {
1828 Q_ASSERT(dptr->m_fieldOneOf.holdsField(5));
1829 return dptr->m_fieldOneOf.value<QtProtobuf::sfixed32>();
1830 }
1831
1832 QtProtobuf::int64 ScalarOneOfTypes::field6_p() const
1833 {
1834 return dptr->m_fieldOneOf.holdsField(6) ?
1835 dptr->m_fieldOneOf.value<QtProtobuf::int64>() : QtProtobuf::int64(0);
1836 }
1837
1838 bool ScalarOneOfTypes::hasField6() const
1839 {
1840 return dptr->m_fieldOneOf.holdsField(6);
1841 }
1842 QtProtobuf::int64 ScalarOneOfTypes::field6() const
1843 {
1844 Q_ASSERT(dptr->m_fieldOneOf.holdsField(6));
1845 return dptr->m_fieldOneOf.value<QtProtobuf::int64>();
1846 }
1847
1848 QtProtobuf::uint64 ScalarOneOfTypes::field7_p() const
1849 {
1850 return dptr->m_fieldOneOf.holdsField(7) ?
1851 dptr->m_fieldOneOf.value<QtProtobuf::uint64>() : QtProtobuf::uint64(0);
1852 }
1853
1854 bool ScalarOneOfTypes::hasField7() const
1855 {
1856 return dptr->m_fieldOneOf.holdsField(7);
1857 }
1858 QtProtobuf::uint64 ScalarOneOfTypes::field7() const
1859 {
1860 Q_ASSERT(dptr->m_fieldOneOf.holdsField(7));
1861 return dptr->m_fieldOneOf.value<QtProtobuf::uint64>();
1862 }
1863
1864 QtProtobuf::sint64 ScalarOneOfTypes::field8_p() const
1865 {
1866 return dptr->m_fieldOneOf.holdsField(8) ?
1867 dptr->m_fieldOneOf.value<QtProtobuf::sint64>() : QtProtobuf::sint64(0);
1868 }
1869
1870 bool ScalarOneOfTypes::hasField8() const
1871 {
1872 return dptr->m_fieldOneOf.holdsField(8);
1873 }
1874 QtProtobuf::sint64 ScalarOneOfTypes::field8() const
1875 {
1876 Q_ASSERT(dptr->m_fieldOneOf.holdsField(8));
1877 return dptr->m_fieldOneOf.value<QtProtobuf::sint64>();
1878 }
1879
1880 QtProtobuf::fixed64 ScalarOneOfTypes::field9_p() const
1881 {
1882 return dptr->m_fieldOneOf.holdsField(9) ?
1883 dptr->m_fieldOneOf.value<QtProtobuf::fixed64>() : QtProtobuf::fixed64(0);
1884 }
1885
1886 bool ScalarOneOfTypes::hasField9() const
1887 {
1888 return dptr->m_fieldOneOf.holdsField(9);
1889 }
1890 QtProtobuf::fixed64 ScalarOneOfTypes::field9() const
1891 {
1892 Q_ASSERT(dptr->m_fieldOneOf.holdsField(9));
1893 return dptr->m_fieldOneOf.value<QtProtobuf::fixed64>();
1894 }
1895
1896 QtProtobuf::sfixed64 ScalarOneOfTypes::field10_p() const
1897 {
1898 return dptr->m_fieldOneOf.holdsField(10) ?
1899 dptr->m_fieldOneOf.value<QtProtobuf::sfixed64>() : QtProtobuf::sfixed64();
1900 }
1901
1902 bool ScalarOneOfTypes::hasField10() const
1903 {
1904 return dptr->m_fieldOneOf.holdsField(10);
1905 }
1906 QtProtobuf::sfixed64 ScalarOneOfTypes::field10() const
1907 {
1908 Q_ASSERT(dptr->m_fieldOneOf.holdsField(10));
1909 return dptr->m_fieldOneOf.value<QtProtobuf::sfixed64>();
1910 }
1911
1912 float ScalarOneOfTypes::field11_p() const
1913 {
1914 return dptr->m_fieldOneOf.holdsField(11) ?
1915 dptr->m_fieldOneOf.value<float>() : float(0.0);
1916 }
1917
1918 bool ScalarOneOfTypes::hasField11() const
1919 {
1920 return dptr->m_fieldOneOf.holdsField(11);
1921 }
1922 float ScalarOneOfTypes::field11() const
1923 {
1924 Q_ASSERT(dptr->m_fieldOneOf.holdsField(11));
1925 return dptr->m_fieldOneOf.value<float>();
1926 }
1927
1928 double ScalarOneOfTypes::field12_p() const
1929 {
1930 return dptr->m_fieldOneOf.holdsField(12) ?
1931 dptr->m_fieldOneOf.value<double>() : double(0.0);
1932 }
1933
1934 bool ScalarOneOfTypes::hasField12() const
1935 {
1936 return dptr->m_fieldOneOf.holdsField(12);
1937 }
1938 double ScalarOneOfTypes::field12() const
1939 {
1940 Q_ASSERT(dptr->m_fieldOneOf.holdsField(12));
1941 return dptr->m_fieldOneOf.value<double>();
1942 }
1943
1944 QString ScalarOneOfTypes::field13_p() const
1945 {
1946 return dptr->m_fieldOneOf.holdsField(13) ?
1947 dptr->m_fieldOneOf.value<QString>() : QString();
1948 }
1949
1950 bool ScalarOneOfTypes::hasField13() const
1951 {
1952 return dptr->m_fieldOneOf.holdsField(13);
1953 }
1954 QString ScalarOneOfTypes::field13() const
1955 {
1956 Q_ASSERT(dptr->m_fieldOneOf.holdsField(13));
1957 return dptr->m_fieldOneOf.value<QString>();
1958 }
1959
1960 QByteArray ScalarOneOfTypes::field14_p() const
1961 {
1962 return dptr->m_fieldOneOf.holdsField(14) ?
1963 dptr->m_fieldOneOf.value<QByteArray>() : QByteArray();
1964 }
1965
1966 bool ScalarOneOfTypes::hasField14() const
1967 {
1968 return dptr->m_fieldOneOf.holdsField(14);
1969 }
1970 QByteArray ScalarOneOfTypes::field14() const
1971 {
1972 Q_ASSERT(dptr->m_fieldOneOf.holdsField(14));
1973 return dptr->m_fieldOneOf.value<QByteArray>();
1974 }
1975
1976 void ScalarOneOfTypes::setField1(QtProtobuf::int32 field1)
1977 {
1978 if (!dptr->m_fieldOneOf.isEqual(field1, 1)) {
1979 dptr.detach();
1980 dptr->m_fieldOneOf.setValue(field1, 1);
1981 }
1982 }
1983
1984 void ScalarOneOfTypes::setField1_p(QtProtobuf::int32 field1)
1985 {
1986 if (!dptr->m_fieldOneOf.isEqual(field1, 1)) {
1987 dptr.detach();
1988 dptr->m_fieldOneOf.setValue(field1, 1);
1989 }
1990 }
1991
1992 void ScalarOneOfTypes::setField2(QtProtobuf::uint32 field2)
1993 {
1994 if (!dptr->m_fieldOneOf.isEqual(field2, 2)) {
1995 dptr.detach();
1996 dptr->m_fieldOneOf.setValue(field2, 2);
1997 }
1998 }
1999
2000 void ScalarOneOfTypes::setField2_p(QtProtobuf::uint32 field2)
2001 {
2002 if (!dptr->m_fieldOneOf.isEqual(field2, 2)) {
2003 dptr.detach();
2004 dptr->m_fieldOneOf.setValue(field2, 2);
2005 }
2006 }
2007
2008 void ScalarOneOfTypes::setField3(QtProtobuf::sint32 field3)
2009 {
2010 if (!dptr->m_fieldOneOf.isEqual(field3, 3)) {
2011 dptr.detach();
2012 dptr->m_fieldOneOf.setValue(field3, 3);
2013 }
2014 }
2015
2016 void ScalarOneOfTypes::setField3_p(QtProtobuf::sint32 field3)
2017 {
2018 if (!dptr->m_fieldOneOf.isEqual(field3, 3)) {
2019 dptr.detach();
2020 dptr->m_fieldOneOf.setValue(field3, 3);
2021 }
2022 }
2023
2024 void ScalarOneOfTypes::setField4(QtProtobuf::fixed32 field4)
2025 {
2026 if (!dptr->m_fieldOneOf.isEqual(field4, 4)) {
2027 dptr.detach();
2028 dptr->m_fieldOneOf.setValue(field4, 4);
2029 }
2030 }
2031
2032 void ScalarOneOfTypes::setField4_p(QtProtobuf::fixed32 field4)
2033 {
2034 if (!dptr->m_fieldOneOf.isEqual(field4, 4)) {
2035 dptr.detach();
2036 dptr->m_fieldOneOf.setValue(field4, 4);
2037 }
2038 }
2039
2040 void ScalarOneOfTypes::setField5(QtProtobuf::sfixed32 field5)
2041 {
2042 if (!dptr->m_fieldOneOf.isEqual(field5, 5)) {
2043 dptr.detach();
2044 dptr->m_fieldOneOf.setValue(field5, 5);
2045 }
2046 }
2047
2048 void ScalarOneOfTypes::setField5_p(QtProtobuf::sfixed32 field5)
2049 {
2050 if (!dptr->m_fieldOneOf.isEqual(field5, 5)) {
2051 dptr.detach();
2052 dptr->m_fieldOneOf.setValue(field5, 5);
2053 }
2054 }
2055
2056 void ScalarOneOfTypes::setField6(QtProtobuf::int64 field6)
2057 {
2058 if (!dptr->m_fieldOneOf.isEqual(field6, 6)) {
2059 dptr.detach();
2060 dptr->m_fieldOneOf.setValue(field6, 6);
2061 }
2062 }
2063
2064 void ScalarOneOfTypes::setField6_p(QtProtobuf::int64 field6)
2065 {
2066 if (!dptr->m_fieldOneOf.isEqual(field6, 6)) {
2067 dptr.detach();
2068 dptr->m_fieldOneOf.setValue(field6, 6);
2069 }
2070 }
2071
2072 void ScalarOneOfTypes::setField7(QtProtobuf::uint64 field7)
2073 {
2074 if (!dptr->m_fieldOneOf.isEqual(field7, 7)) {
2075 dptr.detach();
2076 dptr->m_fieldOneOf.setValue(field7, 7);
2077 }
2078 }
2079
2080 void ScalarOneOfTypes::setField7_p(QtProtobuf::uint64 field7)
2081 {
2082 if (!dptr->m_fieldOneOf.isEqual(field7, 7)) {
2083 dptr.detach();
2084 dptr->m_fieldOneOf.setValue(field7, 7);
2085 }
2086 }
2087
2088 void ScalarOneOfTypes::setField8(QtProtobuf::sint64 field8)
2089 {
2090 if (!dptr->m_fieldOneOf.isEqual(field8, 8)) {
2091 dptr.detach();
2092 dptr->m_fieldOneOf.setValue(field8, 8);
2093 }
2094 }
2095
2096 void ScalarOneOfTypes::setField8_p(QtProtobuf::sint64 field8)
2097 {
2098 if (!dptr->m_fieldOneOf.isEqual(field8, 8)) {
2099 dptr.detach();
2100 dptr->m_fieldOneOf.setValue(field8, 8);
2101 }
2102 }
2103
2104 void ScalarOneOfTypes::setField9(QtProtobuf::fixed64 field9)
2105 {
2106 if (!dptr->m_fieldOneOf.isEqual(field9, 9)) {
2107 dptr.detach();
2108 dptr->m_fieldOneOf.setValue(field9, 9);
2109 }
2110 }
2111
2112 void ScalarOneOfTypes::setField9_p(QtProtobuf::fixed64 field9)
2113 {
2114 if (!dptr->m_fieldOneOf.isEqual(field9, 9)) {
2115 dptr.detach();
2116 dptr->m_fieldOneOf.setValue(field9, 9);
2117 }
2118 }
2119
2120 void ScalarOneOfTypes::setField10(QtProtobuf::sfixed64 field10)
2121 {
2122 if (!dptr->m_fieldOneOf.isEqual(field10, 10)) {
2123 dptr.detach();
2124 dptr->m_fieldOneOf.setValue(field10, 10);
2125 }
2126 }
2127
2128 void ScalarOneOfTypes::setField10_p(QtProtobuf::sfixed64 field10)
2129 {
2130 if (!dptr->m_fieldOneOf.isEqual(field10, 10)) {
2131 dptr.detach();
2132 dptr->m_fieldOneOf.setValue(field10, 10);
2133 }
2134 }
2135
2136 void ScalarOneOfTypes::setField11(float field11)
2137 {
2138 if (!dptr->m_fieldOneOf.isEqual(field11, 11)) {
2139 dptr.detach();
2140 dptr->m_fieldOneOf.setValue(field11, 11);
2141 }
2142 }
2143
2144 void ScalarOneOfTypes::setField11_p(float field11)
2145 {
2146 if (!dptr->m_fieldOneOf.isEqual(field11, 11)) {
2147 dptr.detach();
2148 dptr->m_fieldOneOf.setValue(field11, 11);
2149 }
2150 }
2151
2152 void ScalarOneOfTypes::setField12(double field12)
2153 {
2154 if (!dptr->m_fieldOneOf.isEqual(field12, 12)) {
2155 dptr.detach();
2156 dptr->m_fieldOneOf.setValue(field12, 12);
2157 }
2158 }
2159
2160 void ScalarOneOfTypes::setField12_p(double field12)
2161 {
2162 if (!dptr->m_fieldOneOf.isEqual(field12, 12)) {
2163 dptr.detach();
2164 dptr->m_fieldOneOf.setValue(field12, 12);
2165 }
2166 }
2167
2168 void ScalarOneOfTypes::setField13(const QString &field13)
2169 {
2170 if (!dptr->m_fieldOneOf.isEqual(field13, 13)) {
2171 dptr.detach();
2172 dptr->m_fieldOneOf.setValue(field13, 13);
2173 }
2174 }
2175
2176 void ScalarOneOfTypes::setField13(QString &&field13)
2177 {
2178 if (!dptr->m_fieldOneOf.isEqual(field13, 13)) {
2179 dptr.detach();
2180 dptr->m_fieldOneOf.setValue(std::move(field13), 13);
2181 }
2182 }
2183
2184 void ScalarOneOfTypes::setField13_p(QString field13)
2185 {
2186 if (!dptr->m_fieldOneOf.isEqual(field13, 13)) {
2187 dptr.detach();
2188 dptr->m_fieldOneOf.setValue(field13, 13);
2189 }
2190 }
2191
2192 void ScalarOneOfTypes::setField14(const QByteArray &field14)
2193 {
2194 if (!dptr->m_fieldOneOf.isEqual(field14, 14)) {
2195 dptr.detach();
2196 dptr->m_fieldOneOf.setValue(field14, 14);
2197 }
2198 }
2199
2200 void ScalarOneOfTypes::setField14(QByteArray &&field14)
2201 {
2202 if (!dptr->m_fieldOneOf.isEqual(field14, 14)) {
2203 dptr.detach();
2204 dptr->m_fieldOneOf.setValue(std::move(field14), 14);
2205 }
2206 }
2207
2208 void ScalarOneOfTypes::setField14_p(QByteArray field14)
2209 {
2210 if (!dptr->m_fieldOneOf.isEqual(field14, 14)) {
2211 dptr.detach();
2212 dptr->m_fieldOneOf.setValue(field14, 14);
2213 }
2214 }
2215
2216 ScalarOneOfTypes::FieldOneOfFields ScalarOneOfTypes::fieldOneOfField() const
2217 {
2218 return static_cast<FieldOneOfFields>(dptr->m_fieldOneOf.fieldNumber());
2219 }
2220 void ScalarOneOfTypes::clearFieldOneOf()
2221 {
2222 if (dptr->m_fieldOneOf.fieldNumber() != QtProtobuf::InvalidFieldNumber) {
2223 dptr.detach();
2224 dptr->m_fieldOneOf = QtProtobufPrivate::QProtobufOneof();
2225 }
2226 }
2227
2228 class ScalarOptionalTypes_QtProtobufData : public QSharedData
2229 {
2230 public:
2231 ScalarOptionalTypes_QtProtobufData()
2232 : QSharedData()
2233 {
2234 }
2235
2236 ScalarOptionalTypes_QtProtobufData(const ScalarOptionalTypes_QtProtobufData &other)
2237 : QSharedData(other),
2238 m_field1(other.m_field1),
2239 m_field2(other.m_field2),
2240 m_field3(other.m_field3),
2241 m_field4(other.m_field4),
2242 m_field5(other.m_field5),
2243 m_field6(other.m_field6),
2244 m_field7(other.m_field7),
2245 m_field8(other.m_field8),
2246 m_field9(other.m_field9),
2247 m_field10(other.m_field10),
2248 m_field11(other.m_field11),
2249 m_field12(other.m_field12),
2250 m_field13(other.m_field13),
2251 m_field14(other.m_field14)
2252 {
2253 }
2254
2255 std::optional<QtProtobuf::int32> m_field1;
2256 std::optional<QtProtobuf::uint32> m_field2;
2257 std::optional<QtProtobuf::sint32> m_field3;
2258 std::optional<QtProtobuf::fixed32> m_field4;
2259 std::optional<QtProtobuf::sfixed32> m_field5;
2260 std::optional<QtProtobuf::int64> m_field6;
2261 std::optional<QtProtobuf::uint64> m_field7;
2262 std::optional<QtProtobuf::sint64> m_field8;
2263 std::optional<QtProtobuf::fixed64> m_field9;
2264 std::optional<QtProtobuf::sfixed64> m_field10;
2265 std::optional<float> m_field11;
2266 std::optional<double> m_field12;
2267 std::optional<QString> m_field13;
2268 std::optional<QByteArray> m_field14;
2269 };
2270
2271 ScalarOptionalTypes::~ScalarOptionalTypes() = default;
2272
2273 static constexpr struct {
2274 QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
2275 const std::array<uint, 57> qt_protobuf_ScalarOptionalTypes_uint_data;
2276 const char qt_protobuf_ScalarOptionalTypes_char_data[136];
2277 } qt_protobuf_ScalarOptionalTypes_metadata {
2278 // data
2279 {
2280 0, /* = version */
2281 14, /* = num fields */
2282 15, /* = field number offset */
2283 29, /* = property index offset */
2284 43, /* = field flags offset */
2285 31, /* = message full name length */
2286 },
2287 // uint_data
2288 {
2289 // JSON name offsets:
2290 32, /* = field1 */
2291 39, /* = field2 */
2292 46, /* = field3 */
2293 53, /* = field4 */
2294 60, /* = field5 */
2295 67, /* = field6 */
2296 74, /* = field7 */
2297 81, /* = field8 */
2298 88, /* = field9 */
2299 95, /* = field10 */
2300 103, /* = field11 */
2301 111, /* = field12 */
2302 119, /* = field13 */
2303 127, /* = field14 */
2304 135, /* = end-of-string-marker */
2305 // Field numbers:
2306 1, /* = field1 */
2307 2, /* = field2 */
2308 3, /* = field3 */
2309 4, /* = field4 */
2310 5, /* = field5 */
2311 6, /* = field6 */
2312 7, /* = field7 */
2313 8, /* = field8 */
2314 9, /* = field9 */
2315 10, /* = field10 */
2316 11, /* = field11 */
2317 12, /* = field12 */
2318 13, /* = field13 */
2319 14, /* = field14 */
2320 // Property indices:
2321 0, /* = field1 */
2322 2, /* = field2 */
2323 4, /* = field3 */
2324 6, /* = field4 */
2325 8, /* = field5 */
2326 10, /* = field6 */
2327 12, /* = field7 */
2328 14, /* = field8 */
2329 16, /* = field9 */
2330 18, /* = field10 */
2331 20, /* = field11 */
2332 22, /* = field12 */
2333 24, /* = field13 */
2334 26, /* = field14 */
2335 // Field flags:
2336 uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field1 */
2337 uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field2 */
2338 uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field3 */
2339 uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field4 */
2340 uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field5 */
2341 uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field6 */
2342 uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field7 */
2343 uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field8 */
2344 uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field9 */
2345 uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field10 */
2346 uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field11 */
2347 uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field12 */
2348 uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field13 */
2349 uint(QtProtobufPrivate::FieldFlag::Optional | QtProtobufPrivate::FieldFlag::ExplicitPresence), /* = field14 */
2350 },
2351 // char_data
2352 /* metadata char_data: */
2353 "qt.protobuf.ScalarOptionalTypes\0" /* = full message name */
2354 /* field char_data: */
2355 "field1\0field2\0field3\0field4\0field5\0"
2356 "field6\0field7\0field8\0field9\0field10\0"
2357 "field11\0field12\0field13\0field14\0"
2358 };
2359
2360 const QtProtobufPrivate::QProtobufPropertyOrdering ScalarOptionalTypes::staticPropertyOrdering = {
2361 &qt_protobuf_ScalarOptionalTypes_metadata.data
2362 };
2363
2364 void ScalarOptionalTypes::registerTypes()
2365 {
2366 qRegisterMetaType<ScalarOptionalTypes>();
2367 qRegisterMetaType<QList<ScalarOptionalTypes>>();
2368 }
2369
2370 ScalarOptionalTypes::ScalarOptionalTypes()
2371 : QProtobufMessage(&ScalarOptionalTypes::staticMetaObject, &ScalarOptionalTypes::staticPropertyOrdering),
2372 dptr(new ScalarOptionalTypes_QtProtobufData)
2373 {
2374 }
2375
2376 ScalarOptionalTypes::ScalarOptionalTypes(const ScalarOptionalTypes &other)
2377 = default;
2378 ScalarOptionalTypes &ScalarOptionalTypes::operator =(const ScalarOptionalTypes &other)
2379 {
2380 ScalarOptionalTypes temp(other);
2381 swap(temp);
2382 return *this;
2383 }
2384 ScalarOptionalTypes::ScalarOptionalTypes(ScalarOptionalTypes &&other) noexcept
2385 = default;
2386 ScalarOptionalTypes::operator QVariant() const
2387 {
2388 return QVariant::fromValue(*this);
2389 }
2390 bool comparesEqual(const ScalarOptionalTypes &lhs, const ScalarOptionalTypes &rhs) noexcept
2391 {
2392 return operator ==(static_cast<const QProtobufMessage&>(lhs),
2393 static_cast<const QProtobufMessage&>(rhs))
2394 && lhs.dptr->m_field1 == rhs.dptr->m_field1
2395 && lhs.dptr->m_field2 == rhs.dptr->m_field2
2396 && lhs.dptr->m_field3 == rhs.dptr->m_field3
2397 && lhs.dptr->m_field4 == rhs.dptr->m_field4
2398 && lhs.dptr->m_field5 == rhs.dptr->m_field5
2399 && lhs.dptr->m_field6 == rhs.dptr->m_field6
2400 && lhs.dptr->m_field7 == rhs.dptr->m_field7
2401 && lhs.dptr->m_field8 == rhs.dptr->m_field8
2402 && lhs.dptr->m_field9 == rhs.dptr->m_field9
2403 && lhs.dptr->m_field10 == rhs.dptr->m_field10
2404 && lhs.dptr->m_field11 == rhs.dptr->m_field11
2405 && lhs.dptr->m_field12 == rhs.dptr->m_field12
2406 && lhs.dptr->m_field13 == rhs.dptr->m_field13
2407 && lhs.dptr->m_field14 == rhs.dptr->m_field14;
2408 }
2409
2410 QtProtobuf::int32 ScalarOptionalTypes::field1_p() const
2411 {
2412 return dptr->m_field1 ?
2413 dptr->m_field1.value() : QtProtobuf::int32();
2414 }
2415
2416 bool ScalarOptionalTypes::hasField1() const
2417 {
2418 return dptr->m_field1.has_value();
2419 }
2420 QtProtobuf::int32 ScalarOptionalTypes::field1() const
2421 {
2422 Q_ASSERT(dptr->m_field1.has_value());
2423 return dptr->m_field1.value();
2424 }
2425
2426 QtProtobuf::uint32 ScalarOptionalTypes::field2_p() const
2427 {
2428 return dptr->m_field2 ?
2429 dptr->m_field2.value() : QtProtobuf::uint32();
2430 }
2431
2432 bool ScalarOptionalTypes::hasField2() const
2433 {
2434 return dptr->m_field2.has_value();
2435 }
2436 QtProtobuf::uint32 ScalarOptionalTypes::field2() const
2437 {
2438 Q_ASSERT(dptr->m_field2.has_value());
2439 return dptr->m_field2.value();
2440 }
2441
2442 QtProtobuf::sint32 ScalarOptionalTypes::field3_p() const
2443 {
2444 return dptr->m_field3 ?
2445 dptr->m_field3.value() : QtProtobuf::sint32();
2446 }
2447
2448 bool ScalarOptionalTypes::hasField3() const
2449 {
2450 return dptr->m_field3.has_value();
2451 }
2452 QtProtobuf::sint32 ScalarOptionalTypes::field3() const
2453 {
2454 Q_ASSERT(dptr->m_field3.has_value());
2455 return dptr->m_field3.value();
2456 }
2457
2458 QtProtobuf::fixed32 ScalarOptionalTypes::field4_p() const
2459 {
2460 return dptr->m_field4 ?
2461 dptr->m_field4.value() : QtProtobuf::fixed32();
2462 }
2463
2464 bool ScalarOptionalTypes::hasField4() const
2465 {
2466 return dptr->m_field4.has_value();
2467 }
2468 QtProtobuf::fixed32 ScalarOptionalTypes::field4() const
2469 {
2470 Q_ASSERT(dptr->m_field4.has_value());
2471 return dptr->m_field4.value();
2472 }
2473
2474 QtProtobuf::sfixed32 ScalarOptionalTypes::field5_p() const
2475 {
2476 return dptr->m_field5 ?
2477 dptr->m_field5.value() : QtProtobuf::sfixed32();
2478 }
2479
2480 bool ScalarOptionalTypes::hasField5() const
2481 {
2482 return dptr->m_field5.has_value();
2483 }
2484 QtProtobuf::sfixed32 ScalarOptionalTypes::field5() const
2485 {
2486 Q_ASSERT(dptr->m_field5.has_value());
2487 return dptr->m_field5.value();
2488 }
2489
2490 QtProtobuf::int64 ScalarOptionalTypes::field6_p() const
2491 {
2492 return dptr->m_field6 ?
2493 dptr->m_field6.value() : QtProtobuf::int64();
2494 }
2495
2496 bool ScalarOptionalTypes::hasField6() const
2497 {
2498 return dptr->m_field6.has_value();
2499 }
2500 QtProtobuf::int64 ScalarOptionalTypes::field6() const
2501 {
2502 Q_ASSERT(dptr->m_field6.has_value());
2503 return dptr->m_field6.value();
2504 }
2505
2506 QtProtobuf::uint64 ScalarOptionalTypes::field7_p() const
2507 {
2508 return dptr->m_field7 ?
2509 dptr->m_field7.value() : QtProtobuf::uint64();
2510 }
2511
2512 bool ScalarOptionalTypes::hasField7() const
2513 {
2514 return dptr->m_field7.has_value();
2515 }
2516 QtProtobuf::uint64 ScalarOptionalTypes::field7() const
2517 {
2518 Q_ASSERT(dptr->m_field7.has_value());
2519 return dptr->m_field7.value();
2520 }
2521
2522 QtProtobuf::sint64 ScalarOptionalTypes::field8_p() const
2523 {
2524 return dptr->m_field8 ?
2525 dptr->m_field8.value() : QtProtobuf::sint64();
2526 }
2527
2528 bool ScalarOptionalTypes::hasField8() const
2529 {
2530 return dptr->m_field8.has_value();
2531 }
2532 QtProtobuf::sint64 ScalarOptionalTypes::field8() const
2533 {
2534 Q_ASSERT(dptr->m_field8.has_value());
2535 return dptr->m_field8.value();
2536 }
2537
2538 QtProtobuf::fixed64 ScalarOptionalTypes::field9_p() const
2539 {
2540 return dptr->m_field9 ?
2541 dptr->m_field9.value() : QtProtobuf::fixed64();
2542 }
2543
2544 bool ScalarOptionalTypes::hasField9() const
2545 {
2546 return dptr->m_field9.has_value();
2547 }
2548 QtProtobuf::fixed64 ScalarOptionalTypes::field9() const
2549 {
2550 Q_ASSERT(dptr->m_field9.has_value());
2551 return dptr->m_field9.value();
2552 }
2553
2554 QtProtobuf::sfixed64 ScalarOptionalTypes::field10_p() const
2555 {
2556 return dptr->m_field10 ?
2557 dptr->m_field10.value() : QtProtobuf::sfixed64();
2558 }
2559
2560 bool ScalarOptionalTypes::hasField10() const
2561 {
2562 return dptr->m_field10.has_value();
2563 }
2564 QtProtobuf::sfixed64 ScalarOptionalTypes::field10() const
2565 {
2566 Q_ASSERT(dptr->m_field10.has_value());
2567 return dptr->m_field10.value();
2568 }
2569
2570 float ScalarOptionalTypes::field11_p() const
2571 {
2572 return dptr->m_field11 ?
2573 dptr->m_field11.value() : float();
2574 }
2575
2576 bool ScalarOptionalTypes::hasField11() const
2577 {
2578 return dptr->m_field11.has_value();
2579 }
2580 float ScalarOptionalTypes::field11() const
2581 {
2582 Q_ASSERT(dptr->m_field11.has_value());
2583 return dptr->m_field11.value();
2584 }
2585
2586 double ScalarOptionalTypes::field12_p() const
2587 {
2588 return dptr->m_field12 ?
2589 dptr->m_field12.value() : double();
2590 }
2591
2592 bool ScalarOptionalTypes::hasField12() const
2593 {
2594 return dptr->m_field12.has_value();
2595 }
2596 double ScalarOptionalTypes::field12() const
2597 {
2598 Q_ASSERT(dptr->m_field12.has_value());
2599 return dptr->m_field12.value();
2600 }
2601
2602 QString ScalarOptionalTypes::field13_p() const
2603 {
2604 return dptr->m_field13 ?
2605 dptr->m_field13.value() : QString();
2606 }
2607
2608 bool ScalarOptionalTypes::hasField13() const
2609 {
2610 return dptr->m_field13.has_value();
2611 }
2612 QString ScalarOptionalTypes::field13() const
2613 {
2614 Q_ASSERT(dptr->m_field13.has_value());
2615 return dptr->m_field13.value();
2616 }
2617
2618 QByteArray ScalarOptionalTypes::field14_p() const
2619 {
2620 return dptr->m_field14 ?
2621 dptr->m_field14.value() : QByteArray();
2622 }
2623
2624 bool ScalarOptionalTypes::hasField14() const
2625 {
2626 return dptr->m_field14.has_value();
2627 }
2628 QByteArray ScalarOptionalTypes::field14() const
2629 {
2630 Q_ASSERT(dptr->m_field14.has_value());
2631 return dptr->m_field14.value();
2632 }
2633
2634 void ScalarOptionalTypes::setField1(QtProtobuf::int32 field1)
2635 {
2636 if (!dptr->m_field1 || dptr->m_field1.value() != field1) {
2637 dptr.detach();
2638 dptr->m_field1 = field1;
2639 }
2640 }
2641
2642 void ScalarOptionalTypes::setField1_p(QtProtobuf::int32 field1)
2643 {
2644 if (!dptr->m_field1 || dptr->m_field1 != field1) {
2645 dptr.detach();
2646 dptr->m_field1 = field1;
2647 }
2648 }
2649
2650 void ScalarOptionalTypes::clearField1()
2651 {
2652 if (dptr->m_field1.has_value()) {
2653 dptr.detach();
2654 dptr->m_field1.reset();
2655 }
2656 }
2657 void ScalarOptionalTypes::setField2(QtProtobuf::uint32 field2)
2658 {
2659 if (!dptr->m_field2 || dptr->m_field2.value() != field2) {
2660 dptr.detach();
2661 dptr->m_field2 = field2;
2662 }
2663 }
2664
2665 void ScalarOptionalTypes::setField2_p(QtProtobuf::uint32 field2)
2666 {
2667 if (!dptr->m_field2 || dptr->m_field2 != field2) {
2668 dptr.detach();
2669 dptr->m_field2 = field2;
2670 }
2671 }
2672
2673 void ScalarOptionalTypes::clearField2()
2674 {
2675 if (dptr->m_field2.has_value()) {
2676 dptr.detach();
2677 dptr->m_field2.reset();
2678 }
2679 }
2680 void ScalarOptionalTypes::setField3(QtProtobuf::sint32 field3)
2681 {
2682 if (!dptr->m_field3 || dptr->m_field3.value() != field3) {
2683 dptr.detach();
2684 dptr->m_field3 = field3;
2685 }
2686 }
2687
2688 void ScalarOptionalTypes::setField3_p(QtProtobuf::sint32 field3)
2689 {
2690 if (!dptr->m_field3 || dptr->m_field3 != field3) {
2691 dptr.detach();
2692 dptr->m_field3 = field3;
2693 }
2694 }
2695
2696 void ScalarOptionalTypes::clearField3()
2697 {
2698 if (dptr->m_field3.has_value()) {
2699 dptr.detach();
2700 dptr->m_field3.reset();
2701 }
2702 }
2703 void ScalarOptionalTypes::setField4(QtProtobuf::fixed32 field4)
2704 {
2705 if (!dptr->m_field4 || dptr->m_field4.value() != field4) {
2706 dptr.detach();
2707 dptr->m_field4 = field4;
2708 }
2709 }
2710
2711 void ScalarOptionalTypes::setField4_p(QtProtobuf::fixed32 field4)
2712 {
2713 if (!dptr->m_field4 || dptr->m_field4 != field4) {
2714 dptr.detach();
2715 dptr->m_field4 = field4;
2716 }
2717 }
2718
2719 void ScalarOptionalTypes::clearField4()
2720 {
2721 if (dptr->m_field4.has_value()) {
2722 dptr.detach();
2723 dptr->m_field4.reset();
2724 }
2725 }
2726 void ScalarOptionalTypes::setField5(QtProtobuf::sfixed32 field5)
2727 {
2728 if (!dptr->m_field5 || dptr->m_field5.value() != field5) {
2729 dptr.detach();
2730 dptr->m_field5 = field5;
2731 }
2732 }
2733
2734 void ScalarOptionalTypes::setField5_p(QtProtobuf::sfixed32 field5)
2735 {
2736 if (!dptr->m_field5 || dptr->m_field5 != field5) {
2737 dptr.detach();
2738 dptr->m_field5 = field5;
2739 }
2740 }
2741
2742 void ScalarOptionalTypes::clearField5()
2743 {
2744 if (dptr->m_field5.has_value()) {
2745 dptr.detach();
2746 dptr->m_field5.reset();
2747 }
2748 }
2749 void ScalarOptionalTypes::setField6(QtProtobuf::int64 field6)
2750 {
2751 if (!dptr->m_field6 || dptr->m_field6.value() != field6) {
2752 dptr.detach();
2753 dptr->m_field6 = field6;
2754 }
2755 }
2756
2757 void ScalarOptionalTypes::setField6_p(QtProtobuf::int64 field6)
2758 {
2759 if (!dptr->m_field6 || dptr->m_field6 != field6) {
2760 dptr.detach();
2761 dptr->m_field6 = field6;
2762 }
2763 }
2764
2765 void ScalarOptionalTypes::clearField6()
2766 {
2767 if (dptr->m_field6.has_value()) {
2768 dptr.detach();
2769 dptr->m_field6.reset();
2770 }
2771 }
2772 void ScalarOptionalTypes::setField7(QtProtobuf::uint64 field7)
2773 {
2774 if (!dptr->m_field7 || dptr->m_field7.value() != field7) {
2775 dptr.detach();
2776 dptr->m_field7 = field7;
2777 }
2778 }
2779
2780 void ScalarOptionalTypes::setField7_p(QtProtobuf::uint64 field7)
2781 {
2782 if (!dptr->m_field7 || dptr->m_field7 != field7) {
2783 dptr.detach();
2784 dptr->m_field7 = field7;
2785 }
2786 }
2787
2788 void ScalarOptionalTypes::clearField7()
2789 {
2790 if (dptr->m_field7.has_value()) {
2791 dptr.detach();
2792 dptr->m_field7.reset();
2793 }
2794 }
2795 void ScalarOptionalTypes::setField8(QtProtobuf::sint64 field8)
2796 {
2797 if (!dptr->m_field8 || dptr->m_field8.value() != field8) {
2798 dptr.detach();
2799 dptr->m_field8 = field8;
2800 }
2801 }
2802
2803 void ScalarOptionalTypes::setField8_p(QtProtobuf::sint64 field8)
2804 {
2805 if (!dptr->m_field8 || dptr->m_field8 != field8) {
2806 dptr.detach();
2807 dptr->m_field8 = field8;
2808 }
2809 }
2810
2811 void ScalarOptionalTypes::clearField8()
2812 {
2813 if (dptr->m_field8.has_value()) {
2814 dptr.detach();
2815 dptr->m_field8.reset();
2816 }
2817 }
2818 void ScalarOptionalTypes::setField9(QtProtobuf::fixed64 field9)
2819 {
2820 if (!dptr->m_field9 || dptr->m_field9.value() != field9) {
2821 dptr.detach();
2822 dptr->m_field9 = field9;
2823 }
2824 }
2825
2826 void ScalarOptionalTypes::setField9_p(QtProtobuf::fixed64 field9)
2827 {
2828 if (!dptr->m_field9 || dptr->m_field9 != field9) {
2829 dptr.detach();
2830 dptr->m_field9 = field9;
2831 }
2832 }
2833
2834 void ScalarOptionalTypes::clearField9()
2835 {
2836 if (dptr->m_field9.has_value()) {
2837 dptr.detach();
2838 dptr->m_field9.reset();
2839 }
2840 }
2841 void ScalarOptionalTypes::setField10(QtProtobuf::sfixed64 field10)
2842 {
2843 if (!dptr->m_field10 || dptr->m_field10.value() != field10) {
2844 dptr.detach();
2845 dptr->m_field10 = field10;
2846 }
2847 }
2848
2849 void ScalarOptionalTypes::setField10_p(QtProtobuf::sfixed64 field10)
2850 {
2851 if (!dptr->m_field10 || dptr->m_field10 != field10) {
2852 dptr.detach();
2853 dptr->m_field10 = field10;
2854 }
2855 }
2856
2857 void ScalarOptionalTypes::clearField10()
2858 {
2859 if (dptr->m_field10.has_value()) {
2860 dptr.detach();
2861 dptr->m_field10.reset();
2862 }
2863 }
2864 void ScalarOptionalTypes::setField11(float field11)
2865 {
2866 if (!dptr->m_field11 || dptr->m_field11.value() != field11) {
2867 dptr.detach();
2868 dptr->m_field11 = field11;
2869 }
2870 }
2871
2872 void ScalarOptionalTypes::setField11_p(float field11)
2873 {
2874 if (!dptr->m_field11 || dptr->m_field11 != field11) {
2875 dptr.detach();
2876 dptr->m_field11 = field11;
2877 }
2878 }
2879
2880 void ScalarOptionalTypes::clearField11()
2881 {
2882 if (dptr->m_field11.has_value()) {
2883 dptr.detach();
2884 dptr->m_field11.reset();
2885 }
2886 }
2887 void ScalarOptionalTypes::setField12(double field12)
2888 {
2889 if (!dptr->m_field12 || dptr->m_field12.value() != field12) {
2890 dptr.detach();
2891 dptr->m_field12 = field12;
2892 }
2893 }
2894
2895 void ScalarOptionalTypes::setField12_p(double field12)
2896 {
2897 if (!dptr->m_field12 || dptr->m_field12 != field12) {
2898 dptr.detach();
2899 dptr->m_field12 = field12;
2900 }
2901 }
2902
2903 void ScalarOptionalTypes::clearField12()
2904 {
2905 if (dptr->m_field12.has_value()) {
2906 dptr.detach();
2907 dptr->m_field12.reset();
2908 }
2909 }
2910 void ScalarOptionalTypes::setField13(const QString &field13)
2911 {
2912 if (!dptr->m_field13 || dptr->m_field13.value() != field13) {
2913 dptr.detach();
2914 dptr->m_field13 = field13;
2915 }
2916 }
2917
2918 void ScalarOptionalTypes::setField13(QString &&field13)
2919 {
2920 if (!dptr->m_field13 || dptr->m_field13.value() != field13) {
2921 dptr.detach();
2922 dptr->m_field13 = std::move(field13);
2923 }
2924 }
2925
2926 void ScalarOptionalTypes::setField13_p(QString field13)
2927 {
2928 if (!dptr->m_field13 || dptr->m_field13 != field13) {
2929 dptr.detach();
2930 dptr->m_field13 = field13;
2931 }
2932 }
2933
2934 void ScalarOptionalTypes::clearField13()
2935 {
2936 if (dptr->m_field13.has_value()) {
2937 dptr.detach();
2938 dptr->m_field13.reset();
2939 }
2940 }
2941 void ScalarOptionalTypes::setField14(const QByteArray &field14)
2942 {
2943 if (!dptr->m_field14 || dptr->m_field14.value() != field14) {
2944 dptr.detach();
2945 dptr->m_field14 = field14;
2946 }
2947 }
2948
2949 void ScalarOptionalTypes::setField14(QByteArray &&field14)
2950 {
2951 if (!dptr->m_field14 || dptr->m_field14.value() != field14) {
2952 dptr.detach();
2953 dptr->m_field14 = std::move(field14);
2954 }
2955 }
2956
2957 void ScalarOptionalTypes::setField14_p(QByteArray field14)
2958 {
2959 if (!dptr->m_field14 || dptr->m_field14 != field14) {
2960 dptr.detach();
2961 dptr->m_field14 = field14;
2962 }
2963 }
2964
2965 void ScalarOptionalTypes::clearField14()
2966 {
2967 if (dptr->m_field14.has_value()) {
2968 dptr.detach();
2969 dptr->m_field14.reset();
2970 }
2971 }
2972
2973 class MapScalarTypes_QtProtobufData : public QSharedData
2974 {
2975 public:
2976 MapScalarTypes_QtProtobufData()
2977 : QSharedData()
2978 {
2979 }
2980
2981 MapScalarTypes_QtProtobufData(const MapScalarTypes_QtProtobufData &other)
2982 : QSharedData(other),
2983 m_field1(other.m_field1),
2984 m_field2(other.m_field2),
2985 m_field3(other.m_field3),
2986 m_field4(other.m_field4),
2987 m_field5(other.m_field5),
2988 m_field6(other.m_field6),
2989 m_field7(other.m_field7),
2990 m_field8(other.m_field8),
2991 m_field9(other.m_field9),
2992 m_field10(other.m_field10),
2993 m_field11(other.m_field11)
2994 {
2995 }
2996
2997 MapScalarTypes::Field1Entry m_field1;
2998 MapScalarTypes::Field2Entry m_field2;
2999 MapScalarTypes::Field3Entry m_field3;
3000 MapScalarTypes::Field4Entry m_field4;
3001 MapScalarTypes::Field5Entry m_field5;
3002 MapScalarTypes::Field6Entry m_field6;
3003 MapScalarTypes::Field7Entry m_field7;
3004 MapScalarTypes::Field8Entry m_field8;
3005 MapScalarTypes::Field9Entry m_field9;
3006 MapScalarTypes::Field10Entry m_field10;
3007 MapScalarTypes::Field11Entry m_field11;
3008 };
3009
3010 MapScalarTypes::~MapScalarTypes() = default;
3011
3012 static constexpr struct {
3013 QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
3014 const std::array<uint, 45> qt_protobuf_MapScalarTypes_uint_data;
3015 const char qt_protobuf_MapScalarTypes_char_data[107];
3016 } qt_protobuf_MapScalarTypes_metadata {
3017 // data
3018 {
3019 0, /* = version */
3020 11, /* = num fields */
3021 12, /* = field number offset */
3022 23, /* = property index offset */
3023 34, /* = field flags offset */
3024 26, /* = message full name length */
3025 },
3026 // uint_data
3027 {
3028 // JSON name offsets:
3029 27, /* = field1 */
3030 34, /* = field2 */
3031 41, /* = field3 */
3032 48, /* = field4 */
3033 55, /* = field5 */
3034 62, /* = field6 */
3035 69, /* = field7 */
3036 76, /* = field8 */
3037 83, /* = field9 */
3038 90, /* = field10 */
3039 98, /* = field11 */
3040 106, /* = end-of-string-marker */
3041 // Field numbers:
3042 1, /* = field1 */
3043 2, /* = field2 */
3044 3, /* = field3 */
3045 4, /* = field4 */
3046 5, /* = field5 */
3047 6, /* = field6 */
3048 7, /* = field7 */
3049 8, /* = field8 */
3050 9, /* = field9 */
3051 10, /* = field10 */
3052 11, /* = field11 */
3053 // Property indices:
3054 0, /* = field1 */
3055 1, /* = field2 */
3056 2, /* = field3 */
3057 3, /* = field4 */
3058 4, /* = field5 */
3059 5, /* = field6 */
3060 6, /* = field7 */
3061 7, /* = field8 */
3062 8, /* = field9 */
3063 9, /* = field10 */
3064 10, /* = field11 */
3065 // Field flags:
3066 uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field1 */
3067 uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field2 */
3068 uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field3 */
3069 uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field4 */
3070 uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field5 */
3071 uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field6 */
3072 uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field7 */
3073 uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field8 */
3074 uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field9 */
3075 uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field10 */
3076 uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field11 */
3077 },
3078 // char_data
3079 /* metadata char_data: */
3080 "qt.protobuf.MapScalarTypes\0" /* = full message name */
3081 /* field char_data: */
3082 "field1\0field2\0field3\0field4\0field5\0"
3083 "field6\0field7\0field8\0field9\0field10\0"
3084 "field11\0"
3085 };
3086
3087 const QtProtobufPrivate::QProtobufPropertyOrdering MapScalarTypes::staticPropertyOrdering = {
3088 &qt_protobuf_MapScalarTypes_metadata.data
3089 };
3090
3091 void MapScalarTypes::registerTypes()
3092 {
3093 qRegisterMetaType<MapScalarTypes>();
3094 qRegisterMetaType<QList<MapScalarTypes>>();
3095 qRegisterMetaType<MapScalarTypes::Field1Entry>();
3096 qRegisterProtobufMapType<QtProtobuf::int32, QtProtobuf::int64>();
3097 qRegisterMetaType<MapScalarTypes::Field2Entry>();
3098 qRegisterProtobufMapType<QtProtobuf::int64, QtProtobuf::sint32>();
3099 qRegisterMetaType<MapScalarTypes::Field3Entry>();
3100 qRegisterProtobufMapType<QtProtobuf::sint32, QtProtobuf::sint64>();
3101 qRegisterMetaType<MapScalarTypes::Field4Entry>();
3102 qRegisterProtobufMapType<QtProtobuf::sint64, QtProtobuf::uint32>();
3103 qRegisterMetaType<MapScalarTypes::Field5Entry>();
3104 qRegisterProtobufMapType<QtProtobuf::uint32, QtProtobuf::uint64>();
3105 qRegisterMetaType<MapScalarTypes::Field6Entry>();
3106 qRegisterProtobufMapType<QtProtobuf::uint64, QtProtobuf::fixed32>();
3107 qRegisterMetaType<MapScalarTypes::Field7Entry>();
3108 qRegisterProtobufMapType<QtProtobuf::fixed32, QtProtobuf::fixed64>();
3109 qRegisterMetaType<MapScalarTypes::Field8Entry>();
3110 qRegisterProtobufMapType<QtProtobuf::fixed64, QtProtobuf::sfixed32>();
3111 qRegisterMetaType<MapScalarTypes::Field9Entry>();
3112 qRegisterProtobufMapType<QtProtobuf::sfixed32, QtProtobuf::sfixed64>();
3113 qRegisterMetaType<MapScalarTypes::Field10Entry>();
3114 qRegisterProtobufMapType<QtProtobuf::sfixed64, QString>();
3115 qRegisterMetaType<MapScalarTypes::Field11Entry>();
3116 qRegisterProtobufMapType<QString, QtProtobuf::int32>();
3117 }
3118
3119 MapScalarTypes::MapScalarTypes()
3120 : QProtobufMessage(&MapScalarTypes::staticMetaObject, &MapScalarTypes::staticPropertyOrdering),
3121 dptr(new MapScalarTypes_QtProtobufData)
3122 {
3123 }
3124
3125 MapScalarTypes::MapScalarTypes(const MapScalarTypes &other)
3126 = default;
3127 MapScalarTypes &MapScalarTypes::operator =(const MapScalarTypes &other)
3128 {
3129 MapScalarTypes temp(other);
3130 swap(temp);
3131 return *this;
3132 }
3133 MapScalarTypes::MapScalarTypes(MapScalarTypes &&other) noexcept
3134 = default;
3135 MapScalarTypes::operator QVariant() const
3136 {
3137 return QVariant::fromValue(*this);
3138 }
3139 bool comparesEqual(const MapScalarTypes &lhs, const MapScalarTypes &rhs) noexcept
3140 {
3141 return operator ==(static_cast<const QProtobufMessage&>(lhs),
3142 static_cast<const QProtobufMessage&>(rhs))
3143 && lhs.dptr->m_field1 == rhs.dptr->m_field1
3144 && lhs.dptr->m_field2 == rhs.dptr->m_field2
3145 && lhs.dptr->m_field3 == rhs.dptr->m_field3
3146 && lhs.dptr->m_field4 == rhs.dptr->m_field4
3147 && lhs.dptr->m_field5 == rhs.dptr->m_field5
3148 && lhs.dptr->m_field6 == rhs.dptr->m_field6
3149 && lhs.dptr->m_field7 == rhs.dptr->m_field7
3150 && lhs.dptr->m_field8 == rhs.dptr->m_field8
3151 && lhs.dptr->m_field9 == rhs.dptr->m_field9
3152 && lhs.dptr->m_field10 == rhs.dptr->m_field10
3153 && lhs.dptr->m_field11 == rhs.dptr->m_field11;
3154 }
3155
3156 const MapScalarTypes::Field1Entry &MapScalarTypes::field1() const &
3157 {
3158 return dptr->m_field1;
3159 }
3160
3161 const MapScalarTypes::Field2Entry &MapScalarTypes::field2() const &
3162 {
3163 return dptr->m_field2;
3164 }
3165
3166 const MapScalarTypes::Field3Entry &MapScalarTypes::field3() const &
3167 {
3168 return dptr->m_field3;
3169 }
3170
3171 const MapScalarTypes::Field4Entry &MapScalarTypes::field4() const &
3172 {
3173 return dptr->m_field4;
3174 }
3175
3176 const MapScalarTypes::Field5Entry &MapScalarTypes::field5() const &
3177 {
3178 return dptr->m_field5;
3179 }
3180
3181 const MapScalarTypes::Field6Entry &MapScalarTypes::field6() const &
3182 {
3183 return dptr->m_field6;
3184 }
3185
3186 const MapScalarTypes::Field7Entry &MapScalarTypes::field7() const &
3187 {
3188 return dptr->m_field7;
3189 }
3190
3191 const MapScalarTypes::Field8Entry &MapScalarTypes::field8() const &
3192 {
3193 return dptr->m_field8;
3194 }
3195
3196 const MapScalarTypes::Field9Entry &MapScalarTypes::field9() const &
3197 {
3198 return dptr->m_field9;
3199 }
3200
3201 const MapScalarTypes::Field10Entry &MapScalarTypes::field10() const &
3202 {
3203 return dptr->m_field10;
3204 }
3205
3206 const MapScalarTypes::Field11Entry &MapScalarTypes::field11() const &
3207 {
3208 return dptr->m_field11;
3209 }
3210
3211 void MapScalarTypes::setField1(const MapScalarTypes::Field1Entry &field1)
3212 {
3213 if (dptr->m_field1 != field1) {
3214 dptr.detach();
3215 dptr->m_field1 = field1;
3216 }
3217 }
3218
3219 void MapScalarTypes::setField1(MapScalarTypes::Field1Entry &&field1)
3220 {
3221 if (dptr->m_field1 != field1) {
3222 dptr.detach();
3223 dptr->m_field1 = std::move(field1);
3224 }
3225 }
3226
3227 void MapScalarTypes::setField2(const MapScalarTypes::Field2Entry &field2)
3228 {
3229 if (dptr->m_field2 != field2) {
3230 dptr.detach();
3231 dptr->m_field2 = field2;
3232 }
3233 }
3234
3235 void MapScalarTypes::setField2(MapScalarTypes::Field2Entry &&field2)
3236 {
3237 if (dptr->m_field2 != field2) {
3238 dptr.detach();
3239 dptr->m_field2 = std::move(field2);
3240 }
3241 }
3242
3243 void MapScalarTypes::setField3(const MapScalarTypes::Field3Entry &field3)
3244 {
3245 if (dptr->m_field3 != field3) {
3246 dptr.detach();
3247 dptr->m_field3 = field3;
3248 }
3249 }
3250
3251 void MapScalarTypes::setField3(MapScalarTypes::Field3Entry &&field3)
3252 {
3253 if (dptr->m_field3 != field3) {
3254 dptr.detach();
3255 dptr->m_field3 = std::move(field3);
3256 }
3257 }
3258
3259 void MapScalarTypes::setField4(const MapScalarTypes::Field4Entry &field4)
3260 {
3261 if (dptr->m_field4 != field4) {
3262 dptr.detach();
3263 dptr->m_field4 = field4;
3264 }
3265 }
3266
3267 void MapScalarTypes::setField4(MapScalarTypes::Field4Entry &&field4)
3268 {
3269 if (dptr->m_field4 != field4) {
3270 dptr.detach();
3271 dptr->m_field4 = std::move(field4);
3272 }
3273 }
3274
3275 void MapScalarTypes::setField5(const MapScalarTypes::Field5Entry &field5)
3276 {
3277 if (dptr->m_field5 != field5) {
3278 dptr.detach();
3279 dptr->m_field5 = field5;
3280 }
3281 }
3282
3283 void MapScalarTypes::setField5(MapScalarTypes::Field5Entry &&field5)
3284 {
3285 if (dptr->m_field5 != field5) {
3286 dptr.detach();
3287 dptr->m_field5 = std::move(field5);
3288 }
3289 }
3290
3291 void MapScalarTypes::setField6(const MapScalarTypes::Field6Entry &field6)
3292 {
3293 if (dptr->m_field6 != field6) {
3294 dptr.detach();
3295 dptr->m_field6 = field6;
3296 }
3297 }
3298
3299 void MapScalarTypes::setField6(MapScalarTypes::Field6Entry &&field6)
3300 {
3301 if (dptr->m_field6 != field6) {
3302 dptr.detach();
3303 dptr->m_field6 = std::move(field6);
3304 }
3305 }
3306
3307 void MapScalarTypes::setField7(const MapScalarTypes::Field7Entry &field7)
3308 {
3309 if (dptr->m_field7 != field7) {
3310 dptr.detach();
3311 dptr->m_field7 = field7;
3312 }
3313 }
3314
3315 void MapScalarTypes::setField7(MapScalarTypes::Field7Entry &&field7)
3316 {
3317 if (dptr->m_field7 != field7) {
3318 dptr.detach();
3319 dptr->m_field7 = std::move(field7);
3320 }
3321 }
3322
3323 void MapScalarTypes::setField8(const MapScalarTypes::Field8Entry &field8)
3324 {
3325 if (dptr->m_field8 != field8) {
3326 dptr.detach();
3327 dptr->m_field8 = field8;
3328 }
3329 }
3330
3331 void MapScalarTypes::setField8(MapScalarTypes::Field8Entry &&field8)
3332 {
3333 if (dptr->m_field8 != field8) {
3334 dptr.detach();
3335 dptr->m_field8 = std::move(field8);
3336 }
3337 }
3338
3339 void MapScalarTypes::setField9(const MapScalarTypes::Field9Entry &field9)
3340 {
3341 if (dptr->m_field9 != field9) {
3342 dptr.detach();
3343 dptr->m_field9 = field9;
3344 }
3345 }
3346
3347 void MapScalarTypes::setField9(MapScalarTypes::Field9Entry &&field9)
3348 {
3349 if (dptr->m_field9 != field9) {
3350 dptr.detach();
3351 dptr->m_field9 = std::move(field9);
3352 }
3353 }
3354
3355 void MapScalarTypes::setField10(const MapScalarTypes::Field10Entry &field10)
3356 {
3357 if (dptr->m_field10 != field10) {
3358 dptr.detach();
3359 dptr->m_field10 = field10;
3360 }
3361 }
3362
3363 void MapScalarTypes::setField10(MapScalarTypes::Field10Entry &&field10)
3364 {
3365 if (dptr->m_field10 != field10) {
3366 dptr.detach();
3367 dptr->m_field10 = std::move(field10);
3368 }
3369 }
3370
3371 void MapScalarTypes::setField11(const MapScalarTypes::Field11Entry &field11)
3372 {
3373 if (dptr->m_field11 != field11) {
3374 dptr.detach();
3375 dptr->m_field11 = field11;
3376 }
3377 }
3378
3379 void MapScalarTypes::setField11(MapScalarTypes::Field11Entry &&field11)
3380 {
3381 if (dptr->m_field11 != field11) {
3382 dptr.detach();
3383 dptr->m_field11 = std::move(field11);
3384 }
3385 }
3386
3387
3388 class MessageTypes_QtProtobufData : public QSharedData
3389 {
3390 public:
3391 MessageTypes_QtProtobufData()
3392 : QSharedData(),
3393 m_field1(nullptr),
3394 m_field3(nullptr),
3395 m_field4(EnumTypes_QtProtobufNested::NestedEnum::EnumValue1)
3396 {
3397 }
3398
3399 MessageTypes_QtProtobufData(const MessageTypes_QtProtobufData &other)
3400 : QSharedData(other),
3401 m_field1(other.m_field1
3402 ? new ScalarTypes(*other.m_field1)
3403 : nullptr),
3404 m_field2(other.m_field2),
3405 m_field3(other.m_field3
3406 ? new ScalarTypes(*other.m_field3)
3407 : nullptr),
3408 m_field4(other.m_field4),
3409 m_field5(other.m_field5),
3410 m_fieldOneOf(other.m_fieldOneOf)
3411 {
3412 }
3413
3414 QtProtobufPrivate::QProtobufLazyMessagePointer<ScalarTypes> m_field1;
3415 QList<ScalarTypes> m_field2;
3416 QtProtobufPrivate::QProtobufLazyMessagePointer<ScalarTypes> m_field3;
3417 EnumTypes_QtProtobufNested::NestedEnum m_field4;
3418 MessageTypes::Field5Entry m_field5;
3419 QtProtobufPrivate::QProtobufOneof m_fieldOneOf;
3420 };
3421
3422 MessageTypes::~MessageTypes() = default;
3423
3424 static constexpr struct {
3425 QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
3426 const std::array<uint, 33> qt_protobuf_MessageTypes_uint_data;
3427 const char qt_protobuf_MessageTypes_char_data[82];
3428 } qt_protobuf_MessageTypes_metadata {
3429 // data
3430 {
3431 0, /* = version */
3432 8, /* = num fields */
3433 9, /* = field number offset */
3434 17, /* = property index offset */
3435 25, /* = field flags offset */
3436 24, /* = message full name length */
3437 },
3438 // uint_data
3439 {
3440 // JSON name offsets:
3441 25, /* = field1 */
3442 32, /* = field2 */
3443 39, /* = field3 */
3444 46, /* = field4 */
3445 53, /* = field5 */
3446 60, /* = field6 */
3447 67, /* = field7 */
3448 74, /* = field8 */
3449 81, /* = end-of-string-marker */
3450 // Field numbers:
3451 1, /* = field1 */
3452 2, /* = field2 */
3453 3, /* = field3 */
3454 4, /* = field4 */
3455 5, /* = field5 */
3456 6, /* = field6 */
3457 7, /* = field7 */
3458 8, /* = field8 */
3459 // Property indices:
3460 0, /* = field1 */
3461 2, /* = field2 */
3462 3, /* = field3 */
3463 5, /* = field4 */
3464 6, /* = field5 */
3465 7, /* = field6 */
3466 9, /* = field7 */
3467 11, /* = field8 */
3468 // Field flags:
3469 uint(QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = field1 */
3470 uint(QtProtobufPrivate::FieldFlag::Repeated | QtProtobufPrivate::FieldFlag::Message), /* = field2 */
3471 uint(QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = field3 */
3472 uint(QtProtobufPrivate::FieldFlag::Enum), /* = field4 */
3473 uint(QtProtobufPrivate::FieldFlag::Map | QtProtobufPrivate::FieldFlag::Message), /* = field5 */
3474 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = field6 */
3475 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = field7 */
3476 uint(QtProtobufPrivate::FieldFlag::Oneof | QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = field8 */
3477 },
3478 // char_data
3479 /* metadata char_data: */
3480 "qt.protobuf.MessageTypes\0" /* = full message name */
3481 /* field char_data: */
3482 "field1\0field2\0field3\0field4\0field5\0"
3483 "field6\0field7\0field8\0"
3484 };
3485
3486 const QtProtobufPrivate::QProtobufPropertyOrdering MessageTypes::staticPropertyOrdering = {
3487 &qt_protobuf_MessageTypes_metadata.data
3488 };
3489
3490 void MessageTypes::registerTypes()
3491 {
3492 qRegisterMetaType<MessageTypes>();
3493 qRegisterMetaType<QList<MessageTypes>>();
3494 qRegisterMetaType<MessageTypes::Field5Entry>();
3495 qRegisterProtobufMapType<QtProtobuf::int32, ScalarTypes>();
3496 }
3497
3498 MessageTypes::MessageTypes()
3499 : QProtobufMessage(&MessageTypes::staticMetaObject, &MessageTypes::staticPropertyOrdering),
3500 dptr(new MessageTypes_QtProtobufData)
3501 {
3502 }
3503
3504 MessageTypes::MessageTypes(const MessageTypes &other)
3505 = default;
3506 MessageTypes &MessageTypes::operator =(const MessageTypes &other)
3507 {
3508 MessageTypes temp(other);
3509 swap(temp);
3510 return *this;
3511 }
3512 MessageTypes::MessageTypes(MessageTypes &&other) noexcept
3513 = default;
3514 MessageTypes::operator QVariant() const
3515 {
3516 return QVariant::fromValue(*this);
3517 }
3518 bool comparesEqual(const MessageTypes &lhs, const MessageTypes &rhs) noexcept
3519 {
3520 return operator ==(static_cast<const QProtobufMessage&>(lhs),
3521 static_cast<const QProtobufMessage&>(rhs))
3522 && (lhs.dptr->m_field1 == rhs.dptr->m_field1
3523 || *lhs.dptr->m_field1 == *rhs.dptr->m_field1)
3524 && lhs.dptr->m_field2 == rhs.dptr->m_field2
3525 && (lhs.dptr->m_field3 == rhs.dptr->m_field3
3526 || *lhs.dptr->m_field3 == *rhs.dptr->m_field3)
3527 && lhs.dptr->m_field4 == rhs.dptr->m_field4
3528 && lhs.dptr->m_field5 == rhs.dptr->m_field5
3529 && lhs.dptr->m_fieldOneOf == rhs.dptr->m_fieldOneOf;
3530 }
3531
3532 ScalarTypes *MessageTypes::field1_p()
3533 {
3534 if (!dptr->m_field1)
3535 dptr.detach();
3536 return dptr->m_field1.get();
3537 }
3538
3539 bool MessageTypes::hasField1() const
3540 {
3541 return dptr->m_field1.operator bool();
3542 }
3543
3544 const ScalarTypes &MessageTypes::field1() const &
3545 {
3546 return *dptr->m_field1;
3547 }
3548
3549 ScalarTypes &MessageTypes::mutField1() &
3550 {
3551 dptr.detach();
3552 return *dptr->m_field1;
3553 }
3554
3555 void MessageTypes::clearField1()
3556 {
3557 if (dptr->m_field1) {
3558 dptr.detach();
3559 dptr->m_field1.reset();
3560 }
3561 }
3562
3563 const QList<ScalarTypes> &MessageTypes::field2() const &
3564 {
3565 return dptr->m_field2;
3566 }
3567
3568 ScalarTypes *MessageTypes::field3_p()
3569 {
3570 if (!dptr->m_field3)
3571 dptr.detach();
3572 return dptr->m_field3.get();
3573 }
3574
3575 bool MessageTypes::hasField3() const
3576 {
3577 return dptr->m_field3.operator bool();
3578 }
3579
3580 const ScalarTypes &MessageTypes::field3() const &
3581 {
3582 return *dptr->m_field3;
3583 }
3584
3585 ScalarTypes &MessageTypes::mutField3() &
3586 {
3587 dptr.detach();
3588 return *dptr->m_field3;
3589 }
3590
3591 void MessageTypes::clearField3()
3592 {
3593 if (dptr->m_field3) {
3594 dptr.detach();
3595 dptr->m_field3.reset();
3596 }
3597 }
3598
3599 EnumTypes_QtProtobufNested::NestedEnum MessageTypes::field4() const
3600 {
3601 return dptr->m_field4;
3602 }
3603
3604 const MessageTypes::Field5Entry &MessageTypes::field5() const &
3605 {
3606 return dptr->m_field5;
3607 }
3608
3609 ScalarTypes *MessageTypes::field6_p()
3610 {
3611 if (!dptr->m_fieldOneOf.holdsField(6))
3612 dptr.detach();
3613 return dptr->m_fieldOneOf.message<ScalarTypes>();
3614 }
3615
3616 bool MessageTypes::hasField6() const
3617 {
3618 return dptr->m_fieldOneOf.holdsField(6);
3619 }
3620 ScalarTypes &MessageTypes::field6() const
3621 {
3622 Q_ASSERT(dptr->m_fieldOneOf.holdsField(6));
3623 return *(dptr->m_fieldOneOf.message<ScalarTypes>());
3624 }
3625
3626 ScalarRepeatedTypes *MessageTypes::field7_p()
3627 {
3628 if (!dptr->m_fieldOneOf.holdsField(7))
3629 dptr.detach();
3630 return dptr->m_fieldOneOf.message<ScalarRepeatedTypes>();
3631 }
3632
3633 bool MessageTypes::hasField7() const
3634 {
3635 return dptr->m_fieldOneOf.holdsField(7);
3636 }
3637 ScalarRepeatedTypes &MessageTypes::field7() const
3638 {
3639 Q_ASSERT(dptr->m_fieldOneOf.holdsField(7));
3640 return *(dptr->m_fieldOneOf.message<ScalarRepeatedTypes>());
3641 }
3642
3643 ScalarOneOfTypes *MessageTypes::field8_p()
3644 {
3645 if (!dptr->m_fieldOneOf.holdsField(8))
3646 dptr.detach();
3647 return dptr->m_fieldOneOf.message<ScalarOneOfTypes>();
3648 }
3649
3650 bool MessageTypes::hasField8() const
3651 {
3652 return dptr->m_fieldOneOf.holdsField(8);
3653 }
3654 ScalarOneOfTypes &MessageTypes::field8() const
3655 {
3656 Q_ASSERT(dptr->m_fieldOneOf.holdsField(8));
3657 return *(dptr->m_fieldOneOf.message<ScalarOneOfTypes>());
3658 }
3659
3660 void MessageTypes::setField1_p(ScalarTypes *field1)
3661 {
3662 if (dptr->m_field1.get() != field1) {
3663 dptr.detach();
3664 dptr->m_field1.reset(field1);
3665 }
3666 }
3667
3668 void MessageTypes::setField1(const ScalarTypes &field1)
3669 {
3670 if (*dptr->m_field1 != field1) {
3671 dptr.detach();
3672 *dptr->m_field1 = field1;
3673 }
3674 }
3675
3676 void MessageTypes::setField1(ScalarTypes &&field1)
3677 {
3678 if (*dptr->m_field1 != field1) {
3679 dptr.detach();
3680 *dptr->m_field1 = std::move(field1);
3681 }
3682 }
3683
3684 void MessageTypes::setField2(const QList<ScalarTypes> &field2)
3685 {
3686 if (dptr->m_field2 != field2) {
3687 dptr.detach();
3688 dptr->m_field2 = field2;
3689 }
3690 }
3691
3692 void MessageTypes::setField2(QList<ScalarTypes> &&field2)
3693 {
3694 if (dptr->m_field2 != field2) {
3695 dptr.detach();
3696 dptr->m_field2 = std::move(field2);
3697 }
3698 }
3699
3700 void MessageTypes::setField3_p(ScalarTypes *field3)
3701 {
3702 if (dptr->m_field3.get() != field3) {
3703 dptr.detach();
3704 dptr->m_field3.reset(field3);
3705 }
3706 }
3707
3708 void MessageTypes::setField3(const ScalarTypes &field3)
3709 {
3710 if (*dptr->m_field3 != field3) {
3711 dptr.detach();
3712 *dptr->m_field3 = field3;
3713 }
3714 }
3715
3716 void MessageTypes::setField3(ScalarTypes &&field3)
3717 {
3718 if (*dptr->m_field3 != field3) {
3719 dptr.detach();
3720 *dptr->m_field3 = std::move(field3);
3721 }
3722 }
3723
3724 void MessageTypes::setField4(EnumTypes_QtProtobufNested::NestedEnum field4)
3725 {
3726 if (dptr->m_field4 != field4) {
3727 dptr.detach();
3728 dptr->m_field4 = field4;
3729 }
3730 }
3731
3732 void MessageTypes::setField5(const MessageTypes::Field5Entry &field5)
3733 {
3734 if (dptr->m_field5 != field5) {
3735 dptr.detach();
3736 dptr->m_field5 = field5;
3737 }
3738 }
3739
3740 void MessageTypes::setField5(MessageTypes::Field5Entry &&field5)
3741 {
3742 if (dptr->m_field5 != field5) {
3743 dptr.detach();
3744 dptr->m_field5 = std::move(field5);
3745 }
3746 }
3747
3748 void MessageTypes::setField6(const ScalarTypes &field6)
3749 {
3750 if (!dptr->m_fieldOneOf.isEqual(field6, 6)) {
3751 dptr.detach();
3752 dptr->m_fieldOneOf.setValue(field6, 6);
3753 }
3754 }
3755
3756 void MessageTypes::setField6(ScalarTypes &&field6)
3757 {
3758 if (!dptr->m_fieldOneOf.isEqual(field6, 6)) {
3759 dptr.detach();
3760 dptr->m_fieldOneOf.setValue(std::move(field6), 6);
3761 }
3762 }
3763
3764 void MessageTypes::setField6_p(ScalarTypes *field6)
3765 {
3766 const ScalarTypes &value = *field6;
3767 if (!dptr->m_fieldOneOf.isEqual(value, 6)) {
3768 dptr.detach();
3769 dptr->m_fieldOneOf.setValue(value, 6);
3770 }
3771 }
3772
3773 void MessageTypes::setField7(const ScalarRepeatedTypes &field7)
3774 {
3775 if (!dptr->m_fieldOneOf.isEqual(field7, 7)) {
3776 dptr.detach();
3777 dptr->m_fieldOneOf.setValue(field7, 7);
3778 }
3779 }
3780
3781 void MessageTypes::setField7(ScalarRepeatedTypes &&field7)
3782 {
3783 if (!dptr->m_fieldOneOf.isEqual(field7, 7)) {
3784 dptr.detach();
3785 dptr->m_fieldOneOf.setValue(std::move(field7), 7);
3786 }
3787 }
3788
3789 void MessageTypes::setField7_p(ScalarRepeatedTypes *field7)
3790 {
3791 const ScalarRepeatedTypes &value = *field7;
3792 if (!dptr->m_fieldOneOf.isEqual(value, 7)) {
3793 dptr.detach();
3794 dptr->m_fieldOneOf.setValue(value, 7);
3795 }
3796 }
3797
3798 void MessageTypes::setField8(const ScalarOneOfTypes &field8)
3799 {
3800 if (!dptr->m_fieldOneOf.isEqual(field8, 8)) {
3801 dptr.detach();
3802 dptr->m_fieldOneOf.setValue(field8, 8);
3803 }
3804 }
3805
3806 void MessageTypes::setField8(ScalarOneOfTypes &&field8)
3807 {
3808 if (!dptr->m_fieldOneOf.isEqual(field8, 8)) {
3809 dptr.detach();
3810 dptr->m_fieldOneOf.setValue(std::move(field8), 8);
3811 }
3812 }
3813
3814 void MessageTypes::setField8_p(ScalarOneOfTypes *field8)
3815 {
3816 const ScalarOneOfTypes &value = *field8;
3817 if (!dptr->m_fieldOneOf.isEqual(value, 8)) {
3818 dptr.detach();
3819 dptr->m_fieldOneOf.setValue(value, 8);
3820 }
3821 }
3822
3823 MessageTypes::FieldOneOfFields MessageTypes::fieldOneOfField() const
3824 {
3825 return static_cast<FieldOneOfFields>(dptr->m_fieldOneOf.fieldNumber());
3826 }
3827 void MessageTypes::clearFieldOneOf()
3828 {
3829 if (dptr->m_fieldOneOf.fieldNumber() != QtProtobuf::InvalidFieldNumber) {
3830 dptr.detach();
3831 dptr->m_fieldOneOf = QtProtobufPrivate::QProtobufOneof();
3832 }
3833 }
3834 namespace MessageNestedTypes_QtProtobufNested {
3835
3836 class NestedMessage_QtProtobufData : public QSharedData
3837 {
3838 public:
3839 NestedMessage_QtProtobufData()
3840 : QSharedData(),
3841 m_field1(0),
3842 m_field2(nullptr)
3843 {
3844 }
3845
3846 NestedMessage_QtProtobufData(const NestedMessage_QtProtobufData &other)
3847 : QSharedData(other),
3848 m_field1(other.m_field1),
3849 m_field2(other.m_field2
3850 ? new MessageTypes(*other.m_field2)
3851 : nullptr)
3852 {
3853 }
3854
3855 QtProtobuf::int32 m_field1;
3856 QtProtobufPrivate::QProtobufLazyMessagePointer<MessageTypes> m_field2;
3857 };
3858
3859 NestedMessage::~NestedMessage() = default;
3860
3861 static constexpr struct {
3862 QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
3863 const std::array<uint, 9> qt_protobuf_NestedMessage_uint_data;
3864 const char qt_protobuf_NestedMessage_char_data[60];
3865 } qt_protobuf_NestedMessage_metadata {
3866 // data
3867 {
3868 0, /* = version */
3869 2, /* = num fields */
3870 3, /* = field number offset */
3871 5, /* = property index offset */
3872 7, /* = field flags offset */
3873 44, /* = message full name length */
3874 },
3875 // uint_data
3876 {
3877 // JSON name offsets:
3878 45, /* = field1 */
3879 52, /* = field2 */
3880 59, /* = end-of-string-marker */
3881 // Field numbers:
3882 1, /* = field1 */
3883 2, /* = field2 */
3884 // Property indices:
3885 0, /* = field1 */
3886 1, /* = field2 */
3887 // Field flags:
3888 uint(QtProtobufPrivate::FieldFlag::NoFlags), /* = field1 */
3889 uint(QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = field2 */
3890 },
3891 // char_data
3892 /* metadata char_data: */
3893 "qt.protobuf.MessageNestedTypes.NestedMessage\0" /* = full message name */
3894 /* field char_data: */
3895 "field1\0field2\0"
3896 };
3897
3898 const QtProtobufPrivate::QProtobufPropertyOrdering NestedMessage::staticPropertyOrdering = {
3899 &qt_protobuf_NestedMessage_metadata.data
3900 };
3901
3902 void NestedMessage::registerTypes()
3903 {
3904 qRegisterMetaType<NestedMessage>();
3905 qRegisterMetaType<QList<NestedMessage>>();
3906 }
3907
3908 NestedMessage::NestedMessage()
3909 : QProtobufMessage(&NestedMessage::staticMetaObject, &NestedMessage::staticPropertyOrdering),
3910 dptr(new NestedMessage_QtProtobufData)
3911 {
3912 }
3913
3914 NestedMessage::NestedMessage(const NestedMessage &other)
3915 = default;
3916 NestedMessage &NestedMessage::operator =(const NestedMessage &other)
3917 {
3918 NestedMessage temp(other);
3919 swap(temp);
3920 return *this;
3921 }
3922 NestedMessage::NestedMessage(NestedMessage &&other) noexcept
3923 = default;
3924 NestedMessage::operator QVariant() const
3925 {
3926 return QVariant::fromValue(*this);
3927 }
3928 bool comparesEqual(const NestedMessage &lhs, const NestedMessage &rhs) noexcept
3929 {
3930 return operator ==(static_cast<const QProtobufMessage&>(lhs),
3931 static_cast<const QProtobufMessage&>(rhs))
3932 && lhs.dptr->m_field1 == rhs.dptr->m_field1
3933 && (lhs.dptr->m_field2 == rhs.dptr->m_field2
3934 || *lhs.dptr->m_field2 == *rhs.dptr->m_field2);
3935 }
3936
3937 QtProtobuf::int32 NestedMessage::field1() const
3938 {
3939 return dptr->m_field1;
3940 }
3941
3942 MessageTypes *NestedMessage::field2_p()
3943 {
3944 if (!dptr->m_field2)
3945 dptr.detach();
3946 return dptr->m_field2.get();
3947 }
3948
3949 bool NestedMessage::hasField2() const
3950 {
3951 return dptr->m_field2.operator bool();
3952 }
3953
3954 const MessageTypes &NestedMessage::field2() const &
3955 {
3956 return *dptr->m_field2;
3957 }
3958
3959 MessageTypes &NestedMessage::mutField2() &
3960 {
3961 dptr.detach();
3962 return *dptr->m_field2;
3963 }
3964
3965 void NestedMessage::clearField2()
3966 {
3967 if (dptr->m_field2) {
3968 dptr.detach();
3969 dptr->m_field2.reset();
3970 }
3971 }
3972
3973 void NestedMessage::setField1(QtProtobuf::int32 field1)
3974 {
3975 if (dptr->m_field1 != field1) {
3976 dptr.detach();
3977 dptr->m_field1 = field1;
3978 }
3979 }
3980
3981 void NestedMessage::setField2_p(MessageTypes *field2)
3982 {
3983 if (dptr->m_field2.get() != field2) {
3984 dptr.detach();
3985 dptr->m_field2.reset(field2);
3986 }
3987 }
3988
3989 void NestedMessage::setField2(const MessageTypes &field2)
3990 {
3991 if (*dptr->m_field2 != field2) {
3992 dptr.detach();
3993 *dptr->m_field2 = field2;
3994 }
3995 }
3996
3997 void NestedMessage::setField2(MessageTypes &&field2)
3998 {
3999 if (*dptr->m_field2 != field2) {
4000 dptr.detach();
4001 *dptr->m_field2 = std::move(field2);
4002 }
4003 }
4004
4005 } // namespace MessageNestedTypes_QtProtobufNested
4006
4007 class MessageNestedTypes_QtProtobufData : public QSharedData
4008 {
4009 public:
4010 MessageNestedTypes_QtProtobufData()
4011 : QSharedData(),
4012 m_field1(nullptr)
4013 {
4014 }
4015
4016 MessageNestedTypes_QtProtobufData(const MessageNestedTypes_QtProtobufData &other)
4017 : QSharedData(other),
4018 m_field1(other.m_field1
4019 ? new MessageNestedTypes_QtProtobufNested::NestedMessage(*other.m_field1)
4020 : nullptr)
4021 {
4022 }
4023
4024 QtProtobufPrivate::QProtobufLazyMessagePointer<MessageNestedTypes_QtProtobufNested::NestedMessage> m_field1;
4025 };
4026
4027 MessageNestedTypes::~MessageNestedTypes() = default;
4028
4029 static constexpr struct {
4030 QtProtobufPrivate::QProtobufPropertyOrdering::Data data;
4031 const std::array<uint, 5> qt_protobuf_MessageNestedTypes_uint_data;
4032 const char qt_protobuf_MessageNestedTypes_char_data[39];
4033 } qt_protobuf_MessageNestedTypes_metadata {
4034 // data
4035 {
4036 0, /* = version */
4037 1, /* = num fields */
4038 2, /* = field number offset */
4039 3, /* = property index offset */
4040 4, /* = field flags offset */
4041 30, /* = message full name length */
4042 },
4043 // uint_data
4044 {
4045 // JSON name offsets:
4046 31, /* = field1 */
4047 38, /* = end-of-string-marker */
4048 // Field numbers:
4049 1, /* = field1 */
4050 // Property indices:
4051 0, /* = field1 */
4052 // Field flags:
4053 uint(QtProtobufPrivate::FieldFlag::ExplicitPresence | QtProtobufPrivate::FieldFlag::Message), /* = field1 */
4054 },
4055 // char_data
4056 /* metadata char_data: */
4057 "qt.protobuf.MessageNestedTypes\0" /* = full message name */
4058 /* field char_data: */
4059 "field1\0"
4060 };
4061
4062 const QtProtobufPrivate::QProtobufPropertyOrdering MessageNestedTypes::staticPropertyOrdering = {
4063 &qt_protobuf_MessageNestedTypes_metadata.data
4064 };
4065
4066 void MessageNestedTypes::registerTypes()
4067 {
4068 qRegisterMetaType<MessageNestedTypes>();
4069 qRegisterMetaType<QList<MessageNestedTypes>>();
4070 }
4071
4072 MessageNestedTypes::MessageNestedTypes()
4073 : QProtobufMessage(&MessageNestedTypes::staticMetaObject, &MessageNestedTypes::staticPropertyOrdering),
4074 dptr(new MessageNestedTypes_QtProtobufData)
4075 {
4076 }
4077
4078 MessageNestedTypes::MessageNestedTypes(const MessageNestedTypes &other)
4079 = default;
4080 MessageNestedTypes &MessageNestedTypes::operator =(const MessageNestedTypes &other)
4081 {
4082 MessageNestedTypes temp(other);
4083 swap(temp);
4084 return *this;
4085 }
4086 MessageNestedTypes::MessageNestedTypes(MessageNestedTypes &&other) noexcept
4087 = default;
4088 MessageNestedTypes::operator QVariant() const
4089 {
4090 return QVariant::fromValue(*this);
4091 }
4092 bool comparesEqual(const MessageNestedTypes &lhs, const MessageNestedTypes &rhs) noexcept
4093 {
4094 return operator ==(static_cast<const QProtobufMessage&>(lhs),
4095 static_cast<const QProtobufMessage&>(rhs))
4096 && (lhs.dptr->m_field1 == rhs.dptr->m_field1
4097 || *lhs.dptr->m_field1 == *rhs.dptr->m_field1);
4098 }
4099
4100 MessageNestedTypes_QtProtobufNested::NestedMessage *MessageNestedTypes::field1_p()
4101 {
4102 if (!dptr->m_field1)
4103 dptr.detach();
4104 return dptr->m_field1.get();
4105 }
4106
4107 bool MessageNestedTypes::hasField1() const
4108 {
4109 return dptr->m_field1.operator bool();
4110 }
4111
4112 const MessageNestedTypes_QtProtobufNested::NestedMessage &MessageNestedTypes::field1() const &
4113 {
4114 return *dptr->m_field1;
4115 }
4116
4117 MessageNestedTypes_QtProtobufNested::NestedMessage &MessageNestedTypes::mutField1() &
4118 {
4119 dptr.detach();
4120 return *dptr->m_field1;
4121 }
4122
4123 void MessageNestedTypes::clearField1()
4124 {
4125 if (dptr->m_field1) {
4126 dptr.detach();
4127 dptr->m_field1.reset();
4128 }
4129 }
4130
4131 void MessageNestedTypes::setField1_p(MessageNestedTypes_QtProtobufNested::NestedMessage *field1)
4132 {
4133 if (dptr->m_field1.get() != field1) {
4134 dptr.detach();
4135 dptr->m_field1.reset(field1);
4136 }
4137 }
4138
4139 void MessageNestedTypes::setField1(const MessageNestedTypes_QtProtobufNested::NestedMessage &field1)
4140 {
4141 if (*dptr->m_field1 != field1) {
4142 dptr.detach();
4143 *dptr->m_field1 = field1;
4144 }
4145 }
4146
4147 void MessageNestedTypes::setField1(MessageNestedTypes_QtProtobufNested::NestedMessage &&field1)
4148 {
4149 if (*dptr->m_field1 != field1) {
4150 dptr.detach();
4151 *dptr->m_field1 = std::move(field1);
4152 }
4153 }
4154
4155 } // namespace qt::protobuf
4156
4157 #include "moc_qtprotobufgen.qpb.cpp"