12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750 |
- // 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_Contact_PhonesEntry_DoNotUse;
- 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 Contact_PhonesEntry_DoNotUseDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Contact_PhonesEntry_DoNotUse>
- _instance;
- } _Contact_PhonesEntry_DoNotUse_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_PhonesEntry_DoNotUse() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::qtprotobuf::examples::_Contact_PhonesEntry_DoNotUse_default_instance_;
- new (ptr) ::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse();
- }
- ::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<1> scc_info_Contact_PhonesEntry_DoNotUse =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsContact_PhonesEntry_DoNotUse}, {
- &protobuf_addressbook_2eproto::scc_info_PhoneNumber.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_Contact_PhonesEntry_DoNotUse.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_PhonesEntry_DoNotUse.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[8];
- 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_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse, key_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse, value_),
- 0,
- 1,
- ~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, 31, sizeof(::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse)},
- { 33, -1, sizeof(::qtprotobuf::examples::Contact)},
- { 44, -1, sizeof(::qtprotobuf::examples::Contacts)},
- { 50, -1, sizeof(::qtprotobuf::examples::SimpleResult)},
- { 56, -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_PhonesEntry_DoNotUse_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, 8);
- }
- 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 \003(\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\"\333\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\0228\n\006phones\030\004 \003(\013"
- "2(.qtprotobuf.examples.Contact.PhonesEnt"
- "ry\022-\n\007address\030\005 \001(\0132\034.qtprotobuf.example"
- "s.Address\022%\n\003job\030\006 \001(\0132\030.qtprotobuf.exam"
- "ples.Job\032O\n\013PhonesEntry\022\013\n\003key\030\001 \001(\005\022/\n\005"
- "value\030\002 \001(\0132 .qtprotobuf.examples.PhoneN"
- "umber:\0028\001\"6\n\tPhoneType\022\010\n\004Home\020\000\022\010\n\004Work"
- "\020\001\022\n\n\006Mobile\020\002\022\t\n\005Other\020\003\"6\n\010Contacts\022*\n"
- "\004list\030\001 \003(\0132\034.qtprotobuf.examples.Contac"
- "t\"\032\n\014SimpleResult\022\n\n\002ok\030\001 \001(\010\"\'\n\tListFra"
- "me\022\r\n\005start\030\001 \001(\021\022\013\n\003end\030\002 \001(\0212\232\003\n\013Addre"
- "ssBook\022K\n\naddContact\022\034.qtprotobuf.exampl"
- "es.Contact\032\035.qtprotobuf.examples.Contact"
- "s\"\000\022N\n\rremoveContact\022\034.qtprotobuf.exampl"
- "es.Contact\032\035.qtprotobuf.examples.Contact"
- "s\"\000\022N\n\013getContacts\022\036.qtprotobuf.examples"
- ".ListFrame\032\035.qtprotobuf.examples.Contact"
- "s\"\000\022M\n\010makeCall\022\034.qtprotobuf.examples.Co"
- "ntact\032!.qtprotobuf.examples.SimpleResult"
- "\"\000\022O\n\nnavigateTo\022\034.qtprotobuf.examples.A"
- "ddress\032!.qtprotobuf.examples.SimpleResul"
- "t\"\000b\006proto3"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 1171);
- ::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),
- number_(from.number_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- countrycode_ = from.countrycode_;
- // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.PhoneNumber)
- }
- void PhoneNumber::SharedCtor() {
- countrycode_ = 0u;
- }
- 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;
- number_.Clear();
- countrycode_ = 0u;
- _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;
- }
- // repeated uint64 number = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, this->mutable_number())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- 1, 18u, input, this->mutable_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);
- }
- // repeated uint64 number = 2;
- if (this->number_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _number_cached_byte_size_));
- }
- for (int i = 0, n = this->number_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64NoTag(
- this->number(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.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);
- }
- // repeated uint64 number = 2;
- if (this->number_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 2,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- static_cast< ::google::protobuf::int32>(
- _number_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::
- WriteUInt64NoTagToArray(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()));
- }
- // repeated uint64 number = 2;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- UInt64Size(this->number_);
- if (data_size > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _number_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // 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;
- number_.MergeFrom(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;
- number_.InternalSwap(&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];
- }
- // ===================================================================
- Contact_PhonesEntry_DoNotUse::Contact_PhonesEntry_DoNotUse() {}
- Contact_PhonesEntry_DoNotUse::Contact_PhonesEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
- void Contact_PhonesEntry_DoNotUse::MergeFrom(const Contact_PhonesEntry_DoNotUse& other) {
- MergeFromInternal(other);
- }
- ::google::protobuf::Metadata Contact_PhonesEntry_DoNotUse::GetMetadata() const {
- ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_addressbook_2eproto::file_level_metadata[3];
- }
- void Contact_PhonesEntry_DoNotUse::MergeFrom(
- const ::google::protobuf::Message& other) {
- ::google::protobuf::Message::MergeFrom(other);
- }
- // ===================================================================
- 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) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- phones_.MergeFrom(from.phones_);
- 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;
- }
- // map<int32, .qtprotobuf.examples.PhoneNumber> phones = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
- Contact_PhonesEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
- Contact_PhonesEntry_DoNotUse,
- ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber,
- ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
- ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
- 0 >,
- ::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber > > parser(&phones_);
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, &parser));
- } 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);
- }
- // map<int32, .qtprotobuf.examples.PhoneNumber> phones = 4;
- if (!this->phones().empty()) {
- typedef ::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::const_pointer
- ConstPtr;
- typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
- typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
- if (output->IsSerializationDeterministic() &&
- this->phones().size() > 1) {
- ::std::unique_ptr<SortItem[]> items(
- new SortItem[this->phones().size()]);
- typedef ::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::size_type size_type;
- size_type n = 0;
- for (::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::const_iterator
- it = this->phones().begin();
- it != this->phones().end(); ++it, ++n) {
- items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
- }
- ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
- ::std::unique_ptr<Contact_PhonesEntry_DoNotUse> entry;
- for (size_type i = 0; i < n; i++) {
- entry.reset(phones_.NewEntryWrapper(
- items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 4, *entry, output);
- }
- } else {
- ::std::unique_ptr<Contact_PhonesEntry_DoNotUse> entry;
- for (::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::const_iterator
- it = this->phones().begin();
- it != this->phones().end(); ++it) {
- entry.reset(phones_.NewEntryWrapper(
- it->first, it->second));
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 4, *entry, 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);
- }
- // map<int32, .qtprotobuf.examples.PhoneNumber> phones = 4;
- if (!this->phones().empty()) {
- typedef ::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::const_pointer
- ConstPtr;
- typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
- typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
- if (deterministic &&
- this->phones().size() > 1) {
- ::std::unique_ptr<SortItem[]> items(
- new SortItem[this->phones().size()]);
- typedef ::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::size_type size_type;
- size_type n = 0;
- for (::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::const_iterator
- it = this->phones().begin();
- it != this->phones().end(); ++it, ++n) {
- items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
- }
- ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
- ::std::unique_ptr<Contact_PhonesEntry_DoNotUse> entry;
- for (size_type i = 0; i < n; i++) {
- entry.reset(phones_.NewEntryWrapper(
- items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 4, *entry, deterministic, target);
- ;
- }
- } else {
- ::std::unique_ptr<Contact_PhonesEntry_DoNotUse> entry;
- for (::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::const_iterator
- it = this->phones().begin();
- it != this->phones().end(); ++it) {
- entry.reset(phones_.NewEntryWrapper(
- it->first, it->second));
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 4, *entry, 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()));
- }
- // map<int32, .qtprotobuf.examples.PhoneNumber> phones = 4;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->phones_size());
- {
- ::std::unique_ptr<Contact_PhonesEntry_DoNotUse> entry;
- for (::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::const_iterator
- it = this->phones().begin();
- it != this->phones().end(); ++it) {
- entry.reset(phones_.NewEntryWrapper(it->first, it->second));
- total_size += ::google::protobuf::internal::WireFormatLite::
- MessageSizeNoVirtual(*entry);
- }
- }
- // 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;
- phones_.Swap(&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_PhonesEntry_DoNotUse* Arena::CreateMaybeMessage< ::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse >(Arena* arena) {
- return Arena::CreateInternal< ::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse >(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)
|