Coverage Report

Created: 2025-06-13 06:23

/src/brpc/build/test/addressbook.pb.cc
Line
Count
Source (jump to first uncovered line)
1
// Generated by the protocol buffer compiler.  DO NOT EDIT!
2
// source: addressbook.proto
3
4
#include "addressbook.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/io/coded_stream.h>
11
#include <google/protobuf/wire_format_lite_inl.h>
12
#include <google/protobuf/descriptor.h>
13
#include <google/protobuf/generated_message_reflection.h>
14
#include <google/protobuf/reflection_ops.h>
15
#include <google/protobuf/wire_format.h>
16
// This is a temporary google only hack
17
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
18
#include "third_party/protobuf/version.h"
19
#endif
20
// @@protoc_insertion_point(includes)
21
22
namespace protobuf_addressbook_2eproto {
23
extern PROTOBUF_INTERNAL_EXPORT_protobuf_addressbook_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Person_PhoneNumber;
24
extern PROTOBUF_INTERNAL_EXPORT_protobuf_addressbook_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Person;
25
}  // namespace protobuf_addressbook_2eproto
26
namespace addressbook {
27
class Person_PhoneNumberDefaultTypeInternal {
28
 public:
29
  ::google::protobuf::internal::ExplicitlyConstructed<Person_PhoneNumber>
30
      _instance;
31
} _Person_PhoneNumber_default_instance_;
32
class PersonDefaultTypeInternal {
33
 public:
34
  ::google::protobuf::internal::ExplicitlyConstructed<Person>
35
      _instance;
36
} _Person_default_instance_;
37
class AddressBookDefaultTypeInternal {
38
 public:
39
  ::google::protobuf::internal::ExplicitlyConstructed<AddressBook>
40
      _instance;
41
} _AddressBook_default_instance_;
42
}  // namespace addressbook
43
namespace protobuf_addressbook_2eproto {
44
2
static void InitDefaultsPerson_PhoneNumber() {
45
2
  GOOGLE_PROTOBUF_VERIFY_VERSION;
46
47
2
  {
48
2
    void* ptr = &::addressbook::_Person_PhoneNumber_default_instance_;
49
2
    new (ptr) ::addressbook::Person_PhoneNumber();
50
2
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
51
2
  }
52
2
  ::addressbook::Person_PhoneNumber::InitAsDefaultInstance();
53
2
}
54
55
::google::protobuf::internal::SCCInfo<0> scc_info_Person_PhoneNumber =
56
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPerson_PhoneNumber}, {}};
57
58
2
static void InitDefaultsPerson() {
59
2
  GOOGLE_PROTOBUF_VERIFY_VERSION;
60
61
2
  {
62
2
    void* ptr = &::addressbook::_Person_default_instance_;
63
2
    new (ptr) ::addressbook::Person();
64
2
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
65
2
  }
66
2
  ::addressbook::Person::InitAsDefaultInstance();
67
2
}
68
69
::google::protobuf::internal::SCCInfo<1> scc_info_Person =
70
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsPerson}, {
71
      &protobuf_addressbook_2eproto::scc_info_Person_PhoneNumber.base,}};
72
73
2
static void InitDefaultsAddressBook() {
74
2
  GOOGLE_PROTOBUF_VERIFY_VERSION;
75
76
2
  {
77
2
    void* ptr = &::addressbook::_AddressBook_default_instance_;
78
2
    new (ptr) ::addressbook::AddressBook();
79
2
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
80
2
  }
81
2
  ::addressbook::AddressBook::InitAsDefaultInstance();
82
2
}
83
84
::google::protobuf::internal::SCCInfo<1> scc_info_AddressBook =
85
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsAddressBook}, {
86
      &protobuf_addressbook_2eproto::scc_info_Person.base,}};
87
88
2
void InitDefaults() {
89
2
  ::google::protobuf::internal::InitSCC(&scc_info_Person_PhoneNumber.base);
90
2
  ::google::protobuf::internal::InitSCC(&scc_info_Person.base);
91
2
  ::google::protobuf::internal::InitSCC(&scc_info_AddressBook.base);
92
2
}
93
94
::google::protobuf::Metadata file_level_metadata[3];
95
const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
96
97
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
98
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person_PhoneNumber, _has_bits_),
99
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person_PhoneNumber, _internal_metadata_),
100
  ~0u,  // no _extensions_
101
  ~0u,  // no _oneof_case_
102
  ~0u,  // no _weak_field_map_
103
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person_PhoneNumber, number_),
104
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person_PhoneNumber, type_),
105
  0,
106
  1,
107
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, _has_bits_),
108
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, _internal_metadata_),
109
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, _extensions_),
110
  ~0u,  // no _oneof_case_
111
  ~0u,  // no _weak_field_map_
112
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, name_),
113
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, id_),
114
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, email_),
115
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, phone_),
116
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, data_),
117
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, data32_),
118
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, data64_),
119
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, datadouble_),
120
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, datafloat_),
121
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, datau32_),
122
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, datau64_),
123
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, databool_),
124
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, databyte_),
125
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, datafix32_),
126
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, datafix64_),
127
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, datasfix32_),
128
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, datasfix64_),
129
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, datafloat_scientific_),
130
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::Person, datadouble_scientific_),
131
  0,
132
  3,
133
  1,
134
  ~0u,
135
  5,
136
  4,
137
  6,
138
  7,
139
  8,
140
  9,
141
  10,
142
  11,
143
  2,
144
  12,
145
  13,
146
  15,
147
  14,
148
  16,
149
  17,
150
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::AddressBook, _has_bits_),
151
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::AddressBook, _internal_metadata_),
152
  ~0u,  // no _extensions_
153
  ~0u,  // no _oneof_case_
154
  ~0u,  // no _weak_field_map_
155
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::addressbook::AddressBook, person_),
156
  ~0u,
157
};
158
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
159
  { 0, 7, sizeof(::addressbook::Person_PhoneNumber)},
160
  { 9, 33, sizeof(::addressbook::Person)},
161
  { 52, 58, sizeof(::addressbook::AddressBook)},
162
};
163
164
static ::google::protobuf::Message const * const file_default_instances[] = {
165
  reinterpret_cast<const ::google::protobuf::Message*>(&::addressbook::_Person_PhoneNumber_default_instance_),
166
  reinterpret_cast<const ::google::protobuf::Message*>(&::addressbook::_Person_default_instance_),
167
  reinterpret_cast<const ::google::protobuf::Message*>(&::addressbook::_AddressBook_default_instance_),
168
};
169
170
0
void protobuf_AssignDescriptors() {
171
0
  AddDescriptors();
172
0
  AssignDescriptors(
173
0
      "addressbook.proto", schemas, file_default_instances, TableStruct::offsets,
174
0
      file_level_metadata, file_level_enum_descriptors, NULL);
175
0
}
176
177
0
void protobuf_AssignDescriptorsOnce() {
178
0
  static ::google::protobuf::internal::once_flag once;
179
0
  ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
180
0
}
181
182
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
183
0
void protobuf_RegisterTypes(const ::std::string&) {
184
0
  protobuf_AssignDescriptorsOnce();
185
0
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3);
186
0
}
187
188
2
void AddDescriptorsImpl() {
189
2
  InitDefaults();
190
2
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
191
2
      "\n\021addressbook.proto\022\013addressbook\"\215\004\n\006Per"
192
2
      "son\022\014\n\004name\030\001 \002(\t\022\n\n\002id\030\002 \002(\005\022\r\n\005email\030\003"
193
2
      " \001(\t\022.\n\005phone\030\004 \003(\0132\037.addressbook.Person"
194
2
      ".PhoneNumber\022\014\n\004data\030\005 \001(\003\022\016\n\006data32\030\006 \001"
195
2
      "(\021\022\016\n\006data64\030\007 \001(\022\022\022\n\ndatadouble\030\010 \002(\001\022\021"
196
2
      "\n\tdatafloat\030\t \001(\002\022\017\n\007datau32\030\n \001(\r\022\017\n\007da"
197
2
      "tau64\030\013 \001(\004\022\020\n\010databool\030\014 \001(\010\022\020\n\010databyt"
198
2
      "e\030\r \001(\014\022\021\n\tdatafix32\030\016 \001(\007\022\021\n\tdatafix64\030"
199
2
      "\017 \001(\006\022\022\n\ndatasfix32\030\020 \001(\017\022\022\n\ndatasfix64\030"
200
2
      "\021 \001(\020\022\034\n\024datafloat_scientific\030\022 \001(\002\022\035\n\025d"
201
2
      "atadouble_scientific\030\023 \001(\001\032P\n\013PhoneNumbe"
202
2
      "r\022\016\n\006number\030\001 \002(\t\0221\n\004type\030\002 \001(\0162\035.addres"
203
2
      "sbook.Person.PhoneType:\004HOME\"+\n\tPhoneTyp"
204
2
      "e\022\n\n\006MOBILE\020\000\022\010\n\004HOME\020\001\022\010\n\004WORK\020\002*\005\010d\020\311\001"
205
2
      "\"2\n\013AddressBook\022#\n\006person\030\001 \003(\0132\023.addres"
206
2
      "sbook.Person:\"\n\005hobby\022\023.addressbook.Pers"
207
2
      "on\030d \001(\t"
208
2
  };
