2 * Autogenerated by Thrift for thrift/compiler/test/fixtures/includes/src/matching_module_name.thrift
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
9 #include <thrift/lib/cpp2/gen/module_types_h.h>
12 #include "other/gen-cpp2/matching_module_name_types.h"
17 struct OtherStructField
;
20 #ifndef APACHE_THRIFT_ACCESSOR_OtherStructField
21 #define APACHE_THRIFT_ACCESSOR_OtherStructField
22 APACHE_THRIFT_DEFINE_ACCESSOR(OtherStructField
);
28 // BEGIN declare_enums
31 // BEGIN forward_declare
32 namespace matching_module_name
{
34 } // matching_module_name
35 // END forward_declare
36 // BEGIN hash_and_equal_to
37 // END hash_and_equal_to
38 namespace matching_module_name
{
39 using ::apache::thrift::detail::operator!=;
40 using ::apache::thrift::detail::operator>;
41 using ::apache::thrift::detail::operator<=;
42 using ::apache::thrift::detail::operator>=;
45 class MyStruct final
{
47 friend struct ::apache::thrift::detail::st::struct_private_access
;
48 template<class> friend struct ::apache::thrift::detail::invoke_reffer
;
50 // used by a static_assert in the corresponding source
51 static constexpr bool __fbthrift_cpp2_gen_json
= false;
52 static const folly::StringPiece
__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord
);
53 using __fbthrift_reflection_ident_list
= folly::tag_t
<
54 ::apache::thrift::ident::OtherStructField
58 void __fbthrift_clear();
59 void __fbthrift_clear_terse_fields();
60 bool __fbthrift_is_empty() const;
63 using __fbthrift_cpp2_type
= MyStruct
;
64 static constexpr bool __fbthrift_cpp2_is_union
=
72 // FragileConstructor for use in initialization lists only.
73 [[deprecated("This constructor is deprecated")]]
74 MyStruct(apache::thrift::FragileConstructor
, ::matching_module_name::OtherStruct OtherStructField__arg
);
76 MyStruct(MyStruct
&&) = default;
78 MyStruct(const MyStruct
&) = default;
81 MyStruct
& operator=(MyStruct
&&) = default;
83 MyStruct
& operator=(const MyStruct
&) = default;
85 ::matching_module_name::OtherStruct __fbthrift_field_OtherStructField
;
87 apache::thrift::detail::isset_bitset
<1, apache::thrift::detail::IssetBitsetOption::Unpacked
> __isset
;
91 bool operator==(const MyStruct
&) const;
92 bool operator<(const MyStruct
&) const;
94 template <typename
..., typename T
= ::matching_module_name::OtherStruct
>
95 FOLLY_ERASE ::apache::thrift::field_ref
<const T
&> OtherStructField_ref() const& {
96 return {this->__fbthrift_field_OtherStructField
, __isset
.at(0), __isset
.bit(0)};
99 template <typename
..., typename T
= ::matching_module_name::OtherStruct
>
100 FOLLY_ERASE ::apache::thrift::field_ref
<const T
&&> OtherStructField_ref() const&& {
101 return {static_cast<const T
&&>(this->__fbthrift_field_OtherStructField
), __isset
.at(0), __isset
.bit(0)};
104 template <typename
..., typename T
= ::matching_module_name::OtherStruct
>
105 FOLLY_ERASE ::apache::thrift::field_ref
<T
&> OtherStructField_ref() & {
106 return {this->__fbthrift_field_OtherStructField
, __isset
.at(0), __isset
.bit(0)};
109 template <typename
..., typename T
= ::matching_module_name::OtherStruct
>
110 FOLLY_ERASE ::apache::thrift::field_ref
<T
&&> OtherStructField_ref() && {
111 return {static_cast<T
&&>(this->__fbthrift_field_OtherStructField
), __isset
.at(0), __isset
.bit(0)};
114 template <typename
..., typename T
= ::matching_module_name::OtherStruct
>
115 FOLLY_ERASE ::apache::thrift::field_ref
<const T
&> OtherStructField() const& {
116 return {this->__fbthrift_field_OtherStructField
, __isset
.at(0), __isset
.bit(0)};
119 template <typename
..., typename T
= ::matching_module_name::OtherStruct
>
120 FOLLY_ERASE ::apache::thrift::field_ref
<const T
&&> OtherStructField() const&& {
121 return {static_cast<const T
&&>(this->__fbthrift_field_OtherStructField
), __isset
.at(0), __isset
.bit(0)};
124 template <typename
..., typename T
= ::matching_module_name::OtherStruct
>
125 FOLLY_ERASE ::apache::thrift::field_ref
<T
&> OtherStructField() & {
126 return {this->__fbthrift_field_OtherStructField
, __isset
.at(0), __isset
.bit(0)};
129 template <typename
..., typename T
= ::matching_module_name::OtherStruct
>
130 FOLLY_ERASE ::apache::thrift::field_ref
<T
&&> OtherStructField() && {
131 return {static_cast<T
&&>(this->__fbthrift_field_OtherStructField
), __isset
.at(0), __isset
.bit(0)};
133 const ::matching_module_name::OtherStruct
& get_OtherStructField() const&;
134 ::matching_module_name::OtherStruct
get_OtherStructField() &&;
136 template <typename T_MyStruct_OtherStructField_struct_setter
= ::matching_module_name::OtherStruct
>
137 [[deprecated("Use `FOO.OtherStructField_ref() = BAR;` instead of `FOO.set_OtherStructField(BAR);`")]]
138 ::matching_module_name::OtherStruct
& set_OtherStructField(T_MyStruct_OtherStructField_struct_setter
&& OtherStructField_
) {
139 OtherStructField_ref() = std::forward
<T_MyStruct_OtherStructField_struct_setter
>(OtherStructField_
);
140 return __fbthrift_field_OtherStructField
;
143 template <class Protocol_
>
144 unsigned long read(Protocol_
* iprot
);
145 template <class Protocol_
>
146 uint32_t serializedSize(Protocol_
const* prot_
) const;
147 template <class Protocol_
>
148 uint32_t serializedSizeZC(Protocol_
const* prot_
) const;
149 template <class Protocol_
>
150 uint32_t write(Protocol_
* prot_
) const;
153 template <class Protocol_
>
154 void readNoXfer(Protocol_
* iprot
);
156 friend class ::apache::thrift::Cpp2Ops
<MyStruct
>;
157 friend void swap(MyStruct
& a
, MyStruct
& b
);
160 template <class Protocol_
>
161 unsigned long MyStruct::read(Protocol_
* iprot
) {
162 auto _xferStart
= iprot
->getCursorPosition();
164 return iprot
->getCursorPosition() - _xferStart
;
168 } // matching_module_name