/src/brpc/build/test/addressbook_encode_decode.pb.cc
Line | Count | Source |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: addressbook_encode_decode.proto |
3 | | |
4 | | #include "addressbook_encode_decode.pb.h" |
5 | | |
6 | | #include <algorithm> |
7 | | |
8 | | #include <google/protobuf/io/coded_stream.h> |
9 | | #include <google/protobuf/extension_set.h> |
10 | | #include <google/protobuf/wire_format_lite.h> |
11 | | #include <google/protobuf/descriptor.h> |
12 | | #include <google/protobuf/generated_message_reflection.h> |
13 | | #include <google/protobuf/reflection_ops.h> |
14 | | #include <google/protobuf/wire_format.h> |
15 | | // @@protoc_insertion_point(includes) |
16 | | #include <google/protobuf/port_def.inc> |
17 | | |
18 | | PROTOBUF_PRAGMA_INIT_SEG |
19 | | |
20 | | namespace _pb = ::PROTOBUF_NAMESPACE_ID; |
21 | | namespace _pbi = _pb::internal; |
22 | | |
23 | | PROTOBUF_CONSTEXPR ExtEncDec::ExtEncDec( |
24 | | ::_pbi::ConstantInitialized): _impl_{ |
25 | | /*decltype(_impl_._has_bits_)*/{} |
26 | | , /*decltype(_impl_._cached_size_)*/{} |
27 | | , /*decltype(_impl_.databyte_z040_std_z058__z058_string_z041__)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} |
28 | | , /*decltype(_impl_.aa_ge_z040__)*/0u |
29 | | , /*decltype(_impl_.enum_z045__z045_type_)*/1} {} |
30 | | struct ExtEncDecDefaultTypeInternal { |
31 | | PROTOBUF_CONSTEXPR ExtEncDecDefaultTypeInternal() |
32 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
33 | 0 | ~ExtEncDecDefaultTypeInternal() {} |
34 | | union { |
35 | | ExtEncDec _instance; |
36 | | }; |
37 | | }; |
38 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ExtEncDecDefaultTypeInternal _ExtEncDec_default_instance_; |
39 | | PROTOBUF_CONSTEXPR ContentEncDec::ContentEncDec( |
40 | | ::_pbi::ConstantInitialized): _impl_{ |
41 | | /*decltype(_impl_._has_bits_)*/{} |
42 | | , /*decltype(_impl_._cached_size_)*/{} |
43 | | , /*decltype(_impl_.uid_z042__)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} |
44 | | , /*decltype(_impl_._ext_z037_t__)*/nullptr |
45 | | , /*decltype(_impl_.distance_info__)*/0} {} |
46 | | struct ContentEncDecDefaultTypeInternal { |
47 | | PROTOBUF_CONSTEXPR ContentEncDecDefaultTypeInternal() |
48 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
49 | 0 | ~ContentEncDecDefaultTypeInternal() {} |
50 | | union { |
51 | | ContentEncDec _instance; |
52 | | }; |
53 | | }; |
54 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContentEncDecDefaultTypeInternal _ContentEncDec_default_instance_; |
55 | | PROTOBUF_CONSTEXPR JsonContextBodyEncDec::JsonContextBodyEncDec( |
56 | | ::_pbi::ConstantInitialized): _impl_{ |
57 | | /*decltype(_impl_._has_bits_)*/{} |
58 | | , /*decltype(_impl_._cached_size_)*/{} |
59 | | , /*decltype(_impl_._z064_content_test_z037__z064__)*/{} |
60 | | , /*decltype(_impl_.data_z058_array_)*/{} |
61 | | , /*decltype(_impl_.info_)*/{} |
62 | | , /*decltype(_impl_.type_)*/int64_t{0} |
63 | | , /*decltype(_impl_.spur_)*/0 |
64 | | , /*decltype(_impl_.judge_)*/false} {} |
65 | | struct JsonContextBodyEncDecDefaultTypeInternal { |
66 | | PROTOBUF_CONSTEXPR JsonContextBodyEncDecDefaultTypeInternal() |
67 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
68 | 0 | ~JsonContextBodyEncDecDefaultTypeInternal() {} |
69 | | union { |
70 | | JsonContextBodyEncDec _instance; |
71 | | }; |
72 | | }; |
73 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 JsonContextBodyEncDecDefaultTypeInternal _JsonContextBodyEncDec_default_instance_; |
74 | | PROTOBUF_CONSTEXPR PersonEncDec::PersonEncDec( |
75 | | ::_pbi::ConstantInitialized): _impl_{ |
76 | | /*decltype(_impl_._has_bits_)*/{} |
77 | | , /*decltype(_impl_._cached_size_)*/{} |
78 | | , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} |
79 | | , /*decltype(_impl_.json_body_)*/nullptr |
80 | | , /*decltype(_impl_.id_)*/0} {} |
81 | | struct PersonEncDecDefaultTypeInternal { |
82 | | PROTOBUF_CONSTEXPR PersonEncDecDefaultTypeInternal() |
83 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
84 | 0 | ~PersonEncDecDefaultTypeInternal() {} |
85 | | union { |
86 | | PersonEncDec _instance; |
87 | | }; |
88 | | }; |
89 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PersonEncDecDefaultTypeInternal _PersonEncDec_default_instance_; |
90 | | PROTOBUF_CONSTEXPR AddressBookEncDec::AddressBookEncDec( |
91 | | ::_pbi::ConstantInitialized): _impl_{ |
92 | | /*decltype(_impl_.person_)*/{} |
93 | | , /*decltype(_impl_._cached_size_)*/{}} {} |
94 | | struct AddressBookEncDecDefaultTypeInternal { |
95 | | PROTOBUF_CONSTEXPR AddressBookEncDecDefaultTypeInternal() |
96 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
97 | 0 | ~AddressBookEncDecDefaultTypeInternal() {} |
98 | | union { |
99 | | AddressBookEncDec _instance; |
100 | | }; |
101 | | }; |
102 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AddressBookEncDecDefaultTypeInternal _AddressBookEncDec_default_instance_; |
103 | | static ::_pb::Metadata file_level_metadata_addressbook_5fencode_5fdecode_2eproto[5]; |
104 | | static const ::_pb::EnumDescriptor* file_level_enum_descriptors_addressbook_5fencode_5fdecode_2eproto[1]; |
105 | | static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_addressbook_5fencode_5fdecode_2eproto = nullptr; |
106 | | |
107 | | const uint32_t TableStruct_addressbook_5fencode_5fdecode_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
108 | | PROTOBUF_FIELD_OFFSET(::ExtEncDec, _impl_._has_bits_), |
109 | | PROTOBUF_FIELD_OFFSET(::ExtEncDec, _internal_metadata_), |
110 | | ~0u, // no _extensions_ |
111 | | ~0u, // no _oneof_case_ |
112 | | ~0u, // no _weak_field_map_ |
113 | | ~0u, // no _inlined_string_donated_ |
114 | | PROTOBUF_FIELD_OFFSET(::ExtEncDec, _impl_.aa_ge_z040__), |
115 | | PROTOBUF_FIELD_OFFSET(::ExtEncDec, _impl_.databyte_z040_std_z058__z058_string_z041__), |
116 | | PROTOBUF_FIELD_OFFSET(::ExtEncDec, _impl_.enum_z045__z045_type_), |
117 | | 1, |
118 | | 0, |
119 | | 2, |
120 | | PROTOBUF_FIELD_OFFSET(::ContentEncDec, _impl_._has_bits_), |
121 | | PROTOBUF_FIELD_OFFSET(::ContentEncDec, _internal_metadata_), |
122 | | ~0u, // no _extensions_ |
123 | | ~0u, // no _oneof_case_ |
124 | | ~0u, // no _weak_field_map_ |
125 | | ~0u, // no _inlined_string_donated_ |
126 | | PROTOBUF_FIELD_OFFSET(::ContentEncDec, _impl_.uid_z042__), |
127 | | PROTOBUF_FIELD_OFFSET(::ContentEncDec, _impl_.distance_info__), |
128 | | PROTOBUF_FIELD_OFFSET(::ContentEncDec, _impl_._ext_z037_t__), |
129 | | 0, |
130 | | 2, |
131 | | 1, |
132 | | PROTOBUF_FIELD_OFFSET(::JsonContextBodyEncDec, _impl_._has_bits_), |
133 | | PROTOBUF_FIELD_OFFSET(::JsonContextBodyEncDec, _internal_metadata_), |
134 | | ~0u, // no _extensions_ |
135 | | ~0u, // no _oneof_case_ |
136 | | ~0u, // no _weak_field_map_ |
137 | | ~0u, // no _inlined_string_donated_ |
138 | | PROTOBUF_FIELD_OFFSET(::JsonContextBodyEncDec, _impl_.info_), |
139 | | PROTOBUF_FIELD_OFFSET(::JsonContextBodyEncDec, _impl_.type_), |
140 | | PROTOBUF_FIELD_OFFSET(::JsonContextBodyEncDec, _impl_.data_z058_array_), |
141 | | PROTOBUF_FIELD_OFFSET(::JsonContextBodyEncDec, _impl_.judge_), |
142 | | PROTOBUF_FIELD_OFFSET(::JsonContextBodyEncDec, _impl_.spur_), |
143 | | PROTOBUF_FIELD_OFFSET(::JsonContextBodyEncDec, _impl_._z064_content_test_z037__z064__), |
144 | | ~0u, |
145 | | 0, |
146 | | ~0u, |
147 | | 2, |
148 | | 1, |
149 | | ~0u, |
150 | | PROTOBUF_FIELD_OFFSET(::PersonEncDec, _impl_._has_bits_), |
151 | | PROTOBUF_FIELD_OFFSET(::PersonEncDec, _internal_metadata_), |
152 | | ~0u, // no _extensions_ |
153 | | ~0u, // no _oneof_case_ |
154 | | ~0u, // no _weak_field_map_ |
155 | | ~0u, // no _inlined_string_donated_ |
156 | | PROTOBUF_FIELD_OFFSET(::PersonEncDec, _impl_.name_), |
157 | | PROTOBUF_FIELD_OFFSET(::PersonEncDec, _impl_.id_), |
158 | | PROTOBUF_FIELD_OFFSET(::PersonEncDec, _impl_.json_body_), |
159 | | 0, |
160 | | 2, |
161 | | 1, |
162 | | ~0u, // no _has_bits_ |
163 | | PROTOBUF_FIELD_OFFSET(::AddressBookEncDec, _internal_metadata_), |
164 | | ~0u, // no _extensions_ |
165 | | ~0u, // no _oneof_case_ |
166 | | ~0u, // no _weak_field_map_ |
167 | | ~0u, // no _inlined_string_donated_ |
168 | | PROTOBUF_FIELD_OFFSET(::AddressBookEncDec, _impl_.person_), |
169 | | }; |
170 | | static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
171 | | { 0, 9, -1, sizeof(::ExtEncDec)}, |
172 | | { 12, 21, -1, sizeof(::ContentEncDec)}, |
173 | | { 24, 36, -1, sizeof(::JsonContextBodyEncDec)}, |
174 | | { 42, 51, -1, sizeof(::PersonEncDec)}, |
175 | | { 54, -1, -1, sizeof(::AddressBookEncDec)}, |
176 | | }; |
177 | | |
178 | | static const ::_pb::Message* const file_default_instances[] = { |
179 | | &::_ExtEncDec_default_instance_._instance, |
180 | | &::_ContentEncDec_default_instance_._instance, |
181 | | &::_JsonContextBodyEncDec_default_instance_._instance, |
182 | | &::_PersonEncDec_default_instance_._instance, |
183 | | &::_AddressBookEncDec_default_instance_._instance, |
184 | | }; |
185 | | |
186 | | const char descriptor_table_protodef_addressbook_5fencode_5fdecode_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
187 | | "\n\037addressbook_encode_decode.proto\"\306\001\n\tEx" |
188 | | "tEncDec\022\023\n\013Aa_ge_Z040_\030\002 \001(\007\0221\n)databyte" |
189 | | "_Z040_std_Z058__Z058_string_Z041_\030\003 \001(\014\022" |
190 | | ">\n\024enum_Z045__Z045_type\030\004 \001(\0162\032.ExtEncDe" |
191 | | "c.PhoneTypeEncDec:\004HOME\"1\n\017PhoneTypeEncD" |
192 | | "ec\022\n\n\006MOBILE\020\000\022\010\n\004HOME\020\001\022\010\n\004WORK\020\002\"\\\n\rCo" |
193 | | "ntentEncDec\022\021\n\tuid_Z042_\030\001 \001(\t\022\026\n\016Distan" |
194 | | "ce_info_\030\020 \002(\002\022 \n\014_ext_Z037_T_\030\021 \001(\0132\n.E" |
195 | | "xtEncDec\"\241\001\n\025JsonContextBodyEncDec\022\014\n\004in" |
196 | | "fo\030\006 \003(\t\022\014\n\004type\030\001 \001(\003\022\027\n\017data_Z058_arra" |
197 | | "y\030\005 \003(\005\022\r\n\005judge\030\002 \002(\010\022\014\n\004spur\030\003 \001(\001\0226\n\036" |
198 | | "_Z064_Content_Test_Z037__Z064_\030\004 \003(\0132\016.C" |
199 | | "ontentEncDec\"S\n\014PersonEncDec\022\014\n\004name\030\001 \001" |
200 | | "(\t\022\n\n\002id\030\002 \001(\005\022)\n\tjson_body\030\022 \001(\0132\026.Json" |
201 | | "ContextBodyEncDec\"2\n\021AddressBookEncDec\022\035" |
202 | | "\n\006person\030\001 \003(\0132\r.PersonEncDec" |
203 | | ; |
204 | | static ::_pbi::once_flag descriptor_table_addressbook_5fencode_5fdecode_2eproto_once; |
205 | | const ::_pbi::DescriptorTable descriptor_table_addressbook_5fencode_5fdecode_2eproto = { |
206 | | false, false, 629, descriptor_table_protodef_addressbook_5fencode_5fdecode_2eproto, |
207 | | "addressbook_encode_decode.proto", |
208 | | &descriptor_table_addressbook_5fencode_5fdecode_2eproto_once, nullptr, 0, 5, |
209 | | schemas, file_default_instances, TableStruct_addressbook_5fencode_5fdecode_2eproto::offsets, |
210 | | file_level_metadata_addressbook_5fencode_5fdecode_2eproto, file_level_enum_descriptors_addressbook_5fencode_5fdecode_2eproto, |
211 | | file_level_service_descriptors_addressbook_5fencode_5fdecode_2eproto, |
212 | | }; |
213 | 0 | PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_addressbook_5fencode_5fdecode_2eproto_getter() { |
214 | 0 | return &descriptor_table_addressbook_5fencode_5fdecode_2eproto; |
215 | 0 | } |
216 | | |
217 | | // Force running AddDescriptors() at dynamic initialization time. |
218 | | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_addressbook_5fencode_5fdecode_2eproto(&descriptor_table_addressbook_5fencode_5fdecode_2eproto); |
219 | 0 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ExtEncDec_PhoneTypeEncDec_descriptor() { |
220 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_addressbook_5fencode_5fdecode_2eproto); |
221 | 0 | return file_level_enum_descriptors_addressbook_5fencode_5fdecode_2eproto[0]; |
222 | 0 | } |
223 | 0 | bool ExtEncDec_PhoneTypeEncDec_IsValid(int value) { |
224 | 0 | switch (value) { |
225 | 0 | case 0: |
226 | 0 | case 1: |
227 | 0 | case 2: |
228 | 0 | return true; |
229 | 0 | default: |
230 | 0 | return false; |
231 | 0 | } |
232 | 0 | } |
233 | | |
234 | | #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) |
235 | | constexpr ExtEncDec_PhoneTypeEncDec ExtEncDec::MOBILE; |
236 | | constexpr ExtEncDec_PhoneTypeEncDec ExtEncDec::HOME; |
237 | | constexpr ExtEncDec_PhoneTypeEncDec ExtEncDec::WORK; |
238 | | constexpr ExtEncDec_PhoneTypeEncDec ExtEncDec::PhoneTypeEncDec_MIN; |
239 | | constexpr ExtEncDec_PhoneTypeEncDec ExtEncDec::PhoneTypeEncDec_MAX; |
240 | | constexpr int ExtEncDec::PhoneTypeEncDec_ARRAYSIZE; |
241 | | #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) |
242 | | |
243 | | // =================================================================== |
244 | | |
245 | | class ExtEncDec::_Internal { |
246 | | public: |
247 | | using HasBits = decltype(std::declval<ExtEncDec>()._impl_._has_bits_); |
248 | 0 | static void set_has_aa_ge_z040_(HasBits* has_bits) { |
249 | 0 | (*has_bits)[0] |= 2u; |
250 | 0 | } |
251 | 0 | static void set_has_databyte_z040_std_z058__z058_string_z041_(HasBits* has_bits) { |
252 | 0 | (*has_bits)[0] |= 1u; |
253 | 0 | } |
254 | 0 | static void set_has_enum_z045__z045_type(HasBits* has_bits) { |
255 | 0 | (*has_bits)[0] |= 4u; |
256 | 0 | } |
257 | | }; |
258 | | |
259 | | ExtEncDec::ExtEncDec(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
260 | | bool is_message_owned) |
261 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
262 | 0 | SharedCtor(arena, is_message_owned); |
263 | | // @@protoc_insertion_point(arena_constructor:ExtEncDec) |
264 | 0 | } |
265 | | ExtEncDec::ExtEncDec(const ExtEncDec& from) |
266 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
267 | 0 | ExtEncDec* const _this = this; (void)_this; |
268 | 0 | new (&_impl_) Impl_{ |
269 | 0 | decltype(_impl_._has_bits_){from._impl_._has_bits_} |
270 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
271 | 0 | , decltype(_impl_.databyte_z040_std_z058__z058_string_z041__){} |
272 | 0 | , decltype(_impl_.aa_ge_z040__){} |
273 | 0 | , decltype(_impl_.enum_z045__z045_type_){}}; |
274 | |
|
275 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
276 | 0 | _impl_.databyte_z040_std_z058__z058_string_z041__.InitDefault(); |
277 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
278 | | _impl_.databyte_z040_std_z058__z058_string_z041__.Set("", GetArenaForAllocation()); |
279 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
280 | 0 | if (from._internal_has_databyte_z040_std_z058__z058_string_z041_()) { |
281 | 0 | _this->_impl_.databyte_z040_std_z058__z058_string_z041__.Set(from._internal_databyte_z040_std_z058__z058_string_z041_(), |
282 | 0 | _this->GetArenaForAllocation()); |
283 | 0 | } |
284 | 0 | ::memcpy(&_impl_.aa_ge_z040__, &from._impl_.aa_ge_z040__, |
285 | 0 | static_cast<size_t>(reinterpret_cast<char*>(&_impl_.enum_z045__z045_type_) - |
286 | 0 | reinterpret_cast<char*>(&_impl_.aa_ge_z040__)) + sizeof(_impl_.enum_z045__z045_type_)); |
287 | | // @@protoc_insertion_point(copy_constructor:ExtEncDec) |
288 | 0 | } |
289 | | |
290 | | inline void ExtEncDec::SharedCtor( |
291 | 0 | ::_pb::Arena* arena, bool is_message_owned) { |
292 | 0 | (void)arena; |
293 | 0 | (void)is_message_owned; |
294 | 0 | new (&_impl_) Impl_{ |
295 | 0 | decltype(_impl_._has_bits_){} |
296 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
297 | 0 | , decltype(_impl_.databyte_z040_std_z058__z058_string_z041__){} |
298 | 0 | , decltype(_impl_.aa_ge_z040__){0u} |
299 | 0 | , decltype(_impl_.enum_z045__z045_type_){1} |
300 | 0 | }; |
301 | 0 | _impl_.databyte_z040_std_z058__z058_string_z041__.InitDefault(); |
302 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
303 | | _impl_.databyte_z040_std_z058__z058_string_z041__.Set("", GetArenaForAllocation()); |
304 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
305 | 0 | } |
306 | | |
307 | 0 | ExtEncDec::~ExtEncDec() { |
308 | | // @@protoc_insertion_point(destructor:ExtEncDec) |
309 | 0 | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
310 | 0 | (void)arena; |
311 | 0 | return; |
312 | 0 | } |
313 | 0 | SharedDtor(); |
314 | 0 | } |
315 | | |
316 | 0 | inline void ExtEncDec::SharedDtor() { |
317 | 0 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
318 | 0 | _impl_.databyte_z040_std_z058__z058_string_z041__.Destroy(); |
319 | 0 | } |
320 | | |
321 | 0 | void ExtEncDec::SetCachedSize(int size) const { |
322 | 0 | _impl_._cached_size_.Set(size); |
323 | 0 | } |
324 | | |
325 | 0 | void ExtEncDec::Clear() { |
326 | | // @@protoc_insertion_point(message_clear_start:ExtEncDec) |
327 | 0 | uint32_t cached_has_bits = 0; |
328 | | // Prevent compiler warnings about cached_has_bits being unused |
329 | 0 | (void) cached_has_bits; |
330 | |
|
331 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
332 | 0 | if (cached_has_bits & 0x00000001u) { |
333 | 0 | _impl_.databyte_z040_std_z058__z058_string_z041__.ClearNonDefaultToEmpty(); |
334 | 0 | } |
335 | 0 | if (cached_has_bits & 0x00000006u) { |
336 | 0 | _impl_.aa_ge_z040__ = 0u; |
337 | 0 | _impl_.enum_z045__z045_type_ = 1; |
338 | 0 | } |
339 | 0 | _impl_._has_bits_.Clear(); |
340 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
341 | 0 | } |
342 | | |
343 | 0 | const char* ExtEncDec::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
344 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
345 | 0 | _Internal::HasBits has_bits{}; |
346 | 0 | while (!ctx->Done(&ptr)) { |
347 | 0 | uint32_t tag; |
348 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
349 | 0 | switch (tag >> 3) { |
350 | | // optional fixed32 Aa_ge_Z040_ = 2; |
351 | 0 | case 2: |
352 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) { |
353 | 0 | _Internal::set_has_aa_ge_z040_(&has_bits); |
354 | 0 | _impl_.aa_ge_z040__ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint32_t>(ptr); |
355 | 0 | ptr += sizeof(uint32_t); |
356 | 0 | } else |
357 | 0 | goto handle_unusual; |
358 | 0 | continue; |
359 | | // optional bytes databyte_Z040_std_Z058__Z058_string_Z041_ = 3; |
360 | 0 | case 3: |
361 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { |
362 | 0 | auto str = _internal_mutable_databyte_z040_std_z058__z058_string_z041_(); |
363 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
364 | 0 | CHK_(ptr); |
365 | 0 | } else |
366 | 0 | goto handle_unusual; |
367 | 0 | continue; |
368 | | // optional .ExtEncDec.PhoneTypeEncDec enum_Z045__Z045_type = 4 [default = HOME]; |
369 | 0 | case 4: |
370 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) { |
371 | 0 | uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
372 | 0 | CHK_(ptr); |
373 | 0 | if (PROTOBUF_PREDICT_TRUE(::ExtEncDec_PhoneTypeEncDec_IsValid(val))) { |
374 | 0 | _internal_set_enum_z045__z045_type(static_cast<::ExtEncDec_PhoneTypeEncDec>(val)); |
375 | 0 | } else { |
376 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields()); |
377 | 0 | } |
378 | 0 | } else |
379 | 0 | goto handle_unusual; |
380 | 0 | continue; |
381 | 0 | default: |
382 | 0 | goto handle_unusual; |
383 | 0 | } // switch |
384 | 0 | handle_unusual: |
385 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
386 | 0 | CHK_(ptr); |
387 | 0 | ctx->SetLastTag(tag); |
388 | 0 | goto message_done; |
389 | 0 | } |
390 | 0 | ptr = UnknownFieldParse( |
391 | 0 | tag, |
392 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
393 | 0 | ptr, ctx); |
394 | 0 | CHK_(ptr != nullptr); |
395 | 0 | } // while |
396 | 0 | message_done: |
397 | 0 | _impl_._has_bits_.Or(has_bits); |
398 | 0 | return ptr; |
399 | 0 | failure: |
400 | 0 | ptr = nullptr; |
401 | 0 | goto message_done; |
402 | 0 | #undef CHK_ |
403 | 0 | } |
404 | | |
405 | | uint8_t* ExtEncDec::_InternalSerialize( |
406 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
407 | | // @@protoc_insertion_point(serialize_to_array_start:ExtEncDec) |
408 | 0 | uint32_t cached_has_bits = 0; |
409 | 0 | (void) cached_has_bits; |
410 | |
|
411 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
412 | | // optional fixed32 Aa_ge_Z040_ = 2; |
413 | 0 | if (cached_has_bits & 0x00000002u) { |
414 | 0 | target = stream->EnsureSpace(target); |
415 | 0 | target = ::_pbi::WireFormatLite::WriteFixed32ToArray(2, this->_internal_aa_ge_z040_(), target); |
416 | 0 | } |
417 | | |
418 | | // optional bytes databyte_Z040_std_Z058__Z058_string_Z041_ = 3; |
419 | 0 | if (cached_has_bits & 0x00000001u) { |
420 | 0 | target = stream->WriteBytesMaybeAliased( |
421 | 0 | 3, this->_internal_databyte_z040_std_z058__z058_string_z041_(), target); |
422 | 0 | } |
423 | | |
424 | | // optional .ExtEncDec.PhoneTypeEncDec enum_Z045__Z045_type = 4 [default = HOME]; |
425 | 0 | if (cached_has_bits & 0x00000004u) { |
426 | 0 | target = stream->EnsureSpace(target); |
427 | 0 | target = ::_pbi::WireFormatLite::WriteEnumToArray( |
428 | 0 | 4, this->_internal_enum_z045__z045_type(), target); |
429 | 0 | } |
430 | |
|
431 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
432 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
433 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
434 | 0 | } |
435 | | // @@protoc_insertion_point(serialize_to_array_end:ExtEncDec) |
436 | 0 | return target; |
437 | 0 | } |
438 | | |
439 | 0 | size_t ExtEncDec::ByteSizeLong() const { |
440 | | // @@protoc_insertion_point(message_byte_size_start:ExtEncDec) |
441 | 0 | size_t total_size = 0; |
442 | |
|
443 | 0 | uint32_t cached_has_bits = 0; |
444 | | // Prevent compiler warnings about cached_has_bits being unused |
445 | 0 | (void) cached_has_bits; |
446 | |
|
447 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
448 | 0 | if (cached_has_bits & 0x00000007u) { |
449 | | // optional bytes databyte_Z040_std_Z058__Z058_string_Z041_ = 3; |
450 | 0 | if (cached_has_bits & 0x00000001u) { |
451 | 0 | total_size += 1 + |
452 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
453 | 0 | this->_internal_databyte_z040_std_z058__z058_string_z041_()); |
454 | 0 | } |
455 | | |
456 | | // optional fixed32 Aa_ge_Z040_ = 2; |
457 | 0 | if (cached_has_bits & 0x00000002u) { |
458 | 0 | total_size += 1 + 4; |
459 | 0 | } |
460 | | |
461 | | // optional .ExtEncDec.PhoneTypeEncDec enum_Z045__Z045_type = 4 [default = HOME]; |
462 | 0 | if (cached_has_bits & 0x00000004u) { |
463 | 0 | total_size += 1 + |
464 | 0 | ::_pbi::WireFormatLite::EnumSize(this->_internal_enum_z045__z045_type()); |
465 | 0 | } |
466 | |
|
467 | 0 | } |
468 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
469 | 0 | } |
470 | | |
471 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ExtEncDec::_class_data_ = { |
472 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
473 | | ExtEncDec::MergeImpl |
474 | | }; |
475 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ExtEncDec::GetClassData() const { return &_class_data_; } |
476 | | |
477 | | |
478 | 0 | void ExtEncDec::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
479 | 0 | auto* const _this = static_cast<ExtEncDec*>(&to_msg); |
480 | 0 | auto& from = static_cast<const ExtEncDec&>(from_msg); |
481 | | // @@protoc_insertion_point(class_specific_merge_from_start:ExtEncDec) |
482 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
483 | 0 | uint32_t cached_has_bits = 0; |
484 | 0 | (void) cached_has_bits; |
485 | |
|
486 | 0 | cached_has_bits = from._impl_._has_bits_[0]; |
487 | 0 | if (cached_has_bits & 0x00000007u) { |
488 | 0 | if (cached_has_bits & 0x00000001u) { |
489 | 0 | _this->_internal_set_databyte_z040_std_z058__z058_string_z041_(from._internal_databyte_z040_std_z058__z058_string_z041_()); |
490 | 0 | } |
491 | 0 | if (cached_has_bits & 0x00000002u) { |
492 | 0 | _this->_impl_.aa_ge_z040__ = from._impl_.aa_ge_z040__; |
493 | 0 | } |
494 | 0 | if (cached_has_bits & 0x00000004u) { |
495 | 0 | _this->_impl_.enum_z045__z045_type_ = from._impl_.enum_z045__z045_type_; |
496 | 0 | } |
497 | 0 | _this->_impl_._has_bits_[0] |= cached_has_bits; |
498 | 0 | } |
499 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
500 | 0 | } |
501 | | |
502 | 0 | void ExtEncDec::CopyFrom(const ExtEncDec& from) { |
503 | | // @@protoc_insertion_point(class_specific_copy_from_start:ExtEncDec) |
504 | 0 | if (&from == this) return; |
505 | 0 | Clear(); |
506 | 0 | MergeFrom(from); |
507 | 0 | } |
508 | | |
509 | 0 | bool ExtEncDec::IsInitialized() const { |
510 | 0 | return true; |
511 | 0 | } |
512 | | |
513 | 0 | void ExtEncDec::InternalSwap(ExtEncDec* other) { |
514 | 0 | using std::swap; |
515 | 0 | auto* lhs_arena = GetArenaForAllocation(); |
516 | 0 | auto* rhs_arena = other->GetArenaForAllocation(); |
517 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
518 | 0 | swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); |
519 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
520 | 0 | &_impl_.databyte_z040_std_z058__z058_string_z041__, lhs_arena, |
521 | 0 | &other->_impl_.databyte_z040_std_z058__z058_string_z041__, rhs_arena |
522 | 0 | ); |
523 | 0 | swap(_impl_.aa_ge_z040__, other->_impl_.aa_ge_z040__); |
524 | 0 | swap(_impl_.enum_z045__z045_type_, other->_impl_.enum_z045__z045_type_); |
525 | 0 | } |
526 | | |
527 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata ExtEncDec::GetMetadata() const { |
528 | 0 | return ::_pbi::AssignDescriptors( |
529 | 0 | &descriptor_table_addressbook_5fencode_5fdecode_2eproto_getter, &descriptor_table_addressbook_5fencode_5fdecode_2eproto_once, |
530 | 0 | file_level_metadata_addressbook_5fencode_5fdecode_2eproto[0]); |
531 | 0 | } |
532 | | |
533 | | // =================================================================== |
534 | | |
535 | | class ContentEncDec::_Internal { |
536 | | public: |
537 | | using HasBits = decltype(std::declval<ContentEncDec>()._impl_._has_bits_); |
538 | 0 | static void set_has_uid_z042_(HasBits* has_bits) { |
539 | 0 | (*has_bits)[0] |= 1u; |
540 | 0 | } |
541 | 0 | static void set_has_distance_info_(HasBits* has_bits) { |
542 | 0 | (*has_bits)[0] |= 4u; |
543 | 0 | } |
544 | | static const ::ExtEncDec& _ext_z037_t_(const ContentEncDec* msg); |
545 | 0 | static void set_has__ext_z037_t_(HasBits* has_bits) { |
546 | 0 | (*has_bits)[0] |= 2u; |
547 | 0 | } |
548 | 0 | static bool MissingRequiredFields(const HasBits& has_bits) { |
549 | 0 | return ((has_bits[0] & 0x00000004) ^ 0x00000004) != 0; |
550 | 0 | } |
551 | | }; |
552 | | |
553 | | const ::ExtEncDec& |
554 | 0 | ContentEncDec::_Internal::_ext_z037_t_(const ContentEncDec* msg) { |
555 | 0 | return *msg->_impl_._ext_z037_t__; |
556 | 0 | } |
557 | | ContentEncDec::ContentEncDec(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
558 | | bool is_message_owned) |
559 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
560 | 0 | SharedCtor(arena, is_message_owned); |
561 | | // @@protoc_insertion_point(arena_constructor:ContentEncDec) |
562 | 0 | } |
563 | | ContentEncDec::ContentEncDec(const ContentEncDec& from) |
564 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
565 | 0 | ContentEncDec* const _this = this; (void)_this; |
566 | 0 | new (&_impl_) Impl_{ |
567 | 0 | decltype(_impl_._has_bits_){from._impl_._has_bits_} |
568 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
569 | 0 | , decltype(_impl_.uid_z042__){} |
570 | 0 | , decltype(_impl_._ext_z037_t__){nullptr} |
571 | 0 | , decltype(_impl_.distance_info__){}}; |
572 | |
|
573 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
574 | 0 | _impl_.uid_z042__.InitDefault(); |
575 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
576 | | _impl_.uid_z042__.Set("", GetArenaForAllocation()); |
577 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
578 | 0 | if (from._internal_has_uid_z042_()) { |
579 | 0 | _this->_impl_.uid_z042__.Set(from._internal_uid_z042_(), |
580 | 0 | _this->GetArenaForAllocation()); |
581 | 0 | } |
582 | 0 | if (from._internal_has__ext_z037_t_()) { |
583 | 0 | _this->_impl_._ext_z037_t__ = new ::ExtEncDec(*from._impl_._ext_z037_t__); |
584 | 0 | } |
585 | 0 | _this->_impl_.distance_info__ = from._impl_.distance_info__; |
586 | | // @@protoc_insertion_point(copy_constructor:ContentEncDec) |
587 | 0 | } |
588 | | |
589 | | inline void ContentEncDec::SharedCtor( |
590 | 0 | ::_pb::Arena* arena, bool is_message_owned) { |
591 | 0 | (void)arena; |
592 | 0 | (void)is_message_owned; |
593 | 0 | new (&_impl_) Impl_{ |
594 | 0 | decltype(_impl_._has_bits_){} |
595 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
596 | 0 | , decltype(_impl_.uid_z042__){} |
597 | 0 | , decltype(_impl_._ext_z037_t__){nullptr} |
598 | 0 | , decltype(_impl_.distance_info__){0} |
599 | 0 | }; |
600 | 0 | _impl_.uid_z042__.InitDefault(); |
601 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
602 | | _impl_.uid_z042__.Set("", GetArenaForAllocation()); |
603 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
604 | 0 | } |
605 | | |
606 | 0 | ContentEncDec::~ContentEncDec() { |
607 | | // @@protoc_insertion_point(destructor:ContentEncDec) |
608 | 0 | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
609 | 0 | (void)arena; |
610 | 0 | return; |
611 | 0 | } |
612 | 0 | SharedDtor(); |
613 | 0 | } |
614 | | |
615 | 0 | inline void ContentEncDec::SharedDtor() { |
616 | 0 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
617 | 0 | _impl_.uid_z042__.Destroy(); |
618 | 0 | if (this != internal_default_instance()) delete _impl_._ext_z037_t__; |
619 | 0 | } |
620 | | |
621 | 0 | void ContentEncDec::SetCachedSize(int size) const { |
622 | 0 | _impl_._cached_size_.Set(size); |
623 | 0 | } |
624 | | |
625 | 0 | void ContentEncDec::Clear() { |
626 | | // @@protoc_insertion_point(message_clear_start:ContentEncDec) |
627 | 0 | uint32_t cached_has_bits = 0; |
628 | | // Prevent compiler warnings about cached_has_bits being unused |
629 | 0 | (void) cached_has_bits; |
630 | |
|
631 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
632 | 0 | if (cached_has_bits & 0x00000003u) { |
633 | 0 | if (cached_has_bits & 0x00000001u) { |
634 | 0 | _impl_.uid_z042__.ClearNonDefaultToEmpty(); |
635 | 0 | } |
636 | 0 | if (cached_has_bits & 0x00000002u) { |
637 | 0 | GOOGLE_DCHECK(_impl_._ext_z037_t__ != nullptr); |
638 | 0 | _impl_._ext_z037_t__->Clear(); |
639 | 0 | } |
640 | 0 | } |
641 | 0 | _impl_.distance_info__ = 0; |
642 | 0 | _impl_._has_bits_.Clear(); |
643 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
644 | 0 | } |
645 | | |
646 | 0 | const char* ContentEncDec::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
647 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
648 | 0 | _Internal::HasBits has_bits{}; |
649 | 0 | while (!ctx->Done(&ptr)) { |
650 | 0 | uint32_t tag; |
651 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
652 | 0 | switch (tag >> 3) { |
653 | | // optional string uid_Z042_ = 1; |
654 | 0 | case 1: |
655 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
656 | 0 | auto str = _internal_mutable_uid_z042_(); |
657 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
658 | 0 | CHK_(ptr); |
659 | 0 | #ifndef NDEBUG |
660 | 0 | ::_pbi::VerifyUTF8(str, "ContentEncDec.uid_Z042_"); |
661 | 0 | #endif // !NDEBUG |
662 | 0 | } else |
663 | 0 | goto handle_unusual; |
664 | 0 | continue; |
665 | | // required float Distance_info_ = 16; |
666 | 0 | case 16: |
667 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 133)) { |
668 | 0 | _Internal::set_has_distance_info_(&has_bits); |
669 | 0 | _impl_.distance_info__ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr); |
670 | 0 | ptr += sizeof(float); |
671 | 0 | } else |
672 | 0 | goto handle_unusual; |
673 | 0 | continue; |
674 | | // optional .ExtEncDec _ext_Z037_T_ = 17; |
675 | 0 | case 17: |
676 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 138)) { |
677 | 0 | ptr = ctx->ParseMessage(_internal_mutable__ext_z037_t_(), ptr); |
678 | 0 | CHK_(ptr); |
679 | 0 | } else |
680 | 0 | goto handle_unusual; |
681 | 0 | continue; |
682 | 0 | default: |
683 | 0 | goto handle_unusual; |
684 | 0 | } // switch |
685 | 0 | handle_unusual: |
686 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
687 | 0 | CHK_(ptr); |
688 | 0 | ctx->SetLastTag(tag); |
689 | 0 | goto message_done; |
690 | 0 | } |
691 | 0 | ptr = UnknownFieldParse( |
692 | 0 | tag, |
693 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
694 | 0 | ptr, ctx); |
695 | 0 | CHK_(ptr != nullptr); |
696 | 0 | } // while |
697 | 0 | message_done: |
698 | 0 | _impl_._has_bits_.Or(has_bits); |
699 | 0 | return ptr; |
700 | 0 | failure: |
701 | 0 | ptr = nullptr; |
702 | 0 | goto message_done; |
703 | 0 | #undef CHK_ |
704 | 0 | } |
705 | | |
706 | | uint8_t* ContentEncDec::_InternalSerialize( |
707 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
708 | | // @@protoc_insertion_point(serialize_to_array_start:ContentEncDec) |
709 | 0 | uint32_t cached_has_bits = 0; |
710 | 0 | (void) cached_has_bits; |
711 | |
|
712 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
713 | | // optional string uid_Z042_ = 1; |
714 | 0 | if (cached_has_bits & 0x00000001u) { |
715 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
716 | 0 | this->_internal_uid_z042_().data(), static_cast<int>(this->_internal_uid_z042_().length()), |
717 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
718 | 0 | "ContentEncDec.uid_Z042_"); |
719 | 0 | target = stream->WriteStringMaybeAliased( |
720 | 0 | 1, this->_internal_uid_z042_(), target); |
721 | 0 | } |
722 | | |
723 | | // required float Distance_info_ = 16; |
724 | 0 | if (cached_has_bits & 0x00000004u) { |
725 | 0 | target = stream->EnsureSpace(target); |
726 | 0 | target = ::_pbi::WireFormatLite::WriteFloatToArray(16, this->_internal_distance_info_(), target); |
727 | 0 | } |
728 | | |
729 | | // optional .ExtEncDec _ext_Z037_T_ = 17; |
730 | 0 | if (cached_has_bits & 0x00000002u) { |
731 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
732 | 0 | InternalWriteMessage(17, _Internal::_ext_z037_t_(this), |
733 | 0 | _Internal::_ext_z037_t_(this).GetCachedSize(), target, stream); |
734 | 0 | } |
735 | |
|
736 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
737 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
738 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
739 | 0 | } |
740 | | // @@protoc_insertion_point(serialize_to_array_end:ContentEncDec) |
741 | 0 | return target; |
742 | 0 | } |
743 | | |
744 | 0 | size_t ContentEncDec::ByteSizeLong() const { |
745 | | // @@protoc_insertion_point(message_byte_size_start:ContentEncDec) |
746 | 0 | size_t total_size = 0; |
747 | | |
748 | | // required float Distance_info_ = 16; |
749 | 0 | if (_internal_has_distance_info_()) { |
750 | 0 | total_size += 2 + 4; |
751 | 0 | } |
752 | 0 | uint32_t cached_has_bits = 0; |
753 | | // Prevent compiler warnings about cached_has_bits being unused |
754 | 0 | (void) cached_has_bits; |
755 | |
|
756 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
757 | 0 | if (cached_has_bits & 0x00000003u) { |
758 | | // optional string uid_Z042_ = 1; |
759 | 0 | if (cached_has_bits & 0x00000001u) { |
760 | 0 | total_size += 1 + |
761 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
762 | 0 | this->_internal_uid_z042_()); |
763 | 0 | } |
764 | | |
765 | | // optional .ExtEncDec _ext_Z037_T_ = 17; |
766 | 0 | if (cached_has_bits & 0x00000002u) { |
767 | 0 | total_size += 2 + |
768 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
769 | 0 | *_impl_._ext_z037_t__); |
770 | 0 | } |
771 | |
|
772 | 0 | } |
773 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
774 | 0 | } |
775 | | |
776 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ContentEncDec::_class_data_ = { |
777 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
778 | | ContentEncDec::MergeImpl |
779 | | }; |
780 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ContentEncDec::GetClassData() const { return &_class_data_; } |
781 | | |
782 | | |
783 | 0 | void ContentEncDec::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
784 | 0 | auto* const _this = static_cast<ContentEncDec*>(&to_msg); |
785 | 0 | auto& from = static_cast<const ContentEncDec&>(from_msg); |
786 | | // @@protoc_insertion_point(class_specific_merge_from_start:ContentEncDec) |
787 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
788 | 0 | uint32_t cached_has_bits = 0; |
789 | 0 | (void) cached_has_bits; |
790 | |
|
791 | 0 | cached_has_bits = from._impl_._has_bits_[0]; |
792 | 0 | if (cached_has_bits & 0x00000007u) { |
793 | 0 | if (cached_has_bits & 0x00000001u) { |
794 | 0 | _this->_internal_set_uid_z042_(from._internal_uid_z042_()); |
795 | 0 | } |
796 | 0 | if (cached_has_bits & 0x00000002u) { |
797 | 0 | _this->_internal_mutable__ext_z037_t_()->::ExtEncDec::MergeFrom( |
798 | 0 | from._internal__ext_z037_t_()); |
799 | 0 | } |
800 | 0 | if (cached_has_bits & 0x00000004u) { |
801 | 0 | _this->_impl_.distance_info__ = from._impl_.distance_info__; |
802 | 0 | } |
803 | 0 | _this->_impl_._has_bits_[0] |= cached_has_bits; |
804 | 0 | } |
805 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
806 | 0 | } |
807 | | |
808 | 0 | void ContentEncDec::CopyFrom(const ContentEncDec& from) { |
809 | | // @@protoc_insertion_point(class_specific_copy_from_start:ContentEncDec) |
810 | 0 | if (&from == this) return; |
811 | 0 | Clear(); |
812 | 0 | MergeFrom(from); |
813 | 0 | } |
814 | | |
815 | 0 | bool ContentEncDec::IsInitialized() const { |
816 | 0 | if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false; |
817 | 0 | return true; |
818 | 0 | } |
819 | | |
820 | 0 | void ContentEncDec::InternalSwap(ContentEncDec* other) { |
821 | 0 | using std::swap; |
822 | 0 | auto* lhs_arena = GetArenaForAllocation(); |
823 | 0 | auto* rhs_arena = other->GetArenaForAllocation(); |
824 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
825 | 0 | swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); |
826 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
827 | 0 | &_impl_.uid_z042__, lhs_arena, |
828 | 0 | &other->_impl_.uid_z042__, rhs_arena |
829 | 0 | ); |
830 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
831 | 0 | PROTOBUF_FIELD_OFFSET(ContentEncDec, _impl_.distance_info__) |
832 | 0 | + sizeof(ContentEncDec::_impl_.distance_info__) |
833 | 0 | - PROTOBUF_FIELD_OFFSET(ContentEncDec, _impl_._ext_z037_t__)>( |
834 | 0 | reinterpret_cast<char*>(&_impl_._ext_z037_t__), |
835 | 0 | reinterpret_cast<char*>(&other->_impl_._ext_z037_t__)); |
836 | 0 | } |
837 | | |
838 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata ContentEncDec::GetMetadata() const { |
839 | 0 | return ::_pbi::AssignDescriptors( |
840 | 0 | &descriptor_table_addressbook_5fencode_5fdecode_2eproto_getter, &descriptor_table_addressbook_5fencode_5fdecode_2eproto_once, |
841 | 0 | file_level_metadata_addressbook_5fencode_5fdecode_2eproto[1]); |
842 | 0 | } |
843 | | |
844 | | // =================================================================== |
845 | | |
846 | | class JsonContextBodyEncDec::_Internal { |
847 | | public: |
848 | | using HasBits = decltype(std::declval<JsonContextBodyEncDec>()._impl_._has_bits_); |
849 | 0 | static void set_has_type(HasBits* has_bits) { |
850 | 0 | (*has_bits)[0] |= 1u; |
851 | 0 | } |
852 | 0 | static void set_has_judge(HasBits* has_bits) { |
853 | 0 | (*has_bits)[0] |= 4u; |
854 | 0 | } |
855 | 0 | static void set_has_spur(HasBits* has_bits) { |
856 | 0 | (*has_bits)[0] |= 2u; |
857 | 0 | } |
858 | 0 | static bool MissingRequiredFields(const HasBits& has_bits) { |
859 | 0 | return ((has_bits[0] & 0x00000004) ^ 0x00000004) != 0; |
860 | 0 | } |
861 | | }; |
862 | | |
863 | | JsonContextBodyEncDec::JsonContextBodyEncDec(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
864 | | bool is_message_owned) |
865 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
866 | 0 | SharedCtor(arena, is_message_owned); |
867 | | // @@protoc_insertion_point(arena_constructor:JsonContextBodyEncDec) |
868 | 0 | } |
869 | | JsonContextBodyEncDec::JsonContextBodyEncDec(const JsonContextBodyEncDec& from) |
870 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
871 | 0 | JsonContextBodyEncDec* const _this = this; (void)_this; |
872 | 0 | new (&_impl_) Impl_{ |
873 | 0 | decltype(_impl_._has_bits_){from._impl_._has_bits_} |
874 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
875 | 0 | , decltype(_impl_._z064_content_test_z037__z064__){from._impl_._z064_content_test_z037__z064__} |
876 | 0 | , decltype(_impl_.data_z058_array_){from._impl_.data_z058_array_} |
877 | 0 | , decltype(_impl_.info_){from._impl_.info_} |
878 | 0 | , decltype(_impl_.type_){} |
879 | 0 | , decltype(_impl_.spur_){} |
880 | 0 | , decltype(_impl_.judge_){}}; |
881 | |
|
882 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
883 | 0 | ::memcpy(&_impl_.type_, &from._impl_.type_, |
884 | 0 | static_cast<size_t>(reinterpret_cast<char*>(&_impl_.judge_) - |
885 | 0 | reinterpret_cast<char*>(&_impl_.type_)) + sizeof(_impl_.judge_)); |
886 | | // @@protoc_insertion_point(copy_constructor:JsonContextBodyEncDec) |
887 | 0 | } |
888 | | |
889 | | inline void JsonContextBodyEncDec::SharedCtor( |
890 | 0 | ::_pb::Arena* arena, bool is_message_owned) { |
891 | 0 | (void)arena; |
892 | 0 | (void)is_message_owned; |
893 | 0 | new (&_impl_) Impl_{ |
894 | 0 | decltype(_impl_._has_bits_){} |
895 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
896 | 0 | , decltype(_impl_._z064_content_test_z037__z064__){arena} |
897 | 0 | , decltype(_impl_.data_z058_array_){arena} |
898 | 0 | , decltype(_impl_.info_){arena} |
899 | 0 | , decltype(_impl_.type_){int64_t{0}} |
900 | 0 | , decltype(_impl_.spur_){0} |
901 | 0 | , decltype(_impl_.judge_){false} |
902 | 0 | }; |
903 | 0 | } |
904 | | |
905 | 0 | JsonContextBodyEncDec::~JsonContextBodyEncDec() { |
906 | | // @@protoc_insertion_point(destructor:JsonContextBodyEncDec) |
907 | 0 | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
908 | 0 | (void)arena; |
909 | 0 | return; |
910 | 0 | } |
911 | 0 | SharedDtor(); |
912 | 0 | } |
913 | | |
914 | 0 | inline void JsonContextBodyEncDec::SharedDtor() { |
915 | 0 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
916 | 0 | _impl_._z064_content_test_z037__z064__.~RepeatedPtrField(); |
917 | 0 | _impl_.data_z058_array_.~RepeatedField(); |
918 | 0 | _impl_.info_.~RepeatedPtrField(); |
919 | 0 | } |
920 | | |
921 | 0 | void JsonContextBodyEncDec::SetCachedSize(int size) const { |
922 | 0 | _impl_._cached_size_.Set(size); |
923 | 0 | } |
924 | | |
925 | 0 | void JsonContextBodyEncDec::Clear() { |
926 | | // @@protoc_insertion_point(message_clear_start:JsonContextBodyEncDec) |
927 | 0 | uint32_t cached_has_bits = 0; |
928 | | // Prevent compiler warnings about cached_has_bits being unused |
929 | 0 | (void) cached_has_bits; |
930 | |
|
931 | 0 | _impl_._z064_content_test_z037__z064__.Clear(); |
932 | 0 | _impl_.data_z058_array_.Clear(); |
933 | 0 | _impl_.info_.Clear(); |
934 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
935 | 0 | if (cached_has_bits & 0x00000007u) { |
936 | 0 | ::memset(&_impl_.type_, 0, static_cast<size_t>( |
937 | 0 | reinterpret_cast<char*>(&_impl_.judge_) - |
938 | 0 | reinterpret_cast<char*>(&_impl_.type_)) + sizeof(_impl_.judge_)); |
939 | 0 | } |
940 | 0 | _impl_._has_bits_.Clear(); |
941 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
942 | 0 | } |
943 | | |
944 | 0 | const char* JsonContextBodyEncDec::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
945 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
946 | 0 | _Internal::HasBits has_bits{}; |
947 | 0 | while (!ctx->Done(&ptr)) { |
948 | 0 | uint32_t tag; |
949 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
950 | 0 | switch (tag >> 3) { |
951 | | // optional int64 type = 1; |
952 | 0 | case 1: |
953 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { |
954 | 0 | _Internal::set_has_type(&has_bits); |
955 | 0 | _impl_.type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
956 | 0 | CHK_(ptr); |
957 | 0 | } else |
958 | 0 | goto handle_unusual; |
959 | 0 | continue; |
960 | | // required bool judge = 2; |
961 | 0 | case 2: |
962 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { |
963 | 0 | _Internal::set_has_judge(&has_bits); |
964 | 0 | _impl_.judge_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
965 | 0 | CHK_(ptr); |
966 | 0 | } else |
967 | 0 | goto handle_unusual; |
968 | 0 | continue; |
969 | | // optional double spur = 3; |
970 | 0 | case 3: |
971 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 25)) { |
972 | 0 | _Internal::set_has_spur(&has_bits); |
973 | 0 | _impl_.spur_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr); |
974 | 0 | ptr += sizeof(double); |
975 | 0 | } else |
976 | 0 | goto handle_unusual; |
977 | 0 | continue; |
978 | | // repeated .ContentEncDec _Z064_Content_Test_Z037__Z064_ = 4; |
979 | 0 | case 4: |
980 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { |
981 | 0 | ptr -= 1; |
982 | 0 | do { |
983 | 0 | ptr += 1; |
984 | 0 | ptr = ctx->ParseMessage(_internal_add__z064_content_test_z037__z064_(), ptr); |
985 | 0 | CHK_(ptr); |
986 | 0 | if (!ctx->DataAvailable(ptr)) break; |
987 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); |
988 | 0 | } else |
989 | 0 | goto handle_unusual; |
990 | 0 | continue; |
991 | | // repeated int32 data_Z058_array = 5; |
992 | 0 | case 5: |
993 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) { |
994 | 0 | ptr -= 1; |
995 | 0 | do { |
996 | 0 | ptr += 1; |
997 | 0 | _internal_add_data_z058_array(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); |
998 | 0 | CHK_(ptr); |
999 | 0 | if (!ctx->DataAvailable(ptr)) break; |
1000 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<40>(ptr)); |
1001 | 0 | } else if (static_cast<uint8_t>(tag) == 42) { |
1002 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_data_z058_array(), ptr, ctx); |
1003 | 0 | CHK_(ptr); |
1004 | 0 | } else |
1005 | 0 | goto handle_unusual; |
1006 | 0 | continue; |
1007 | | // repeated string info = 6; |
1008 | 0 | case 6: |
1009 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) { |
1010 | 0 | ptr -= 1; |
1011 | 0 | do { |
1012 | 0 | ptr += 1; |
1013 | 0 | auto str = _internal_add_info(); |
1014 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
1015 | 0 | CHK_(ptr); |
1016 | 0 | #ifndef NDEBUG |
1017 | 0 | ::_pbi::VerifyUTF8(str, "JsonContextBodyEncDec.info"); |
1018 | 0 | #endif // !NDEBUG |
1019 | 0 | if (!ctx->DataAvailable(ptr)) break; |
1020 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); |
1021 | 0 | } else |
1022 | 0 | goto handle_unusual; |
1023 | 0 | continue; |
1024 | 0 | default: |
1025 | 0 | goto handle_unusual; |
1026 | 0 | } // switch |
1027 | 0 | handle_unusual: |
1028 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
1029 | 0 | CHK_(ptr); |
1030 | 0 | ctx->SetLastTag(tag); |
1031 | 0 | goto message_done; |
1032 | 0 | } |
1033 | 0 | ptr = UnknownFieldParse( |
1034 | 0 | tag, |
1035 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
1036 | 0 | ptr, ctx); |
1037 | 0 | CHK_(ptr != nullptr); |
1038 | 0 | } // while |
1039 | 0 | message_done: |
1040 | 0 | _impl_._has_bits_.Or(has_bits); |
1041 | 0 | return ptr; |
1042 | 0 | failure: |
1043 | 0 | ptr = nullptr; |
1044 | 0 | goto message_done; |
1045 | 0 | #undef CHK_ |
1046 | 0 | } |
1047 | | |
1048 | | uint8_t* JsonContextBodyEncDec::_InternalSerialize( |
1049 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
1050 | | // @@protoc_insertion_point(serialize_to_array_start:JsonContextBodyEncDec) |
1051 | 0 | uint32_t cached_has_bits = 0; |
1052 | 0 | (void) cached_has_bits; |
1053 | |
|
1054 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
1055 | | // optional int64 type = 1; |
1056 | 0 | if (cached_has_bits & 0x00000001u) { |
1057 | 0 | target = stream->EnsureSpace(target); |
1058 | 0 | target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_type(), target); |
1059 | 0 | } |
1060 | | |
1061 | | // required bool judge = 2; |
1062 | 0 | if (cached_has_bits & 0x00000004u) { |
1063 | 0 | target = stream->EnsureSpace(target); |
1064 | 0 | target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_judge(), target); |
1065 | 0 | } |
1066 | | |
1067 | | // optional double spur = 3; |
1068 | 0 | if (cached_has_bits & 0x00000002u) { |
1069 | 0 | target = stream->EnsureSpace(target); |
1070 | 0 | target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_spur(), target); |
1071 | 0 | } |
1072 | | |
1073 | | // repeated .ContentEncDec _Z064_Content_Test_Z037__Z064_ = 4; |
1074 | 0 | for (unsigned i = 0, |
1075 | 0 | n = static_cast<unsigned>(this->_internal__z064_content_test_z037__z064__size()); i < n; i++) { |
1076 | 0 | const auto& repfield = this->_internal__z064_content_test_z037__z064_(i); |
1077 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1078 | 0 | InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream); |
1079 | 0 | } |
1080 | | |
1081 | | // repeated int32 data_Z058_array = 5; |
1082 | 0 | for (int i = 0, n = this->_internal_data_z058_array_size(); i < n; i++) { |
1083 | 0 | target = stream->EnsureSpace(target); |
1084 | 0 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_data_z058_array(i), target); |
1085 | 0 | } |
1086 | | |
1087 | | // repeated string info = 6; |
1088 | 0 | for (int i = 0, n = this->_internal_info_size(); i < n; i++) { |
1089 | 0 | const auto& s = this->_internal_info(i); |
1090 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
1091 | 0 | s.data(), static_cast<int>(s.length()), |
1092 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
1093 | 0 | "JsonContextBodyEncDec.info"); |
1094 | 0 | target = stream->WriteString(6, s, target); |
1095 | 0 | } |
1096 | |
|
1097 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
1098 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
1099 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
1100 | 0 | } |
1101 | | // @@protoc_insertion_point(serialize_to_array_end:JsonContextBodyEncDec) |
1102 | 0 | return target; |
1103 | 0 | } |
1104 | | |
1105 | 0 | size_t JsonContextBodyEncDec::ByteSizeLong() const { |
1106 | | // @@protoc_insertion_point(message_byte_size_start:JsonContextBodyEncDec) |
1107 | 0 | size_t total_size = 0; |
1108 | | |
1109 | | // required bool judge = 2; |
1110 | 0 | if (_internal_has_judge()) { |
1111 | 0 | total_size += 1 + 1; |
1112 | 0 | } |
1113 | 0 | uint32_t cached_has_bits = 0; |
1114 | | // Prevent compiler warnings about cached_has_bits being unused |
1115 | 0 | (void) cached_has_bits; |
1116 | | |
1117 | | // repeated .ContentEncDec _Z064_Content_Test_Z037__Z064_ = 4; |
1118 | 0 | total_size += 1UL * this->_internal__z064_content_test_z037__z064__size(); |
1119 | 0 | for (const auto& msg : this->_impl_._z064_content_test_z037__z064__) { |
1120 | 0 | total_size += |
1121 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); |
1122 | 0 | } |
1123 | | |
1124 | | // repeated int32 data_Z058_array = 5; |
1125 | 0 | { |
1126 | 0 | size_t data_size = ::_pbi::WireFormatLite:: |
1127 | 0 | Int32Size(this->_impl_.data_z058_array_); |
1128 | 0 | total_size += 1 * |
1129 | 0 | ::_pbi::FromIntSize(this->_internal_data_z058_array_size()); |
1130 | 0 | total_size += data_size; |
1131 | 0 | } |
1132 | | |
1133 | | // repeated string info = 6; |
1134 | 0 | total_size += 1 * |
1135 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.info_.size()); |
1136 | 0 | for (int i = 0, n = _impl_.info_.size(); i < n; i++) { |
1137 | 0 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1138 | 0 | _impl_.info_.Get(i)); |
1139 | 0 | } |
1140 | |
|
1141 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
1142 | 0 | if (cached_has_bits & 0x00000003u) { |
1143 | | // optional int64 type = 1; |
1144 | 0 | if (cached_has_bits & 0x00000001u) { |
1145 | 0 | total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_type()); |
1146 | 0 | } |
1147 | | |
1148 | | // optional double spur = 3; |
1149 | 0 | if (cached_has_bits & 0x00000002u) { |
1150 | 0 | total_size += 1 + 8; |
1151 | 0 | } |
1152 | |
|
1153 | 0 | } |
1154 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
1155 | 0 | } |
1156 | | |
1157 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData JsonContextBodyEncDec::_class_data_ = { |
1158 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
1159 | | JsonContextBodyEncDec::MergeImpl |
1160 | | }; |
1161 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*JsonContextBodyEncDec::GetClassData() const { return &_class_data_; } |
1162 | | |
1163 | | |
1164 | 0 | void JsonContextBodyEncDec::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
1165 | 0 | auto* const _this = static_cast<JsonContextBodyEncDec*>(&to_msg); |
1166 | 0 | auto& from = static_cast<const JsonContextBodyEncDec&>(from_msg); |
1167 | | // @@protoc_insertion_point(class_specific_merge_from_start:JsonContextBodyEncDec) |
1168 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
1169 | 0 | uint32_t cached_has_bits = 0; |
1170 | 0 | (void) cached_has_bits; |
1171 | |
|
1172 | 0 | _this->_impl_._z064_content_test_z037__z064__.MergeFrom(from._impl_._z064_content_test_z037__z064__); |
1173 | 0 | _this->_impl_.data_z058_array_.MergeFrom(from._impl_.data_z058_array_); |
1174 | 0 | _this->_impl_.info_.MergeFrom(from._impl_.info_); |
1175 | 0 | cached_has_bits = from._impl_._has_bits_[0]; |
1176 | 0 | if (cached_has_bits & 0x00000007u) { |
1177 | 0 | if (cached_has_bits & 0x00000001u) { |
1178 | 0 | _this->_impl_.type_ = from._impl_.type_; |
1179 | 0 | } |
1180 | 0 | if (cached_has_bits & 0x00000002u) { |
1181 | 0 | _this->_impl_.spur_ = from._impl_.spur_; |
1182 | 0 | } |
1183 | 0 | if (cached_has_bits & 0x00000004u) { |
1184 | 0 | _this->_impl_.judge_ = from._impl_.judge_; |
1185 | 0 | } |
1186 | 0 | _this->_impl_._has_bits_[0] |= cached_has_bits; |
1187 | 0 | } |
1188 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
1189 | 0 | } |
1190 | | |
1191 | 0 | void JsonContextBodyEncDec::CopyFrom(const JsonContextBodyEncDec& from) { |
1192 | | // @@protoc_insertion_point(class_specific_copy_from_start:JsonContextBodyEncDec) |
1193 | 0 | if (&from == this) return; |
1194 | 0 | Clear(); |
1195 | 0 | MergeFrom(from); |
1196 | 0 | } |
1197 | | |
1198 | 0 | bool JsonContextBodyEncDec::IsInitialized() const { |
1199 | 0 | if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false; |
1200 | 0 | if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_._z064_content_test_z037__z064__)) |
1201 | 0 | return false; |
1202 | 0 | return true; |
1203 | 0 | } |
1204 | | |
1205 | 0 | void JsonContextBodyEncDec::InternalSwap(JsonContextBodyEncDec* other) { |
1206 | 0 | using std::swap; |
1207 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
1208 | 0 | swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); |
1209 | 0 | _impl_._z064_content_test_z037__z064__.InternalSwap(&other->_impl_._z064_content_test_z037__z064__); |
1210 | 0 | _impl_.data_z058_array_.InternalSwap(&other->_impl_.data_z058_array_); |
1211 | 0 | _impl_.info_.InternalSwap(&other->_impl_.info_); |
1212 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
1213 | 0 | PROTOBUF_FIELD_OFFSET(JsonContextBodyEncDec, _impl_.judge_) |
1214 | 0 | + sizeof(JsonContextBodyEncDec::_impl_.judge_) |
1215 | 0 | - PROTOBUF_FIELD_OFFSET(JsonContextBodyEncDec, _impl_.type_)>( |
1216 | 0 | reinterpret_cast<char*>(&_impl_.type_), |
1217 | 0 | reinterpret_cast<char*>(&other->_impl_.type_)); |
1218 | 0 | } |
1219 | | |
1220 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata JsonContextBodyEncDec::GetMetadata() const { |
1221 | 0 | return ::_pbi::AssignDescriptors( |
1222 | 0 | &descriptor_table_addressbook_5fencode_5fdecode_2eproto_getter, &descriptor_table_addressbook_5fencode_5fdecode_2eproto_once, |
1223 | 0 | file_level_metadata_addressbook_5fencode_5fdecode_2eproto[2]); |
1224 | 0 | } |
1225 | | |
1226 | | // =================================================================== |
1227 | | |
1228 | | class PersonEncDec::_Internal { |
1229 | | public: |
1230 | | using HasBits = decltype(std::declval<PersonEncDec>()._impl_._has_bits_); |
1231 | 0 | static void set_has_name(HasBits* has_bits) { |
1232 | 0 | (*has_bits)[0] |= 1u; |
1233 | 0 | } |
1234 | 0 | static void set_has_id(HasBits* has_bits) { |
1235 | 0 | (*has_bits)[0] |= 4u; |
1236 | 0 | } |
1237 | | static const ::JsonContextBodyEncDec& json_body(const PersonEncDec* msg); |
1238 | 0 | static void set_has_json_body(HasBits* has_bits) { |
1239 | 0 | (*has_bits)[0] |= 2u; |
1240 | 0 | } |
1241 | | }; |
1242 | | |
1243 | | const ::JsonContextBodyEncDec& |
1244 | 0 | PersonEncDec::_Internal::json_body(const PersonEncDec* msg) { |
1245 | 0 | return *msg->_impl_.json_body_; |
1246 | 0 | } |
1247 | | PersonEncDec::PersonEncDec(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
1248 | | bool is_message_owned) |
1249 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
1250 | 0 | SharedCtor(arena, is_message_owned); |
1251 | | // @@protoc_insertion_point(arena_constructor:PersonEncDec) |
1252 | 0 | } |
1253 | | PersonEncDec::PersonEncDec(const PersonEncDec& from) |
1254 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
1255 | 0 | PersonEncDec* const _this = this; (void)_this; |
1256 | 0 | new (&_impl_) Impl_{ |
1257 | 0 | decltype(_impl_._has_bits_){from._impl_._has_bits_} |
1258 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
1259 | 0 | , decltype(_impl_.name_){} |
1260 | 0 | , decltype(_impl_.json_body_){nullptr} |
1261 | 0 | , decltype(_impl_.id_){}}; |
1262 | |
|
1263 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
1264 | 0 | _impl_.name_.InitDefault(); |
1265 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
1266 | | _impl_.name_.Set("", GetArenaForAllocation()); |
1267 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
1268 | 0 | if (from._internal_has_name()) { |
1269 | 0 | _this->_impl_.name_.Set(from._internal_name(), |
1270 | 0 | _this->GetArenaForAllocation()); |
1271 | 0 | } |
1272 | 0 | if (from._internal_has_json_body()) { |
1273 | 0 | _this->_impl_.json_body_ = new ::JsonContextBodyEncDec(*from._impl_.json_body_); |
1274 | 0 | } |
1275 | 0 | _this->_impl_.id_ = from._impl_.id_; |
1276 | | // @@protoc_insertion_point(copy_constructor:PersonEncDec) |
1277 | 0 | } |
1278 | | |
1279 | | inline void PersonEncDec::SharedCtor( |
1280 | 0 | ::_pb::Arena* arena, bool is_message_owned) { |
1281 | 0 | (void)arena; |
1282 | 0 | (void)is_message_owned; |
1283 | 0 | new (&_impl_) Impl_{ |
1284 | 0 | decltype(_impl_._has_bits_){} |
1285 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
1286 | 0 | , decltype(_impl_.name_){} |
1287 | 0 | , decltype(_impl_.json_body_){nullptr} |
1288 | 0 | , decltype(_impl_.id_){0} |
1289 | 0 | }; |
1290 | 0 | _impl_.name_.InitDefault(); |
1291 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
1292 | | _impl_.name_.Set("", GetArenaForAllocation()); |
1293 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
1294 | 0 | } |
1295 | | |
1296 | 0 | PersonEncDec::~PersonEncDec() { |
1297 | | // @@protoc_insertion_point(destructor:PersonEncDec) |
1298 | 0 | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
1299 | 0 | (void)arena; |
1300 | 0 | return; |
1301 | 0 | } |
1302 | 0 | SharedDtor(); |
1303 | 0 | } |
1304 | | |
1305 | 0 | inline void PersonEncDec::SharedDtor() { |
1306 | 0 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
1307 | 0 | _impl_.name_.Destroy(); |
1308 | 0 | if (this != internal_default_instance()) delete _impl_.json_body_; |
1309 | 0 | } |
1310 | | |
1311 | 0 | void PersonEncDec::SetCachedSize(int size) const { |
1312 | 0 | _impl_._cached_size_.Set(size); |
1313 | 0 | } |
1314 | | |
1315 | 0 | void PersonEncDec::Clear() { |
1316 | | // @@protoc_insertion_point(message_clear_start:PersonEncDec) |
1317 | 0 | uint32_t cached_has_bits = 0; |
1318 | | // Prevent compiler warnings about cached_has_bits being unused |
1319 | 0 | (void) cached_has_bits; |
1320 | |
|
1321 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
1322 | 0 | if (cached_has_bits & 0x00000003u) { |
1323 | 0 | if (cached_has_bits & 0x00000001u) { |
1324 | 0 | _impl_.name_.ClearNonDefaultToEmpty(); |
1325 | 0 | } |
1326 | 0 | if (cached_has_bits & 0x00000002u) { |
1327 | 0 | GOOGLE_DCHECK(_impl_.json_body_ != nullptr); |
1328 | 0 | _impl_.json_body_->Clear(); |
1329 | 0 | } |
1330 | 0 | } |
1331 | 0 | _impl_.id_ = 0; |
1332 | 0 | _impl_._has_bits_.Clear(); |
1333 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
1334 | 0 | } |
1335 | | |
1336 | 0 | const char* PersonEncDec::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
1337 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1338 | 0 | _Internal::HasBits has_bits{}; |
1339 | 0 | while (!ctx->Done(&ptr)) { |
1340 | 0 | uint32_t tag; |
1341 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
1342 | 0 | switch (tag >> 3) { |
1343 | | // optional string name = 1; |
1344 | 0 | case 1: |
1345 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
1346 | 0 | auto str = _internal_mutable_name(); |
1347 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
1348 | 0 | CHK_(ptr); |
1349 | 0 | #ifndef NDEBUG |
1350 | 0 | ::_pbi::VerifyUTF8(str, "PersonEncDec.name"); |
1351 | 0 | #endif // !NDEBUG |
1352 | 0 | } else |
1353 | 0 | goto handle_unusual; |
1354 | 0 | continue; |
1355 | | // optional int32 id = 2; |
1356 | 0 | case 2: |
1357 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { |
1358 | 0 | _Internal::set_has_id(&has_bits); |
1359 | 0 | _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
1360 | 0 | CHK_(ptr); |
1361 | 0 | } else |
1362 | 0 | goto handle_unusual; |
1363 | 0 | continue; |
1364 | | // optional .JsonContextBodyEncDec json_body = 18; |
1365 | 0 | case 18: |
1366 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) { |
1367 | 0 | ptr = ctx->ParseMessage(_internal_mutable_json_body(), ptr); |
1368 | 0 | CHK_(ptr); |
1369 | 0 | } else |
1370 | 0 | goto handle_unusual; |
1371 | 0 | continue; |
1372 | 0 | default: |
1373 | 0 | goto handle_unusual; |
1374 | 0 | } // switch |
1375 | 0 | handle_unusual: |
1376 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
1377 | 0 | CHK_(ptr); |
1378 | 0 | ctx->SetLastTag(tag); |
1379 | 0 | goto message_done; |
1380 | 0 | } |
1381 | 0 | ptr = UnknownFieldParse( |
1382 | 0 | tag, |
1383 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
1384 | 0 | ptr, ctx); |
1385 | 0 | CHK_(ptr != nullptr); |
1386 | 0 | } // while |
1387 | 0 | message_done: |
1388 | 0 | _impl_._has_bits_.Or(has_bits); |
1389 | 0 | return ptr; |
1390 | 0 | failure: |
1391 | 0 | ptr = nullptr; |
1392 | 0 | goto message_done; |
1393 | 0 | #undef CHK_ |
1394 | 0 | } |
1395 | | |
1396 | | uint8_t* PersonEncDec::_InternalSerialize( |
1397 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
1398 | | // @@protoc_insertion_point(serialize_to_array_start:PersonEncDec) |
1399 | 0 | uint32_t cached_has_bits = 0; |
1400 | 0 | (void) cached_has_bits; |
1401 | |
|
1402 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
1403 | | // optional string name = 1; |
1404 | 0 | if (cached_has_bits & 0x00000001u) { |
1405 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
1406 | 0 | this->_internal_name().data(), static_cast<int>(this->_internal_name().length()), |
1407 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
1408 | 0 | "PersonEncDec.name"); |
1409 | 0 | target = stream->WriteStringMaybeAliased( |
1410 | 0 | 1, this->_internal_name(), target); |
1411 | 0 | } |
1412 | | |
1413 | | // optional int32 id = 2; |
1414 | 0 | if (cached_has_bits & 0x00000004u) { |
1415 | 0 | target = stream->EnsureSpace(target); |
1416 | 0 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_id(), target); |
1417 | 0 | } |
1418 | | |
1419 | | // optional .JsonContextBodyEncDec json_body = 18; |
1420 | 0 | if (cached_has_bits & 0x00000002u) { |
1421 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1422 | 0 | InternalWriteMessage(18, _Internal::json_body(this), |
1423 | 0 | _Internal::json_body(this).GetCachedSize(), target, stream); |
1424 | 0 | } |
1425 | |
|
1426 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
1427 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
1428 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
1429 | 0 | } |
1430 | | // @@protoc_insertion_point(serialize_to_array_end:PersonEncDec) |
1431 | 0 | return target; |
1432 | 0 | } |
1433 | | |
1434 | 0 | size_t PersonEncDec::ByteSizeLong() const { |
1435 | | // @@protoc_insertion_point(message_byte_size_start:PersonEncDec) |
1436 | 0 | size_t total_size = 0; |
1437 | |
|
1438 | 0 | uint32_t cached_has_bits = 0; |
1439 | | // Prevent compiler warnings about cached_has_bits being unused |
1440 | 0 | (void) cached_has_bits; |
1441 | |
|
1442 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
1443 | 0 | if (cached_has_bits & 0x00000007u) { |
1444 | | // optional string name = 1; |
1445 | 0 | if (cached_has_bits & 0x00000001u) { |
1446 | 0 | total_size += 1 + |
1447 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1448 | 0 | this->_internal_name()); |
1449 | 0 | } |
1450 | | |
1451 | | // optional .JsonContextBodyEncDec json_body = 18; |
1452 | 0 | if (cached_has_bits & 0x00000002u) { |
1453 | 0 | total_size += 2 + |
1454 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1455 | 0 | *_impl_.json_body_); |
1456 | 0 | } |
1457 | | |
1458 | | // optional int32 id = 2; |
1459 | 0 | if (cached_has_bits & 0x00000004u) { |
1460 | 0 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id()); |
1461 | 0 | } |
1462 | |
|
1463 | 0 | } |
1464 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
1465 | 0 | } |
1466 | | |
1467 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PersonEncDec::_class_data_ = { |
1468 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
1469 | | PersonEncDec::MergeImpl |
1470 | | }; |
1471 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PersonEncDec::GetClassData() const { return &_class_data_; } |
1472 | | |
1473 | | |
1474 | 0 | void PersonEncDec::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
1475 | 0 | auto* const _this = static_cast<PersonEncDec*>(&to_msg); |
1476 | 0 | auto& from = static_cast<const PersonEncDec&>(from_msg); |
1477 | | // @@protoc_insertion_point(class_specific_merge_from_start:PersonEncDec) |
1478 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
1479 | 0 | uint32_t cached_has_bits = 0; |
1480 | 0 | (void) cached_has_bits; |
1481 | |
|
1482 | 0 | cached_has_bits = from._impl_._has_bits_[0]; |
1483 | 0 | if (cached_has_bits & 0x00000007u) { |
1484 | 0 | if (cached_has_bits & 0x00000001u) { |
1485 | 0 | _this->_internal_set_name(from._internal_name()); |
1486 | 0 | } |
1487 | 0 | if (cached_has_bits & 0x00000002u) { |
1488 | 0 | _this->_internal_mutable_json_body()->::JsonContextBodyEncDec::MergeFrom( |
1489 | 0 | from._internal_json_body()); |
1490 | 0 | } |
1491 | 0 | if (cached_has_bits & 0x00000004u) { |
1492 | 0 | _this->_impl_.id_ = from._impl_.id_; |
1493 | 0 | } |
1494 | 0 | _this->_impl_._has_bits_[0] |= cached_has_bits; |
1495 | 0 | } |
1496 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
1497 | 0 | } |
1498 | | |
1499 | 0 | void PersonEncDec::CopyFrom(const PersonEncDec& from) { |
1500 | | // @@protoc_insertion_point(class_specific_copy_from_start:PersonEncDec) |
1501 | 0 | if (&from == this) return; |
1502 | 0 | Clear(); |
1503 | 0 | MergeFrom(from); |
1504 | 0 | } |
1505 | | |
1506 | 0 | bool PersonEncDec::IsInitialized() const { |
1507 | 0 | if (_internal_has_json_body()) { |
1508 | 0 | if (!_impl_.json_body_->IsInitialized()) return false; |
1509 | 0 | } |
1510 | 0 | return true; |
1511 | 0 | } |
1512 | | |
1513 | 0 | void PersonEncDec::InternalSwap(PersonEncDec* other) { |
1514 | 0 | using std::swap; |
1515 | 0 | auto* lhs_arena = GetArenaForAllocation(); |
1516 | 0 | auto* rhs_arena = other->GetArenaForAllocation(); |
1517 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
1518 | 0 | swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); |
1519 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
1520 | 0 | &_impl_.name_, lhs_arena, |
1521 | 0 | &other->_impl_.name_, rhs_arena |
1522 | 0 | ); |
1523 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
1524 | 0 | PROTOBUF_FIELD_OFFSET(PersonEncDec, _impl_.id_) |
1525 | 0 | + sizeof(PersonEncDec::_impl_.id_) |
1526 | 0 | - PROTOBUF_FIELD_OFFSET(PersonEncDec, _impl_.json_body_)>( |
1527 | 0 | reinterpret_cast<char*>(&_impl_.json_body_), |
1528 | 0 | reinterpret_cast<char*>(&other->_impl_.json_body_)); |
1529 | 0 | } |
1530 | | |
1531 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata PersonEncDec::GetMetadata() const { |
1532 | 0 | return ::_pbi::AssignDescriptors( |
1533 | 0 | &descriptor_table_addressbook_5fencode_5fdecode_2eproto_getter, &descriptor_table_addressbook_5fencode_5fdecode_2eproto_once, |
1534 | 0 | file_level_metadata_addressbook_5fencode_5fdecode_2eproto[3]); |
1535 | 0 | } |
1536 | | |
1537 | | // =================================================================== |
1538 | | |
1539 | | class AddressBookEncDec::_Internal { |
1540 | | public: |
1541 | | }; |
1542 | | |
1543 | | AddressBookEncDec::AddressBookEncDec(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
1544 | | bool is_message_owned) |
1545 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
1546 | 0 | SharedCtor(arena, is_message_owned); |
1547 | | // @@protoc_insertion_point(arena_constructor:AddressBookEncDec) |
1548 | 0 | } |
1549 | | AddressBookEncDec::AddressBookEncDec(const AddressBookEncDec& from) |
1550 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
1551 | 0 | AddressBookEncDec* const _this = this; (void)_this; |
1552 | 0 | new (&_impl_) Impl_{ |
1553 | 0 | decltype(_impl_.person_){from._impl_.person_} |
1554 | 0 | , /*decltype(_impl_._cached_size_)*/{}}; |
1555 | |
|
1556 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
1557 | | // @@protoc_insertion_point(copy_constructor:AddressBookEncDec) |
1558 | 0 | } |
1559 | | |
1560 | | inline void AddressBookEncDec::SharedCtor( |
1561 | 0 | ::_pb::Arena* arena, bool is_message_owned) { |
1562 | 0 | (void)arena; |
1563 | 0 | (void)is_message_owned; |
1564 | 0 | new (&_impl_) Impl_{ |
1565 | 0 | decltype(_impl_.person_){arena} |
1566 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
1567 | 0 | }; |
1568 | 0 | } |
1569 | | |
1570 | 0 | AddressBookEncDec::~AddressBookEncDec() { |
1571 | | // @@protoc_insertion_point(destructor:AddressBookEncDec) |
1572 | 0 | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
1573 | 0 | (void)arena; |
1574 | 0 | return; |
1575 | 0 | } |
1576 | 0 | SharedDtor(); |
1577 | 0 | } |
1578 | | |
1579 | 0 | inline void AddressBookEncDec::SharedDtor() { |
1580 | 0 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
1581 | 0 | _impl_.person_.~RepeatedPtrField(); |
1582 | 0 | } |
1583 | | |
1584 | 0 | void AddressBookEncDec::SetCachedSize(int size) const { |
1585 | 0 | _impl_._cached_size_.Set(size); |
1586 | 0 | } |
1587 | | |
1588 | 0 | void AddressBookEncDec::Clear() { |
1589 | | // @@protoc_insertion_point(message_clear_start:AddressBookEncDec) |
1590 | 0 | uint32_t cached_has_bits = 0; |
1591 | | // Prevent compiler warnings about cached_has_bits being unused |
1592 | 0 | (void) cached_has_bits; |
1593 | |
|
1594 | 0 | _impl_.person_.Clear(); |
1595 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
1596 | 0 | } |
1597 | | |
1598 | 0 | const char* AddressBookEncDec::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
1599 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1600 | 0 | while (!ctx->Done(&ptr)) { |
1601 | 0 | uint32_t tag; |
1602 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
1603 | 0 | switch (tag >> 3) { |
1604 | | // repeated .PersonEncDec person = 1; |
1605 | 0 | case 1: |
1606 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
1607 | 0 | ptr -= 1; |
1608 | 0 | do { |
1609 | 0 | ptr += 1; |
1610 | 0 | ptr = ctx->ParseMessage(_internal_add_person(), ptr); |
1611 | 0 | CHK_(ptr); |
1612 | 0 | if (!ctx->DataAvailable(ptr)) break; |
1613 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); |
1614 | 0 | } else |
1615 | 0 | goto handle_unusual; |
1616 | 0 | continue; |
1617 | 0 | default: |
1618 | 0 | goto handle_unusual; |
1619 | 0 | } // switch |
1620 | 0 | handle_unusual: |
1621 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
1622 | 0 | CHK_(ptr); |
1623 | 0 | ctx->SetLastTag(tag); |
1624 | 0 | goto message_done; |
1625 | 0 | } |
1626 | 0 | ptr = UnknownFieldParse( |
1627 | 0 | tag, |
1628 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
1629 | 0 | ptr, ctx); |
1630 | 0 | CHK_(ptr != nullptr); |
1631 | 0 | } // while |
1632 | 0 | message_done: |
1633 | 0 | return ptr; |
1634 | 0 | failure: |
1635 | 0 | ptr = nullptr; |
1636 | 0 | goto message_done; |
1637 | 0 | #undef CHK_ |
1638 | 0 | } |
1639 | | |
1640 | | uint8_t* AddressBookEncDec::_InternalSerialize( |
1641 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
1642 | | // @@protoc_insertion_point(serialize_to_array_start:AddressBookEncDec) |
1643 | 0 | uint32_t cached_has_bits = 0; |
1644 | 0 | (void) cached_has_bits; |
1645 | | |
1646 | | // repeated .PersonEncDec person = 1; |
1647 | 0 | for (unsigned i = 0, |
1648 | 0 | n = static_cast<unsigned>(this->_internal_person_size()); i < n; i++) { |
1649 | 0 | const auto& repfield = this->_internal_person(i); |
1650 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1651 | 0 | InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); |
1652 | 0 | } |
1653 | |
|
1654 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
1655 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
1656 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
1657 | 0 | } |
1658 | | // @@protoc_insertion_point(serialize_to_array_end:AddressBookEncDec) |
1659 | 0 | return target; |
1660 | 0 | } |
1661 | | |
1662 | 0 | size_t AddressBookEncDec::ByteSizeLong() const { |
1663 | | // @@protoc_insertion_point(message_byte_size_start:AddressBookEncDec) |
1664 | 0 | size_t total_size = 0; |
1665 | |
|
1666 | 0 | uint32_t cached_has_bits = 0; |
1667 | | // Prevent compiler warnings about cached_has_bits being unused |
1668 | 0 | (void) cached_has_bits; |
1669 | | |
1670 | | // repeated .PersonEncDec person = 1; |
1671 | 0 | total_size += 1UL * this->_internal_person_size(); |
1672 | 0 | for (const auto& msg : this->_impl_.person_) { |
1673 | 0 | total_size += |
1674 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); |
1675 | 0 | } |
1676 | |
|
1677 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
1678 | 0 | } |
1679 | | |
1680 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AddressBookEncDec::_class_data_ = { |
1681 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
1682 | | AddressBookEncDec::MergeImpl |
1683 | | }; |
1684 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AddressBookEncDec::GetClassData() const { return &_class_data_; } |
1685 | | |
1686 | | |
1687 | 0 | void AddressBookEncDec::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
1688 | 0 | auto* const _this = static_cast<AddressBookEncDec*>(&to_msg); |
1689 | 0 | auto& from = static_cast<const AddressBookEncDec&>(from_msg); |
1690 | | // @@protoc_insertion_point(class_specific_merge_from_start:AddressBookEncDec) |
1691 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
1692 | 0 | uint32_t cached_has_bits = 0; |
1693 | 0 | (void) cached_has_bits; |
1694 | |
|
1695 | 0 | _this->_impl_.person_.MergeFrom(from._impl_.person_); |
1696 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
1697 | 0 | } |
1698 | | |
1699 | 0 | void AddressBookEncDec::CopyFrom(const AddressBookEncDec& from) { |
1700 | | // @@protoc_insertion_point(class_specific_copy_from_start:AddressBookEncDec) |
1701 | 0 | if (&from == this) return; |
1702 | 0 | Clear(); |
1703 | 0 | MergeFrom(from); |
1704 | 0 | } |
1705 | | |
1706 | 0 | bool AddressBookEncDec::IsInitialized() const { |
1707 | 0 | if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.person_)) |
1708 | 0 | return false; |
1709 | 0 | return true; |
1710 | 0 | } |
1711 | | |
1712 | 0 | void AddressBookEncDec::InternalSwap(AddressBookEncDec* other) { |
1713 | 0 | using std::swap; |
1714 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
1715 | 0 | _impl_.person_.InternalSwap(&other->_impl_.person_); |
1716 | 0 | } |
1717 | | |
1718 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata AddressBookEncDec::GetMetadata() const { |
1719 | 0 | return ::_pbi::AssignDescriptors( |
1720 | 0 | &descriptor_table_addressbook_5fencode_5fdecode_2eproto_getter, &descriptor_table_addressbook_5fencode_5fdecode_2eproto_once, |
1721 | 0 | file_level_metadata_addressbook_5fencode_5fdecode_2eproto[4]); |
1722 | 0 | } |
1723 | | |
1724 | | // @@protoc_insertion_point(namespace_scope) |
1725 | | PROTOBUF_NAMESPACE_OPEN |
1726 | | template<> PROTOBUF_NOINLINE ::ExtEncDec* |
1727 | 0 | Arena::CreateMaybeMessage< ::ExtEncDec >(Arena* arena) { |
1728 | 0 | return Arena::CreateMessageInternal< ::ExtEncDec >(arena); |
1729 | 0 | } |
1730 | | template<> PROTOBUF_NOINLINE ::ContentEncDec* |
1731 | 0 | Arena::CreateMaybeMessage< ::ContentEncDec >(Arena* arena) { |
1732 | 0 | return Arena::CreateMessageInternal< ::ContentEncDec >(arena); |
1733 | 0 | } |
1734 | | template<> PROTOBUF_NOINLINE ::JsonContextBodyEncDec* |
1735 | 0 | Arena::CreateMaybeMessage< ::JsonContextBodyEncDec >(Arena* arena) { |
1736 | 0 | return Arena::CreateMessageInternal< ::JsonContextBodyEncDec >(arena); |
1737 | 0 | } |
1738 | | template<> PROTOBUF_NOINLINE ::PersonEncDec* |
1739 | 0 | Arena::CreateMaybeMessage< ::PersonEncDec >(Arena* arena) { |
1740 | 0 | return Arena::CreateMessageInternal< ::PersonEncDec >(arena); |
1741 | 0 | } |
1742 | | template<> PROTOBUF_NOINLINE ::AddressBookEncDec* |
1743 | 0 | Arena::CreateMaybeMessage< ::AddressBookEncDec >(Arena* arena) { |
1744 | 0 | return Arena::CreateMessageInternal< ::AddressBookEncDec >(arena); |
1745 | 0 | } |
1746 | | PROTOBUF_NAMESPACE_CLOSE |
1747 | | |
1748 | | // @@protoc_insertion_point(global_scope) |
1749 | | #include <google/protobuf/port_undef.inc> |