209
2
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
210
2
      descriptor, 648);
211
2
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
212
2
    "addressbook.proto", &protobuf_RegisterTypes);
213
2
}
214
215
2
void AddDescriptors() {
216
2
  static ::google::protobuf::internal::once_flag once;
217
2
  ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
218
2
}
219
// Force AddDescriptors() to be called at dynamic initialization time.
220
struct StaticDescriptorInitializer {
221
2
  StaticDescriptorInitializer() {
222
2
    AddDescriptors();
223
2
  }
224
} static_descriptor_initializer;
225
}  // namespace protobuf_addressbook_2eproto
226
namespace addressbook {
227
0
const ::google::protobuf::EnumDescriptor* Person_PhoneType_descriptor() {
228
0
  protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
229
0
  return protobuf_addressbook_2eproto::file_level_enum_descriptors[0];
230
0
}
231
0
bool Person_PhoneType_IsValid(int value) {
232
0
  switch (value) {
233
0
    case 0:
234
0
    case 1:
235
0
    case 2:
236
0
      return true;
237
0
    default:
238
0
      return false;
239
0
  }
240
0
}
241
242
#if !defined(_MSC_VER) || _MSC_VER >= 1900
243
const Person_PhoneType Person::MOBILE;
244
const Person_PhoneType Person::HOME;
245
const Person_PhoneType Person::WORK;
246
const Person_PhoneType Person::PhoneType_MIN;
247
const Person_PhoneType Person::PhoneType_MAX;
248
const int Person::PhoneType_ARRAYSIZE;
249
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
250
251
// ===================================================================
252
253
2
void Person_PhoneNumber::InitAsDefaultInstance() {
254
2
}
255
#if !defined(_MSC_VER) || _MSC_VER >= 1900
256
const int Person_PhoneNumber::kNumberFieldNumber;
257
const int Person_PhoneNumber::kTypeFieldNumber;
258
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
259
260
Person_PhoneNumber::Person_PhoneNumber()
261
2
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
262
2
  ::google::protobuf::internal::InitSCC(
263
2
      &protobuf_addressbook_2eproto::scc_info_Person_PhoneNumber.base);
264
2
  SharedCtor();
265
  // @@protoc_insertion_point(constructor:addressbook.Person.PhoneNumber)
266
2
}
267
Person_PhoneNumber::Person_PhoneNumber(const Person_PhoneNumber& from)
268
0
  : ::google::protobuf::Message(),
269
0
      _internal_metadata_(NULL),
270
0
      _has_bits_(from._has_bits_) {
271
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
272
0
  number_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
273
0
  if (from.has_number()) {
274
0
    number_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.number_);
275
0
  }
276
0
  type_ = from.type_;
277
  // @@protoc_insertion_point(copy_constructor:addressbook.Person.PhoneNumber)
278
0
}
279
280
2
void Person_PhoneNumber::SharedCtor() {
281
2
  number_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
282
2
  type_ = 1;
283
2
}
284
285
0
Person_PhoneNumber::~Person_PhoneNumber() {
286
  // @@protoc_insertion_point(destructor:addressbook.Person.PhoneNumber)
287
0
  SharedDtor();
288
0
}
289
290
0
void Person_PhoneNumber::SharedDtor() {
291
0
  number_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
292
0
}
293
294
0
void Person_PhoneNumber::SetCachedSize(int size) const {
295
0
  _cached_size_.Set(size);
296
0
}
297
0
const ::google::protobuf::Descriptor* Person_PhoneNumber::descriptor() {
298
0
  ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
299
0
  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
300
0
}
301
302
0
const Person_PhoneNumber& Person_PhoneNumber::default_instance() {
303
0
  ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_Person_PhoneNumber.base);
304
0
  return *internal_default_instance();
305
0
}
306
307
308
0
void Person_PhoneNumber::Clear() {
309
// @@protoc_insertion_point(message_clear_start:addressbook.Person.PhoneNumber)
310
0
  ::google::protobuf::uint32 cached_has_bits = 0;
311
  // Prevent compiler warnings about cached_has_bits being unused
312
0
  (void) cached_has_bits;
313
314
0
  cached_has_bits = _has_bits_[0];
315
0
  if (cached_has_bits & 3u) {
316
0
    if (cached_has_bits & 0x00000001u) {
317
0
      number_.ClearNonDefaultToEmptyNoArena();
318
0
    }
319
0
    type_ = 1;
320
0
  }
321
0
  _has_bits_.Clear();
322
0
  _internal_metadata_.Clear();
323
0
}
324
325
bool Person_PhoneNumber::MergePartialFromCodedStream(
326
0
    ::google::protobuf::io::CodedInputStream* input) {
327
0
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
328
0
  ::google::protobuf::uint32 tag;
329
  // @@protoc_insertion_point(parse_start:addressbook.Person.PhoneNumber)
330
0
  for (;;) {
331
0
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
332
0
    tag = p.first;
333
0
    if (!p.second) goto handle_unusual;
334
0
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
335
      // required string number = 1;
336
0
      case 1: {
337
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
338
0
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
339
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
340
0
                input, this->mutable_number()));
341
0
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
342
0
            this->number().data(), static_cast<int>(this->number().length()),
343
0
            ::google::protobuf::internal::WireFormat::PARSE,
344
0
            "addressbook.Person.PhoneNumber.number");
345
0
        } else {
346
0
          goto handle_unusual;
347
0
        }
348
0
        break;
349
0
      }
350
351
      // optional .addressbook.Person.PhoneType type = 2 [default = HOME];
352
0
      case 2: {
353
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
354
0
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
355
0
          int value;
356
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
357
0
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
358
0
                 input, &value)));
359
0
          if (::addressbook::Person_PhoneType_IsValid(value)) {
360
0
            set_type(static_cast< ::addressbook::Person_PhoneType >(value));
361
0
          } else {
362
0
            mutable_unknown_fields()->AddVarint(
363
0
                2, static_cast< ::google::protobuf::uint64>(value));
364
0
          }
365
0
        } else {
366
0
          goto handle_unusual;
367
0
        }
368
0
        break;
369
0
      }
370
371
0
      default: {
372
0
      handle_unusual:
373
0
        if (tag == 0) {
374
0
          goto success;
375
0
        }
376
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
377
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
378
0
        break;
379
0
      }
380
0
    }
381
0
  }
382
0
success:
383
  // @@protoc_insertion_point(parse_success:addressbook.Person.PhoneNumber)
384
0
  return true;
385
0
failure:
386
  // @@protoc_insertion_point(parse_failure:addressbook.Person.PhoneNumber)
387
0
  return false;
388
0
#undef DO_
389
0
}
390
391
void Person_PhoneNumber::SerializeWithCachedSizes(
392
0
    ::google::protobuf::io::CodedOutputStream* output) const {
393
  // @@protoc_insertion_point(serialize_start:addressbook.Person.PhoneNumber)
394
0
  ::google::protobuf::uint32 cached_has_bits = 0;
395
0
  (void) cached_has_bits;
396
397
0
  cached_has_bits = _has_bits_[0];
398
  // required string number = 1;
399
0
  if (cached_has_bits & 0x00000001u) {
400
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
401
0
      this->number().data(), static_cast<int>(this->number().length()),
402
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
403
0
      "addressbook.Person.PhoneNumber.number");
404
0
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
405
0
      1, this->number(), output);
406
0
  }
407
408
  // optional .addressbook.Person.PhoneType type = 2 [default = HOME];
409
0
  if (cached_has_bits & 0x00000002u) {
410
0
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
411
0
      2, this->type(), output);
412
0
  }
413
414
0
  if (_internal_metadata_.have_unknown_fields()) {
415
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
416
0
        _internal_metadata_.unknown_fields(), output);
417
0
  }
418
  // @@protoc_insertion_point(serialize_end:addressbook.Person.PhoneNumber)
419
0
}
420
421
::google::protobuf::uint8* Person_PhoneNumber::InternalSerializeWithCachedSizesToArray(
422
0
    bool deterministic, ::google::protobuf::uint8* target) const {
423
0
  (void)deterministic; // Unused
424
  // @@protoc_insertion_point(serialize_to_array_start:addressbook.Person.PhoneNumber)
425
0
  ::google::protobuf::uint32 cached_has_bits = 0;
426
0
  (void) cached_has_bits;
427
428
0
  cached_has_bits = _has_bits_[0];
429
  // required string number = 1;
430
0
  if (cached_has_bits & 0x00000001u) {
431
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
432
0
      this->number().data(), static_cast<int>(this->number().length()),
433
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
434
0
      "addressbook.Person.PhoneNumber.number");
435
0
    target =
436
0
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
437
0
        1, this->number(), target);
