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