/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/util/proto_container_test2.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_test2.proto |
3 | | |
4 | | #include "yb/util/proto_container_test2.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 ProtoContainerTest2PBDefaultTypeInternal { |
25 | | public: |
26 | | ::google::protobuf::internal::ExplicitlyConstructed<ProtoContainerTest2PB> |
27 | | _instance; |
28 | | } _ProtoContainerTest2PB_default_instance_; |
29 | | class TestObjectRequiredPBDefaultTypeInternal { |
30 | | public: |
31 | | ::google::protobuf::internal::ExplicitlyConstructed<TestObjectRequiredPB> |
32 | | _instance; |
33 | | } _TestObjectRequiredPB_default_instance_; |
34 | | class TestObjectRepeatedPBDefaultTypeInternal { |
35 | | public: |
36 | | ::google::protobuf::internal::ExplicitlyConstructed<TestObjectRepeatedPB> |
37 | | _instance; |
38 | | } _TestObjectRepeatedPB_default_instance_; |
39 | | } // namespace yb |
40 | | namespace protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto { |
41 | 20 | void InitDefaultsProtoContainerTest2PBImpl() { |
42 | 20 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
43 | | |
44 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
45 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
46 | | #else |
47 | 20 | ::google::protobuf::internal::InitProtobufDefaults(); |
48 | 20 | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
49 | 20 | protobuf_yb_2futil_2fproto_5fcontainer_5ftest_2eproto::InitDefaultsProtoContainerTestPB(); |
50 | 20 | { |
51 | 20 | void* ptr = &::yb::_ProtoContainerTest2PB_default_instance_; |
52 | 20 | new (ptr) ::yb::ProtoContainerTest2PB(); |
53 | 20 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
54 | 20 | } |
55 | 20 | ::yb::ProtoContainerTest2PB::InitAsDefaultInstance(); |
56 | 20 | } |
57 | | |
58 | 42 | void InitDefaultsProtoContainerTest2PB() { |
59 | 42 | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
60 | 42 | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsProtoContainerTest2PBImpl); |
61 | 42 | } |
62 | | |
63 | 20 | void InitDefaultsTestObjectRequiredPBImpl() { |
64 | 20 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
65 | | |
66 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
67 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
68 | | #else |
69 | 20 | ::google::protobuf::internal::InitProtobufDefaults(); |
70 | 20 | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
71 | 20 | protobuf_yb_2futil_2fproto_5fcontainer_5ftest_2eproto::InitDefaultsTestStringRequiredPB(); |
72 | 20 | { |
73 | 20 | void* ptr = &::yb::_TestObjectRequiredPB_default_instance_; |
74 | 20 | new (ptr) ::yb::TestObjectRequiredPB(); |
75 | 20 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
76 | 20 | } |
77 | 20 | ::yb::TestObjectRequiredPB::InitAsDefaultInstance(); |
78 | 20 | } |
79 | | |
80 | 21 | void InitDefaultsTestObjectRequiredPB() { |
81 | 21 | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
82 | 21 | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTestObjectRequiredPBImpl); |
83 | 21 | } |
84 | | |
85 | 20 | void InitDefaultsTestObjectRepeatedPBImpl() { |
86 | 20 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
87 | | |
88 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
89 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
90 | | #else |
91 | 20 | ::google::protobuf::internal::InitProtobufDefaults(); |
92 | 20 | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
93 | 20 | protobuf_yb_2futil_2fproto_5fcontainer_5ftest_2eproto::InitDefaultsTestStringRepeatedPB(); |
94 | 20 | { |
95 | 20 | void* ptr = &::yb::_TestObjectRepeatedPB_default_instance_; |
96 | 20 | new (ptr) ::yb::TestObjectRepeatedPB(); |
97 | 20 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
98 | 20 | } |
99 | 20 | ::yb::TestObjectRepeatedPB::InitAsDefaultInstance(); |
100 | 20 | } |
101 | | |
102 | 21 | void InitDefaultsTestObjectRepeatedPB() { |
103 | 21 | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
104 | 21 | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTestObjectRepeatedPBImpl); |
105 | 21 | } |
106 | | |
107 | | ::google::protobuf::Metadata file_level_metadata[3]; |
108 | | |
109 | | const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
110 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ProtoContainerTest2PB, _has_bits_), |
111 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ProtoContainerTest2PB, _internal_metadata_), |
112 | | ~0u, // no _extensions_ |
113 | | ~0u, // no _oneof_case_ |
114 | | ~0u, // no _weak_field_map_ |
115 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ProtoContainerTest2PB, record_), |
116 | | 0, |
117 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::TestObjectRequiredPB, _has_bits_), |
118 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::TestObjectRequiredPB, _internal_metadata_), |
119 | | ~0u, // no _extensions_ |
120 | | ~0u, // no _oneof_case_ |
121 | | ~0u, // no _weak_field_map_ |
122 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::TestObjectRequiredPB, string1_), |
123 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::TestObjectRequiredPB, record_), |
124 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::TestObjectRequiredPB, string2_), |
125 | | 0, |
126 | | 2, |
127 | | 1, |
128 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::TestObjectRepeatedPB, _has_bits_), |
129 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::TestObjectRepeatedPB, _internal_metadata_), |
130 | | ~0u, // no _extensions_ |
131 | | ~0u, // no _oneof_case_ |
132 | | ~0u, // no _weak_field_map_ |
133 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::TestObjectRepeatedPB, string1_), |
134 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::TestObjectRepeatedPB, record_), |
135 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::TestObjectRepeatedPB, string2_), |
136 | | ~0u, |
137 | | ~0u, |
138 | | ~0u, |
139 | | }; |
140 | | static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
141 | | { 0, 6, sizeof(::yb::ProtoContainerTest2PB)}, |
142 | | { 7, 15, sizeof(::yb::TestObjectRequiredPB)}, |
143 | | { 18, 26, sizeof(::yb::TestObjectRepeatedPB)}, |
144 | | }; |
145 | | |
146 | | static ::google::protobuf::Message const * const file_default_instances[] = { |
147 | | reinterpret_cast<const ::google::protobuf::Message*>(&::yb::_ProtoContainerTest2PB_default_instance_), |
148 | | reinterpret_cast<const ::google::protobuf::Message*>(&::yb::_TestObjectRequiredPB_default_instance_), |
149 | | reinterpret_cast<const ::google::protobuf::Message*>(&::yb::_TestObjectRepeatedPB_default_instance_), |
150 | | }; |
151 | | |
152 | 2 | void protobuf_AssignDescriptors() { |
153 | 2 | AddDescriptors(); |
154 | 2 | ::google::protobuf::MessageFactory* factory = NULL; |
155 | 2 | AssignDescriptors( |
156 | 2 | "yb/util/proto_container_test2.proto", schemas, file_default_instances, TableStruct::offsets, factory, |
157 | 2 | file_level_metadata, NULL, NULL); |
158 | 2 | } |
159 | | |
160 | 3 | void protobuf_AssignDescriptorsOnce() { |
161 | 3 | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
162 | 3 | ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); |
163 | 3 | } |
164 | | |
165 | | void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; |
166 | 0 | void protobuf_RegisterTypes(const ::std::string&) { |
167 | 0 | protobuf_AssignDescriptorsOnce(); |
168 | 0 | ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3); |
169 | 0 | } |
170 | | |
171 | 20 | void AddDescriptorsImpl() { |
172 | 20 | InitDefaults(); |
173 | 20 | static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
174 | 20 | "\n#yb/util/proto_container_test2.proto\022\002y" |
175 | 20 | "b\032\"yb/util/proto_container_test.proto\"A\n" |
176 | 20 | "\025ProtoContainerTest2PB\022(\n\006record\030\001 \002(\0132\030" |
177 | 20 | ".yb.ProtoContainerTestPB\"b\n\024TestObjectRe" |
178 | 20 | "quiredPB\022\017\n\007string1\030\001 \002(\t\022(\n\006record\030\002 \002(" |
179 | 20 | "\0132\030.yb.TestStringRequiredPB\022\017\n\007string2\030\003" |
180 | 20 | " \002(\t\"b\n\024TestObjectRepeatedPB\022\017\n\007string1\030" |
181 | 20 | "\001 \003(\t\022(\n\006record\030\002 \003(\0132\030.yb.TestStringRep" |
182 | 20 | "eatedPB\022\017\n\007string2\030\003 \003(\t" |
183 | 20 | }; |
184 | 20 | ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
185 | 20 | descriptor, 344); |
186 | 20 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
187 | 20 | "yb/util/proto_container_test2.proto", &protobuf_RegisterTypes); |
188 | 20 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest_2eproto::AddDescriptors(); |
189 | 20 | } |
190 | | |
191 | 42 | void AddDescriptors() { |
192 | 42 | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
193 | 42 | ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); |
194 | 42 | } |
195 | | // Force AddDescriptors() to be called at dynamic initialization time. |
196 | | struct StaticDescriptorInitializer { |
197 | 20 | StaticDescriptorInitializer() { |
198 | 20 | AddDescriptors(); |
199 | 20 | } |
200 | | } static_descriptor_initializer; |
201 | | } // namespace protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto |
202 | | namespace yb { |
203 | | |
204 | | // =================================================================== |
205 | | |
206 | 20 | void ProtoContainerTest2PB::InitAsDefaultInstance() { |
207 | 20 | ::yb::_ProtoContainerTest2PB_default_instance_._instance.get_mutable()->record_ = const_cast< ::yb::ProtoContainerTestPB*>( |
208 | 20 | ::yb::ProtoContainerTestPB::internal_default_instance()); |
209 | 20 | } |
210 | 0 | void ProtoContainerTest2PB::clear_record() { |
211 | 0 | if (record_ != NULL) record_->Clear(); |
212 | 0 | clear_has_record(); |
213 | 0 | } |
214 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
215 | | const int ProtoContainerTest2PB::kRecordFieldNumber; |
216 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
217 | | |
218 | | ProtoContainerTest2PB::ProtoContainerTest2PB() |
219 | 22 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
220 | 22 | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
221 | 2 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::InitDefaultsProtoContainerTest2PB(); |
222 | 2 | } |
223 | 22 | SharedCtor(); |
224 | | // @@protoc_insertion_point(constructor:yb.ProtoContainerTest2PB) |
225 | 22 | } |
226 | | ProtoContainerTest2PB::ProtoContainerTest2PB(const ProtoContainerTest2PB& from) |
227 | | : ::google::protobuf::Message(), |
228 | | _internal_metadata_(NULL), |
229 | | _has_bits_(from._has_bits_), |
230 | 0 | _cached_size_(0) { |
231 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
232 | 0 | if (from.has_record()) { |
233 | 0 | record_ = new ::yb::ProtoContainerTestPB(*from.record_); |
234 | 0 | } else { |
235 | 0 | record_ = NULL; |
236 | 0 | } |
237 | | // @@protoc_insertion_point(copy_constructor:yb.ProtoContainerTest2PB) |
238 | 0 | } |
239 | | |
240 | 22 | void ProtoContainerTest2PB::SharedCtor() { |
241 | 22 | _cached_size_ = 0; |
242 | 22 | record_ = NULL; |
243 | 22 | } |
244 | | |
245 | 2 | ProtoContainerTest2PB::~ProtoContainerTest2PB() { |
246 | | // @@protoc_insertion_point(destructor:yb.ProtoContainerTest2PB) |
247 | 2 | SharedDtor(); |
248 | 2 | } |
249 | | |
250 | 2 | void ProtoContainerTest2PB::SharedDtor() { |
251 | 2 | if (this != internal_default_instance()) delete record_; |
252 | 2 | } |
253 | | |
254 | 0 | void ProtoContainerTest2PB::SetCachedSize(int size) const { |
255 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
256 | 0 | _cached_size_ = size; |
257 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
258 | 0 | } |
259 | 0 | const ::google::protobuf::Descriptor* ProtoContainerTest2PB::descriptor() { |
260 | 0 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::protobuf_AssignDescriptorsOnce(); |
261 | 0 | return ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
262 | 0 | } |
263 | | |
264 | 0 | const ProtoContainerTest2PB& ProtoContainerTest2PB::default_instance() { |
265 | 0 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::InitDefaultsProtoContainerTest2PB(); |
266 | 0 | return *internal_default_instance(); |
267 | 0 | } |
268 | | |
269 | 0 | ProtoContainerTest2PB* ProtoContainerTest2PB::New(::google::protobuf::Arena* arena) const { |
270 | 0 | ProtoContainerTest2PB* n = new ProtoContainerTest2PB; |
271 | 0 | if (arena != NULL) { |
272 | 0 | arena->Own(n); |
273 | 0 | } |
274 | 0 | return n; |
275 | 0 | } |
276 | | |
277 | 0 | void ProtoContainerTest2PB::Clear() { |
278 | | // @@protoc_insertion_point(message_clear_start:yb.ProtoContainerTest2PB) |
279 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
280 | | // Prevent compiler warnings about cached_has_bits being unused |
281 | 0 | (void) cached_has_bits; |
282 | |
|
283 | 0 | cached_has_bits = _has_bits_[0]; |
284 | 0 | if (cached_has_bits & 0x00000001u) { |
285 | 0 | GOOGLE_DCHECK(record_ != NULL); |
286 | 0 | record_->Clear(); |
287 | 0 | } |
288 | 0 | _has_bits_.Clear(); |
289 | 0 | _internal_metadata_.Clear(); |
290 | 0 | } |
291 | | |
292 | | bool ProtoContainerTest2PB::MergePartialFromCodedStream( |
293 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
294 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
295 | 0 | ::google::protobuf::uint32 tag; |
296 | | // @@protoc_insertion_point(parse_start:yb.ProtoContainerTest2PB) |
297 | 0 | for (;;) { |
298 | 0 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
299 | 0 | tag = p.first; |
300 | 0 | if (!p.second) goto handle_unusual; |
301 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
302 | | // required .yb.ProtoContainerTestPB record = 1; |
303 | 0 | case 1: { |
304 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
305 | 0 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
306 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
307 | 0 | input, mutable_record())); |
308 | 0 | } else { |
309 | 0 | goto handle_unusual; |
310 | 0 | } |
311 | 0 | break; |
312 | 0 | } |
313 | | |
314 | 0 | default: { |
315 | 0 | handle_unusual: |
316 | 0 | if (tag == 0) { |
317 | 0 | goto success; |
318 | 0 | } |
319 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
320 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
321 | 0 | break; |
322 | 0 | } |
323 | 0 | } |
324 | 0 | } |
325 | 0 | success: |
326 | | // @@protoc_insertion_point(parse_success:yb.ProtoContainerTest2PB) |
327 | 0 | return true; |
328 | 0 | failure: |
329 | | // @@protoc_insertion_point(parse_failure:yb.ProtoContainerTest2PB) |
330 | 0 | return false; |
331 | 0 | #undef DO_ |
332 | 0 | } |
333 | | |
334 | | void ProtoContainerTest2PB::SerializeWithCachedSizes( |
335 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
336 | | // @@protoc_insertion_point(serialize_start:yb.ProtoContainerTest2PB) |
337 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
338 | 0 | (void) cached_has_bits; |
339 | |
|
340 | 0 | cached_has_bits = _has_bits_[0]; |
341 | | // required .yb.ProtoContainerTestPB record = 1; |
342 | 0 | if (cached_has_bits & 0x00000001u) { |
343 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
344 | 0 | 1, *this->record_, output); |
345 | 0 | } |
346 | |
|
347 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
348 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
349 | 0 | _internal_metadata_.unknown_fields(), output); |
350 | 0 | } |
351 | | // @@protoc_insertion_point(serialize_end:yb.ProtoContainerTest2PB) |
352 | 0 | } |
353 | | |
354 | | ::google::protobuf::uint8* ProtoContainerTest2PB::InternalSerializeWithCachedSizesToArray( |
355 | 2 | bool deterministic, ::google::protobuf::uint8* target) const { |
356 | 2 | (void)deterministic; // Unused |
357 | | // @@protoc_insertion_point(serialize_to_array_start:yb.ProtoContainerTest2PB) |
358 | 2 | ::google::protobuf::uint32 cached_has_bits = 0; |
359 | 2 | (void) cached_has_bits; |
360 | | |
361 | 2 | cached_has_bits = _has_bits_[0]; |
362 | | // required .yb.ProtoContainerTestPB record = 1; |
363 | 2 | if (cached_has_bits & 0x00000001u) { |
364 | 2 | target = ::google::protobuf::internal::WireFormatLite:: |
365 | 2 | InternalWriteMessageToArray( |
366 | 2 | 1, *this->record_, deterministic, target); |
367 | 2 | } |
368 | | |
369 | 2 | if (_internal_metadata_.have_unknown_fields()) { |
370 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
371 | 0 | _internal_metadata_.unknown_fields(), target); |
372 | 0 | } |
373 | | // @@protoc_insertion_point(serialize_to_array_end:yb.ProtoContainerTest2PB) |
374 | 2 | return target; |
375 | 2 | } |
376 | | |
377 | 2 | size_t ProtoContainerTest2PB::ByteSizeLong() const { |
378 | | // @@protoc_insertion_point(message_byte_size_start:yb.ProtoContainerTest2PB) |
379 | 2 | size_t total_size = 0; |
380 | | |
381 | 2 | if (_internal_metadata_.have_unknown_fields()) { |
382 | 0 | total_size += |
383 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
384 | 0 | _internal_metadata_.unknown_fields()); |
385 | 0 | } |
386 | | // required .yb.ProtoContainerTestPB record = 1; |
387 | 2 | if (has_record()) { |
388 | 2 | total_size += 1 + |
389 | 2 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
390 | 2 | *this->record_); |
391 | 2 | } |
392 | 2 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
393 | 2 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
394 | 2 | _cached_size_ = cached_size; |
395 | 2 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
396 | 2 | return total_size; |
397 | 2 | } |
398 | | |
399 | 0 | void ProtoContainerTest2PB::MergeFrom(const ::google::protobuf::Message& from) { |
400 | | // @@protoc_insertion_point(generalized_merge_from_start:yb.ProtoContainerTest2PB) |
401 | 0 | GOOGLE_DCHECK_NE(&from, this); |
402 | 0 | const ProtoContainerTest2PB* source = |
403 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const ProtoContainerTest2PB>( |
404 | 0 | &from); |
405 | 0 | if (source == NULL) { |
406 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.ProtoContainerTest2PB) |
407 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
408 | 0 | } else { |
409 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.ProtoContainerTest2PB) |
410 | 0 | MergeFrom(*source); |
411 | 0 | } |
412 | 0 | } |
413 | | |
414 | 0 | void ProtoContainerTest2PB::MergeFrom(const ProtoContainerTest2PB& from) { |
415 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.ProtoContainerTest2PB) |
416 | 0 | GOOGLE_DCHECK_NE(&from, this); |
417 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
418 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
419 | 0 | (void) cached_has_bits; |
420 | |
|
421 | 0 | if (from.has_record()) { |
422 | 0 | mutable_record()->::yb::ProtoContainerTestPB::MergeFrom(from.record()); |
423 | 0 | } |
424 | 0 | } |
425 | | |
426 | 0 | void ProtoContainerTest2PB::CopyFrom(const ::google::protobuf::Message& from) { |
427 | | // @@protoc_insertion_point(generalized_copy_from_start:yb.ProtoContainerTest2PB) |
428 | 0 | if (&from == this) return; |
429 | 0 | Clear(); |
430 | 0 | MergeFrom(from); |
431 | 0 | } |
432 | | |
433 | 0 | void ProtoContainerTest2PB::CopyFrom(const ProtoContainerTest2PB& from) { |
434 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.ProtoContainerTest2PB) |
435 | 0 | if (&from == this) return; |
436 | 0 | Clear(); |
437 | 0 | MergeFrom(from); |
438 | 0 | } |
439 | | |
440 | 2 | bool ProtoContainerTest2PB::IsInitialized() const { |
441 | 2 | if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false0 ; |
442 | 2 | if (has_record()) { |
443 | 2 | if (!this->record_->IsInitialized()) return false0 ; |
444 | 2 | } |
445 | 2 | return true; |
446 | 2 | } |
447 | | |
448 | 0 | void ProtoContainerTest2PB::Swap(ProtoContainerTest2PB* other) { |
449 | 0 | if (other == this) return; |
450 | 0 | InternalSwap(other); |
451 | 0 | } |
452 | 0 | void ProtoContainerTest2PB::InternalSwap(ProtoContainerTest2PB* other) { |
453 | 0 | using std::swap; |
454 | 0 | swap(record_, other->record_); |
455 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
456 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
457 | 0 | swap(_cached_size_, other->_cached_size_); |
458 | 0 | } |
459 | | |
460 | 1 | ::google::protobuf::Metadata ProtoContainerTest2PB::GetMetadata() const { |
461 | 1 | protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::protobuf_AssignDescriptorsOnce(); |
462 | 1 | return ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::file_level_metadata[kIndexInFileMessages]; |
463 | 1 | } |
464 | | |
465 | | |
466 | | // =================================================================== |
467 | | |
468 | 20 | void TestObjectRequiredPB::InitAsDefaultInstance() { |
469 | 20 | ::yb::_TestObjectRequiredPB_default_instance_._instance.get_mutable()->record_ = const_cast< ::yb::TestStringRequiredPB*>( |
470 | 20 | ::yb::TestStringRequiredPB::internal_default_instance()); |
471 | 20 | } |
472 | 0 | void TestObjectRequiredPB::clear_record() { |
473 | 0 | if (record_ != NULL) record_->Clear(); |
474 | 0 | clear_has_record(); |
475 | 0 | } |
476 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
477 | | const int TestObjectRequiredPB::kString1FieldNumber; |
478 | | const int TestObjectRequiredPB::kRecordFieldNumber; |
479 | | const int TestObjectRequiredPB::kString2FieldNumber; |
480 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
481 | | |
482 | | TestObjectRequiredPB::TestObjectRequiredPB() |
483 | 21 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
484 | 21 | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
485 | 1 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::InitDefaultsTestObjectRequiredPB(); |
486 | 1 | } |
487 | 21 | SharedCtor(); |
488 | | // @@protoc_insertion_point(constructor:yb.TestObjectRequiredPB) |
489 | 21 | } |
490 | | TestObjectRequiredPB::TestObjectRequiredPB(const TestObjectRequiredPB& from) |
491 | | : ::google::protobuf::Message(), |
492 | | _internal_metadata_(NULL), |
493 | | _has_bits_(from._has_bits_), |
494 | 0 | _cached_size_(0) { |
495 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
496 | 0 | string1_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
497 | 0 | if (from.has_string1()) { |
498 | 0 | string1_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string1_); |
499 | 0 | } |
500 | 0 | string2_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
501 | 0 | if (from.has_string2()) { |
502 | 0 | string2_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string2_); |
503 | 0 | } |
504 | 0 | if (from.has_record()) { |
505 | 0 | record_ = new ::yb::TestStringRequiredPB(*from.record_); |
506 | 0 | } else { |
507 | 0 | record_ = NULL; |
508 | 0 | } |
509 | | // @@protoc_insertion_point(copy_constructor:yb.TestObjectRequiredPB) |
510 | 0 | } |
511 | | |
512 | 21 | void TestObjectRequiredPB::SharedCtor() { |
513 | 21 | _cached_size_ = 0; |
514 | 21 | string1_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
515 | 21 | string2_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
516 | 21 | record_ = NULL; |
517 | 21 | } |
518 | | |
519 | 1 | TestObjectRequiredPB::~TestObjectRequiredPB() { |
520 | | // @@protoc_insertion_point(destructor:yb.TestObjectRequiredPB) |
521 | 1 | SharedDtor(); |
522 | 1 | } |
523 | | |
524 | 1 | void TestObjectRequiredPB::SharedDtor() { |
525 | 1 | string1_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
526 | 1 | string2_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
527 | 1 | if (this != internal_default_instance()) delete record_; |
528 | 1 | } |
529 | | |
530 | 0 | void TestObjectRequiredPB::SetCachedSize(int size) const { |
531 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
532 | 0 | _cached_size_ = size; |
533 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
534 | 0 | } |
535 | 0 | const ::google::protobuf::Descriptor* TestObjectRequiredPB::descriptor() { |
536 | 0 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::protobuf_AssignDescriptorsOnce(); |
537 | 0 | return ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
538 | 0 | } |
539 | | |
540 | 0 | const TestObjectRequiredPB& TestObjectRequiredPB::default_instance() { |
541 | 0 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::InitDefaultsTestObjectRequiredPB(); |
542 | 0 | return *internal_default_instance(); |
543 | 0 | } |
544 | | |
545 | 0 | TestObjectRequiredPB* TestObjectRequiredPB::New(::google::protobuf::Arena* arena) const { |
546 | 0 | TestObjectRequiredPB* n = new TestObjectRequiredPB; |
547 | 0 | if (arena != NULL) { |
548 | 0 | arena->Own(n); |
549 | 0 | } |
550 | 0 | return n; |
551 | 0 | } |
552 | | |
553 | 0 | void TestObjectRequiredPB::Clear() { |
554 | | // @@protoc_insertion_point(message_clear_start:yb.TestObjectRequiredPB) |
555 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
556 | | // Prevent compiler warnings about cached_has_bits being unused |
557 | 0 | (void) cached_has_bits; |
558 | |
|
559 | 0 | cached_has_bits = _has_bits_[0]; |
560 | 0 | if (cached_has_bits & 7u) { |
561 | 0 | if (cached_has_bits & 0x00000001u) { |
562 | 0 | GOOGLE_DCHECK(!string1_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); |
563 | 0 | (*string1_.UnsafeRawStringPointer())->clear(); |
564 | 0 | } |
565 | 0 | if (cached_has_bits & 0x00000002u) { |
566 | 0 | GOOGLE_DCHECK(!string2_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); |
567 | 0 | (*string2_.UnsafeRawStringPointer())->clear(); |
568 | 0 | } |
569 | 0 | if (cached_has_bits & 0x00000004u) { |
570 | 0 | GOOGLE_DCHECK(record_ != NULL); |
571 | 0 | record_->Clear(); |
572 | 0 | } |
573 | 0 | } |
574 | 0 | _has_bits_.Clear(); |
575 | 0 | _internal_metadata_.Clear(); |
576 | 0 | } |
577 | | |
578 | | bool TestObjectRequiredPB::MergePartialFromCodedStream( |
579 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
580 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
581 | 0 | ::google::protobuf::uint32 tag; |
582 | | // @@protoc_insertion_point(parse_start:yb.TestObjectRequiredPB) |
583 | 0 | for (;;) { |
584 | 0 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
585 | 0 | tag = p.first; |
586 | 0 | if (!p.second) goto handle_unusual; |
587 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
588 | | // required string string1 = 1; |
589 | 0 | case 1: { |
590 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
591 | 0 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
592 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
593 | 0 | input, this->mutable_string1())); |
594 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
595 | 0 | this->string1().data(), static_cast<int>(this->string1().length()), |
596 | 0 | ::google::protobuf::internal::WireFormat::PARSE, |
597 | 0 | "yb.TestObjectRequiredPB.string1"); |
598 | 0 | } else { |
599 | 0 | goto handle_unusual; |
600 | 0 | } |
601 | 0 | break; |
602 | 0 | } |
603 | | |
604 | | // required .yb.TestStringRequiredPB record = 2; |
605 | 0 | case 2: { |
606 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
607 | 0 | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
608 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
609 | 0 | input, mutable_record())); |
610 | 0 | } else { |
611 | 0 | goto handle_unusual; |
612 | 0 | } |
613 | 0 | break; |
614 | 0 | } |
615 | | |
616 | | // required string string2 = 3; |
617 | 0 | case 3: { |
618 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
619 | 0 | static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { |
620 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
621 | 0 | input, this->mutable_string2())); |
622 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
623 | 0 | this->string2().data(), static_cast<int>(this->string2().length()), |
624 | 0 | ::google::protobuf::internal::WireFormat::PARSE, |
625 | 0 | "yb.TestObjectRequiredPB.string2"); |
626 | 0 | } else { |
627 | 0 | goto handle_unusual; |
628 | 0 | } |
629 | 0 | break; |
630 | 0 | } |
631 | | |
632 | 0 | default: { |
633 | 0 | handle_unusual: |
634 | 0 | if (tag == 0) { |
635 | 0 | goto success; |
636 | 0 | } |
637 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
638 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
639 | 0 | break; |
640 | 0 | } |
641 | 0 | } |
642 | 0 | } |
643 | 0 | success: |
644 | | // @@protoc_insertion_point(parse_success:yb.TestObjectRequiredPB) |
645 | 0 | return true; |
646 | 0 | failure: |
647 | | // @@protoc_insertion_point(parse_failure:yb.TestObjectRequiredPB) |
648 | 0 | return false; |
649 | 0 | #undef DO_ |
650 | 0 | } |
651 | | |
652 | | void TestObjectRequiredPB::SerializeWithCachedSizes( |
653 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
654 | | // @@protoc_insertion_point(serialize_start:yb.TestObjectRequiredPB) |
655 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
656 | 0 | (void) cached_has_bits; |
657 | |
|
658 | 0 | cached_has_bits = _has_bits_[0]; |
659 | | // required string string1 = 1; |
660 | 0 | if (cached_has_bits & 0x00000001u) { |
661 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
662 | 0 | this->string1().data(), static_cast<int>(this->string1().length()), |
663 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
664 | 0 | "yb.TestObjectRequiredPB.string1"); |
665 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
666 | 0 | 1, this->string1(), output); |
667 | 0 | } |
668 | | |
669 | | // required .yb.TestStringRequiredPB record = 2; |
670 | 0 | if (cached_has_bits & 0x00000004u) { |
671 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
672 | 0 | 2, *this->record_, output); |
673 | 0 | } |
674 | | |
675 | | // required string string2 = 3; |
676 | 0 | if (cached_has_bits & 0x00000002u) { |
677 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
678 | 0 | this->string2().data(), static_cast<int>(this->string2().length()), |
679 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
680 | 0 | "yb.TestObjectRequiredPB.string2"); |
681 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
682 | 0 | 3, this->string2(), output); |
683 | 0 | } |
684 | |
|
685 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
686 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
687 | 0 | _internal_metadata_.unknown_fields(), output); |
688 | 0 | } |
689 | | // @@protoc_insertion_point(serialize_end:yb.TestObjectRequiredPB) |
690 | 0 | } |
691 | | |
692 | | ::google::protobuf::uint8* TestObjectRequiredPB::InternalSerializeWithCachedSizesToArray( |
693 | 1 | bool deterministic, ::google::protobuf::uint8* target) const { |
694 | 1 | (void)deterministic; // Unused |
695 | | // @@protoc_insertion_point(serialize_to_array_start:yb.TestObjectRequiredPB) |
696 | 1 | ::google::protobuf::uint32 cached_has_bits = 0; |
697 | 1 | (void) cached_has_bits; |
698 | | |
699 | 1 | cached_has_bits = _has_bits_[0]; |
700 | | // required string string1 = 1; |
701 | 1 | if (cached_has_bits & 0x00000001u) { |
702 | 1 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
703 | 1 | this->string1().data(), static_cast<int>(this->string1().length()), |
704 | 1 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
705 | 1 | "yb.TestObjectRequiredPB.string1"); |
706 | 1 | target = |
707 | 1 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
708 | 1 | 1, this->string1(), target); |
709 | 1 | } |
710 | | |
711 | | // required .yb.TestStringRequiredPB record = 2; |
712 | 1 | if (cached_has_bits & 0x00000004u) { |
713 | 1 | target = ::google::protobuf::internal::WireFormatLite:: |
714 | 1 | InternalWriteMessageToArray( |
715 | 1 | 2, *this->record_, deterministic, target); |
716 | 1 | } |
717 | | |
718 | | // required string string2 = 3; |
719 | 1 | if (cached_has_bits & 0x00000002u) { |
720 | 1 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
721 | 1 | this->string2().data(), static_cast<int>(this->string2().length()), |
722 | 1 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
723 | 1 | "yb.TestObjectRequiredPB.string2"); |
724 | 1 | target = |
725 | 1 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
726 | 1 | 3, this->string2(), target); |
727 | 1 | } |
728 | | |
729 | 1 | if (_internal_metadata_.have_unknown_fields()) { |
730 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
731 | 0 | _internal_metadata_.unknown_fields(), target); |
732 | 0 | } |
733 | | // @@protoc_insertion_point(serialize_to_array_end:yb.TestObjectRequiredPB) |
734 | 1 | return target; |
735 | 1 | } |
736 | | |
737 | 0 | size_t TestObjectRequiredPB::RequiredFieldsByteSizeFallback() const { |
738 | | // @@protoc_insertion_point(required_fields_byte_size_fallback_start:yb.TestObjectRequiredPB) |
739 | 0 | size_t total_size = 0; |
740 | |
|
741 | 0 | if (has_string1()) { |
742 | | // required string string1 = 1; |
743 | 0 | total_size += 1 + |
744 | 0 | ::google::protobuf::internal::WireFormatLite::StringSize( |
745 | 0 | this->string1()); |
746 | 0 | } |
747 | |
|
748 | 0 | if (has_string2()) { |
749 | | // required string string2 = 3; |
750 | 0 | total_size += 1 + |
751 | 0 | ::google::protobuf::internal::WireFormatLite::StringSize( |
752 | 0 | this->string2()); |
753 | 0 | } |
754 | |
|
755 | 0 | if (has_record()) { |
756 | | // required .yb.TestStringRequiredPB record = 2; |
757 | 0 | total_size += 1 + |
758 | 0 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
759 | 0 | *this->record_); |
760 | 0 | } |
761 | |
|
762 | 0 | return total_size; |
763 | 0 | } |
764 | 1 | size_t TestObjectRequiredPB::ByteSizeLong() const { |
765 | | // @@protoc_insertion_point(message_byte_size_start:yb.TestObjectRequiredPB) |
766 | 1 | size_t total_size = 0; |
767 | | |
768 | 1 | if (_internal_metadata_.have_unknown_fields()) { |
769 | 0 | total_size += |
770 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
771 | 0 | _internal_metadata_.unknown_fields()); |
772 | 0 | } |
773 | 1 | if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present. |
774 | | // required string string1 = 1; |
775 | 1 | total_size += 1 + |
776 | 1 | ::google::protobuf::internal::WireFormatLite::StringSize( |
777 | 1 | this->string1()); |
778 | | |
779 | | // required string string2 = 3; |
780 | 1 | total_size += 1 + |
781 | 1 | ::google::protobuf::internal::WireFormatLite::StringSize( |
782 | 1 | this->string2()); |
783 | | |
784 | | // required .yb.TestStringRequiredPB record = 2; |
785 | 1 | total_size += 1 + |
786 | 1 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
787 | 1 | *this->record_); |
788 | | |
789 | 1 | } else { |
790 | 0 | total_size += RequiredFieldsByteSizeFallback(); |
791 | 0 | } |
792 | 1 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
793 | 1 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
794 | 1 | _cached_size_ = cached_size; |
795 | 1 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
796 | 1 | return total_size; |
797 | 1 | } |
798 | | |
799 | 0 | void TestObjectRequiredPB::MergeFrom(const ::google::protobuf::Message& from) { |
800 | | // @@protoc_insertion_point(generalized_merge_from_start:yb.TestObjectRequiredPB) |
801 | 0 | GOOGLE_DCHECK_NE(&from, this); |
802 | 0 | const TestObjectRequiredPB* source = |
803 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const TestObjectRequiredPB>( |
804 | 0 | &from); |
805 | 0 | if (source == NULL) { |
806 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.TestObjectRequiredPB) |
807 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
808 | 0 | } else { |
809 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.TestObjectRequiredPB) |
810 | 0 | MergeFrom(*source); |
811 | 0 | } |
812 | 0 | } |
813 | | |
814 | 0 | void TestObjectRequiredPB::MergeFrom(const TestObjectRequiredPB& from) { |
815 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.TestObjectRequiredPB) |
816 | 0 | GOOGLE_DCHECK_NE(&from, this); |
817 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
818 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
819 | 0 | (void) cached_has_bits; |
820 | |
|
821 | 0 | cached_has_bits = from._has_bits_[0]; |
822 | 0 | if (cached_has_bits & 7u) { |
823 | 0 | if (cached_has_bits & 0x00000001u) { |
824 | 0 | set_has_string1(); |
825 | 0 | string1_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string1_); |
826 | 0 | } |
827 | 0 | if (cached_has_bits & 0x00000002u) { |
828 | 0 | set_has_string2(); |
829 | 0 | string2_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string2_); |
830 | 0 | } |
831 | 0 | if (cached_has_bits & 0x00000004u) { |
832 | 0 | mutable_record()->::yb::TestStringRequiredPB::MergeFrom(from.record()); |
833 | 0 | } |
834 | 0 | } |
835 | 0 | } |
836 | | |
837 | 0 | void TestObjectRequiredPB::CopyFrom(const ::google::protobuf::Message& from) { |
838 | | // @@protoc_insertion_point(generalized_copy_from_start:yb.TestObjectRequiredPB) |
839 | 0 | if (&from == this) return; |
840 | 0 | Clear(); |
841 | 0 | MergeFrom(from); |
842 | 0 | } |
843 | | |
844 | 0 | void TestObjectRequiredPB::CopyFrom(const TestObjectRequiredPB& from) { |
845 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.TestObjectRequiredPB) |
846 | 0 | if (&from == this) return; |
847 | 0 | Clear(); |
848 | 0 | MergeFrom(from); |
849 | 0 | } |
850 | | |
851 | 1 | bool TestObjectRequiredPB::IsInitialized() const { |
852 | 1 | if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false0 ; |
853 | 1 | if (has_record()) { |
854 | 1 | if (!this->record_->IsInitialized()) return false0 ; |
855 | 1 | } |
856 | 1 | return true; |
857 | 1 | } |
858 | | |
859 | 0 | void TestObjectRequiredPB::Swap(TestObjectRequiredPB* other) { |
860 | 0 | if (other == this) return; |
861 | 0 | InternalSwap(other); |
862 | 0 | } |
863 | 0 | void TestObjectRequiredPB::InternalSwap(TestObjectRequiredPB* other) { |
864 | 0 | using std::swap; |
865 | 0 | string1_.Swap(&other->string1_); |
866 | 0 | string2_.Swap(&other->string2_); |
867 | 0 | swap(record_, other->record_); |
868 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
869 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
870 | 0 | swap(_cached_size_, other->_cached_size_); |
871 | 0 | } |
872 | | |
873 | 2 | ::google::protobuf::Metadata TestObjectRequiredPB::GetMetadata() const { |
874 | 2 | protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::protobuf_AssignDescriptorsOnce(); |
875 | 2 | return ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::file_level_metadata[kIndexInFileMessages]; |
876 | 2 | } |
877 | | |
878 | | |
879 | | // =================================================================== |
880 | | |
881 | 20 | void TestObjectRepeatedPB::InitAsDefaultInstance() { |
882 | 20 | } |
883 | 0 | void TestObjectRepeatedPB::clear_record() { |
884 | 0 | record_.Clear(); |
885 | 0 | } |
886 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
887 | | const int TestObjectRepeatedPB::kString1FieldNumber; |
888 | | const int TestObjectRepeatedPB::kRecordFieldNumber; |
889 | | const int TestObjectRepeatedPB::kString2FieldNumber; |
890 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
891 | | |
892 | | TestObjectRepeatedPB::TestObjectRepeatedPB() |
893 | 21 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
894 | 21 | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
895 | 1 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::InitDefaultsTestObjectRepeatedPB(); |
896 | 1 | } |
897 | 21 | SharedCtor(); |
898 | | // @@protoc_insertion_point(constructor:yb.TestObjectRepeatedPB) |
899 | 21 | } |
900 | | TestObjectRepeatedPB::TestObjectRepeatedPB(const TestObjectRepeatedPB& from) |
901 | | : ::google::protobuf::Message(), |
902 | | _internal_metadata_(NULL), |
903 | | _has_bits_(from._has_bits_), |
904 | | _cached_size_(0), |
905 | | string1_(from.string1_), |
906 | | record_(from.record_), |
907 | 0 | string2_(from.string2_) { |
908 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
909 | | // @@protoc_insertion_point(copy_constructor:yb.TestObjectRepeatedPB) |
910 | 0 | } |
911 | | |
912 | 21 | void TestObjectRepeatedPB::SharedCtor() { |
913 | 21 | _cached_size_ = 0; |
914 | 21 | } |
915 | | |
916 | 1 | TestObjectRepeatedPB::~TestObjectRepeatedPB() { |
917 | | // @@protoc_insertion_point(destructor:yb.TestObjectRepeatedPB) |
918 | 1 | SharedDtor(); |
919 | 1 | } |
920 | | |
921 | 1 | void TestObjectRepeatedPB::SharedDtor() { |
922 | 1 | } |
923 | | |
924 | 0 | void TestObjectRepeatedPB::SetCachedSize(int size) const { |
925 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
926 | 0 | _cached_size_ = size; |
927 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
928 | 0 | } |
929 | 0 | const ::google::protobuf::Descriptor* TestObjectRepeatedPB::descriptor() { |
930 | 0 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::protobuf_AssignDescriptorsOnce(); |
931 | 0 | return ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
932 | 0 | } |
933 | | |
934 | 0 | const TestObjectRepeatedPB& TestObjectRepeatedPB::default_instance() { |
935 | 0 | ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::InitDefaultsTestObjectRepeatedPB(); |
936 | 0 | return *internal_default_instance(); |
937 | 0 | } |
938 | | |
939 | 0 | TestObjectRepeatedPB* TestObjectRepeatedPB::New(::google::protobuf::Arena* arena) const { |
940 | 0 | TestObjectRepeatedPB* n = new TestObjectRepeatedPB; |
941 | 0 | if (arena != NULL) { |
942 | 0 | arena->Own(n); |
943 | 0 | } |
944 | 0 | return n; |
945 | 0 | } |
946 | | |
947 | 1 | void TestObjectRepeatedPB::Clear() { |
948 | | // @@protoc_insertion_point(message_clear_start:yb.TestObjectRepeatedPB) |
949 | 1 | ::google::protobuf::uint32 cached_has_bits = 0; |
950 | | // Prevent compiler warnings about cached_has_bits being unused |
951 | 1 | (void) cached_has_bits; |
952 | | |
953 | 1 | string1_.Clear(); |
954 | 1 | record_.Clear(); |
955 | 1 | string2_.Clear(); |
956 | 1 | _has_bits_.Clear(); |
957 | 1 | _internal_metadata_.Clear(); |
958 | 1 | } |
959 | | |
960 | | bool TestObjectRepeatedPB::MergePartialFromCodedStream( |
961 | 1 | ::google::protobuf::io::CodedInputStream* input) { |
962 | 3 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure0 |
963 | 1 | ::google::protobuf::uint32 tag; |
964 | | // @@protoc_insertion_point(parse_start:yb.TestObjectRepeatedPB) |
965 | 4 | for (;;) { |
966 | 4 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
967 | 4 | tag = p.first; |
968 | 4 | if (!p.second) goto handle_unusual1 ; |
969 | 3 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
970 | | // repeated string string1 = 1; |
971 | 1 | case 1: { |
972 | 1 | if (static_cast< ::google::protobuf::uint8>(tag) == |
973 | 1 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
974 | 1 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
975 | 1 | input, this->add_string1())); |
976 | 1 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
977 | 1 | this->string1(this->string1_size() - 1).data(), |
978 | 1 | static_cast<int>(this->string1(this->string1_size() - 1).length()), |
979 | 1 | ::google::protobuf::internal::WireFormat::PARSE, |
980 | 1 | "yb.TestObjectRepeatedPB.string1"); |
981 | 1 | } else { |
982 | 0 | goto handle_unusual; |
983 | 0 | } |
984 | 1 | break; |
985 | 1 | } |
986 | | |
987 | | // repeated .yb.TestStringRepeatedPB record = 2; |
988 | 1 | case 2: { |
989 | 1 | if (static_cast< ::google::protobuf::uint8>(tag) == |
990 | 1 | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
991 | 1 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_record())); |
992 | 1 | } else { |
993 | 0 | goto handle_unusual; |
994 | 0 | } |
995 | 1 | break; |
996 | 1 | } |
997 | | |
998 | | // repeated string string2 = 3; |
999 | 1 | case 3: { |
1000 | 1 | if (static_cast< ::google::protobuf::uint8>(tag) == |
1001 | 1 | static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { |
1002 | 1 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
1003 | 1 | input, this->add_string2())); |
1004 | 1 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
1005 | 1 | this->string2(this->string2_size() - 1).data(), |
1006 | 1 | static_cast<int>(this->string2(this->string2_size() - 1).length()), |
1007 | 1 | ::google::protobuf::internal::WireFormat::PARSE, |
1008 | 1 | "yb.TestObjectRepeatedPB.string2"); |
1009 | 1 | } else { |
1010 | 0 | goto handle_unusual; |
1011 | 0 | } |
1012 | 1 | break; |
1013 | 1 | } |
1014 | | |
1015 | 1 | default: { |
1016 | 1 | handle_unusual: |
1017 | 1 | if (tag == 0) { |
1018 | 1 | goto success; |
1019 | 1 | } |
1020 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
1021 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1022 | 0 | break; |
1023 | 0 | } |
1024 | 3 | } |
1025 | 3 | } |
1026 | 1 | success: |
1027 | | // @@protoc_insertion_point(parse_success:yb.TestObjectRepeatedPB) |
1028 | 1 | return true; |
1029 | 0 | failure: |
1030 | | // @@protoc_insertion_point(parse_failure:yb.TestObjectRepeatedPB) |
1031 | 0 | return false; |
1032 | 1 | #undef DO_ |
1033 | 1 | } |
1034 | | |
1035 | | void TestObjectRepeatedPB::SerializeWithCachedSizes( |
1036 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
1037 | | // @@protoc_insertion_point(serialize_start:yb.TestObjectRepeatedPB) |
1038 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1039 | 0 | (void) cached_has_bits; |
1040 | | |
1041 | | // repeated string string1 = 1; |
1042 | 0 | for (int i = 0, n = this->string1_size(); i < n; i++) { |
1043 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
1044 | 0 | this->string1(i).data(), static_cast<int>(this->string1(i).length()), |
1045 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
1046 | 0 | "yb.TestObjectRepeatedPB.string1"); |
1047 | 0 | ::google::protobuf::internal::WireFormatLite::WriteString( |
1048 | 0 | 1, this->string1(i), output); |
1049 | 0 | } |
1050 | | |
1051 | | // repeated .yb.TestStringRepeatedPB record = 2; |
1052 | 0 | for (unsigned int i = 0, |
1053 | 0 | n = static_cast<unsigned int>(this->record_size()); i < n; i++) { |
1054 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
1055 | 0 | 2, this->record(static_cast<int>(i)), output); |
1056 | 0 | } |
1057 | | |
1058 | | // repeated string string2 = 3; |
1059 | 0 | for (int i = 0, n = this->string2_size(); i < n; i++) { |
1060 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
1061 | 0 | this->string2(i).data(), static_cast<int>(this->string2(i).length()), |
1062 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
1063 | 0 | "yb.TestObjectRepeatedPB.string2"); |
1064 | 0 | ::google::protobuf::internal::WireFormatLite::WriteString( |
1065 | 0 | 3, this->string2(i), output); |
1066 | 0 | } |
1067 | |
|
1068 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1069 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
1070 | 0 | _internal_metadata_.unknown_fields(), output); |
1071 | 0 | } |
1072 | | // @@protoc_insertion_point(serialize_end:yb.TestObjectRepeatedPB) |
1073 | 0 | } |
1074 | | |
1075 | | ::google::protobuf::uint8* TestObjectRepeatedPB::InternalSerializeWithCachedSizesToArray( |
1076 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
1077 | 0 | (void)deterministic; // Unused |
1078 | | // @@protoc_insertion_point(serialize_to_array_start:yb.TestObjectRepeatedPB) |
1079 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1080 | 0 | (void) cached_has_bits; |
1081 | | |
1082 | | // repeated string string1 = 1; |
1083 | 0 | for (int i = 0, n = this->string1_size(); i < n; i++) { |
1084 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
1085 | 0 | this->string1(i).data(), static_cast<int>(this->string1(i).length()), |
1086 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
1087 | 0 | "yb.TestObjectRepeatedPB.string1"); |
1088 | 0 | target = ::google::protobuf::internal::WireFormatLite:: |
1089 | 0 | WriteStringToArray(1, this->string1(i), target); |
1090 | 0 | } |
1091 | | |
1092 | | // repeated .yb.TestStringRepeatedPB record = 2; |
1093 | 0 | for (unsigned int i = 0, |
1094 | 0 | n = static_cast<unsigned int>(this->record_size()); i < n; i++) { |
1095 | 0 | target = ::google::protobuf::internal::WireFormatLite:: |
1096 | 0 | InternalWriteMessageToArray( |
1097 | 0 | 2, this->record(static_cast<int>(i)), deterministic, target); |
1098 | 0 | } |
1099 | | |
1100 | | // repeated string string2 = 3; |
1101 | 0 | for (int i = 0, n = this->string2_size(); i < n; i++) { |
1102 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
1103 | 0 | this->string2(i).data(), static_cast<int>(this->string2(i).length()), |
1104 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
1105 | 0 | "yb.TestObjectRepeatedPB.string2"); |
1106 | 0 | target = ::google::protobuf::internal::WireFormatLite:: |
1107 | 0 | WriteStringToArray(3, this->string2(i), target); |
1108 | 0 | } |
1109 | |
|
1110 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1111 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
1112 | 0 | _internal_metadata_.unknown_fields(), target); |
1113 | 0 | } |
1114 | | // @@protoc_insertion_point(serialize_to_array_end:yb.TestObjectRepeatedPB) |
1115 | 0 | return target; |
1116 | 0 | } |
1117 | | |
1118 | 0 | size_t TestObjectRepeatedPB::ByteSizeLong() const { |
1119 | | // @@protoc_insertion_point(message_byte_size_start:yb.TestObjectRepeatedPB) |
1120 | 0 | size_t total_size = 0; |
1121 | |
|
1122 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1123 | 0 | total_size += |
1124 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
1125 | 0 | _internal_metadata_.unknown_fields()); |
1126 | 0 | } |
1127 | | // repeated string string1 = 1; |
1128 | 0 | total_size += 1 * |
1129 | 0 | ::google::protobuf::internal::FromIntSize(this->string1_size()); |
1130 | 0 | for (int i = 0, n = this->string1_size(); i < n; i++) { |
1131 | 0 | total_size += ::google::protobuf::internal::WireFormatLite::StringSize( |
1132 | 0 | this->string1(i)); |
1133 | 0 | } |
1134 | | |
1135 | | // repeated .yb.TestStringRepeatedPB record = 2; |
1136 | 0 | { |
1137 | 0 | unsigned int count = static_cast<unsigned int>(this->record_size()); |
1138 | 0 | total_size += 1UL * count; |
1139 | 0 | for (unsigned int i = 0; i < count; i++) { |
1140 | 0 | total_size += |
1141 | 0 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
1142 | 0 | this->record(static_cast<int>(i))); |
1143 | 0 | } |
1144 | 0 | } |
1145 | | |
1146 | | // repeated string string2 = 3; |
1147 | 0 | total_size += 1 * |
1148 | 0 | ::google::protobuf::internal::FromIntSize(this->string2_size()); |
1149 | 0 | for (int i = 0, n = this->string2_size(); i < n; i++) { |
1150 | 0 | total_size += ::google::protobuf::internal::WireFormatLite::StringSize( |
1151 | 0 | this->string2(i)); |
1152 | 0 | } |
1153 | |
|
1154 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
1155 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
1156 | 0 | _cached_size_ = cached_size; |
1157 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
1158 | 0 | return total_size; |
1159 | 0 | } |
1160 | | |
1161 | 0 | void TestObjectRepeatedPB::MergeFrom(const ::google::protobuf::Message& from) { |
1162 | | // @@protoc_insertion_point(generalized_merge_from_start:yb.TestObjectRepeatedPB) |
1163 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1164 | 0 | const TestObjectRepeatedPB* source = |
1165 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const TestObjectRepeatedPB>( |
1166 | 0 | &from); |
1167 | 0 | if (source == NULL) { |
1168 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.TestObjectRepeatedPB) |
1169 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
1170 | 0 | } else { |
1171 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.TestObjectRepeatedPB) |
1172 | 0 | MergeFrom(*source); |
1173 | 0 | } |
1174 | 0 | } |
1175 | | |
1176 | 0 | void TestObjectRepeatedPB::MergeFrom(const TestObjectRepeatedPB& from) { |
1177 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.TestObjectRepeatedPB) |
1178 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1179 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1180 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1181 | 0 | (void) cached_has_bits; |
1182 | |
|
1183 | 0 | string1_.MergeFrom(from.string1_); |
1184 | 0 | record_.MergeFrom(from.record_); |
1185 | 0 | string2_.MergeFrom(from.string2_); |
1186 | 0 | } |
1187 | | |
1188 | 0 | void TestObjectRepeatedPB::CopyFrom(const ::google::protobuf::Message& from) { |
1189 | | // @@protoc_insertion_point(generalized_copy_from_start:yb.TestObjectRepeatedPB) |
1190 | 0 | if (&from == this) return; |
1191 | 0 | Clear(); |
1192 | 0 | MergeFrom(from); |
1193 | 0 | } |
1194 | | |
1195 | 0 | void TestObjectRepeatedPB::CopyFrom(const TestObjectRepeatedPB& from) { |
1196 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.TestObjectRepeatedPB) |
1197 | 0 | if (&from == this) return; |
1198 | 0 | Clear(); |
1199 | 0 | MergeFrom(from); |
1200 | 0 | } |
1201 | | |
1202 | 1 | bool TestObjectRepeatedPB::IsInitialized() const { |
1203 | 1 | return true; |
1204 | 1 | } |
1205 | | |
1206 | 0 | void TestObjectRepeatedPB::Swap(TestObjectRepeatedPB* other) { |
1207 | 0 | if (other == this) return; |
1208 | 0 | InternalSwap(other); |
1209 | 0 | } |
1210 | 0 | void TestObjectRepeatedPB::InternalSwap(TestObjectRepeatedPB* other) { |
1211 | 0 | using std::swap; |
1212 | 0 | string1_.InternalSwap(&other->string1_); |
1213 | 0 | record_.InternalSwap(&other->record_); |
1214 | 0 | string2_.InternalSwap(&other->string2_); |
1215 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
1216 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1217 | 0 | swap(_cached_size_, other->_cached_size_); |
1218 | 0 | } |
1219 | | |
1220 | 0 | ::google::protobuf::Metadata TestObjectRepeatedPB::GetMetadata() const { |
1221 | 0 | protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::protobuf_AssignDescriptorsOnce(); |
1222 | 0 | return ::protobuf_yb_2futil_2fproto_5fcontainer_5ftest2_2eproto::file_level_metadata[kIndexInFileMessages]; |
1223 | 0 | } |
1224 | | |
1225 | | |
1226 | | // @@protoc_insertion_point(namespace_scope) |
1227 | | } // namespace yb |
1228 | | |
1229 | | // @@protoc_insertion_point(global_scope) |