438
0
  }
439
440
  // optional .addressbook.Person.PhoneType type = 2 [default = HOME];
441
0
  if (cached_has_bits & 0x00000002u) {
442
0
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
443
0
      2, this->type(), target);
444
0
  }
445
446
0
  if (_internal_metadata_.have_unknown_fields()) {
447
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
448
0
        _internal_metadata_.unknown_fields(), target);
449
0
  }
450
  // @@protoc_insertion_point(serialize_to_array_end:addressbook.Person.PhoneNumber)
451
0
  return target;
452
0
}
453
454
0
size_t Person_PhoneNumber::ByteSizeLong() const {
455
// @@protoc_insertion_point(message_byte_size_start:addressbook.Person.PhoneNumber)
456
0
  size_t total_size = 0;
457
458
0
  if (_internal_metadata_.have_unknown_fields()) {
459
0
    total_size +=
460
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
461
0
        _internal_metadata_.unknown_fields());
462
0
  }
463
  // required string number = 1;
464
0
  if (has_number()) {
465
0
    total_size += 1 +
466
0
      ::google::protobuf::internal::WireFormatLite::StringSize(
467
0
        this->number());
468
0
  }
469
  // optional .addressbook.Person.PhoneType type = 2 [default = HOME];
470
0
  if (has_type()) {
471
0
    total_size += 1 +
472
0
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
473
0
  }
474
475
0
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
476
0
  SetCachedSize(cached_size);
477
0
  return total_size;
478
0
}
479
480
0
void Person_PhoneNumber::MergeFrom(const ::google::protobuf::Message& from) {
481
// @@protoc_insertion_point(generalized_merge_from_start:addressbook.Person.PhoneNumber)
482
0
  GOOGLE_DCHECK_NE(&from, this);
483
0
  const Person_PhoneNumber* source =
484
0
      ::google::protobuf::internal::DynamicCastToGenerated<const Person_PhoneNumber>(
485
0
          &from);
486
0
  if (source == NULL) {
487
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:addressbook.Person.PhoneNumber)
488
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
489
0
  } else {
490
  // @@protoc_insertion_point(generalized_merge_from_cast_success:addressbook.Person.PhoneNumber)
491
0
    MergeFrom(*source);
492
0
  }
493
0
}
494
495
0
void Person_PhoneNumber::MergeFrom(const Person_PhoneNumber& from) {
496
// @@protoc_insertion_point(class_specific_merge_from_start:addressbook.Person.PhoneNumber)
497
0
  GOOGLE_DCHECK_NE(&from, this);
498
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
499
0
  ::google::protobuf::uint32 cached_has_bits = 0;
500
0
  (void) cached_has_bits;
501
502
0
  cached_has_bits = from._has_bits_[0];
503
0
  if (cached_has_bits & 3u) {
504
0
    if (cached_has_bits & 0x00000001u) {
505
0
      set_has_number();
506
0
      number_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.number_);
507
0
    }
508
0
    if (cached_has_bits & 0x00000002u) {
509
0
      type_ = from.type_;
510
0
    }
511
0
    _has_bits_[0] |= cached_has_bits;
512
0
  }
513
0
}
514
515
0
void Person_PhoneNumber::CopyFrom(const ::google::protobuf::Message& from) {
516
// @@protoc_insertion_point(generalized_copy_from_start:addressbook.Person.PhoneNumber)
517
0
  if (&from == this) return;
518
0
  Clear();
519
0
  MergeFrom(from);
520
0
}
521
522
0
void Person_PhoneNumber::CopyFrom(const Person_PhoneNumber& from) {
523
// @@protoc_insertion_point(class_specific_copy_from_start:addressbook.Person.PhoneNumber)
524
0
  if (&from == this) return;
525
0
  Clear();
526
0
  MergeFrom(from);
527
0
}
528
529
0
bool Person_PhoneNumber::IsInitialized() const {
530
0
  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
531
0
  return true;
532
0
}
533
534
0
void Person_PhoneNumber::Swap(Person_PhoneNumber* other) {
535
0
  if (other == this) return;
536
0
  InternalSwap(other);
537
0
}
538
0
void Person_PhoneNumber::InternalSwap(Person_PhoneNumber* other) {
539
0
  using std::swap;
540
0
  number_.Swap(&other->number_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
541
0
    GetArenaNoVirtual());
542
0
  swap(type_, other->type_);
543
0
  swap(_has_bits_[0], other->_has_bits_[0]);
544
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
545
0
}
546
547
0
::google::protobuf::Metadata Person_PhoneNumber::GetMetadata() const {
548
0
  protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
549
0
  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
550
0
}
551
552
553
// ===================================================================
554
555
2
void Person::InitAsDefaultInstance() {
556
2
}
557
#if !defined(_MSC_VER) || _MSC_VER >= 1900
558
const int Person::kNameFieldNumber;
559
const int Person::kIdFieldNumber;
560
const int Person::kEmailFieldNumber;
561
const int Person::kPhoneFieldNumber;
562
const int Person::kDataFieldNumber;
563
const int Person::kData32FieldNumber;
564
const int Person::kData64FieldNumber;
565
const int Person::kDatadoubleFieldNumber;
566
const int Person::kDatafloatFieldNumber;
567
const int Person::kDatau32FieldNumber;
568
const int Person::kDatau64FieldNumber;
569
const int Person::kDataboolFieldNumber;
570
const int Person::kDatabyteFieldNumber;
571
const int Person::kDatafix32FieldNumber;
572
const int Person::kDatafix64FieldNumber;
573
const int Person::kDatasfix32FieldNumber;
574
const int Person::kDatasfix64FieldNumber;
575
const int Person::kDatafloatScientificFieldNumber;
576
const int Person::kDatadoubleScientificFieldNumber;
577
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
578
579
Person::Person()
580
2
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
581
2
  ::google::protobuf::internal::InitSCC(
582
2
      &protobuf_addressbook_2eproto::scc_info_Person.base);
583
2
  SharedCtor();
584
  // @@protoc_insertion_point(constructor:addressbook.Person)
585
2
}
586
Person::Person(const Person& from)
587
0
  : ::google::protobuf::Message(),
588
0
      _internal_metadata_(NULL),
589
0
      _has_bits_(from._has_bits_),
590
0
      phone_(from.phone_) {
591
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
592
0
  _extensions_.MergeFrom(from._extensions_);
593
0
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
594
0
  if (from.has_name()) {
595
0
    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
596
0
  }
597
0
  email_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
598
0
  if (from.has_email()) {
599
0
    email_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.email_);
600
0
  }
601
0
  databyte_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
602
0
  if (from.has_databyte()) {
603
0
    databyte_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.databyte_);
604
0
  }
605
0
  ::memcpy(&id_, &from.id_,
606
0
    static_cast<size_t>(reinterpret_cast<char*>(&datadouble_scientific_) -
607
0
    reinterpret_cast<char*>(&id_)) + sizeof(datadouble_scientific_));
608
  // @@protoc_insertion_point(copy_constructor:addressbook.Person)
609
0
}
610
611
2
void Person::SharedCtor() {
612
2
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
613
2
  email_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
614
2
  databyte_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
615
2
  ::memset(&id_, 0, static_cast<size_t>(
616
2
      reinterpret_cast<char*>(&datadouble_scientific_) -
617
2
      reinterpret_cast<char*>(&id_)) + sizeof(datadouble_scientific_));
618
2
}
619
620
0
Person::~Person() {
621
  // @@protoc_insertion_point(destructor:addressbook.Person)
622
0
  SharedDtor();
623
0
}
624
625
0
void Person::SharedDtor() {
626
0
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
627
0
  email_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
628
0
  databyte_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
629
0
}
630
631
0
void Person::SetCachedSize(int size) const {
632
0
  _cached_size_.Set(size);
633
0
}
634
0
const ::google::protobuf::Descriptor* Person::descriptor() {
635
0
  ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
636
0
  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
637
0
}
638
639
2
const Person& Person::default_instance() {
640
2
  ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_Person.base);
641
2
  return *internal_default_instance();
