/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/util/proto_container_test3.pb.cc
Line | Count | Source (jump to first uncovered line) |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: yb/util/proto_container_test3.proto |
3 | | |
4 | | #include "yb/util/proto_container_test3.pb.h" |
5 | | |
6 | | #include <algorithm> |
7 | | |
8 | | #include <google/protobuf/stubs/common.h> |
9 | | #include <google/protobuf/stubs/port.h> |
10 | | #include <google/protobuf/stubs/once.h> |
11 | | #include <google/protobuf/io/coded_stream.h> |
12 | | #include <google/protobuf/wire_format_lite_inl.h> |
13 | | #include <google/protobuf/descriptor.h> |
14 | | #include <google/protobuf/generated_message_reflection.h> |
15 | | #include <google/protobuf/reflection_ops.h> |
16 | | #include <google/protobuf/wire_format.h> |
17 | | // This is a temporary google only hack |
18 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
19 | | #include "third_party/protobuf/version.h" |
20 | | #endif |
21 | | #include "yb/util/protobuf-annotations.h" |
22 | | // @@protoc_insertion_point(includes) |
23 | | namespace yb { |
24 | | class ProtoContainerTest3PBDefaultTypeInternal { |
25 | | public: |
26 | | ::google::protobuf::internal::ExplicitlyConstructed<ProtoContainerTest3PB> |
27 | | _instance; |
28 | | } _ProtoContainerTest3PB_default_instance_; |
29 | | } // namespace yb |
30 | | namespace protobuf_yb_2futil_2fproto_5fcontainer_5ftest3_2eproto { |
31 | 20 | void InitDefaultsProtoContainerTest3PBImpl() { |
32 | 20 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
33 | | |
34 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
35 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
36 | | #else |
37 | 20 | ::google::protobuf::internal::InitProtobufDefaults(); |
38 | 20 | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
39 | 20 | protobuf_yb_2futil_2fproto_5fcontainer_5ftest_2eproto::InitDefaultsProtoContainerTestPB(); |
40 | 20 | protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::InitDefaultsProtoContainerTest2PB(); |
41 | 20 | { |
42 | 20 | void* ptr = &::yb::_ProtoContainerTest3PB_default_instance_; |
43 | 20 | new (ptr) ::yb::ProtoContainerTest3PB(); |
44 | 20 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
45 | 20 | } |
46 | 20 | ::yb::ProtoContainerTest3PB::InitAsDefaultInstance(); |
47 | 20 | } |
48 | | |
49 | 22 | void InitDefaultsProtoContainerTest3PB() { |
50 | 22 | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
51 | 22 | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsProtoContainerTest3PBImpl); |
52 | 22 | } |
53 | | |
54 | | ::google::protobuf::Metadata file_level_metadata[1]; |
55 | | |
56 | | const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
57 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ProtoContainerTest3PB, _has_bits_), |
58 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ProtoContainerTest3PB, _internal_metadata_), |
59 | | ~0u, // no _extensions_ |
60 | | ~0u, // no _oneof_case_ |
61 | | ~0u, // no _weak_field_map_ |
62 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ProtoContainerTest3PB, record_one_), |
63 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ProtoContainerTest3PB, record_two_), |
64 | | 0, |
65 | | 1, |
66 | | }; |
67 | | static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
68 | | { 0, 7, sizeof(::yb::ProtoContainerTest3PB)}, |
69 | | }; |
70 | | |
71 | | static ::google::protobuf::Message const * const file_default_instances[] = { |
72 | | reinterpret_cast<const ::google::protobuf::Message*>(&::yb::_ProtoContainerTest3PB_default_instance_), |
73 | | }; |
74 | | |
75 | 2 | void protobuf_AssignDescriptors() { |
76 | 2 | AddDescriptors(); |
77 | 2 | ::google::protobuf::MessageFactory* factory = NULL; |
78 | 2 | AssignDescriptors( |
79 | 2 | "yb/util/proto_container_test3.proto", schemas, file_default_instances, TableStruct::offsets, factory, |
80 | 2 | file_level_metadata, NULL, NULL); |
81 | 2 | } |
82 | | |
83 | 3 | void protobuf_AssignDescriptorsOnce() { |
84 | 3 | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
85 | 3 | ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); |
86 | 3 | } |
87 | | |
88 | | void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; |
89 | 0 | void protobuf_RegisterTypes(const ::std::string&) { |
90 | 0 | protobuf_AssignDescriptorsOnce(); |
91 | 0 | ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); |
92 | 0 | } |
93 | | |
94 | 20 | void AddDescriptorsImpl() { |
95 | 20 | InitDefaults(); |
96 | 20 | static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
97 | 20 | "\n#yb/util/proto_container_test3.proto\022\002y" |
98 | 20 | "b\032\"yb/util/proto_container_test.proto\032#y" |
99 | 20 | "b/util/proto_container_test2.proto\"t\n\025Pr" |
100 | 20 | "otoContainerTest3PB\022,\n\nrecord_one\030\001 \002(\0132" |
101 | 20 | "\030.yb.ProtoContainerTestPB\022-\n\nrecord_two\030" |
102 | 20 | "\002 \002(\0132\031.yb.ProtoContainerTest2PB" |
103 | 20 | }; |
104 | 20 | ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
105 | 20 | descriptor, 232); |
106 | 20 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
107 | 20 | "yb/util/proto_container_test3.proto", &protobuf_RegisterTypes); |
108 | 20 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest_2eproto::AddDescriptors(); |
109 | 20 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::AddDescriptors(); |
110 | 20 | } |
111 | | |
112 | 22 | void AddDescriptors() { |
113 | 22 | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
114 | 22 | ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); |
115 | 22 | } |
116 | | // Force AddDescriptors() to be called at dynamic initialization time. |
117 | | struct StaticDescriptorInitializer { |
118 | 20 | StaticDescriptorInitializer() { |
119 | 20 | AddDescriptors(); |
120 | 20 | } |
121 | | } static_descriptor_initializer; |
122 | | } // namespace protobuf_yb_2futil_2fproto_5fcontainer_5ftest3_2eproto |
123 | | namespace yb { |
124 | | |
125 | | // =================================================================== |
126 | | |
127 | 20 | void ProtoContainerTest3PB::InitAsDefaultInstance() { |
128 | 20 | ::yb::_ProtoContainerTest3PB_default_instance_._instance.get_mutable()->record_one_ = const_cast< ::yb::ProtoContainerTestPB*>( |
129 | 20 | ::yb::ProtoContainerTestPB::internal_default_instance()); |
130 | 20 | ::yb::_ProtoContainerTest3PB_default_instance_._instance.get_mutable()->record_two_ = const_cast< ::yb::ProtoContainerTest2PB*>( |
131 | 20 | ::yb::ProtoContainerTest2PB::internal_default_instance()); |
132 | 20 | } |
133 | 0 | void ProtoContainerTest3PB::clear_record_one() { |
134 | 0 | if (record_one_ != NULL) record_one_->Clear(); |
135 | 0 | clear_has_record_one(); |
136 | 0 | } |
137 | 0 | void ProtoContainerTest3PB::clear_record_two() { |
138 | 0 | if (record_two_ != NULL) record_two_->Clear(); |
139 | 0 | clear_has_record_two(); |
140 | 0 | } |
141 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
142 | | const int ProtoContainerTest3PB::kRecordOneFieldNumber; |
143 | | const int ProtoContainerTest3PB::kRecordTwoFieldNumber; |
144 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
145 | | |
146 | | ProtoContainerTest3PB::ProtoContainerTest3PB() |
147 | 22 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
148 | 2 | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
149 | 2 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest3_2eproto::InitDefaultsProtoContainerTest3PB(); |
150 | 2 | } |
151 | 22 | SharedCtor(); |
152 | | // @@protoc_insertion_point(constructor:yb.ProtoContainerTest3PB) |
153 | 22 | } |
154 | | ProtoContainerTest3PB::ProtoContainerTest3PB(const ProtoContainerTest3PB& from) |
155 | | : ::google::protobuf::Message(), |
156 | | _internal_metadata_(NULL), |
157 | | _has_bits_(from._has_bits_), |
158 | 0 | _cached_size_(0) { |
159 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
160 | 0 | if (from.has_record_one()) { |
161 | 0 | record_one_ = new ::yb::ProtoContainerTestPB(*from.record_one_); |
162 | 0 | } else { |
163 | 0 | record_one_ = NULL; |
164 | 0 | } |
165 | 0 | if (from.has_record_two()) { |
166 | 0 | record_two_ = new ::yb::ProtoContainerTest2PB(*from.record_two_); |
167 | 0 | } else { |
168 | 0 | record_two_ = NULL; |
169 | 0 | } |
170 | | // @@protoc_insertion_point(copy_constructor:yb.ProtoContainerTest3PB) |
171 | 0 | } |
172 | | |
173 | 22 | void ProtoContainerTest3PB::SharedCtor() { |
174 | 22 | _cached_size_ = 0; |
175 | 22 | ::memset(&record_one_, 0, static_cast<size_t>( |
176 | 22 | reinterpret_cast<char*>(&record_two_) - |
177 | 22 | reinterpret_cast<char*>(&record_one_)) + sizeof(record_two_)); |
178 | 22 | } |
179 | | |
180 | 2 | ProtoContainerTest3PB::~ProtoContainerTest3PB() { |
181 | | // @@protoc_insertion_point(destructor:yb.ProtoContainerTest3PB) |
182 | 2 | SharedDtor(); |
183 | 2 | } |
184 | | |
185 | 2 | void ProtoContainerTest3PB::SharedDtor() { |
186 | 2 | if (this != internal_default_instance()) delete record_one_; |
187 | 2 | if (this != internal_default_instance()) delete record_two_; |
188 | 2 | } |
189 | | |
190 | 0 | void ProtoContainerTest3PB::SetCachedSize(int size) const { |
191 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
192 | 0 | _cached_size_ = size; |
193 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
194 | 0 | } |
195 | 0 | const ::google::protobuf::Descriptor* ProtoContainerTest3PB::descriptor() { |
196 | 0 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest3_2eproto::protobuf_AssignDescriptorsOnce(); |
197 | 0 | return ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest3_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
198 | 0 | } |
199 | | |
200 | 0 | const ProtoContainerTest3PB& ProtoContainerTest3PB::default_instance() { |
201 | 0 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest3_2eproto::InitDefaultsProtoContainerTest3PB(); |
202 | 0 | return *internal_default_instance(); |
203 | 0 | } |
204 | | |
205 | 0 | ProtoContainerTest3PB* ProtoContainerTest3PB::New(::google::protobuf::Arena* arena) const { |
206 | 0 | ProtoContainerTest3PB* n = new ProtoContainerTest3PB; |
207 | 0 | if (arena != NULL) { |
208 | 0 | arena->Own(n); |
209 | 0 | } |
210 | 0 | return n; |
211 | 0 | } |
212 | | |
213 | 0 | void ProtoContainerTest3PB::Clear() { |
214 | | // @@protoc_insertion_point(message_clear_start:yb.ProtoContainerTest3PB) |
215 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
216 | | // Prevent compiler warnings about cached_has_bits being unused |
217 | 0 | (void) cached_has_bits; |
218 | |
|
219 | 0 | cached_has_bits = _has_bits_[0]; |
220 | 0 | if (cached_has_bits & 3u) { |
221 | 0 | if (cached_has_bits & 0x00000001u) { |
222 | 0 | GOOGLE_DCHECK(record_one_ != NULL); |
223 | 0 | record_one_->Clear(); |
224 | 0 | } |
225 | 0 | if (cached_has_bits & 0x00000002u) { |
226 | 0 | GOOGLE_DCHECK(record_two_ != NULL); |
227 | 0 | record_two_->Clear(); |
228 | 0 | } |
229 | 0 | } |
230 | 0 | _has_bits_.Clear(); |
231 | 0 | _internal_metadata_.Clear(); |
232 | 0 | } |
233 | | |
234 | | bool ProtoContainerTest3PB::MergePartialFromCodedStream( |
235 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
236 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
237 | 0 | ::google::protobuf::uint32 tag; |
238 | | // @@protoc_insertion_point(parse_start:yb.ProtoContainerTest3PB) |
239 | 0 | for (;;) { |
240 | 0 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
241 | 0 | tag = p.first; |
242 | 0 | if (!p.second) goto handle_unusual; |
243 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
244 | | // required .yb.ProtoContainerTestPB record_one = 1; |
245 | 0 | case 1: { |
246 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
247 | 0 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
248 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
249 | 0 | input, mutable_record_one())); |
250 | 0 | } else { |
251 | 0 | goto handle_unusual; |
252 | 0 | } |
253 | 0 | break; |
254 | 0 | } |
255 | | |
256 | | // required .yb.ProtoContainerTest2PB record_two = 2; |
257 | 0 | case 2: { |
258 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
259 | 0 | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
260 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
261 | 0 | input, mutable_record_two())); |
262 | 0 | } else { |
263 | 0 | goto handle_unusual; |
264 | 0 | } |
265 | 0 | break; |
266 | 0 | } |
267 | | |
268 | 0 | default: { |
269 | 0 | handle_unusual: |
270 | 0 | if (tag == 0) { |
271 | 0 | goto success; |
272 | 0 | } |
273 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
274 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
275 | 0 | break; |
276 | 0 | } |
277 | 0 | } |
278 | 0 | } |
279 | 0 | success: |
280 | | // @@protoc_insertion_point(parse_success:yb.ProtoContainerTest3PB) |
281 | 0 | return true; |
282 | 0 | failure: |
283 | | // @@protoc_insertion_point(parse_failure:yb.ProtoContainerTest3PB) |
284 | 0 | return false; |
285 | 0 | #undef DO_ |
286 | 0 | } |
287 | | |
288 | | void ProtoContainerTest3PB::SerializeWithCachedSizes( |
289 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
290 | | // @@protoc_insertion_point(serialize_start:yb.ProtoContainerTest3PB) |
291 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
292 | 0 | (void) cached_has_bits; |
293 | |
|
294 | 0 | cached_has_bits = _has_bits_[0]; |
295 | | // required .yb.ProtoContainerTestPB record_one = 1; |
296 | 0 | if (cached_has_bits & 0x00000001u) { |
297 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
298 | 0 | 1, *this->record_one_, output); |
299 | 0 | } |
300 | | |
301 | | // required .yb.ProtoContainerTest2PB record_two = 2; |
302 | 0 | if (cached_has_bits & 0x00000002u) { |
303 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
304 | 0 | 2, *this->record_two_, output); |
305 | 0 | } |
306 | |
|
307 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
308 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
309 | 0 | _internal_metadata_.unknown_fields(), output); |
310 | 0 | } |
311 | | // @@protoc_insertion_point(serialize_end:yb.ProtoContainerTest3PB) |
312 | 0 | } |
313 | | |
314 | | ::google::protobuf::uint8* ProtoContainerTest3PB::InternalSerializeWithCachedSizesToArray( |
315 | 2 | bool deterministic, ::google::protobuf::uint8* target) const { |
316 | 2 | (void)deterministic; // Unused |
317 | | // @@protoc_insertion_point(serialize_to_array_start:yb.ProtoContainerTest3PB) |
318 | 2 | ::google::protobuf::uint32 cached_has_bits = 0; |
319 | 2 | (void) cached_has_bits; |
320 | | |
321 | 2 | cached_has_bits = _has_bits_[0]; |
322 | | // required .yb.ProtoContainerTestPB record_one = 1; |
323 | 2 | if (cached_has_bits & 0x00000001u) { |
324 | 2 | target = ::google::protobuf::internal::WireFormatLite:: |
325 | 2 | InternalWriteMessageToArray( |
326 | 2 | 1, *this->record_one_, deterministic, target); |
327 | 2 | } |
328 | | |
329 | | // required .yb.ProtoContainerTest2PB record_two = 2; |
330 | 2 | if (cached_has_bits & 0x00000002u) { |
331 | 2 | target = ::google::protobuf::internal::WireFormatLite:: |
332 | 2 | InternalWriteMessageToArray( |
333 | 2 | 2, *this->record_two_, deterministic, target); |
334 | 2 | } |
335 | | |
336 | 2 | if (_internal_metadata_.have_unknown_fields()) { |
337 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
338 | 0 | _internal_metadata_.unknown_fields(), target); |
339 | 0 | } |
340 | | // @@protoc_insertion_point(serialize_to_array_end:yb.ProtoContainerTest3PB) |
341 | 2 | return target; |
342 | 2 | } |
343 | | |
344 | 0 | size_t ProtoContainerTest3PB::RequiredFieldsByteSizeFallback() const { |
345 | | // @@protoc_insertion_point(required_fields_byte_size_fallback_start:yb.ProtoContainerTest3PB) |
346 | 0 | size_t total_size = 0; |
347 | |
|
348 | 0 | if (has_record_one()) { |
349 | | // required .yb.ProtoContainerTestPB record_one = 1; |
350 | 0 | total_size += 1 + |
351 | 0 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
352 | 0 | *this->record_one_); |
353 | 0 | } |
354 | |
|
355 | 0 | if (has_record_two()) { |
356 | | // required .yb.ProtoContainerTest2PB record_two = 2; |
357 | 0 | total_size += 1 + |
358 | 0 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
359 | 0 | *this->record_two_); |
360 | 0 | } |
361 | |
|
362 | 0 | return total_size; |
363 | 0 | } |
364 | 2 | size_t ProtoContainerTest3PB::ByteSizeLong() const { |
365 | | // @@protoc_insertion_point(message_byte_size_start:yb.ProtoContainerTest3PB) |
366 | 2 | size_t total_size = 0; |
367 | | |
368 | 2 | if (_internal_metadata_.have_unknown_fields()) { |
369 | 0 | total_size += |
370 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
371 | 0 | _internal_metadata_.unknown_fields()); |
372 | 0 | } |
373 | 2 | if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. |
374 | | // required .yb.ProtoContainerTestPB record_one = 1; |
375 | 2 | total_size += 1 + |
376 | 2 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
377 | 2 | *this->record_one_); |
378 | | |
379 | | // required .yb.ProtoContainerTest2PB record_two = 2; |
380 | 2 | total_size += 1 + |
381 | 2 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
382 | 2 | *this->record_two_); |
383 | | |
384 | 0 | } else { |
385 | 0 | total_size += RequiredFieldsByteSizeFallback(); |
386 | 0 | } |
387 | 2 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
388 | 2 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
389 | 2 | _cached_size_ = cached_size; |
390 | 2 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
391 | 2 | return total_size; |
392 | 2 | } |
393 | | |
394 | 0 | void ProtoContainerTest3PB::MergeFrom(const ::google::protobuf::Message& from) { |
395 | | // @@protoc_insertion_point(generalized_merge_from_start:yb.ProtoContainerTest3PB) |
396 | 0 | GOOGLE_DCHECK_NE(&from, this); |
397 | 0 | const ProtoContainerTest3PB* source = |
398 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const ProtoContainerTest3PB>( |
399 | 0 | &from); |
400 | 0 | if (source == NULL) { |
401 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.ProtoContainerTest3PB) |
402 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
403 | 0 | } else { |
404 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.ProtoContainerTest3PB) |
405 | 0 | MergeFrom(*source); |
406 | 0 | } |
407 | 0 | } |
408 | | |
409 | 0 | void ProtoContainerTest3PB::MergeFrom(const ProtoContainerTest3PB& from) { |
410 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.ProtoContainerTest3PB) |
411 | 0 | GOOGLE_DCHECK_NE(&from, this); |
412 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
413 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
414 | 0 | (void) cached_has_bits; |
415 | |
|
416 | 0 | cached_has_bits = from._has_bits_[0]; |
417 | 0 | if (cached_has_bits & 3u) { |
418 | 0 | if (cached_has_bits & 0x00000001u) { |
419 | 0 | mutable_record_one()->::yb::ProtoContainerTestPB::MergeFrom(from.record_one()); |
420 | 0 | } |
421 | 0 | if (cached_has_bits & 0x00000002u) { |
422 | 0 | mutable_record_two()->::yb::ProtoContainerTest2PB::MergeFrom(from.record_two()); |
423 | 0 | } |
424 | 0 | } |
425 | 0 | } |
426 | | |
427 | 0 | void ProtoContainerTest3PB::CopyFrom(const ::google::protobuf::Message& from) { |
428 | | // @@protoc_insertion_point(generalized_copy_from_start:yb.ProtoContainerTest3PB) |
429 | 0 | if (&from == this) return; |
430 | 0 | Clear(); |
431 | 0 | MergeFrom(from); |
432 | 0 | } |
433 | | |
434 | 0 | void ProtoContainerTest3PB::CopyFrom(const ProtoContainerTest3PB& from) { |
435 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.ProtoContainerTest3PB) |
436 | 0 | if (&from == this) return; |
437 | 0 | Clear(); |
438 | 0 | MergeFrom(from); |
439 | 0 | } |
440 | | |
441 | 2 | bool ProtoContainerTest3PB::IsInitialized() const { |
442 | 2 | if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
443 | 2 | if (has_record_one()) { |
444 | 2 | if (!this->record_one_->IsInitialized()) return false; |
445 | 2 | } |
446 | 2 | if (has_record_two()) { |
447 | 2 | if (!this->record_two_->IsInitialized()) return false; |
448 | 2 | } |
449 | 2 | return true; |
450 | 2 | } |
451 | | |
452 | 0 | void ProtoContainerTest3PB::Swap(ProtoContainerTest3PB* other) { |
453 | 0 | if (other == this) return; |
454 | 0 | InternalSwap(other); |
455 | 0 | } |
456 | 0 | void ProtoContainerTest3PB::InternalSwap(ProtoContainerTest3PB* other) { |
457 | 0 | using std::swap; |
458 | 0 | swap(record_one_, other->record_one_); |
459 | 0 | swap(record_two_, other->record_two_); |
460 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
461 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
462 | 0 | swap(_cached_size_, other->_cached_size_); |
463 | 0 | } |
464 | | |
465 | 3 | ::google::protobuf::Metadata ProtoContainerTest3PB::GetMetadata() const { |
466 | 3 | protobuf_yb_2futil_2fproto_5fcontainer_5ftest3_2eproto::protobuf_AssignDescriptorsOnce(); |
467 | 3 | return ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest3_2eproto::file_level_metadata[kIndexInFileMessages]; |
468 | 3 | } |
469 | | |
470 | | |
471 | | // @@protoc_insertion_point(namespace_scope) |
472 | | } // namespace yb |
473 | | |
474 | | // @@protoc_insertion_point(global_scope) |