1 /**
2 * Autogenerated by Thrift for src/module.thrift
3 *
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5 * @generated @nocommit
6 */
7 #pragma once
8
9 #include "thrift/compiler/test/fixtures/templated-deserialize/gen-cpp2/module_types.h"
10
11 #include <thrift/lib/cpp2/gen/module_types_tcc.h>
12
13 namespace cpp2 {
14
15 } // cpp2
16 namespace std {
17
18 } // std
19
20
21 namespace apache {
22 namespace thrift {
23 namespace detail {
24
25 template <>
26 struct TccStructTraits<::cpp2::SmallStruct> {
27 static void translateFieldName(
28 folly::StringPiece _fname,
29 int16_t& fid,
30 apache::thrift::protocol::TType& _ftype) noexcept;
31 };
32 template <>
33 struct TccStructTraits<::cpp2::containerStruct> {
34 static void translateFieldName(
35 folly::StringPiece _fname,
36 int16_t& fid,
37 apache::thrift::protocol::TType& _ftype) noexcept;
38 };
39
40 } // namespace detail
41 } // namespace thrift
42 } // namespace apache
43
44 namespace cpp2 {
45
46 template <class Protocol_>
readNoXfer(Protocol_ * iprot)47 void SmallStruct::readNoXfer(Protocol_* iprot) {
48 apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;
49
50 _readState.readStructBegin(iprot);
51
52 using apache::thrift::TProtocolException;
53
54
55 if (UNLIKELY(!_readState.advanceToNextField(
56 iprot,
57 0,
58 1,
59 apache::thrift::protocol::T_BOOL))) {
60 goto _loop;
61 }
62 _readField_small_A:
63 {
64 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::readWithContext(*iprot, this->__fbthrift_field_small_A, _readState);
65
66 }
67 this->__isset.set(0, true);
68
69 if (UNLIKELY(!_readState.advanceToNextField(
70 iprot,
71 1,
72 2,
73 apache::thrift::protocol::T_I32))) {
74 goto _loop;
75 }
76 _readField_small_B:
77 {
78 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::readWithContext(*iprot, this->__fbthrift_field_small_B, _readState);
79
80 }
81 this->__isset.set(1, true);
82
83 if (UNLIKELY(!_readState.advanceToNextField(
84 iprot,
85 2,
86 0,
87 apache::thrift::protocol::T_STOP))) {
88 goto _loop;
89 }
90
91 _end:
92 _readState.readStructEnd(iprot);
93
94 return;
95
96 _loop:
97 _readState.afterAdvanceFailure(iprot);
98 if (_readState.atStop()) {
99 goto _end;
100 }
101 if (iprot->kUsesFieldNames()) {
102 _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<SmallStruct>>();
103 }
104
105 switch (_readState.fieldId) {
106 case 1:
107 {
108 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_BOOL))) {
109 goto _readField_small_A;
110 } else {
111 goto _skip;
112 }
113 }
114 case 2:
115 {
116 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
117 goto _readField_small_B;
118 } else {
119 goto _skip;
120 }
121 }
122 default:
123 {
124 _skip:
125 _readState.skip(iprot);
126 _readState.readFieldEnd(iprot);
127 _readState.readFieldBeginNoInline(iprot);
128 goto _loop;
129 }
130 }
131 }
132
133 template <class Protocol_>
serializedSize(Protocol_ const * prot_) const134 uint32_t SmallStruct::serializedSize(Protocol_ const* prot_) const {
135 uint32_t xfer = 0;
136 xfer += prot_->serializedStructSize("SmallStruct");
137 {
138 xfer += prot_->serializedFieldSize("small_A", apache::thrift::protocol::T_BOOL, 1);
139 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::serializedSize<false>(*prot_, this->__fbthrift_field_small_A);
140 }
141 {
142 xfer += prot_->serializedFieldSize("small_B", apache::thrift::protocol::T_I32, 2);
143 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_small_B);
144 }
145 xfer += prot_->serializedSizeStop();
146 return xfer;
147 }
148
149 template <class Protocol_>
serializedSizeZC(Protocol_ const * prot_) const150 uint32_t SmallStruct::serializedSizeZC(Protocol_ const* prot_) const {
151 uint32_t xfer = 0;
152 xfer += prot_->serializedStructSize("SmallStruct");
153 {
154 xfer += prot_->serializedFieldSize("small_A", apache::thrift::protocol::T_BOOL, 1);
155 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::serializedSize<false>(*prot_, this->__fbthrift_field_small_A);
156 }
157 {
158 xfer += prot_->serializedFieldSize("small_B", apache::thrift::protocol::T_I32, 2);
159 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::serializedSize<false>(*prot_, this->__fbthrift_field_small_B);
160 }
161 xfer += prot_->serializedSizeStop();
162 return xfer;
163 }
164
165 template <class Protocol_>
write(Protocol_ * prot_) const166 uint32_t SmallStruct::write(Protocol_* prot_) const {
167 uint32_t xfer = 0;
168 xfer += prot_->writeStructBegin("SmallStruct");
169 bool previousFieldHasValue = true;
170 {
171 constexpr int16_t kPrevFieldId = 0;
172 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_BOOL, 1, kPrevFieldId>(*prot_, "small_A", previousFieldHasValue);
173 previousFieldHasValue = true;
174 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::write(*prot_, this->__fbthrift_field_small_A);
175 xfer += prot_->writeFieldEnd();
176 }
177 {
178 constexpr int16_t kPrevFieldId = 1;
179 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 2, kPrevFieldId>(*prot_, "small_B", previousFieldHasValue);
180 previousFieldHasValue = true;
181 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, ::std::int32_t>::write(*prot_, this->__fbthrift_field_small_B);
182 xfer += prot_->writeFieldEnd();
183 }
184 xfer += prot_->writeFieldStop();
185 xfer += prot_->writeStructEnd();
186 return xfer;
187 }
188
189 extern template void SmallStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
190 extern template uint32_t SmallStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
191 extern template uint32_t SmallStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
192 extern template uint32_t SmallStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
193 extern template void SmallStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
194 extern template uint32_t SmallStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
195 extern template uint32_t SmallStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
196 extern template uint32_t SmallStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
197
198 } // cpp2
199 namespace cpp2 {
200
201 template <class Protocol_>
readNoXfer(Protocol_ * iprot)202 void containerStruct::readNoXfer(Protocol_* iprot) {
203 apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;
204
205 _readState.readStructBegin(iprot);
206
207 using apache::thrift::TProtocolException;
208
209
210 if (UNLIKELY(!_readState.advanceToNextField(
211 iprot,
212 0,
213 1,
214 apache::thrift::protocol::T_BOOL))) {
215 goto _loop;
216 }
217 _readField_fieldA:
218 {
219 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::readWithContext(*iprot, this->__fbthrift_field_fieldA, _readState);
220
221 }
222 this->__isset.set(0, true);
223
224 if (UNLIKELY(!_readState.advanceToNextField(
225 iprot,
226 1,
227 2,
228 apache::thrift::protocol::T_MAP))) {
229 goto _loop;
230 }
231 _readField_fieldB:
232 {
233 _readState.beforeSubobject(iprot);
234 this->__fbthrift_field_fieldB = ::std::map<::std::string, bool>();
235 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>, ::std::map<::std::string, bool>>::readWithContext(*iprot, this->__fbthrift_field_fieldB, _readState);
236 _readState.afterSubobject(iprot);
237
238 }
239 this->__isset.set(1, true);
240
241 if (UNLIKELY(!_readState.advanceToNextField(
242 iprot,
243 2,
244 3,
245 apache::thrift::protocol::T_SET))) {
246 goto _loop;
247 }
248 _readField_fieldC:
249 {
250 _readState.beforeSubobject(iprot);
251 this->__fbthrift_field_fieldC = ::std::set<::std::int32_t>();
252 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::set<::apache::thrift::type_class::integral>, ::std::set<::std::int32_t>>::readWithContext(*iprot, this->__fbthrift_field_fieldC, _readState);
253 _readState.afterSubobject(iprot);
254
255 }
256 this->__isset.set(2, true);
257
258 if (UNLIKELY(!_readState.advanceToNextField(
259 iprot,
260 3,
261 4,
262 apache::thrift::protocol::T_STRING))) {
263 goto _loop;
264 }
265 _readField_fieldD:
266 {
267 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_fieldD, _readState);
268
269 }
270 this->__isset.set(3, true);
271
272 if (UNLIKELY(!_readState.advanceToNextField(
273 iprot,
274 4,
275 5,
276 apache::thrift::protocol::T_STRING))) {
277 goto _loop;
278 }
279 _readField_fieldE:
280 {
281 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::readWithContext(*iprot, this->__fbthrift_field_fieldE, _readState);
282
283 }
284 this->__isset.set(4, true);
285
286 if (UNLIKELY(!_readState.advanceToNextField(
287 iprot,
288 5,
289 6,
290 apache::thrift::protocol::T_LIST))) {
291 goto _loop;
292 }
293 _readField_fieldF:
294 {
295 _readState.beforeSubobject(iprot);
296 this->__fbthrift_field_fieldF = ::std::vector<::std::vector<::std::vector<::std::int32_t>>>();
297 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>>, ::std::vector<::std::vector<::std::vector<::std::int32_t>>>>::readWithContext(*iprot, this->__fbthrift_field_fieldF, _readState);
298 _readState.afterSubobject(iprot);
299
300 }
301 this->__isset.set(5, true);
302
303 if (UNLIKELY(!_readState.advanceToNextField(
304 iprot,
305 6,
306 7,
307 apache::thrift::protocol::T_MAP))) {
308 goto _loop;
309 }
310 _readField_fieldG:
311 {
312 _readState.beforeSubobject(iprot);
313 this->__fbthrift_field_fieldG = ::std::map<::std::string, ::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>>();
314 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>>>, ::std::map<::std::string, ::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>>>::readWithContext(*iprot, this->__fbthrift_field_fieldG, _readState);
315 _readState.afterSubobject(iprot);
316
317 }
318 this->__isset.set(6, true);
319
320 if (UNLIKELY(!_readState.advanceToNextField(
321 iprot,
322 7,
323 8,
324 apache::thrift::protocol::T_LIST))) {
325 goto _loop;
326 }
327 _readField_fieldH:
328 {
329 _readState.beforeSubobject(iprot);
330 this->__fbthrift_field_fieldH = ::std::vector<::std::set<::std::int32_t>>();
331 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::set<::apache::thrift::type_class::integral>>, ::std::vector<::std::set<::std::int32_t>>>::readWithContext(*iprot, this->__fbthrift_field_fieldH, _readState);
332 _readState.afterSubobject(iprot);
333
334 }
335 this->__isset.set(7, true);
336
337 if (UNLIKELY(!_readState.advanceToNextField(
338 iprot,
339 8,
340 9,
341 apache::thrift::protocol::T_BOOL))) {
342 goto _loop;
343 }
344 _readField_fieldI:
345 {
346 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::readWithContext(*iprot, this->__fbthrift_field_fieldI, _readState);
347
348 }
349 this->__isset.set(8, true);
350
351 if (UNLIKELY(!_readState.advanceToNextField(
352 iprot,
353 9,
354 10,
355 apache::thrift::protocol::T_MAP))) {
356 goto _loop;
357 }
358 _readField_fieldJ:
359 {
360 _readState.beforeSubobject(iprot);
361 this->__fbthrift_field_fieldJ = ::std::map<::std::string, ::std::vector<::std::int32_t>>();
362 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, ::std::map<::std::string, ::std::vector<::std::int32_t>>>::readWithContext(*iprot, this->__fbthrift_field_fieldJ, _readState);
363 _readState.afterSubobject(iprot);
364
365 }
366 this->__isset.set(9, true);
367
368 if (UNLIKELY(!_readState.advanceToNextField(
369 iprot,
370 10,
371 11,
372 apache::thrift::protocol::T_LIST))) {
373 goto _loop;
374 }
375 _readField_fieldK:
376 {
377 _readState.beforeSubobject(iprot);
378 this->__fbthrift_field_fieldK = ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>();
379 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>>>, ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>>::readWithContext(*iprot, this->__fbthrift_field_fieldK, _readState);
380 _readState.afterSubobject(iprot);
381
382 }
383 this->__isset.set(10, true);
384
385 if (UNLIKELY(!_readState.advanceToNextField(
386 iprot,
387 11,
388 12,
389 apache::thrift::protocol::T_SET))) {
390 goto _loop;
391 }
392 _readField_fieldL:
393 {
394 _readState.beforeSubobject(iprot);
395 this->__fbthrift_field_fieldL = ::std::set<::std::set<::std::set<bool>>>();
396 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::set<::apache::thrift::type_class::set<::apache::thrift::type_class::set<::apache::thrift::type_class::integral>>>, ::std::set<::std::set<::std::set<bool>>>>::readWithContext(*iprot, this->__fbthrift_field_fieldL, _readState);
397 _readState.afterSubobject(iprot);
398
399 }
400 this->__isset.set(11, true);
401
402 if (UNLIKELY(!_readState.advanceToNextField(
403 iprot,
404 12,
405 13,
406 apache::thrift::protocol::T_MAP))) {
407 goto _loop;
408 }
409 _readField_fieldM:
410 {
411 _readState.beforeSubobject(iprot);
412 this->__fbthrift_field_fieldM = ::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>();
413 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::set<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, ::apache::thrift::type_class::map<::apache::thrift::type_class::list<::apache::thrift::type_class::set<::apache::thrift::type_class::string>>, ::apache::thrift::type_class::string>>, ::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>>::readWithContext(*iprot, this->__fbthrift_field_fieldM, _readState);
414 _readState.afterSubobject(iprot);
415
416 }
417 this->__isset.set(12, true);
418
419 if (UNLIKELY(!_readState.advanceToNextField(
420 iprot,
421 13,
422 14,
423 apache::thrift::protocol::T_LIST))) {
424 goto _loop;
425 }
426 _readField_fieldN:
427 {
428 _readState.beforeSubobject(iprot);
429 this->__fbthrift_field_fieldN = ::std::vector<::cpp2::IndirectionA>();
430 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::detail::indirection_tag<::apache::thrift::type_class::integral, ::apache::thrift::detail::apply_indirection_fn>>, ::std::vector<::cpp2::IndirectionA>>::readWithContext(*iprot, this->__fbthrift_field_fieldN, _readState);
431 _readState.afterSubobject(iprot);
432
433 }
434 this->__isset.set(13, true);
435
436 if (UNLIKELY(!_readState.advanceToNextField(
437 iprot,
438 14,
439 15,
440 apache::thrift::protocol::T_LIST))) {
441 goto _loop;
442 }
443 _readField_fieldO:
444 {
445 _readState.beforeSubobject(iprot);
446 this->__fbthrift_field_fieldO = ::std::vector<::cpp2::IndirectionB>();
447 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::detail::indirection_tag<::apache::thrift::type_class::floating_point, ::apache::thrift::detail::apply_indirection_fn>>, ::std::vector<::cpp2::IndirectionB>>::readWithContext(*iprot, this->__fbthrift_field_fieldO, _readState);
448 _readState.afterSubobject(iprot);
449
450 }
451 this->__isset.set(14, true);
452
453 if (UNLIKELY(!_readState.advanceToNextField(
454 iprot,
455 15,
456 16,
457 apache::thrift::protocol::T_LIST))) {
458 goto _loop;
459 }
460 _readField_fieldP:
461 {
462 _readState.beforeSubobject(iprot);
463 this->__fbthrift_field_fieldP = ::std::vector<::cpp2::IndirectionC>();
464 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::detail::indirection_tag<::apache::thrift::type_class::integral, ::apache::thrift::detail::apply_indirection_fn>>, ::std::vector<::cpp2::IndirectionC>>::readWithContext(*iprot, this->__fbthrift_field_fieldP, _readState);
465 _readState.afterSubobject(iprot);
466
467 }
468 this->__isset.set(15, true);
469
470 if (UNLIKELY(!_readState.advanceToNextField(
471 iprot,
472 16,
473 17,
474 apache::thrift::protocol::T_I32))) {
475 goto _loop;
476 }
477 _readField_fieldQ:
478 {
479 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::cpp2::MyEnumA>::readWithContext(*iprot, this->__fbthrift_field_fieldQ, _readState);
480
481 }
482 this->__isset.set(16, true);
483
484 if (UNLIKELY(!_readState.advanceToNextField(
485 iprot,
486 17,
487 18,
488 apache::thrift::protocol::T_MAP))) {
489 goto _loop;
490 }
491 _readField_fieldR:
492 {
493 _readState.beforeSubobject(iprot);
494 auto ptr = ::apache::thrift::detail::make_mutable_smart_ptr<::std::unique_ptr<::std::map<::std::string, bool>>>();
495 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>, ::std::map<::std::string, bool>>::readWithContext(*iprot, *ptr, _readState);
496 this->fieldR = std::move(ptr);
497 _readState.afterSubobject(iprot);
498
499 }
500
501 if (UNLIKELY(!_readState.advanceToNextField(
502 iprot,
503 18,
504 19,
505 apache::thrift::protocol::T_STRUCT))) {
506 goto _loop;
507 }
508 _readField_fieldS:
509 {
510 _readState.beforeSubobject(iprot);
511 auto ptr = ::apache::thrift::detail::make_mutable_smart_ptr<::std::unique_ptr<::cpp2::SmallStruct>>();
512 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::readWithContext(*iprot, *ptr, _readState);
513 this->fieldS = std::move(ptr);
514 _readState.afterSubobject(iprot);
515
516 }
517
518 if (UNLIKELY(!_readState.advanceToNextField(
519 iprot,
520 19,
521 20,
522 apache::thrift::protocol::T_STRUCT))) {
523 goto _loop;
524 }
525 _readField_fieldT:
526 {
527 _readState.beforeSubobject(iprot);
528 auto ptr = ::apache::thrift::detail::make_mutable_smart_ptr<::std::shared_ptr<::cpp2::SmallStruct>>();
529 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::readWithContext(*iprot, *ptr, _readState);
530 this->fieldT = std::move(ptr);
531 _readState.afterSubobject(iprot);
532
533 }
534
535 if (UNLIKELY(!_readState.advanceToNextField(
536 iprot,
537 20,
538 21,
539 apache::thrift::protocol::T_STRUCT))) {
540 goto _loop;
541 }
542 _readField_fieldU:
543 {
544 _readState.beforeSubobject(iprot);
545 auto ptr = ::apache::thrift::detail::make_mutable_smart_ptr<::std::shared_ptr<const ::cpp2::SmallStruct>>();
546 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::readWithContext(*iprot, *ptr, _readState);
547 this->fieldU = std::move(ptr);
548 _readState.afterSubobject(iprot);
549
550 }
551
552 if (UNLIKELY(!_readState.advanceToNextField(
553 iprot,
554 21,
555 23,
556 apache::thrift::protocol::T_STRUCT))) {
557 goto _loop;
558 }
559 _readField_fieldX:
560 {
561 _readState.beforeSubobject(iprot);
562 auto ptr = ::apache::thrift::detail::make_mutable_smart_ptr<::std::unique_ptr<::cpp2::SmallStruct>>();
563 ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::readWithContext(*iprot, *ptr, _readState);
564 this->fieldX = std::move(ptr);
565 _readState.afterSubobject(iprot);
566
567 }
568
569 if (UNLIKELY(!_readState.advanceToNextField(
570 iprot,
571 23,
572 0,
573 apache::thrift::protocol::T_STOP))) {
574 goto _loop;
575 }
576
577 _end:
578 _readState.readStructEnd(iprot);
579
580 return;
581
582 _loop:
583 _readState.afterAdvanceFailure(iprot);
584 if (_readState.atStop()) {
585 goto _end;
586 }
587 if (iprot->kUsesFieldNames()) {
588 _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<containerStruct>>();
589 }
590
591 switch (_readState.fieldId) {
592 case 1:
593 {
594 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_BOOL))) {
595 goto _readField_fieldA;
596 } else {
597 goto _skip;
598 }
599 }
600 case 2:
601 {
602 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_MAP))) {
603 goto _readField_fieldB;
604 } else {
605 goto _skip;
606 }
607 }
608 case 3:
609 {
610 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_SET))) {
611 goto _readField_fieldC;
612 } else {
613 goto _skip;
614 }
615 }
616 case 4:
617 {
618 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
619 goto _readField_fieldD;
620 } else {
621 goto _skip;
622 }
623 }
624 case 5:
625 {
626 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING))) {
627 goto _readField_fieldE;
628 } else {
629 goto _skip;
630 }
631 }
632 case 6:
633 {
634 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_LIST))) {
635 goto _readField_fieldF;
636 } else {
637 goto _skip;
638 }
639 }
640 case 7:
641 {
642 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_MAP))) {
643 goto _readField_fieldG;
644 } else {
645 goto _skip;
646 }
647 }
648 case 8:
649 {
650 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_LIST))) {
651 goto _readField_fieldH;
652 } else {
653 goto _skip;
654 }
655 }
656 case 9:
657 {
658 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_BOOL))) {
659 goto _readField_fieldI;
660 } else {
661 goto _skip;
662 }
663 }
664 case 10:
665 {
666 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_MAP))) {
667 goto _readField_fieldJ;
668 } else {
669 goto _skip;
670 }
671 }
672 case 11:
673 {
674 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_LIST))) {
675 goto _readField_fieldK;
676 } else {
677 goto _skip;
678 }
679 }
680 case 12:
681 {
682 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_SET))) {
683 goto _readField_fieldL;
684 } else {
685 goto _skip;
686 }
687 }
688 case 13:
689 {
690 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_MAP))) {
691 goto _readField_fieldM;
692 } else {
693 goto _skip;
694 }
695 }
696 case 14:
697 {
698 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_LIST))) {
699 goto _readField_fieldN;
700 } else {
701 goto _skip;
702 }
703 }
704 case 15:
705 {
706 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_LIST))) {
707 goto _readField_fieldO;
708 } else {
709 goto _skip;
710 }
711 }
712 case 16:
713 {
714 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_LIST))) {
715 goto _readField_fieldP;
716 } else {
717 goto _skip;
718 }
719 }
720 case 17:
721 {
722 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_I32))) {
723 goto _readField_fieldQ;
724 } else {
725 goto _skip;
726 }
727 }
728 case 18:
729 {
730 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_MAP))) {
731 goto _readField_fieldR;
732 } else {
733 goto _skip;
734 }
735 }
736 case 19:
737 {
738 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
739 goto _readField_fieldS;
740 } else {
741 goto _skip;
742 }
743 }
744 case 20:
745 {
746 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
747 goto _readField_fieldT;
748 } else {
749 goto _skip;
750 }
751 }
752 case 21:
753 {
754 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
755 goto _readField_fieldU;
756 } else {
757 goto _skip;
758 }
759 }
760 case 23:
761 {
762 if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
763 goto _readField_fieldX;
764 } else {
765 goto _skip;
766 }
767 }
768 default:
769 {
770 _skip:
771 _readState.skip(iprot);
772 _readState.readFieldEnd(iprot);
773 _readState.readFieldBeginNoInline(iprot);
774 goto _loop;
775 }
776 }
777 }
778
779 template <class Protocol_>
serializedSize(Protocol_ const * prot_) const780 uint32_t containerStruct::serializedSize(Protocol_ const* prot_) const {
781 uint32_t xfer = 0;
782 xfer += prot_->serializedStructSize("containerStruct");
783 {
784 xfer += prot_->serializedFieldSize("fieldA", apache::thrift::protocol::T_BOOL, 1);
785 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldA);
786 }
787 {
788 xfer += prot_->serializedFieldSize("fieldB", apache::thrift::protocol::T_MAP, 2);
789 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>, ::std::map<::std::string, bool>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldB);
790 }
791 {
792 xfer += prot_->serializedFieldSize("fieldC", apache::thrift::protocol::T_SET, 3);
793 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::set<::apache::thrift::type_class::integral>, ::std::set<::std::int32_t>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldC);
794 }
795 {
796 xfer += prot_->serializedFieldSize("fieldD", apache::thrift::protocol::T_STRING, 4);
797 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldD);
798 }
799 {
800 xfer += prot_->serializedFieldSize("fieldE", apache::thrift::protocol::T_STRING, 5);
801 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldE);
802 }
803 {
804 xfer += prot_->serializedFieldSize("fieldF", apache::thrift::protocol::T_LIST, 6);
805 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>>, ::std::vector<::std::vector<::std::vector<::std::int32_t>>>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldF);
806 }
807 {
808 xfer += prot_->serializedFieldSize("fieldG", apache::thrift::protocol::T_MAP, 7);
809 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>>>, ::std::map<::std::string, ::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldG);
810 }
811 {
812 xfer += prot_->serializedFieldSize("fieldH", apache::thrift::protocol::T_LIST, 8);
813 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::set<::apache::thrift::type_class::integral>>, ::std::vector<::std::set<::std::int32_t>>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldH);
814 }
815 {
816 xfer += prot_->serializedFieldSize("fieldI", apache::thrift::protocol::T_BOOL, 9);
817 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldI);
818 }
819 {
820 xfer += prot_->serializedFieldSize("fieldJ", apache::thrift::protocol::T_MAP, 10);
821 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, ::std::map<::std::string, ::std::vector<::std::int32_t>>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldJ);
822 }
823 {
824 xfer += prot_->serializedFieldSize("fieldK", apache::thrift::protocol::T_LIST, 11);
825 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>>>, ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldK);
826 }
827 {
828 xfer += prot_->serializedFieldSize("fieldL", apache::thrift::protocol::T_SET, 12);
829 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::set<::apache::thrift::type_class::set<::apache::thrift::type_class::set<::apache::thrift::type_class::integral>>>, ::std::set<::std::set<::std::set<bool>>>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldL);
830 }
831 {
832 xfer += prot_->serializedFieldSize("fieldM", apache::thrift::protocol::T_MAP, 13);
833 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::set<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, ::apache::thrift::type_class::map<::apache::thrift::type_class::list<::apache::thrift::type_class::set<::apache::thrift::type_class::string>>, ::apache::thrift::type_class::string>>, ::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldM);
834 }
835 {
836 xfer += prot_->serializedFieldSize("fieldN", apache::thrift::protocol::T_LIST, 14);
837 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::detail::indirection_tag<::apache::thrift::type_class::integral, ::apache::thrift::detail::apply_indirection_fn>>, ::std::vector<::cpp2::IndirectionA>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldN);
838 }
839 {
840 xfer += prot_->serializedFieldSize("fieldO", apache::thrift::protocol::T_LIST, 15);
841 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::detail::indirection_tag<::apache::thrift::type_class::floating_point, ::apache::thrift::detail::apply_indirection_fn>>, ::std::vector<::cpp2::IndirectionB>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldO);
842 }
843 {
844 xfer += prot_->serializedFieldSize("fieldP", apache::thrift::protocol::T_LIST, 16);
845 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::detail::indirection_tag<::apache::thrift::type_class::integral, ::apache::thrift::detail::apply_indirection_fn>>, ::std::vector<::cpp2::IndirectionC>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldP);
846 }
847 {
848 xfer += prot_->serializedFieldSize("fieldQ", apache::thrift::protocol::T_I32, 17);
849 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::cpp2::MyEnumA>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldQ);
850 }
851 {
852 xfer += prot_->serializedFieldSize("fieldR", apache::thrift::protocol::T_MAP, 18);
853 if (this->fieldR) {
854 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>, ::std::map<::std::string, bool>>::serializedSize<false>(*prot_, *this->fieldR);
855 } else {
856 xfer += prot_->serializedSizeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_BOOL, 0);
857 xfer += prot_->serializedSizeMapEnd();
858 }
859 }
860 {
861 xfer += prot_->serializedFieldSize("fieldS", apache::thrift::protocol::T_STRUCT, 19);
862 if (this->fieldS) {
863 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::serializedSize<false>(*prot_, *this->fieldS);
864 } else {
865 xfer += prot_->serializedStructSize("SmallStruct");
866 xfer += prot_->serializedSizeStop();
867 }
868 }
869 {
870 xfer += prot_->serializedFieldSize("fieldT", apache::thrift::protocol::T_STRUCT, 20);
871 if (this->fieldT) {
872 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::serializedSize<false>(*prot_, *this->fieldT);
873 } else {
874 xfer += prot_->serializedStructSize("SmallStruct");
875 xfer += prot_->serializedSizeStop();
876 }
877 }
878 {
879 xfer += prot_->serializedFieldSize("fieldU", apache::thrift::protocol::T_STRUCT, 21);
880 if (this->fieldU) {
881 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::serializedSize<false>(*prot_, *this->fieldU);
882 } else {
883 xfer += prot_->serializedStructSize("SmallStruct");
884 xfer += prot_->serializedSizeStop();
885 }
886 }
887 {
888 xfer += prot_->serializedFieldSize("fieldX", apache::thrift::protocol::T_STRUCT, 23);
889 if (this->fieldX) {
890 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::serializedSize<false>(*prot_, *this->fieldX);
891 } else {
892 xfer += prot_->serializedStructSize("SmallStruct");
893 xfer += prot_->serializedSizeStop();
894 }
895 }
896 xfer += prot_->serializedSizeStop();
897 return xfer;
898 }
899
900 template <class Protocol_>
serializedSizeZC(Protocol_ const * prot_) const901 uint32_t containerStruct::serializedSizeZC(Protocol_ const* prot_) const {
902 uint32_t xfer = 0;
903 xfer += prot_->serializedStructSize("containerStruct");
904 {
905 xfer += prot_->serializedFieldSize("fieldA", apache::thrift::protocol::T_BOOL, 1);
906 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldA);
907 }
908 {
909 xfer += prot_->serializedFieldSize("fieldB", apache::thrift::protocol::T_MAP, 2);
910 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>, ::std::map<::std::string, bool>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldB);
911 }
912 {
913 xfer += prot_->serializedFieldSize("fieldC", apache::thrift::protocol::T_SET, 3);
914 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::set<::apache::thrift::type_class::integral>, ::std::set<::std::int32_t>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldC);
915 }
916 {
917 xfer += prot_->serializedFieldSize("fieldD", apache::thrift::protocol::T_STRING, 4);
918 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldD);
919 }
920 {
921 xfer += prot_->serializedFieldSize("fieldE", apache::thrift::protocol::T_STRING, 5);
922 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldE);
923 }
924 {
925 xfer += prot_->serializedFieldSize("fieldF", apache::thrift::protocol::T_LIST, 6);
926 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>>, ::std::vector<::std::vector<::std::vector<::std::int32_t>>>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldF);
927 }
928 {
929 xfer += prot_->serializedFieldSize("fieldG", apache::thrift::protocol::T_MAP, 7);
930 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>>>, ::std::map<::std::string, ::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldG);
931 }
932 {
933 xfer += prot_->serializedFieldSize("fieldH", apache::thrift::protocol::T_LIST, 8);
934 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::set<::apache::thrift::type_class::integral>>, ::std::vector<::std::set<::std::int32_t>>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldH);
935 }
936 {
937 xfer += prot_->serializedFieldSize("fieldI", apache::thrift::protocol::T_BOOL, 9);
938 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldI);
939 }
940 {
941 xfer += prot_->serializedFieldSize("fieldJ", apache::thrift::protocol::T_MAP, 10);
942 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, ::std::map<::std::string, ::std::vector<::std::int32_t>>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldJ);
943 }
944 {
945 xfer += prot_->serializedFieldSize("fieldK", apache::thrift::protocol::T_LIST, 11);
946 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>>>, ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldK);
947 }
948 {
949 xfer += prot_->serializedFieldSize("fieldL", apache::thrift::protocol::T_SET, 12);
950 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::set<::apache::thrift::type_class::set<::apache::thrift::type_class::set<::apache::thrift::type_class::integral>>>, ::std::set<::std::set<::std::set<bool>>>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldL);
951 }
952 {
953 xfer += prot_->serializedFieldSize("fieldM", apache::thrift::protocol::T_MAP, 13);
954 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::set<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, ::apache::thrift::type_class::map<::apache::thrift::type_class::list<::apache::thrift::type_class::set<::apache::thrift::type_class::string>>, ::apache::thrift::type_class::string>>, ::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldM);
955 }
956 {
957 xfer += prot_->serializedFieldSize("fieldN", apache::thrift::protocol::T_LIST, 14);
958 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::detail::indirection_tag<::apache::thrift::type_class::integral, ::apache::thrift::detail::apply_indirection_fn>>, ::std::vector<::cpp2::IndirectionA>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldN);
959 }
960 {
961 xfer += prot_->serializedFieldSize("fieldO", apache::thrift::protocol::T_LIST, 15);
962 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::detail::indirection_tag<::apache::thrift::type_class::floating_point, ::apache::thrift::detail::apply_indirection_fn>>, ::std::vector<::cpp2::IndirectionB>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldO);
963 }
964 {
965 xfer += prot_->serializedFieldSize("fieldP", apache::thrift::protocol::T_LIST, 16);
966 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::detail::indirection_tag<::apache::thrift::type_class::integral, ::apache::thrift::detail::apply_indirection_fn>>, ::std::vector<::cpp2::IndirectionC>>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldP);
967 }
968 {
969 xfer += prot_->serializedFieldSize("fieldQ", apache::thrift::protocol::T_I32, 17);
970 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::cpp2::MyEnumA>::serializedSize<false>(*prot_, this->__fbthrift_field_fieldQ);
971 }
972 {
973 xfer += prot_->serializedFieldSize("fieldR", apache::thrift::protocol::T_MAP, 18);
974 if (this->fieldR) {
975 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>, ::std::map<::std::string, bool>>::serializedSize<false>(*prot_, *this->fieldR);
976 } else {
977 xfer += prot_->serializedSizeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_BOOL, 0);
978 xfer += prot_->serializedSizeMapEnd();
979 }
980 }
981 {
982 xfer += prot_->serializedFieldSize("fieldS", apache::thrift::protocol::T_STRUCT, 19);
983 if (this->fieldS) {
984 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::serializedSize<true>(*prot_, *this->fieldS);
985 } else {
986 xfer += prot_->serializedStructSize("SmallStruct");
987 xfer += prot_->serializedSizeStop();
988 }
989 }
990 {
991 xfer += prot_->serializedFieldSize("fieldT", apache::thrift::protocol::T_STRUCT, 20);
992 if (this->fieldT) {
993 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::serializedSize<true>(*prot_, *this->fieldT);
994 } else {
995 xfer += prot_->serializedStructSize("SmallStruct");
996 xfer += prot_->serializedSizeStop();
997 }
998 }
999 {
1000 xfer += prot_->serializedFieldSize("fieldU", apache::thrift::protocol::T_STRUCT, 21);
1001 if (this->fieldU) {
1002 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::serializedSize<true>(*prot_, *this->fieldU);
1003 } else {
1004 xfer += prot_->serializedStructSize("SmallStruct");
1005 xfer += prot_->serializedSizeStop();
1006 }
1007 }
1008 {
1009 xfer += prot_->serializedFieldSize("fieldX", apache::thrift::protocol::T_STRUCT, 23);
1010 if (this->fieldX) {
1011 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::serializedSize<true>(*prot_, *this->fieldX);
1012 } else {
1013 xfer += prot_->serializedStructSize("SmallStruct");
1014 xfer += prot_->serializedSizeStop();
1015 }
1016 }
1017 xfer += prot_->serializedSizeStop();
1018 return xfer;
1019 }
1020
1021 template <class Protocol_>
write(Protocol_ * prot_) const1022 uint32_t containerStruct::write(Protocol_* prot_) const {
1023 uint32_t xfer = 0;
1024 xfer += prot_->writeStructBegin("containerStruct");
1025 bool previousFieldHasValue = true;
1026 {
1027 constexpr int16_t kPrevFieldId = 0;
1028 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_BOOL, 1, kPrevFieldId>(*prot_, "fieldA", previousFieldHasValue);
1029 previousFieldHasValue = true;
1030 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::write(*prot_, this->__fbthrift_field_fieldA);
1031 xfer += prot_->writeFieldEnd();
1032 }
1033 {
1034 constexpr int16_t kPrevFieldId = 1;
1035 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_MAP, 2, kPrevFieldId>(*prot_, "fieldB", previousFieldHasValue);
1036 previousFieldHasValue = true;
1037 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>, ::std::map<::std::string, bool>>::write(*prot_, this->__fbthrift_field_fieldB);
1038 xfer += prot_->writeFieldEnd();
1039 }
1040 {
1041 constexpr int16_t kPrevFieldId = 2;
1042 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_SET, 3, kPrevFieldId>(*prot_, "fieldC", previousFieldHasValue);
1043 previousFieldHasValue = true;
1044 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::set<::apache::thrift::type_class::integral>, ::std::set<::std::int32_t>>::write(*prot_, this->__fbthrift_field_fieldC);
1045 xfer += prot_->writeFieldEnd();
1046 }
1047 {
1048 constexpr int16_t kPrevFieldId = 3;
1049 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 4, kPrevFieldId>(*prot_, "fieldD", previousFieldHasValue);
1050 previousFieldHasValue = true;
1051 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_fieldD);
1052 xfer += prot_->writeFieldEnd();
1053 }
1054 {
1055 constexpr int16_t kPrevFieldId = 4;
1056 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 5, kPrevFieldId>(*prot_, "fieldE", previousFieldHasValue);
1057 previousFieldHasValue = true;
1058 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::std::string>::write(*prot_, this->__fbthrift_field_fieldE);
1059 xfer += prot_->writeFieldEnd();
1060 }
1061 {
1062 constexpr int16_t kPrevFieldId = 5;
1063 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_LIST, 6, kPrevFieldId>(*prot_, "fieldF", previousFieldHasValue);
1064 previousFieldHasValue = true;
1065 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>>, ::std::vector<::std::vector<::std::vector<::std::int32_t>>>>::write(*prot_, this->__fbthrift_field_fieldF);
1066 xfer += prot_->writeFieldEnd();
1067 }
1068 {
1069 constexpr int16_t kPrevFieldId = 6;
1070 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_MAP, 7, kPrevFieldId>(*prot_, "fieldG", previousFieldHasValue);
1071 previousFieldHasValue = true;
1072 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>>>, ::std::map<::std::string, ::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>>>::write(*prot_, this->__fbthrift_field_fieldG);
1073 xfer += prot_->writeFieldEnd();
1074 }
1075 {
1076 constexpr int16_t kPrevFieldId = 7;
1077 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_LIST, 8, kPrevFieldId>(*prot_, "fieldH", previousFieldHasValue);
1078 previousFieldHasValue = true;
1079 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::set<::apache::thrift::type_class::integral>>, ::std::vector<::std::set<::std::int32_t>>>::write(*prot_, this->__fbthrift_field_fieldH);
1080 xfer += prot_->writeFieldEnd();
1081 }
1082 {
1083 constexpr int16_t kPrevFieldId = 8;
1084 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_BOOL, 9, kPrevFieldId>(*prot_, "fieldI", previousFieldHasValue);
1085 previousFieldHasValue = true;
1086 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::integral, bool>::write(*prot_, this->__fbthrift_field_fieldI);
1087 xfer += prot_->writeFieldEnd();
1088 }
1089 {
1090 constexpr int16_t kPrevFieldId = 9;
1091 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_MAP, 10, kPrevFieldId>(*prot_, "fieldJ", previousFieldHasValue);
1092 previousFieldHasValue = true;
1093 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, ::std::map<::std::string, ::std::vector<::std::int32_t>>>::write(*prot_, this->__fbthrift_field_fieldJ);
1094 xfer += prot_->writeFieldEnd();
1095 }
1096 {
1097 constexpr int16_t kPrevFieldId = 10;
1098 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_LIST, 11, kPrevFieldId>(*prot_, "fieldK", previousFieldHasValue);
1099 previousFieldHasValue = true;
1100 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>>>, ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>>::write(*prot_, this->__fbthrift_field_fieldK);
1101 xfer += prot_->writeFieldEnd();
1102 }
1103 {
1104 constexpr int16_t kPrevFieldId = 11;
1105 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_SET, 12, kPrevFieldId>(*prot_, "fieldL", previousFieldHasValue);
1106 previousFieldHasValue = true;
1107 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::set<::apache::thrift::type_class::set<::apache::thrift::type_class::set<::apache::thrift::type_class::integral>>>, ::std::set<::std::set<::std::set<bool>>>>::write(*prot_, this->__fbthrift_field_fieldL);
1108 xfer += prot_->writeFieldEnd();
1109 }
1110 {
1111 constexpr int16_t kPrevFieldId = 12;
1112 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_MAP, 13, kPrevFieldId>(*prot_, "fieldM", previousFieldHasValue);
1113 previousFieldHasValue = true;
1114 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::set<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, ::apache::thrift::type_class::map<::apache::thrift::type_class::list<::apache::thrift::type_class::set<::apache::thrift::type_class::string>>, ::apache::thrift::type_class::string>>, ::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>>::write(*prot_, this->__fbthrift_field_fieldM);
1115 xfer += prot_->writeFieldEnd();
1116 }
1117 {
1118 constexpr int16_t kPrevFieldId = 13;
1119 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_LIST, 14, kPrevFieldId>(*prot_, "fieldN", previousFieldHasValue);
1120 previousFieldHasValue = true;
1121 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::detail::indirection_tag<::apache::thrift::type_class::integral, ::apache::thrift::detail::apply_indirection_fn>>, ::std::vector<::cpp2::IndirectionA>>::write(*prot_, this->__fbthrift_field_fieldN);
1122 xfer += prot_->writeFieldEnd();
1123 }
1124 {
1125 constexpr int16_t kPrevFieldId = 14;
1126 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_LIST, 15, kPrevFieldId>(*prot_, "fieldO", previousFieldHasValue);
1127 previousFieldHasValue = true;
1128 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::detail::indirection_tag<::apache::thrift::type_class::floating_point, ::apache::thrift::detail::apply_indirection_fn>>, ::std::vector<::cpp2::IndirectionB>>::write(*prot_, this->__fbthrift_field_fieldO);
1129 xfer += prot_->writeFieldEnd();
1130 }
1131 {
1132 constexpr int16_t kPrevFieldId = 15;
1133 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_LIST, 16, kPrevFieldId>(*prot_, "fieldP", previousFieldHasValue);
1134 previousFieldHasValue = true;
1135 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::list<::apache::thrift::detail::indirection_tag<::apache::thrift::type_class::integral, ::apache::thrift::detail::apply_indirection_fn>>, ::std::vector<::cpp2::IndirectionC>>::write(*prot_, this->__fbthrift_field_fieldP);
1136 xfer += prot_->writeFieldEnd();
1137 }
1138 {
1139 constexpr int16_t kPrevFieldId = 16;
1140 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_I32, 17, kPrevFieldId>(*prot_, "fieldQ", previousFieldHasValue);
1141 previousFieldHasValue = true;
1142 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::enumeration, ::cpp2::MyEnumA>::write(*prot_, this->__fbthrift_field_fieldQ);
1143 xfer += prot_->writeFieldEnd();
1144 }
1145 {
1146 constexpr int16_t kPrevFieldId = 17;
1147 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_MAP, 18, kPrevFieldId>(*prot_, "fieldR", previousFieldHasValue);
1148 previousFieldHasValue = true;
1149 if (this->fieldR) {
1150 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>, ::std::map<::std::string, bool>>::write(*prot_, *this->fieldR);
1151 } else {
1152 xfer += prot_->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_BOOL, 0);
1153 xfer += prot_->writeMapEnd();
1154 }
1155 xfer += prot_->writeFieldEnd();
1156 }
1157 {
1158 constexpr int16_t kPrevFieldId = 18;
1159 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 19, kPrevFieldId>(*prot_, "fieldS", previousFieldHasValue);
1160 previousFieldHasValue = true;
1161 if (this->fieldS) {
1162 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::write(*prot_, *this->fieldS);
1163 } else {
1164 xfer += prot_->writeStructBegin("SmallStruct");
1165 xfer += prot_->writeStructEnd();
1166 xfer += prot_->writeFieldStop();
1167 }
1168 xfer += prot_->writeFieldEnd();
1169 }
1170 {
1171 constexpr int16_t kPrevFieldId = 19;
1172 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 20, kPrevFieldId>(*prot_, "fieldT", previousFieldHasValue);
1173 previousFieldHasValue = true;
1174 if (this->fieldT) {
1175 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::write(*prot_, *this->fieldT);
1176 } else {
1177 xfer += prot_->writeStructBegin("SmallStruct");
1178 xfer += prot_->writeStructEnd();
1179 xfer += prot_->writeFieldStop();
1180 }
1181 xfer += prot_->writeFieldEnd();
1182 }
1183 {
1184 constexpr int16_t kPrevFieldId = 20;
1185 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 21, kPrevFieldId>(*prot_, "fieldU", previousFieldHasValue);
1186 previousFieldHasValue = true;
1187 if (this->fieldU) {
1188 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::write(*prot_, *this->fieldU);
1189 } else {
1190 xfer += prot_->writeStructBegin("SmallStruct");
1191 xfer += prot_->writeStructEnd();
1192 xfer += prot_->writeFieldStop();
1193 }
1194 xfer += prot_->writeFieldEnd();
1195 }
1196 {
1197 constexpr int16_t kPrevFieldId = 21;
1198 xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 23, kPrevFieldId>(*prot_, "fieldX", previousFieldHasValue);
1199 previousFieldHasValue = true;
1200 if (this->fieldX) {
1201 xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::cpp2::SmallStruct>::write(*prot_, *this->fieldX);
1202 } else {
1203 xfer += prot_->writeStructBegin("SmallStruct");
1204 xfer += prot_->writeStructEnd();
1205 xfer += prot_->writeFieldStop();
1206 }
1207 xfer += prot_->writeFieldEnd();
1208 }
1209 xfer += prot_->writeFieldStop();
1210 xfer += prot_->writeStructEnd();
1211 return xfer;
1212 }
1213
1214 extern template void containerStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
1215 extern template uint32_t containerStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
1216 extern template uint32_t containerStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
1217 extern template uint32_t containerStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
1218 extern template void containerStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
1219 extern template uint32_t containerStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
1220 extern template uint32_t containerStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
1221 extern template uint32_t containerStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
1222
1223 } // cpp2
1224