642
2
}
643
644
645
0
void Person::Clear() {
646
// @@protoc_insertion_point(message_clear_start:addressbook.Person)
647
0
  ::google::protobuf::uint32 cached_has_bits = 0;
648
  // Prevent compiler warnings about cached_has_bits being unused
649
0
  (void) cached_has_bits;
650
651
0
  _extensions_.Clear();
652
0
  phone_.Clear();
653
0
  cached_has_bits = _has_bits_[0];
654
0
  if (cached_has_bits & 7u) {
655
0
    if (cached_has_bits & 0x00000001u) {
656
0
      name_.ClearNonDefaultToEmptyNoArena();
657
0
    }
658
0
    if (cached_has_bits & 0x00000002u) {
659
0
      email_.ClearNonDefaultToEmptyNoArena();
660
0
    }
661
0
    if (cached_has_bits & 0x00000004u) {
662
0
      databyte_.ClearNonDefaultToEmptyNoArena();
663
0
    }
664
0
  }
665
0
  if (cached_has_bits & 248u) {
666
0
    ::memset(&id_, 0, static_cast<size_t>(
667
0
        reinterpret_cast<char*>(&datadouble_) -
668
0
        reinterpret_cast<char*>(&id_)) + sizeof(datadouble_));
669
0
  }
670
0
  if (cached_has_bits & 65280u) {
671
0
    ::memset(&datafloat_, 0, static_cast<size_t>(
672
0
        reinterpret_cast<char*>(&datasfix32_) -
673
0
        reinterpret_cast<char*>(&datafloat_)) + sizeof(datasfix32_));
674
0
  }
675
0
  if (cached_has_bits & 196608u) {
676
0
    ::memset(&datafloat_scientific_, 0, static_cast<size_t>(
677
0
        reinterpret_cast<char*>(&datadouble_scientific_) -
678
0
        reinterpret_cast<char*>(&datafloat_scientific_)) + sizeof(datadouble_scientific_));
679
0
  }
680
0
  _has_bits_.Clear();
681
0
  _internal_metadata_.Clear();
682
0
}
683
684
bool Person::MergePartialFromCodedStream(
685
0
    ::google::protobuf::io::CodedInputStream* input) {
686
0
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
687
0
  ::google::protobuf::uint32 tag;
688
  // @@protoc_insertion_point(parse_start:addressbook.Person)
689
0
  for (;;) {
690
0
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
691
0
    tag = p.first;
692
0
    if (!p.second) goto handle_unusual;
693
0
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
694
      // required string name = 1;
695
0
      case 1: {
696
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
697
0
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
698
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
699
0
                input, this->mutable_name()));
700
0
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
701
0
            this->name().data(), static_cast<int>(this->name().length()),
702
0
            ::google::protobuf::internal::WireFormat::PARSE,
703
0
            "addressbook.Person.name");
704
0
        } else {
705
0
          goto handle_unusual;
706
0
        }
707
0
        break;
708
0
      }
709
710
      // required int32 id = 2;
711
0
      case 2: {
712
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
713
0
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
714
0
          set_has_id();
715
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
716
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
717
0
                 input, &id_)));
718
0
        } else {
719
0
          goto handle_unusual;
720
0
        }
721
0
        break;
722
0
      }
723
724
      // optional string email = 3;
725
0
      case 3: {
726
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
727
0
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
728
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
729
0
                input, this->mutable_email()));
730
0
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
731
0
            this->email().data(), static_cast<int>(this->email().length()),
732
0
            ::google::protobuf::internal::WireFormat::PARSE,
733
0
            "addressbook.Person.email");
734
0
        } else {
735
0
          goto handle_unusual;
736
0
        }
737
0
        break;
738
0
      }
739
740
      // repeated .addressbook.Person.PhoneNumber phone = 4;
741
0
      case 4: {
742
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
743
0
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
744
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
745
0
                input, add_phone()));
746
0
        } else {
747
0
          goto handle_unusual;
748
0
        }
749
0
        break;
750
0
      }
751
752
      // optional int64 data = 5;
753
0
      case 5: {
754
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
755
0
            static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
756
0
          set_has_data();
757
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
758
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
759
0
                 input, &data_)));
760
0
        } else {
761
0
          goto handle_unusual;
762
0
        }
763
0
        break;
764
0
      }
765
766
      // optional sint32 data32 = 6;
767
0
      case 6: {
768
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
769
0
            static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
770
0
          set_has_data32();
771
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
772
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
773
0
                 input, &data32_)));
774
0
        } else {
775
0
          goto handle_unusual;
776
0
        }
777
0
        break;
778
0
      }
779
780
      // optional sint64 data64 = 7;
781
0
      case 7: {
782
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
783
0
            static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
784
0
          set_has_data64();
785
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
786
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
787
0
                 input, &data64_)));
788
0
        } else {
789
0
          goto handle_unusual;
790
0
        }
791
0
        break;
792
0
      }
793
794
      // required double datadouble = 8;
795
0
      case 8: {
796
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
797
0
            static_cast< ::google::protobuf::uint8>(65u /* 65 & 0xFF */)) {
798
0
          set_has_datadouble();
799
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
800
0
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
801
0
                 input, &datadouble_)));
802
0
        } else {
803
0
          goto handle_unusual;
804
0
        }
805
0
        break;
806
0
      }
807
808
      // optional float datafloat = 9;
809
0
      case 9: {
810
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
811
0
            static_cast< ::google::protobuf::uint8>(77u /* 77 & 0xFF */)) {
812
0
          set_has_datafloat();
813
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
814
0
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
815
0
                 input, &datafloat_)));
816
0
        } else {
817
0
          goto handle_unusual;
818
0
        }
819
0
        break;
820
0
      }
821
822
      // optional uint32 datau32 = 10;
823
0
      case 10: {
824
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
825
0
            static_cast< ::google::protobuf::uint8>(80u /* 80 & 0xFF */)) {
826
0
          set_has_datau32();
827
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
828
0
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
829
0
                 input, &datau32_)));
830
0
        } else {
831
0
          goto handle_unusual;
832
0
        }
833
0
        break;
834
0
      }
835
836
      // optional uint64 datau64 = 11;
837
0
      case 11: {
838
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
839
0
            static_cast< ::google::protobuf::uint8>(88u /* 88 & 0xFF */)) {
840
0
          set_has_datau64();
841
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
842
0
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
843
0
                 input, &datau64_)));
844
0
        } else {
845
0
          goto handle_unusual;
846
0
        }
847
0
        break;
848
0
      }
849
850
      // optional bool databool = 12;
851
0
      case 12: {
852
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
853
0
            static_cast< ::google::protobuf::uint8>(96u /* 96 & 0xFF */)) {
854
0
          set_has_databool();
855
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
856
0
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
857
0
                 input, &databool_)));
858
0
        } else {
859
0
          goto handle_unusual;
860
0
        }
861
0
        break;
862
0
      }
863
864
      // optional bytes databyte = 13;
865
0
      case 13: {
866
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
867
0
            static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
868
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
869
0
                input, this->mutable_databyte()));
870
0
        } else {
871
0
          goto handle_unusual;
872
0
        }
873
0
        break;
874
0
      }
875
876
      // optional fixed32 datafix32 = 14;
877
0
      case 14: {
878
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
879
0
            static_cast< ::google::protobuf::uint8>(117u /* 117 & 0xFF */)) {
880
0
          set_has_datafix32();
881
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
882
0
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
883
0
                 input, &datafix32_)));
884
0
        } else {
885
0
          goto handle_unusual;
886
0
        }
887
0
        break;
888
0
      }
889
890
      // optional fixed64 datafix64 = 15;
891
0
      case 15: {
892
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
893
0
            static_cast< ::google::protobuf::uint8>(121u /* 121 & 0xFF */)) {
894
0
          set_has_datafix64();
895
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
896
0
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
897
0
                 input, &datafix64_)));
898
0
        } else {
899
0
          goto handle_unusual;
900
0
        }
901
0
        break;
902
0
      }
903
904
      // optional sfixed32 datasfix32 = 16;
905
0
      case 16: {
906
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
907
0
            static_cast< ::google::protobuf::uint8>(133u /* 133 & 0xFF */)) {
908
0
          set_has_datasfix32();
909
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
910
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
911
0
                 input, &datasfix32_)));
912
0
        } else {
913
0
          goto handle_unusual;
914
0
        }
915
0
        break;
916
0
      }
917
918
      // optional sfixed64 datasfix64 = 17;
919
0
      case 17: {
920
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
921
0
            static_cast< ::google::protobuf::uint8>(137u /* 137 & 0xFF */)) {
922
0
          set_has_datasfix64();
923
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
924
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
925
0
                 input, &datasfix64_)));
926
0
        } else {
927
0
          goto handle_unusual;
928
0
        }
929
0
        break;
930
0
      }
931
932
      // optional float datafloat_scientific = 18;
933
0
      case 18: {
934
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
935
0
            static_cast< ::google::protobuf::uint8>(149u /* 149 & 0xFF */)) {
936
0
          set_has_datafloat_scientific();
937
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
938
0
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
939
0
                 input, &datafloat_scientific_)));
940
0
        } else {
941
0
          goto handle_unusual;
942
0
        }
943
0
        break;
944
0
      }
945
946
      // optional double datadouble_scientific = 19;
