|
@@ -1,2599 +0,0 @@
|
|
|
-// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
|
-// source: addressbook.proto
|
|
|
-
|
|
|
-#include "addressbook.pb.h"
|
|
|
-
|
|
|
-#include <algorithm>
|
|
|
-
|
|
|
-#include <google/protobuf/stubs/common.h>
|
|
|
-#include <google/protobuf/stubs/port.h>
|
|
|
-#include <google/protobuf/io/coded_stream.h>
|
|
|
-#include <google/protobuf/wire_format_lite_inl.h>
|
|
|
-#include <google/protobuf/descriptor.h>
|
|
|
-#include <google/protobuf/generated_message_reflection.h>
|
|
|
-#include <google/protobuf/reflection_ops.h>
|
|
|
-#include <google/protobuf/wire_format.h>
|
|
|
-// This is a temporary google only hack
|
|
|
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
|
|
|
-#include "third_party/protobuf/version.h"
|
|
|
-#endif
|
|
|
-// @@protoc_insertion_point(includes)
|
|
|
-
|
|
|
-namespace protobuf_addressbook_2eproto {
|
|
|
-extern PROTOBUF_INTERNAL_EXPORT_protobuf_addressbook_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Address;
|
|
|
-extern PROTOBUF_INTERNAL_EXPORT_protobuf_addressbook_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PhoneNumber;
|
|
|
-extern PROTOBUF_INTERNAL_EXPORT_protobuf_addressbook_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Job;
|
|
|
-extern PROTOBUF_INTERNAL_EXPORT_protobuf_addressbook_2eproto ::google::protobuf::internal::SCCInfo<3> scc_info_Contact;
|
|
|
-} // namespace protobuf_addressbook_2eproto
|
|
|
-namespace qtprotobuf {
|
|
|
-namespace examples {
|
|
|
-class PhoneNumberDefaultTypeInternal {
|
|
|
- public:
|
|
|
- ::google::protobuf::internal::ExplicitlyConstructed<PhoneNumber>
|
|
|
- _instance;
|
|
|
-} _PhoneNumber_default_instance_;
|
|
|
-class AddressDefaultTypeInternal {
|
|
|
- public:
|
|
|
- ::google::protobuf::internal::ExplicitlyConstructed<Address>
|
|
|
- _instance;
|
|
|
-} _Address_default_instance_;
|
|
|
-class JobDefaultTypeInternal {
|
|
|
- public:
|
|
|
- ::google::protobuf::internal::ExplicitlyConstructed<Job>
|
|
|
- _instance;
|
|
|
-} _Job_default_instance_;
|
|
|
-class ContactDefaultTypeInternal {
|
|
|
- public:
|
|
|
- ::google::protobuf::internal::ExplicitlyConstructed<Contact>
|
|
|
- _instance;
|
|
|
-} _Contact_default_instance_;
|
|
|
-class ContactsDefaultTypeInternal {
|
|
|
- public:
|
|
|
- ::google::protobuf::internal::ExplicitlyConstructed<Contacts>
|
|
|
- _instance;
|
|
|
-} _Contacts_default_instance_;
|
|
|
-class SimpleResultDefaultTypeInternal {
|
|
|
- public:
|
|
|
- ::google::protobuf::internal::ExplicitlyConstructed<SimpleResult>
|
|
|
- _instance;
|
|
|
-} _SimpleResult_default_instance_;
|
|
|
-class ListFrameDefaultTypeInternal {
|
|
|
- public:
|
|
|
- ::google::protobuf::internal::ExplicitlyConstructed<ListFrame>
|
|
|
- _instance;
|
|
|
-} _ListFrame_default_instance_;
|
|
|
-} // namespace examples
|
|
|
-} // namespace qtprotobuf
|
|
|
-namespace protobuf_addressbook_2eproto {
|
|
|
-static void InitDefaultsPhoneNumber() {
|
|
|
- GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
-
|
|
|
- {
|
|
|
- void* ptr = &::qtprotobuf::examples::_PhoneNumber_default_instance_;
|
|
|
- new (ptr) ::qtprotobuf::examples::PhoneNumber();
|
|
|
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
|
- }
|
|
|
- ::qtprotobuf::examples::PhoneNumber::InitAsDefaultInstance();
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::internal::SCCInfo<0> scc_info_PhoneNumber =
|
|
|
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPhoneNumber}, {}};
|
|
|
-
|
|
|
-static void InitDefaultsAddress() {
|
|
|
- GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
-
|
|
|
- {
|
|
|
- void* ptr = &::qtprotobuf::examples::_Address_default_instance_;
|
|
|
- new (ptr) ::qtprotobuf::examples::Address();
|
|
|
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
|
- }
|
|
|
- ::qtprotobuf::examples::Address::InitAsDefaultInstance();
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::internal::SCCInfo<0> scc_info_Address =
|
|
|
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAddress}, {}};
|
|
|
-
|
|
|
-static void InitDefaultsJob() {
|
|
|
- GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
-
|
|
|
- {
|
|
|
- void* ptr = &::qtprotobuf::examples::_Job_default_instance_;
|
|
|
- new (ptr) ::qtprotobuf::examples::Job();
|
|
|
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
|
- }
|
|
|
- ::qtprotobuf::examples::Job::InitAsDefaultInstance();
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::internal::SCCInfo<1> scc_info_Job =
|
|
|
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsJob}, {
|
|
|
- &protobuf_addressbook_2eproto::scc_info_Address.base,}};
|
|
|
-
|
|
|
-static void InitDefaultsContact() {
|
|
|
- GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
-
|
|
|
- {
|
|
|
- void* ptr = &::qtprotobuf::examples::_Contact_default_instance_;
|
|
|
- new (ptr) ::qtprotobuf::examples::Contact();
|
|
|
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
|
- }
|
|
|
- ::qtprotobuf::examples::Contact::InitAsDefaultInstance();
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::internal::SCCInfo<3> scc_info_Contact =
|
|
|
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsContact}, {
|
|
|
- &protobuf_addressbook_2eproto::scc_info_PhoneNumber.base,
|
|
|
- &protobuf_addressbook_2eproto::scc_info_Address.base,
|
|
|
- &protobuf_addressbook_2eproto::scc_info_Job.base,}};
|
|
|
-
|
|
|
-static void InitDefaultsContacts() {
|
|
|
- GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
-
|
|
|
- {
|
|
|
- void* ptr = &::qtprotobuf::examples::_Contacts_default_instance_;
|
|
|
- new (ptr) ::qtprotobuf::examples::Contacts();
|
|
|
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
|
- }
|
|
|
- ::qtprotobuf::examples::Contacts::InitAsDefaultInstance();
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::internal::SCCInfo<1> scc_info_Contacts =
|
|
|
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsContacts}, {
|
|
|
- &protobuf_addressbook_2eproto::scc_info_Contact.base,}};
|
|
|
-
|
|
|
-static void InitDefaultsSimpleResult() {
|
|
|
- GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
-
|
|
|
- {
|
|
|
- void* ptr = &::qtprotobuf::examples::_SimpleResult_default_instance_;
|
|
|
- new (ptr) ::qtprotobuf::examples::SimpleResult();
|
|
|
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
|
- }
|
|
|
- ::qtprotobuf::examples::SimpleResult::InitAsDefaultInstance();
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::internal::SCCInfo<0> scc_info_SimpleResult =
|
|
|
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleResult}, {}};
|
|
|
-
|
|
|
-static void InitDefaultsListFrame() {
|
|
|
- GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
-
|
|
|
- {
|
|
|
- void* ptr = &::qtprotobuf::examples::_ListFrame_default_instance_;
|
|
|
- new (ptr) ::qtprotobuf::examples::ListFrame();
|
|
|
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
|
- }
|
|
|
- ::qtprotobuf::examples::ListFrame::InitAsDefaultInstance();
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::internal::SCCInfo<0> scc_info_ListFrame =
|
|
|
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsListFrame}, {}};
|
|
|
-
|
|
|
-void InitDefaults() {
|
|
|
- ::google::protobuf::internal::InitSCC(&scc_info_PhoneNumber.base);
|
|
|
- ::google::protobuf::internal::InitSCC(&scc_info_Address.base);
|
|
|
- ::google::protobuf::internal::InitSCC(&scc_info_Job.base);
|
|
|
- ::google::protobuf::internal::InitSCC(&scc_info_Contact.base);
|
|
|
- ::google::protobuf::internal::InitSCC(&scc_info_Contacts.base);
|
|
|
- ::google::protobuf::internal::InitSCC(&scc_info_SimpleResult.base);
|
|
|
- ::google::protobuf::internal::InitSCC(&scc_info_ListFrame.base);
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::Metadata file_level_metadata[7];
|
|
|
-const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
|
|
|
-
|
|
|
-const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
|
- ~0u, // no _has_bits_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::PhoneNumber, _internal_metadata_),
|
|
|
- ~0u, // no _extensions_
|
|
|
- ~0u, // no _oneof_case_
|
|
|
- ~0u, // no _weak_field_map_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::PhoneNumber, countrycode_),
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::PhoneNumber, number_),
|
|
|
- ~0u, // no _has_bits_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Address, _internal_metadata_),
|
|
|
- ~0u, // no _extensions_
|
|
|
- ~0u, // no _oneof_case_
|
|
|
- ~0u, // no _weak_field_map_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Address, zipcode_),
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Address, streetaddress1_),
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Address, streetaddress2_),
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Address, state_),
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Address, country_),
|
|
|
- ~0u, // no _has_bits_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Job, _internal_metadata_),
|
|
|
- ~0u, // no _extensions_
|
|
|
- ~0u, // no _oneof_case_
|
|
|
- ~0u, // no _weak_field_map_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Job, title_),
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Job, officeaddress_),
|
|
|
- ~0u, // no _has_bits_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact, _internal_metadata_),
|
|
|
- ~0u, // no _extensions_
|
|
|
- ~0u, // no _oneof_case_
|
|
|
- ~0u, // no _weak_field_map_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact, firstname_),
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact, lastname_),
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact, middlename_),
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact, phones_),
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact, address_),
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact, job_),
|
|
|
- ~0u, // no _has_bits_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contacts, _internal_metadata_),
|
|
|
- ~0u, // no _extensions_
|
|
|
- ~0u, // no _oneof_case_
|
|
|
- ~0u, // no _weak_field_map_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contacts, list_),
|
|
|
- ~0u, // no _has_bits_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::SimpleResult, _internal_metadata_),
|
|
|
- ~0u, // no _extensions_
|
|
|
- ~0u, // no _oneof_case_
|
|
|
- ~0u, // no _weak_field_map_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::SimpleResult, ok_),
|
|
|
- ~0u, // no _has_bits_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::ListFrame, _internal_metadata_),
|
|
|
- ~0u, // no _extensions_
|
|
|
- ~0u, // no _oneof_case_
|
|
|
- ~0u, // no _weak_field_map_
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::ListFrame, start_),
|
|
|
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::ListFrame, end_),
|
|
|
-};
|
|
|
-static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
|
- { 0, -1, sizeof(::qtprotobuf::examples::PhoneNumber)},
|
|
|
- { 7, -1, sizeof(::qtprotobuf::examples::Address)},
|
|
|
- { 17, -1, sizeof(::qtprotobuf::examples::Job)},
|
|
|
- { 24, -1, sizeof(::qtprotobuf::examples::Contact)},
|
|
|
- { 35, -1, sizeof(::qtprotobuf::examples::Contacts)},
|
|
|
- { 41, -1, sizeof(::qtprotobuf::examples::SimpleResult)},
|
|
|
- { 47, -1, sizeof(::qtprotobuf::examples::ListFrame)},
|
|
|
-};
|
|
|
-
|
|
|
-static ::google::protobuf::Message const * const file_default_instances[] = {
|
|
|
- reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_PhoneNumber_default_instance_),
|
|
|
- reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_Address_default_instance_),
|
|
|
- reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_Job_default_instance_),
|
|
|
- reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_Contact_default_instance_),
|
|
|
- reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_Contacts_default_instance_),
|
|
|
- reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_SimpleResult_default_instance_),
|
|
|
- reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_ListFrame_default_instance_),
|
|
|
-};
|
|
|
-
|
|
|
-void protobuf_AssignDescriptors() {
|
|
|
- AddDescriptors();
|
|
|
- AssignDescriptors(
|
|
|
- "addressbook.proto", schemas, file_default_instances, TableStruct::offsets,
|
|
|
- file_level_metadata, file_level_enum_descriptors, NULL);
|
|
|
-}
|
|
|
-
|
|
|
-void protobuf_AssignDescriptorsOnce() {
|
|
|
- static ::google::protobuf::internal::once_flag once;
|
|
|
- ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
|
|
|
-}
|
|
|
-
|
|
|
-void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
|
|
|
-void protobuf_RegisterTypes(const ::std::string&) {
|
|
|
- protobuf_AssignDescriptorsOnce();
|
|
|
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 7);
|
|
|
-}
|
|
|
-
|
|
|
-void AddDescriptorsImpl() {
|
|
|
- InitDefaults();
|
|
|
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
|
- "\n\021addressbook.proto\022\023qtprotobuf.examples"
|
|
|
- "\"2\n\013PhoneNumber\022\023\n\013countryCode\030\001 \001(\r\022\016\n\006"
|
|
|
- "number\030\002 \001(\004\"j\n\007Address\022\017\n\007zipCode\030\001 \001(\004"
|
|
|
- "\022\026\n\016streetAddress1\030\002 \001(\t\022\026\n\016streetAddres"
|
|
|
- "s2\030\003 \001(\t\022\r\n\005state\030\004 \001(\t\022\017\n\007country\030\005 \001(\r"
|
|
|
- "\"I\n\003Job\022\r\n\005title\030\001 \001(\t\0223\n\rofficeAddress\030"
|
|
|
- "\002 \001(\0132\034.qtprotobuf.examples.Address\"\202\002\n\007"
|
|
|
- "Contact\022\021\n\tfirstName\030\001 \001(\t\022\020\n\010lastName\030\002"
|
|
|
- " \001(\t\022\022\n\nmiddleName\030\003 \001(\t\0220\n\006phones\030\004 \003(\013"
|
|
|
- "2 .qtprotobuf.examples.PhoneNumber\022-\n\007ad"
|
|
|
- "dress\030\005 \001(\0132\034.qtprotobuf.examples.Addres"
|
|
|
- "s\022%\n\003job\030\006 \001(\0132\030.qtprotobuf.examples.Job"
|
|
|
- "\"6\n\tPhoneType\022\010\n\004Home\020\000\022\010\n\004Work\020\001\022\n\n\006Mob"
|
|
|
- "ile\020\002\022\t\n\005Other\020\003\"6\n\010Contacts\022*\n\004list\030\001 \003"
|
|
|
- "(\0132\034.qtprotobuf.examples.Contact\"\032\n\014Simp"
|
|
|
- "leResult\022\n\n\002ok\030\001 \001(\010\"\'\n\tListFrame\022\r\n\005sta"
|
|
|
- "rt\030\001 \001(\021\022\013\n\003end\030\002 \001(\0212\231\003\n\013AddressBook\022K\n"
|
|
|
- "\naddContact\022\034.qtprotobuf.examples.Contac"
|
|
|
- "t\032\035.qtprotobuf.examples.Contacts\"\000\022N\n\rre"
|
|
|
- "moveContact\022\034.qtprotobuf.examples.Contac"
|
|
|
- "t\032\035.qtprotobuf.examples.Contacts\"\000\022M\n\010co"
|
|
|
- "ntacts\022\036.qtprotobuf.examples.ListFrame\032\035"
|
|
|
- ".qtprotobuf.examples.Contacts\"\0000\001\022M\n\010mak"
|
|
|
- "eCall\022\034.qtprotobuf.examples.Contact\032!.qt"
|
|
|
- "protobuf.examples.SimpleResult\"\000\022O\n\nnavi"
|
|
|
- "gateTo\022\034.qtprotobuf.examples.Address\032!.q"
|
|
|
- "tprotobuf.examples.SimpleResult\"\000b\006proto"
|
|
|
- "3"
|
|
|
- };
|
|
|
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
|
|
|
- descriptor, 1081);
|
|
|
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
|
|
|
- "addressbook.proto", &protobuf_RegisterTypes);
|
|
|
-}
|
|
|
-
|
|
|
-void AddDescriptors() {
|
|
|
- static ::google::protobuf::internal::once_flag once;
|
|
|
- ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
|
|
|
-}
|
|
|
-// Force AddDescriptors() to be called at dynamic initialization time.
|
|
|
-struct StaticDescriptorInitializer {
|
|
|
- StaticDescriptorInitializer() {
|
|
|
- AddDescriptors();
|
|
|
- }
|
|
|
-} static_descriptor_initializer;
|
|
|
-} // namespace protobuf_addressbook_2eproto
|
|
|
-namespace qtprotobuf {
|
|
|
-namespace examples {
|
|
|
-const ::google::protobuf::EnumDescriptor* Contact_PhoneType_descriptor() {
|
|
|
- protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return protobuf_addressbook_2eproto::file_level_enum_descriptors[0];
|
|
|
-}
|
|
|
-bool Contact_PhoneType_IsValid(int value) {
|
|
|
- switch (value) {
|
|
|
- case 0:
|
|
|
- case 1:
|
|
|
- case 2:
|
|
|
- case 3:
|
|
|
- return true;
|
|
|
- default:
|
|
|
- return false;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-const Contact_PhoneType Contact::Home;
|
|
|
-const Contact_PhoneType Contact::Work;
|
|
|
-const Contact_PhoneType Contact::Mobile;
|
|
|
-const Contact_PhoneType Contact::Other;
|
|
|
-const Contact_PhoneType Contact::PhoneType_MIN;
|
|
|
-const Contact_PhoneType Contact::PhoneType_MAX;
|
|
|
-const int Contact::PhoneType_ARRAYSIZE;
|
|
|
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-
|
|
|
-// ===================================================================
|
|
|
-
|
|
|
-void PhoneNumber::InitAsDefaultInstance() {
|
|
|
-}
|
|
|
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-const int PhoneNumber::kCountryCodeFieldNumber;
|
|
|
-const int PhoneNumber::kNumberFieldNumber;
|
|
|
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-
|
|
|
-PhoneNumber::PhoneNumber()
|
|
|
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
|
- ::google::protobuf::internal::InitSCC(
|
|
|
- &protobuf_addressbook_2eproto::scc_info_PhoneNumber.base);
|
|
|
- SharedCtor();
|
|
|
- // @@protoc_insertion_point(constructor:qtprotobuf.examples.PhoneNumber)
|
|
|
-}
|
|
|
-PhoneNumber::PhoneNumber(const PhoneNumber& from)
|
|
|
- : ::google::protobuf::Message(),
|
|
|
- _internal_metadata_(NULL) {
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- ::memcpy(&number_, &from.number_,
|
|
|
- static_cast<size_t>(reinterpret_cast<char*>(&countrycode_) -
|
|
|
- reinterpret_cast<char*>(&number_)) + sizeof(countrycode_));
|
|
|
- // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.PhoneNumber)
|
|
|
-}
|
|
|
-
|
|
|
-void PhoneNumber::SharedCtor() {
|
|
|
- ::memset(&number_, 0, static_cast<size_t>(
|
|
|
- reinterpret_cast<char*>(&countrycode_) -
|
|
|
- reinterpret_cast<char*>(&number_)) + sizeof(countrycode_));
|
|
|
-}
|
|
|
-
|
|
|
-PhoneNumber::~PhoneNumber() {
|
|
|
- // @@protoc_insertion_point(destructor:qtprotobuf.examples.PhoneNumber)
|
|
|
- SharedDtor();
|
|
|
-}
|
|
|
-
|
|
|
-void PhoneNumber::SharedDtor() {
|
|
|
-}
|
|
|
-
|
|
|
-void PhoneNumber::SetCachedSize(int size) const {
|
|
|
- _cached_size_.Set(size);
|
|
|
-}
|
|
|
-const ::google::protobuf::Descriptor* PhoneNumber::descriptor() {
|
|
|
- ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
|
-}
|
|
|
-
|
|
|
-const PhoneNumber& PhoneNumber::default_instance() {
|
|
|
- ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_PhoneNumber.base);
|
|
|
- return *internal_default_instance();
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-void PhoneNumber::Clear() {
|
|
|
-// @@protoc_insertion_point(message_clear_start:qtprotobuf.examples.PhoneNumber)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- // Prevent compiler warnings about cached_has_bits being unused
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- ::memset(&number_, 0, static_cast<size_t>(
|
|
|
- reinterpret_cast<char*>(&countrycode_) -
|
|
|
- reinterpret_cast<char*>(&number_)) + sizeof(countrycode_));
|
|
|
- _internal_metadata_.Clear();
|
|
|
-}
|
|
|
-
|
|
|
-bool PhoneNumber::MergePartialFromCodedStream(
|
|
|
- ::google::protobuf::io::CodedInputStream* input) {
|
|
|
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
|
- ::google::protobuf::uint32 tag;
|
|
|
- // @@protoc_insertion_point(parse_start:qtprotobuf.examples.PhoneNumber)
|
|
|
- for (;;) {
|
|
|
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
|
- tag = p.first;
|
|
|
- if (!p.second) goto handle_unusual;
|
|
|
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
|
- // uint32 countryCode = 1;
|
|
|
- case 1: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
|
|
|
-
|
|
|
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
|
- input, &countrycode_)));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- // uint64 number = 2;
|
|
|
- case 2: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
|
|
|
-
|
|
|
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
|
- input, &number_)));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- default: {
|
|
|
- handle_unusual:
|
|
|
- if (tag == 0) {
|
|
|
- goto success;
|
|
|
- }
|
|
|
- DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
|
- input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-success:
|
|
|
- // @@protoc_insertion_point(parse_success:qtprotobuf.examples.PhoneNumber)
|
|
|
- return true;
|
|
|
-failure:
|
|
|
- // @@protoc_insertion_point(parse_failure:qtprotobuf.examples.PhoneNumber)
|
|
|
- return false;
|
|
|
-#undef DO_
|
|
|
-}
|
|
|
-
|
|
|
-void PhoneNumber::SerializeWithCachedSizes(
|
|
|
- ::google::protobuf::io::CodedOutputStream* output) const {
|
|
|
- // @@protoc_insertion_point(serialize_start:qtprotobuf.examples.PhoneNumber)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // uint32 countryCode = 1;
|
|
|
- if (this->countrycode() != 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->countrycode(), output);
|
|
|
- }
|
|
|
-
|
|
|
- // uint64 number = 2;
|
|
|
- if (this->number() != 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->number(), output);
|
|
|
- }
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_end:qtprotobuf.examples.PhoneNumber)
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::uint8* PhoneNumber::InternalSerializeWithCachedSizesToArray(
|
|
|
- bool deterministic, ::google::protobuf::uint8* target) const {
|
|
|
- (void)deterministic; // Unused
|
|
|
- // @@protoc_insertion_point(serialize_to_array_start:qtprotobuf.examples.PhoneNumber)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // uint32 countryCode = 1;
|
|
|
- if (this->countrycode() != 0) {
|
|
|
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->countrycode(), target);
|
|
|
- }
|
|
|
-
|
|
|
- // uint64 number = 2;
|
|
|
- if (this->number() != 0) {
|
|
|
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, this->number(), target);
|
|
|
- }
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_to_array_end:qtprotobuf.examples.PhoneNumber)
|
|
|
- return target;
|
|
|
-}
|
|
|
-
|
|
|
-size_t PhoneNumber::ByteSizeLong() const {
|
|
|
-// @@protoc_insertion_point(message_byte_size_start:qtprotobuf.examples.PhoneNumber)
|
|
|
- size_t total_size = 0;
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- total_size +=
|
|
|
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
|
|
|
- }
|
|
|
- // uint64 number = 2;
|
|
|
- if (this->number() != 0) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
|
- this->number());
|
|
|
- }
|
|
|
-
|
|
|
- // uint32 countryCode = 1;
|
|
|
- if (this->countrycode() != 0) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
|
- this->countrycode());
|
|
|
- }
|
|
|
-
|
|
|
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
|
- SetCachedSize(cached_size);
|
|
|
- return total_size;
|
|
|
-}
|
|
|
-
|
|
|
-void PhoneNumber::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_merge_from_start:qtprotobuf.examples.PhoneNumber)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- const PhoneNumber* source =
|
|
|
- ::google::protobuf::internal::DynamicCastToGenerated<const PhoneNumber>(
|
|
|
- &from);
|
|
|
- if (source == NULL) {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobuf.examples.PhoneNumber)
|
|
|
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
|
- } else {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobuf.examples.PhoneNumber)
|
|
|
- MergeFrom(*source);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void PhoneNumber::MergeFrom(const PhoneNumber& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_merge_from_start:qtprotobuf.examples.PhoneNumber)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- if (from.number() != 0) {
|
|
|
- set_number(from.number());
|
|
|
- }
|
|
|
- if (from.countrycode() != 0) {
|
|
|
- set_countrycode(from.countrycode());
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void PhoneNumber::CopyFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_copy_from_start:qtprotobuf.examples.PhoneNumber)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-void PhoneNumber::CopyFrom(const PhoneNumber& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_copy_from_start:qtprotobuf.examples.PhoneNumber)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-bool PhoneNumber::IsInitialized() const {
|
|
|
- return true;
|
|
|
-}
|
|
|
-
|
|
|
-void PhoneNumber::Swap(PhoneNumber* other) {
|
|
|
- if (other == this) return;
|
|
|
- InternalSwap(other);
|
|
|
-}
|
|
|
-void PhoneNumber::InternalSwap(PhoneNumber* other) {
|
|
|
- using std::swap;
|
|
|
- swap(number_, other->number_);
|
|
|
- swap(countrycode_, other->countrycode_);
|
|
|
- _internal_metadata_.Swap(&other->_internal_metadata_);
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::Metadata PhoneNumber::GetMetadata() const {
|
|
|
- protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-// ===================================================================
|
|
|
-
|
|
|
-void Address::InitAsDefaultInstance() {
|
|
|
-}
|
|
|
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-const int Address::kZipCodeFieldNumber;
|
|
|
-const int Address::kStreetAddress1FieldNumber;
|
|
|
-const int Address::kStreetAddress2FieldNumber;
|
|
|
-const int Address::kStateFieldNumber;
|
|
|
-const int Address::kCountryFieldNumber;
|
|
|
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-
|
|
|
-Address::Address()
|
|
|
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
|
- ::google::protobuf::internal::InitSCC(
|
|
|
- &protobuf_addressbook_2eproto::scc_info_Address.base);
|
|
|
- SharedCtor();
|
|
|
- // @@protoc_insertion_point(constructor:qtprotobuf.examples.Address)
|
|
|
-}
|
|
|
-Address::Address(const Address& from)
|
|
|
- : ::google::protobuf::Message(),
|
|
|
- _internal_metadata_(NULL) {
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- streetaddress1_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- if (from.streetaddress1().size() > 0) {
|
|
|
- streetaddress1_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.streetaddress1_);
|
|
|
- }
|
|
|
- streetaddress2_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- if (from.streetaddress2().size() > 0) {
|
|
|
- streetaddress2_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.streetaddress2_);
|
|
|
- }
|
|
|
- state_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- if (from.state().size() > 0) {
|
|
|
- state_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.state_);
|
|
|
- }
|
|
|
- ::memcpy(&zipcode_, &from.zipcode_,
|
|
|
- static_cast<size_t>(reinterpret_cast<char*>(&country_) -
|
|
|
- reinterpret_cast<char*>(&zipcode_)) + sizeof(country_));
|
|
|
- // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.Address)
|
|
|
-}
|
|
|
-
|
|
|
-void Address::SharedCtor() {
|
|
|
- streetaddress1_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- streetaddress2_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- state_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- ::memset(&zipcode_, 0, static_cast<size_t>(
|
|
|
- reinterpret_cast<char*>(&country_) -
|
|
|
- reinterpret_cast<char*>(&zipcode_)) + sizeof(country_));
|
|
|
-}
|
|
|
-
|
|
|
-Address::~Address() {
|
|
|
- // @@protoc_insertion_point(destructor:qtprotobuf.examples.Address)
|
|
|
- SharedDtor();
|
|
|
-}
|
|
|
-
|
|
|
-void Address::SharedDtor() {
|
|
|
- streetaddress1_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- streetaddress2_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- state_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
-}
|
|
|
-
|
|
|
-void Address::SetCachedSize(int size) const {
|
|
|
- _cached_size_.Set(size);
|
|
|
-}
|
|
|
-const ::google::protobuf::Descriptor* Address::descriptor() {
|
|
|
- ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
|
-}
|
|
|
-
|
|
|
-const Address& Address::default_instance() {
|
|
|
- ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_Address.base);
|
|
|
- return *internal_default_instance();
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-void Address::Clear() {
|
|
|
-// @@protoc_insertion_point(message_clear_start:qtprotobuf.examples.Address)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- // Prevent compiler warnings about cached_has_bits being unused
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- streetaddress1_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- streetaddress2_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- state_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- ::memset(&zipcode_, 0, static_cast<size_t>(
|
|
|
- reinterpret_cast<char*>(&country_) -
|
|
|
- reinterpret_cast<char*>(&zipcode_)) + sizeof(country_));
|
|
|
- _internal_metadata_.Clear();
|
|
|
-}
|
|
|
-
|
|
|
-bool Address::MergePartialFromCodedStream(
|
|
|
- ::google::protobuf::io::CodedInputStream* input) {
|
|
|
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
|
- ::google::protobuf::uint32 tag;
|
|
|
- // @@protoc_insertion_point(parse_start:qtprotobuf.examples.Address)
|
|
|
- for (;;) {
|
|
|
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
|
- tag = p.first;
|
|
|
- if (!p.second) goto handle_unusual;
|
|
|
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
|
- // uint64 zipCode = 1;
|
|
|
- case 1: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
|
|
|
-
|
|
|
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
|
- input, &zipcode_)));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- // string streetAddress1 = 2;
|
|
|
- case 2: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
|
- input, this->mutable_streetaddress1()));
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->streetaddress1().data(), static_cast<int>(this->streetaddress1().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::PARSE,
|
|
|
- "qtprotobuf.examples.Address.streetAddress1"));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- // string streetAddress2 = 3;
|
|
|
- case 3: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
|
- input, this->mutable_streetaddress2()));
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->streetaddress2().data(), static_cast<int>(this->streetaddress2().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::PARSE,
|
|
|
- "qtprotobuf.examples.Address.streetAddress2"));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- // string state = 4;
|
|
|
- case 4: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
|
- input, this->mutable_state()));
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->state().data(), static_cast<int>(this->state().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::PARSE,
|
|
|
- "qtprotobuf.examples.Address.state"));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- // uint32 country = 5;
|
|
|
- case 5: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
|
|
|
-
|
|
|
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
|
|
- input, &country_)));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- default: {
|
|
|
- handle_unusual:
|
|
|
- if (tag == 0) {
|
|
|
- goto success;
|
|
|
- }
|
|
|
- DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
|
- input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-success:
|
|
|
- // @@protoc_insertion_point(parse_success:qtprotobuf.examples.Address)
|
|
|
- return true;
|
|
|
-failure:
|
|
|
- // @@protoc_insertion_point(parse_failure:qtprotobuf.examples.Address)
|
|
|
- return false;
|
|
|
-#undef DO_
|
|
|
-}
|
|
|
-
|
|
|
-void Address::SerializeWithCachedSizes(
|
|
|
- ::google::protobuf::io::CodedOutputStream* output) const {
|
|
|
- // @@protoc_insertion_point(serialize_start:qtprotobuf.examples.Address)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // uint64 zipCode = 1;
|
|
|
- if (this->zipcode() != 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->zipcode(), output);
|
|
|
- }
|
|
|
-
|
|
|
- // string streetAddress1 = 2;
|
|
|
- if (this->streetaddress1().size() > 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->streetaddress1().data(), static_cast<int>(this->streetaddress1().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
- "qtprotobuf.examples.Address.streetAddress1");
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
|
- 2, this->streetaddress1(), output);
|
|
|
- }
|
|
|
-
|
|
|
- // string streetAddress2 = 3;
|
|
|
- if (this->streetaddress2().size() > 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->streetaddress2().data(), static_cast<int>(this->streetaddress2().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
- "qtprotobuf.examples.Address.streetAddress2");
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
|
- 3, this->streetaddress2(), output);
|
|
|
- }
|
|
|
-
|
|
|
- // string state = 4;
|
|
|
- if (this->state().size() > 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->state().data(), static_cast<int>(this->state().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
- "qtprotobuf.examples.Address.state");
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
|
- 4, this->state(), output);
|
|
|
- }
|
|
|
-
|
|
|
- // uint32 country = 5;
|
|
|
- if (this->country() != 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->country(), output);
|
|
|
- }
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_end:qtprotobuf.examples.Address)
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::uint8* Address::InternalSerializeWithCachedSizesToArray(
|
|
|
- bool deterministic, ::google::protobuf::uint8* target) const {
|
|
|
- (void)deterministic; // Unused
|
|
|
- // @@protoc_insertion_point(serialize_to_array_start:qtprotobuf.examples.Address)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // uint64 zipCode = 1;
|
|
|
- if (this->zipcode() != 0) {
|
|
|
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->zipcode(), target);
|
|
|
- }
|
|
|
-
|
|
|
- // string streetAddress1 = 2;
|
|
|
- if (this->streetaddress1().size() > 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->streetaddress1().data(), static_cast<int>(this->streetaddress1().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
- "qtprotobuf.examples.Address.streetAddress1");
|
|
|
- target =
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
|
|
- 2, this->streetaddress1(), target);
|
|
|
- }
|
|
|
-
|
|
|
- // string streetAddress2 = 3;
|
|
|
- if (this->streetaddress2().size() > 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->streetaddress2().data(), static_cast<int>(this->streetaddress2().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
- "qtprotobuf.examples.Address.streetAddress2");
|
|
|
- target =
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
|
|
- 3, this->streetaddress2(), target);
|
|
|
- }
|
|
|
-
|
|
|
- // string state = 4;
|
|
|
- if (this->state().size() > 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->state().data(), static_cast<int>(this->state().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
- "qtprotobuf.examples.Address.state");
|
|
|
- target =
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
|
|
- 4, this->state(), target);
|
|
|
- }
|
|
|
-
|
|
|
- // uint32 country = 5;
|
|
|
- if (this->country() != 0) {
|
|
|
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->country(), target);
|
|
|
- }
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_to_array_end:qtprotobuf.examples.Address)
|
|
|
- return target;
|
|
|
-}
|
|
|
-
|
|
|
-size_t Address::ByteSizeLong() const {
|
|
|
-// @@protoc_insertion_point(message_byte_size_start:qtprotobuf.examples.Address)
|
|
|
- size_t total_size = 0;
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- total_size +=
|
|
|
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
|
|
|
- }
|
|
|
- // string streetAddress1 = 2;
|
|
|
- if (this->streetaddress1().size() > 0) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
|
- this->streetaddress1());
|
|
|
- }
|
|
|
-
|
|
|
- // string streetAddress2 = 3;
|
|
|
- if (this->streetaddress2().size() > 0) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
|
- this->streetaddress2());
|
|
|
- }
|
|
|
-
|
|
|
- // string state = 4;
|
|
|
- if (this->state().size() > 0) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
|
- this->state());
|
|
|
- }
|
|
|
-
|
|
|
- // uint64 zipCode = 1;
|
|
|
- if (this->zipcode() != 0) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
|
- this->zipcode());
|
|
|
- }
|
|
|
-
|
|
|
- // uint32 country = 5;
|
|
|
- if (this->country() != 0) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::UInt32Size(
|
|
|
- this->country());
|
|
|
- }
|
|
|
-
|
|
|
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
|
- SetCachedSize(cached_size);
|
|
|
- return total_size;
|
|
|
-}
|
|
|
-
|
|
|
-void Address::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_merge_from_start:qtprotobuf.examples.Address)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- const Address* source =
|
|
|
- ::google::protobuf::internal::DynamicCastToGenerated<const Address>(
|
|
|
- &from);
|
|
|
- if (source == NULL) {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobuf.examples.Address)
|
|
|
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
|
- } else {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobuf.examples.Address)
|
|
|
- MergeFrom(*source);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void Address::MergeFrom(const Address& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_merge_from_start:qtprotobuf.examples.Address)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- if (from.streetaddress1().size() > 0) {
|
|
|
-
|
|
|
- streetaddress1_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.streetaddress1_);
|
|
|
- }
|
|
|
- if (from.streetaddress2().size() > 0) {
|
|
|
-
|
|
|
- streetaddress2_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.streetaddress2_);
|
|
|
- }
|
|
|
- if (from.state().size() > 0) {
|
|
|
-
|
|
|
- state_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.state_);
|
|
|
- }
|
|
|
- if (from.zipcode() != 0) {
|
|
|
- set_zipcode(from.zipcode());
|
|
|
- }
|
|
|
- if (from.country() != 0) {
|
|
|
- set_country(from.country());
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void Address::CopyFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_copy_from_start:qtprotobuf.examples.Address)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-void Address::CopyFrom(const Address& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_copy_from_start:qtprotobuf.examples.Address)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-bool Address::IsInitialized() const {
|
|
|
- return true;
|
|
|
-}
|
|
|
-
|
|
|
-void Address::Swap(Address* other) {
|
|
|
- if (other == this) return;
|
|
|
- InternalSwap(other);
|
|
|
-}
|
|
|
-void Address::InternalSwap(Address* other) {
|
|
|
- using std::swap;
|
|
|
- streetaddress1_.Swap(&other->streetaddress1_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
|
- GetArenaNoVirtual());
|
|
|
- streetaddress2_.Swap(&other->streetaddress2_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
|
- GetArenaNoVirtual());
|
|
|
- state_.Swap(&other->state_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
|
- GetArenaNoVirtual());
|
|
|
- swap(zipcode_, other->zipcode_);
|
|
|
- swap(country_, other->country_);
|
|
|
- _internal_metadata_.Swap(&other->_internal_metadata_);
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::Metadata Address::GetMetadata() const {
|
|
|
- protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-// ===================================================================
|
|
|
-
|
|
|
-void Job::InitAsDefaultInstance() {
|
|
|
- ::qtprotobuf::examples::_Job_default_instance_._instance.get_mutable()->officeaddress_ = const_cast< ::qtprotobuf::examples::Address*>(
|
|
|
- ::qtprotobuf::examples::Address::internal_default_instance());
|
|
|
-}
|
|
|
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-const int Job::kTitleFieldNumber;
|
|
|
-const int Job::kOfficeAddressFieldNumber;
|
|
|
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-
|
|
|
-Job::Job()
|
|
|
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
|
- ::google::protobuf::internal::InitSCC(
|
|
|
- &protobuf_addressbook_2eproto::scc_info_Job.base);
|
|
|
- SharedCtor();
|
|
|
- // @@protoc_insertion_point(constructor:qtprotobuf.examples.Job)
|
|
|
-}
|
|
|
-Job::Job(const Job& from)
|
|
|
- : ::google::protobuf::Message(),
|
|
|
- _internal_metadata_(NULL) {
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- title_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- if (from.title().size() > 0) {
|
|
|
- title_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.title_);
|
|
|
- }
|
|
|
- if (from.has_officeaddress()) {
|
|
|
- officeaddress_ = new ::qtprotobuf::examples::Address(*from.officeaddress_);
|
|
|
- } else {
|
|
|
- officeaddress_ = NULL;
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.Job)
|
|
|
-}
|
|
|
-
|
|
|
-void Job::SharedCtor() {
|
|
|
- title_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- officeaddress_ = NULL;
|
|
|
-}
|
|
|
-
|
|
|
-Job::~Job() {
|
|
|
- // @@protoc_insertion_point(destructor:qtprotobuf.examples.Job)
|
|
|
- SharedDtor();
|
|
|
-}
|
|
|
-
|
|
|
-void Job::SharedDtor() {
|
|
|
- title_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- if (this != internal_default_instance()) delete officeaddress_;
|
|
|
-}
|
|
|
-
|
|
|
-void Job::SetCachedSize(int size) const {
|
|
|
- _cached_size_.Set(size);
|
|
|
-}
|
|
|
-const ::google::protobuf::Descriptor* Job::descriptor() {
|
|
|
- ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
|
-}
|
|
|
-
|
|
|
-const Job& Job::default_instance() {
|
|
|
- ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_Job.base);
|
|
|
- return *internal_default_instance();
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-void Job::Clear() {
|
|
|
-// @@protoc_insertion_point(message_clear_start:qtprotobuf.examples.Job)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- // Prevent compiler warnings about cached_has_bits being unused
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- title_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- if (GetArenaNoVirtual() == NULL && officeaddress_ != NULL) {
|
|
|
- delete officeaddress_;
|
|
|
- }
|
|
|
- officeaddress_ = NULL;
|
|
|
- _internal_metadata_.Clear();
|
|
|
-}
|
|
|
-
|
|
|
-bool Job::MergePartialFromCodedStream(
|
|
|
- ::google::protobuf::io::CodedInputStream* input) {
|
|
|
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
|
- ::google::protobuf::uint32 tag;
|
|
|
- // @@protoc_insertion_point(parse_start:qtprotobuf.examples.Job)
|
|
|
- for (;;) {
|
|
|
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
|
- tag = p.first;
|
|
|
- if (!p.second) goto handle_unusual;
|
|
|
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
|
- // string title = 1;
|
|
|
- case 1: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
|
- input, this->mutable_title()));
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->title().data(), static_cast<int>(this->title().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::PARSE,
|
|
|
- "qtprotobuf.examples.Job.title"));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- // .qtprotobuf.examples.Address officeAddress = 2;
|
|
|
- case 2: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
|
|
|
- input, mutable_officeaddress()));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- default: {
|
|
|
- handle_unusual:
|
|
|
- if (tag == 0) {
|
|
|
- goto success;
|
|
|
- }
|
|
|
- DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
|
- input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-success:
|
|
|
- // @@protoc_insertion_point(parse_success:qtprotobuf.examples.Job)
|
|
|
- return true;
|
|
|
-failure:
|
|
|
- // @@protoc_insertion_point(parse_failure:qtprotobuf.examples.Job)
|
|
|
- return false;
|
|
|
-#undef DO_
|
|
|
-}
|
|
|
-
|
|
|
-void Job::SerializeWithCachedSizes(
|
|
|
- ::google::protobuf::io::CodedOutputStream* output) const {
|
|
|
- // @@protoc_insertion_point(serialize_start:qtprotobuf.examples.Job)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // string title = 1;
|
|
|
- if (this->title().size() > 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->title().data(), static_cast<int>(this->title().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
- "qtprotobuf.examples.Job.title");
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
|
- 1, this->title(), output);
|
|
|
- }
|
|
|
-
|
|
|
- // .qtprotobuf.examples.Address officeAddress = 2;
|
|
|
- if (this->has_officeaddress()) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
|
- 2, this->_internal_officeaddress(), output);
|
|
|
- }
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_end:qtprotobuf.examples.Job)
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::uint8* Job::InternalSerializeWithCachedSizesToArray(
|
|
|
- bool deterministic, ::google::protobuf::uint8* target) const {
|
|
|
- (void)deterministic; // Unused
|
|
|
- // @@protoc_insertion_point(serialize_to_array_start:qtprotobuf.examples.Job)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // string title = 1;
|
|
|
- if (this->title().size() > 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->title().data(), static_cast<int>(this->title().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
- "qtprotobuf.examples.Job.title");
|
|
|
- target =
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
|
|
- 1, this->title(), target);
|
|
|
- }
|
|
|
-
|
|
|
- // .qtprotobuf.examples.Address officeAddress = 2;
|
|
|
- if (this->has_officeaddress()) {
|
|
|
- target = ::google::protobuf::internal::WireFormatLite::
|
|
|
- InternalWriteMessageToArray(
|
|
|
- 2, this->_internal_officeaddress(), deterministic, target);
|
|
|
- }
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_to_array_end:qtprotobuf.examples.Job)
|
|
|
- return target;
|
|
|
-}
|
|
|
-
|
|
|
-size_t Job::ByteSizeLong() const {
|
|
|
-// @@protoc_insertion_point(message_byte_size_start:qtprotobuf.examples.Job)
|
|
|
- size_t total_size = 0;
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- total_size +=
|
|
|
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
|
|
|
- }
|
|
|
- // string title = 1;
|
|
|
- if (this->title().size() > 0) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
|
- this->title());
|
|
|
- }
|
|
|
-
|
|
|
- // .qtprotobuf.examples.Address officeAddress = 2;
|
|
|
- if (this->has_officeaddress()) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::MessageSize(
|
|
|
- *officeaddress_);
|
|
|
- }
|
|
|
-
|
|
|
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
|
- SetCachedSize(cached_size);
|
|
|
- return total_size;
|
|
|
-}
|
|
|
-
|
|
|
-void Job::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_merge_from_start:qtprotobuf.examples.Job)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- const Job* source =
|
|
|
- ::google::protobuf::internal::DynamicCastToGenerated<const Job>(
|
|
|
- &from);
|
|
|
- if (source == NULL) {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobuf.examples.Job)
|
|
|
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
|
- } else {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobuf.examples.Job)
|
|
|
- MergeFrom(*source);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void Job::MergeFrom(const Job& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_merge_from_start:qtprotobuf.examples.Job)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- if (from.title().size() > 0) {
|
|
|
-
|
|
|
- title_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.title_);
|
|
|
- }
|
|
|
- if (from.has_officeaddress()) {
|
|
|
- mutable_officeaddress()->::qtprotobuf::examples::Address::MergeFrom(from.officeaddress());
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void Job::CopyFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_copy_from_start:qtprotobuf.examples.Job)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-void Job::CopyFrom(const Job& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_copy_from_start:qtprotobuf.examples.Job)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-bool Job::IsInitialized() const {
|
|
|
- return true;
|
|
|
-}
|
|
|
-
|
|
|
-void Job::Swap(Job* other) {
|
|
|
- if (other == this) return;
|
|
|
- InternalSwap(other);
|
|
|
-}
|
|
|
-void Job::InternalSwap(Job* other) {
|
|
|
- using std::swap;
|
|
|
- title_.Swap(&other->title_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
|
- GetArenaNoVirtual());
|
|
|
- swap(officeaddress_, other->officeaddress_);
|
|
|
- _internal_metadata_.Swap(&other->_internal_metadata_);
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::Metadata Job::GetMetadata() const {
|
|
|
- protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-// ===================================================================
|
|
|
-
|
|
|
-void Contact::InitAsDefaultInstance() {
|
|
|
- ::qtprotobuf::examples::_Contact_default_instance_._instance.get_mutable()->address_ = const_cast< ::qtprotobuf::examples::Address*>(
|
|
|
- ::qtprotobuf::examples::Address::internal_default_instance());
|
|
|
- ::qtprotobuf::examples::_Contact_default_instance_._instance.get_mutable()->job_ = const_cast< ::qtprotobuf::examples::Job*>(
|
|
|
- ::qtprotobuf::examples::Job::internal_default_instance());
|
|
|
-}
|
|
|
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-const int Contact::kFirstNameFieldNumber;
|
|
|
-const int Contact::kLastNameFieldNumber;
|
|
|
-const int Contact::kMiddleNameFieldNumber;
|
|
|
-const int Contact::kPhonesFieldNumber;
|
|
|
-const int Contact::kAddressFieldNumber;
|
|
|
-const int Contact::kJobFieldNumber;
|
|
|
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-
|
|
|
-Contact::Contact()
|
|
|
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
|
- ::google::protobuf::internal::InitSCC(
|
|
|
- &protobuf_addressbook_2eproto::scc_info_Contact.base);
|
|
|
- SharedCtor();
|
|
|
- // @@protoc_insertion_point(constructor:qtprotobuf.examples.Contact)
|
|
|
-}
|
|
|
-Contact::Contact(const Contact& from)
|
|
|
- : ::google::protobuf::Message(),
|
|
|
- _internal_metadata_(NULL),
|
|
|
- phones_(from.phones_) {
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- firstname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- if (from.firstname().size() > 0) {
|
|
|
- firstname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.firstname_);
|
|
|
- }
|
|
|
- lastname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- if (from.lastname().size() > 0) {
|
|
|
- lastname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.lastname_);
|
|
|
- }
|
|
|
- middlename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- if (from.middlename().size() > 0) {
|
|
|
- middlename_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.middlename_);
|
|
|
- }
|
|
|
- if (from.has_address()) {
|
|
|
- address_ = new ::qtprotobuf::examples::Address(*from.address_);
|
|
|
- } else {
|
|
|
- address_ = NULL;
|
|
|
- }
|
|
|
- if (from.has_job()) {
|
|
|
- job_ = new ::qtprotobuf::examples::Job(*from.job_);
|
|
|
- } else {
|
|
|
- job_ = NULL;
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.Contact)
|
|
|
-}
|
|
|
-
|
|
|
-void Contact::SharedCtor() {
|
|
|
- firstname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- lastname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- middlename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- ::memset(&address_, 0, static_cast<size_t>(
|
|
|
- reinterpret_cast<char*>(&job_) -
|
|
|
- reinterpret_cast<char*>(&address_)) + sizeof(job_));
|
|
|
-}
|
|
|
-
|
|
|
-Contact::~Contact() {
|
|
|
- // @@protoc_insertion_point(destructor:qtprotobuf.examples.Contact)
|
|
|
- SharedDtor();
|
|
|
-}
|
|
|
-
|
|
|
-void Contact::SharedDtor() {
|
|
|
- firstname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- lastname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- middlename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- if (this != internal_default_instance()) delete address_;
|
|
|
- if (this != internal_default_instance()) delete job_;
|
|
|
-}
|
|
|
-
|
|
|
-void Contact::SetCachedSize(int size) const {
|
|
|
- _cached_size_.Set(size);
|
|
|
-}
|
|
|
-const ::google::protobuf::Descriptor* Contact::descriptor() {
|
|
|
- ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
|
-}
|
|
|
-
|
|
|
-const Contact& Contact::default_instance() {
|
|
|
- ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_Contact.base);
|
|
|
- return *internal_default_instance();
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-void Contact::Clear() {
|
|
|
-// @@protoc_insertion_point(message_clear_start:qtprotobuf.examples.Contact)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- // Prevent compiler warnings about cached_has_bits being unused
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- phones_.Clear();
|
|
|
- firstname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- lastname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- middlename_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
- if (GetArenaNoVirtual() == NULL && address_ != NULL) {
|
|
|
- delete address_;
|
|
|
- }
|
|
|
- address_ = NULL;
|
|
|
- if (GetArenaNoVirtual() == NULL && job_ != NULL) {
|
|
|
- delete job_;
|
|
|
- }
|
|
|
- job_ = NULL;
|
|
|
- _internal_metadata_.Clear();
|
|
|
-}
|
|
|
-
|
|
|
-bool Contact::MergePartialFromCodedStream(
|
|
|
- ::google::protobuf::io::CodedInputStream* input) {
|
|
|
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
|
- ::google::protobuf::uint32 tag;
|
|
|
- // @@protoc_insertion_point(parse_start:qtprotobuf.examples.Contact)
|
|
|
- for (;;) {
|
|
|
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
|
- tag = p.first;
|
|
|
- if (!p.second) goto handle_unusual;
|
|
|
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
|
- // string firstName = 1;
|
|
|
- case 1: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
|
- input, this->mutable_firstname()));
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->firstname().data(), static_cast<int>(this->firstname().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::PARSE,
|
|
|
- "qtprotobuf.examples.Contact.firstName"));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- // string lastName = 2;
|
|
|
- case 2: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
|
- input, this->mutable_lastname()));
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->lastname().data(), static_cast<int>(this->lastname().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::PARSE,
|
|
|
- "qtprotobuf.examples.Contact.lastName"));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- // string middleName = 3;
|
|
|
- case 3: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
|
- input, this->mutable_middlename()));
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->middlename().data(), static_cast<int>(this->middlename().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::PARSE,
|
|
|
- "qtprotobuf.examples.Contact.middleName"));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- // repeated .qtprotobuf.examples.PhoneNumber phones = 4;
|
|
|
- case 4: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
|
|
|
- input, add_phones()));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- // .qtprotobuf.examples.Address address = 5;
|
|
|
- case 5: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
|
|
|
- input, mutable_address()));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- // .qtprotobuf.examples.Job job = 6;
|
|
|
- case 6: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
|
|
|
- input, mutable_job()));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- default: {
|
|
|
- handle_unusual:
|
|
|
- if (tag == 0) {
|
|
|
- goto success;
|
|
|
- }
|
|
|
- DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
|
- input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-success:
|
|
|
- // @@protoc_insertion_point(parse_success:qtprotobuf.examples.Contact)
|
|
|
- return true;
|
|
|
-failure:
|
|
|
- // @@protoc_insertion_point(parse_failure:qtprotobuf.examples.Contact)
|
|
|
- return false;
|
|
|
-#undef DO_
|
|
|
-}
|
|
|
-
|
|
|
-void Contact::SerializeWithCachedSizes(
|
|
|
- ::google::protobuf::io::CodedOutputStream* output) const {
|
|
|
- // @@protoc_insertion_point(serialize_start:qtprotobuf.examples.Contact)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // string firstName = 1;
|
|
|
- if (this->firstname().size() > 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->firstname().data(), static_cast<int>(this->firstname().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
- "qtprotobuf.examples.Contact.firstName");
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
|
- 1, this->firstname(), output);
|
|
|
- }
|
|
|
-
|
|
|
- // string lastName = 2;
|
|
|
- if (this->lastname().size() > 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->lastname().data(), static_cast<int>(this->lastname().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
- "qtprotobuf.examples.Contact.lastName");
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
|
- 2, this->lastname(), output);
|
|
|
- }
|
|
|
-
|
|
|
- // string middleName = 3;
|
|
|
- if (this->middlename().size() > 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->middlename().data(), static_cast<int>(this->middlename().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
- "qtprotobuf.examples.Contact.middleName");
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
|
- 3, this->middlename(), output);
|
|
|
- }
|
|
|
-
|
|
|
- // repeated .qtprotobuf.examples.PhoneNumber phones = 4;
|
|
|
- for (unsigned int i = 0,
|
|
|
- n = static_cast<unsigned int>(this->phones_size()); i < n; i++) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
|
- 4,
|
|
|
- this->phones(static_cast<int>(i)),
|
|
|
- output);
|
|
|
- }
|
|
|
-
|
|
|
- // .qtprotobuf.examples.Address address = 5;
|
|
|
- if (this->has_address()) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
|
- 5, this->_internal_address(), output);
|
|
|
- }
|
|
|
-
|
|
|
- // .qtprotobuf.examples.Job job = 6;
|
|
|
- if (this->has_job()) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
|
- 6, this->_internal_job(), output);
|
|
|
- }
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_end:qtprotobuf.examples.Contact)
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::uint8* Contact::InternalSerializeWithCachedSizesToArray(
|
|
|
- bool deterministic, ::google::protobuf::uint8* target) const {
|
|
|
- (void)deterministic; // Unused
|
|
|
- // @@protoc_insertion_point(serialize_to_array_start:qtprotobuf.examples.Contact)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // string firstName = 1;
|
|
|
- if (this->firstname().size() > 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->firstname().data(), static_cast<int>(this->firstname().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
- "qtprotobuf.examples.Contact.firstName");
|
|
|
- target =
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
|
|
- 1, this->firstname(), target);
|
|
|
- }
|
|
|
-
|
|
|
- // string lastName = 2;
|
|
|
- if (this->lastname().size() > 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->lastname().data(), static_cast<int>(this->lastname().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
- "qtprotobuf.examples.Contact.lastName");
|
|
|
- target =
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
|
|
- 2, this->lastname(), target);
|
|
|
- }
|
|
|
-
|
|
|
- // string middleName = 3;
|
|
|
- if (this->middlename().size() > 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
|
- this->middlename().data(), static_cast<int>(this->middlename().length()),
|
|
|
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
- "qtprotobuf.examples.Contact.middleName");
|
|
|
- target =
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
|
|
- 3, this->middlename(), target);
|
|
|
- }
|
|
|
-
|
|
|
- // repeated .qtprotobuf.examples.PhoneNumber phones = 4;
|
|
|
- for (unsigned int i = 0,
|
|
|
- n = static_cast<unsigned int>(this->phones_size()); i < n; i++) {
|
|
|
- target = ::google::protobuf::internal::WireFormatLite::
|
|
|
- InternalWriteMessageToArray(
|
|
|
- 4, this->phones(static_cast<int>(i)), deterministic, target);
|
|
|
- }
|
|
|
-
|
|
|
- // .qtprotobuf.examples.Address address = 5;
|
|
|
- if (this->has_address()) {
|
|
|
- target = ::google::protobuf::internal::WireFormatLite::
|
|
|
- InternalWriteMessageToArray(
|
|
|
- 5, this->_internal_address(), deterministic, target);
|
|
|
- }
|
|
|
-
|
|
|
- // .qtprotobuf.examples.Job job = 6;
|
|
|
- if (this->has_job()) {
|
|
|
- target = ::google::protobuf::internal::WireFormatLite::
|
|
|
- InternalWriteMessageToArray(
|
|
|
- 6, this->_internal_job(), deterministic, target);
|
|
|
- }
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_to_array_end:qtprotobuf.examples.Contact)
|
|
|
- return target;
|
|
|
-}
|
|
|
-
|
|
|
-size_t Contact::ByteSizeLong() const {
|
|
|
-// @@protoc_insertion_point(message_byte_size_start:qtprotobuf.examples.Contact)
|
|
|
- size_t total_size = 0;
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- total_size +=
|
|
|
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
|
|
|
- }
|
|
|
- // repeated .qtprotobuf.examples.PhoneNumber phones = 4;
|
|
|
- {
|
|
|
- unsigned int count = static_cast<unsigned int>(this->phones_size());
|
|
|
- total_size += 1UL * count;
|
|
|
- for (unsigned int i = 0; i < count; i++) {
|
|
|
- total_size +=
|
|
|
- ::google::protobuf::internal::WireFormatLite::MessageSize(
|
|
|
- this->phones(static_cast<int>(i)));
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // string firstName = 1;
|
|
|
- if (this->firstname().size() > 0) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
|
- this->firstname());
|
|
|
- }
|
|
|
-
|
|
|
- // string lastName = 2;
|
|
|
- if (this->lastname().size() > 0) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
|
- this->lastname());
|
|
|
- }
|
|
|
-
|
|
|
- // string middleName = 3;
|
|
|
- if (this->middlename().size() > 0) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
|
- this->middlename());
|
|
|
- }
|
|
|
-
|
|
|
- // .qtprotobuf.examples.Address address = 5;
|
|
|
- if (this->has_address()) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::MessageSize(
|
|
|
- *address_);
|
|
|
- }
|
|
|
-
|
|
|
- // .qtprotobuf.examples.Job job = 6;
|
|
|
- if (this->has_job()) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::MessageSize(
|
|
|
- *job_);
|
|
|
- }
|
|
|
-
|
|
|
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
|
- SetCachedSize(cached_size);
|
|
|
- return total_size;
|
|
|
-}
|
|
|
-
|
|
|
-void Contact::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_merge_from_start:qtprotobuf.examples.Contact)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- const Contact* source =
|
|
|
- ::google::protobuf::internal::DynamicCastToGenerated<const Contact>(
|
|
|
- &from);
|
|
|
- if (source == NULL) {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobuf.examples.Contact)
|
|
|
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
|
- } else {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobuf.examples.Contact)
|
|
|
- MergeFrom(*source);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void Contact::MergeFrom(const Contact& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_merge_from_start:qtprotobuf.examples.Contact)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- phones_.MergeFrom(from.phones_);
|
|
|
- if (from.firstname().size() > 0) {
|
|
|
-
|
|
|
- firstname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.firstname_);
|
|
|
- }
|
|
|
- if (from.lastname().size() > 0) {
|
|
|
-
|
|
|
- lastname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.lastname_);
|
|
|
- }
|
|
|
- if (from.middlename().size() > 0) {
|
|
|
-
|
|
|
- middlename_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.middlename_);
|
|
|
- }
|
|
|
- if (from.has_address()) {
|
|
|
- mutable_address()->::qtprotobuf::examples::Address::MergeFrom(from.address());
|
|
|
- }
|
|
|
- if (from.has_job()) {
|
|
|
- mutable_job()->::qtprotobuf::examples::Job::MergeFrom(from.job());
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void Contact::CopyFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_copy_from_start:qtprotobuf.examples.Contact)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-void Contact::CopyFrom(const Contact& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_copy_from_start:qtprotobuf.examples.Contact)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-bool Contact::IsInitialized() const {
|
|
|
- return true;
|
|
|
-}
|
|
|
-
|
|
|
-void Contact::Swap(Contact* other) {
|
|
|
- if (other == this) return;
|
|
|
- InternalSwap(other);
|
|
|
-}
|
|
|
-void Contact::InternalSwap(Contact* other) {
|
|
|
- using std::swap;
|
|
|
- CastToBase(&phones_)->InternalSwap(CastToBase(&other->phones_));
|
|
|
- firstname_.Swap(&other->firstname_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
|
- GetArenaNoVirtual());
|
|
|
- lastname_.Swap(&other->lastname_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
|
- GetArenaNoVirtual());
|
|
|
- middlename_.Swap(&other->middlename_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
|
- GetArenaNoVirtual());
|
|
|
- swap(address_, other->address_);
|
|
|
- swap(job_, other->job_);
|
|
|
- _internal_metadata_.Swap(&other->_internal_metadata_);
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::Metadata Contact::GetMetadata() const {
|
|
|
- protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-// ===================================================================
|
|
|
-
|
|
|
-void Contacts::InitAsDefaultInstance() {
|
|
|
-}
|
|
|
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-const int Contacts::kListFieldNumber;
|
|
|
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-
|
|
|
-Contacts::Contacts()
|
|
|
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
|
- ::google::protobuf::internal::InitSCC(
|
|
|
- &protobuf_addressbook_2eproto::scc_info_Contacts.base);
|
|
|
- SharedCtor();
|
|
|
- // @@protoc_insertion_point(constructor:qtprotobuf.examples.Contacts)
|
|
|
-}
|
|
|
-Contacts::Contacts(const Contacts& from)
|
|
|
- : ::google::protobuf::Message(),
|
|
|
- _internal_metadata_(NULL),
|
|
|
- list_(from.list_) {
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.Contacts)
|
|
|
-}
|
|
|
-
|
|
|
-void Contacts::SharedCtor() {
|
|
|
-}
|
|
|
-
|
|
|
-Contacts::~Contacts() {
|
|
|
- // @@protoc_insertion_point(destructor:qtprotobuf.examples.Contacts)
|
|
|
- SharedDtor();
|
|
|
-}
|
|
|
-
|
|
|
-void Contacts::SharedDtor() {
|
|
|
-}
|
|
|
-
|
|
|
-void Contacts::SetCachedSize(int size) const {
|
|
|
- _cached_size_.Set(size);
|
|
|
-}
|
|
|
-const ::google::protobuf::Descriptor* Contacts::descriptor() {
|
|
|
- ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
|
-}
|
|
|
-
|
|
|
-const Contacts& Contacts::default_instance() {
|
|
|
- ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_Contacts.base);
|
|
|
- return *internal_default_instance();
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-void Contacts::Clear() {
|
|
|
-// @@protoc_insertion_point(message_clear_start:qtprotobuf.examples.Contacts)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- // Prevent compiler warnings about cached_has_bits being unused
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- list_.Clear();
|
|
|
- _internal_metadata_.Clear();
|
|
|
-}
|
|
|
-
|
|
|
-bool Contacts::MergePartialFromCodedStream(
|
|
|
- ::google::protobuf::io::CodedInputStream* input) {
|
|
|
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
|
- ::google::protobuf::uint32 tag;
|
|
|
- // @@protoc_insertion_point(parse_start:qtprotobuf.examples.Contacts)
|
|
|
- for (;;) {
|
|
|
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
|
- tag = p.first;
|
|
|
- if (!p.second) goto handle_unusual;
|
|
|
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
|
- // repeated .qtprotobuf.examples.Contact list = 1;
|
|
|
- case 1: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
|
|
|
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
|
|
|
- input, add_list()));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- default: {
|
|
|
- handle_unusual:
|
|
|
- if (tag == 0) {
|
|
|
- goto success;
|
|
|
- }
|
|
|
- DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
|
- input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-success:
|
|
|
- // @@protoc_insertion_point(parse_success:qtprotobuf.examples.Contacts)
|
|
|
- return true;
|
|
|
-failure:
|
|
|
- // @@protoc_insertion_point(parse_failure:qtprotobuf.examples.Contacts)
|
|
|
- return false;
|
|
|
-#undef DO_
|
|
|
-}
|
|
|
-
|
|
|
-void Contacts::SerializeWithCachedSizes(
|
|
|
- ::google::protobuf::io::CodedOutputStream* output) const {
|
|
|
- // @@protoc_insertion_point(serialize_start:qtprotobuf.examples.Contacts)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // repeated .qtprotobuf.examples.Contact list = 1;
|
|
|
- for (unsigned int i = 0,
|
|
|
- n = static_cast<unsigned int>(this->list_size()); i < n; i++) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
|
- 1,
|
|
|
- this->list(static_cast<int>(i)),
|
|
|
- output);
|
|
|
- }
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_end:qtprotobuf.examples.Contacts)
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::uint8* Contacts::InternalSerializeWithCachedSizesToArray(
|
|
|
- bool deterministic, ::google::protobuf::uint8* target) const {
|
|
|
- (void)deterministic; // Unused
|
|
|
- // @@protoc_insertion_point(serialize_to_array_start:qtprotobuf.examples.Contacts)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // repeated .qtprotobuf.examples.Contact list = 1;
|
|
|
- for (unsigned int i = 0,
|
|
|
- n = static_cast<unsigned int>(this->list_size()); i < n; i++) {
|
|
|
- target = ::google::protobuf::internal::WireFormatLite::
|
|
|
- InternalWriteMessageToArray(
|
|
|
- 1, this->list(static_cast<int>(i)), deterministic, target);
|
|
|
- }
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_to_array_end:qtprotobuf.examples.Contacts)
|
|
|
- return target;
|
|
|
-}
|
|
|
-
|
|
|
-size_t Contacts::ByteSizeLong() const {
|
|
|
-// @@protoc_insertion_point(message_byte_size_start:qtprotobuf.examples.Contacts)
|
|
|
- size_t total_size = 0;
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- total_size +=
|
|
|
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
|
|
|
- }
|
|
|
- // repeated .qtprotobuf.examples.Contact list = 1;
|
|
|
- {
|
|
|
- unsigned int count = static_cast<unsigned int>(this->list_size());
|
|
|
- total_size += 1UL * count;
|
|
|
- for (unsigned int i = 0; i < count; i++) {
|
|
|
- total_size +=
|
|
|
- ::google::protobuf::internal::WireFormatLite::MessageSize(
|
|
|
- this->list(static_cast<int>(i)));
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
|
- SetCachedSize(cached_size);
|
|
|
- return total_size;
|
|
|
-}
|
|
|
-
|
|
|
-void Contacts::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_merge_from_start:qtprotobuf.examples.Contacts)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- const Contacts* source =
|
|
|
- ::google::protobuf::internal::DynamicCastToGenerated<const Contacts>(
|
|
|
- &from);
|
|
|
- if (source == NULL) {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobuf.examples.Contacts)
|
|
|
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
|
- } else {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobuf.examples.Contacts)
|
|
|
- MergeFrom(*source);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void Contacts::MergeFrom(const Contacts& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_merge_from_start:qtprotobuf.examples.Contacts)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- list_.MergeFrom(from.list_);
|
|
|
-}
|
|
|
-
|
|
|
-void Contacts::CopyFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_copy_from_start:qtprotobuf.examples.Contacts)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-void Contacts::CopyFrom(const Contacts& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_copy_from_start:qtprotobuf.examples.Contacts)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-bool Contacts::IsInitialized() const {
|
|
|
- return true;
|
|
|
-}
|
|
|
-
|
|
|
-void Contacts::Swap(Contacts* other) {
|
|
|
- if (other == this) return;
|
|
|
- InternalSwap(other);
|
|
|
-}
|
|
|
-void Contacts::InternalSwap(Contacts* other) {
|
|
|
- using std::swap;
|
|
|
- CastToBase(&list_)->InternalSwap(CastToBase(&other->list_));
|
|
|
- _internal_metadata_.Swap(&other->_internal_metadata_);
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::Metadata Contacts::GetMetadata() const {
|
|
|
- protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-// ===================================================================
|
|
|
-
|
|
|
-void SimpleResult::InitAsDefaultInstance() {
|
|
|
-}
|
|
|
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-const int SimpleResult::kOkFieldNumber;
|
|
|
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-
|
|
|
-SimpleResult::SimpleResult()
|
|
|
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
|
- ::google::protobuf::internal::InitSCC(
|
|
|
- &protobuf_addressbook_2eproto::scc_info_SimpleResult.base);
|
|
|
- SharedCtor();
|
|
|
- // @@protoc_insertion_point(constructor:qtprotobuf.examples.SimpleResult)
|
|
|
-}
|
|
|
-SimpleResult::SimpleResult(const SimpleResult& from)
|
|
|
- : ::google::protobuf::Message(),
|
|
|
- _internal_metadata_(NULL) {
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- ok_ = from.ok_;
|
|
|
- // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.SimpleResult)
|
|
|
-}
|
|
|
-
|
|
|
-void SimpleResult::SharedCtor() {
|
|
|
- ok_ = false;
|
|
|
-}
|
|
|
-
|
|
|
-SimpleResult::~SimpleResult() {
|
|
|
- // @@protoc_insertion_point(destructor:qtprotobuf.examples.SimpleResult)
|
|
|
- SharedDtor();
|
|
|
-}
|
|
|
-
|
|
|
-void SimpleResult::SharedDtor() {
|
|
|
-}
|
|
|
-
|
|
|
-void SimpleResult::SetCachedSize(int size) const {
|
|
|
- _cached_size_.Set(size);
|
|
|
-}
|
|
|
-const ::google::protobuf::Descriptor* SimpleResult::descriptor() {
|
|
|
- ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
|
-}
|
|
|
-
|
|
|
-const SimpleResult& SimpleResult::default_instance() {
|
|
|
- ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_SimpleResult.base);
|
|
|
- return *internal_default_instance();
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-void SimpleResult::Clear() {
|
|
|
-// @@protoc_insertion_point(message_clear_start:qtprotobuf.examples.SimpleResult)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- // Prevent compiler warnings about cached_has_bits being unused
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- ok_ = false;
|
|
|
- _internal_metadata_.Clear();
|
|
|
-}
|
|
|
-
|
|
|
-bool SimpleResult::MergePartialFromCodedStream(
|
|
|
- ::google::protobuf::io::CodedInputStream* input) {
|
|
|
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
|
- ::google::protobuf::uint32 tag;
|
|
|
- // @@protoc_insertion_point(parse_start:qtprotobuf.examples.SimpleResult)
|
|
|
- for (;;) {
|
|
|
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
|
- tag = p.first;
|
|
|
- if (!p.second) goto handle_unusual;
|
|
|
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
|
- // bool ok = 1;
|
|
|
- case 1: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
|
|
|
-
|
|
|
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
|
|
- input, &ok_)));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- default: {
|
|
|
- handle_unusual:
|
|
|
- if (tag == 0) {
|
|
|
- goto success;
|
|
|
- }
|
|
|
- DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
|
- input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-success:
|
|
|
- // @@protoc_insertion_point(parse_success:qtprotobuf.examples.SimpleResult)
|
|
|
- return true;
|
|
|
-failure:
|
|
|
- // @@protoc_insertion_point(parse_failure:qtprotobuf.examples.SimpleResult)
|
|
|
- return false;
|
|
|
-#undef DO_
|
|
|
-}
|
|
|
-
|
|
|
-void SimpleResult::SerializeWithCachedSizes(
|
|
|
- ::google::protobuf::io::CodedOutputStream* output) const {
|
|
|
- // @@protoc_insertion_point(serialize_start:qtprotobuf.examples.SimpleResult)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // bool ok = 1;
|
|
|
- if (this->ok() != 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->ok(), output);
|
|
|
- }
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_end:qtprotobuf.examples.SimpleResult)
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::uint8* SimpleResult::InternalSerializeWithCachedSizesToArray(
|
|
|
- bool deterministic, ::google::protobuf::uint8* target) const {
|
|
|
- (void)deterministic; // Unused
|
|
|
- // @@protoc_insertion_point(serialize_to_array_start:qtprotobuf.examples.SimpleResult)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // bool ok = 1;
|
|
|
- if (this->ok() != 0) {
|
|
|
- target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->ok(), target);
|
|
|
- }
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_to_array_end:qtprotobuf.examples.SimpleResult)
|
|
|
- return target;
|
|
|
-}
|
|
|
-
|
|
|
-size_t SimpleResult::ByteSizeLong() const {
|
|
|
-// @@protoc_insertion_point(message_byte_size_start:qtprotobuf.examples.SimpleResult)
|
|
|
- size_t total_size = 0;
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- total_size +=
|
|
|
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
|
|
|
- }
|
|
|
- // bool ok = 1;
|
|
|
- if (this->ok() != 0) {
|
|
|
- total_size += 1 + 1;
|
|
|
- }
|
|
|
-
|
|
|
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
|
- SetCachedSize(cached_size);
|
|
|
- return total_size;
|
|
|
-}
|
|
|
-
|
|
|
-void SimpleResult::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_merge_from_start:qtprotobuf.examples.SimpleResult)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- const SimpleResult* source =
|
|
|
- ::google::protobuf::internal::DynamicCastToGenerated<const SimpleResult>(
|
|
|
- &from);
|
|
|
- if (source == NULL) {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobuf.examples.SimpleResult)
|
|
|
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
|
- } else {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobuf.examples.SimpleResult)
|
|
|
- MergeFrom(*source);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void SimpleResult::MergeFrom(const SimpleResult& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_merge_from_start:qtprotobuf.examples.SimpleResult)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- if (from.ok() != 0) {
|
|
|
- set_ok(from.ok());
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void SimpleResult::CopyFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_copy_from_start:qtprotobuf.examples.SimpleResult)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-void SimpleResult::CopyFrom(const SimpleResult& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_copy_from_start:qtprotobuf.examples.SimpleResult)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-bool SimpleResult::IsInitialized() const {
|
|
|
- return true;
|
|
|
-}
|
|
|
-
|
|
|
-void SimpleResult::Swap(SimpleResult* other) {
|
|
|
- if (other == this) return;
|
|
|
- InternalSwap(other);
|
|
|
-}
|
|
|
-void SimpleResult::InternalSwap(SimpleResult* other) {
|
|
|
- using std::swap;
|
|
|
- swap(ok_, other->ok_);
|
|
|
- _internal_metadata_.Swap(&other->_internal_metadata_);
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::Metadata SimpleResult::GetMetadata() const {
|
|
|
- protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-// ===================================================================
|
|
|
-
|
|
|
-void ListFrame::InitAsDefaultInstance() {
|
|
|
-}
|
|
|
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-const int ListFrame::kStartFieldNumber;
|
|
|
-const int ListFrame::kEndFieldNumber;
|
|
|
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
-
|
|
|
-ListFrame::ListFrame()
|
|
|
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
|
|
- ::google::protobuf::internal::InitSCC(
|
|
|
- &protobuf_addressbook_2eproto::scc_info_ListFrame.base);
|
|
|
- SharedCtor();
|
|
|
- // @@protoc_insertion_point(constructor:qtprotobuf.examples.ListFrame)
|
|
|
-}
|
|
|
-ListFrame::ListFrame(const ListFrame& from)
|
|
|
- : ::google::protobuf::Message(),
|
|
|
- _internal_metadata_(NULL) {
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- ::memcpy(&start_, &from.start_,
|
|
|
- static_cast<size_t>(reinterpret_cast<char*>(&end_) -
|
|
|
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
|
|
|
- // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.ListFrame)
|
|
|
-}
|
|
|
-
|
|
|
-void ListFrame::SharedCtor() {
|
|
|
- ::memset(&start_, 0, static_cast<size_t>(
|
|
|
- reinterpret_cast<char*>(&end_) -
|
|
|
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
|
|
|
-}
|
|
|
-
|
|
|
-ListFrame::~ListFrame() {
|
|
|
- // @@protoc_insertion_point(destructor:qtprotobuf.examples.ListFrame)
|
|
|
- SharedDtor();
|
|
|
-}
|
|
|
-
|
|
|
-void ListFrame::SharedDtor() {
|
|
|
-}
|
|
|
-
|
|
|
-void ListFrame::SetCachedSize(int size) const {
|
|
|
- _cached_size_.Set(size);
|
|
|
-}
|
|
|
-const ::google::protobuf::Descriptor* ListFrame::descriptor() {
|
|
|
- ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
|
|
-}
|
|
|
-
|
|
|
-const ListFrame& ListFrame::default_instance() {
|
|
|
- ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_ListFrame.base);
|
|
|
- return *internal_default_instance();
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-void ListFrame::Clear() {
|
|
|
-// @@protoc_insertion_point(message_clear_start:qtprotobuf.examples.ListFrame)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- // Prevent compiler warnings about cached_has_bits being unused
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- ::memset(&start_, 0, static_cast<size_t>(
|
|
|
- reinterpret_cast<char*>(&end_) -
|
|
|
- reinterpret_cast<char*>(&start_)) + sizeof(end_));
|
|
|
- _internal_metadata_.Clear();
|
|
|
-}
|
|
|
-
|
|
|
-bool ListFrame::MergePartialFromCodedStream(
|
|
|
- ::google::protobuf::io::CodedInputStream* input) {
|
|
|
-#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
|
- ::google::protobuf::uint32 tag;
|
|
|
- // @@protoc_insertion_point(parse_start:qtprotobuf.examples.ListFrame)
|
|
|
- for (;;) {
|
|
|
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
|
- tag = p.first;
|
|
|
- if (!p.second) goto handle_unusual;
|
|
|
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
|
- // sint32 start = 1;
|
|
|
- case 1: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
|
|
|
-
|
|
|
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
|
|
|
- input, &start_)));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- // sint32 end = 2;
|
|
|
- case 2: {
|
|
|
- if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
- static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
|
|
|
-
|
|
|
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
|
|
|
- input, &end_)));
|
|
|
- } else {
|
|
|
- goto handle_unusual;
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- default: {
|
|
|
- handle_unusual:
|
|
|
- if (tag == 0) {
|
|
|
- goto success;
|
|
|
- }
|
|
|
- DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
|
- input, tag, _internal_metadata_.mutable_unknown_fields()));
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-success:
|
|
|
- // @@protoc_insertion_point(parse_success:qtprotobuf.examples.ListFrame)
|
|
|
- return true;
|
|
|
-failure:
|
|
|
- // @@protoc_insertion_point(parse_failure:qtprotobuf.examples.ListFrame)
|
|
|
- return false;
|
|
|
-#undef DO_
|
|
|
-}
|
|
|
-
|
|
|
-void ListFrame::SerializeWithCachedSizes(
|
|
|
- ::google::protobuf::io::CodedOutputStream* output) const {
|
|
|
- // @@protoc_insertion_point(serialize_start:qtprotobuf.examples.ListFrame)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // sint32 start = 1;
|
|
|
- if (this->start() != 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteSInt32(1, this->start(), output);
|
|
|
- }
|
|
|
-
|
|
|
- // sint32 end = 2;
|
|
|
- if (this->end() != 0) {
|
|
|
- ::google::protobuf::internal::WireFormatLite::WriteSInt32(2, this->end(), output);
|
|
|
- }
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_end:qtprotobuf.examples.ListFrame)
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::uint8* ListFrame::InternalSerializeWithCachedSizesToArray(
|
|
|
- bool deterministic, ::google::protobuf::uint8* target) const {
|
|
|
- (void)deterministic; // Unused
|
|
|
- // @@protoc_insertion_point(serialize_to_array_start:qtprotobuf.examples.ListFrame)
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- // sint32 start = 1;
|
|
|
- if (this->start() != 0) {
|
|
|
- target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(1, this->start(), target);
|
|
|
- }
|
|
|
-
|
|
|
- // sint32 end = 2;
|
|
|
- if (this->end() != 0) {
|
|
|
- target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(2, this->end(), target);
|
|
|
- }
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
|
|
|
- }
|
|
|
- // @@protoc_insertion_point(serialize_to_array_end:qtprotobuf.examples.ListFrame)
|
|
|
- return target;
|
|
|
-}
|
|
|
-
|
|
|
-size_t ListFrame::ByteSizeLong() const {
|
|
|
-// @@protoc_insertion_point(message_byte_size_start:qtprotobuf.examples.ListFrame)
|
|
|
- size_t total_size = 0;
|
|
|
-
|
|
|
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
- total_size +=
|
|
|
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
|
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
|
|
|
- }
|
|
|
- // sint32 start = 1;
|
|
|
- if (this->start() != 0) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::SInt32Size(
|
|
|
- this->start());
|
|
|
- }
|
|
|
-
|
|
|
- // sint32 end = 2;
|
|
|
- if (this->end() != 0) {
|
|
|
- total_size += 1 +
|
|
|
- ::google::protobuf::internal::WireFormatLite::SInt32Size(
|
|
|
- this->end());
|
|
|
- }
|
|
|
-
|
|
|
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
|
- SetCachedSize(cached_size);
|
|
|
- return total_size;
|
|
|
-}
|
|
|
-
|
|
|
-void ListFrame::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_merge_from_start:qtprotobuf.examples.ListFrame)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- const ListFrame* source =
|
|
|
- ::google::protobuf::internal::DynamicCastToGenerated<const ListFrame>(
|
|
|
- &from);
|
|
|
- if (source == NULL) {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobuf.examples.ListFrame)
|
|
|
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
|
- } else {
|
|
|
- // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobuf.examples.ListFrame)
|
|
|
- MergeFrom(*source);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void ListFrame::MergeFrom(const ListFrame& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_merge_from_start:qtprotobuf.examples.ListFrame)
|
|
|
- GOOGLE_DCHECK_NE(&from, this);
|
|
|
- _internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
- ::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
- (void) cached_has_bits;
|
|
|
-
|
|
|
- if (from.start() != 0) {
|
|
|
- set_start(from.start());
|
|
|
- }
|
|
|
- if (from.end() != 0) {
|
|
|
- set_end(from.end());
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-void ListFrame::CopyFrom(const ::google::protobuf::Message& from) {
|
|
|
-// @@protoc_insertion_point(generalized_copy_from_start:qtprotobuf.examples.ListFrame)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-void ListFrame::CopyFrom(const ListFrame& from) {
|
|
|
-// @@protoc_insertion_point(class_specific_copy_from_start:qtprotobuf.examples.ListFrame)
|
|
|
- if (&from == this) return;
|
|
|
- Clear();
|
|
|
- MergeFrom(from);
|
|
|
-}
|
|
|
-
|
|
|
-bool ListFrame::IsInitialized() const {
|
|
|
- return true;
|
|
|
-}
|
|
|
-
|
|
|
-void ListFrame::Swap(ListFrame* other) {
|
|
|
- if (other == this) return;
|
|
|
- InternalSwap(other);
|
|
|
-}
|
|
|
-void ListFrame::InternalSwap(ListFrame* other) {
|
|
|
- using std::swap;
|
|
|
- swap(start_, other->start_);
|
|
|
- swap(end_, other->end_);
|
|
|
- _internal_metadata_.Swap(&other->_internal_metadata_);
|
|
|
-}
|
|
|
-
|
|
|
-::google::protobuf::Metadata ListFrame::GetMetadata() const {
|
|
|
- protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
- return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-// @@protoc_insertion_point(namespace_scope)
|
|
|
-} // namespace examples
|
|
|
-} // namespace qtprotobuf
|
|
|
-namespace google {
|
|
|
-namespace protobuf {
|
|
|
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::PhoneNumber* Arena::CreateMaybeMessage< ::qtprotobuf::examples::PhoneNumber >(Arena* arena) {
|
|
|
- return Arena::CreateInternal< ::qtprotobuf::examples::PhoneNumber >(arena);
|
|
|
-}
|
|
|
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::Address* Arena::CreateMaybeMessage< ::qtprotobuf::examples::Address >(Arena* arena) {
|
|
|
- return Arena::CreateInternal< ::qtprotobuf::examples::Address >(arena);
|
|
|
-}
|
|
|
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::Job* Arena::CreateMaybeMessage< ::qtprotobuf::examples::Job >(Arena* arena) {
|
|
|
- return Arena::CreateInternal< ::qtprotobuf::examples::Job >(arena);
|
|
|
-}
|
|
|
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::Contact* Arena::CreateMaybeMessage< ::qtprotobuf::examples::Contact >(Arena* arena) {
|
|
|
- return Arena::CreateInternal< ::qtprotobuf::examples::Contact >(arena);
|
|
|
-}
|
|
|
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::Contacts* Arena::CreateMaybeMessage< ::qtprotobuf::examples::Contacts >(Arena* arena) {
|
|
|
- return Arena::CreateInternal< ::qtprotobuf::examples::Contacts >(arena);
|
|
|
-}
|
|
|
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::SimpleResult* Arena::CreateMaybeMessage< ::qtprotobuf::examples::SimpleResult >(Arena* arena) {
|
|
|
- return Arena::CreateInternal< ::qtprotobuf::examples::SimpleResult >(arena);
|
|
|
-}
|
|
|
-template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::ListFrame* Arena::CreateMaybeMessage< ::qtprotobuf::examples::ListFrame >(Arena* arena) {
|
|
|
- return Arena::CreateInternal< ::qtprotobuf::examples::ListFrame >(arena);
|
|
|
-}
|
|
|
-} // namespace protobuf
|
|
|
-} // namespace google
|
|
|
-
|
|
|
-// @@protoc_insertion_point(global_scope)
|