12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: google/protobuf/unittest_no_field_presence.proto
- #include <google/protobuf/unittest_no_field_presence.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_google_2fprotobuf_2funittest_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestRequired;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<6> scc_info_TestAllTypes;
- } // namespace protobuf_google_2fprotobuf_2funittest_2eproto
- namespace protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ForeignMessage;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_NestedMessage;
- } // namespace protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto
- namespace proto2_nofieldpresence_unittest {
- class TestAllTypes_NestedMessageDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes_NestedMessage>
- _instance;
- } _TestAllTypes_NestedMessage_default_instance_;
- class TestAllTypesDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes>
- _instance;
- ::google::protobuf::uint32 oneof_uint32_;
- const ::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage* oneof_nested_message_;
- ::google::protobuf::internal::ArenaStringPtr oneof_string_;
- int oneof_enum_;
- } _TestAllTypes_default_instance_;
- class TestProto2RequiredDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestProto2Required>
- _instance;
- } _TestProto2Required_default_instance_;
- class ForeignMessageDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<ForeignMessage>
- _instance;
- } _ForeignMessage_default_instance_;
- } // namespace proto2_nofieldpresence_unittest
- namespace protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto {
- static void InitDefaultsTestAllTypes_NestedMessage() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::proto2_nofieldpresence_unittest::_TestAllTypes_NestedMessage_default_instance_;
- new (ptr) ::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_NestedMessage =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestAllTypes_NestedMessage}, {}};
- static void InitDefaultsTestAllTypes() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::proto2_nofieldpresence_unittest::_TestAllTypes_default_instance_;
- new (ptr) ::proto2_nofieldpresence_unittest::TestAllTypes();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::proto2_nofieldpresence_unittest::TestAllTypes::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<3> scc_info_TestAllTypes =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsTestAllTypes}, {
- &protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::scc_info_TestAllTypes_NestedMessage.base,
- &protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::scc_info_ForeignMessage.base,
- &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};
- static void InitDefaultsTestProto2Required() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::proto2_nofieldpresence_unittest::_TestProto2Required_default_instance_;
- new (ptr) ::proto2_nofieldpresence_unittest::TestProto2Required();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::proto2_nofieldpresence_unittest::TestProto2Required::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<1> scc_info_TestProto2Required =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestProto2Required}, {
- &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequired.base,}};
- static void InitDefaultsForeignMessage() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::proto2_nofieldpresence_unittest::_ForeignMessage_default_instance_;
- new (ptr) ::proto2_nofieldpresence_unittest::ForeignMessage();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::proto2_nofieldpresence_unittest::ForeignMessage::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_ForeignMessage =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsForeignMessage}, {}};
- void InitDefaults() {
- ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes_NestedMessage.base);
- ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes.base);
- ::google::protobuf::internal::InitSCC(&scc_info_TestProto2Required.base);
- ::google::protobuf::internal::InitSCC(&scc_info_ForeignMessage.base);
- }
- ::google::protobuf::Metadata file_level_metadata[4];
- const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[2];
- const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage, bb_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, _internal_metadata_),
- ~0u, // no _extensions_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, _oneof_case_[0]),
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_int32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_int64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_uint32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_uint64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_sint32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_sint64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_fixed32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_fixed64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_sfixed32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_sfixed64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_float_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_double_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_bool_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_string_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_bytes_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_nested_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_foreign_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_proto2_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_nested_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_foreign_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_string_piece_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_cord_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, optional_lazy_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_int32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_int64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_uint32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_uint64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_sint32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_sint64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_fixed32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_fixed64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_sfixed32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_sfixed64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_float_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_double_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_bool_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_string_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_bytes_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_nested_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_foreign_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_proto2_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_nested_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_foreign_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_string_piece_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_cord_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, repeated_lazy_message_),
- offsetof(::proto2_nofieldpresence_unittest::TestAllTypesDefaultTypeInternal, oneof_uint32_),
- offsetof(::proto2_nofieldpresence_unittest::TestAllTypesDefaultTypeInternal, oneof_nested_message_),
- offsetof(::proto2_nofieldpresence_unittest::TestAllTypesDefaultTypeInternal, oneof_string_),
- offsetof(::proto2_nofieldpresence_unittest::TestAllTypesDefaultTypeInternal, oneof_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestAllTypes, oneof_field_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestProto2Required, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::TestProto2Required, proto2_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::ForeignMessage, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::proto2_nofieldpresence_unittest::ForeignMessage, c_),
- };
- static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage)},
- { 6, -1, sizeof(::proto2_nofieldpresence_unittest::TestAllTypes)},
- { 62, -1, sizeof(::proto2_nofieldpresence_unittest::TestProto2Required)},
- { 68, -1, sizeof(::proto2_nofieldpresence_unittest::ForeignMessage)},
- };
- static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::proto2_nofieldpresence_unittest::_TestAllTypes_NestedMessage_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::proto2_nofieldpresence_unittest::_TestAllTypes_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::proto2_nofieldpresence_unittest::_TestProto2Required_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::proto2_nofieldpresence_unittest::_ForeignMessage_default_instance_),
- };
- void protobuf_AssignDescriptors() {
- AddDescriptors();
- AssignDescriptors(
- "google/protobuf/unittest_no_field_presence.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, 4);
- }
- void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n0google/protobuf/unittest_no_field_pres"
- "ence.proto\022\037proto2_nofieldpresence_unitt"
- "est\032\036google/protobuf/unittest.proto\"\232\021\n\014"
- "TestAllTypes\022\026\n\016optional_int32\030\001 \001(\005\022\026\n\016"
- "optional_int64\030\002 \001(\003\022\027\n\017optional_uint32\030"
- "\003 \001(\r\022\027\n\017optional_uint64\030\004 \001(\004\022\027\n\017option"
- "al_sint32\030\005 \001(\021\022\027\n\017optional_sint64\030\006 \001(\022"
- "\022\030\n\020optional_fixed32\030\007 \001(\007\022\030\n\020optional_f"
- "ixed64\030\010 \001(\006\022\031\n\021optional_sfixed32\030\t \001(\017\022"
- "\031\n\021optional_sfixed64\030\n \001(\020\022\026\n\016optional_f"
- "loat\030\013 \001(\002\022\027\n\017optional_double\030\014 \001(\001\022\025\n\ro"
- "ptional_bool\030\r \001(\010\022\027\n\017optional_string\030\016 "
- "\001(\t\022\026\n\016optional_bytes\030\017 \001(\014\022\\\n\027optional_"
- "nested_message\030\022 \001(\0132;.proto2_nofieldpre"
- "sence_unittest.TestAllTypes.NestedMessag"
- "e\022Q\n\030optional_foreign_message\030\023 \001(\0132/.pr"
- "oto2_nofieldpresence_unittest.ForeignMes"
- "sage\022@\n\027optional_proto2_message\030\024 \001(\0132\037."
- "protobuf_unittest.TestAllTypes\022V\n\024option"
- "al_nested_enum\030\025 \001(\01628.proto2_nofieldpre"
- "sence_unittest.TestAllTypes.NestedEnum\022K"
- "\n\025optional_foreign_enum\030\026 \001(\0162,.proto2_n"
- "ofieldpresence_unittest.ForeignEnum\022!\n\025o"
- "ptional_string_piece\030\030 \001(\tB\002\010\002\022\031\n\roption"
- "al_cord\030\031 \001(\tB\002\010\001\022^\n\025optional_lazy_messa"
- "ge\030\036 \001(\0132;.proto2_nofieldpresence_unitte"
- "st.TestAllTypes.NestedMessageB\002(\001\022\026\n\016rep"
- "eated_int32\030\037 \003(\005\022\026\n\016repeated_int64\030 \003("
- "\003\022\027\n\017repeated_uint32\030! \003(\r\022\027\n\017repeated_u"
- "int64\030\" \003(\004\022\027\n\017repeated_sint32\030# \003(\021\022\027\n\017"
- "repeated_sint64\030$ \003(\022\022\030\n\020repeated_fixed3"
- "2\030% \003(\007\022\030\n\020repeated_fixed64\030& \003(\006\022\031\n\021rep"
- "eated_sfixed32\030\' \003(\017\022\031\n\021repeated_sfixed6"
- "4\030( \003(\020\022\026\n\016repeated_float\030) \003(\002\022\027\n\017repea"
- "ted_double\030* \003(\001\022\025\n\rrepeated_bool\030+ \003(\010\022"
- "\027\n\017repeated_string\030, \003(\t\022\026\n\016repeated_byt"
- "es\030- \003(\014\022\\\n\027repeated_nested_message\0300 \003("
- "\0132;.proto2_nofieldpresence_unittest.Test"
- "AllTypes.NestedMessage\022Q\n\030repeated_forei"
- "gn_message\0301 \003(\0132/.proto2_nofieldpresenc"
- "e_unittest.ForeignMessage\022@\n\027repeated_pr"
- "oto2_message\0302 \003(\0132\037.protobuf_unittest.T"
- "estAllTypes\022V\n\024repeated_nested_enum\0303 \003("
- "\01628.proto2_nofieldpresence_unittest.Test"
- "AllTypes.NestedEnum\022K\n\025repeated_foreign_"
- "enum\0304 \003(\0162,.proto2_nofieldpresence_unit"
- "test.ForeignEnum\022!\n\025repeated_string_piec"
- "e\0306 \003(\tB\002\010\002\022\031\n\rrepeated_cord\0307 \003(\tB\002\010\001\022^"
- "\n\025repeated_lazy_message\0309 \003(\0132;.proto2_n"
- "ofieldpresence_unittest.TestAllTypes.Nes"
- "tedMessageB\002(\001\022\026\n\014oneof_uint32\030o \001(\rH\000\022["
- "\n\024oneof_nested_message\030p \001(\0132;.proto2_no"
- "fieldpresence_unittest.TestAllTypes.Nest"
- "edMessageH\000\022\026\n\014oneof_string\030q \001(\tH\000\022N\n\no"
- "neof_enum\030r \001(\01628.proto2_nofieldpresence"
- "_unittest.TestAllTypes.NestedEnumH\000\032\033\n\rN"
- "estedMessage\022\n\n\002bb\030\001 \001(\005\"\'\n\nNestedEnum\022\007"
- "\n\003FOO\020\000\022\007\n\003BAR\020\001\022\007\n\003BAZ\020\002B\r\n\013oneof_field"
- "\"E\n\022TestProto2Required\022/\n\006proto2\030\001 \001(\0132\037"
- ".protobuf_unittest.TestRequired\"\033\n\016Forei"
- "gnMessage\022\t\n\001c\030\001 \001(\005*@\n\013ForeignEnum\022\017\n\013F"
- "OREIGN_FOO\020\000\022\017\n\013FOREIGN_BAR\020\001\022\017\n\013FOREIGN"
- "_BAZ\020\002b\006proto3"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 2494);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "google/protobuf/unittest_no_field_presence.proto", &protobuf_RegisterTypes);
- ::protobuf_google_2fprotobuf_2funittest_2eproto::AddDescriptors();
- }
- 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_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto
- namespace proto2_nofieldpresence_unittest {
- const ::google::protobuf::EnumDescriptor* TestAllTypes_NestedEnum_descriptor() {
- protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::file_level_enum_descriptors[0];
- }
- bool TestAllTypes_NestedEnum_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- case 2:
- return true;
- default:
- return false;
- }
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const TestAllTypes_NestedEnum TestAllTypes::FOO;
- const TestAllTypes_NestedEnum TestAllTypes::BAR;
- const TestAllTypes_NestedEnum TestAllTypes::BAZ;
- const TestAllTypes_NestedEnum TestAllTypes::NestedEnum_MIN;
- const TestAllTypes_NestedEnum TestAllTypes::NestedEnum_MAX;
- const int TestAllTypes::NestedEnum_ARRAYSIZE;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- const ::google::protobuf::EnumDescriptor* ForeignEnum_descriptor() {
- protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::file_level_enum_descriptors[1];
- }
- bool ForeignEnum_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- case 2:
- return true;
- default:
- return false;
- }
- }
- // ===================================================================
- void TestAllTypes_NestedMessage::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int TestAllTypes_NestedMessage::kBbFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestAllTypes_NestedMessage::TestAllTypes_NestedMessage()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::scc_info_TestAllTypes_NestedMessage.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- }
- TestAllTypes_NestedMessage::TestAllTypes_NestedMessage(const TestAllTypes_NestedMessage& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- bb_ = from.bb_;
- // @@protoc_insertion_point(copy_constructor:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- }
- void TestAllTypes_NestedMessage::SharedCtor() {
- bb_ = 0;
- }
- TestAllTypes_NestedMessage::~TestAllTypes_NestedMessage() {
- // @@protoc_insertion_point(destructor:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- SharedDtor();
- }
- void TestAllTypes_NestedMessage::SharedDtor() {
- }
- void TestAllTypes_NestedMessage::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* TestAllTypes_NestedMessage::descriptor() {
- ::protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const TestAllTypes_NestedMessage& TestAllTypes_NestedMessage::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::scc_info_TestAllTypes_NestedMessage.base);
- return *internal_default_instance();
- }
- void TestAllTypes_NestedMessage::Clear() {
- // @@protoc_insertion_point(message_clear_start:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- bb_ = 0;
- _internal_metadata_.Clear();
- }
- bool TestAllTypes_NestedMessage::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:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- 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)) {
- // int32 bb = 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_INT32>(
- input, &bb_)));
- } 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:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- return false;
- #undef DO_
- }
- void TestAllTypes_NestedMessage::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 bb = 1;
- if (this->bb() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->bb(), 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:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- }
- ::google::protobuf::uint8* TestAllTypes_NestedMessage::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 bb = 1;
- if (this->bb() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->bb(), 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:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- return target;
- }
- size_t TestAllTypes_NestedMessage::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- 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()));
- }
- // int32 bb = 1;
- if (this->bb() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->bb());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void TestAllTypes_NestedMessage::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- GOOGLE_DCHECK_NE(&from, this);
- const TestAllTypes_NestedMessage* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const TestAllTypes_NestedMessage>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- MergeFrom(*source);
- }
- }
- void TestAllTypes_NestedMessage::MergeFrom(const TestAllTypes_NestedMessage& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.bb() != 0) {
- set_bb(from.bb());
- }
- }
- void TestAllTypes_NestedMessage::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void TestAllTypes_NestedMessage::CopyFrom(const TestAllTypes_NestedMessage& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TestAllTypes_NestedMessage::IsInitialized() const {
- return true;
- }
- void TestAllTypes_NestedMessage::Swap(TestAllTypes_NestedMessage* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void TestAllTypes_NestedMessage::InternalSwap(TestAllTypes_NestedMessage* other) {
- using std::swap;
- swap(bb_, other->bb_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata TestAllTypes_NestedMessage::GetMetadata() const {
- protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void TestAllTypes::InitAsDefaultInstance() {
- ::proto2_nofieldpresence_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_nested_message_ = const_cast< ::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage*>(
- ::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage::internal_default_instance());
- ::proto2_nofieldpresence_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_foreign_message_ = const_cast< ::proto2_nofieldpresence_unittest::ForeignMessage*>(
- ::proto2_nofieldpresence_unittest::ForeignMessage::internal_default_instance());
- ::proto2_nofieldpresence_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_proto2_message_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
- ::protobuf_unittest::TestAllTypes::internal_default_instance());
- ::proto2_nofieldpresence_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_lazy_message_ = const_cast< ::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage*>(
- ::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage::internal_default_instance());
- ::proto2_nofieldpresence_unittest::_TestAllTypes_default_instance_.oneof_uint32_ = 0u;
- ::proto2_nofieldpresence_unittest::_TestAllTypes_default_instance_.oneof_nested_message_ = const_cast< ::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage*>(
- ::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage::internal_default_instance());
- ::proto2_nofieldpresence_unittest::_TestAllTypes_default_instance_.oneof_string_.UnsafeSetDefault(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::proto2_nofieldpresence_unittest::_TestAllTypes_default_instance_.oneof_enum_ = 0;
- }
- void TestAllTypes::clear_optional_proto2_message() {
- if (GetArenaNoVirtual() == NULL && optional_proto2_message_ != NULL) {
- delete optional_proto2_message_;
- }
- optional_proto2_message_ = NULL;
- }
- void TestAllTypes::clear_repeated_proto2_message() {
- repeated_proto2_message_.Clear();
- }
- void TestAllTypes::set_allocated_oneof_nested_message(::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage* oneof_nested_message) {
- ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
- clear_oneof_field();
- if (oneof_nested_message) {
- ::google::protobuf::Arena* submessage_arena = NULL;
- if (message_arena != submessage_arena) {
- oneof_nested_message = ::google::protobuf::internal::GetOwnedMessage(
- message_arena, oneof_nested_message, submessage_arena);
- }
- set_has_oneof_nested_message();
- oneof_field_.oneof_nested_message_ = oneof_nested_message;
- }
- // @@protoc_insertion_point(field_set_allocated:proto2_nofieldpresence_unittest.TestAllTypes.oneof_nested_message)
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int TestAllTypes::kOptionalInt32FieldNumber;
- const int TestAllTypes::kOptionalInt64FieldNumber;
- const int TestAllTypes::kOptionalUint32FieldNumber;
- const int TestAllTypes::kOptionalUint64FieldNumber;
- const int TestAllTypes::kOptionalSint32FieldNumber;
- const int TestAllTypes::kOptionalSint64FieldNumber;
- const int TestAllTypes::kOptionalFixed32FieldNumber;
- const int TestAllTypes::kOptionalFixed64FieldNumber;
- const int TestAllTypes::kOptionalSfixed32FieldNumber;
- const int TestAllTypes::kOptionalSfixed64FieldNumber;
- const int TestAllTypes::kOptionalFloatFieldNumber;
- const int TestAllTypes::kOptionalDoubleFieldNumber;
- const int TestAllTypes::kOptionalBoolFieldNumber;
- const int TestAllTypes::kOptionalStringFieldNumber;
- const int TestAllTypes::kOptionalBytesFieldNumber;
- const int TestAllTypes::kOptionalNestedMessageFieldNumber;
- const int TestAllTypes::kOptionalForeignMessageFieldNumber;
- const int TestAllTypes::kOptionalProto2MessageFieldNumber;
- const int TestAllTypes::kOptionalNestedEnumFieldNumber;
- const int TestAllTypes::kOptionalForeignEnumFieldNumber;
- const int TestAllTypes::kOptionalStringPieceFieldNumber;
- const int TestAllTypes::kOptionalCordFieldNumber;
- const int TestAllTypes::kOptionalLazyMessageFieldNumber;
- const int TestAllTypes::kRepeatedInt32FieldNumber;
- const int TestAllTypes::kRepeatedInt64FieldNumber;
- const int TestAllTypes::kRepeatedUint32FieldNumber;
- const int TestAllTypes::kRepeatedUint64FieldNumber;
- const int TestAllTypes::kRepeatedSint32FieldNumber;
- const int TestAllTypes::kRepeatedSint64FieldNumber;
- const int TestAllTypes::kRepeatedFixed32FieldNumber;
- const int TestAllTypes::kRepeatedFixed64FieldNumber;
- const int TestAllTypes::kRepeatedSfixed32FieldNumber;
- const int TestAllTypes::kRepeatedSfixed64FieldNumber;
- const int TestAllTypes::kRepeatedFloatFieldNumber;
- const int TestAllTypes::kRepeatedDoubleFieldNumber;
- const int TestAllTypes::kRepeatedBoolFieldNumber;
- const int TestAllTypes::kRepeatedStringFieldNumber;
- const int TestAllTypes::kRepeatedBytesFieldNumber;
- const int TestAllTypes::kRepeatedNestedMessageFieldNumber;
- const int TestAllTypes::kRepeatedForeignMessageFieldNumber;
- const int TestAllTypes::kRepeatedProto2MessageFieldNumber;
- const int TestAllTypes::kRepeatedNestedEnumFieldNumber;
- const int TestAllTypes::kRepeatedForeignEnumFieldNumber;
- const int TestAllTypes::kRepeatedStringPieceFieldNumber;
- const int TestAllTypes::kRepeatedCordFieldNumber;
- const int TestAllTypes::kRepeatedLazyMessageFieldNumber;
- const int TestAllTypes::kOneofUint32FieldNumber;
- const int TestAllTypes::kOneofNestedMessageFieldNumber;
- const int TestAllTypes::kOneofStringFieldNumber;
- const int TestAllTypes::kOneofEnumFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestAllTypes::TestAllTypes()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::scc_info_TestAllTypes.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:proto2_nofieldpresence_unittest.TestAllTypes)
- }
- TestAllTypes::TestAllTypes(const TestAllTypes& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- repeated_int32_(from.repeated_int32_),
- repeated_int64_(from.repeated_int64_),
- repeated_uint32_(from.repeated_uint32_),
- repeated_uint64_(from.repeated_uint64_),
- repeated_sint32_(from.repeated_sint32_),
- repeated_sint64_(from.repeated_sint64_),
- repeated_fixed32_(from.repeated_fixed32_),
- repeated_fixed64_(from.repeated_fixed64_),
- repeated_sfixed32_(from.repeated_sfixed32_),
- repeated_sfixed64_(from.repeated_sfixed64_),
- repeated_float_(from.repeated_float_),
- repeated_double_(from.repeated_double_),
- repeated_bool_(from.repeated_bool_),
- repeated_string_(from.repeated_string_),
- repeated_bytes_(from.repeated_bytes_),
- repeated_nested_message_(from.repeated_nested_message_),
- repeated_foreign_message_(from.repeated_foreign_message_),
- repeated_proto2_message_(from.repeated_proto2_message_),
- repeated_nested_enum_(from.repeated_nested_enum_),
- repeated_foreign_enum_(from.repeated_foreign_enum_),
- repeated_string_piece_(from.repeated_string_piece_),
- repeated_cord_(from.repeated_cord_),
- repeated_lazy_message_(from.repeated_lazy_message_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.optional_string().size() > 0) {
- optional_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_);
- }
- optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.optional_bytes().size() > 0) {
- optional_bytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes_);
- }
- optional_string_piece_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.optional_string_piece().size() > 0) {
- optional_string_piece_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_piece_);
- }
- optional_cord_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.optional_cord().size() > 0) {
- optional_cord_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_cord_);
- }
- if (from.has_optional_nested_message()) {
- optional_nested_message_ = new ::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage(*from.optional_nested_message_);
- } else {
- optional_nested_message_ = NULL;
- }
- if (from.has_optional_foreign_message()) {
- optional_foreign_message_ = new ::proto2_nofieldpresence_unittest::ForeignMessage(*from.optional_foreign_message_);
- } else {
- optional_foreign_message_ = NULL;
- }
- if (from.has_optional_proto2_message()) {
- optional_proto2_message_ = new ::protobuf_unittest::TestAllTypes(*from.optional_proto2_message_);
- } else {
- optional_proto2_message_ = NULL;
- }
- if (from.has_optional_lazy_message()) {
- optional_lazy_message_ = new ::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage(*from.optional_lazy_message_);
- } else {
- optional_lazy_message_ = NULL;
- }
- ::memcpy(&optional_int64_, &from.optional_int64_,
- static_cast<size_t>(reinterpret_cast<char*>(&optional_foreign_enum_) -
- reinterpret_cast<char*>(&optional_int64_)) + sizeof(optional_foreign_enum_));
- clear_has_oneof_field();
- switch (from.oneof_field_case()) {
- case kOneofUint32: {
- set_oneof_uint32(from.oneof_uint32());
- break;
- }
- case kOneofNestedMessage: {
- mutable_oneof_nested_message()->::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage::MergeFrom(from.oneof_nested_message());
- break;
- }
- case kOneofString: {
- set_oneof_string(from.oneof_string());
- break;
- }
- case kOneofEnum: {
- set_oneof_enum(from.oneof_enum());
- break;
- }
- case ONEOF_FIELD_NOT_SET: {
- break;
- }
- }
- // @@protoc_insertion_point(copy_constructor:proto2_nofieldpresence_unittest.TestAllTypes)
- }
- void TestAllTypes::SharedCtor() {
- optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_string_piece_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_cord_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::memset(&optional_nested_message_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&optional_foreign_enum_) -
- reinterpret_cast<char*>(&optional_nested_message_)) + sizeof(optional_foreign_enum_));
- clear_has_oneof_field();
- }
- TestAllTypes::~TestAllTypes() {
- // @@protoc_insertion_point(destructor:proto2_nofieldpresence_unittest.TestAllTypes)
- SharedDtor();
- }
- void TestAllTypes::SharedDtor() {
- optional_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_bytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_string_piece_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_cord_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete optional_nested_message_;
- if (this != internal_default_instance()) delete optional_foreign_message_;
- if (this != internal_default_instance()) delete optional_proto2_message_;
- if (this != internal_default_instance()) delete optional_lazy_message_;
- if (has_oneof_field()) {
- clear_oneof_field();
- }
- }
- void TestAllTypes::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* TestAllTypes::descriptor() {
- ::protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const TestAllTypes& TestAllTypes::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::scc_info_TestAllTypes.base);
- return *internal_default_instance();
- }
- void TestAllTypes::clear_oneof_field() {
- // @@protoc_insertion_point(one_of_clear_start:proto2_nofieldpresence_unittest.TestAllTypes)
- switch (oneof_field_case()) {
- case kOneofUint32: {
- // No need to clear
- break;
- }
- case kOneofNestedMessage: {
- delete oneof_field_.oneof_nested_message_;
- break;
- }
- case kOneofString: {
- oneof_field_.oneof_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- break;
- }
- case kOneofEnum: {
- // No need to clear
- break;
- }
- case ONEOF_FIELD_NOT_SET: {
- break;
- }
- }
- _oneof_case_[0] = ONEOF_FIELD_NOT_SET;
- }
- void TestAllTypes::Clear() {
- // @@protoc_insertion_point(message_clear_start:proto2_nofieldpresence_unittest.TestAllTypes)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- repeated_int32_.Clear();
- repeated_int64_.Clear();
- repeated_uint32_.Clear();
- repeated_uint64_.Clear();
- repeated_sint32_.Clear();
- repeated_sint64_.Clear();
- repeated_fixed32_.Clear();
- repeated_fixed64_.Clear();
- repeated_sfixed32_.Clear();
- repeated_sfixed64_.Clear();
- repeated_float_.Clear();
- repeated_double_.Clear();
- repeated_bool_.Clear();
- repeated_string_.Clear();
- repeated_bytes_.Clear();
- repeated_nested_message_.Clear();
- repeated_foreign_message_.Clear();
- repeated_proto2_message_.Clear();
- repeated_nested_enum_.Clear();
- repeated_foreign_enum_.Clear();
- repeated_string_piece_.Clear();
- repeated_cord_.Clear();
- repeated_lazy_message_.Clear();
- optional_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_bytes_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_string_piece_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_cord_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (GetArenaNoVirtual() == NULL && optional_nested_message_ != NULL) {
- delete optional_nested_message_;
- }
- optional_nested_message_ = NULL;
- if (GetArenaNoVirtual() == NULL && optional_foreign_message_ != NULL) {
- delete optional_foreign_message_;
- }
- optional_foreign_message_ = NULL;
- if (GetArenaNoVirtual() == NULL && optional_proto2_message_ != NULL) {
- delete optional_proto2_message_;
- }
- optional_proto2_message_ = NULL;
- if (GetArenaNoVirtual() == NULL && optional_lazy_message_ != NULL) {
- delete optional_lazy_message_;
- }
- optional_lazy_message_ = NULL;
- ::memset(&optional_int64_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&optional_foreign_enum_) -
- reinterpret_cast<char*>(&optional_int64_)) + sizeof(optional_foreign_enum_));
- clear_oneof_field();
- _internal_metadata_.Clear();
- }
- bool TestAllTypes::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:proto2_nofieldpresence_unittest.TestAllTypes)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // int32 optional_int32 = 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_INT32>(
- input, &optional_int32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // int64 optional_int64 = 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::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, &optional_int64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // uint32 optional_uint32 = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, &optional_uint32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // uint64 optional_uint64 = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, &optional_uint64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // sint32 optional_sint32 = 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::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- input, &optional_sint32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // sint64 optional_sint64 = 6;
- case 6: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- input, &optional_sint64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // fixed32 optional_fixed32 = 7;
- case 7: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
- input, &optional_fixed32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // fixed64 optional_fixed64 = 8;
- case 8: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(65u /* 65 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
- input, &optional_fixed64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // sfixed32 optional_sfixed32 = 9;
- case 9: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(77u /* 77 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
- input, &optional_sfixed32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // sfixed64 optional_sfixed64 = 10;
- case 10: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(81u /* 81 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
- input, &optional_sfixed64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // float optional_float = 11;
- case 11: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(93u /* 93 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- input, &optional_float_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // double optional_double = 12;
- case 12: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(97u /* 97 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &optional_double_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // bool optional_bool = 13;
- case 13: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, &optional_bool_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string optional_string = 14;
- case 14: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_optional_string()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_string().data(), static_cast<int>(this->optional_string().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "proto2_nofieldpresence_unittest.TestAllTypes.optional_string"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // bytes optional_bytes = 15;
- case 15: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->mutable_optional_bytes()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
- case 18: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(146u /* 146 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_optional_nested_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .proto2_nofieldpresence_unittest.ForeignMessage optional_foreign_message = 19;
- case 19: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(154u /* 154 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_optional_foreign_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .protobuf_unittest.TestAllTypes optional_proto2_message = 20;
- case 20: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(162u /* 162 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_optional_proto2_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
- case 21: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(168u /* 168 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- set_optional_nested_enum(static_cast< ::proto2_nofieldpresence_unittest::TestAllTypes_NestedEnum >(value));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .proto2_nofieldpresence_unittest.ForeignEnum optional_foreign_enum = 22;
- case 22: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(176u /* 176 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- set_optional_foreign_enum(static_cast< ::proto2_nofieldpresence_unittest::ForeignEnum >(value));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string optional_string_piece = 24 [ctype = STRING_PIECE];
- case 24: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(194u /* 194 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_optional_string_piece()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_string_piece().data(), static_cast<int>(this->optional_string_piece().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "proto2_nofieldpresence_unittest.TestAllTypes.optional_string_piece"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string optional_cord = 25 [ctype = CORD];
- case 25: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(202u /* 202 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_optional_cord()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_cord().data(), static_cast<int>(this->optional_cord().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "proto2_nofieldpresence_unittest.TestAllTypes.optional_cord"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage optional_lazy_message = 30 [lazy = true];
- case 30: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(242u /* 242 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_optional_lazy_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated int32 repeated_int32 = 31;
- case 31: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(250u /* 250 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, this->mutable_repeated_int32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(248u /* 248 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- 2, 250u, input, this->mutable_repeated_int32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated int64 repeated_int64 = 32;
- case 32: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(2u /* 258 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, this->mutable_repeated_int64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(0u /* 256 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- 2, 258u, input, this->mutable_repeated_int64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated uint32 repeated_uint32 = 33;
- case 33: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 266 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, this->mutable_repeated_uint32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 264 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- 2, 266u, input, this->mutable_repeated_uint32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated uint64 repeated_uint64 = 34;
- case 34: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 274 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, this->mutable_repeated_uint64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(16u /* 272 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- 2, 274u, input, this->mutable_repeated_uint64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sint32 repeated_sint32 = 35;
- case 35: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u /* 282 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- input, this->mutable_repeated_sint32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(24u /* 280 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- 2, 282u, input, this->mutable_repeated_sint32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sint64 repeated_sint64 = 36;
- case 36: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 290 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- input, this->mutable_repeated_sint64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(32u /* 288 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- 2, 290u, input, this->mutable_repeated_sint64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated fixed32 repeated_fixed32 = 37;
- case 37: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u /* 298 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
- input, this->mutable_repeated_fixed32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(45u /* 301 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
- 2, 298u, input, this->mutable_repeated_fixed32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated fixed64 repeated_fixed64 = 38;
- case 38: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(50u /* 306 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
- input, this->mutable_repeated_fixed64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(49u /* 305 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
- 2, 306u, input, this->mutable_repeated_fixed64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sfixed32 repeated_sfixed32 = 39;
- case 39: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(58u /* 314 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
- input, this->mutable_repeated_sfixed32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(61u /* 317 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
- 2, 314u, input, this->mutable_repeated_sfixed32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sfixed64 repeated_sfixed64 = 40;
- case 40: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(66u /* 322 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
- input, this->mutable_repeated_sfixed64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(65u /* 321 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
- 2, 322u, input, this->mutable_repeated_sfixed64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated float repeated_float = 41;
- case 41: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(74u /* 330 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- input, this->mutable_repeated_float())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(77u /* 333 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- 2, 330u, input, this->mutable_repeated_float())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated double repeated_double = 42;
- case 42: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(82u /* 338 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, this->mutable_repeated_double())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(81u /* 337 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- 2, 338u, input, this->mutable_repeated_double())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated bool repeated_bool = 43;
- case 43: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(90u /* 346 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, this->mutable_repeated_bool())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(88u /* 344 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- 2, 346u, input, this->mutable_repeated_bool())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated string repeated_string = 44;
- case 44: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(98u /* 354 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->add_repeated_string()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_string(this->repeated_string_size() - 1).data(),
- static_cast<int>(this->repeated_string(this->repeated_string_size() - 1).length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "proto2_nofieldpresence_unittest.TestAllTypes.repeated_string"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated bytes repeated_bytes = 45;
- case 45: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(106u /* 362 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->add_repeated_bytes()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
- case 48: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(130u /* 386 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, add_repeated_nested_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .proto2_nofieldpresence_unittest.ForeignMessage repeated_foreign_message = 49;
- case 49: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(138u /* 394 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, add_repeated_foreign_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .protobuf_unittest.TestAllTypes repeated_proto2_message = 50;
- case 50: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(146u /* 402 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, add_repeated_proto2_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .proto2_nofieldpresence_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
- case 51: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(154u /* 410 & 0xFF */)) {
- ::google::protobuf::uint32 length;
- DO_(input->ReadVarint32(&length));
- ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(static_cast<int>(length));
- while (input->BytesUntilLimit() > 0) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- add_repeated_nested_enum(static_cast< ::proto2_nofieldpresence_unittest::TestAllTypes_NestedEnum >(value));
- }
- input->PopLimit(limit);
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(152u /* 408 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- add_repeated_nested_enum(static_cast< ::proto2_nofieldpresence_unittest::TestAllTypes_NestedEnum >(value));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .proto2_nofieldpresence_unittest.ForeignEnum repeated_foreign_enum = 52;
- case 52: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(162u /* 418 & 0xFF */)) {
- ::google::protobuf::uint32 length;
- DO_(input->ReadVarint32(&length));
- ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(static_cast<int>(length));
- while (input->BytesUntilLimit() > 0) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- add_repeated_foreign_enum(static_cast< ::proto2_nofieldpresence_unittest::ForeignEnum >(value));
- }
- input->PopLimit(limit);
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(160u /* 416 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- add_repeated_foreign_enum(static_cast< ::proto2_nofieldpresence_unittest::ForeignEnum >(value));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
- case 54: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(178u /* 434 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->add_repeated_string_piece()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_string_piece(this->repeated_string_piece_size() - 1).data(),
- static_cast<int>(this->repeated_string_piece(this->repeated_string_piece_size() - 1).length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "proto2_nofieldpresence_unittest.TestAllTypes.repeated_string_piece"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated string repeated_cord = 55 [ctype = CORD];
- case 55: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(186u /* 442 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->add_repeated_cord()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_cord(this->repeated_cord_size() - 1).data(),
- static_cast<int>(this->repeated_cord(this->repeated_cord_size() - 1).length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "proto2_nofieldpresence_unittest.TestAllTypes.repeated_cord"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
- case 57: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(202u /* 458 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, add_repeated_lazy_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // uint32 oneof_uint32 = 111;
- case 111: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(120u /* 888 & 0xFF */)) {
- clear_oneof_field();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, &oneof_field_.oneof_uint32_)));
- set_has_oneof_uint32();
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage oneof_nested_message = 112;
- case 112: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(130u /* 898 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_oneof_nested_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string oneof_string = 113;
- case 113: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(138u /* 906 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_oneof_string()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "proto2_nofieldpresence_unittest.TestAllTypes.oneof_string"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedEnum oneof_enum = 114;
- case 114: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(144u /* 912 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- set_oneof_enum(static_cast< ::proto2_nofieldpresence_unittest::TestAllTypes_NestedEnum >(value));
- } 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:proto2_nofieldpresence_unittest.TestAllTypes)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:proto2_nofieldpresence_unittest.TestAllTypes)
- return false;
- #undef DO_
- }
- void TestAllTypes::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:proto2_nofieldpresence_unittest.TestAllTypes)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 optional_int32 = 1;
- if (this->optional_int32() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->optional_int32(), output);
- }
- // int64 optional_int64 = 2;
- if (this->optional_int64() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->optional_int64(), output);
- }
- // uint32 optional_uint32 = 3;
- if (this->optional_uint32() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->optional_uint32(), output);
- }
- // uint64 optional_uint64 = 4;
- if (this->optional_uint64() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->optional_uint64(), output);
- }
- // sint32 optional_sint32 = 5;
- if (this->optional_sint32() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt32(5, this->optional_sint32(), output);
- }
- // sint64 optional_sint64 = 6;
- if (this->optional_sint64() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt64(6, this->optional_sint64(), output);
- }
- // fixed32 optional_fixed32 = 7;
- if (this->optional_fixed32() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteFixed32(7, this->optional_fixed32(), output);
- }
- // fixed64 optional_fixed64 = 8;
- if (this->optional_fixed64() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteFixed64(8, this->optional_fixed64(), output);
- }
- // sfixed32 optional_sfixed32 = 9;
- if (this->optional_sfixed32() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteSFixed32(9, this->optional_sfixed32(), output);
- }
- // sfixed64 optional_sfixed64 = 10;
- if (this->optional_sfixed64() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteSFixed64(10, this->optional_sfixed64(), output);
- }
- // float optional_float = 11;
- if (this->optional_float() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteFloat(11, this->optional_float(), output);
- }
- // double optional_double = 12;
- if (this->optional_double() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(12, this->optional_double(), output);
- }
- // bool optional_bool = 13;
- if (this->optional_bool() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteBool(13, this->optional_bool(), output);
- }
- // string optional_string = 14;
- if (this->optional_string().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_string().data(), static_cast<int>(this->optional_string().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto2_nofieldpresence_unittest.TestAllTypes.optional_string");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 14, this->optional_string(), output);
- }
- // bytes optional_bytes = 15;
- if (this->optional_bytes().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
- 15, this->optional_bytes(), output);
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
- if (this->has_optional_nested_message()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 18, this->_internal_optional_nested_message(), output);
- }
- // .proto2_nofieldpresence_unittest.ForeignMessage optional_foreign_message = 19;
- if (this->has_optional_foreign_message()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 19, this->_internal_optional_foreign_message(), output);
- }
- // .protobuf_unittest.TestAllTypes optional_proto2_message = 20;
- if (this->has_optional_proto2_message()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 20, this->_internal_optional_proto2_message(), output);
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
- if (this->optional_nested_enum() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 21, this->optional_nested_enum(), output);
- }
- // .proto2_nofieldpresence_unittest.ForeignEnum optional_foreign_enum = 22;
- if (this->optional_foreign_enum() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 22, this->optional_foreign_enum(), output);
- }
- // string optional_string_piece = 24 [ctype = STRING_PIECE];
- if (this->optional_string_piece().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_string_piece().data(), static_cast<int>(this->optional_string_piece().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto2_nofieldpresence_unittest.TestAllTypes.optional_string_piece");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 24, this->optional_string_piece(), output);
- }
- // string optional_cord = 25 [ctype = CORD];
- if (this->optional_cord().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_cord().data(), static_cast<int>(this->optional_cord().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto2_nofieldpresence_unittest.TestAllTypes.optional_cord");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 25, this->optional_cord(), output);
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage optional_lazy_message = 30 [lazy = true];
- if (this->has_optional_lazy_message()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 30, this->_internal_optional_lazy_message(), output);
- }
- // repeated int32 repeated_int32 = 31;
- if (this->repeated_int32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(31, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_int32_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
- this->repeated_int32(i), output);
- }
- // repeated int64 repeated_int64 = 32;
- if (this->repeated_int64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(32, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_int64_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_int64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag(
- this->repeated_int64(i), output);
- }
- // repeated uint32 repeated_uint32 = 33;
- if (this->repeated_uint32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(33, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_uint32_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_uint32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32NoTag(
- this->repeated_uint32(i), output);
- }
- // repeated uint64 repeated_uint64 = 34;
- if (this->repeated_uint64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(34, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_uint64_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_uint64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64NoTag(
- this->repeated_uint64(i), output);
- }
- // repeated sint32 repeated_sint32 = 35;
- if (this->repeated_sint32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(35, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_sint32_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_sint32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt32NoTag(
- this->repeated_sint32(i), output);
- }
- // repeated sint64 repeated_sint64 = 36;
- if (this->repeated_sint64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(36, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_sint64_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_sint64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt64NoTag(
- this->repeated_sint64(i), output);
- }
- // repeated fixed32 repeated_fixed32 = 37;
- if (this->repeated_fixed32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(37, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_fixed32_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteFixed32Array(
- this->repeated_fixed32().data(), this->repeated_fixed32_size(), output);
- }
- // repeated fixed64 repeated_fixed64 = 38;
- if (this->repeated_fixed64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(38, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_fixed64_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteFixed64Array(
- this->repeated_fixed64().data(), this->repeated_fixed64_size(), output);
- }
- // repeated sfixed32 repeated_sfixed32 = 39;
- if (this->repeated_sfixed32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(39, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_sfixed32_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteSFixed32Array(
- this->repeated_sfixed32().data(), this->repeated_sfixed32_size(), output);
- }
- // repeated sfixed64 repeated_sfixed64 = 40;
- if (this->repeated_sfixed64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(40, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_sfixed64_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteSFixed64Array(
- this->repeated_sfixed64().data(), this->repeated_sfixed64_size(), output);
- }
- // repeated float repeated_float = 41;
- if (this->repeated_float_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(41, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_float_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteFloatArray(
- this->repeated_float().data(), this->repeated_float_size(), output);
- }
- // repeated double repeated_double = 42;
- if (this->repeated_double_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(42, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_double_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteDoubleArray(
- this->repeated_double().data(), this->repeated_double_size(), output);
- }
- // repeated bool repeated_bool = 43;
- if (this->repeated_bool_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(43, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_bool_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteBoolArray(
- this->repeated_bool().data(), this->repeated_bool_size(), output);
- }
- // repeated string repeated_string = 44;
- for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_string(i).data(), static_cast<int>(this->repeated_string(i).length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto2_nofieldpresence_unittest.TestAllTypes.repeated_string");
- ::google::protobuf::internal::WireFormatLite::WriteString(
- 44, this->repeated_string(i), output);
- }
- // repeated bytes repeated_bytes = 45;
- for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteBytes(
- 45, this->repeated_bytes(i), output);
- }
- // repeated .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_nested_message_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 48,
- this->repeated_nested_message(static_cast<int>(i)),
- output);
- }
- // repeated .proto2_nofieldpresence_unittest.ForeignMessage repeated_foreign_message = 49;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_foreign_message_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 49,
- this->repeated_foreign_message(static_cast<int>(i)),
- output);
- }
- // repeated .protobuf_unittest.TestAllTypes repeated_proto2_message = 50;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_proto2_message_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 50,
- this->repeated_proto2_message(static_cast<int>(i)),
- output);
- }
- // repeated .proto2_nofieldpresence_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
- if (this->repeated_nested_enum_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(
- 51,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- output);
- output->WriteVarint32(
- static_cast< ::google::protobuf::uint32>(_repeated_nested_enum_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_nested_enum_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteEnumNoTag(
- this->repeated_nested_enum(i), output);
- }
- // repeated .proto2_nofieldpresence_unittest.ForeignEnum repeated_foreign_enum = 52;
- if (this->repeated_foreign_enum_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(
- 52,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- output);
- output->WriteVarint32(
- static_cast< ::google::protobuf::uint32>(_repeated_foreign_enum_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_foreign_enum_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteEnumNoTag(
- this->repeated_foreign_enum(i), output);
- }
- // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
- for (int i = 0, n = this->repeated_string_piece_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_string_piece(i).data(), static_cast<int>(this->repeated_string_piece(i).length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto2_nofieldpresence_unittest.TestAllTypes.repeated_string_piece");
- ::google::protobuf::internal::WireFormatLite::WriteString(
- 54, this->repeated_string_piece(i), output);
- }
- // repeated string repeated_cord = 55 [ctype = CORD];
- for (int i = 0, n = this->repeated_cord_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_cord(i).data(), static_cast<int>(this->repeated_cord(i).length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto2_nofieldpresence_unittest.TestAllTypes.repeated_cord");
- ::google::protobuf::internal::WireFormatLite::WriteString(
- 55, this->repeated_cord(i), output);
- }
- // repeated .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_lazy_message_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 57,
- this->repeated_lazy_message(static_cast<int>(i)),
- output);
- }
- // uint32 oneof_uint32 = 111;
- if (has_oneof_uint32()) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(111, this->oneof_uint32(), output);
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage oneof_nested_message = 112;
- if (has_oneof_nested_message()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 112, this->_internal_oneof_nested_message(), output);
- }
- // string oneof_string = 113;
- if (has_oneof_string()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto2_nofieldpresence_unittest.TestAllTypes.oneof_string");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 113, this->oneof_string(), output);
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedEnum oneof_enum = 114;
- if (has_oneof_enum()) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 114, this->oneof_enum(), 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:proto2_nofieldpresence_unittest.TestAllTypes)
- }
- ::google::protobuf::uint8* TestAllTypes::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:proto2_nofieldpresence_unittest.TestAllTypes)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 optional_int32 = 1;
- if (this->optional_int32() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->optional_int32(), target);
- }
- // int64 optional_int64 = 2;
- if (this->optional_int64() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->optional_int64(), target);
- }
- // uint32 optional_uint32 = 3;
- if (this->optional_uint32() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->optional_uint32(), target);
- }
- // uint64 optional_uint64 = 4;
- if (this->optional_uint64() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->optional_uint64(), target);
- }
- // sint32 optional_sint32 = 5;
- if (this->optional_sint32() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(5, this->optional_sint32(), target);
- }
- // sint64 optional_sint64 = 6;
- if (this->optional_sint64() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteSInt64ToArray(6, this->optional_sint64(), target);
- }
- // fixed32 optional_fixed32 = 7;
- if (this->optional_fixed32() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteFixed32ToArray(7, this->optional_fixed32(), target);
- }
- // fixed64 optional_fixed64 = 8;
- if (this->optional_fixed64() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteFixed64ToArray(8, this->optional_fixed64(), target);
- }
- // sfixed32 optional_sfixed32 = 9;
- if (this->optional_sfixed32() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteSFixed32ToArray(9, this->optional_sfixed32(), target);
- }
- // sfixed64 optional_sfixed64 = 10;
- if (this->optional_sfixed64() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteSFixed64ToArray(10, this->optional_sfixed64(), target);
- }
- // float optional_float = 11;
- if (this->optional_float() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(11, this->optional_float(), target);
- }
- // double optional_double = 12;
- if (this->optional_double() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(12, this->optional_double(), target);
- }
- // bool optional_bool = 13;
- if (this->optional_bool() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(13, this->optional_bool(), target);
- }
- // string optional_string = 14;
- if (this->optional_string().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_string().data(), static_cast<int>(this->optional_string().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto2_nofieldpresence_unittest.TestAllTypes.optional_string");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 14, this->optional_string(), target);
- }
- // bytes optional_bytes = 15;
- if (this->optional_bytes().size() > 0) {
- target =
- ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
- 15, this->optional_bytes(), target);
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
- if (this->has_optional_nested_message()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 18, this->_internal_optional_nested_message(), deterministic, target);
- }
- // .proto2_nofieldpresence_unittest.ForeignMessage optional_foreign_message = 19;
- if (this->has_optional_foreign_message()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 19, this->_internal_optional_foreign_message(), deterministic, target);
- }
- // .protobuf_unittest.TestAllTypes optional_proto2_message = 20;
- if (this->has_optional_proto2_message()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 20, this->_internal_optional_proto2_message(), deterministic, target);
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
- if (this->optional_nested_enum() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 21, this->optional_nested_enum(), target);
- }
- // .proto2_nofieldpresence_unittest.ForeignEnum optional_foreign_enum = 22;
- if (this->optional_foreign_enum() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 22, this->optional_foreign_enum(), target);
- }
- // string optional_string_piece = 24 [ctype = STRING_PIECE];
- if (this->optional_string_piece().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_string_piece().data(), static_cast<int>(this->optional_string_piece().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto2_nofieldpresence_unittest.TestAllTypes.optional_string_piece");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 24, this->optional_string_piece(), target);
- }
- // string optional_cord = 25 [ctype = CORD];
- if (this->optional_cord().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_cord().data(), static_cast<int>(this->optional_cord().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto2_nofieldpresence_unittest.TestAllTypes.optional_cord");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 25, this->optional_cord(), target);
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage optional_lazy_message = 30 [lazy = true];
- if (this->has_optional_lazy_message()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 30, this->_internal_optional_lazy_message(), deterministic, target);
- }
- // repeated int32 repeated_int32 = 31;
- if (this->repeated_int32_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 31,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- static_cast< ::google::protobuf::int32>(
- _repeated_int32_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32NoTagToArray(this->repeated_int32_, target);
- }
- // repeated int64 repeated_int64 = 32;
- if (this->repeated_int64_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 32,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- static_cast< ::google::protobuf::int32>(
- _repeated_int64_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt64NoTagToArray(this->repeated_int64_, target);
- }
- // repeated uint32 repeated_uint32 = 33;
- if (this->repeated_uint32_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 33,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- static_cast< ::google::protobuf::int32>(
- _repeated_uint32_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::
- WriteUInt32NoTagToArray(this->repeated_uint32_, target);
- }
- // repeated uint64 repeated_uint64 = 34;
- if (this->repeated_uint64_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 34,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- static_cast< ::google::protobuf::int32>(
- _repeated_uint64_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::
- WriteUInt64NoTagToArray(this->repeated_uint64_, target);
- }
- // repeated sint32 repeated_sint32 = 35;
- if (this->repeated_sint32_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 35,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- static_cast< ::google::protobuf::int32>(
- _repeated_sint32_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::
- WriteSInt32NoTagToArray(this->repeated_sint32_, target);
- }
- // repeated sint64 repeated_sint64 = 36;
- if (this->repeated_sint64_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 36,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- static_cast< ::google::protobuf::int32>(
- _repeated_sint64_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::
- WriteSInt64NoTagToArray(this->repeated_sint64_, target);
- }
- // repeated fixed32 repeated_fixed32 = 37;
- if (this->repeated_fixed32_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 37,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- static_cast< ::google::protobuf::int32>(
- _repeated_fixed32_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::
- WriteFixed32NoTagToArray(this->repeated_fixed32_, target);
- }
- // repeated fixed64 repeated_fixed64 = 38;
- if (this->repeated_fixed64_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 38,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- static_cast< ::google::protobuf::int32>(
- _repeated_fixed64_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::
- WriteFixed64NoTagToArray(this->repeated_fixed64_, target);
- }
- // repeated sfixed32 repeated_sfixed32 = 39;
- if (this->repeated_sfixed32_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 39,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- static_cast< ::google::protobuf::int32>(
- _repeated_sfixed32_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::
- WriteSFixed32NoTagToArray(this->repeated_sfixed32_, target);
- }
- // repeated sfixed64 repeated_sfixed64 = 40;
- if (this->repeated_sfixed64_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 40,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- static_cast< ::google::protobuf::int32>(
- _repeated_sfixed64_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::
- WriteSFixed64NoTagToArray(this->repeated_sfixed64_, target);
- }
- // repeated float repeated_float = 41;
- if (this->repeated_float_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 41,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- static_cast< ::google::protobuf::int32>(
- _repeated_float_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::
- WriteFloatNoTagToArray(this->repeated_float_, target);
- }
- // repeated double repeated_double = 42;
- if (this->repeated_double_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 42,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- static_cast< ::google::protobuf::int32>(
- _repeated_double_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::
- WriteDoubleNoTagToArray(this->repeated_double_, target);
- }
- // repeated bool repeated_bool = 43;
- if (this->repeated_bool_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 43,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
- static_cast< ::google::protobuf::int32>(
- _repeated_bool_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::
- WriteBoolNoTagToArray(this->repeated_bool_, target);
- }
- // repeated string repeated_string = 44;
- for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_string(i).data(), static_cast<int>(this->repeated_string(i).length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto2_nofieldpresence_unittest.TestAllTypes.repeated_string");
- target = ::google::protobuf::internal::WireFormatLite::
- WriteStringToArray(44, this->repeated_string(i), target);
- }
- // repeated bytes repeated_bytes = 45;
- for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteBytesToArray(45, this->repeated_bytes(i), target);
- }
- // repeated .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_nested_message_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 48, this->repeated_nested_message(static_cast<int>(i)), deterministic, target);
- }
- // repeated .proto2_nofieldpresence_unittest.ForeignMessage repeated_foreign_message = 49;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_foreign_message_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 49, this->repeated_foreign_message(static_cast<int>(i)), deterministic, target);
- }
- // repeated .protobuf_unittest.TestAllTypes repeated_proto2_message = 50;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_proto2_message_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 50, this->repeated_proto2_message(static_cast<int>(i)), deterministic, target);
- }
- // repeated .proto2_nofieldpresence_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
- if (this->repeated_nested_enum_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 51,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( static_cast< ::google::protobuf::uint32>(
- _repeated_nested_enum_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumNoTagToArray(
- this->repeated_nested_enum_, target);
- }
- // repeated .proto2_nofieldpresence_unittest.ForeignEnum repeated_foreign_enum = 52;
- if (this->repeated_foreign_enum_size() > 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
- 52,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- target);
- target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( static_cast< ::google::protobuf::uint32>(
- _repeated_foreign_enum_cached_byte_size_), target);
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumNoTagToArray(
- this->repeated_foreign_enum_, target);
- }
- // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
- for (int i = 0, n = this->repeated_string_piece_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_string_piece(i).data(), static_cast<int>(this->repeated_string_piece(i).length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto2_nofieldpresence_unittest.TestAllTypes.repeated_string_piece");
- target = ::google::protobuf::internal::WireFormatLite::
- WriteStringToArray(54, this->repeated_string_piece(i), target);
- }
- // repeated string repeated_cord = 55 [ctype = CORD];
- for (int i = 0, n = this->repeated_cord_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_cord(i).data(), static_cast<int>(this->repeated_cord(i).length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto2_nofieldpresence_unittest.TestAllTypes.repeated_cord");
- target = ::google::protobuf::internal::WireFormatLite::
- WriteStringToArray(55, this->repeated_cord(i), target);
- }
- // repeated .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_lazy_message_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 57, this->repeated_lazy_message(static_cast<int>(i)), deterministic, target);
- }
- // uint32 oneof_uint32 = 111;
- if (has_oneof_uint32()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(111, this->oneof_uint32(), target);
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage oneof_nested_message = 112;
- if (has_oneof_nested_message()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 112, this->_internal_oneof_nested_message(), deterministic, target);
- }
- // string oneof_string = 113;
- if (has_oneof_string()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto2_nofieldpresence_unittest.TestAllTypes.oneof_string");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 113, this->oneof_string(), target);
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedEnum oneof_enum = 114;
- if (has_oneof_enum()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 114, this->oneof_enum(), 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:proto2_nofieldpresence_unittest.TestAllTypes)
- return target;
- }
- size_t TestAllTypes::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:proto2_nofieldpresence_unittest.TestAllTypes)
- 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 int32 repeated_int32 = 31;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- Int32Size(this->repeated_int32_);
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_int32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated int64 repeated_int64 = 32;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- Int64Size(this->repeated_int64_);
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_int64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated uint32 repeated_uint32 = 33;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- UInt32Size(this->repeated_uint32_);
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_uint32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated uint64 repeated_uint64 = 34;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- UInt64Size(this->repeated_uint64_);
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_uint64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated sint32 repeated_sint32 = 35;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- SInt32Size(this->repeated_sint32_);
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_sint32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated sint64 repeated_sint64 = 36;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- SInt64Size(this->repeated_sint64_);
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_sint64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated fixed32 repeated_fixed32 = 37;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_fixed32_size());
- size_t data_size = 4UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_fixed32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated fixed64 repeated_fixed64 = 38;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_fixed64_size());
- size_t data_size = 8UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_fixed64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated sfixed32 repeated_sfixed32 = 39;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_sfixed32_size());
- size_t data_size = 4UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_sfixed32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated sfixed64 repeated_sfixed64 = 40;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_sfixed64_size());
- size_t data_size = 8UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_sfixed64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated float repeated_float = 41;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_float_size());
- size_t data_size = 4UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_float_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated double repeated_double = 42;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_double_size());
- size_t data_size = 8UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_double_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated bool repeated_bool = 43;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_bool_size());
- size_t data_size = 1UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_bool_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated string repeated_string = 44;
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_string_size());
- for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
- this->repeated_string(i));
- }
- // repeated bytes repeated_bytes = 45;
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_bytes_size());
- for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->repeated_bytes(i));
- }
- // repeated .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_nested_message_size());
- total_size += 2UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->repeated_nested_message(static_cast<int>(i)));
- }
- }
- // repeated .proto2_nofieldpresence_unittest.ForeignMessage repeated_foreign_message = 49;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_foreign_message_size());
- total_size += 2UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->repeated_foreign_message(static_cast<int>(i)));
- }
- }
- // repeated .protobuf_unittest.TestAllTypes repeated_proto2_message = 50;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_proto2_message_size());
- total_size += 2UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->repeated_proto2_message(static_cast<int>(i)));
- }
- }
- // repeated .proto2_nofieldpresence_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
- {
- size_t data_size = 0;
- unsigned int count = static_cast<unsigned int>(this->repeated_nested_enum_size());for (unsigned int i = 0; i < count; i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
- this->repeated_nested_enum(static_cast<int>(i)));
- }
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_nested_enum_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated .proto2_nofieldpresence_unittest.ForeignEnum repeated_foreign_enum = 52;
- {
- size_t data_size = 0;
- unsigned int count = static_cast<unsigned int>(this->repeated_foreign_enum_size());for (unsigned int i = 0; i < count; i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
- this->repeated_foreign_enum(static_cast<int>(i)));
- }
- if (data_size > 0) {
- total_size += 2 +
- ::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();
- _repeated_foreign_enum_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_string_piece_size());
- for (int i = 0, n = this->repeated_string_piece_size(); i < n; i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
- this->repeated_string_piece(i));
- }
- // repeated string repeated_cord = 55 [ctype = CORD];
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_cord_size());
- for (int i = 0, n = this->repeated_cord_size(); i < n; i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
- this->repeated_cord(i));
- }
- // repeated .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_lazy_message_size());
- total_size += 2UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->repeated_lazy_message(static_cast<int>(i)));
- }
- }
- // string optional_string = 14;
- if (this->optional_string().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->optional_string());
- }
- // bytes optional_bytes = 15;
- if (this->optional_bytes().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->optional_bytes());
- }
- // string optional_string_piece = 24 [ctype = STRING_PIECE];
- if (this->optional_string_piece().size() > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->optional_string_piece());
- }
- // string optional_cord = 25 [ctype = CORD];
- if (this->optional_cord().size() > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->optional_cord());
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
- if (this->has_optional_nested_message()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *optional_nested_message_);
- }
- // .proto2_nofieldpresence_unittest.ForeignMessage optional_foreign_message = 19;
- if (this->has_optional_foreign_message()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *optional_foreign_message_);
- }
- // .protobuf_unittest.TestAllTypes optional_proto2_message = 20;
- if (this->has_optional_proto2_message()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *optional_proto2_message_);
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage optional_lazy_message = 30 [lazy = true];
- if (this->has_optional_lazy_message()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *optional_lazy_message_);
- }
- // int64 optional_int64 = 2;
- if (this->optional_int64() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int64Size(
- this->optional_int64());
- }
- // int32 optional_int32 = 1;
- if (this->optional_int32() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->optional_int32());
- }
- // uint32 optional_uint32 = 3;
- if (this->optional_uint32() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt32Size(
- this->optional_uint32());
- }
- // uint64 optional_uint64 = 4;
- if (this->optional_uint64() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt64Size(
- this->optional_uint64());
- }
- // sint64 optional_sint64 = 6;
- if (this->optional_sint64() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::SInt64Size(
- this->optional_sint64());
- }
- // sint32 optional_sint32 = 5;
- if (this->optional_sint32() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::SInt32Size(
- this->optional_sint32());
- }
- // fixed32 optional_fixed32 = 7;
- if (this->optional_fixed32() != 0) {
- total_size += 1 + 4;
- }
- // fixed64 optional_fixed64 = 8;
- if (this->optional_fixed64() != 0) {
- total_size += 1 + 8;
- }
- // sfixed64 optional_sfixed64 = 10;
- if (this->optional_sfixed64() != 0) {
- total_size += 1 + 8;
- }
- // sfixed32 optional_sfixed32 = 9;
- if (this->optional_sfixed32() != 0) {
- total_size += 1 + 4;
- }
- // float optional_float = 11;
- if (this->optional_float() != 0) {
- total_size += 1 + 4;
- }
- // double optional_double = 12;
- if (this->optional_double() != 0) {
- total_size += 1 + 8;
- }
- // bool optional_bool = 13;
- if (this->optional_bool() != 0) {
- total_size += 1 + 1;
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
- if (this->optional_nested_enum() != 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_nested_enum());
- }
- // .proto2_nofieldpresence_unittest.ForeignEnum optional_foreign_enum = 22;
- if (this->optional_foreign_enum() != 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_foreign_enum());
- }
- switch (oneof_field_case()) {
- // uint32 oneof_uint32 = 111;
- case kOneofUint32: {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::UInt32Size(
- this->oneof_uint32());
- break;
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedMessage oneof_nested_message = 112;
- case kOneofNestedMessage: {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *oneof_field_.oneof_nested_message_);
- break;
- }
- // string oneof_string = 113;
- case kOneofString: {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->oneof_string());
- break;
- }
- // .proto2_nofieldpresence_unittest.TestAllTypes.NestedEnum oneof_enum = 114;
- case kOneofEnum: {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->oneof_enum());
- break;
- }
- case ONEOF_FIELD_NOT_SET: {
- break;
- }
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void TestAllTypes::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:proto2_nofieldpresence_unittest.TestAllTypes)
- GOOGLE_DCHECK_NE(&from, this);
- const TestAllTypes* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const TestAllTypes>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:proto2_nofieldpresence_unittest.TestAllTypes)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:proto2_nofieldpresence_unittest.TestAllTypes)
- MergeFrom(*source);
- }
- }
- void TestAllTypes::MergeFrom(const TestAllTypes& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:proto2_nofieldpresence_unittest.TestAllTypes)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- repeated_int32_.MergeFrom(from.repeated_int32_);
- repeated_int64_.MergeFrom(from.repeated_int64_);
- repeated_uint32_.MergeFrom(from.repeated_uint32_);
- repeated_uint64_.MergeFrom(from.repeated_uint64_);
- repeated_sint32_.MergeFrom(from.repeated_sint32_);
- repeated_sint64_.MergeFrom(from.repeated_sint64_);
- repeated_fixed32_.MergeFrom(from.repeated_fixed32_);
- repeated_fixed64_.MergeFrom(from.repeated_fixed64_);
- repeated_sfixed32_.MergeFrom(from.repeated_sfixed32_);
- repeated_sfixed64_.MergeFrom(from.repeated_sfixed64_);
- repeated_float_.MergeFrom(from.repeated_float_);
- repeated_double_.MergeFrom(from.repeated_double_);
- repeated_bool_.MergeFrom(from.repeated_bool_);
- repeated_string_.MergeFrom(from.repeated_string_);
- repeated_bytes_.MergeFrom(from.repeated_bytes_);
- repeated_nested_message_.MergeFrom(from.repeated_nested_message_);
- repeated_foreign_message_.MergeFrom(from.repeated_foreign_message_);
- repeated_proto2_message_.MergeFrom(from.repeated_proto2_message_);
- repeated_nested_enum_.MergeFrom(from.repeated_nested_enum_);
- repeated_foreign_enum_.MergeFrom(from.repeated_foreign_enum_);
- repeated_string_piece_.MergeFrom(from.repeated_string_piece_);
- repeated_cord_.MergeFrom(from.repeated_cord_);
- repeated_lazy_message_.MergeFrom(from.repeated_lazy_message_);
- if (from.optional_string().size() > 0) {
- optional_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_);
- }
- if (from.optional_bytes().size() > 0) {
- optional_bytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes_);
- }
- if (from.optional_string_piece().size() > 0) {
- optional_string_piece_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_piece_);
- }
- if (from.optional_cord().size() > 0) {
- optional_cord_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_cord_);
- }
- if (from.has_optional_nested_message()) {
- mutable_optional_nested_message()->::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage::MergeFrom(from.optional_nested_message());
- }
- if (from.has_optional_foreign_message()) {
- mutable_optional_foreign_message()->::proto2_nofieldpresence_unittest::ForeignMessage::MergeFrom(from.optional_foreign_message());
- }
- if (from.has_optional_proto2_message()) {
- mutable_optional_proto2_message()->::protobuf_unittest::TestAllTypes::MergeFrom(from.optional_proto2_message());
- }
- if (from.has_optional_lazy_message()) {
- mutable_optional_lazy_message()->::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage::MergeFrom(from.optional_lazy_message());
- }
- if (from.optional_int64() != 0) {
- set_optional_int64(from.optional_int64());
- }
- if (from.optional_int32() != 0) {
- set_optional_int32(from.optional_int32());
- }
- if (from.optional_uint32() != 0) {
- set_optional_uint32(from.optional_uint32());
- }
- if (from.optional_uint64() != 0) {
- set_optional_uint64(from.optional_uint64());
- }
- if (from.optional_sint64() != 0) {
- set_optional_sint64(from.optional_sint64());
- }
- if (from.optional_sint32() != 0) {
- set_optional_sint32(from.optional_sint32());
- }
- if (from.optional_fixed32() != 0) {
- set_optional_fixed32(from.optional_fixed32());
- }
- if (from.optional_fixed64() != 0) {
- set_optional_fixed64(from.optional_fixed64());
- }
- if (from.optional_sfixed64() != 0) {
- set_optional_sfixed64(from.optional_sfixed64());
- }
- if (from.optional_sfixed32() != 0) {
- set_optional_sfixed32(from.optional_sfixed32());
- }
- if (from.optional_float() != 0) {
- set_optional_float(from.optional_float());
- }
- if (from.optional_double() != 0) {
- set_optional_double(from.optional_double());
- }
- if (from.optional_bool() != 0) {
- set_optional_bool(from.optional_bool());
- }
- if (from.optional_nested_enum() != 0) {
- set_optional_nested_enum(from.optional_nested_enum());
- }
- if (from.optional_foreign_enum() != 0) {
- set_optional_foreign_enum(from.optional_foreign_enum());
- }
- switch (from.oneof_field_case()) {
- case kOneofUint32: {
- set_oneof_uint32(from.oneof_uint32());
- break;
- }
- case kOneofNestedMessage: {
- mutable_oneof_nested_message()->::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage::MergeFrom(from.oneof_nested_message());
- break;
- }
- case kOneofString: {
- set_oneof_string(from.oneof_string());
- break;
- }
- case kOneofEnum: {
- set_oneof_enum(from.oneof_enum());
- break;
- }
- case ONEOF_FIELD_NOT_SET: {
- break;
- }
- }
- }
- void TestAllTypes::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:proto2_nofieldpresence_unittest.TestAllTypes)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void TestAllTypes::CopyFrom(const TestAllTypes& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:proto2_nofieldpresence_unittest.TestAllTypes)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TestAllTypes::IsInitialized() const {
- return true;
- }
- void TestAllTypes::Swap(TestAllTypes* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void TestAllTypes::InternalSwap(TestAllTypes* other) {
- using std::swap;
- repeated_int32_.InternalSwap(&other->repeated_int32_);
- repeated_int64_.InternalSwap(&other->repeated_int64_);
- repeated_uint32_.InternalSwap(&other->repeated_uint32_);
- repeated_uint64_.InternalSwap(&other->repeated_uint64_);
- repeated_sint32_.InternalSwap(&other->repeated_sint32_);
- repeated_sint64_.InternalSwap(&other->repeated_sint64_);
- repeated_fixed32_.InternalSwap(&other->repeated_fixed32_);
- repeated_fixed64_.InternalSwap(&other->repeated_fixed64_);
- repeated_sfixed32_.InternalSwap(&other->repeated_sfixed32_);
- repeated_sfixed64_.InternalSwap(&other->repeated_sfixed64_);
- repeated_float_.InternalSwap(&other->repeated_float_);
- repeated_double_.InternalSwap(&other->repeated_double_);
- repeated_bool_.InternalSwap(&other->repeated_bool_);
- repeated_string_.InternalSwap(CastToBase(&other->repeated_string_));
- repeated_bytes_.InternalSwap(CastToBase(&other->repeated_bytes_));
- CastToBase(&repeated_nested_message_)->InternalSwap(CastToBase(&other->repeated_nested_message_));
- CastToBase(&repeated_foreign_message_)->InternalSwap(CastToBase(&other->repeated_foreign_message_));
- CastToBase(&repeated_proto2_message_)->InternalSwap(CastToBase(&other->repeated_proto2_message_));
- repeated_nested_enum_.InternalSwap(&other->repeated_nested_enum_);
- repeated_foreign_enum_.InternalSwap(&other->repeated_foreign_enum_);
- repeated_string_piece_.InternalSwap(CastToBase(&other->repeated_string_piece_));
- repeated_cord_.InternalSwap(CastToBase(&other->repeated_cord_));
- CastToBase(&repeated_lazy_message_)->InternalSwap(CastToBase(&other->repeated_lazy_message_));
- optional_string_.Swap(&other->optional_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- optional_bytes_.Swap(&other->optional_bytes_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- optional_string_piece_.Swap(&other->optional_string_piece_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- optional_cord_.Swap(&other->optional_cord_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(optional_nested_message_, other->optional_nested_message_);
- swap(optional_foreign_message_, other->optional_foreign_message_);
- swap(optional_proto2_message_, other->optional_proto2_message_);
- swap(optional_lazy_message_, other->optional_lazy_message_);
- swap(optional_int64_, other->optional_int64_);
- swap(optional_int32_, other->optional_int32_);
- swap(optional_uint32_, other->optional_uint32_);
- swap(optional_uint64_, other->optional_uint64_);
- swap(optional_sint64_, other->optional_sint64_);
- swap(optional_sint32_, other->optional_sint32_);
- swap(optional_fixed32_, other->optional_fixed32_);
- swap(optional_fixed64_, other->optional_fixed64_);
- swap(optional_sfixed64_, other->optional_sfixed64_);
- swap(optional_sfixed32_, other->optional_sfixed32_);
- swap(optional_float_, other->optional_float_);
- swap(optional_double_, other->optional_double_);
- swap(optional_bool_, other->optional_bool_);
- swap(optional_nested_enum_, other->optional_nested_enum_);
- swap(optional_foreign_enum_, other->optional_foreign_enum_);
- swap(oneof_field_, other->oneof_field_);
- swap(_oneof_case_[0], other->_oneof_case_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata TestAllTypes::GetMetadata() const {
- protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void TestProto2Required::InitAsDefaultInstance() {
- ::proto2_nofieldpresence_unittest::_TestProto2Required_default_instance_._instance.get_mutable()->proto2_ = const_cast< ::protobuf_unittest::TestRequired*>(
- ::protobuf_unittest::TestRequired::internal_default_instance());
- }
- void TestProto2Required::clear_proto2() {
- if (GetArenaNoVirtual() == NULL && proto2_ != NULL) {
- delete proto2_;
- }
- proto2_ = NULL;
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int TestProto2Required::kProto2FieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestProto2Required::TestProto2Required()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::scc_info_TestProto2Required.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:proto2_nofieldpresence_unittest.TestProto2Required)
- }
- TestProto2Required::TestProto2Required(const TestProto2Required& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- if (from.has_proto2()) {
- proto2_ = new ::protobuf_unittest::TestRequired(*from.proto2_);
- } else {
- proto2_ = NULL;
- }
- // @@protoc_insertion_point(copy_constructor:proto2_nofieldpresence_unittest.TestProto2Required)
- }
- void TestProto2Required::SharedCtor() {
- proto2_ = NULL;
- }
- TestProto2Required::~TestProto2Required() {
- // @@protoc_insertion_point(destructor:proto2_nofieldpresence_unittest.TestProto2Required)
- SharedDtor();
- }
- void TestProto2Required::SharedDtor() {
- if (this != internal_default_instance()) delete proto2_;
- }
- void TestProto2Required::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* TestProto2Required::descriptor() {
- ::protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const TestProto2Required& TestProto2Required::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::scc_info_TestProto2Required.base);
- return *internal_default_instance();
- }
- void TestProto2Required::Clear() {
- // @@protoc_insertion_point(message_clear_start:proto2_nofieldpresence_unittest.TestProto2Required)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- if (GetArenaNoVirtual() == NULL && proto2_ != NULL) {
- delete proto2_;
- }
- proto2_ = NULL;
- _internal_metadata_.Clear();
- }
- bool TestProto2Required::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:proto2_nofieldpresence_unittest.TestProto2Required)
- 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)) {
- // .protobuf_unittest.TestRequired proto2 = 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, mutable_proto2()));
- } 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:proto2_nofieldpresence_unittest.TestProto2Required)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:proto2_nofieldpresence_unittest.TestProto2Required)
- return false;
- #undef DO_
- }
- void TestProto2Required::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:proto2_nofieldpresence_unittest.TestProto2Required)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .protobuf_unittest.TestRequired proto2 = 1;
- if (this->has_proto2()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->_internal_proto2(), 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:proto2_nofieldpresence_unittest.TestProto2Required)
- }
- ::google::protobuf::uint8* TestProto2Required::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:proto2_nofieldpresence_unittest.TestProto2Required)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .protobuf_unittest.TestRequired proto2 = 1;
- if (this->has_proto2()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 1, this->_internal_proto2(), 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:proto2_nofieldpresence_unittest.TestProto2Required)
- return target;
- }
- size_t TestProto2Required::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:proto2_nofieldpresence_unittest.TestProto2Required)
- 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()));
- }
- // .protobuf_unittest.TestRequired proto2 = 1;
- if (this->has_proto2()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *proto2_);
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void TestProto2Required::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:proto2_nofieldpresence_unittest.TestProto2Required)
- GOOGLE_DCHECK_NE(&from, this);
- const TestProto2Required* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const TestProto2Required>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:proto2_nofieldpresence_unittest.TestProto2Required)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:proto2_nofieldpresence_unittest.TestProto2Required)
- MergeFrom(*source);
- }
- }
- void TestProto2Required::MergeFrom(const TestProto2Required& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:proto2_nofieldpresence_unittest.TestProto2Required)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.has_proto2()) {
- mutable_proto2()->::protobuf_unittest::TestRequired::MergeFrom(from.proto2());
- }
- }
- void TestProto2Required::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:proto2_nofieldpresence_unittest.TestProto2Required)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void TestProto2Required::CopyFrom(const TestProto2Required& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:proto2_nofieldpresence_unittest.TestProto2Required)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TestProto2Required::IsInitialized() const {
- if (has_proto2()) {
- if (!this->proto2_->IsInitialized()) return false;
- }
- return true;
- }
- void TestProto2Required::Swap(TestProto2Required* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void TestProto2Required::InternalSwap(TestProto2Required* other) {
- using std::swap;
- swap(proto2_, other->proto2_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata TestProto2Required::GetMetadata() const {
- protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void ForeignMessage::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int ForeignMessage::kCFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- ForeignMessage::ForeignMessage()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::scc_info_ForeignMessage.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:proto2_nofieldpresence_unittest.ForeignMessage)
- }
- ForeignMessage::ForeignMessage(const ForeignMessage& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- c_ = from.c_;
- // @@protoc_insertion_point(copy_constructor:proto2_nofieldpresence_unittest.ForeignMessage)
- }
- void ForeignMessage::SharedCtor() {
- c_ = 0;
- }
- ForeignMessage::~ForeignMessage() {
- // @@protoc_insertion_point(destructor:proto2_nofieldpresence_unittest.ForeignMessage)
- SharedDtor();
- }
- void ForeignMessage::SharedDtor() {
- }
- void ForeignMessage::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* ForeignMessage::descriptor() {
- ::protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const ForeignMessage& ForeignMessage::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::scc_info_ForeignMessage.base);
- return *internal_default_instance();
- }
- void ForeignMessage::Clear() {
- // @@protoc_insertion_point(message_clear_start:proto2_nofieldpresence_unittest.ForeignMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- c_ = 0;
- _internal_metadata_.Clear();
- }
- bool ForeignMessage::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:proto2_nofieldpresence_unittest.ForeignMessage)
- 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)) {
- // int32 c = 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_INT32>(
- input, &c_)));
- } 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:proto2_nofieldpresence_unittest.ForeignMessage)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:proto2_nofieldpresence_unittest.ForeignMessage)
- return false;
- #undef DO_
- }
- void ForeignMessage::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:proto2_nofieldpresence_unittest.ForeignMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 c = 1;
- if (this->c() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->c(), 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:proto2_nofieldpresence_unittest.ForeignMessage)
- }
- ::google::protobuf::uint8* ForeignMessage::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:proto2_nofieldpresence_unittest.ForeignMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 c = 1;
- if (this->c() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->c(), 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:proto2_nofieldpresence_unittest.ForeignMessage)
- return target;
- }
- size_t ForeignMessage::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:proto2_nofieldpresence_unittest.ForeignMessage)
- 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()));
- }
- // int32 c = 1;
- if (this->c() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->c());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void ForeignMessage::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:proto2_nofieldpresence_unittest.ForeignMessage)
- GOOGLE_DCHECK_NE(&from, this);
- const ForeignMessage* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const ForeignMessage>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:proto2_nofieldpresence_unittest.ForeignMessage)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:proto2_nofieldpresence_unittest.ForeignMessage)
- MergeFrom(*source);
- }
- }
- void ForeignMessage::MergeFrom(const ForeignMessage& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:proto2_nofieldpresence_unittest.ForeignMessage)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.c() != 0) {
- set_c(from.c());
- }
- }
- void ForeignMessage::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:proto2_nofieldpresence_unittest.ForeignMessage)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void ForeignMessage::CopyFrom(const ForeignMessage& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:proto2_nofieldpresence_unittest.ForeignMessage)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool ForeignMessage::IsInitialized() const {
- return true;
- }
- void ForeignMessage::Swap(ForeignMessage* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void ForeignMessage::InternalSwap(ForeignMessage* other) {
- using std::swap;
- swap(c_, other->c_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata ForeignMessage::GetMetadata() const {
- protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5ffield_5fpresence_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace proto2_nofieldpresence_unittest
- namespace google {
- namespace protobuf {
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage* Arena::CreateMaybeMessage< ::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage >(Arena* arena) {
- return Arena::CreateInternal< ::proto2_nofieldpresence_unittest::TestAllTypes_NestedMessage >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::proto2_nofieldpresence_unittest::TestAllTypes* Arena::CreateMaybeMessage< ::proto2_nofieldpresence_unittest::TestAllTypes >(Arena* arena) {
- return Arena::CreateInternal< ::proto2_nofieldpresence_unittest::TestAllTypes >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::proto2_nofieldpresence_unittest::TestProto2Required* Arena::CreateMaybeMessage< ::proto2_nofieldpresence_unittest::TestProto2Required >(Arena* arena) {
- return Arena::CreateInternal< ::proto2_nofieldpresence_unittest::TestProto2Required >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::proto2_nofieldpresence_unittest::ForeignMessage* Arena::CreateMaybeMessage< ::proto2_nofieldpresence_unittest::ForeignMessage >(Arena* arena) {
- return Arena::CreateInternal< ::proto2_nofieldpresence_unittest::ForeignMessage >(arena);
- }
- } // namespace protobuf
- } // namespace google
- // @@protoc_insertion_point(global_scope)
|