947
0
      case 19: {
948
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
949
0
            static_cast< ::google::protobuf::uint8>(153u /* 153 & 0xFF */)) {
950
0
          set_has_datadouble_scientific();
951
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
952
0
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
953
0
                 input, &datadouble_scientific_)));
954
0
        } else {
955
0
          goto handle_unusual;
956
0
        }
957
0
        break;
958
0
      }
959
960
0
      default: {
961
0
      handle_unusual:
962
0
        if (tag == 0) {
963
0
          goto success;
964
0
        }
965
0
        if ((800u <= tag && tag < 1608u)) {
966
0
          DO_(_extensions_.ParseField(tag, input,
967
0
              internal_default_instance(),
968
0
              _internal_metadata_.mutable_unknown_fields()));
969
0
          continue;
970
0
        }
971
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
972
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
973
0
        break;
974
0
      }
975
0
    }
976
0
  }
977
0
success:
978
  // @@protoc_insertion_point(parse_success:addressbook.Person)
979
0
  return true;
980
0
failure:
981
  // @@protoc_insertion_point(parse_failure:addressbook.Person)
982
0
  return false;
983
0
#undef DO_
984
0
}
985
986
void Person::SerializeWithCachedSizes(
987
0
    ::google::protobuf::io::CodedOutputStream* output) const {
988
  // @@protoc_insertion_point(serialize_start:addressbook.Person)
989
0
  ::google::protobuf::uint32 cached_has_bits = 0;
990
0
  (void) cached_has_bits;
991
992
0
  cached_has_bits = _has_bits_[0];
993
  // required string name = 1;
994
0
  if (cached_has_bits & 0x00000001u) {
995
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
996
0
      this->name().data(), static_cast<int>(this->name().length()),
997
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
998
0
      "addressbook.Person.name");
999
0
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1000
0
      1, this->name(), output);
1001
0
  }
1002
1003
  // required int32 id = 2;
1004
0
  if (cached_has_bits & 0x00000008u) {
1005
0
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->id(), output);
1006
0
  }
1007
1008
  // optional string email = 3;
1009
0
  if (cached_has_bits & 0x00000002u) {
1010
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1011
0
      this->email().data(), static_cast<int>(this->email().length()),
1012
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1013
0
      "addressbook.Person.email");
1014
0
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1015
0
      3, this->email(), output);
1016
0
  }
1017
1018
  // repeated .addressbook.Person.PhoneNumber phone = 4;
1019
0
  for (unsigned int i = 0,
1020
0
      n = static_cast<unsigned int>(this->phone_size()); i < n; i++) {
1021
0
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1022
0
      4,
1023
0
      this->phone(static_cast<int>(i)),
1024
0
      output);
1025
0
  }
1026
1027
  // optional int64 data = 5;
1028
0
  if (cached_has_bits & 0x00000020u) {
1029
0
    ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->data(), output);
1030
0
  }
1031
1032
  // optional sint32 data32 = 6;
1033
0
  if (cached_has_bits & 0x00000010u) {
1034
0
    ::google::protobuf::internal::WireFormatLite::WriteSInt32(6, this->data32(), output);
1035
0
  }
1036
1037
  // optional sint64 data64 = 7;
1038
0
  if (cached_has_bits & 0x00000040u) {
1039
0
    ::google::protobuf::internal::WireFormatLite::WriteSInt64(7, this->data64(), output);
1040
0
  }
1041
1042
  // required double datadouble = 8;
1043
0
  if (cached_has_bits & 0x00000080u) {
1044
0
    ::google::protobuf::internal::WireFormatLite::WriteDouble(8, this->datadouble(), output);
1045
0
  }
1046
1047
  // optional float datafloat = 9;
1048
0
  if (cached_has_bits & 0x00000100u) {
1049
0
    ::google::protobuf::internal::WireFormatLite::WriteFloat(9, this->datafloat(), output);
1050
0
  }
1051
1052
  // optional uint32 datau32 = 10;
1053
0
  if (cached_has_bits & 0x00000200u) {
1054
0
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(10, this->datau32(), output);
1055
0
  }
1056
1057
  // optional uint64 datau64 = 11;
1058
0
  if (cached_has_bits & 0x00000400u) {
1059
0
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(11, this->datau64(), output);
1060
0
  }
1061
1062
  // optional bool databool = 12;
1063
0
  if (cached_has_bits & 0x00000800u) {
1064
0
    ::google::protobuf::internal::WireFormatLite::WriteBool(12, this->databool(), output);
1065
0
  }
1066
1067
  // optional bytes databyte = 13;
1068
0
  if (cached_has_bits & 0x00000004u) {
1069
0
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
1070
0
      13, this->databyte(), output);
1071
0
  }
1072
1073
  // optional fixed32 datafix32 = 14;
1074
0
  if (cached_has_bits & 0x00001000u) {
1075
0
    ::google::protobuf::internal::WireFormatLite::WriteFixed32(14, this->datafix32(), output);
1076
0
  }
1077
1078
  // optional fixed64 datafix64 = 15;
1079
0
  if (cached_has_bits & 0x00002000u) {
1080
0
    ::google::protobuf::internal::WireFormatLite::WriteFixed64(15, this->datafix64(), output);
1081
0
  }
1082
1083
  // optional sfixed32 datasfix32 = 16;
1084
0
  if (cached_has_bits & 0x00008000u) {
1085
0
    ::google::protobuf::internal::WireFormatLite::WriteSFixed32(16, this->datasfix32(), output);
1086
0
  }
1087
1088
  // optional sfixed64 datasfix64 = 17;
1089
0
  if (cached_has_bits & 0x00004000u) {
1090
0
    ::google::protobuf::internal::WireFormatLite::WriteSFixed64(17, this->datasfix64(), output);
1091
0
  }
1092
1093
  // optional float datafloat_scientific = 18;
1094
0
  if (cached_has_bits & 0x00010000u) {
1095
0
    ::google::protobuf::internal::WireFormatLite::WriteFloat(18, this->datafloat_scientific(), output);
1096
0
  }
1097
1098
  // optional double datadouble_scientific = 19;
1099
0
  if (cached_has_bits & 0x00020000u) {
1100
0
    ::google::protobuf::internal::WireFormatLite::WriteDouble(19, this->datadouble_scientific(), output);
1101
0
  }
1102
1103
  // Extension range [100, 201)
1104
0
  _extensions_.SerializeWithCachedSizes(
1105
0
      100, 201, output);
1106
1107
0
  if (_internal_metadata_.have_unknown_fields()) {
1108
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1109
0
        _internal_metadata_.unknown_fields(), output);
1110
0
  }
1111
  // @@protoc_insertion_point(serialize_end:addressbook.Person)
1112
0
}
1113
1114
::google::protobuf::uint8* Person::InternalSerializeWithCachedSizesToArray(
1115
0
    bool deterministic, ::google::protobuf::uint8* target) const {
1116
0
  (void)deterministic; // Unused
1117
  // @@protoc_insertion_point(serialize_to_array_start:addressbook.Person)
1118
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1119
0
  (void) cached_has_bits;
1120
1121
0
  cached_has_bits = _has_bits_[0];
1122
  // required string name = 1;
1123
0
  if (cached_has_bits & 0x00000001u) {
1124
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1125
0
      this->name().data(), static_cast<int>(this->name().length()),
1126
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1127
0
      "addressbook.Person.name");
1128
0
    target =
1129
0
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1130
0
        1, this->name(), target);
1131
0
  }
1132
1133
  // required int32 id = 2;
1134
0
  if (cached_has_bits & 0x00000008u) {
1135
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->id(), target);
1136
0
  }
1137
1138
  // optional string email = 3;
1139
0
  if (cached_has_bits & 0x00000002u) {
1140
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1141
0
      this->email().data(), static_cast<int>(this->email().length()),
1142
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1143
0
      "addressbook.Person.email");
1144
0
    target =
1145
0
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1146
0
        3, this->email(), target);
1147
0
  }
1148
1149
  // repeated .addressbook.Person.PhoneNumber phone = 4;
1150
0
  for (unsigned int i = 0,
1151
0
      n = static_cast<unsigned int>(this->phone_size()); i < n; i++) {
1152
0
    target = ::google::protobuf::internal::WireFormatLite::
1153
0
      InternalWriteMessageToArray(
1154
0
        4, this->phone(static_cast<int>(i)), deterministic, target);
1155
0
  }
1156
1157
  // optional int64 data = 5;
1158
0
  if (cached_has_bits & 0x00000020u) {
1159
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->data(), target);
1160
0
  }
1161
1162
  // optional sint32 data32 = 6;
1163
0
  if (cached_has_bits & 0x00000010u) {
1164
0
    target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(6, this->data32(), target);
1165
0
  }
1166
1167
  // optional sint64 data64 = 7;
1168
0
  if (cached_has_bits & 0x00000040u) {
1169
0
    target = ::google::protobuf::internal::WireFormatLite::WriteSInt64ToArray(7, this->data64(), target);
1170
0
  }
