/src/brpc/build/test/iobuf.pb.cc
Line | Count | Source |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: iobuf.proto |
3 | | |
4 | | #include "iobuf.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 | | namespace proto { |
24 | | PROTOBUF_CONSTEXPR Misc::Misc( |
25 | | ::_pbi::ConstantInitialized): _impl_{ |
26 | | /*decltype(_impl_._has_bits_)*/{} |
27 | | , /*decltype(_impl_._cached_size_)*/{} |
28 | | , /*decltype(_impl_.repeated_enum_)*/{} |
29 | | , /*decltype(_impl_.repeated_uint64_)*/{} |
30 | | , /*decltype(_impl_.repeated_string_)*/{} |
31 | | , /*decltype(_impl_.repeated_bool_)*/{} |
32 | | , /*decltype(_impl_.repeated_int32_)*/{} |
33 | | , /*decltype(_impl_.required_string_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} |
34 | | , /*decltype(_impl_.optional_string_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} |
35 | | , /*decltype(_impl_.required_enum_)*/0 |
36 | | , /*decltype(_impl_.optional_enum_)*/0 |
37 | | , /*decltype(_impl_.required_uint64_)*/uint64_t{0u} |
38 | | , /*decltype(_impl_.optional_uint64_)*/uint64_t{0u} |
39 | | , /*decltype(_impl_.required_bool_)*/false |
40 | | , /*decltype(_impl_.optional_bool_)*/false |
41 | | , /*decltype(_impl_.required_int32_)*/0 |
42 | | , /*decltype(_impl_.optional_int32_)*/0} {} |
43 | | struct MiscDefaultTypeInternal { |
44 | | PROTOBUF_CONSTEXPR MiscDefaultTypeInternal() |
45 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
46 | 0 | ~MiscDefaultTypeInternal() {} |
47 | | union { |
48 | | Misc _instance; |
49 | | }; |
50 | | }; |
51 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MiscDefaultTypeInternal _Misc_default_instance_; |
52 | | } // namespace proto |
53 | | static ::_pb::Metadata file_level_metadata_iobuf_2eproto[1]; |
54 | | static const ::_pb::EnumDescriptor* file_level_enum_descriptors_iobuf_2eproto[1]; |
55 | | static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_iobuf_2eproto = nullptr; |
56 | | |
57 | | const uint32_t TableStruct_iobuf_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
58 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_._has_bits_), |
59 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _internal_metadata_), |
60 | | ~0u, // no _extensions_ |
61 | | ~0u, // no _oneof_case_ |
62 | | ~0u, // no _weak_field_map_ |
63 | | ~0u, // no _inlined_string_donated_ |
64 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.required_enum_), |
65 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.optional_enum_), |
66 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.repeated_enum_), |
67 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.required_uint64_), |
68 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.optional_uint64_), |
69 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.repeated_uint64_), |
70 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.required_string_), |
71 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.optional_string_), |
72 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.repeated_string_), |
73 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.required_bool_), |
74 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.optional_bool_), |
75 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.repeated_bool_), |
76 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.required_int32_), |
77 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.optional_int32_), |
78 | | PROTOBUF_FIELD_OFFSET(::proto::Misc, _impl_.repeated_int32_), |
79 | | 2, |
80 | | 3, |
81 | | ~0u, |
82 | | 4, |
83 | | 5, |
84 | | ~0u, |
85 | | 0, |
86 | | 1, |
87 | | ~0u, |
88 | | 6, |
89 | | 7, |
90 | | ~0u, |
91 | | 8, |
92 | | 9, |
93 | | ~0u, |
94 | | }; |
95 | | static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
96 | | { 0, 21, -1, sizeof(::proto::Misc)}, |
97 | | }; |
98 | | |
99 | | static const ::_pb::Message* const file_default_instances[] = { |
100 | | &::proto::_Misc_default_instance_._instance, |
101 | | }; |
102 | | |
103 | | const char descriptor_table_protodef_iobuf_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
104 | | "\n\013iobuf.proto\022\005proto\"\255\003\n\004Misc\022*\n\rrequire" |
105 | | "d_enum\030\001 \002(\0162\023.proto.CompressType\022*\n\ropt" |
106 | | "ional_enum\030\002 \001(\0162\023.proto.CompressType\022*\n" |
107 | | "\rrepeated_enum\030\003 \003(\0162\023.proto.CompressTyp" |
108 | | "e\022\027\n\017required_uint64\030\004 \002(\004\022\027\n\017optional_u" |
109 | | "int64\030\005 \001(\004\022\027\n\017repeated_uint64\030\006 \003(\004\022\027\n\017" |
110 | | "required_string\030\007 \002(\t\022\027\n\017optional_string" |
111 | | "\030\010 \001(\t\022\027\n\017repeated_string\030\t \003(\t\022\025\n\rrequi" |
112 | | "red_bool\030\n \002(\010\022\025\n\roptional_bool\030\013 \001(\010\022\025\n" |
113 | | "\rrepeated_bool\030\014 \003(\010\022\026\n\016required_int32\030\r" |
114 | | " \002(\005\022\026\n\016optional_int32\030\016 \001(\005\022\026\n\016repeated" |
115 | | "_int32\030\017 \003(\005*}\n\014CompressType\022\024\n\020Compress" |
116 | | "TypeNone\020\000\022\024\n\020CompressTypeGzip\020\001\022\024\n\020Comp" |
117 | | "ressTypeZlib\020\002\022\026\n\022CompressTypeSnappy\020\003\022\023" |
118 | | "\n\017CompressTypeLZ4\020\004" |
119 | | ; |
120 | | static ::_pbi::once_flag descriptor_table_iobuf_2eproto_once; |
121 | | const ::_pbi::DescriptorTable descriptor_table_iobuf_2eproto = { |
122 | | false, false, 579, descriptor_table_protodef_iobuf_2eproto, |
123 | | "iobuf.proto", |
124 | | &descriptor_table_iobuf_2eproto_once, nullptr, 0, 1, |
125 | | schemas, file_default_instances, TableStruct_iobuf_2eproto::offsets, |
126 | | file_level_metadata_iobuf_2eproto, file_level_enum_descriptors_iobuf_2eproto, |
127 | | file_level_service_descriptors_iobuf_2eproto, |
128 | | }; |
129 | 0 | PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_iobuf_2eproto_getter() { |
130 | 0 | return &descriptor_table_iobuf_2eproto; |
131 | 0 | } |
132 | | |
133 | | // Force running AddDescriptors() at dynamic initialization time. |
134 | | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_iobuf_2eproto(&descriptor_table_iobuf_2eproto); |
135 | | namespace proto { |
136 | 0 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CompressType_descriptor() { |
137 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_iobuf_2eproto); |
138 | 0 | return file_level_enum_descriptors_iobuf_2eproto[0]; |
139 | 0 | } |
140 | 0 | bool CompressType_IsValid(int value) { |
141 | 0 | switch (value) { |
142 | 0 | case 0: |
143 | 0 | case 1: |
144 | 0 | case 2: |
145 | 0 | case 3: |
146 | 0 | case 4: |
147 | 0 | return true; |
148 | 0 | default: |
149 | 0 | return false; |
150 | 0 | } |
151 | 0 | } |
152 | | |
153 | | |
154 | | // =================================================================== |
155 | | |
156 | | class Misc::_Internal { |
157 | | public: |
158 | | using HasBits = decltype(std::declval<Misc>()._impl_._has_bits_); |
159 | 0 | static void set_has_required_enum(HasBits* has_bits) { |
160 | 0 | (*has_bits)[0] |= 4u; |
161 | 0 | } |
162 | 0 | static void set_has_optional_enum(HasBits* has_bits) { |
163 | 0 | (*has_bits)[0] |= 8u; |
164 | 0 | } |
165 | 0 | static void set_has_required_uint64(HasBits* has_bits) { |
166 | 0 | (*has_bits)[0] |= 16u; |
167 | 0 | } |
168 | 0 | static void set_has_optional_uint64(HasBits* has_bits) { |
169 | 0 | (*has_bits)[0] |= 32u; |
170 | 0 | } |
171 | 0 | static void set_has_required_string(HasBits* has_bits) { |
172 | 0 | (*has_bits)[0] |= 1u; |
173 | 0 | } |
174 | 0 | static void set_has_optional_string(HasBits* has_bits) { |
175 | 0 | (*has_bits)[0] |= 2u; |
176 | 0 | } |
177 | 0 | static void set_has_required_bool(HasBits* has_bits) { |
178 | 0 | (*has_bits)[0] |= 64u; |
179 | 0 | } |
180 | 0 | static void set_has_optional_bool(HasBits* has_bits) { |
181 | 0 | (*has_bits)[0] |= 128u; |
182 | 0 | } |
183 | 0 | static void set_has_required_int32(HasBits* has_bits) { |
184 | 0 | (*has_bits)[0] |= 256u; |
185 | 0 | } |
186 | 0 | static void set_has_optional_int32(HasBits* has_bits) { |
187 | 0 | (*has_bits)[0] |= 512u; |
188 | 0 | } |
189 | 0 | static bool MissingRequiredFields(const HasBits& has_bits) { |
190 | 0 | return ((has_bits[0] & 0x00000155) ^ 0x00000155) != 0; |
191 | 0 | } |
192 | | }; |
193 | | |
194 | | Misc::Misc(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
195 | | bool is_message_owned) |
196 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
197 | 0 | SharedCtor(arena, is_message_owned); |
198 | | // @@protoc_insertion_point(arena_constructor:proto.Misc) |
199 | 0 | } |
200 | | Misc::Misc(const Misc& from) |
201 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
202 | 0 | Misc* const _this = this; (void)_this; |
203 | 0 | new (&_impl_) Impl_{ |
204 | 0 | decltype(_impl_._has_bits_){from._impl_._has_bits_} |
205 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
206 | 0 | , decltype(_impl_.repeated_enum_){from._impl_.repeated_enum_} |
207 | 0 | , decltype(_impl_.repeated_uint64_){from._impl_.repeated_uint64_} |
208 | 0 | , decltype(_impl_.repeated_string_){from._impl_.repeated_string_} |
209 | 0 | , decltype(_impl_.repeated_bool_){from._impl_.repeated_bool_} |
210 | 0 | , decltype(_impl_.repeated_int32_){from._impl_.repeated_int32_} |
211 | 0 | , decltype(_impl_.required_string_){} |
212 | 0 | , decltype(_impl_.optional_string_){} |
213 | 0 | , decltype(_impl_.required_enum_){} |
214 | 0 | , decltype(_impl_.optional_enum_){} |
215 | 0 | , decltype(_impl_.required_uint64_){} |
216 | 0 | , decltype(_impl_.optional_uint64_){} |
217 | 0 | , decltype(_impl_.required_bool_){} |
218 | 0 | , decltype(_impl_.optional_bool_){} |
219 | 0 | , decltype(_impl_.required_int32_){} |
220 | 0 | , decltype(_impl_.optional_int32_){}}; |
221 | |
|
222 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
223 | 0 | _impl_.required_string_.InitDefault(); |
224 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
225 | | _impl_.required_string_.Set("", GetArenaForAllocation()); |
226 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
227 | 0 | if (from._internal_has_required_string()) { |
228 | 0 | _this->_impl_.required_string_.Set(from._internal_required_string(), |
229 | 0 | _this->GetArenaForAllocation()); |
230 | 0 | } |
231 | 0 | _impl_.optional_string_.InitDefault(); |
232 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
233 | | _impl_.optional_string_.Set("", GetArenaForAllocation()); |
234 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
235 | 0 | if (from._internal_has_optional_string()) { |
236 | 0 | _this->_impl_.optional_string_.Set(from._internal_optional_string(), |
237 | 0 | _this->GetArenaForAllocation()); |
238 | 0 | } |
239 | 0 | ::memcpy(&_impl_.required_enum_, &from._impl_.required_enum_, |
240 | 0 | static_cast<size_t>(reinterpret_cast<char*>(&_impl_.optional_int32_) - |
241 | 0 | reinterpret_cast<char*>(&_impl_.required_enum_)) + sizeof(_impl_.optional_int32_)); |
242 | | // @@protoc_insertion_point(copy_constructor:proto.Misc) |
243 | 0 | } |
244 | | |
245 | | inline void Misc::SharedCtor( |
246 | 0 | ::_pb::Arena* arena, bool is_message_owned) { |
247 | 0 | (void)arena; |
248 | 0 | (void)is_message_owned; |
249 | 0 | new (&_impl_) Impl_{ |
250 | 0 | decltype(_impl_._has_bits_){} |
251 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
252 | 0 | , decltype(_impl_.repeated_enum_){arena} |
253 | 0 | , decltype(_impl_.repeated_uint64_){arena} |
254 | 0 | , decltype(_impl_.repeated_string_){arena} |
255 | 0 | , decltype(_impl_.repeated_bool_){arena} |
256 | 0 | , decltype(_impl_.repeated_int32_){arena} |
257 | 0 | , decltype(_impl_.required_string_){} |
258 | 0 | , decltype(_impl_.optional_string_){} |
259 | 0 | , decltype(_impl_.required_enum_){0} |
260 | 0 | , decltype(_impl_.optional_enum_){0} |
261 | 0 | , decltype(_impl_.required_uint64_){uint64_t{0u}} |
262 | 0 | , decltype(_impl_.optional_uint64_){uint64_t{0u}} |
263 | 0 | , decltype(_impl_.required_bool_){false} |
264 | 0 | , decltype(_impl_.optional_bool_){false} |
265 | 0 | , decltype(_impl_.required_int32_){0} |
266 | 0 | , decltype(_impl_.optional_int32_){0} |
267 | 0 | }; |
268 | 0 | _impl_.required_string_.InitDefault(); |
269 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
270 | | _impl_.required_string_.Set("", GetArenaForAllocation()); |
271 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
272 | 0 | _impl_.optional_string_.InitDefault(); |
273 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
274 | | _impl_.optional_string_.Set("", GetArenaForAllocation()); |
275 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
276 | 0 | } |
277 | | |
278 | 0 | Misc::~Misc() { |
279 | | // @@protoc_insertion_point(destructor:proto.Misc) |
280 | 0 | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
281 | 0 | (void)arena; |
282 | 0 | return; |
283 | 0 | } |
284 | 0 | SharedDtor(); |
285 | 0 | } |
286 | | |
287 | 0 | inline void Misc::SharedDtor() { |
288 | 0 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
289 | 0 | _impl_.repeated_enum_.~RepeatedField(); |
290 | 0 | _impl_.repeated_uint64_.~RepeatedField(); |
291 | 0 | _impl_.repeated_string_.~RepeatedPtrField(); |
292 | 0 | _impl_.repeated_bool_.~RepeatedField(); |
293 | 0 | _impl_.repeated_int32_.~RepeatedField(); |
294 | 0 | _impl_.required_string_.Destroy(); |
295 | 0 | _impl_.optional_string_.Destroy(); |
296 | 0 | } |
297 | | |
298 | 0 | void Misc::SetCachedSize(int size) const { |
299 | 0 | _impl_._cached_size_.Set(size); |
300 | 0 | } |
301 | | |
302 | 0 | void Misc::Clear() { |
303 | | // @@protoc_insertion_point(message_clear_start:proto.Misc) |
304 | 0 | uint32_t cached_has_bits = 0; |
305 | | // Prevent compiler warnings about cached_has_bits being unused |
306 | 0 | (void) cached_has_bits; |
307 | |
|
308 | 0 | _impl_.repeated_enum_.Clear(); |
309 | 0 | _impl_.repeated_uint64_.Clear(); |
310 | 0 | _impl_.repeated_string_.Clear(); |
311 | 0 | _impl_.repeated_bool_.Clear(); |
312 | 0 | _impl_.repeated_int32_.Clear(); |
313 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
314 | 0 | if (cached_has_bits & 0x00000003u) { |
315 | 0 | if (cached_has_bits & 0x00000001u) { |
316 | 0 | _impl_.required_string_.ClearNonDefaultToEmpty(); |
317 | 0 | } |
318 | 0 | if (cached_has_bits & 0x00000002u) { |
319 | 0 | _impl_.optional_string_.ClearNonDefaultToEmpty(); |
320 | 0 | } |
321 | 0 | } |
322 | 0 | if (cached_has_bits & 0x000000fcu) { |
323 | 0 | ::memset(&_impl_.required_enum_, 0, static_cast<size_t>( |
324 | 0 | reinterpret_cast<char*>(&_impl_.optional_bool_) - |
325 | 0 | reinterpret_cast<char*>(&_impl_.required_enum_)) + sizeof(_impl_.optional_bool_)); |
326 | 0 | } |
327 | 0 | if (cached_has_bits & 0x00000300u) { |
328 | 0 | ::memset(&_impl_.required_int32_, 0, static_cast<size_t>( |
329 | 0 | reinterpret_cast<char*>(&_impl_.optional_int32_) - |
330 | 0 | reinterpret_cast<char*>(&_impl_.required_int32_)) + sizeof(_impl_.optional_int32_)); |
331 | 0 | } |
332 | 0 | _impl_._has_bits_.Clear(); |
333 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
334 | 0 | } |
335 | | |
336 | 0 | const char* Misc::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
337 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
338 | 0 | _Internal::HasBits has_bits{}; |
339 | 0 | while (!ctx->Done(&ptr)) { |
340 | 0 | uint32_t tag; |
341 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
342 | 0 | switch (tag >> 3) { |
343 | | // required .proto.CompressType required_enum = 1; |
344 | 0 | case 1: |
345 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { |
346 | 0 | uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
347 | 0 | CHK_(ptr); |
348 | 0 | if (PROTOBUF_PREDICT_TRUE(::proto::CompressType_IsValid(val))) { |
349 | 0 | _internal_set_required_enum(static_cast<::proto::CompressType>(val)); |
350 | 0 | } else { |
351 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); |
352 | 0 | } |
353 | 0 | } else |
354 | 0 | goto handle_unusual; |
355 | 0 | continue; |
356 | | // optional .proto.CompressType optional_enum = 2; |
357 | 0 | case 2: |
358 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { |
359 | 0 | uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
360 | 0 | CHK_(ptr); |
361 | 0 | if (PROTOBUF_PREDICT_TRUE(::proto::CompressType_IsValid(val))) { |
362 | 0 | _internal_set_optional_enum(static_cast<::proto::CompressType>(val)); |
363 | 0 | } else { |
364 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); |
365 | 0 | } |
366 | 0 | } else |
367 | 0 | goto handle_unusual; |
368 | 0 | continue; |
369 | | // repeated .proto.CompressType repeated_enum = 3; |
370 | 0 | case 3: |
371 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) { |
372 | 0 | ptr -= 1; |
373 | 0 | do { |
374 | 0 | ptr += 1; |
375 | 0 | uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
376 | 0 | CHK_(ptr); |
377 | 0 | if (PROTOBUF_PREDICT_TRUE(::proto::CompressType_IsValid(val))) { |
378 | 0 | _internal_add_repeated_enum(static_cast<::proto::CompressType>(val)); |
379 | 0 | } else { |
380 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields()); |
381 | 0 | } |
382 | 0 | if (!ctx->DataAvailable(ptr)) break; |
383 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr)); |
384 | 0 | } else if (static_cast<uint8_t>(tag) == 26) { |
385 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(_internal_mutable_repeated_enum(), ptr, ctx, ::proto::CompressType_IsValid, &_internal_metadata_, 3); |
386 | 0 | CHK_(ptr); |
387 | 0 | } else |
388 | 0 | goto handle_unusual; |
389 | 0 | continue; |
390 | | // required uint64 required_uint64 = 4; |
391 | 0 | case 4: |
392 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) { |
393 | 0 | _Internal::set_has_required_uint64(&has_bits); |
394 | 0 | _impl_.required_uint64_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
395 | 0 | CHK_(ptr); |
396 | 0 | } else |
397 | 0 | goto handle_unusual; |
398 | 0 | continue; |
399 | | // optional uint64 optional_uint64 = 5; |
400 | 0 | case 5: |
401 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) { |
402 | 0 | _Internal::set_has_optional_uint64(&has_bits); |
403 | 0 | _impl_.optional_uint64_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
404 | 0 | CHK_(ptr); |
405 | 0 | } else |
406 | 0 | goto handle_unusual; |
407 | 0 | continue; |
408 | | // repeated uint64 repeated_uint64 = 6; |
409 | 0 | case 6: |
410 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) { |
411 | 0 | ptr -= 1; |
412 | 0 | do { |
413 | 0 | ptr += 1; |
414 | 0 | _internal_add_repeated_uint64(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); |
415 | 0 | CHK_(ptr); |
416 | 0 | if (!ctx->DataAvailable(ptr)) break; |
417 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<48>(ptr)); |
418 | 0 | } else if (static_cast<uint8_t>(tag) == 50) { |
419 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_repeated_uint64(), ptr, ctx); |
420 | 0 | CHK_(ptr); |
421 | 0 | } else |
422 | 0 | goto handle_unusual; |
423 | 0 | continue; |
424 | | // required string required_string = 7; |
425 | 0 | case 7: |
426 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) { |
427 | 0 | auto str = _internal_mutable_required_string(); |
428 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
429 | 0 | CHK_(ptr); |
430 | 0 | #ifndef NDEBUG |
431 | 0 | ::_pbi::VerifyUTF8(str, "proto.Misc.required_string"); |
432 | 0 | #endif // !NDEBUG |
433 | 0 | } else |
434 | 0 | goto handle_unusual; |
435 | 0 | continue; |
436 | | // optional string optional_string = 8; |
437 | 0 | case 8: |
438 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) { |
439 | 0 | auto str = _internal_mutable_optional_string(); |
440 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
441 | 0 | CHK_(ptr); |
442 | 0 | #ifndef NDEBUG |
443 | 0 | ::_pbi::VerifyUTF8(str, "proto.Misc.optional_string"); |
444 | 0 | #endif // !NDEBUG |
445 | 0 | } else |
446 | 0 | goto handle_unusual; |
447 | 0 | continue; |
448 | | // repeated string repeated_string = 9; |
449 | 0 | case 9: |
450 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) { |
451 | 0 | ptr -= 1; |
452 | 0 | do { |
453 | 0 | ptr += 1; |
454 | 0 | auto str = _internal_add_repeated_string(); |
455 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
456 | 0 | CHK_(ptr); |
457 | 0 | #ifndef NDEBUG |
458 | 0 | ::_pbi::VerifyUTF8(str, "proto.Misc.repeated_string"); |
459 | 0 | #endif // !NDEBUG |
460 | 0 | if (!ctx->DataAvailable(ptr)) break; |
461 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr)); |
462 | 0 | } else |
463 | 0 | goto handle_unusual; |
464 | 0 | continue; |
465 | | // required bool required_bool = 10; |
466 | 0 | case 10: |
467 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) { |
468 | 0 | _Internal::set_has_required_bool(&has_bits); |
469 | 0 | _impl_.required_bool_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
470 | 0 | CHK_(ptr); |
471 | 0 | } else |
472 | 0 | goto handle_unusual; |
473 | 0 | continue; |
474 | | // optional bool optional_bool = 11; |
475 | 0 | case 11: |
476 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) { |
477 | 0 | _Internal::set_has_optional_bool(&has_bits); |
478 | 0 | _impl_.optional_bool_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); |
479 | 0 | CHK_(ptr); |
480 | 0 | } else |
481 | 0 | goto handle_unusual; |
482 | 0 | continue; |
483 | | // repeated bool repeated_bool = 12; |
484 | 0 | case 12: |
485 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) { |
486 | 0 | ptr -= 1; |
487 | 0 | do { |
488 | 0 | ptr += 1; |
489 | 0 | _internal_add_repeated_bool(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); |
490 | 0 | CHK_(ptr); |
491 | 0 | if (!ctx->DataAvailable(ptr)) break; |
492 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<96>(ptr)); |
493 | 0 | } else if (static_cast<uint8_t>(tag) == 98) { |
494 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedBoolParser(_internal_mutable_repeated_bool(), ptr, ctx); |
495 | 0 | CHK_(ptr); |
496 | 0 | } else |
497 | 0 | goto handle_unusual; |
498 | 0 | continue; |
499 | | // required int32 required_int32 = 13; |
500 | 0 | case 13: |
501 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) { |
502 | 0 | _Internal::set_has_required_int32(&has_bits); |
503 | 0 | _impl_.required_int32_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
504 | 0 | CHK_(ptr); |
505 | 0 | } else |
506 | 0 | goto handle_unusual; |
507 | 0 | continue; |
508 | | // optional int32 optional_int32 = 14; |
509 | 0 | case 14: |
510 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) { |
511 | 0 | _Internal::set_has_optional_int32(&has_bits); |
512 | 0 | _impl_.optional_int32_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
513 | 0 | CHK_(ptr); |
514 | 0 | } else |
515 | 0 | goto handle_unusual; |
516 | 0 | continue; |
517 | | // repeated int32 repeated_int32 = 15; |
518 | 0 | case 15: |
519 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 120)) { |
520 | 0 | ptr -= 1; |
521 | 0 | do { |
522 | 0 | ptr += 1; |
523 | 0 | _internal_add_repeated_int32(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); |
524 | 0 | CHK_(ptr); |
525 | 0 | if (!ctx->DataAvailable(ptr)) break; |
526 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<120>(ptr)); |
527 | 0 | } else if (static_cast<uint8_t>(tag) == 122) { |
528 | 0 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_repeated_int32(), ptr, ctx); |
529 | 0 | CHK_(ptr); |
530 | 0 | } else |
531 | 0 | goto handle_unusual; |
532 | 0 | continue; |
533 | 0 | default: |
534 | 0 | goto handle_unusual; |
535 | 0 | } // switch |
536 | 0 | handle_unusual: |
537 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
538 | 0 | CHK_(ptr); |
539 | 0 | ctx->SetLastTag(tag); |
540 | 0 | goto message_done; |
541 | 0 | } |
542 | 0 | ptr = UnknownFieldParse( |
543 | 0 | tag, |
544 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
545 | 0 | ptr, ctx); |
546 | 0 | CHK_(ptr != nullptr); |
547 | 0 | } // while |
548 | 0 | message_done: |
549 | 0 | _impl_._has_bits_.Or(has_bits); |
550 | 0 | return ptr; |
551 | 0 | failure: |
552 | 0 | ptr = nullptr; |
553 | 0 | goto message_done; |
554 | 0 | #undef CHK_ |
555 | 0 | } |
556 | | |
557 | | uint8_t* Misc::_InternalSerialize( |
558 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
559 | | // @@protoc_insertion_point(serialize_to_array_start:proto.Misc) |
560 | 0 | uint32_t cached_has_bits = 0; |
561 | 0 | (void) cached_has_bits; |
562 | |
|
563 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
564 | | // required .proto.CompressType required_enum = 1; |
565 | 0 | if (cached_has_bits & 0x00000004u) { |
566 | 0 | target = stream->EnsureSpace(target); |
567 | 0 | target = ::_pbi::WireFormatLite::WriteEnumToArray( |
568 | 0 | 1, this->_internal_required_enum(), target); |
569 | 0 | } |
570 | | |
571 | | // optional .proto.CompressType optional_enum = 2; |
572 | 0 | if (cached_has_bits & 0x00000008u) { |
573 | 0 | target = stream->EnsureSpace(target); |
574 | 0 | target = ::_pbi::WireFormatLite::WriteEnumToArray( |
575 | 0 | 2, this->_internal_optional_enum(), target); |
576 | 0 | } |
577 | | |
578 | | // repeated .proto.CompressType repeated_enum = 3; |
579 | 0 | for (int i = 0, n = this->_internal_repeated_enum_size(); i < n; i++) { |
580 | 0 | target = stream->EnsureSpace(target); |
581 | 0 | target = ::_pbi::WireFormatLite::WriteEnumToArray( |
582 | 0 | 3, this->_internal_repeated_enum(i), target); |
583 | 0 | } |
584 | | |
585 | | // required uint64 required_uint64 = 4; |
586 | 0 | if (cached_has_bits & 0x00000010u) { |
587 | 0 | target = stream->EnsureSpace(target); |
588 | 0 | target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_required_uint64(), target); |
589 | 0 | } |
590 | | |
591 | | // optional uint64 optional_uint64 = 5; |
592 | 0 | if (cached_has_bits & 0x00000020u) { |
593 | 0 | target = stream->EnsureSpace(target); |
594 | 0 | target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_optional_uint64(), target); |
595 | 0 | } |
596 | | |
597 | | // repeated uint64 repeated_uint64 = 6; |
598 | 0 | for (int i = 0, n = this->_internal_repeated_uint64_size(); i < n; i++) { |
599 | 0 | target = stream->EnsureSpace(target); |
600 | 0 | target = ::_pbi::WireFormatLite::WriteUInt64ToArray(6, this->_internal_repeated_uint64(i), target); |
601 | 0 | } |
602 | | |
603 | | // required string required_string = 7; |
604 | 0 | if (cached_has_bits & 0x00000001u) { |
605 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
606 | 0 | this->_internal_required_string().data(), static_cast<int>(this->_internal_required_string().length()), |
607 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
608 | 0 | "proto.Misc.required_string"); |
609 | 0 | target = stream->WriteStringMaybeAliased( |
610 | 0 | 7, this->_internal_required_string(), target); |
611 | 0 | } |
612 | | |
613 | | // optional string optional_string = 8; |
614 | 0 | if (cached_has_bits & 0x00000002u) { |
615 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
616 | 0 | this->_internal_optional_string().data(), static_cast<int>(this->_internal_optional_string().length()), |
617 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
618 | 0 | "proto.Misc.optional_string"); |
619 | 0 | target = stream->WriteStringMaybeAliased( |
620 | 0 | 8, this->_internal_optional_string(), target); |
621 | 0 | } |
622 | | |
623 | | // repeated string repeated_string = 9; |
624 | 0 | for (int i = 0, n = this->_internal_repeated_string_size(); i < n; i++) { |
625 | 0 | const auto& s = this->_internal_repeated_string(i); |
626 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
627 | 0 | s.data(), static_cast<int>(s.length()), |
628 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
629 | 0 | "proto.Misc.repeated_string"); |
630 | 0 | target = stream->WriteString(9, s, target); |
631 | 0 | } |
632 | | |
633 | | // required bool required_bool = 10; |
634 | 0 | if (cached_has_bits & 0x00000040u) { |
635 | 0 | target = stream->EnsureSpace(target); |
636 | 0 | target = ::_pbi::WireFormatLite::WriteBoolToArray(10, this->_internal_required_bool(), target); |
637 | 0 | } |
638 | | |
639 | | // optional bool optional_bool = 11; |
640 | 0 | if (cached_has_bits & 0x00000080u) { |
641 | 0 | target = stream->EnsureSpace(target); |
642 | 0 | target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_optional_bool(), target); |
643 | 0 | } |
644 | | |
645 | | // repeated bool repeated_bool = 12; |
646 | 0 | for (int i = 0, n = this->_internal_repeated_bool_size(); i < n; i++) { |
647 | 0 | target = stream->EnsureSpace(target); |
648 | 0 | target = ::_pbi::WireFormatLite::WriteBoolToArray(12, this->_internal_repeated_bool(i), target); |
649 | 0 | } |
650 | | |
651 | | // required int32 required_int32 = 13; |
652 | 0 | if (cached_has_bits & 0x00000100u) { |
653 | 0 | target = stream->EnsureSpace(target); |
654 | 0 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(13, this->_internal_required_int32(), target); |
655 | 0 | } |
656 | | |
657 | | // optional int32 optional_int32 = 14; |
658 | 0 | if (cached_has_bits & 0x00000200u) { |
659 | 0 | target = stream->EnsureSpace(target); |
660 | 0 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(14, this->_internal_optional_int32(), target); |
661 | 0 | } |
662 | | |
663 | | // repeated int32 repeated_int32 = 15; |
664 | 0 | for (int i = 0, n = this->_internal_repeated_int32_size(); i < n; i++) { |
665 | 0 | target = stream->EnsureSpace(target); |
666 | 0 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(15, this->_internal_repeated_int32(i), target); |
667 | 0 | } |
668 | |
|
669 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
670 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
671 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
672 | 0 | } |
673 | | // @@protoc_insertion_point(serialize_to_array_end:proto.Misc) |
674 | 0 | return target; |
675 | 0 | } |
676 | | |
677 | 0 | size_t Misc::RequiredFieldsByteSizeFallback() const { |
678 | | // @@protoc_insertion_point(required_fields_byte_size_fallback_start:proto.Misc) |
679 | 0 | size_t total_size = 0; |
680 | |
|
681 | 0 | if (_internal_has_required_string()) { |
682 | | // required string required_string = 7; |
683 | 0 | total_size += 1 + |
684 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
685 | 0 | this->_internal_required_string()); |
686 | 0 | } |
687 | |
|
688 | 0 | if (_internal_has_required_enum()) { |
689 | | // required .proto.CompressType required_enum = 1; |
690 | 0 | total_size += 1 + |
691 | 0 | ::_pbi::WireFormatLite::EnumSize(this->_internal_required_enum()); |
692 | 0 | } |
693 | |
|
694 | 0 | if (_internal_has_required_uint64()) { |
695 | | // required uint64 required_uint64 = 4; |
696 | 0 | total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_required_uint64()); |
697 | 0 | } |
698 | |
|
699 | 0 | if (_internal_has_required_bool()) { |
700 | | // required bool required_bool = 10; |
701 | 0 | total_size += 1 + 1; |
702 | 0 | } |
703 | |
|
704 | 0 | if (_internal_has_required_int32()) { |
705 | | // required int32 required_int32 = 13; |
706 | 0 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_required_int32()); |
707 | 0 | } |
708 | |
|
709 | 0 | return total_size; |
710 | 0 | } |
711 | 0 | size_t Misc::ByteSizeLong() const { |
712 | | // @@protoc_insertion_point(message_byte_size_start:proto.Misc) |
713 | 0 | size_t total_size = 0; |
714 | |
|
715 | 0 | if (((_impl_._has_bits_[0] & 0x00000155) ^ 0x00000155) == 0) { // All required fields are present. |
716 | | // required string required_string = 7; |
717 | 0 | total_size += 1 + |
718 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
719 | 0 | this->_internal_required_string()); |
720 | | |
721 | | // required .proto.CompressType required_enum = 1; |
722 | 0 | total_size += 1 + |
723 | 0 | ::_pbi::WireFormatLite::EnumSize(this->_internal_required_enum()); |
724 | | |
725 | | // required uint64 required_uint64 = 4; |
726 | 0 | total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_required_uint64()); |
727 | | |
728 | | // required bool required_bool = 10; |
729 | 0 | total_size += 1 + 1; |
730 | | |
731 | | // required int32 required_int32 = 13; |
732 | 0 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_required_int32()); |
733 | |
|
734 | 0 | } else { |
735 | 0 | total_size += RequiredFieldsByteSizeFallback(); |
736 | 0 | } |
737 | 0 | uint32_t cached_has_bits = 0; |
738 | | // Prevent compiler warnings about cached_has_bits being unused |
739 | 0 | (void) cached_has_bits; |
740 | | |
741 | | // repeated .proto.CompressType repeated_enum = 3; |
742 | 0 | { |
743 | 0 | size_t data_size = 0; |
744 | 0 | unsigned int count = static_cast<unsigned int>(this->_internal_repeated_enum_size());for (unsigned int i = 0; i < count; i++) { |
745 | 0 | data_size += ::_pbi::WireFormatLite::EnumSize( |
746 | 0 | this->_internal_repeated_enum(static_cast<int>(i))); |
747 | 0 | } |
748 | 0 | total_size += (1UL * count) + data_size; |
749 | 0 | } |
750 | | |
751 | | // repeated uint64 repeated_uint64 = 6; |
752 | 0 | { |
753 | 0 | size_t data_size = ::_pbi::WireFormatLite:: |
754 | 0 | UInt64Size(this->_impl_.repeated_uint64_); |
755 | 0 | total_size += 1 * |
756 | 0 | ::_pbi::FromIntSize(this->_internal_repeated_uint64_size()); |
757 | 0 | total_size += data_size; |
758 | 0 | } |
759 | | |
760 | | // repeated string repeated_string = 9; |
761 | 0 | total_size += 1 * |
762 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.repeated_string_.size()); |
763 | 0 | for (int i = 0, n = _impl_.repeated_string_.size(); i < n; i++) { |
764 | 0 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
765 | 0 | _impl_.repeated_string_.Get(i)); |
766 | 0 | } |
767 | | |
768 | | // repeated bool repeated_bool = 12; |
769 | 0 | { |
770 | 0 | unsigned int count = static_cast<unsigned int>(this->_internal_repeated_bool_size()); |
771 | 0 | size_t data_size = 1UL * count; |
772 | 0 | total_size += 1 * |
773 | 0 | ::_pbi::FromIntSize(this->_internal_repeated_bool_size()); |
774 | 0 | total_size += data_size; |
775 | 0 | } |
776 | | |
777 | | // repeated int32 repeated_int32 = 15; |
778 | 0 | { |
779 | 0 | size_t data_size = ::_pbi::WireFormatLite:: |
780 | 0 | Int32Size(this->_impl_.repeated_int32_); |
781 | 0 | total_size += 1 * |
782 | 0 | ::_pbi::FromIntSize(this->_internal_repeated_int32_size()); |
783 | 0 | total_size += data_size; |
784 | 0 | } |
785 | | |
786 | | // optional string optional_string = 8; |
787 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
788 | 0 | if (cached_has_bits & 0x00000002u) { |
789 | 0 | total_size += 1 + |
790 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
791 | 0 | this->_internal_optional_string()); |
792 | 0 | } |
793 | | |
794 | | // optional .proto.CompressType optional_enum = 2; |
795 | 0 | if (cached_has_bits & 0x00000008u) { |
796 | 0 | total_size += 1 + |
797 | 0 | ::_pbi::WireFormatLite::EnumSize(this->_internal_optional_enum()); |
798 | 0 | } |
799 | | |
800 | | // optional uint64 optional_uint64 = 5; |
801 | 0 | if (cached_has_bits & 0x00000020u) { |
802 | 0 | total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_optional_uint64()); |
803 | 0 | } |
804 | | |
805 | | // optional bool optional_bool = 11; |
806 | 0 | if (cached_has_bits & 0x00000080u) { |
807 | 0 | total_size += 1 + 1; |
808 | 0 | } |
809 | | |
810 | | // optional int32 optional_int32 = 14; |
811 | 0 | if (cached_has_bits & 0x00000200u) { |
812 | 0 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_optional_int32()); |
813 | 0 | } |
814 | |
|
815 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
816 | 0 | } |
817 | | |
818 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Misc::_class_data_ = { |
819 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
820 | | Misc::MergeImpl |
821 | | }; |
822 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Misc::GetClassData() const { return &_class_data_; } |
823 | | |
824 | | |
825 | 0 | void Misc::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
826 | 0 | auto* const _this = static_cast<Misc*>(&to_msg); |
827 | 0 | auto& from = static_cast<const Misc&>(from_msg); |
828 | | // @@protoc_insertion_point(class_specific_merge_from_start:proto.Misc) |
829 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
830 | 0 | uint32_t cached_has_bits = 0; |
831 | 0 | (void) cached_has_bits; |
832 | |
|
833 | 0 | _this->_impl_.repeated_enum_.MergeFrom(from._impl_.repeated_enum_); |
834 | 0 | _this->_impl_.repeated_uint64_.MergeFrom(from._impl_.repeated_uint64_); |
835 | 0 | _this->_impl_.repeated_string_.MergeFrom(from._impl_.repeated_string_); |
836 | 0 | _this->_impl_.repeated_bool_.MergeFrom(from._impl_.repeated_bool_); |
837 | 0 | _this->_impl_.repeated_int32_.MergeFrom(from._impl_.repeated_int32_); |
838 | 0 | cached_has_bits = from._impl_._has_bits_[0]; |
839 | 0 | if (cached_has_bits & 0x000000ffu) { |
840 | 0 | if (cached_has_bits & 0x00000001u) { |
841 | 0 | _this->_internal_set_required_string(from._internal_required_string()); |
842 | 0 | } |
843 | 0 | if (cached_has_bits & 0x00000002u) { |
844 | 0 | _this->_internal_set_optional_string(from._internal_optional_string()); |
845 | 0 | } |
846 | 0 | if (cached_has_bits & 0x00000004u) { |
847 | 0 | _this->_impl_.required_enum_ = from._impl_.required_enum_; |
848 | 0 | } |
849 | 0 | if (cached_has_bits & 0x00000008u) { |
850 | 0 | _this->_impl_.optional_enum_ = from._impl_.optional_enum_; |
851 | 0 | } |
852 | 0 | if (cached_has_bits & 0x00000010u) { |
853 | 0 | _this->_impl_.required_uint64_ = from._impl_.required_uint64_; |
854 | 0 | } |
855 | 0 | if (cached_has_bits & 0x00000020u) { |
856 | 0 | _this->_impl_.optional_uint64_ = from._impl_.optional_uint64_; |
857 | 0 | } |
858 | 0 | if (cached_has_bits & 0x00000040u) { |
859 | 0 | _this->_impl_.required_bool_ = from._impl_.required_bool_; |
860 | 0 | } |
861 | 0 | if (cached_has_bits & 0x00000080u) { |
862 | 0 | _this->_impl_.optional_bool_ = from._impl_.optional_bool_; |
863 | 0 | } |
864 | 0 | _this->_impl_._has_bits_[0] |= cached_has_bits; |
865 | 0 | } |
866 | 0 | if (cached_has_bits & 0x00000300u) { |
867 | 0 | if (cached_has_bits & 0x00000100u) { |
868 | 0 | _this->_impl_.required_int32_ = from._impl_.required_int32_; |
869 | 0 | } |
870 | 0 | if (cached_has_bits & 0x00000200u) { |
871 | 0 | _this->_impl_.optional_int32_ = from._impl_.optional_int32_; |
872 | 0 | } |
873 | 0 | _this->_impl_._has_bits_[0] |= cached_has_bits; |
874 | 0 | } |
875 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
876 | 0 | } |
877 | | |
878 | 0 | void Misc::CopyFrom(const Misc& from) { |
879 | | // @@protoc_insertion_point(class_specific_copy_from_start:proto.Misc) |
880 | 0 | if (&from == this) return; |
881 | 0 | Clear(); |
882 | 0 | MergeFrom(from); |
883 | 0 | } |
884 | | |
885 | 0 | bool Misc::IsInitialized() const { |
886 | 0 | if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false; |
887 | 0 | return true; |
888 | 0 | } |
889 | | |
890 | 0 | void Misc::InternalSwap(Misc* other) { |
891 | 0 | using std::swap; |
892 | 0 | auto* lhs_arena = GetArenaForAllocation(); |
893 | 0 | auto* rhs_arena = other->GetArenaForAllocation(); |
894 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
895 | 0 | swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); |
896 | 0 | _impl_.repeated_enum_.InternalSwap(&other->_impl_.repeated_enum_); |
897 | 0 | _impl_.repeated_uint64_.InternalSwap(&other->_impl_.repeated_uint64_); |
898 | 0 | _impl_.repeated_string_.InternalSwap(&other->_impl_.repeated_string_); |
899 | 0 | _impl_.repeated_bool_.InternalSwap(&other->_impl_.repeated_bool_); |
900 | 0 | _impl_.repeated_int32_.InternalSwap(&other->_impl_.repeated_int32_); |
901 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
902 | 0 | &_impl_.required_string_, lhs_arena, |
903 | 0 | &other->_impl_.required_string_, rhs_arena |
904 | 0 | ); |
905 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
906 | 0 | &_impl_.optional_string_, lhs_arena, |
907 | 0 | &other->_impl_.optional_string_, rhs_arena |
908 | 0 | ); |
909 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
910 | 0 | PROTOBUF_FIELD_OFFSET(Misc, _impl_.optional_int32_) |
911 | 0 | + sizeof(Misc::_impl_.optional_int32_) |
912 | 0 | - PROTOBUF_FIELD_OFFSET(Misc, _impl_.required_enum_)>( |
913 | 0 | reinterpret_cast<char*>(&_impl_.required_enum_), |
914 | 0 | reinterpret_cast<char*>(&other->_impl_.required_enum_)); |
915 | 0 | } |
916 | | |
917 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata Misc::GetMetadata() const { |
918 | 0 | return ::_pbi::AssignDescriptors( |
919 | 0 | &descriptor_table_iobuf_2eproto_getter, &descriptor_table_iobuf_2eproto_once, |
920 | 0 | file_level_metadata_iobuf_2eproto[0]); |
921 | 0 | } |
922 | | |
923 | | // @@protoc_insertion_point(namespace_scope) |
924 | | } // namespace proto |
925 | | PROTOBUF_NAMESPACE_OPEN |
926 | | template<> PROTOBUF_NOINLINE ::proto::Misc* |
927 | 0 | Arena::CreateMaybeMessage< ::proto::Misc >(Arena* arena) { |
928 | 0 | return Arena::CreateMessageInternal< ::proto::Misc >(arena); |
929 | 0 | } |
930 | | PROTOBUF_NAMESPACE_CLOSE |
931 | | |
932 | | // @@protoc_insertion_point(global_scope) |
933 | | #include <google/protobuf/port_undef.inc> |