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 #include "thrift/compiler/test/fixtures/types/gen-cpp2/module_types.h"
8 #include "thrift/compiler/test/fixtures/types/gen-cpp2/module_types.tcc"
9
10 #include <thrift/lib/cpp2/gen/module_types_cpp.h>
11
12 #include "thrift/compiler/test/fixtures/types/gen-cpp2/module_data.h"
13
14
15 namespace apache { namespace thrift {
16
17 constexpr std::size_t const TEnumTraits<::apache::thrift::fixtures::types::has_bitwise_ops>::size;
18 folly::Range<::apache::thrift::fixtures::types::has_bitwise_ops const*> const TEnumTraits<::apache::thrift::fixtures::types::has_bitwise_ops>::values = folly::range(TEnumDataStorage<::apache::thrift::fixtures::types::has_bitwise_ops>::values);
19 folly::Range<folly::StringPiece const*> const TEnumTraits<::apache::thrift::fixtures::types::has_bitwise_ops>::names = folly::range(TEnumDataStorage<::apache::thrift::fixtures::types::has_bitwise_ops>::names);
20
findName(type value)21 char const* TEnumTraits<::apache::thrift::fixtures::types::has_bitwise_ops>::findName(type value) {
22 using factory = ::apache::thrift::fixtures::types::_has_bitwise_ops_EnumMapFactory;
23 static folly::Indestructible<factory::ValuesToNamesMapType> const map{
24 factory::makeValuesToNamesMap()};
25 auto found = map->find(value);
26 return found == map->end() ? nullptr : found->second;
27 }
28
findValue(char const * name,type * out)29 bool TEnumTraits<::apache::thrift::fixtures::types::has_bitwise_ops>::findValue(char const* name, type* out) {
30 using factory = ::apache::thrift::fixtures::types::_has_bitwise_ops_EnumMapFactory;
31 static folly::Indestructible<factory::NamesToValuesMapType> const map{
32 factory::makeNamesToValuesMap()};
33 auto found = map->find(name);
34 return found == map->end() ? false : (*out = found->second, true);
35 }
36
37 }} // apache::thrift
38
39 namespace apache { namespace thrift { namespace fixtures { namespace types {
40 FOLLY_PUSH_WARNING
41 FOLLY_GNU_DISABLE_WARNING("-Wdeprecated-declarations")
42 const _has_bitwise_ops_EnumMapFactory::ValuesToNamesMapType _has_bitwise_ops_VALUES_TO_NAMES = _has_bitwise_ops_EnumMapFactory::makeValuesToNamesMap();
43 const _has_bitwise_ops_EnumMapFactory::NamesToValuesMapType _has_bitwise_ops_NAMES_TO_VALUES = _has_bitwise_ops_EnumMapFactory::makeNamesToValuesMap();
44 FOLLY_POP_WARNING
45
46 }}}} // apache::thrift::fixtures::types
47
48 namespace apache { namespace thrift {
49
50 constexpr std::size_t const TEnumTraits<::apache::thrift::fixtures::types::is_unscoped>::size;
51 folly::Range<::apache::thrift::fixtures::types::is_unscoped const*> const TEnumTraits<::apache::thrift::fixtures::types::is_unscoped>::values = folly::range(TEnumDataStorage<::apache::thrift::fixtures::types::is_unscoped>::values);
52 folly::Range<folly::StringPiece const*> const TEnumTraits<::apache::thrift::fixtures::types::is_unscoped>::names = folly::range(TEnumDataStorage<::apache::thrift::fixtures::types::is_unscoped>::names);
53
findName(type value)54 char const* TEnumTraits<::apache::thrift::fixtures::types::is_unscoped>::findName(type value) {
55 using factory = ::apache::thrift::fixtures::types::_is_unscoped_EnumMapFactory;
56 static folly::Indestructible<factory::ValuesToNamesMapType> const map{
57 factory::makeValuesToNamesMap()};
58 auto found = map->find(value);
59 return found == map->end() ? nullptr : found->second;
60 }
61
findValue(char const * name,type * out)62 bool TEnumTraits<::apache::thrift::fixtures::types::is_unscoped>::findValue(char const* name, type* out) {
63 using factory = ::apache::thrift::fixtures::types::_is_unscoped_EnumMapFactory;
64 static folly::Indestructible<factory::NamesToValuesMapType> const map{
65 factory::makeNamesToValuesMap()};
66 auto found = map->find(name);
67 return found == map->end() ? false : (*out = found->second, true);
68 }
69
70 }} // apache::thrift
71
72 namespace apache { namespace thrift { namespace fixtures { namespace types {
73 FOLLY_PUSH_WARNING
74 FOLLY_GNU_DISABLE_WARNING("-Wdeprecated-declarations")
75 const _is_unscoped_EnumMapFactory::ValuesToNamesMapType _is_unscoped_VALUES_TO_NAMES = _is_unscoped_EnumMapFactory::makeValuesToNamesMap();
76 const _is_unscoped_EnumMapFactory::NamesToValuesMapType _is_unscoped_NAMES_TO_VALUES = _is_unscoped_EnumMapFactory::makeNamesToValuesMap();
77 FOLLY_POP_WARNING
78
79 }}}} // apache::thrift::fixtures::types
80
81 namespace apache { namespace thrift {
82
83 constexpr std::size_t const TEnumTraits<::apache::thrift::fixtures::types::MyForwardRefEnum>::size;
84 folly::Range<::apache::thrift::fixtures::types::MyForwardRefEnum const*> const TEnumTraits<::apache::thrift::fixtures::types::MyForwardRefEnum>::values = folly::range(TEnumDataStorage<::apache::thrift::fixtures::types::MyForwardRefEnum>::values);
85 folly::Range<folly::StringPiece const*> const TEnumTraits<::apache::thrift::fixtures::types::MyForwardRefEnum>::names = folly::range(TEnumDataStorage<::apache::thrift::fixtures::types::MyForwardRefEnum>::names);
86
findName(type value)87 char const* TEnumTraits<::apache::thrift::fixtures::types::MyForwardRefEnum>::findName(type value) {
88 using factory = ::apache::thrift::fixtures::types::_MyForwardRefEnum_EnumMapFactory;
89 static folly::Indestructible<factory::ValuesToNamesMapType> const map{
90 factory::makeValuesToNamesMap()};
91 auto found = map->find(value);
92 return found == map->end() ? nullptr : found->second;
93 }
94
findValue(char const * name,type * out)95 bool TEnumTraits<::apache::thrift::fixtures::types::MyForwardRefEnum>::findValue(char const* name, type* out) {
96 using factory = ::apache::thrift::fixtures::types::_MyForwardRefEnum_EnumMapFactory;
97 static folly::Indestructible<factory::NamesToValuesMapType> const map{
98 factory::makeNamesToValuesMap()};
99 auto found = map->find(name);
100 return found == map->end() ? false : (*out = found->second, true);
101 }
102
103 }} // apache::thrift
104
105 namespace apache { namespace thrift { namespace fixtures { namespace types {
106 FOLLY_PUSH_WARNING
107 FOLLY_GNU_DISABLE_WARNING("-Wdeprecated-declarations")
108 const _MyForwardRefEnum_EnumMapFactory::ValuesToNamesMapType _MyForwardRefEnum_VALUES_TO_NAMES = _MyForwardRefEnum_EnumMapFactory::makeValuesToNamesMap();
109 const _MyForwardRefEnum_EnumMapFactory::NamesToValuesMapType _MyForwardRefEnum_NAMES_TO_VALUES = _MyForwardRefEnum_EnumMapFactory::makeNamesToValuesMap();
110 FOLLY_POP_WARNING
111
112 }}}} // apache::thrift::fixtures::types
113
114 namespace apache { namespace thrift {
115
116 constexpr std::size_t const TEnumTraits<::apache::thrift::fixtures::types::MyEnumA>::size;
117 folly::Range<::apache::thrift::fixtures::types::MyEnumA const*> const TEnumTraits<::apache::thrift::fixtures::types::MyEnumA>::values = folly::range(TEnumDataStorage<::apache::thrift::fixtures::types::MyEnumA>::values);
118 folly::Range<folly::StringPiece const*> const TEnumTraits<::apache::thrift::fixtures::types::MyEnumA>::names = folly::range(TEnumDataStorage<::apache::thrift::fixtures::types::MyEnumA>::names);
119
findName(type value)120 char const* TEnumTraits<::apache::thrift::fixtures::types::MyEnumA>::findName(type value) {
121 using factory = ::apache::thrift::fixtures::types::_MyEnumA_EnumMapFactory;
122 static folly::Indestructible<factory::ValuesToNamesMapType> const map{
123 factory::makeValuesToNamesMap()};
124 auto found = map->find(value);
125 return found == map->end() ? nullptr : found->second;
126 }
127
findValue(char const * name,type * out)128 bool TEnumTraits<::apache::thrift::fixtures::types::MyEnumA>::findValue(char const* name, type* out) {
129 using factory = ::apache::thrift::fixtures::types::_MyEnumA_EnumMapFactory;
130 static folly::Indestructible<factory::NamesToValuesMapType> const map{
131 factory::makeNamesToValuesMap()};
132 auto found = map->find(name);
133 return found == map->end() ? false : (*out = found->second, true);
134 }
135
136 }} // apache::thrift
137
138 namespace apache { namespace thrift { namespace fixtures { namespace types {
139 FOLLY_PUSH_WARNING
140 FOLLY_GNU_DISABLE_WARNING("-Wdeprecated-declarations")
141 const _MyEnumA_EnumMapFactory::ValuesToNamesMapType _MyEnumA_VALUES_TO_NAMES = _MyEnumA_EnumMapFactory::makeValuesToNamesMap();
142 const _MyEnumA_EnumMapFactory::NamesToValuesMapType _MyEnumA_NAMES_TO_VALUES = _MyEnumA_EnumMapFactory::makeNamesToValuesMap();
143 FOLLY_POP_WARNING
144
145 }}}} // apache::thrift::fixtures::types
146
147 namespace apache {
148 namespace thrift {
149 namespace detail {
150
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)151 void TccStructTraits<::apache::thrift::fixtures::types::decorated_struct>::translateFieldName(
152 folly::StringPiece _fname,
153 int16_t& fid,
154 apache::thrift::protocol::TType& _ftype) noexcept {
155 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::decorated_struct>;
156 static const st::translate_field_name_table table{
157 data::fields_size,
158 data::fields_names.data(),
159 data::fields_ids.data(),
160 data::fields_types.data()};
161 st::translate_field_name(_fname, fid, _ftype, table);
162 }
163
164 } // namespace detail
165 } // namespace thrift
166 } // namespace apache
167
168 namespace apache { namespace thrift { namespace fixtures { namespace types {
169
170 decorated_struct::decorated_struct(const decorated_struct&) = default;
171 decorated_struct& decorated_struct::operator=(const decorated_struct&) = default;
decorated_struct(decorated_struct && other)172 decorated_struct::decorated_struct(decorated_struct&& other) noexcept :
173 __fbthrift_field_field(std::move(other.__fbthrift_field_field)),
174 __isset(other.__isset) {
175 }
176
operator =(FOLLY_MAYBE_UNUSED decorated_struct && other)177 decorated_struct& decorated_struct::operator=(FOLLY_MAYBE_UNUSED decorated_struct&& other) noexcept {
178 this->__fbthrift_field_field = std::move(other.__fbthrift_field_field);
179 __isset = other.__isset;
180 return *this;
181 }
182
183
decorated_struct(apache::thrift::FragileConstructor,::std::string field__arg)184 decorated_struct::decorated_struct(apache::thrift::FragileConstructor, ::std::string field__arg) :
185 __fbthrift_field_field(std::move(field__arg)) {
186 __isset.set(folly::index_constant<0>(), true);
187 }
188
189
__fbthrift_clear()190 void decorated_struct::__fbthrift_clear() {
191 // clear all fields
192 this->__fbthrift_field_field = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
193 __isset = {};
194 }
195
operator ==(const decorated_struct & rhs) const196 bool decorated_struct::operator==(const decorated_struct& rhs) const {
197 (void)rhs;
198 auto& lhs = *this;
199 (void)lhs;
200 if (!(lhs.field_ref() == rhs.field_ref())) {
201 return false;
202 }
203 return true;
204 }
205
operator <(const decorated_struct & rhs) const206 bool decorated_struct::operator<(const decorated_struct& rhs) const {
207 (void)rhs;
208 auto& lhs = *this;
209 (void)lhs;
210 if (!(lhs.field_ref() == rhs.field_ref())) {
211 return lhs.field_ref() < rhs.field_ref();
212 }
213 return false;
214 }
215
216
swap(decorated_struct & a,decorated_struct & b)217 void swap(decorated_struct& a, decorated_struct& b) {
218 using ::std::swap;
219 swap(a.field_ref().value(), b.field_ref().value());
220 swap(a.__isset, b.__isset);
221 }
222
223 template void decorated_struct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
224 template uint32_t decorated_struct::write<>(apache::thrift::BinaryProtocolWriter*) const;
225 template uint32_t decorated_struct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
226 template uint32_t decorated_struct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
227 template void decorated_struct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
228 template uint32_t decorated_struct::write<>(apache::thrift::CompactProtocolWriter*) const;
229 template uint32_t decorated_struct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
230 template uint32_t decorated_struct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
231
232
233
234 }}}} // apache::thrift::fixtures::types
235
236 namespace apache {
237 namespace thrift {
238 namespace detail {
239
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)240 void TccStructTraits<::apache::thrift::fixtures::types::ContainerStruct>::translateFieldName(
241 folly::StringPiece _fname,
242 int16_t& fid,
243 apache::thrift::protocol::TType& _ftype) noexcept {
244 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::ContainerStruct>;
245 static const st::translate_field_name_table table{
246 data::fields_size,
247 data::fields_names.data(),
248 data::fields_ids.data(),
249 data::fields_types.data()};
250 st::translate_field_name(_fname, fid, _ftype, table);
251 }
252
253 } // namespace detail
254 } // namespace thrift
255 } // namespace apache
256
257 namespace apache { namespace thrift { namespace fixtures { namespace types {
258
259 ContainerStruct::ContainerStruct(const ContainerStruct&) = default;
260 ContainerStruct& ContainerStruct::operator=(const ContainerStruct&) = default;
ContainerStruct()261 ContainerStruct::ContainerStruct() {
262 }
263
264
~ContainerStruct()265 ContainerStruct::~ContainerStruct() {}
266
ContainerStruct(ContainerStruct && other)267 ContainerStruct::ContainerStruct(ContainerStruct&& other) noexcept :
268 __fbthrift_field_fieldA(std::move(other.__fbthrift_field_fieldA)),
269 __fbthrift_field_fieldB(std::move(other.__fbthrift_field_fieldB)),
270 __fbthrift_field_fieldC(std::move(other.__fbthrift_field_fieldC)),
271 __fbthrift_field_fieldD(std::move(other.__fbthrift_field_fieldD)),
272 __fbthrift_field_fieldE(std::move(other.__fbthrift_field_fieldE)),
273 __fbthrift_field_fieldF(std::move(other.__fbthrift_field_fieldF)),
274 __fbthrift_field_fieldG(std::move(other.__fbthrift_field_fieldG)),
275 __fbthrift_field_fieldH(std::move(other.__fbthrift_field_fieldH)),
276 __isset(other.__isset) {
277 }
278
operator =(FOLLY_MAYBE_UNUSED ContainerStruct && other)279 ContainerStruct& ContainerStruct::operator=(FOLLY_MAYBE_UNUSED ContainerStruct&& other) noexcept {
280 this->__fbthrift_field_fieldA = std::move(other.__fbthrift_field_fieldA);
281 this->__fbthrift_field_fieldB = std::move(other.__fbthrift_field_fieldB);
282 this->__fbthrift_field_fieldC = std::move(other.__fbthrift_field_fieldC);
283 this->__fbthrift_field_fieldD = std::move(other.__fbthrift_field_fieldD);
284 this->__fbthrift_field_fieldE = std::move(other.__fbthrift_field_fieldE);
285 this->__fbthrift_field_fieldF = std::move(other.__fbthrift_field_fieldF);
286 this->__fbthrift_field_fieldG = std::move(other.__fbthrift_field_fieldG);
287 this->__fbthrift_field_fieldH = std::move(other.__fbthrift_field_fieldH);
288 __isset = other.__isset;
289 return *this;
290 }
291
292
ContainerStruct(apache::thrift::FragileConstructor,::std::vector<::std::int32_t> fieldA__arg,std::list<::std::int32_t> fieldB__arg,std::deque<::std::int32_t> fieldC__arg,folly::fbvector<::std::int32_t> fieldD__arg,folly::small_vector<::std::int32_t> fieldE__arg,folly::sorted_vector_set<::std::int32_t> fieldF__arg,folly::sorted_vector_map<::std::int32_t,::std::string> fieldG__arg,::apache::thrift::fixtures::types::SomeMap fieldH__arg)293 ContainerStruct::ContainerStruct(apache::thrift::FragileConstructor, ::std::vector<::std::int32_t> fieldA__arg, std::list<::std::int32_t> fieldB__arg, std::deque<::std::int32_t> fieldC__arg, folly::fbvector<::std::int32_t> fieldD__arg, folly::small_vector<::std::int32_t> fieldE__arg, folly::sorted_vector_set<::std::int32_t> fieldF__arg, folly::sorted_vector_map<::std::int32_t, ::std::string> fieldG__arg, ::apache::thrift::fixtures::types::SomeMap fieldH__arg) :
294 __fbthrift_field_fieldA(std::move(fieldA__arg)),
295 __fbthrift_field_fieldB(std::move(fieldB__arg)),
296 __fbthrift_field_fieldC(std::move(fieldC__arg)),
297 __fbthrift_field_fieldD(std::move(fieldD__arg)),
298 __fbthrift_field_fieldE(std::move(fieldE__arg)),
299 __fbthrift_field_fieldF(std::move(fieldF__arg)),
300 __fbthrift_field_fieldG(std::move(fieldG__arg)),
301 __fbthrift_field_fieldH(std::move(fieldH__arg)) {
302 __isset.set(folly::index_constant<0>(), true);
303 __isset.set(folly::index_constant<1>(), true);
304 __isset.set(folly::index_constant<2>(), true);
305 __isset.set(folly::index_constant<3>(), true);
306 __isset.set(folly::index_constant<4>(), true);
307 __isset.set(folly::index_constant<5>(), true);
308 __isset.set(folly::index_constant<6>(), true);
309 __isset.set(folly::index_constant<7>(), true);
310 }
311
312
__fbthrift_clear()313 void ContainerStruct::__fbthrift_clear() {
314 // clear all fields
315 this->__fbthrift_field_fieldA.clear();
316 this->__fbthrift_field_fieldB.clear();
317 this->__fbthrift_field_fieldC.clear();
318 this->__fbthrift_field_fieldD.clear();
319 this->__fbthrift_field_fieldE.clear();
320 this->__fbthrift_field_fieldF.clear();
321 this->__fbthrift_field_fieldG.clear();
322 this->__fbthrift_field_fieldH.clear();
323 __isset = {};
324 }
325
operator ==(const ContainerStruct & rhs) const326 bool ContainerStruct::operator==(const ContainerStruct& rhs) const {
327 (void)rhs;
328 auto& lhs = *this;
329 (void)lhs;
330 if (!(lhs.fieldA_ref() == rhs.fieldA_ref())) {
331 return false;
332 }
333 if (!(lhs.fieldB_ref() == rhs.fieldB_ref())) {
334 return false;
335 }
336 if (!(lhs.fieldC_ref() == rhs.fieldC_ref())) {
337 return false;
338 }
339 if (!(lhs.fieldD_ref() == rhs.fieldD_ref())) {
340 return false;
341 }
342 if (!(lhs.fieldE_ref() == rhs.fieldE_ref())) {
343 return false;
344 }
345 if (!(lhs.fieldF_ref() == rhs.fieldF_ref())) {
346 return false;
347 }
348 if (!(lhs.fieldG_ref() == rhs.fieldG_ref())) {
349 return false;
350 }
351 if (!(lhs.fieldH_ref() == rhs.fieldH_ref())) {
352 return false;
353 }
354 return true;
355 }
356
get_fieldA() const357 const ::std::vector<::std::int32_t>& ContainerStruct::get_fieldA() const& {
358 return __fbthrift_field_fieldA;
359 }
360
get_fieldA()361 ::std::vector<::std::int32_t> ContainerStruct::get_fieldA() && {
362 return std::move(__fbthrift_field_fieldA);
363 }
364
get_fieldB() const365 const std::list<::std::int32_t>& ContainerStruct::get_fieldB() const& {
366 return __fbthrift_field_fieldB;
367 }
368
get_fieldB()369 std::list<::std::int32_t> ContainerStruct::get_fieldB() && {
370 return std::move(__fbthrift_field_fieldB);
371 }
372
get_fieldC() const373 const std::deque<::std::int32_t>& ContainerStruct::get_fieldC() const& {
374 return __fbthrift_field_fieldC;
375 }
376
get_fieldC()377 std::deque<::std::int32_t> ContainerStruct::get_fieldC() && {
378 return std::move(__fbthrift_field_fieldC);
379 }
380
get_fieldD() const381 const folly::fbvector<::std::int32_t>& ContainerStruct::get_fieldD() const& {
382 return __fbthrift_field_fieldD;
383 }
384
get_fieldD()385 folly::fbvector<::std::int32_t> ContainerStruct::get_fieldD() && {
386 return std::move(__fbthrift_field_fieldD);
387 }
388
get_fieldE() const389 const folly::small_vector<::std::int32_t>& ContainerStruct::get_fieldE() const& {
390 return __fbthrift_field_fieldE;
391 }
392
get_fieldE()393 folly::small_vector<::std::int32_t> ContainerStruct::get_fieldE() && {
394 return std::move(__fbthrift_field_fieldE);
395 }
396
get_fieldF() const397 const folly::sorted_vector_set<::std::int32_t>& ContainerStruct::get_fieldF() const& {
398 return __fbthrift_field_fieldF;
399 }
400
get_fieldF()401 folly::sorted_vector_set<::std::int32_t> ContainerStruct::get_fieldF() && {
402 return std::move(__fbthrift_field_fieldF);
403 }
404
get_fieldG() const405 const folly::sorted_vector_map<::std::int32_t, ::std::string>& ContainerStruct::get_fieldG() const& {
406 return __fbthrift_field_fieldG;
407 }
408
get_fieldG()409 folly::sorted_vector_map<::std::int32_t, ::std::string> ContainerStruct::get_fieldG() && {
410 return std::move(__fbthrift_field_fieldG);
411 }
412
get_fieldH() const413 const ::apache::thrift::fixtures::types::SomeMap& ContainerStruct::get_fieldH() const& {
414 return __fbthrift_field_fieldH;
415 }
416
get_fieldH()417 ::apache::thrift::fixtures::types::SomeMap ContainerStruct::get_fieldH() && {
418 return std::move(__fbthrift_field_fieldH);
419 }
420
421
swap(ContainerStruct & a,ContainerStruct & b)422 void swap(ContainerStruct& a, ContainerStruct& b) {
423 using ::std::swap;
424 swap(a.fieldA_ref().value(), b.fieldA_ref().value());
425 swap(a.fieldB_ref().value(), b.fieldB_ref().value());
426 swap(a.fieldC_ref().value(), b.fieldC_ref().value());
427 swap(a.fieldD_ref().value(), b.fieldD_ref().value());
428 swap(a.fieldE_ref().value(), b.fieldE_ref().value());
429 swap(a.fieldF_ref().value(), b.fieldF_ref().value());
430 swap(a.fieldG_ref().value(), b.fieldG_ref().value());
431 swap(a.fieldH_ref().value(), b.fieldH_ref().value());
432 swap(a.__isset, b.__isset);
433 }
434
435 template void ContainerStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
436 template uint32_t ContainerStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
437 template uint32_t ContainerStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
438 template uint32_t ContainerStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
439 template void ContainerStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
440 template uint32_t ContainerStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
441 template uint32_t ContainerStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
442 template uint32_t ContainerStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
443
444
445
446 }}}} // apache::thrift::fixtures::types
447
448 namespace apache {
449 namespace thrift {
450 namespace detail {
451
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)452 void TccStructTraits<::apache::thrift::fixtures::types::CppTypeStruct>::translateFieldName(
453 folly::StringPiece _fname,
454 int16_t& fid,
455 apache::thrift::protocol::TType& _ftype) noexcept {
456 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::CppTypeStruct>;
457 static const st::translate_field_name_table table{
458 data::fields_size,
459 data::fields_names.data(),
460 data::fields_ids.data(),
461 data::fields_types.data()};
462 st::translate_field_name(_fname, fid, _ftype, table);
463 }
464
465 } // namespace detail
466 } // namespace thrift
467 } // namespace apache
468
469 namespace apache { namespace thrift { namespace fixtures { namespace types {
470
471 CppTypeStruct::CppTypeStruct(const CppTypeStruct&) = default;
472 CppTypeStruct& CppTypeStruct::operator=(const CppTypeStruct&) = default;
CppTypeStruct(CppTypeStruct && other)473 CppTypeStruct::CppTypeStruct(CppTypeStruct&& other) noexcept :
474 __fbthrift_field_fieldA(std::move(other.__fbthrift_field_fieldA)),
475 __isset(other.__isset) {
476 }
477
operator =(FOLLY_MAYBE_UNUSED CppTypeStruct && other)478 CppTypeStruct& CppTypeStruct::operator=(FOLLY_MAYBE_UNUSED CppTypeStruct&& other) noexcept {
479 this->__fbthrift_field_fieldA = std::move(other.__fbthrift_field_fieldA);
480 __isset = other.__isset;
481 return *this;
482 }
483
484
CppTypeStruct(apache::thrift::FragileConstructor,std::list<int32_t> fieldA__arg)485 CppTypeStruct::CppTypeStruct(apache::thrift::FragileConstructor, std::list<int32_t> fieldA__arg) :
486 __fbthrift_field_fieldA(std::move(fieldA__arg)) {
487 __isset.set(folly::index_constant<0>(), true);
488 }
489
490
__fbthrift_clear()491 void CppTypeStruct::__fbthrift_clear() {
492 // clear all fields
493 this->__fbthrift_field_fieldA.clear();
494 __isset = {};
495 }
496
operator ==(const CppTypeStruct & rhs) const497 bool CppTypeStruct::operator==(const CppTypeStruct& rhs) const {
498 (void)rhs;
499 auto& lhs = *this;
500 (void)lhs;
501 if (!(lhs.fieldA_ref() == rhs.fieldA_ref())) {
502 return false;
503 }
504 return true;
505 }
506
operator <(const CppTypeStruct & rhs) const507 bool CppTypeStruct::operator<(const CppTypeStruct& rhs) const {
508 (void)rhs;
509 auto& lhs = *this;
510 (void)lhs;
511 if (!(lhs.fieldA_ref() == rhs.fieldA_ref())) {
512 return lhs.fieldA_ref() < rhs.fieldA_ref();
513 }
514 return false;
515 }
516
get_fieldA() const517 const std::list<int32_t>& CppTypeStruct::get_fieldA() const& {
518 return __fbthrift_field_fieldA;
519 }
520
get_fieldA()521 std::list<int32_t> CppTypeStruct::get_fieldA() && {
522 return std::move(__fbthrift_field_fieldA);
523 }
524
525
swap(CppTypeStruct & a,CppTypeStruct & b)526 void swap(CppTypeStruct& a, CppTypeStruct& b) {
527 using ::std::swap;
528 swap(a.fieldA_ref().value(), b.fieldA_ref().value());
529 swap(a.__isset, b.__isset);
530 }
531
532 template void CppTypeStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
533 template uint32_t CppTypeStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
534 template uint32_t CppTypeStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
535 template uint32_t CppTypeStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
536 template void CppTypeStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
537 template uint32_t CppTypeStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
538 template uint32_t CppTypeStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
539 template uint32_t CppTypeStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
540
541
542
543 }}}} // apache::thrift::fixtures::types
544
545 namespace apache {
546 namespace thrift {
547 namespace detail {
548
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)549 void TccStructTraits<::apache::thrift::fixtures::types::VirtualStruct>::translateFieldName(
550 folly::StringPiece _fname,
551 int16_t& fid,
552 apache::thrift::protocol::TType& _ftype) noexcept {
553 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::VirtualStruct>;
554 static const st::translate_field_name_table table{
555 data::fields_size,
556 data::fields_names.data(),
557 data::fields_ids.data(),
558 data::fields_types.data()};
559 st::translate_field_name(_fname, fid, _ftype, table);
560 }
561
562 } // namespace detail
563 } // namespace thrift
564 } // namespace apache
565
566 namespace apache { namespace thrift { namespace fixtures { namespace types {
567
568 VirtualStruct::VirtualStruct(const VirtualStruct&) = default;
569 VirtualStruct& VirtualStruct::operator=(const VirtualStruct&) = default;
VirtualStruct(VirtualStruct && other)570 VirtualStruct::VirtualStruct(VirtualStruct&& other) noexcept :
571 __fbthrift_field_MyIntField(std::move(other.__fbthrift_field_MyIntField)),
572 __isset(other.__isset) {
573 }
574
operator =(FOLLY_MAYBE_UNUSED VirtualStruct && other)575 VirtualStruct& VirtualStruct::operator=(FOLLY_MAYBE_UNUSED VirtualStruct&& other) noexcept {
576 this->__fbthrift_field_MyIntField = std::move(other.__fbthrift_field_MyIntField);
577 __isset = other.__isset;
578 return *this;
579 }
580
581
VirtualStruct(apache::thrift::FragileConstructor,::std::int64_t MyIntField__arg)582 VirtualStruct::VirtualStruct(apache::thrift::FragileConstructor, ::std::int64_t MyIntField__arg) :
583 __fbthrift_field_MyIntField(std::move(MyIntField__arg)) {
584 __isset.set(folly::index_constant<0>(), true);
585 }
586
587
__fbthrift_clear()588 void VirtualStruct::__fbthrift_clear() {
589 // clear all fields
590 this->__fbthrift_field_MyIntField = ::std::int64_t();
591 __isset = {};
592 }
593
operator ==(const VirtualStruct & rhs) const594 bool VirtualStruct::operator==(const VirtualStruct& rhs) const {
595 (void)rhs;
596 auto& lhs = *this;
597 (void)lhs;
598 if (!(lhs.MyIntField_ref() == rhs.MyIntField_ref())) {
599 return false;
600 }
601 return true;
602 }
603
operator <(const VirtualStruct & rhs) const604 bool VirtualStruct::operator<(const VirtualStruct& rhs) const {
605 (void)rhs;
606 auto& lhs = *this;
607 (void)lhs;
608 if (!(lhs.MyIntField_ref() == rhs.MyIntField_ref())) {
609 return lhs.MyIntField_ref() < rhs.MyIntField_ref();
610 }
611 return false;
612 }
613
614
swap(VirtualStruct & a,VirtualStruct & b)615 void swap(VirtualStruct& a, VirtualStruct& b) {
616 using ::std::swap;
617 swap(a.MyIntField_ref().value(), b.MyIntField_ref().value());
618 swap(a.__isset, b.__isset);
619 }
620
621 template void VirtualStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
622 template uint32_t VirtualStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
623 template uint32_t VirtualStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
624 template uint32_t VirtualStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
625 template void VirtualStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
626 template uint32_t VirtualStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
627 template uint32_t VirtualStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
628 template uint32_t VirtualStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
629
630
631
632 }}}} // apache::thrift::fixtures::types
633
634 namespace apache {
635 namespace thrift {
636 namespace detail {
637
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)638 void TccStructTraits<::apache::thrift::fixtures::types::MyStructWithForwardRefEnum>::translateFieldName(
639 folly::StringPiece _fname,
640 int16_t& fid,
641 apache::thrift::protocol::TType& _ftype) noexcept {
642 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::MyStructWithForwardRefEnum>;
643 static const st::translate_field_name_table table{
644 data::fields_size,
645 data::fields_names.data(),
646 data::fields_ids.data(),
647 data::fields_types.data()};
648 st::translate_field_name(_fname, fid, _ftype, table);
649 }
650
651 } // namespace detail
652 } // namespace thrift
653 } // namespace apache
654
655 namespace apache { namespace thrift { namespace fixtures { namespace types {
656
657 MyStructWithForwardRefEnum::MyStructWithForwardRefEnum(const MyStructWithForwardRefEnum&) = default;
658 MyStructWithForwardRefEnum& MyStructWithForwardRefEnum::operator=(const MyStructWithForwardRefEnum&) = default;
MyStructWithForwardRefEnum(MyStructWithForwardRefEnum && other)659 MyStructWithForwardRefEnum::MyStructWithForwardRefEnum(MyStructWithForwardRefEnum&& other) noexcept :
660 __fbthrift_field_a(std::move(other.__fbthrift_field_a)),
661 __fbthrift_field_b(std::move(other.__fbthrift_field_b)),
662 __isset(other.__isset) {
663 }
664
operator =(FOLLY_MAYBE_UNUSED MyStructWithForwardRefEnum && other)665 MyStructWithForwardRefEnum& MyStructWithForwardRefEnum::operator=(FOLLY_MAYBE_UNUSED MyStructWithForwardRefEnum&& other) noexcept {
666 this->__fbthrift_field_a = std::move(other.__fbthrift_field_a);
667 this->__fbthrift_field_b = std::move(other.__fbthrift_field_b);
668 __isset = other.__isset;
669 return *this;
670 }
671
672
MyStructWithForwardRefEnum(apache::thrift::FragileConstructor,::apache::thrift::fixtures::types::MyForwardRefEnum a__arg,::apache::thrift::fixtures::types::MyForwardRefEnum b__arg)673 MyStructWithForwardRefEnum::MyStructWithForwardRefEnum(apache::thrift::FragileConstructor, ::apache::thrift::fixtures::types::MyForwardRefEnum a__arg, ::apache::thrift::fixtures::types::MyForwardRefEnum b__arg) :
674 __fbthrift_field_a(std::move(a__arg)),
675 __fbthrift_field_b(std::move(b__arg)) {
676 __isset.set(folly::index_constant<0>(), true);
677 __isset.set(folly::index_constant<1>(), true);
678 }
679
680
__fbthrift_clear()681 void MyStructWithForwardRefEnum::__fbthrift_clear() {
682 // clear all fields
683 this->__fbthrift_field_a = ::apache::thrift::fixtures::types::MyForwardRefEnum::NONZERO;
684 this->__fbthrift_field_b = ::apache::thrift::fixtures::types::MyForwardRefEnum::NONZERO;
685 __isset = {};
686 }
687
operator ==(const MyStructWithForwardRefEnum & rhs) const688 bool MyStructWithForwardRefEnum::operator==(const MyStructWithForwardRefEnum& rhs) const {
689 (void)rhs;
690 auto& lhs = *this;
691 (void)lhs;
692 if (!(lhs.a_ref() == rhs.a_ref())) {
693 return false;
694 }
695 if (!(lhs.b_ref() == rhs.b_ref())) {
696 return false;
697 }
698 return true;
699 }
700
operator <(const MyStructWithForwardRefEnum & rhs) const701 bool MyStructWithForwardRefEnum::operator<(const MyStructWithForwardRefEnum& rhs) const {
702 (void)rhs;
703 auto& lhs = *this;
704 (void)lhs;
705 if (!(lhs.a_ref() == rhs.a_ref())) {
706 return lhs.a_ref() < rhs.a_ref();
707 }
708 if (!(lhs.b_ref() == rhs.b_ref())) {
709 return lhs.b_ref() < rhs.b_ref();
710 }
711 return false;
712 }
713
714
swap(MyStructWithForwardRefEnum & a,MyStructWithForwardRefEnum & b)715 void swap(MyStructWithForwardRefEnum& a, MyStructWithForwardRefEnum& b) {
716 using ::std::swap;
717 swap(a.a_ref().value(), b.a_ref().value());
718 swap(a.b_ref().value(), b.b_ref().value());
719 swap(a.__isset, b.__isset);
720 }
721
722 template void MyStructWithForwardRefEnum::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
723 template uint32_t MyStructWithForwardRefEnum::write<>(apache::thrift::BinaryProtocolWriter*) const;
724 template uint32_t MyStructWithForwardRefEnum::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
725 template uint32_t MyStructWithForwardRefEnum::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
726 template void MyStructWithForwardRefEnum::readNoXfer<>(apache::thrift::CompactProtocolReader*);
727 template uint32_t MyStructWithForwardRefEnum::write<>(apache::thrift::CompactProtocolWriter*) const;
728 template uint32_t MyStructWithForwardRefEnum::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
729 template uint32_t MyStructWithForwardRefEnum::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
730
731
732
733 }}}} // apache::thrift::fixtures::types
734
735 namespace apache {
736 namespace thrift {
737 namespace detail {
738
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)739 void TccStructTraits<::apache::thrift::fixtures::types::TrivialNumeric>::translateFieldName(
740 folly::StringPiece _fname,
741 int16_t& fid,
742 apache::thrift::protocol::TType& _ftype) noexcept {
743 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::TrivialNumeric>;
744 static const st::translate_field_name_table table{
745 data::fields_size,
746 data::fields_names.data(),
747 data::fields_ids.data(),
748 data::fields_types.data()};
749 st::translate_field_name(_fname, fid, _ftype, table);
750 }
751
752 } // namespace detail
753 } // namespace thrift
754 } // namespace apache
755
756 namespace apache { namespace thrift { namespace fixtures { namespace types {
757
758
TrivialNumeric(apache::thrift::FragileConstructor,::std::int32_t a__arg,bool b__arg)759 TrivialNumeric::TrivialNumeric(apache::thrift::FragileConstructor, ::std::int32_t a__arg, bool b__arg) :
760 __fbthrift_field_a(std::move(a__arg)),
761 __fbthrift_field_b(std::move(b__arg)) {
762 __isset.set(folly::index_constant<0>(), true);
763 __isset.set(folly::index_constant<1>(), true);
764 }
765
766
__fbthrift_clear()767 void TrivialNumeric::__fbthrift_clear() {
768 // clear all fields
769 this->__fbthrift_field_a = ::std::int32_t();
770 this->__fbthrift_field_b = bool();
771 __isset = {};
772 }
773
operator ==(const TrivialNumeric & rhs) const774 bool TrivialNumeric::operator==(const TrivialNumeric& rhs) const {
775 (void)rhs;
776 auto& lhs = *this;
777 (void)lhs;
778 if (!(lhs.a_ref() == rhs.a_ref())) {
779 return false;
780 }
781 if (!(lhs.b_ref() == rhs.b_ref())) {
782 return false;
783 }
784 return true;
785 }
786
operator <(const TrivialNumeric & rhs) const787 bool TrivialNumeric::operator<(const TrivialNumeric& rhs) const {
788 (void)rhs;
789 auto& lhs = *this;
790 (void)lhs;
791 if (!(lhs.a_ref() == rhs.a_ref())) {
792 return lhs.a_ref() < rhs.a_ref();
793 }
794 if (!(lhs.b_ref() == rhs.b_ref())) {
795 return lhs.b_ref() < rhs.b_ref();
796 }
797 return false;
798 }
799
800
swap(TrivialNumeric & a,TrivialNumeric & b)801 void swap(TrivialNumeric& a, TrivialNumeric& b) {
802 using ::std::swap;
803 swap(a.a_ref().value(), b.a_ref().value());
804 swap(a.b_ref().value(), b.b_ref().value());
805 swap(a.__isset, b.__isset);
806 }
807
808 template void TrivialNumeric::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
809 template uint32_t TrivialNumeric::write<>(apache::thrift::BinaryProtocolWriter*) const;
810 template uint32_t TrivialNumeric::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
811 template uint32_t TrivialNumeric::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
812 template void TrivialNumeric::readNoXfer<>(apache::thrift::CompactProtocolReader*);
813 template uint32_t TrivialNumeric::write<>(apache::thrift::CompactProtocolWriter*) const;
814 template uint32_t TrivialNumeric::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
815 template uint32_t TrivialNumeric::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
816
817
818
819 }}}} // apache::thrift::fixtures::types
820
821 namespace apache {
822 namespace thrift {
823 namespace detail {
824
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)825 void TccStructTraits<::apache::thrift::fixtures::types::TrivialNestedWithDefault>::translateFieldName(
826 folly::StringPiece _fname,
827 int16_t& fid,
828 apache::thrift::protocol::TType& _ftype) noexcept {
829 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::TrivialNestedWithDefault>;
830 static const st::translate_field_name_table table{
831 data::fields_size,
832 data::fields_names.data(),
833 data::fields_ids.data(),
834 data::fields_types.data()};
835 st::translate_field_name(_fname, fid, _ftype, table);
836 }
837
838 } // namespace detail
839 } // namespace thrift
840 } // namespace apache
841
842 namespace apache { namespace thrift { namespace fixtures { namespace types {
843
844
TrivialNestedWithDefault(apache::thrift::FragileConstructor,::std::int32_t z__arg,::apache::thrift::fixtures::types::TrivialNumeric n__arg)845 TrivialNestedWithDefault::TrivialNestedWithDefault(apache::thrift::FragileConstructor, ::std::int32_t z__arg, ::apache::thrift::fixtures::types::TrivialNumeric n__arg) :
846 __fbthrift_field_z(std::move(z__arg)),
847 __fbthrift_field_n(std::move(n__arg)) {
848 __isset.set(folly::index_constant<0>(), true);
849 __isset.set(folly::index_constant<1>(), true);
850 }
851
852
__fbthrift_clear()853 void TrivialNestedWithDefault::__fbthrift_clear() {
854 // clear all fields
855 this->__fbthrift_field_z = static_cast<::std::int32_t>(4);
856 apache::thrift::clear(this->__fbthrift_field_n);
857 __isset = {};
858 }
859
operator ==(const TrivialNestedWithDefault & rhs) const860 bool TrivialNestedWithDefault::operator==(const TrivialNestedWithDefault& rhs) const {
861 (void)rhs;
862 auto& lhs = *this;
863 (void)lhs;
864 if (!(lhs.z_ref() == rhs.z_ref())) {
865 return false;
866 }
867 if (!(lhs.n_ref() == rhs.n_ref())) {
868 return false;
869 }
870 return true;
871 }
872
operator <(const TrivialNestedWithDefault & rhs) const873 bool TrivialNestedWithDefault::operator<(const TrivialNestedWithDefault& rhs) const {
874 (void)rhs;
875 auto& lhs = *this;
876 (void)lhs;
877 if (!(lhs.z_ref() == rhs.z_ref())) {
878 return lhs.z_ref() < rhs.z_ref();
879 }
880 if (!(lhs.n_ref() == rhs.n_ref())) {
881 return lhs.n_ref() < rhs.n_ref();
882 }
883 return false;
884 }
885
get_n() const886 const ::apache::thrift::fixtures::types::TrivialNumeric& TrivialNestedWithDefault::get_n() const& {
887 return __fbthrift_field_n;
888 }
889
get_n()890 ::apache::thrift::fixtures::types::TrivialNumeric TrivialNestedWithDefault::get_n() && {
891 return std::move(__fbthrift_field_n);
892 }
893
894
swap(TrivialNestedWithDefault & a,TrivialNestedWithDefault & b)895 void swap(TrivialNestedWithDefault& a, TrivialNestedWithDefault& b) {
896 using ::std::swap;
897 swap(a.z_ref().value(), b.z_ref().value());
898 swap(a.n_ref().value(), b.n_ref().value());
899 swap(a.__isset, b.__isset);
900 }
901
902 template void TrivialNestedWithDefault::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
903 template uint32_t TrivialNestedWithDefault::write<>(apache::thrift::BinaryProtocolWriter*) const;
904 template uint32_t TrivialNestedWithDefault::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
905 template uint32_t TrivialNestedWithDefault::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
906 template void TrivialNestedWithDefault::readNoXfer<>(apache::thrift::CompactProtocolReader*);
907 template uint32_t TrivialNestedWithDefault::write<>(apache::thrift::CompactProtocolWriter*) const;
908 template uint32_t TrivialNestedWithDefault::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
909 template uint32_t TrivialNestedWithDefault::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
910
911 static_assert(
912 ::apache::thrift::detail::st::gen_check_json<
913 TrivialNestedWithDefault,
914 ::apache::thrift::type_class::structure,
915 ::apache::thrift::fixtures::types::TrivialNumeric>,
916 "inconsistent use of json option");
917
918 static_assert(
919 ::apache::thrift::detail::st::gen_check_nimble<
920 TrivialNestedWithDefault,
921 ::apache::thrift::type_class::structure,
922 ::apache::thrift::fixtures::types::TrivialNumeric>,
923 "inconsistent use of nimble option");
924
925 }}}} // apache::thrift::fixtures::types
926
927 namespace apache {
928 namespace thrift {
929 namespace detail {
930
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)931 void TccStructTraits<::apache::thrift::fixtures::types::ComplexString>::translateFieldName(
932 folly::StringPiece _fname,
933 int16_t& fid,
934 apache::thrift::protocol::TType& _ftype) noexcept {
935 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::ComplexString>;
936 static const st::translate_field_name_table table{
937 data::fields_size,
938 data::fields_names.data(),
939 data::fields_ids.data(),
940 data::fields_types.data()};
941 st::translate_field_name(_fname, fid, _ftype, table);
942 }
943
944 } // namespace detail
945 } // namespace thrift
946 } // namespace apache
947
948 namespace apache { namespace thrift { namespace fixtures { namespace types {
949
950 ComplexString::ComplexString(const ComplexString&) = default;
951 ComplexString& ComplexString::operator=(const ComplexString&) = default;
ComplexString(ComplexString && other)952 ComplexString::ComplexString(ComplexString&& other) noexcept :
953 __fbthrift_field_a(std::move(other.__fbthrift_field_a)),
954 __fbthrift_field_b(std::move(other.__fbthrift_field_b)),
955 __isset(other.__isset) {
956 }
957
operator =(FOLLY_MAYBE_UNUSED ComplexString && other)958 ComplexString& ComplexString::operator=(FOLLY_MAYBE_UNUSED ComplexString&& other) noexcept {
959 this->__fbthrift_field_a = std::move(other.__fbthrift_field_a);
960 this->__fbthrift_field_b = std::move(other.__fbthrift_field_b);
961 __isset = other.__isset;
962 return *this;
963 }
964
965
ComplexString(apache::thrift::FragileConstructor,::std::string a__arg,::std::map<::std::string,::std::int32_t> b__arg)966 ComplexString::ComplexString(apache::thrift::FragileConstructor, ::std::string a__arg, ::std::map<::std::string, ::std::int32_t> b__arg) :
967 __fbthrift_field_a(std::move(a__arg)),
968 __fbthrift_field_b(std::move(b__arg)) {
969 __isset.set(folly::index_constant<0>(), true);
970 __isset.set(folly::index_constant<1>(), true);
971 }
972
973
__fbthrift_clear()974 void ComplexString::__fbthrift_clear() {
975 // clear all fields
976 this->__fbthrift_field_a = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
977 this->__fbthrift_field_b.clear();
978 __isset = {};
979 }
980
operator ==(const ComplexString & rhs) const981 bool ComplexString::operator==(const ComplexString& rhs) const {
982 (void)rhs;
983 auto& lhs = *this;
984 (void)lhs;
985 if (!(lhs.a_ref() == rhs.a_ref())) {
986 return false;
987 }
988 if (!(lhs.b_ref() == rhs.b_ref())) {
989 return false;
990 }
991 return true;
992 }
993
operator <(const ComplexString & rhs) const994 bool ComplexString::operator<(const ComplexString& rhs) const {
995 (void)rhs;
996 auto& lhs = *this;
997 (void)lhs;
998 if (!(lhs.a_ref() == rhs.a_ref())) {
999 return lhs.a_ref() < rhs.a_ref();
1000 }
1001 if (!(lhs.b_ref() == rhs.b_ref())) {
1002 return lhs.b_ref() < rhs.b_ref();
1003 }
1004 return false;
1005 }
1006
get_b() const1007 const ::std::map<::std::string, ::std::int32_t>& ComplexString::get_b() const& {
1008 return __fbthrift_field_b;
1009 }
1010
get_b()1011 ::std::map<::std::string, ::std::int32_t> ComplexString::get_b() && {
1012 return std::move(__fbthrift_field_b);
1013 }
1014
1015
swap(ComplexString & a,ComplexString & b)1016 void swap(ComplexString& a, ComplexString& b) {
1017 using ::std::swap;
1018 swap(a.a_ref().value(), b.a_ref().value());
1019 swap(a.b_ref().value(), b.b_ref().value());
1020 swap(a.__isset, b.__isset);
1021 }
1022
1023 template void ComplexString::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
1024 template uint32_t ComplexString::write<>(apache::thrift::BinaryProtocolWriter*) const;
1025 template uint32_t ComplexString::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
1026 template uint32_t ComplexString::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
1027 template void ComplexString::readNoXfer<>(apache::thrift::CompactProtocolReader*);
1028 template uint32_t ComplexString::write<>(apache::thrift::CompactProtocolWriter*) const;
1029 template uint32_t ComplexString::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
1030 template uint32_t ComplexString::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
1031
1032
1033
1034 }}}} // apache::thrift::fixtures::types
1035
1036 namespace apache {
1037 namespace thrift {
1038 namespace detail {
1039
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)1040 void TccStructTraits<::apache::thrift::fixtures::types::ComplexNestedWithDefault>::translateFieldName(
1041 folly::StringPiece _fname,
1042 int16_t& fid,
1043 apache::thrift::protocol::TType& _ftype) noexcept {
1044 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::ComplexNestedWithDefault>;
1045 static const st::translate_field_name_table table{
1046 data::fields_size,
1047 data::fields_names.data(),
1048 data::fields_ids.data(),
1049 data::fields_types.data()};
1050 st::translate_field_name(_fname, fid, _ftype, table);
1051 }
1052
1053 } // namespace detail
1054 } // namespace thrift
1055 } // namespace apache
1056
1057 namespace apache { namespace thrift { namespace fixtures { namespace types {
1058
1059 ComplexNestedWithDefault::ComplexNestedWithDefault(const ComplexNestedWithDefault&) = default;
1060 ComplexNestedWithDefault& ComplexNestedWithDefault::operator=(const ComplexNestedWithDefault&) = default;
ComplexNestedWithDefault(ComplexNestedWithDefault && other)1061 ComplexNestedWithDefault::ComplexNestedWithDefault(ComplexNestedWithDefault&& other) noexcept :
1062 __fbthrift_field_z(std::move(other.__fbthrift_field_z)),
1063 __fbthrift_field_n(std::move(other.__fbthrift_field_n)),
1064 __isset(other.__isset) {
1065 }
1066
operator =(FOLLY_MAYBE_UNUSED ComplexNestedWithDefault && other)1067 ComplexNestedWithDefault& ComplexNestedWithDefault::operator=(FOLLY_MAYBE_UNUSED ComplexNestedWithDefault&& other) noexcept {
1068 this->__fbthrift_field_z = std::move(other.__fbthrift_field_z);
1069 this->__fbthrift_field_n = std::move(other.__fbthrift_field_n);
1070 __isset = other.__isset;
1071 return *this;
1072 }
1073
1074
ComplexNestedWithDefault(apache::thrift::FragileConstructor,::std::string z__arg,::apache::thrift::fixtures::types::ComplexString n__arg)1075 ComplexNestedWithDefault::ComplexNestedWithDefault(apache::thrift::FragileConstructor, ::std::string z__arg, ::apache::thrift::fixtures::types::ComplexString n__arg) :
1076 __fbthrift_field_z(std::move(z__arg)),
1077 __fbthrift_field_n(std::move(n__arg)) {
1078 __isset.set(folly::index_constant<0>(), true);
1079 __isset.set(folly::index_constant<1>(), true);
1080 }
1081
1082
__fbthrift_clear()1083 void ComplexNestedWithDefault::__fbthrift_clear() {
1084 // clear all fields
1085 this->__fbthrift_field_z = apache::thrift::StringTraits<std::string>::fromStringLiteral("4");
1086 apache::thrift::clear(this->__fbthrift_field_n);
1087 __isset = {};
1088 }
1089
operator ==(const ComplexNestedWithDefault & rhs) const1090 bool ComplexNestedWithDefault::operator==(const ComplexNestedWithDefault& rhs) const {
1091 (void)rhs;
1092 auto& lhs = *this;
1093 (void)lhs;
1094 if (!(lhs.z_ref() == rhs.z_ref())) {
1095 return false;
1096 }
1097 if (!(lhs.n_ref() == rhs.n_ref())) {
1098 return false;
1099 }
1100 return true;
1101 }
1102
operator <(const ComplexNestedWithDefault & rhs) const1103 bool ComplexNestedWithDefault::operator<(const ComplexNestedWithDefault& rhs) const {
1104 (void)rhs;
1105 auto& lhs = *this;
1106 (void)lhs;
1107 if (!(lhs.z_ref() == rhs.z_ref())) {
1108 return lhs.z_ref() < rhs.z_ref();
1109 }
1110 if (!(lhs.n_ref() == rhs.n_ref())) {
1111 return lhs.n_ref() < rhs.n_ref();
1112 }
1113 return false;
1114 }
1115
get_n() const1116 const ::apache::thrift::fixtures::types::ComplexString& ComplexNestedWithDefault::get_n() const& {
1117 return __fbthrift_field_n;
1118 }
1119
get_n()1120 ::apache::thrift::fixtures::types::ComplexString ComplexNestedWithDefault::get_n() && {
1121 return std::move(__fbthrift_field_n);
1122 }
1123
1124
swap(ComplexNestedWithDefault & a,ComplexNestedWithDefault & b)1125 void swap(ComplexNestedWithDefault& a, ComplexNestedWithDefault& b) {
1126 using ::std::swap;
1127 swap(a.z_ref().value(), b.z_ref().value());
1128 swap(a.n_ref().value(), b.n_ref().value());
1129 swap(a.__isset, b.__isset);
1130 }
1131
1132 template void ComplexNestedWithDefault::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
1133 template uint32_t ComplexNestedWithDefault::write<>(apache::thrift::BinaryProtocolWriter*) const;
1134 template uint32_t ComplexNestedWithDefault::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
1135 template uint32_t ComplexNestedWithDefault::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
1136 template void ComplexNestedWithDefault::readNoXfer<>(apache::thrift::CompactProtocolReader*);
1137 template uint32_t ComplexNestedWithDefault::write<>(apache::thrift::CompactProtocolWriter*) const;
1138 template uint32_t ComplexNestedWithDefault::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
1139 template uint32_t ComplexNestedWithDefault::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
1140
1141 static_assert(
1142 ::apache::thrift::detail::st::gen_check_json<
1143 ComplexNestedWithDefault,
1144 ::apache::thrift::type_class::structure,
1145 ::apache::thrift::fixtures::types::ComplexString>,
1146 "inconsistent use of json option");
1147
1148 static_assert(
1149 ::apache::thrift::detail::st::gen_check_nimble<
1150 ComplexNestedWithDefault,
1151 ::apache::thrift::type_class::structure,
1152 ::apache::thrift::fixtures::types::ComplexString>,
1153 "inconsistent use of nimble option");
1154
1155 }}}} // apache::thrift::fixtures::types
1156
1157 namespace apache {
1158 namespace thrift {
1159 namespace detail {
1160
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)1161 void TccStructTraits<::apache::thrift::fixtures::types::MinPadding>::translateFieldName(
1162 folly::StringPiece _fname,
1163 int16_t& fid,
1164 apache::thrift::protocol::TType& _ftype) noexcept {
1165 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::MinPadding>;
1166 static const st::translate_field_name_table table{
1167 data::fields_size,
1168 data::fields_names.data(),
1169 data::fields_ids.data(),
1170 data::fields_types.data()};
1171 st::translate_field_name(_fname, fid, _ftype, table);
1172 }
1173
1174 } // namespace detail
1175 } // namespace thrift
1176 } // namespace apache
1177
1178 namespace apache { namespace thrift { namespace fixtures { namespace types {
1179
1180 MinPadding::MinPadding(const MinPadding&) = default;
1181 MinPadding& MinPadding::operator=(const MinPadding&) = default;
MinPadding(MinPadding && other)1182 MinPadding::MinPadding(MinPadding&& other) noexcept :
1183 big(std::move(other.big)),
1184 biggish(std::move(other.biggish)),
1185 medium(std::move(other.medium)),
1186 small(std::move(other.small)),
1187 tiny(std::move(other.tiny)) {
1188 }
1189
operator =(FOLLY_MAYBE_UNUSED MinPadding && other)1190 MinPadding& MinPadding::operator=(FOLLY_MAYBE_UNUSED MinPadding&& other) noexcept {
1191 this->big = std::move(other.big);
1192 this->biggish = std::move(other.biggish);
1193 this->medium = std::move(other.medium);
1194 this->small = std::move(other.small);
1195 this->tiny = std::move(other.tiny);
1196 return *this;
1197 }
1198
1199
MinPadding(apache::thrift::FragileConstructor,::std::int8_t small__arg,::std::int64_t big__arg,::std::int16_t medium__arg,::std::int32_t biggish__arg,::std::int8_t tiny__arg)1200 MinPadding::MinPadding(apache::thrift::FragileConstructor, ::std::int8_t small__arg, ::std::int64_t big__arg, ::std::int16_t medium__arg, ::std::int32_t biggish__arg, ::std::int8_t tiny__arg) :
1201 big(std::move(big__arg)),
1202 biggish(std::move(biggish__arg)),
1203 medium(std::move(medium__arg)),
1204 small(std::move(small__arg)),
1205 tiny(std::move(tiny__arg)) {
1206 }
1207
1208
__fbthrift_clear()1209 void MinPadding::__fbthrift_clear() {
1210 // clear all fields
1211 this->small = ::std::int8_t();
1212 this->big = ::std::int64_t();
1213 this->medium = ::std::int16_t();
1214 this->biggish = ::std::int32_t();
1215 this->tiny = ::std::int8_t();
1216 }
1217
operator ==(const MinPadding & rhs) const1218 bool MinPadding::operator==(const MinPadding& rhs) const {
1219 (void)rhs;
1220 auto& lhs = *this;
1221 (void)lhs;
1222 if (!(lhs.small_ref() == rhs.small_ref())) {
1223 return false;
1224 }
1225 if (!(lhs.big_ref() == rhs.big_ref())) {
1226 return false;
1227 }
1228 if (!(lhs.medium_ref() == rhs.medium_ref())) {
1229 return false;
1230 }
1231 if (!(lhs.biggish_ref() == rhs.biggish_ref())) {
1232 return false;
1233 }
1234 if (!(lhs.tiny_ref() == rhs.tiny_ref())) {
1235 return false;
1236 }
1237 return true;
1238 }
1239
operator <(const MinPadding & rhs) const1240 bool MinPadding::operator<(const MinPadding& rhs) const {
1241 (void)rhs;
1242 auto& lhs = *this;
1243 (void)lhs;
1244 if (!(lhs.small_ref() == rhs.small_ref())) {
1245 return lhs.small_ref() < rhs.small_ref();
1246 }
1247 if (!(lhs.big_ref() == rhs.big_ref())) {
1248 return lhs.big_ref() < rhs.big_ref();
1249 }
1250 if (!(lhs.medium_ref() == rhs.medium_ref())) {
1251 return lhs.medium_ref() < rhs.medium_ref();
1252 }
1253 if (!(lhs.biggish_ref() == rhs.biggish_ref())) {
1254 return lhs.biggish_ref() < rhs.biggish_ref();
1255 }
1256 if (!(lhs.tiny_ref() == rhs.tiny_ref())) {
1257 return lhs.tiny_ref() < rhs.tiny_ref();
1258 }
1259 return false;
1260 }
1261
1262
swap(MinPadding & a,MinPadding & b)1263 void swap(MinPadding& a, MinPadding& b) {
1264 using ::std::swap;
1265 swap(a.small_ref().value(), b.small_ref().value());
1266 swap(a.big_ref().value(), b.big_ref().value());
1267 swap(a.medium_ref().value(), b.medium_ref().value());
1268 swap(a.biggish_ref().value(), b.biggish_ref().value());
1269 swap(a.tiny_ref().value(), b.tiny_ref().value());
1270 }
1271
1272 template void MinPadding::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
1273 template uint32_t MinPadding::write<>(apache::thrift::BinaryProtocolWriter*) const;
1274 template uint32_t MinPadding::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
1275 template uint32_t MinPadding::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
1276 template void MinPadding::readNoXfer<>(apache::thrift::CompactProtocolReader*);
1277 template uint32_t MinPadding::write<>(apache::thrift::CompactProtocolWriter*) const;
1278 template uint32_t MinPadding::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
1279 template uint32_t MinPadding::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
1280
1281
1282
1283 }}}} // apache::thrift::fixtures::types
1284
1285 namespace apache {
1286 namespace thrift {
1287 namespace detail {
1288
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)1289 void TccStructTraits<::apache::thrift::fixtures::types::MyDataItem>::translateFieldName(
1290 folly::StringPiece _fname,
1291 int16_t& fid,
1292 apache::thrift::protocol::TType& _ftype) noexcept {
1293 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::MyDataItem>;
1294 static const st::translate_field_name_table table{
1295 data::fields_size,
1296 data::fields_names.data(),
1297 data::fields_ids.data(),
1298 data::fields_types.data()};
1299 st::translate_field_name(_fname, fid, _ftype, table);
1300 }
1301
1302 } // namespace detail
1303 } // namespace thrift
1304 } // namespace apache
1305
1306 namespace apache { namespace thrift { namespace fixtures { namespace types {
1307
1308
MyDataItem(apache::thrift::FragileConstructor)1309 MyDataItem::MyDataItem(apache::thrift::FragileConstructor) {}
1310
1311
__fbthrift_clear()1312 void MyDataItem::__fbthrift_clear() {
1313 // clear all fields
1314 }
1315
1316
1317
1318
swap(MyDataItem & a,MyDataItem & b)1319 void swap(MyDataItem& a, MyDataItem& b) {
1320 using ::std::swap;
1321 (void)a;
1322 (void)b;
1323 }
1324
1325 template void MyDataItem::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
1326 template uint32_t MyDataItem::write<>(apache::thrift::BinaryProtocolWriter*) const;
1327 template uint32_t MyDataItem::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
1328 template uint32_t MyDataItem::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
1329 template void MyDataItem::readNoXfer<>(apache::thrift::CompactProtocolReader*);
1330 template uint32_t MyDataItem::write<>(apache::thrift::CompactProtocolWriter*) const;
1331 template uint32_t MyDataItem::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
1332 template uint32_t MyDataItem::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
1333
1334
1335
1336 }}}} // apache::thrift::fixtures::types
1337
1338 namespace apache {
1339 namespace thrift {
1340 namespace detail {
1341
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)1342 void TccStructTraits<::apache::thrift::fixtures::types::MyStruct>::translateFieldName(
1343 folly::StringPiece _fname,
1344 int16_t& fid,
1345 apache::thrift::protocol::TType& _ftype) noexcept {
1346 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::MyStruct>;
1347 static const st::translate_field_name_table table{
1348 data::fields_size,
1349 data::fields_names.data(),
1350 data::fields_ids.data(),
1351 data::fields_types.data()};
1352 st::translate_field_name(_fname, fid, _ftype, table);
1353 }
1354
1355 } // namespace detail
1356 } // namespace thrift
1357 } // namespace apache
1358
1359 namespace apache { namespace thrift { namespace fixtures { namespace types {
1360
1361 MyStruct::MyStruct(const MyStruct&) = default;
1362 MyStruct& MyStruct::operator=(const MyStruct&) = default;
MyStruct(MyStruct && other)1363 MyStruct::MyStruct(MyStruct&& other) noexcept :
1364 __fbthrift_field_MyIntField(std::move(other.__fbthrift_field_MyIntField)),
1365 __fbthrift_field_MyStringField(std::move(other.__fbthrift_field_MyStringField)),
1366 __fbthrift_field_majorVer(std::move(other.__fbthrift_field_majorVer)),
1367 __fbthrift_field_data(std::move(other.__fbthrift_field_data)),
1368 __isset(other.__isset) {
1369 }
1370
operator =(FOLLY_MAYBE_UNUSED MyStruct && other)1371 MyStruct& MyStruct::operator=(FOLLY_MAYBE_UNUSED MyStruct&& other) noexcept {
1372 this->__fbthrift_field_MyIntField = std::move(other.__fbthrift_field_MyIntField);
1373 this->__fbthrift_field_MyStringField = std::move(other.__fbthrift_field_MyStringField);
1374 this->__fbthrift_field_majorVer = std::move(other.__fbthrift_field_majorVer);
1375 this->__fbthrift_field_data = std::move(other.__fbthrift_field_data);
1376 __isset = other.__isset;
1377 return *this;
1378 }
1379
1380
MyStruct(apache::thrift::FragileConstructor,::std::int64_t MyIntField__arg,::std::string MyStringField__arg,::std::int64_t majorVer__arg,::apache::thrift::fixtures::types::MyDataItem data__arg)1381 MyStruct::MyStruct(apache::thrift::FragileConstructor, ::std::int64_t MyIntField__arg, ::std::string MyStringField__arg, ::std::int64_t majorVer__arg, ::apache::thrift::fixtures::types::MyDataItem data__arg) :
1382 __fbthrift_field_MyIntField(std::move(MyIntField__arg)),
1383 __fbthrift_field_MyStringField(std::move(MyStringField__arg)),
1384 __fbthrift_field_majorVer(std::move(majorVer__arg)),
1385 __fbthrift_field_data(std::move(data__arg)) {
1386 __isset.set(folly::index_constant<0>(), true);
1387 __isset.set(folly::index_constant<1>(), true);
1388 __isset.set(folly::index_constant<2>(), true);
1389 __isset.set(folly::index_constant<3>(), true);
1390 }
1391
1392
__fbthrift_clear()1393 void MyStruct::__fbthrift_clear() {
1394 // clear all fields
1395 this->__fbthrift_field_MyIntField = ::std::int64_t();
1396 this->__fbthrift_field_MyStringField = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
1397 this->__fbthrift_field_majorVer = ::std::int64_t();
1398 __isset = {};
1399 }
1400
1401
1402
get_data() const1403 const ::apache::thrift::fixtures::types::MyDataItem& MyStruct::get_data() const& {
1404 return __fbthrift_field_data;
1405 }
1406
get_data()1407 ::apache::thrift::fixtures::types::MyDataItem MyStruct::get_data() && {
1408 return std::move(__fbthrift_field_data);
1409 }
1410
1411
swap(MyStruct & a,MyStruct & b)1412 void swap(MyStruct& a, MyStruct& b) {
1413 using ::std::swap;
1414 swap(a.MyIntField_ref().value(), b.MyIntField_ref().value());
1415 swap(a.MyStringField_ref().value(), b.MyStringField_ref().value());
1416 swap(a.majorVer_ref().value(), b.majorVer_ref().value());
1417 swap(a.data_ref().value(), b.data_ref().value());
1418 swap(a.__isset, b.__isset);
1419 }
1420
1421 template void MyStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
1422 template uint32_t MyStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
1423 template uint32_t MyStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
1424 template uint32_t MyStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
1425 template void MyStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
1426 template uint32_t MyStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
1427 template uint32_t MyStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
1428 template uint32_t MyStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
1429
1430 static_assert(
1431 ::apache::thrift::detail::st::gen_check_json<
1432 MyStruct,
1433 ::apache::thrift::type_class::structure,
1434 ::apache::thrift::fixtures::types::MyDataItem>,
1435 "inconsistent use of json option");
1436
1437 static_assert(
1438 ::apache::thrift::detail::st::gen_check_nimble<
1439 MyStruct,
1440 ::apache::thrift::type_class::structure,
1441 ::apache::thrift::fixtures::types::MyDataItem>,
1442 "inconsistent use of nimble option");
1443
1444 }}}} // apache::thrift::fixtures::types
1445
1446 namespace apache {
1447 namespace thrift {
1448 namespace detail {
1449
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)1450 void TccStructTraits<::apache::thrift::fixtures::types::Renaming>::translateFieldName(
1451 folly::StringPiece _fname,
1452 int16_t& fid,
1453 apache::thrift::protocol::TType& _ftype) noexcept {
1454 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::Renaming>;
1455 static const st::translate_field_name_table table{
1456 data::fields_size,
1457 data::fields_names.data(),
1458 data::fields_ids.data(),
1459 data::fields_types.data()};
1460 st::translate_field_name(_fname, fid, _ftype, table);
1461 }
1462
1463 } // namespace detail
1464 } // namespace thrift
1465 } // namespace apache
1466
1467 namespace apache { namespace thrift { namespace fixtures { namespace types {
1468
1469
Renaming(apache::thrift::FragileConstructor,::std::int64_t bar__arg)1470 Renaming::Renaming(apache::thrift::FragileConstructor, ::std::int64_t bar__arg) :
1471 __fbthrift_field_bar(std::move(bar__arg)) {
1472 __isset.set(folly::index_constant<0>(), true);
1473 }
1474
1475
__fbthrift_clear()1476 void Renaming::__fbthrift_clear() {
1477 // clear all fields
1478 this->__fbthrift_field_bar = ::std::int64_t();
1479 __isset = {};
1480 }
1481
operator ==(const Renaming & rhs) const1482 bool Renaming::operator==(const Renaming& rhs) const {
1483 (void)rhs;
1484 auto& lhs = *this;
1485 (void)lhs;
1486 if (!(lhs.bar_ref() == rhs.bar_ref())) {
1487 return false;
1488 }
1489 return true;
1490 }
1491
operator <(const Renaming & rhs) const1492 bool Renaming::operator<(const Renaming& rhs) const {
1493 (void)rhs;
1494 auto& lhs = *this;
1495 (void)lhs;
1496 if (!(lhs.bar_ref() == rhs.bar_ref())) {
1497 return lhs.bar_ref() < rhs.bar_ref();
1498 }
1499 return false;
1500 }
1501
1502
swap(Renaming & a,Renaming & b)1503 void swap(Renaming& a, Renaming& b) {
1504 using ::std::swap;
1505 swap(a.bar_ref().value(), b.bar_ref().value());
1506 swap(a.__isset, b.__isset);
1507 }
1508
1509 template void Renaming::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
1510 template uint32_t Renaming::write<>(apache::thrift::BinaryProtocolWriter*) const;
1511 template uint32_t Renaming::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
1512 template uint32_t Renaming::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
1513 template void Renaming::readNoXfer<>(apache::thrift::CompactProtocolReader*);
1514 template uint32_t Renaming::write<>(apache::thrift::CompactProtocolWriter*) const;
1515 template uint32_t Renaming::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
1516 template uint32_t Renaming::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
1517
1518
1519
1520 }}}} // apache::thrift::fixtures::types
1521
1522 namespace apache {
1523 namespace thrift {
1524 namespace detail {
1525
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)1526 void TccStructTraits<::apache::thrift::fixtures::types::AnnotatedTypes>::translateFieldName(
1527 folly::StringPiece _fname,
1528 int16_t& fid,
1529 apache::thrift::protocol::TType& _ftype) noexcept {
1530 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::AnnotatedTypes>;
1531 static const st::translate_field_name_table table{
1532 data::fields_size,
1533 data::fields_names.data(),
1534 data::fields_ids.data(),
1535 data::fields_types.data()};
1536 st::translate_field_name(_fname, fid, _ftype, table);
1537 }
1538
1539 } // namespace detail
1540 } // namespace thrift
1541 } // namespace apache
1542
1543 namespace apache { namespace thrift { namespace fixtures { namespace types {
1544
1545 AnnotatedTypes::AnnotatedTypes(const AnnotatedTypes&) = default;
1546 AnnotatedTypes& AnnotatedTypes::operator=(const AnnotatedTypes&) = default;
AnnotatedTypes(AnnotatedTypes && other)1547 AnnotatedTypes::AnnotatedTypes(AnnotatedTypes&& other) noexcept :
1548 __fbthrift_field_binary_field(std::move(other.__fbthrift_field_binary_field)),
1549 __fbthrift_field_list_field(std::move(other.__fbthrift_field_list_field)),
1550 __isset(other.__isset) {
1551 }
1552
operator =(FOLLY_MAYBE_UNUSED AnnotatedTypes && other)1553 AnnotatedTypes& AnnotatedTypes::operator=(FOLLY_MAYBE_UNUSED AnnotatedTypes&& other) noexcept {
1554 this->__fbthrift_field_binary_field = std::move(other.__fbthrift_field_binary_field);
1555 this->__fbthrift_field_list_field = std::move(other.__fbthrift_field_list_field);
1556 __isset = other.__isset;
1557 return *this;
1558 }
1559
1560
AnnotatedTypes(apache::thrift::FragileConstructor,::apache::thrift::fixtures::types::TBinary binary_field__arg,::apache::thrift::fixtures::types::SomeListOfTypeMap list_field__arg)1561 AnnotatedTypes::AnnotatedTypes(apache::thrift::FragileConstructor, ::apache::thrift::fixtures::types::TBinary binary_field__arg, ::apache::thrift::fixtures::types::SomeListOfTypeMap list_field__arg) :
1562 __fbthrift_field_binary_field(std::move(binary_field__arg)),
1563 __fbthrift_field_list_field(std::move(list_field__arg)) {
1564 __isset.set(folly::index_constant<0>(), true);
1565 __isset.set(folly::index_constant<1>(), true);
1566 }
1567
1568
__fbthrift_clear()1569 void AnnotatedTypes::__fbthrift_clear() {
1570 // clear all fields
1571 this->__fbthrift_field_binary_field = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
1572 this->__fbthrift_field_list_field.clear();
1573 __isset = {};
1574 }
1575
operator ==(const AnnotatedTypes & rhs) const1576 bool AnnotatedTypes::operator==(const AnnotatedTypes& rhs) const {
1577 (void)rhs;
1578 auto& lhs = *this;
1579 (void)lhs;
1580 if (!apache::thrift::StringTraits<std::string>::isEqual(lhs.__fbthrift_field_binary_field, rhs.__fbthrift_field_binary_field)) {
1581 return false;
1582 }
1583 if (!(lhs.list_field_ref() == rhs.list_field_ref())) {
1584 return false;
1585 }
1586 return true;
1587 }
1588
get_list_field() const1589 const ::apache::thrift::fixtures::types::SomeListOfTypeMap& AnnotatedTypes::get_list_field() const& {
1590 return __fbthrift_field_list_field;
1591 }
1592
get_list_field()1593 ::apache::thrift::fixtures::types::SomeListOfTypeMap AnnotatedTypes::get_list_field() && {
1594 return std::move(__fbthrift_field_list_field);
1595 }
1596
1597
swap(AnnotatedTypes & a,AnnotatedTypes & b)1598 void swap(AnnotatedTypes& a, AnnotatedTypes& b) {
1599 using ::std::swap;
1600 swap(a.binary_field_ref().value(), b.binary_field_ref().value());
1601 swap(a.list_field_ref().value(), b.list_field_ref().value());
1602 swap(a.__isset, b.__isset);
1603 }
1604
1605 template void AnnotatedTypes::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
1606 template uint32_t AnnotatedTypes::write<>(apache::thrift::BinaryProtocolWriter*) const;
1607 template uint32_t AnnotatedTypes::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
1608 template uint32_t AnnotatedTypes::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
1609 template void AnnotatedTypes::readNoXfer<>(apache::thrift::CompactProtocolReader*);
1610 template uint32_t AnnotatedTypes::write<>(apache::thrift::CompactProtocolWriter*) const;
1611 template uint32_t AnnotatedTypes::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
1612 template uint32_t AnnotatedTypes::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
1613
1614
1615
1616 }}}} // apache::thrift::fixtures::types
1617
1618 namespace apache {
1619 namespace thrift {
1620 namespace detail {
1621
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)1622 void TccStructTraits<::apache::thrift::fixtures::types::ForwardUsageStruct>::translateFieldName(
1623 folly::StringPiece _fname,
1624 int16_t& fid,
1625 apache::thrift::protocol::TType& _ftype) noexcept {
1626 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::ForwardUsageStruct>;
1627 static const st::translate_field_name_table table{
1628 data::fields_size,
1629 data::fields_names.data(),
1630 data::fields_ids.data(),
1631 data::fields_types.data()};
1632 st::translate_field_name(_fname, fid, _ftype, table);
1633 }
1634
1635 } // namespace detail
1636 } // namespace thrift
1637 } // namespace apache
1638
1639 namespace apache { namespace thrift { namespace fixtures { namespace types {
1640
1641 ForwardUsageStruct::ForwardUsageStruct(const ForwardUsageStruct&) = default;
1642 ForwardUsageStruct& ForwardUsageStruct::operator=(const ForwardUsageStruct&) = default;
ForwardUsageStruct(ForwardUsageStruct && other)1643 ForwardUsageStruct::ForwardUsageStruct(ForwardUsageStruct&& other) noexcept :
1644 __fbthrift_field_foo(std::move(other.__fbthrift_field_foo)),
1645 __isset(other.__isset) {
1646 }
1647
operator =(FOLLY_MAYBE_UNUSED ForwardUsageStruct && other)1648 ForwardUsageStruct& ForwardUsageStruct::operator=(FOLLY_MAYBE_UNUSED ForwardUsageStruct&& other) noexcept {
1649 this->__fbthrift_field_foo = std::move(other.__fbthrift_field_foo);
1650 __isset = other.__isset;
1651 return *this;
1652 }
1653
1654
ForwardUsageStruct(apache::thrift::FragileConstructor,::apache::thrift::fixtures::types::ForwardUsageRoot foo__arg)1655 ForwardUsageStruct::ForwardUsageStruct(apache::thrift::FragileConstructor, ::apache::thrift::fixtures::types::ForwardUsageRoot foo__arg) :
1656 __fbthrift_field_foo(std::move(foo__arg)) {
1657 __isset.set(folly::index_constant<0>(), true);
1658 }
1659
1660
__fbthrift_clear()1661 void ForwardUsageStruct::__fbthrift_clear() {
1662 // clear all fields
1663 apache::thrift::clear(this->__fbthrift_field_foo);
1664 __isset = {};
1665 }
1666
operator ==(const ForwardUsageStruct & rhs) const1667 bool ForwardUsageStruct::operator==(const ForwardUsageStruct& rhs) const {
1668 (void)rhs;
1669 auto& lhs = *this;
1670 (void)lhs;
1671 if (!(lhs.foo_ref() == rhs.foo_ref())) {
1672 return false;
1673 }
1674 return true;
1675 }
1676
operator <(const ForwardUsageStruct & rhs) const1677 bool ForwardUsageStruct::operator<(const ForwardUsageStruct& rhs) const {
1678 (void)rhs;
1679 auto& lhs = *this;
1680 (void)lhs;
1681 if (!(lhs.foo_ref() == rhs.foo_ref())) {
1682 return lhs.foo_ref() < rhs.foo_ref();
1683 }
1684 return false;
1685 }
1686
get_foo() const1687 const ::apache::thrift::fixtures::types::ForwardUsageRoot* ForwardUsageStruct::get_foo() const& {
1688 return foo_ref().has_value() ? std::addressof(__fbthrift_field_foo) : nullptr;
1689 }
1690
get_foo()1691 ::apache::thrift::fixtures::types::ForwardUsageRoot* ForwardUsageStruct::get_foo() & {
1692 return foo_ref().has_value() ? std::addressof(__fbthrift_field_foo) : nullptr;
1693 }
1694
1695
swap(ForwardUsageStruct & a,ForwardUsageStruct & b)1696 void swap(ForwardUsageStruct& a, ForwardUsageStruct& b) {
1697 using ::std::swap;
1698 swap(a.foo_ref().value_unchecked(), b.foo_ref().value_unchecked());
1699 swap(a.__isset, b.__isset);
1700 }
1701
1702 template void ForwardUsageStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
1703 template uint32_t ForwardUsageStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
1704 template uint32_t ForwardUsageStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
1705 template uint32_t ForwardUsageStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
1706 template void ForwardUsageStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
1707 template uint32_t ForwardUsageStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
1708 template uint32_t ForwardUsageStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
1709 template uint32_t ForwardUsageStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
1710
1711 static_assert(
1712 ::apache::thrift::detail::st::gen_check_json<
1713 ForwardUsageStruct,
1714 ::apache::thrift::type_class::structure,
1715 ::apache::thrift::fixtures::types::ForwardUsageRoot>,
1716 "inconsistent use of json option");
1717
1718 static_assert(
1719 ::apache::thrift::detail::st::gen_check_nimble<
1720 ForwardUsageStruct,
1721 ::apache::thrift::type_class::structure,
1722 ::apache::thrift::fixtures::types::ForwardUsageRoot>,
1723 "inconsistent use of nimble option");
1724
1725 }}}} // apache::thrift::fixtures::types
1726
1727 namespace apache {
1728 namespace thrift {
1729 namespace detail {
1730
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)1731 void TccStructTraits<::apache::thrift::fixtures::types::ForwardUsageRoot>::translateFieldName(
1732 folly::StringPiece _fname,
1733 int16_t& fid,
1734 apache::thrift::protocol::TType& _ftype) noexcept {
1735 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::ForwardUsageRoot>;
1736 static const st::translate_field_name_table table{
1737 data::fields_size,
1738 data::fields_names.data(),
1739 data::fields_ids.data(),
1740 data::fields_types.data()};
1741 st::translate_field_name(_fname, fid, _ftype, table);
1742 }
1743
1744 } // namespace detail
1745 } // namespace thrift
1746 } // namespace apache
1747
1748 namespace apache { namespace thrift { namespace fixtures { namespace types {
1749
ForwardUsageRoot(const ForwardUsageRoot & srcObj)1750 ForwardUsageRoot::ForwardUsageRoot(const ForwardUsageRoot& srcObj) {
1751 __fbthrift_field_ForwardUsageStruct = srcObj.__fbthrift_field_ForwardUsageStruct;
1752 __isset.set(0,srcObj.__isset.get(0));
1753 ForwardUsageByRef = ::apache::thrift::detail::st::copy_field<
1754 ::apache::thrift::type_class::structure>(srcObj.ForwardUsageByRef);
1755 }
1756
operator =(const ForwardUsageRoot & src)1757 ForwardUsageRoot& ForwardUsageRoot::operator=(const ForwardUsageRoot& src) {
1758 ForwardUsageRoot tmp(src);
1759 swap(*this, tmp);
1760 return *this;
1761 }
1762
ForwardUsageRoot(ForwardUsageRoot && other)1763 ForwardUsageRoot::ForwardUsageRoot(ForwardUsageRoot&& other) noexcept :
1764 __fbthrift_field_ForwardUsageStruct(std::move(other.__fbthrift_field_ForwardUsageStruct)),
1765 ForwardUsageByRef(std::move(other.ForwardUsageByRef)),
1766 __isset(other.__isset) {
1767 }
1768
operator =(FOLLY_MAYBE_UNUSED ForwardUsageRoot && other)1769 ForwardUsageRoot& ForwardUsageRoot::operator=(FOLLY_MAYBE_UNUSED ForwardUsageRoot&& other) noexcept {
1770 this->__fbthrift_field_ForwardUsageStruct = std::move(other.__fbthrift_field_ForwardUsageStruct);
1771 this->ForwardUsageByRef = std::move(other.ForwardUsageByRef);
1772 __isset = other.__isset;
1773 return *this;
1774 }
1775
1776
ForwardUsageRoot(apache::thrift::FragileConstructor,::apache::thrift::fixtures::types::ForwardUsageStruct ForwardUsageStruct__arg,::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageByRef> ForwardUsageByRef__arg)1777 ForwardUsageRoot::ForwardUsageRoot(apache::thrift::FragileConstructor, ::apache::thrift::fixtures::types::ForwardUsageStruct ForwardUsageStruct__arg, ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageByRef> ForwardUsageByRef__arg) :
1778 __fbthrift_field_ForwardUsageStruct(std::move(ForwardUsageStruct__arg)),
1779 ForwardUsageByRef(std::move(ForwardUsageByRef__arg)) {
1780 __isset.set(folly::index_constant<0>(), true);
1781 }
1782
1783
__fbthrift_clear()1784 void ForwardUsageRoot::__fbthrift_clear() {
1785 // clear all fields
1786 apache::thrift::clear(this->__fbthrift_field_ForwardUsageStruct);
1787 this->ForwardUsageByRef.reset();
1788 __isset = {};
1789 }
1790
operator ==(const ForwardUsageRoot & rhs) const1791 bool ForwardUsageRoot::operator==(const ForwardUsageRoot& rhs) const {
1792 (void)rhs;
1793 auto& lhs = *this;
1794 (void)lhs;
1795 if (!(lhs.ForwardUsageStruct_ref() == rhs.ForwardUsageStruct_ref())) {
1796 return false;
1797 }
1798 if ((!::apache::thrift::detail::pointer_equal(lhs.ForwardUsageByRef_ref(), rhs.ForwardUsageByRef_ref()))) {
1799 return false;
1800 }
1801 return true;
1802 }
1803
operator <(const ForwardUsageRoot & rhs) const1804 bool ForwardUsageRoot::operator<(const ForwardUsageRoot& rhs) const {
1805 (void)rhs;
1806 auto& lhs = *this;
1807 (void)lhs;
1808 if (!(lhs.ForwardUsageStruct_ref() == rhs.ForwardUsageStruct_ref())) {
1809 return lhs.ForwardUsageStruct_ref() < rhs.ForwardUsageStruct_ref();
1810 }
1811 if ((!::apache::thrift::detail::pointer_equal(lhs.ForwardUsageByRef_ref(), rhs.ForwardUsageByRef_ref()))) {
1812 return ::apache::thrift::detail::pointer_less(lhs.ForwardUsageByRef_ref(), rhs.ForwardUsageByRef_ref());
1813 }
1814 return false;
1815 }
1816
get_ForwardUsageStruct() const1817 const ::apache::thrift::fixtures::types::ForwardUsageStruct* ForwardUsageRoot::get_ForwardUsageStruct() const& {
1818 return ForwardUsageStruct_ref().has_value() ? std::addressof(__fbthrift_field_ForwardUsageStruct) : nullptr;
1819 }
1820
get_ForwardUsageStruct()1821 ::apache::thrift::fixtures::types::ForwardUsageStruct* ForwardUsageRoot::get_ForwardUsageStruct() & {
1822 return ForwardUsageStruct_ref().has_value() ? std::addressof(__fbthrift_field_ForwardUsageStruct) : nullptr;
1823 }
1824
1825
swap(ForwardUsageRoot & a,ForwardUsageRoot & b)1826 void swap(ForwardUsageRoot& a, ForwardUsageRoot& b) {
1827 using ::std::swap;
1828 swap(a.ForwardUsageStruct_ref().value_unchecked(), b.ForwardUsageStruct_ref().value_unchecked());
1829 swap(a.ForwardUsageByRef, b.ForwardUsageByRef);
1830 swap(a.__isset, b.__isset);
1831 }
1832
1833 template void ForwardUsageRoot::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
1834 template uint32_t ForwardUsageRoot::write<>(apache::thrift::BinaryProtocolWriter*) const;
1835 template uint32_t ForwardUsageRoot::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
1836 template uint32_t ForwardUsageRoot::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
1837 template void ForwardUsageRoot::readNoXfer<>(apache::thrift::CompactProtocolReader*);
1838 template uint32_t ForwardUsageRoot::write<>(apache::thrift::CompactProtocolWriter*) const;
1839 template uint32_t ForwardUsageRoot::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
1840 template uint32_t ForwardUsageRoot::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
1841
1842 static_assert(
1843 ::apache::thrift::detail::st::gen_check_json<
1844 ForwardUsageRoot,
1845 ::apache::thrift::type_class::structure,
1846 ::apache::thrift::fixtures::types::ForwardUsageStruct>,
1847 "inconsistent use of json option");
1848 static_assert(
1849 ::apache::thrift::detail::st::gen_check_json<
1850 ForwardUsageRoot,
1851 ::apache::thrift::type_class::structure,
1852 ::apache::thrift::fixtures::types::ForwardUsageByRef>,
1853 "inconsistent use of json option");
1854
1855 static_assert(
1856 ::apache::thrift::detail::st::gen_check_nimble<
1857 ForwardUsageRoot,
1858 ::apache::thrift::type_class::structure,
1859 ::apache::thrift::fixtures::types::ForwardUsageStruct>,
1860 "inconsistent use of nimble option");
1861 static_assert(
1862 ::apache::thrift::detail::st::gen_check_nimble<
1863 ForwardUsageRoot,
1864 ::apache::thrift::type_class::structure,
1865 ::apache::thrift::fixtures::types::ForwardUsageByRef>,
1866 "inconsistent use of nimble option");
1867
1868 }}}} // apache::thrift::fixtures::types
1869
1870 namespace apache {
1871 namespace thrift {
1872 namespace detail {
1873
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)1874 void TccStructTraits<::apache::thrift::fixtures::types::ForwardUsageByRef>::translateFieldName(
1875 folly::StringPiece _fname,
1876 int16_t& fid,
1877 apache::thrift::protocol::TType& _ftype) noexcept {
1878 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::ForwardUsageByRef>;
1879 static const st::translate_field_name_table table{
1880 data::fields_size,
1881 data::fields_names.data(),
1882 data::fields_ids.data(),
1883 data::fields_types.data()};
1884 st::translate_field_name(_fname, fid, _ftype, table);
1885 }
1886
1887 } // namespace detail
1888 } // namespace thrift
1889 } // namespace apache
1890
1891 namespace apache { namespace thrift { namespace fixtures { namespace types {
1892
1893 ForwardUsageByRef::ForwardUsageByRef(const ForwardUsageByRef&) = default;
1894 ForwardUsageByRef& ForwardUsageByRef::operator=(const ForwardUsageByRef&) = default;
ForwardUsageByRef(ForwardUsageByRef && other)1895 ForwardUsageByRef::ForwardUsageByRef(ForwardUsageByRef&& other) noexcept :
1896 __fbthrift_field_foo(std::move(other.__fbthrift_field_foo)),
1897 __isset(other.__isset) {
1898 }
1899
operator =(FOLLY_MAYBE_UNUSED ForwardUsageByRef && other)1900 ForwardUsageByRef& ForwardUsageByRef::operator=(FOLLY_MAYBE_UNUSED ForwardUsageByRef&& other) noexcept {
1901 this->__fbthrift_field_foo = std::move(other.__fbthrift_field_foo);
1902 __isset = other.__isset;
1903 return *this;
1904 }
1905
1906
ForwardUsageByRef(apache::thrift::FragileConstructor,::apache::thrift::fixtures::types::ForwardUsageRoot foo__arg)1907 ForwardUsageByRef::ForwardUsageByRef(apache::thrift::FragileConstructor, ::apache::thrift::fixtures::types::ForwardUsageRoot foo__arg) :
1908 __fbthrift_field_foo(std::move(foo__arg)) {
1909 __isset.set(folly::index_constant<0>(), true);
1910 }
1911
1912
__fbthrift_clear()1913 void ForwardUsageByRef::__fbthrift_clear() {
1914 // clear all fields
1915 apache::thrift::clear(this->__fbthrift_field_foo);
1916 __isset = {};
1917 }
1918
operator ==(const ForwardUsageByRef & rhs) const1919 bool ForwardUsageByRef::operator==(const ForwardUsageByRef& rhs) const {
1920 (void)rhs;
1921 auto& lhs = *this;
1922 (void)lhs;
1923 if (!(lhs.foo_ref() == rhs.foo_ref())) {
1924 return false;
1925 }
1926 return true;
1927 }
1928
operator <(const ForwardUsageByRef & rhs) const1929 bool ForwardUsageByRef::operator<(const ForwardUsageByRef& rhs) const {
1930 (void)rhs;
1931 auto& lhs = *this;
1932 (void)lhs;
1933 if (!(lhs.foo_ref() == rhs.foo_ref())) {
1934 return lhs.foo_ref() < rhs.foo_ref();
1935 }
1936 return false;
1937 }
1938
get_foo() const1939 const ::apache::thrift::fixtures::types::ForwardUsageRoot* ForwardUsageByRef::get_foo() const& {
1940 return foo_ref().has_value() ? std::addressof(__fbthrift_field_foo) : nullptr;
1941 }
1942
get_foo()1943 ::apache::thrift::fixtures::types::ForwardUsageRoot* ForwardUsageByRef::get_foo() & {
1944 return foo_ref().has_value() ? std::addressof(__fbthrift_field_foo) : nullptr;
1945 }
1946
1947
swap(ForwardUsageByRef & a,ForwardUsageByRef & b)1948 void swap(ForwardUsageByRef& a, ForwardUsageByRef& b) {
1949 using ::std::swap;
1950 swap(a.foo_ref().value_unchecked(), b.foo_ref().value_unchecked());
1951 swap(a.__isset, b.__isset);
1952 }
1953
1954 template void ForwardUsageByRef::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
1955 template uint32_t ForwardUsageByRef::write<>(apache::thrift::BinaryProtocolWriter*) const;
1956 template uint32_t ForwardUsageByRef::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
1957 template uint32_t ForwardUsageByRef::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
1958 template void ForwardUsageByRef::readNoXfer<>(apache::thrift::CompactProtocolReader*);
1959 template uint32_t ForwardUsageByRef::write<>(apache::thrift::CompactProtocolWriter*) const;
1960 template uint32_t ForwardUsageByRef::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
1961 template uint32_t ForwardUsageByRef::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
1962
1963 static_assert(
1964 ::apache::thrift::detail::st::gen_check_json<
1965 ForwardUsageByRef,
1966 ::apache::thrift::type_class::structure,
1967 ::apache::thrift::fixtures::types::ForwardUsageRoot>,
1968 "inconsistent use of json option");
1969
1970 static_assert(
1971 ::apache::thrift::detail::st::gen_check_nimble<
1972 ForwardUsageByRef,
1973 ::apache::thrift::type_class::structure,
1974 ::apache::thrift::fixtures::types::ForwardUsageRoot>,
1975 "inconsistent use of nimble option");
1976
1977 }}}} // apache::thrift::fixtures::types
1978
1979 namespace apache {
1980 namespace thrift {
1981 namespace detail {
1982
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)1983 void TccStructTraits<::apache::thrift::fixtures::types::NoexceptMoveEmpty>::translateFieldName(
1984 folly::StringPiece _fname,
1985 int16_t& fid,
1986 apache::thrift::protocol::TType& _ftype) noexcept {
1987 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::NoexceptMoveEmpty>;
1988 static const st::translate_field_name_table table{
1989 data::fields_size,
1990 data::fields_names.data(),
1991 data::fields_ids.data(),
1992 data::fields_types.data()};
1993 st::translate_field_name(_fname, fid, _ftype, table);
1994 }
1995
1996 } // namespace detail
1997 } // namespace thrift
1998 } // namespace apache
1999
2000 namespace apache { namespace thrift { namespace fixtures { namespace types {
2001
2002
NoexceptMoveEmpty(apache::thrift::FragileConstructor)2003 NoexceptMoveEmpty::NoexceptMoveEmpty(apache::thrift::FragileConstructor) {}
2004
2005
__fbthrift_clear()2006 void NoexceptMoveEmpty::__fbthrift_clear() {
2007 // clear all fields
2008 }
2009
operator ==(const NoexceptMoveEmpty & rhs) const2010 bool NoexceptMoveEmpty::operator==(const NoexceptMoveEmpty& rhs) const {
2011 (void)rhs;
2012 auto& lhs = *this;
2013 (void)lhs;
2014 return true;
2015 }
2016
operator <(const NoexceptMoveEmpty & rhs) const2017 bool NoexceptMoveEmpty::operator<(const NoexceptMoveEmpty& rhs) const {
2018 (void)rhs;
2019 auto& lhs = *this;
2020 (void)lhs;
2021 return false;
2022 }
2023
2024
swap(NoexceptMoveEmpty & a,NoexceptMoveEmpty & b)2025 void swap(NoexceptMoveEmpty& a, NoexceptMoveEmpty& b) {
2026 using ::std::swap;
2027 (void)a;
2028 (void)b;
2029 }
2030
2031 template void NoexceptMoveEmpty::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
2032 template uint32_t NoexceptMoveEmpty::write<>(apache::thrift::BinaryProtocolWriter*) const;
2033 template uint32_t NoexceptMoveEmpty::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
2034 template uint32_t NoexceptMoveEmpty::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
2035 template void NoexceptMoveEmpty::readNoXfer<>(apache::thrift::CompactProtocolReader*);
2036 template uint32_t NoexceptMoveEmpty::write<>(apache::thrift::CompactProtocolWriter*) const;
2037 template uint32_t NoexceptMoveEmpty::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
2038 template uint32_t NoexceptMoveEmpty::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
2039
2040
2041
2042 }}}} // apache::thrift::fixtures::types
2043
2044 namespace apache {
2045 namespace thrift {
2046 namespace detail {
2047
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)2048 void TccStructTraits<::apache::thrift::fixtures::types::NoexceptMoveSimpleStruct>::translateFieldName(
2049 folly::StringPiece _fname,
2050 int16_t& fid,
2051 apache::thrift::protocol::TType& _ftype) noexcept {
2052 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::NoexceptMoveSimpleStruct>;
2053 static const st::translate_field_name_table table{
2054 data::fields_size,
2055 data::fields_names.data(),
2056 data::fields_ids.data(),
2057 data::fields_types.data()};
2058 st::translate_field_name(_fname, fid, _ftype, table);
2059 }
2060
2061 } // namespace detail
2062 } // namespace thrift
2063 } // namespace apache
2064
2065 namespace apache { namespace thrift { namespace fixtures { namespace types {
2066
2067
NoexceptMoveSimpleStruct(apache::thrift::FragileConstructor,::std::int64_t boolField__arg)2068 NoexceptMoveSimpleStruct::NoexceptMoveSimpleStruct(apache::thrift::FragileConstructor, ::std::int64_t boolField__arg) :
2069 __fbthrift_field_boolField(std::move(boolField__arg)) {
2070 __isset.set(folly::index_constant<0>(), true);
2071 }
2072
2073
__fbthrift_clear()2074 void NoexceptMoveSimpleStruct::__fbthrift_clear() {
2075 // clear all fields
2076 this->__fbthrift_field_boolField = ::std::int64_t();
2077 __isset = {};
2078 }
2079
operator ==(const NoexceptMoveSimpleStruct & rhs) const2080 bool NoexceptMoveSimpleStruct::operator==(const NoexceptMoveSimpleStruct& rhs) const {
2081 (void)rhs;
2082 auto& lhs = *this;
2083 (void)lhs;
2084 if (!(lhs.boolField_ref() == rhs.boolField_ref())) {
2085 return false;
2086 }
2087 return true;
2088 }
2089
operator <(const NoexceptMoveSimpleStruct & rhs) const2090 bool NoexceptMoveSimpleStruct::operator<(const NoexceptMoveSimpleStruct& rhs) const {
2091 (void)rhs;
2092 auto& lhs = *this;
2093 (void)lhs;
2094 if (!(lhs.boolField_ref() == rhs.boolField_ref())) {
2095 return lhs.boolField_ref() < rhs.boolField_ref();
2096 }
2097 return false;
2098 }
2099
2100
swap(NoexceptMoveSimpleStruct & a,NoexceptMoveSimpleStruct & b)2101 void swap(NoexceptMoveSimpleStruct& a, NoexceptMoveSimpleStruct& b) {
2102 using ::std::swap;
2103 swap(a.boolField_ref().value(), b.boolField_ref().value());
2104 swap(a.__isset, b.__isset);
2105 }
2106
2107 template void NoexceptMoveSimpleStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
2108 template uint32_t NoexceptMoveSimpleStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
2109 template uint32_t NoexceptMoveSimpleStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
2110 template uint32_t NoexceptMoveSimpleStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
2111 template void NoexceptMoveSimpleStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
2112 template uint32_t NoexceptMoveSimpleStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
2113 template uint32_t NoexceptMoveSimpleStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
2114 template uint32_t NoexceptMoveSimpleStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
2115
2116
2117
2118 }}}} // apache::thrift::fixtures::types
2119
2120 namespace apache {
2121 namespace thrift {
2122 namespace detail {
2123
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)2124 void TccStructTraits<::apache::thrift::fixtures::types::NoexceptMoveComplexStruct>::translateFieldName(
2125 folly::StringPiece _fname,
2126 int16_t& fid,
2127 apache::thrift::protocol::TType& _ftype) noexcept {
2128 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::NoexceptMoveComplexStruct>;
2129 static const st::translate_field_name_table table{
2130 data::fields_size,
2131 data::fields_names.data(),
2132 data::fields_ids.data(),
2133 data::fields_types.data()};
2134 st::translate_field_name(_fname, fid, _ftype, table);
2135 }
2136
2137 } // namespace detail
2138 } // namespace thrift
2139 } // namespace apache
2140
2141 namespace apache { namespace thrift { namespace fixtures { namespace types {
2142
2143 NoexceptMoveComplexStruct::NoexceptMoveComplexStruct(const NoexceptMoveComplexStruct&) = default;
2144 NoexceptMoveComplexStruct& NoexceptMoveComplexStruct::operator=(const NoexceptMoveComplexStruct&) = default;
NoexceptMoveComplexStruct()2145 NoexceptMoveComplexStruct::NoexceptMoveComplexStruct() :
2146 __fbthrift_field_MyBoolField(),
2147 __fbthrift_field_MyIntField(static_cast<::std::int64_t>(12)),
2148 __fbthrift_field_MyStringField(apache::thrift::StringTraits<std::string>::fromStringLiteral("test")),
2149 __fbthrift_field_MyMapEnumAndInt(static_cast<::std::map<::apache::thrift::fixtures::types::MyEnumA, ::std::string>>(std::initializer_list<std::pair<const ::apache::thrift::fixtures::types::MyEnumA, ::std::string>>{{ ::apache::thrift::fixtures::types::MyEnumA::fieldA, apache::thrift::StringTraits<std::string>::fromStringLiteral("fieldA")},
2150 { ::apache::thrift::fixtures::types::MyEnumA::fieldC, apache::thrift::StringTraits<std::string>::fromStringLiteral("fieldC")}})) {
2151 }
2152
2153
~NoexceptMoveComplexStruct()2154 NoexceptMoveComplexStruct::~NoexceptMoveComplexStruct() {}
2155
NoexceptMoveComplexStruct(NoexceptMoveComplexStruct && other)2156 NoexceptMoveComplexStruct::NoexceptMoveComplexStruct(NoexceptMoveComplexStruct&& other) noexcept :
2157 __fbthrift_field_MyBoolField(std::move(other.__fbthrift_field_MyBoolField)),
2158 __fbthrift_field_MyIntField(std::move(other.__fbthrift_field_MyIntField)),
2159 __fbthrift_field_MyStringField(std::move(other.__fbthrift_field_MyStringField)),
2160 __fbthrift_field_MyStringField2(std::move(other.__fbthrift_field_MyStringField2)),
2161 __fbthrift_field_MyBinaryField(std::move(other.__fbthrift_field_MyBinaryField)),
2162 __fbthrift_field_MyBinaryField2(std::move(other.__fbthrift_field_MyBinaryField2)),
2163 MyBinaryField3(std::move(other.MyBinaryField3)),
2164 __fbthrift_field_MyBinaryListField4(std::move(other.__fbthrift_field_MyBinaryListField4)),
2165 __fbthrift_field_MyMapEnumAndInt(std::move(other.__fbthrift_field_MyMapEnumAndInt)),
2166 __isset(other.__isset) {
2167 }
2168
operator =(FOLLY_MAYBE_UNUSED NoexceptMoveComplexStruct && other)2169 NoexceptMoveComplexStruct& NoexceptMoveComplexStruct::operator=(FOLLY_MAYBE_UNUSED NoexceptMoveComplexStruct&& other) noexcept {
2170 this->__fbthrift_field_MyBoolField = std::move(other.__fbthrift_field_MyBoolField);
2171 this->__fbthrift_field_MyIntField = std::move(other.__fbthrift_field_MyIntField);
2172 this->__fbthrift_field_MyStringField = std::move(other.__fbthrift_field_MyStringField);
2173 this->__fbthrift_field_MyStringField2 = std::move(other.__fbthrift_field_MyStringField2);
2174 this->__fbthrift_field_MyBinaryField = std::move(other.__fbthrift_field_MyBinaryField);
2175 this->__fbthrift_field_MyBinaryField2 = std::move(other.__fbthrift_field_MyBinaryField2);
2176 this->MyBinaryField3 = std::move(other.MyBinaryField3);
2177 this->__fbthrift_field_MyBinaryListField4 = std::move(other.__fbthrift_field_MyBinaryListField4);
2178 this->__fbthrift_field_MyMapEnumAndInt = std::move(other.__fbthrift_field_MyMapEnumAndInt);
2179 __isset = other.__isset;
2180 return *this;
2181 }
2182
2183
NoexceptMoveComplexStruct(apache::thrift::FragileConstructor,bool MyBoolField__arg,::std::int64_t MyIntField__arg,::std::string MyStringField__arg,::std::string MyStringField2__arg,::std::string MyBinaryField__arg,::std::string MyBinaryField2__arg,::std::string MyBinaryField3__arg,::std::vector<::std::string> MyBinaryListField4__arg,::std::map<::apache::thrift::fixtures::types::MyEnumA,::std::string> MyMapEnumAndInt__arg)2184 NoexceptMoveComplexStruct::NoexceptMoveComplexStruct(apache::thrift::FragileConstructor, bool MyBoolField__arg, ::std::int64_t MyIntField__arg, ::std::string MyStringField__arg, ::std::string MyStringField2__arg, ::std::string MyBinaryField__arg, ::std::string MyBinaryField2__arg, ::std::string MyBinaryField3__arg, ::std::vector<::std::string> MyBinaryListField4__arg, ::std::map<::apache::thrift::fixtures::types::MyEnumA, ::std::string> MyMapEnumAndInt__arg) :
2185 __fbthrift_field_MyBoolField(std::move(MyBoolField__arg)),
2186 __fbthrift_field_MyIntField(std::move(MyIntField__arg)),
2187 __fbthrift_field_MyStringField(std::move(MyStringField__arg)),
2188 __fbthrift_field_MyStringField2(std::move(MyStringField2__arg)),
2189 __fbthrift_field_MyBinaryField(std::move(MyBinaryField__arg)),
2190 __fbthrift_field_MyBinaryField2(std::move(MyBinaryField2__arg)),
2191 MyBinaryField3(std::move(MyBinaryField3__arg)),
2192 __fbthrift_field_MyBinaryListField4(std::move(MyBinaryListField4__arg)),
2193 __fbthrift_field_MyMapEnumAndInt(std::move(MyMapEnumAndInt__arg)) {
2194 __isset.set(folly::index_constant<0>(), true);
2195 __isset.set(folly::index_constant<1>(), true);
2196 __isset.set(folly::index_constant<2>(), true);
2197 __isset.set(folly::index_constant<3>(), true);
2198 __isset.set(folly::index_constant<4>(), true);
2199 __isset.set(folly::index_constant<5>(), true);
2200 __isset.set(folly::index_constant<6>(), true);
2201 __isset.set(folly::index_constant<7>(), true);
2202 }
2203
2204
__fbthrift_clear()2205 void NoexceptMoveComplexStruct::__fbthrift_clear() {
2206 // clear all fields
2207 this->__fbthrift_field_MyBoolField = bool();
2208 this->__fbthrift_field_MyIntField = static_cast<::std::int64_t>(12);
2209 this->__fbthrift_field_MyStringField = apache::thrift::StringTraits<std::string>::fromStringLiteral("test");
2210 this->__fbthrift_field_MyStringField2 = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
2211 this->__fbthrift_field_MyBinaryField = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
2212 this->__fbthrift_field_MyBinaryField2 = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
2213 this->MyBinaryField3 = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
2214 this->__fbthrift_field_MyBinaryListField4.clear();
2215 this->__fbthrift_field_MyMapEnumAndInt.clear();
2216 __isset = {};
2217 }
2218
operator ==(const NoexceptMoveComplexStruct & rhs) const2219 bool NoexceptMoveComplexStruct::operator==(const NoexceptMoveComplexStruct& rhs) const {
2220 (void)rhs;
2221 auto& lhs = *this;
2222 (void)lhs;
2223 if (!(lhs.MyBoolField_ref() == rhs.MyBoolField_ref())) {
2224 return false;
2225 }
2226 if (!(lhs.MyIntField_ref() == rhs.MyIntField_ref())) {
2227 return false;
2228 }
2229 if (!(lhs.MyStringField_ref() == rhs.MyStringField_ref())) {
2230 return false;
2231 }
2232 if (!(lhs.MyStringField2_ref() == rhs.MyStringField2_ref())) {
2233 return false;
2234 }
2235 if (!apache::thrift::StringTraits<std::string>::isEqual(lhs.__fbthrift_field_MyBinaryField, rhs.__fbthrift_field_MyBinaryField)) {
2236 return false;
2237 }
2238 if (lhs.MyBinaryField2_ref().has_value() != rhs.MyBinaryField2_ref().has_value() || (lhs.MyBinaryField2_ref().has_value() && !apache::thrift::StringTraits<std::string>::isEqual(lhs.__fbthrift_field_MyBinaryField2, rhs.__fbthrift_field_MyBinaryField2))) {
2239 return false;
2240 }
2241 if (!apache::thrift::StringTraits<std::string>::isEqual(lhs.MyBinaryField3, rhs.MyBinaryField3)) {
2242 return false;
2243 }
2244 if (!(lhs.MyBinaryListField4_ref() == rhs.MyBinaryListField4_ref())) {
2245 return false;
2246 }
2247 if (!(lhs.MyMapEnumAndInt_ref() == rhs.MyMapEnumAndInt_ref())) {
2248 return false;
2249 }
2250 return true;
2251 }
2252
operator <(const NoexceptMoveComplexStruct & rhs) const2253 bool NoexceptMoveComplexStruct::operator<(const NoexceptMoveComplexStruct& rhs) const {
2254 (void)rhs;
2255 auto& lhs = *this;
2256 (void)lhs;
2257 if (!(lhs.MyBoolField_ref() == rhs.MyBoolField_ref())) {
2258 return lhs.MyBoolField_ref() < rhs.MyBoolField_ref();
2259 }
2260 if (!(lhs.MyIntField_ref() == rhs.MyIntField_ref())) {
2261 return lhs.MyIntField_ref() < rhs.MyIntField_ref();
2262 }
2263 if (!(lhs.MyStringField_ref() == rhs.MyStringField_ref())) {
2264 return lhs.MyStringField_ref() < rhs.MyStringField_ref();
2265 }
2266 if (!(lhs.MyStringField2_ref() == rhs.MyStringField2_ref())) {
2267 return lhs.MyStringField2_ref() < rhs.MyStringField2_ref();
2268 }
2269 if (!apache::thrift::StringTraits<std::string>::isEqual(lhs.__fbthrift_field_MyBinaryField, rhs.__fbthrift_field_MyBinaryField)) {
2270 return apache::thrift::StringTraits<std::string>::isLess(lhs.__fbthrift_field_MyBinaryField, rhs.__fbthrift_field_MyBinaryField);
2271 }
2272 if (lhs.MyBinaryField2_ref().has_value() != rhs.MyBinaryField2_ref().has_value() || (lhs.MyBinaryField2_ref().has_value() && !apache::thrift::StringTraits<std::string>::isEqual(lhs.__fbthrift_field_MyBinaryField2, rhs.__fbthrift_field_MyBinaryField2))) {
2273 return !lhs.MyBinaryField2_ref().has_value() || (rhs.MyBinaryField2_ref().has_value() && apache::thrift::StringTraits<std::string>::isLess(lhs.__fbthrift_field_MyBinaryField2, rhs.__fbthrift_field_MyBinaryField2));
2274 }
2275 if (!apache::thrift::StringTraits<std::string>::isEqual(lhs.MyBinaryField3, rhs.MyBinaryField3)) {
2276 return apache::thrift::StringTraits<std::string>::isLess(lhs.MyBinaryField3, rhs.MyBinaryField3);
2277 }
2278 if (!(lhs.MyBinaryListField4_ref() == rhs.MyBinaryListField4_ref())) {
2279 return lhs.MyBinaryListField4_ref() < rhs.MyBinaryListField4_ref();
2280 }
2281 if (!(lhs.MyMapEnumAndInt_ref() == rhs.MyMapEnumAndInt_ref())) {
2282 return lhs.MyMapEnumAndInt_ref() < rhs.MyMapEnumAndInt_ref();
2283 }
2284 return false;
2285 }
2286
get_MyBinaryListField4() const2287 const ::std::vector<::std::string>& NoexceptMoveComplexStruct::get_MyBinaryListField4() const& {
2288 return __fbthrift_field_MyBinaryListField4;
2289 }
2290
get_MyBinaryListField4()2291 ::std::vector<::std::string> NoexceptMoveComplexStruct::get_MyBinaryListField4() && {
2292 return std::move(__fbthrift_field_MyBinaryListField4);
2293 }
2294
get_MyMapEnumAndInt() const2295 const ::std::map<::apache::thrift::fixtures::types::MyEnumA, ::std::string>& NoexceptMoveComplexStruct::get_MyMapEnumAndInt() const& {
2296 return __fbthrift_field_MyMapEnumAndInt;
2297 }
2298
get_MyMapEnumAndInt()2299 ::std::map<::apache::thrift::fixtures::types::MyEnumA, ::std::string> NoexceptMoveComplexStruct::get_MyMapEnumAndInt() && {
2300 return std::move(__fbthrift_field_MyMapEnumAndInt);
2301 }
2302
2303
swap(NoexceptMoveComplexStruct & a,NoexceptMoveComplexStruct & b)2304 void swap(NoexceptMoveComplexStruct& a, NoexceptMoveComplexStruct& b) {
2305 using ::std::swap;
2306 swap(a.MyBoolField_ref().value(), b.MyBoolField_ref().value());
2307 swap(a.MyIntField_ref().value(), b.MyIntField_ref().value());
2308 swap(a.MyStringField_ref().value(), b.MyStringField_ref().value());
2309 swap(a.MyStringField2_ref().value(), b.MyStringField2_ref().value());
2310 swap(a.MyBinaryField_ref().value(), b.MyBinaryField_ref().value());
2311 swap(a.MyBinaryField2_ref().value_unchecked(), b.MyBinaryField2_ref().value_unchecked());
2312 swap(a.MyBinaryField3_ref().value(), b.MyBinaryField3_ref().value());
2313 swap(a.MyBinaryListField4_ref().value(), b.MyBinaryListField4_ref().value());
2314 swap(a.MyMapEnumAndInt_ref().value(), b.MyMapEnumAndInt_ref().value());
2315 swap(a.__isset, b.__isset);
2316 }
2317
2318 template void NoexceptMoveComplexStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
2319 template uint32_t NoexceptMoveComplexStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
2320 template uint32_t NoexceptMoveComplexStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
2321 template uint32_t NoexceptMoveComplexStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
2322 template void NoexceptMoveComplexStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
2323 template uint32_t NoexceptMoveComplexStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
2324 template uint32_t NoexceptMoveComplexStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
2325 template uint32_t NoexceptMoveComplexStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
2326
2327
2328
2329 }}}} // apache::thrift::fixtures::types
2330
2331 namespace apache {
2332 namespace thrift {
2333 namespace detail {
2334
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)2335 void TccStructTraits<::apache::thrift::fixtures::types::NoExceptMoveUnion>::translateFieldName(
2336 folly::StringPiece _fname,
2337 int16_t& fid,
2338 apache::thrift::protocol::TType& _ftype) noexcept {
2339 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::NoExceptMoveUnion>;
2340 static const st::translate_field_name_table table{
2341 data::fields_size,
2342 data::fields_names.data(),
2343 data::fields_ids.data(),
2344 data::fields_types.data()};
2345 st::translate_field_name(_fname, fid, _ftype, table);
2346 }
2347
2348 } // namespace detail
2349 } // namespace thrift
2350 } // namespace apache
2351
2352 namespace apache { namespace thrift {
2353
2354 constexpr std::size_t const TEnumTraits<::apache::thrift::fixtures::types::NoExceptMoveUnion::Type>::size;
2355 folly::Range<::apache::thrift::fixtures::types::NoExceptMoveUnion::Type const*> const TEnumTraits<::apache::thrift::fixtures::types::NoExceptMoveUnion::Type>::values = folly::range(TEnumDataStorage<::apache::thrift::fixtures::types::NoExceptMoveUnion::Type>::values);
2356 folly::Range<folly::StringPiece const*> const TEnumTraits<::apache::thrift::fixtures::types::NoExceptMoveUnion::Type>::names = folly::range(TEnumDataStorage<::apache::thrift::fixtures::types::NoExceptMoveUnion::Type>::names);
2357
findName(type value)2358 char const* TEnumTraits<::apache::thrift::fixtures::types::NoExceptMoveUnion::Type>::findName(type value) {
2359 using factory = detail::TEnumMapFactory<::apache::thrift::fixtures::types::NoExceptMoveUnion::Type>;
2360 static folly::Indestructible<factory::ValuesToNamesMapType> const map{
2361 factory::makeValuesToNamesMap()};
2362 auto found = map->find(value);
2363 return found == map->end() ? nullptr : found->second;
2364 }
2365
findValue(char const * name,type * out)2366 bool TEnumTraits<::apache::thrift::fixtures::types::NoExceptMoveUnion::Type>::findValue(char const* name, type* out) {
2367 using factory = detail::TEnumMapFactory<::apache::thrift::fixtures::types::NoExceptMoveUnion::Type>;
2368 static folly::Indestructible<factory::NamesToValuesMapType> const map{
2369 factory::makeNamesToValuesMap()};
2370 auto found = map->find(name);
2371 return found == map->end() ? false : (*out = found->second, true);
2372 }
2373 }} // apache::thrift
2374 namespace apache { namespace thrift { namespace fixtures { namespace types {
2375
__fbthrift_clear()2376 void NoExceptMoveUnion::__fbthrift_clear() {
2377 // clear all fields
2378 if (type_ == Type::__EMPTY__) { return; }
2379 switch(type_) {
2380 case Type::string_field:
2381 destruct(value_.string_field);
2382 break;
2383 case Type::i32_field:
2384 destruct(value_.i32_field);
2385 break;
2386 default:
2387 assert(false);
2388 break;
2389 }
2390 type_ = Type::__EMPTY__;
2391 }
2392
operator ==(const NoExceptMoveUnion & rhs) const2393 bool NoExceptMoveUnion::operator==(const NoExceptMoveUnion& rhs) const {
2394 if (type_ != rhs.type_) { return false; }
2395 switch(type_) {
2396 case Type::string_field:
2397 return value_.string_field == rhs.value_.string_field;
2398 case Type::i32_field:
2399 return value_.i32_field == rhs.value_.i32_field;
2400 default:
2401 return true;
2402 }
2403 }
2404
operator <(const NoExceptMoveUnion & rhs) const2405 bool NoExceptMoveUnion::operator<(const NoExceptMoveUnion& rhs) const {
2406 (void)rhs;
2407 auto& lhs = *this;
2408 (void)lhs;
2409 if (lhs.type_ != rhs.type_) {
2410 return lhs.type_ < rhs.type_;
2411 }
2412 switch (lhs.type_) {
2413 case Type::string_field:
2414 return lhs.value_.string_field < rhs.value_.string_field;
2415 case Type::i32_field:
2416 return lhs.value_.i32_field < rhs.value_.i32_field;
2417 default:
2418 return false;
2419 }
2420 }
2421
swap(NoExceptMoveUnion & a,NoExceptMoveUnion & b)2422 void swap(NoExceptMoveUnion& a, NoExceptMoveUnion& b) {
2423 NoExceptMoveUnion temp(std::move(a));
2424 a = std::move(b);
2425 b = std::move(temp);
2426 }
2427
2428 template void NoExceptMoveUnion::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
2429 template uint32_t NoExceptMoveUnion::write<>(apache::thrift::BinaryProtocolWriter*) const;
2430 template uint32_t NoExceptMoveUnion::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
2431 template uint32_t NoExceptMoveUnion::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
2432 template void NoExceptMoveUnion::readNoXfer<>(apache::thrift::CompactProtocolReader*);
2433 template uint32_t NoExceptMoveUnion::write<>(apache::thrift::CompactProtocolWriter*) const;
2434 template uint32_t NoExceptMoveUnion::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
2435 template uint32_t NoExceptMoveUnion::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
2436
2437
2438
2439 }}}} // apache::thrift::fixtures::types
2440
2441 namespace apache {
2442 namespace thrift {
2443 namespace detail {
2444
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)2445 void TccStructTraits<::apache::thrift::fixtures::types::AllocatorAware>::translateFieldName(
2446 folly::StringPiece _fname,
2447 int16_t& fid,
2448 apache::thrift::protocol::TType& _ftype) noexcept {
2449 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::AllocatorAware>;
2450 static const st::translate_field_name_table table{
2451 data::fields_size,
2452 data::fields_names.data(),
2453 data::fields_ids.data(),
2454 data::fields_types.data()};
2455 st::translate_field_name(_fname, fid, _ftype, table);
2456 }
2457
2458 } // namespace detail
2459 } // namespace thrift
2460 } // namespace apache
2461
2462 namespace apache { namespace thrift { namespace fixtures { namespace types {
2463
2464 AllocatorAware::AllocatorAware(const AllocatorAware&) = default;
2465 AllocatorAware& AllocatorAware::operator=(const AllocatorAware&) = default;
AllocatorAware()2466 AllocatorAware::AllocatorAware() :
2467 __fbthrift_field_not_a_container() {
2468 }
2469
2470
~AllocatorAware()2471 AllocatorAware::~AllocatorAware() {}
2472
AllocatorAware(AllocatorAware && other)2473 AllocatorAware::AllocatorAware(AllocatorAware&& other) noexcept :
2474 __fbthrift_field_aa_list(std::move(other.__fbthrift_field_aa_list)),
2475 __fbthrift_field_aa_set(std::move(other.__fbthrift_field_aa_set)),
2476 __fbthrift_field_aa_map(std::move(other.__fbthrift_field_aa_map)),
2477 __fbthrift_field_aa_string(std::move(other.__fbthrift_field_aa_string)),
2478 __fbthrift_field_not_a_container(std::move(other.__fbthrift_field_not_a_container)),
2479 __isset(other.__isset) {
2480 }
2481
operator =(FOLLY_MAYBE_UNUSED AllocatorAware && other)2482 AllocatorAware& AllocatorAware::operator=(FOLLY_MAYBE_UNUSED AllocatorAware&& other) noexcept {
2483 this->__fbthrift_field_aa_list = std::move(other.__fbthrift_field_aa_list);
2484 this->__fbthrift_field_aa_set = std::move(other.__fbthrift_field_aa_set);
2485 this->__fbthrift_field_aa_map = std::move(other.__fbthrift_field_aa_map);
2486 this->__fbthrift_field_aa_string = std::move(other.__fbthrift_field_aa_string);
2487 this->__fbthrift_field_not_a_container = std::move(other.__fbthrift_field_not_a_container);
2488 __isset = other.__isset;
2489 return *this;
2490 }
2491
2492
AllocatorAware(apache::thrift::FragileConstructor,::std::vector<::std::int32_t> aa_list__arg,::std::set<::std::int32_t> aa_set__arg,::std::map<::std::int32_t,::std::int32_t> aa_map__arg,::std::string aa_string__arg,::std::int32_t not_a_container__arg)2493 AllocatorAware::AllocatorAware(apache::thrift::FragileConstructor, ::std::vector<::std::int32_t> aa_list__arg, ::std::set<::std::int32_t> aa_set__arg, ::std::map<::std::int32_t, ::std::int32_t> aa_map__arg, ::std::string aa_string__arg, ::std::int32_t not_a_container__arg) :
2494 __fbthrift_field_aa_list(std::move(aa_list__arg)),
2495 __fbthrift_field_aa_set(std::move(aa_set__arg)),
2496 __fbthrift_field_aa_map(std::move(aa_map__arg)),
2497 __fbthrift_field_aa_string(std::move(aa_string__arg)),
2498 __fbthrift_field_not_a_container(std::move(not_a_container__arg)) {
2499 __isset.set(folly::index_constant<0>(), true);
2500 __isset.set(folly::index_constant<1>(), true);
2501 __isset.set(folly::index_constant<2>(), true);
2502 __isset.set(folly::index_constant<3>(), true);
2503 __isset.set(folly::index_constant<4>(), true);
2504 }
2505
2506
__fbthrift_clear()2507 void AllocatorAware::__fbthrift_clear() {
2508 // clear all fields
2509 this->__fbthrift_field_aa_list.clear();
2510 this->__fbthrift_field_aa_set.clear();
2511 this->__fbthrift_field_aa_map.clear();
2512 this->__fbthrift_field_aa_string = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
2513 this->__fbthrift_field_not_a_container = ::std::int32_t();
2514 __isset = {};
2515 }
2516
operator ==(const AllocatorAware & rhs) const2517 bool AllocatorAware::operator==(const AllocatorAware& rhs) const {
2518 (void)rhs;
2519 auto& lhs = *this;
2520 (void)lhs;
2521 if (!(lhs.aa_list_ref() == rhs.aa_list_ref())) {
2522 return false;
2523 }
2524 if (!(lhs.aa_set_ref() == rhs.aa_set_ref())) {
2525 return false;
2526 }
2527 if (!(lhs.aa_map_ref() == rhs.aa_map_ref())) {
2528 return false;
2529 }
2530 if (!(lhs.aa_string_ref() == rhs.aa_string_ref())) {
2531 return false;
2532 }
2533 if (!(lhs.not_a_container_ref() == rhs.not_a_container_ref())) {
2534 return false;
2535 }
2536 return true;
2537 }
2538
operator <(const AllocatorAware & rhs) const2539 bool AllocatorAware::operator<(const AllocatorAware& rhs) const {
2540 (void)rhs;
2541 auto& lhs = *this;
2542 (void)lhs;
2543 if (!(lhs.aa_list_ref() == rhs.aa_list_ref())) {
2544 return lhs.aa_list_ref() < rhs.aa_list_ref();
2545 }
2546 if (!(lhs.aa_set_ref() == rhs.aa_set_ref())) {
2547 return lhs.aa_set_ref() < rhs.aa_set_ref();
2548 }
2549 if (!(lhs.aa_map_ref() == rhs.aa_map_ref())) {
2550 return lhs.aa_map_ref() < rhs.aa_map_ref();
2551 }
2552 if (!(lhs.aa_string_ref() == rhs.aa_string_ref())) {
2553 return lhs.aa_string_ref() < rhs.aa_string_ref();
2554 }
2555 if (!(lhs.not_a_container_ref() == rhs.not_a_container_ref())) {
2556 return lhs.not_a_container_ref() < rhs.not_a_container_ref();
2557 }
2558 return false;
2559 }
2560
get_aa_list() const2561 const ::std::vector<::std::int32_t>& AllocatorAware::get_aa_list() const& {
2562 return __fbthrift_field_aa_list;
2563 }
2564
get_aa_list()2565 ::std::vector<::std::int32_t> AllocatorAware::get_aa_list() && {
2566 return std::move(__fbthrift_field_aa_list);
2567 }
2568
get_aa_set() const2569 const ::std::set<::std::int32_t>& AllocatorAware::get_aa_set() const& {
2570 return __fbthrift_field_aa_set;
2571 }
2572
get_aa_set()2573 ::std::set<::std::int32_t> AllocatorAware::get_aa_set() && {
2574 return std::move(__fbthrift_field_aa_set);
2575 }
2576
get_aa_map() const2577 const ::std::map<::std::int32_t, ::std::int32_t>& AllocatorAware::get_aa_map() const& {
2578 return __fbthrift_field_aa_map;
2579 }
2580
get_aa_map()2581 ::std::map<::std::int32_t, ::std::int32_t> AllocatorAware::get_aa_map() && {
2582 return std::move(__fbthrift_field_aa_map);
2583 }
2584
2585
swap(AllocatorAware & a,AllocatorAware & b)2586 void swap(AllocatorAware& a, AllocatorAware& b) {
2587 using ::std::swap;
2588 swap(a.aa_list_ref().value(), b.aa_list_ref().value());
2589 swap(a.aa_set_ref().value(), b.aa_set_ref().value());
2590 swap(a.aa_map_ref().value(), b.aa_map_ref().value());
2591 swap(a.aa_string_ref().value(), b.aa_string_ref().value());
2592 swap(a.not_a_container_ref().value(), b.not_a_container_ref().value());
2593 swap(a.__isset, b.__isset);
2594 }
2595
2596 template void AllocatorAware::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
2597 template uint32_t AllocatorAware::write<>(apache::thrift::BinaryProtocolWriter*) const;
2598 template uint32_t AllocatorAware::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
2599 template uint32_t AllocatorAware::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
2600 template void AllocatorAware::readNoXfer<>(apache::thrift::CompactProtocolReader*);
2601 template uint32_t AllocatorAware::write<>(apache::thrift::CompactProtocolWriter*) const;
2602 template uint32_t AllocatorAware::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
2603 template uint32_t AllocatorAware::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
2604
2605
2606
2607 }}}} // apache::thrift::fixtures::types
2608
2609 namespace apache {
2610 namespace thrift {
2611 namespace detail {
2612
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)2613 void TccStructTraits<::apache::thrift::fixtures::types::AllocatorAware2>::translateFieldName(
2614 folly::StringPiece _fname,
2615 int16_t& fid,
2616 apache::thrift::protocol::TType& _ftype) noexcept {
2617 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::AllocatorAware2>;
2618 static const st::translate_field_name_table table{
2619 data::fields_size,
2620 data::fields_names.data(),
2621 data::fields_ids.data(),
2622 data::fields_types.data()};
2623 st::translate_field_name(_fname, fid, _ftype, table);
2624 }
2625
2626 } // namespace detail
2627 } // namespace thrift
2628 } // namespace apache
2629
2630 namespace apache { namespace thrift { namespace fixtures { namespace types {
2631
2632 AllocatorAware2::AllocatorAware2(const AllocatorAware2&) = default;
2633 AllocatorAware2& AllocatorAware2::operator=(const AllocatorAware2&) = default;
AllocatorAware2(AllocatorAware2 && other)2634 AllocatorAware2::AllocatorAware2(AllocatorAware2&& other) noexcept :
2635 __fbthrift_field_not_a_container(std::move(other.__fbthrift_field_not_a_container)),
2636 __isset(other.__isset) {
2637 }
2638
operator =(FOLLY_MAYBE_UNUSED AllocatorAware2 && other)2639 AllocatorAware2& AllocatorAware2::operator=(FOLLY_MAYBE_UNUSED AllocatorAware2&& other) noexcept {
2640 this->__fbthrift_field_not_a_container = std::move(other.__fbthrift_field_not_a_container);
2641 __isset = other.__isset;
2642 return *this;
2643 }
2644
2645
AllocatorAware2(apache::thrift::FragileConstructor,::std::int32_t not_a_container__arg)2646 AllocatorAware2::AllocatorAware2(apache::thrift::FragileConstructor, ::std::int32_t not_a_container__arg) :
2647 __fbthrift_field_not_a_container(std::move(not_a_container__arg)) {
2648 __isset.set(folly::index_constant<0>(), true);
2649 }
2650
2651
__fbthrift_clear()2652 void AllocatorAware2::__fbthrift_clear() {
2653 // clear all fields
2654 this->__fbthrift_field_not_a_container = ::std::int32_t();
2655 __isset = {};
2656 }
2657
operator ==(const AllocatorAware2 & rhs) const2658 bool AllocatorAware2::operator==(const AllocatorAware2& rhs) const {
2659 (void)rhs;
2660 auto& lhs = *this;
2661 (void)lhs;
2662 if (!(lhs.not_a_container_ref() == rhs.not_a_container_ref())) {
2663 return false;
2664 }
2665 return true;
2666 }
2667
operator <(const AllocatorAware2 & rhs) const2668 bool AllocatorAware2::operator<(const AllocatorAware2& rhs) const {
2669 (void)rhs;
2670 auto& lhs = *this;
2671 (void)lhs;
2672 if (!(lhs.not_a_container_ref() == rhs.not_a_container_ref())) {
2673 return lhs.not_a_container_ref() < rhs.not_a_container_ref();
2674 }
2675 return false;
2676 }
2677
2678
swap(AllocatorAware2 & a,AllocatorAware2 & b)2679 void swap(AllocatorAware2& a, AllocatorAware2& b) {
2680 using ::std::swap;
2681 swap(a.not_a_container_ref().value(), b.not_a_container_ref().value());
2682 swap(a.__isset, b.__isset);
2683 }
2684
2685 template void AllocatorAware2::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
2686 template uint32_t AllocatorAware2::write<>(apache::thrift::BinaryProtocolWriter*) const;
2687 template uint32_t AllocatorAware2::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
2688 template uint32_t AllocatorAware2::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
2689 template void AllocatorAware2::readNoXfer<>(apache::thrift::CompactProtocolReader*);
2690 template uint32_t AllocatorAware2::write<>(apache::thrift::CompactProtocolWriter*) const;
2691 template uint32_t AllocatorAware2::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
2692 template uint32_t AllocatorAware2::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
2693
2694
2695
2696 }}}} // apache::thrift::fixtures::types
2697
2698 namespace apache {
2699 namespace thrift {
2700 namespace detail {
2701
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)2702 void TccStructTraits<::apache::thrift::fixtures::types::TypedefStruct>::translateFieldName(
2703 folly::StringPiece _fname,
2704 int16_t& fid,
2705 apache::thrift::protocol::TType& _ftype) noexcept {
2706 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::TypedefStruct>;
2707 static const st::translate_field_name_table table{
2708 data::fields_size,
2709 data::fields_names.data(),
2710 data::fields_ids.data(),
2711 data::fields_types.data()};
2712 st::translate_field_name(_fname, fid, _ftype, table);
2713 }
2714
2715 } // namespace detail
2716 } // namespace thrift
2717 } // namespace apache
2718
2719 namespace apache { namespace thrift { namespace fixtures { namespace types {
2720
2721 TypedefStruct::TypedefStruct(const TypedefStruct&) = default;
2722 TypedefStruct& TypedefStruct::operator=(const TypedefStruct&) = default;
TypedefStruct(TypedefStruct && other)2723 TypedefStruct::TypedefStruct(TypedefStruct&& other) noexcept :
2724 __fbthrift_field_i32_field(std::move(other.__fbthrift_field_i32_field)),
2725 __fbthrift_field_IntTypedef_field(std::move(other.__fbthrift_field_IntTypedef_field)),
2726 __fbthrift_field_UintTypedef_field(std::move(other.__fbthrift_field_UintTypedef_field)),
2727 __isset(other.__isset) {
2728 }
2729
operator =(FOLLY_MAYBE_UNUSED TypedefStruct && other)2730 TypedefStruct& TypedefStruct::operator=(FOLLY_MAYBE_UNUSED TypedefStruct&& other) noexcept {
2731 this->__fbthrift_field_i32_field = std::move(other.__fbthrift_field_i32_field);
2732 this->__fbthrift_field_IntTypedef_field = std::move(other.__fbthrift_field_IntTypedef_field);
2733 this->__fbthrift_field_UintTypedef_field = std::move(other.__fbthrift_field_UintTypedef_field);
2734 __isset = other.__isset;
2735 return *this;
2736 }
2737
2738
TypedefStruct(apache::thrift::FragileConstructor,::std::int32_t i32_field__arg,::apache::thrift::fixtures::types::IntTypedef IntTypedef_field__arg,std::uint32_t UintTypedef_field__arg)2739 TypedefStruct::TypedefStruct(apache::thrift::FragileConstructor, ::std::int32_t i32_field__arg, ::apache::thrift::fixtures::types::IntTypedef IntTypedef_field__arg, std::uint32_t UintTypedef_field__arg) :
2740 __fbthrift_field_i32_field(std::move(i32_field__arg)),
2741 __fbthrift_field_IntTypedef_field(std::move(IntTypedef_field__arg)),
2742 __fbthrift_field_UintTypedef_field(std::move(UintTypedef_field__arg)) {
2743 __isset.set(folly::index_constant<0>(), true);
2744 __isset.set(folly::index_constant<1>(), true);
2745 __isset.set(folly::index_constant<2>(), true);
2746 }
2747
2748
__fbthrift_clear()2749 void TypedefStruct::__fbthrift_clear() {
2750 // clear all fields
2751 this->__fbthrift_field_i32_field = ::std::int32_t();
2752 this->__fbthrift_field_IntTypedef_field = ::apache::thrift::fixtures::types::IntTypedef();
2753 this->__fbthrift_field_UintTypedef_field = std::uint32_t();
2754 __isset = {};
2755 }
2756
operator ==(const TypedefStruct & rhs) const2757 bool TypedefStruct::operator==(const TypedefStruct& rhs) const {
2758 (void)rhs;
2759 auto& lhs = *this;
2760 (void)lhs;
2761 if (!(lhs.i32_field_ref() == rhs.i32_field_ref())) {
2762 return false;
2763 }
2764 if (!(lhs.IntTypedef_field_ref() == rhs.IntTypedef_field_ref())) {
2765 return false;
2766 }
2767 if (!(lhs.UintTypedef_field_ref() == rhs.UintTypedef_field_ref())) {
2768 return false;
2769 }
2770 return true;
2771 }
2772
operator <(const TypedefStruct & rhs) const2773 bool TypedefStruct::operator<(const TypedefStruct& rhs) const {
2774 (void)rhs;
2775 auto& lhs = *this;
2776 (void)lhs;
2777 if (!(lhs.i32_field_ref() == rhs.i32_field_ref())) {
2778 return lhs.i32_field_ref() < rhs.i32_field_ref();
2779 }
2780 if (!(lhs.IntTypedef_field_ref() == rhs.IntTypedef_field_ref())) {
2781 return lhs.IntTypedef_field_ref() < rhs.IntTypedef_field_ref();
2782 }
2783 if (!(lhs.UintTypedef_field_ref() == rhs.UintTypedef_field_ref())) {
2784 return lhs.UintTypedef_field_ref() < rhs.UintTypedef_field_ref();
2785 }
2786 return false;
2787 }
2788
2789
swap(TypedefStruct & a,TypedefStruct & b)2790 void swap(TypedefStruct& a, TypedefStruct& b) {
2791 using ::std::swap;
2792 swap(a.i32_field_ref().value(), b.i32_field_ref().value());
2793 swap(a.IntTypedef_field_ref().value(), b.IntTypedef_field_ref().value());
2794 swap(a.UintTypedef_field_ref().value(), b.UintTypedef_field_ref().value());
2795 swap(a.__isset, b.__isset);
2796 }
2797
2798 template void TypedefStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
2799 template uint32_t TypedefStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
2800 template uint32_t TypedefStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
2801 template uint32_t TypedefStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
2802 template void TypedefStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
2803 template uint32_t TypedefStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
2804 template uint32_t TypedefStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
2805 template uint32_t TypedefStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
2806
2807
2808
2809 }}}} // apache::thrift::fixtures::types
2810
2811 namespace apache {
2812 namespace thrift {
2813 namespace detail {
2814
translateFieldName(folly::StringPiece _fname,int16_t & fid,apache::thrift::protocol::TType & _ftype)2815 void TccStructTraits<::apache::thrift::fixtures::types::StructWithDoubleUnderscores>::translateFieldName(
2816 folly::StringPiece _fname,
2817 int16_t& fid,
2818 apache::thrift::protocol::TType& _ftype) noexcept {
2819 using data = apache::thrift::TStructDataStorage<::apache::thrift::fixtures::types::StructWithDoubleUnderscores>;
2820 static const st::translate_field_name_table table{
2821 data::fields_size,
2822 data::fields_names.data(),
2823 data::fields_ids.data(),
2824 data::fields_types.data()};
2825 st::translate_field_name(_fname, fid, _ftype, table);
2826 }
2827
2828 } // namespace detail
2829 } // namespace thrift
2830 } // namespace apache
2831
2832 namespace apache { namespace thrift { namespace fixtures { namespace types {
2833
2834
StructWithDoubleUnderscores(apache::thrift::FragileConstructor,::std::int32_t __field__arg)2835 StructWithDoubleUnderscores::StructWithDoubleUnderscores(apache::thrift::FragileConstructor, ::std::int32_t __field__arg) :
2836 __fbthrift_field___field(std::move(__field__arg)) {
2837 __isset.set(folly::index_constant<0>(), true);
2838 }
2839
2840
__fbthrift_clear()2841 void StructWithDoubleUnderscores::__fbthrift_clear() {
2842 // clear all fields
2843 this->__fbthrift_field___field = ::std::int32_t();
2844 __isset = {};
2845 }
2846
operator ==(const StructWithDoubleUnderscores & rhs) const2847 bool StructWithDoubleUnderscores::operator==(const StructWithDoubleUnderscores& rhs) const {
2848 (void)rhs;
2849 auto& lhs = *this;
2850 (void)lhs;
2851 if (!(lhs.__field_ref() == rhs.__field_ref())) {
2852 return false;
2853 }
2854 return true;
2855 }
2856
operator <(const StructWithDoubleUnderscores & rhs) const2857 bool StructWithDoubleUnderscores::operator<(const StructWithDoubleUnderscores& rhs) const {
2858 (void)rhs;
2859 auto& lhs = *this;
2860 (void)lhs;
2861 if (!(lhs.__field_ref() == rhs.__field_ref())) {
2862 return lhs.__field_ref() < rhs.__field_ref();
2863 }
2864 return false;
2865 }
2866
2867
swap(StructWithDoubleUnderscores & a,StructWithDoubleUnderscores & b)2868 void swap(StructWithDoubleUnderscores& a, StructWithDoubleUnderscores& b) {
2869 using ::std::swap;
2870 swap(a.__field_ref().value(), b.__field_ref().value());
2871 swap(a.__isset, b.__isset);
2872 }
2873
2874 template void StructWithDoubleUnderscores::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
2875 template uint32_t StructWithDoubleUnderscores::write<>(apache::thrift::BinaryProtocolWriter*) const;
2876 template uint32_t StructWithDoubleUnderscores::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
2877 template uint32_t StructWithDoubleUnderscores::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
2878 template void StructWithDoubleUnderscores::readNoXfer<>(apache::thrift::CompactProtocolReader*);
2879 template uint32_t StructWithDoubleUnderscores::write<>(apache::thrift::CompactProtocolWriter*) const;
2880 template uint32_t StructWithDoubleUnderscores::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
2881 template uint32_t StructWithDoubleUnderscores::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;
2882
2883
2884
2885 }}}} // apache::thrift::fixtures::types
2886
2887 namespace apache { namespace thrift { namespace fixtures { namespace types { namespace {
validateAdapters()2888 FOLLY_MAYBE_UNUSED FOLLY_ERASE void validateAdapters() {
2889 }
2890 }}}}} // apache::thrift::fixtures::types
2891