1171
1172
  // required double datadouble = 8;
1173
0
  if (cached_has_bits & 0x00000080u) {
1174
0
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(8, this->datadouble(), target);
1175
0
  }
1176
1177
  // optional float datafloat = 9;
1178
0
  if (cached_has_bits & 0x00000100u) {
1179
0
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(9, this->datafloat(), target);
1180
0
  }
1181
1182
  // optional uint32 datau32 = 10;
1183
0
  if (cached_has_bits & 0x00000200u) {
1184
0
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(10, this->datau32(), target);
1185
0
  }
1186
1187
  // optional uint64 datau64 = 11;
1188
0
  if (cached_has_bits & 0x00000400u) {
1189
0
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(11, this->datau64(), target);
1190
0
  }
1191
1192
  // optional bool databool = 12;
1193
0
  if (cached_has_bits & 0x00000800u) {
1194
0
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(12, this->databool(), target);
1195
0
  }
1196
1197
  // optional bytes databyte = 13;
1198
0
  if (cached_has_bits & 0x00000004u) {
1199
0
    target =
1200
0
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
1201
0
        13, this->databyte(), target);
1202
0
  }
1203
1204
  // optional fixed32 datafix32 = 14;
1205
0
  if (cached_has_bits & 0x00001000u) {
1206
0
    target = ::google::protobuf::internal::WireFormatLite::WriteFixed32ToArray(14, this->datafix32(), target);
1207
0
  }
1208
1209
  // optional fixed64 datafix64 = 15;
1210
0
  if (cached_has_bits & 0x00002000u) {
1211
0
    target = ::google::protobuf::internal::WireFormatLite::WriteFixed64ToArray(15, this->datafix64(), target);
1212
0
  }
1213
1214
  // optional sfixed32 datasfix32 = 16;
1215
0
  if (cached_has_bits & 0x00008000u) {
1216
0
    target = ::google::protobuf::internal::WireFormatLite::WriteSFixed32ToArray(16, this->datasfix32(), target);
1217
0
  }
1218
1219
  // optional sfixed64 datasfix64 = 17;
1220
0
  if (cached_has_bits & 0x00004000u) {
1221
0
    target = ::google::protobuf::internal::WireFormatLite::WriteSFixed64ToArray(17, this->datasfix64(), target);
1222
0
  }
1223
1224
  // optional float datafloat_scientific = 18;
1225
0
  if (cached_has_bits & 0x00010000u) {
1226
0
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(18, this->datafloat_scientific(), target);
1227
0
  }
1228
1229
  // optional double datadouble_scientific = 19;
1230
0
  if (cached_has_bits & 0x00020000u) {
1231
0
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(19, this->datadouble_scientific(), target);
1232
0
  }
1233
1234
  // Extension range [100, 201)
1235
0
  target = _extensions_.InternalSerializeWithCachedSizesToArray(
1236
0
      100, 201, deterministic, target);
1237
1238
0
  if (_internal_metadata_.have_unknown_fields()) {
1239
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1240
0
        _internal_metadata_.unknown_fields(), target);
1241
0
  }
1242
  // @@protoc_insertion_point(serialize_to_array_end:addressbook.Person)
1243
0
  return target;
1244
0
}
1245
1246
0
size_t Person::RequiredFieldsByteSizeFallback() const {
1247
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:addressbook.Person)
1248
0
  size_t total_size = 0;
1249
1250
0
  if (has_name()) {
1251
    // required string name = 1;
1252
0
    total_size += 1 +
1253
0
      ::google::protobuf::internal::WireFormatLite::StringSize(
1254
0
        this->name());
1255
0
  }
1256
1257
0
  if (has_id()) {
1258
    // required int32 id = 2;
1259
0
    total_size += 1 +
1260
0
      ::google::protobuf::internal::WireFormatLite::Int32Size(
1261
0
        this->id());
1262
0
  }
1263
1264
0
  if (has_datadouble()) {
1265
    // required double datadouble = 8;
1266
0
    total_size += 1 + 8;
1267
0
  }
1268
1269
0
  return total_size;
1270
0
}
1271
0
size_t Person::ByteSizeLong() const {
1272
// @@protoc_insertion_point(message_byte_size_start:addressbook.Person)
1273
0
  size_t total_size = 0;
1274
1275
0
  total_size += _extensions_.ByteSize();
1276
1277
0
  if (_internal_metadata_.have_unknown_fields()) {
1278
0
    total_size +=
1279
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1280
0
        _internal_metadata_.unknown_fields());
1281
0
  }
1282
0
  if (((_has_bits_[0] & 0x00000089) ^ 0x00000089) == 0) {  // All required fields are present.
1283
    // required string name = 1;
1284
0
    total_size += 1 +
1285
0
      ::google::protobuf::internal::WireFormatLite::StringSize(
1286
0
        this->name());
1287
1288
    // required int32 id = 2;
1289
0
    total_size += 1 +
1290
0
      ::google::protobuf::internal::WireFormatLite::Int32Size(
1291
0
        this->id());
1292
1293
    // required double datadouble = 8;
1294
0
    total_size += 1 + 8;
1295
1296
0
  } else {
1297
0
    total_size += RequiredFieldsByteSizeFallback();
1298
0
  }
1299
  // repeated .addressbook.Person.PhoneNumber phone = 4;
1300
0
  {
1301
0
    unsigned int count = static_cast<unsigned int>(this->phone_size());
1302
0
    total_size += 1UL * count;
1303
0
    for (unsigned int i = 0; i < count; i++) {
1304
0
      total_size +=
1305
0
        ::google::protobuf::internal::WireFormatLite::MessageSize(
1306
0
          this->phone(static_cast<int>(i)));
1307
0
    }
1308
0
  }
1309
1310
0
  if (_has_bits_[0 / 32] & 6u) {
1311
    // optional string email = 3;
1312
0
    if (has_email()) {
1313
0
      total_size += 1 +
1314
0
        ::google::protobuf::internal::WireFormatLite::StringSize(
1315
0
          this->email());
1316
0
    }
1317
1318
    // optional bytes databyte = 13;
1319
0
    if (has_databyte()) {
1320
0
      total_size += 1 +
1321
0
        ::google::protobuf::internal::WireFormatLite::BytesSize(
1322
0
          this->databyte());
1323
0
    }
1324
1325
0
  }
1326
0
  if (_has_bits_[0 / 32] & 112u) {
1327
    // optional sint32 data32 = 6;
1328
0
    if (has_data32()) {
1329
0
      total_size += 1 +
1330
0
        ::google::protobuf::internal::WireFormatLite::SInt32Size(
1331
0
          this->data32());
1332
0
    }
1333
1334
    // optional int64 data = 5;
1335
0
    if (has_data()) {
1336
0
      total_size += 1 +
1337
0
        ::google::protobuf::internal::WireFormatLite::Int64Size(
1338
0
          this->data());
1339
0
    }
1340
1341
    // optional sint64 data64 = 7;
1342
0
    if (has_data64()) {
1343
0
      total_size += 1 +
1344
0
        ::google::protobuf::internal::WireFormatLite::SInt64Size(
1345
0
          this->data64());
1346
0
    }
1347
1348
0
  }
1349
0
  if (_has_bits_[8 / 32] & 65280u) {
1350
    // optional float datafloat = 9;
1351
0
    if (has_datafloat()) {
1352
0
      total_size += 1 + 4;
1353
0
    }
1354
1355
    // optional uint32 datau32 = 10;
1356
0
    if (has_datau32()) {
1357
0
      total_size += 1 +
1358
0
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
1359
0
          this->datau32());
1360
0
    }
1361
1362
    // optional uint64 datau64 = 11;
1363
0
    if (has_datau64()) {
1364
0
      total_size += 1 +
1365
0
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
1366
0
          this->datau64());
1367
0
    }
1368
1369
    // optional bool databool = 12;
1370
0
    if (has_databool()) {
1371
0
      total_size += 1 + 1;
1372
0
    }
1373
1374
    // optional fixed32 datafix32 = 14;
1375
0
    if (has_datafix32()) {
1376
0
      total_size += 1 + 4;
1377
0
    }
1378
1379
    // optional fixed64 datafix64 = 15;
1380
0
    if (has_datafix64()) {
1381
0
      total_size += 1 + 8;
1382
0
    }
1383
1384
    // optional sfixed64 datasfix64 = 17;
1385
0
    if (has_datasfix64()) {
1386
0
      total_size += 2 + 8;
1387
0
    }
1388
1389
    // optional sfixed32 datasfix32 = 16;
1390
0
    if (has_datasfix32()) {
1391
0
      total_size += 2 + 4;
1392
0
    }
1393
1394
0
  }
1395
0
  if (_has_bits_[16 / 32] & 196608u) {
1396
    // optional float datafloat_scientific = 18;
1397
0
    if (has_datafloat_scientific()) {
1398
0
      total_size += 2 + 4;
1399
0
    }
1400
1401
    // optional double datadouble_scientific = 19;
1402
0
    if (has_datadouble_scientific()) {
1403
0
      total_size += 2 + 8;
1404
0
    }
1405
1406
0
  }
1407
0
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1408
0
  SetCachedSize(cached_size);
1409
0
  return total_size;
1410
0
}
1411
1412
0
void Person::MergeFrom(const ::google::protobuf::Message& from) {
1413
// @@protoc_insertion_point(generalized_merge_from_start:addressbook.Person)
1414
0
  GOOGLE_DCHECK_NE(&from, this);
1415
0
  const Person* source =
1416
0
      ::google::protobuf::internal::DynamicCastToGenerated<const Person>(
1417
0
          &from);
1418
0
  if (source == NULL) {
1419
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:addressbook.Person)
1420
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1421
0
  } else {
1422
  // @@protoc_insertion_point(generalized_merge_from_cast_success:addressbook.Person)
1423
0
    MergeFrom(*source);
1424
0
  }
1425
0
}
1426
1427
0
void Person::MergeFrom(const Person& from) {
1428
// @@protoc_insertion_point(class_specific_merge_from_start:addressbook.Person)
1429
0
  GOOGLE_DCHECK_NE(&from, this);
1430
0
  _extensions_.MergeFrom(from._extensions_);
1431
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
1432
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1433
0
  (void) cached_has_bits;
1434
1435
0
  phone_.MergeFrom(from.phone_);
1436
0
  cached_has_bits = from._has_bits_[0];
1437
0
  if (cached_has_bits & 255u) {
1438
0
    if (cached_has_bits & 0x00000001u) {
1439
0
      set_has_name();
1440
0
      name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
1441
0
    }
1442
0
    if (cached_has_bits & 0x00000002u) {
1443
0
      set_has_email();
1444
0
      email_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.email_);
1445
0
    }
1446
0
    if (cached_has_bits & 0x00000004u) {
1447
0
      set_has_databyte();
1448
0
      databyte_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.databyte_);
1449
0
    }
1450
0
    if (cached_has_bits & 0x00000008u) {
1451
0
      id_ = from.id_;
1452
0
    }
1453
0
    if (cached_has_bits & 0x00000010u) {
1454
0
      data32_ = from.data32_;
1455
0
    }
1456
0
    if (cached_has_bits & 0x00000020u) {
1457
0
      data_ = from.data_;
1458
0
    }
1459
0
    if (cached_has_bits & 0x00000040u) {
1460
0
      data64_ = from.data64_;
1461
0
    }
1462
0
    if (cached_has_bits & 0x00000080u) {
1463
0
      datadouble_ = from.datadouble_;
1464
0
    }
1465
0
    _has_bits_[0] |= cached_has_bits;
1466
0
  }
1467
0
  if (cached_has_bits & 65280u) {
1468
0
    if (cached_has_bits & 0x00000100u) {
1469
0
      datafloat_ = from.datafloat_;
1470
0
    }
1471
0
    if (cached_has_bits & 0x00000200u) {
1472
0
      datau32_ = from.datau32_;
1473
0
    }
1474
0
    if (cached_has_bits & 0x00000400u) {
1475
0
      datau64_ = from.datau64_;
1476
0
    }
1477
0
    if (cached_has_bits & 0x00000800u) {
1478
0
      databool_ = from.databool_;
1479
0
    }
1480
0
    if (cached_has_bits & 0x00001000u) {
1481
0
      datafix32_ = from.datafix32_;
1482
0
    }
1483
0
    if (cached_has_bits & 0x00002000u) {
1484
0
      datafix64_ = from.datafix64_;
1485
0
    }
1486
0
    if (cached_has_bits & 0x00004000u) {
1487
0
      datasfix64_ = from.datasfix64_;
1488
0
    }
1489
0
    if (cached_has_bits & 0x00008000u) {
1490
0
      datasfix32_ = from.datasfix32_;
1491
0
    }
1492
0
    _has_bits_[0] |= cached_has_bits;
1493
0
  }
1494
0
  if (cached_has_bits & 196608u) {
1495
0
    if (cached_has_bits & 0x00010000u) {
1496
0
      datafloat_scientific_ = from.datafloat_scientific_;
1497
0
    }
1498
0
    if (cached_has_bits & 0x00020000u) {
1499
0
      datadouble_scientific_ = from.datadouble_scientific_;
1500
0
    }
1501
0
    _has_bits_[0] |= cached_has_bits;
1502
0
  }
1503
0
}
1504
1505
0
void Person::CopyFrom(const ::google::protobuf::Message& from) {
1506
// @@protoc_insertion_point(generalized_copy_from_start:addressbook.Person)
1507
0
  if (&from == this) return;
1508
0
  Clear();
1509
0
  MergeFrom(from);
1510
0
}
1511
1512
0
void Person::CopyFrom(const Person& from) {
1513
// @@protoc_insertion_point(class_specific_copy_from_start:addressbook.Person)
1514
0
  if (&from == this) return;
1515
0
  Clear();
1516
0
  MergeFrom(from);
1517
0
}
1518
1519
0
bool Person::IsInitialized() const {
1520
0
  if (!_extensions_.IsInitialized()) {
1521
0
    return false;
1522
0
  }
1523
1524
0
  if ((_has_bits_[0] & 0x00000089) != 0x00000089) return false;
1525
0
  if (!::google::protobuf::internal::AllAreInitialized(this->phone())) return false;
1526
0
  return true;
1527
0
}
1528
1529
0
void Person::Swap(Person* other) {
1530
0
  if (other == this) return;
1531
0
  InternalSwap(other);
1532
0
}
1533
0
void Person::InternalSwap(Person* other) {
1534
0
  using std::swap;
1535
0
  CastToBase(&phone_)->InternalSwap(CastToBase(&other->phone_));
1536
0
  name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1537
0
    GetArenaNoVirtual());
1538
0
  email_.Swap(&other->email_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1539
0
    GetArenaNoVirtual());
1540
0
  databyte_.Swap(&other->databyte_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1541
0
    GetArenaNoVirtual());
1542
0
  swap(id_, other->id_);
1543
0
  swap(data32_, other->data32_);
1544
0
  swap(data_, other->data_);
1545
0
  swap(data64_, other->data64_);
1546
0
  swap(datadouble_, other->datadouble_);
1547
0
  swap(datafloat_, other->datafloat_);
1548
0
  swap(datau32_, other->datau32_);
1549
0
  swap(datau64_, other->datau64_);
1550
0
  swap(databool_, other->databool_);
1551
0
  swap(datafix32_, other->datafix32_);
1552
0
  swap(datafix64_, other->datafix64_);
1553
0
  swap(datasfix64_, other->datasfix64_);
1554
0
  swap(datasfix32_, other->datasfix32_);
1555
0
  swap(datafloat_scientific_, other->datafloat_scientific_);
1556
0
  swap(datadouble_scientific_, other->datadouble_scientific_);
1557
0
  swap(_has_bits_[0], other->_has_bits_[0]);
1558
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
1559
0
  _extensions_.Swap(&other->_extensions_);
1560
0
}
1561
1562
0
::google::protobuf::Metadata Person::GetMetadata() const {
1563
0
  protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
1564
0
  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
1565
0
}
1566
1567
1568
// ===================================================================
1569
1570
2
void AddressBook::InitAsDefaultInstance() {
1571
2
}
1572
#if !defined(_MSC_VER) || _MSC_VER >= 1900
1573
const int AddressBook::kPersonFieldNumber;
1574
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
1575
1576
AddressBook::AddressBook()
1577
2
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
1578
2
  ::google::protobuf::internal::InitSCC(
1579
2
      &protobuf_addressbook_2eproto::scc_info_AddressBook.base);
1580
2
  SharedCtor();
1581
  // @@protoc_insertion_point(constructor:addressbook.AddressBook)
1582
2
}
1583
AddressBook::AddressBook(const AddressBook& from)
1584
0
  : ::google::protobuf::Message(),
1585
0
      _internal_metadata_(NULL),
1586
0
      _has_bits_(from._has_bits_),
1587
0
      person_(from.person_) {
1588
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
1589
  // @@protoc_insertion_point(copy_constructor:addressbook.AddressBook)
1590
0
}
1591
1592
2
void AddressBook::SharedCtor() {
1593
2
}
1594
1595
0
AddressBook::~AddressBook() {
1596
  // @@protoc_insertion_point(destructor:addressbook.AddressBook)
1597
0
  SharedDtor();
1598
0
}
1599
1600
0
void AddressBook::SharedDtor() {
1601
0
}
1602
1603
0
void AddressBook::SetCachedSize(int size) const {
1604
0
  _cached_size_.Set(size);
1605
0
}
1606
0
const ::google::protobuf::Descriptor* AddressBook::descriptor() {
1607
0
  ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
1608
0
  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
1609
0
}
1610
1611
0
const AddressBook& AddressBook::default_instance() {
1612
0
  ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_AddressBook.base);
1613
0
  return *internal_default_instance();
1614
0
}
1615
1616
1617
0
void AddressBook::Clear() {
1618
// @@protoc_insertion_point(message_clear_start:addressbook.AddressBook)
1619
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1620
  // Prevent compiler warnings about cached_has_bits being unused
1621
0
  (void) cached_has_bits;
1622
1623
0
  person_.Clear();
1624
0
  _has_bits_.Clear();
1625
0
  _internal_metadata_.Clear();
1626
0
}
1627
1628
bool AddressBook::MergePartialFromCodedStream(
1629
0
    ::google::protobuf::io::CodedInputStream* input) {
1630
0
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
1631
0
  ::google::protobuf::uint32 tag;
1632
  // @@protoc_insertion_point(parse_start:addressbook.AddressBook)
1633
0
  for (;;) {
1634
0
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1635
0
    tag = p.first;
1636
0
    if (!p.second) goto handle_unusual;
1637
0
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1638
      // repeated .addressbook.Person person = 1;
1639
0
      case 1: {
1640
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1641
0
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
1642
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
1643
0
                input, add_person()));
1644
0
        } else {
1645
0
          goto handle_unusual;
1646
0
        }
1647
0
        break;
1648
0
      }
1649
1650
0
      default: {
1651
0
      handle_unusual:
1652
0
        if (tag == 0) {
1653
0
          goto success;
1654
0
        }
1655
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
1656
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
1657
0
        break;
1658
0
      }
1659
0
    }
1660
0
  }
1661
0
success:
1662
  // @@protoc_insertion_point(parse_success:addressbook.AddressBook)
1663
0
  return true;
1664
0
failure:
1665
  // @@protoc_insertion_point(parse_failure:addressbook.AddressBook)
1666
0
  return false;
1667
0
#undef DO_
1668
0
}
1669
1670
void AddressBook::SerializeWithCachedSizes(
1671
0
    ::google::protobuf::io::CodedOutputStream* output) const {
1672
  // @@protoc_insertion_point(serialize_start:addressbook.AddressBook)
1673
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1674
0
  (void) cached_has_bits;
1675
1676
  // repeated .addressbook.Person person = 1;
1677
0
  for (unsigned int i = 0,
1678
0
      n = static_cast<unsigned int>(this->person_size()); i < n; i++) {
1679
0
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1680
0
      1,
1681
0
      this->person(static_cast<int>(i)),
1682
0
      output);
1683
0
  }
1684
1685
0
  if (_internal_metadata_.have_unknown_fields()) {
1686
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1687
0
        _internal_metadata_.unknown_fields(), output);
1688
0
  }
1689
  // @@protoc_insertion_point(serialize_end:addressbook.AddressBook)
1690
0
}
1691
1692
::google::protobuf::uint8* AddressBook::InternalSerializeWithCachedSizesToArray(
1693
0
    bool deterministic, ::google::protobuf::uint8* target) const {
1694
0
  (void)deterministic; // Unused
1695
  // @@protoc_insertion_point(serialize_to_array_start:addressbook.AddressBook)
1696
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1697
0
  (void) cached_has_bits;
1698
1699
  // repeated .addressbook.Person person = 1;
1700
0
  for (unsigned int i = 0,
1701
0
      n = static_cast<unsigned int>(this->person_size()); i < n; i++) {
1702
0
    target = ::google::protobuf::internal::WireFormatLite::
1703
0
      InternalWriteMessageToArray(
1704
0
        1, this->person(static_cast<int>(i)), deterministic, target);
1705
0
  }
1706
1707
0
  if (_internal_metadata_.have_unknown_fields()) {
1708
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1709
0
        _internal_metadata_.unknown_fields(), target);
1710
0
  }
1711
  // @@protoc_insertion_point(serialize_to_array_end:addressbook.AddressBook)
1712
0
  return target;
1713
0
}
1714
1715
0
size_t AddressBook::ByteSizeLong() const {
1716
// @@protoc_insertion_point(message_byte_size_start:addressbook.AddressBook)
1717
0
  size_t total_size = 0;
1718
1719
0
  if (_internal_metadata_.have_unknown_fields()) {
1720
0
    total_size +=
1721
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1722
0
        _internal_metadata_.unknown_fields());
1723
0
  }
1724
  // repeated .addressbook.Person person = 1;
1725
0
  {
1726
0
    unsigned int count = static_cast<unsigned int>(this->person_size());
1727
0
    total_size += 1UL * count;
1728
0
    for (unsigned int i = 0; i < count; i++) {
1729
0
      total_size +=
1730
0
        ::google::protobuf::internal::WireFormatLite::MessageSize(
1731
0
          this->person(static_cast<int>(i)));
1732
0
    }
1733
0
  }
1734
1735
0
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1736
0
  SetCachedSize(cached_size);
1737
0
  return total_size;
1738
0
}
1739
1740
0
void AddressBook::MergeFrom(const ::google::protobuf::Message& from) {
1741
// @@protoc_insertion_point(generalized_merge_from_start:addressbook.AddressBook)
1742
0
  GOOGLE_DCHECK_NE(&from, this);
1743
0
  const AddressBook* source =
1744
0
      ::google::protobuf::internal::DynamicCastToGenerated<const AddressBook>(
1745
0
          &from);
1746
0
  if (source == NULL) {
1747
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:addressbook.AddressBook)
1748
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1749
0
  } else {
1750
  // @@protoc_insertion_point(generalized_merge_from_cast_success:addressbook.AddressBook)
1751
0
    MergeFrom(*source);
1752
0
  }
1753
0
}
1754
1755
0
void AddressBook::MergeFrom(const AddressBook& from) {
1756
// @@protoc_insertion_point(class_specific_merge_from_start:addressbook.AddressBook)
1757
0
  GOOGLE_DCHECK_NE(&from, this);
1758
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
1759
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1760
0
  (void) cached_has_bits;
1761
1762
0
  person_.MergeFrom(from.person_);
1763
0
}
1764
1765
0
void AddressBook::CopyFrom(const ::google::protobuf::Message& from) {
1766
// @@protoc_insertion_point(generalized_copy_from_start:addressbook.AddressBook)
1767
0
  if (&from == this) return;
1768
0
  Clear();
1769
0
  MergeFrom(from);
1770
0
}
1771
1772
0
void AddressBook::CopyFrom(const AddressBook& from) {
1773
// @@protoc_insertion_point(class_specific_copy_from_start:addressbook.AddressBook)
1774
0
  if (&from == this) return;
1775
0
  Clear();
1776
0
  MergeFrom(from);
1777
0
}
1778
1779
0
bool AddressBook::IsInitialized() const {
1780
0
  if (!::google::protobuf::internal::AllAreInitialized(this->person())) return false;
1781
0
  return true;
1782
0
}
1783
1784
0
void AddressBook::Swap(AddressBook* other) {
1785
0
  if (other == this) return;
1786
0
  InternalSwap(other);
1787
0
}
1788
0
void AddressBook::InternalSwap(AddressBook* other) {
1789
0
  using std::swap;
1790
0
  CastToBase(&person_)->InternalSwap(CastToBase(&other->person_));
1791
0
  swap(_has_bits_[0], other->_has_bits_[0]);
1792
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
1793
0
}
1794
1795
0
::google::protobuf::Metadata AddressBook::GetMetadata() const {
1796
0
  protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
1797
0
  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
1798
0
}
1799
1800
const ::std::string hobby_default("");
1801
::google::protobuf::internal::ExtensionIdentifier< ::addressbook::Person,
1802
    ::google::protobuf::internal::StringTypeTraits, 9, false >
1803
  hobby(kHobbyFieldNumber, hobby_default);
1804
1805
// @@protoc_insertion_point(namespace_scope)
1806
}  // namespace addressbook
1807
namespace google {
1808
namespace protobuf {
1809
0
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::addressbook::Person_PhoneNumber* Arena::CreateMaybeMessage< ::addressbook::Person_PhoneNumber >(Arena* arena) {
1810
0
  return Arena::CreateInternal< ::addressbook::Person_PhoneNumber >(arena);
1811
0
}
1812
0
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::addressbook::Person* Arena::CreateMaybeMessage< ::addressbook::Person >(Arena* arena) {
1813
0
  return Arena::CreateInternal< ::addressbook::Person >(arena);
1814
0
}
1815
0
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::addressbook::AddressBook* Arena::CreateMaybeMessage< ::addressbook::AddressBook >(Arena* arena) {
1816
0
  return Arena::CreateInternal< ::addressbook::AddressBook >(arena);
1817
0
}
1818
}  // namespace protobuf
1819
}  // namespace google
1820
1821
// @@protoc_insertion_point(global_scope)