123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: google/protobuf/unittest_no_arena.proto
- #include <google/protobuf/unittest_no_arena.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_5farena_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5farena_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_ArenaMessage;
- } // namespace protobuf_google_2fprotobuf_2funittest_5farena_2eproto
- namespace protobuf_google_2fprotobuf_2funittest_5fimport_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fimport_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ImportMessage;
- } // namespace protobuf_google_2fprotobuf_2funittest_5fimport_2eproto
- namespace protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PublicImportMessage;
- } // namespace protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto
- namespace protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ForeignMessage;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_NestedMessage;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_OptionalGroup;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_RepeatedGroup;
- } // namespace protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto
- namespace protobuf_unittest_no_arena {
- class TestAllTypes_NestedMessageDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes_NestedMessage>
- _instance;
- } _TestAllTypes_NestedMessage_default_instance_;
- class TestAllTypes_OptionalGroupDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes_OptionalGroup>
- _instance;
- } _TestAllTypes_OptionalGroup_default_instance_;
- class TestAllTypes_RepeatedGroupDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes_RepeatedGroup>
- _instance;
- } _TestAllTypes_RepeatedGroup_default_instance_;
- class TestAllTypesDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes>
- _instance;
- ::google::protobuf::uint32 oneof_uint32_;
- const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* oneof_nested_message_;
- ::google::protobuf::internal::ArenaStringPtr oneof_string_;
- ::google::protobuf::internal::ArenaStringPtr oneof_bytes_;
- const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* lazy_oneof_nested_message_;
- } _TestAllTypes_default_instance_;
- class ForeignMessageDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<ForeignMessage>
- _instance;
- } _ForeignMessage_default_instance_;
- class TestNoArenaMessageDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestNoArenaMessage>
- _instance;
- } _TestNoArenaMessage_default_instance_;
- } // namespace protobuf_unittest_no_arena
- namespace protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto {
- static void InitDefaultsTestAllTypes_NestedMessage() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::protobuf_unittest_no_arena::_TestAllTypes_NestedMessage_default_instance_;
- new (ptr) ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::protobuf_unittest_no_arena::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_OptionalGroup() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::protobuf_unittest_no_arena::_TestAllTypes_OptionalGroup_default_instance_;
- new (ptr) ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_OptionalGroup =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestAllTypes_OptionalGroup}, {}};
- static void InitDefaultsTestAllTypes_RepeatedGroup() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::protobuf_unittest_no_arena::_TestAllTypes_RepeatedGroup_default_instance_;
- new (ptr) ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_RepeatedGroup =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestAllTypes_RepeatedGroup}, {}};
- static void InitDefaultsTestAllTypes() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- ::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.DefaultConstruct();
- *::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get_mutable() = ::std::string("hello", 5);
- ::google::protobuf::internal::OnShutdownDestroyString(
- ::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get_mutable());
- ::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.DefaultConstruct();
- *::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get_mutable() = ::std::string("world", 5);
- ::google::protobuf::internal::OnShutdownDestroyString(
- ::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get_mutable());
- ::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.DefaultConstruct();
- *::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get_mutable() = ::std::string("abc", 3);
- ::google::protobuf::internal::OnShutdownDestroyString(
- ::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get_mutable());
- ::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.DefaultConstruct();
- *::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get_mutable() = ::std::string("123", 3);
- ::google::protobuf::internal::OnShutdownDestroyString(
- ::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get_mutable());
- {
- void* ptr = &::protobuf_unittest_no_arena::_TestAllTypes_default_instance_;
- new (ptr) ::protobuf_unittest_no_arena::TestAllTypes();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::protobuf_unittest_no_arena::TestAllTypes::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<6> scc_info_TestAllTypes =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 6, InitDefaultsTestAllTypes}, {
- &protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::scc_info_TestAllTypes_OptionalGroup.base,
- &protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::scc_info_TestAllTypes_NestedMessage.base,
- &protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::scc_info_ForeignMessage.base,
- &protobuf_google_2fprotobuf_2funittest_5fimport_2eproto::scc_info_ImportMessage.base,
- &protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto::scc_info_PublicImportMessage.base,
- &protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::scc_info_TestAllTypes_RepeatedGroup.base,}};
- static void InitDefaultsForeignMessage() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::protobuf_unittest_no_arena::_ForeignMessage_default_instance_;
- new (ptr) ::protobuf_unittest_no_arena::ForeignMessage();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::protobuf_unittest_no_arena::ForeignMessage::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_ForeignMessage =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsForeignMessage}, {}};
- static void InitDefaultsTestNoArenaMessage() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::protobuf_unittest_no_arena::_TestNoArenaMessage_default_instance_;
- new (ptr) ::protobuf_unittest_no_arena::TestNoArenaMessage();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::protobuf_unittest_no_arena::TestNoArenaMessage::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<1> scc_info_TestNoArenaMessage =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestNoArenaMessage}, {
- &protobuf_google_2fprotobuf_2funittest_5farena_2eproto::scc_info_ArenaMessage.base,}};
- void InitDefaults() {
- ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes_NestedMessage.base);
- ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes_OptionalGroup.base);
- ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes_RepeatedGroup.base);
- ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes.base);
- ::google::protobuf::internal::InitSCC(&scc_info_ForeignMessage.base);
- ::google::protobuf::internal::InitSCC(&scc_info_TestNoArenaMessage.base);
- }
- ::google::protobuf::Metadata file_level_metadata[6];
- const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[2];
- const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes_NestedMessage, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes_NestedMessage, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes_NestedMessage, bb_),
- 0,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup, a_),
- 0,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup, a_),
- 0,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, _internal_metadata_),
- ~0u, // no _extensions_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, _oneof_case_[0]),
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_int32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_int64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_uint32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_uint64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_sint32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_sint64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_fixed32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_fixed64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_sfixed32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_sfixed64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_float_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_double_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_bool_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_string_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_bytes_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optionalgroup_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_nested_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_foreign_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_import_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_nested_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_foreign_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_import_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_string_piece_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_cord_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_public_import_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, optional_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_int32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_int64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_uint32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_uint64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_sint32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_sint64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_fixed32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_fixed64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_sfixed32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_sfixed64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_float_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_double_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_bool_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_string_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_bytes_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeatedgroup_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_nested_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_foreign_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_import_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_nested_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_foreign_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_import_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_string_piece_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_cord_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, repeated_lazy_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_int32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_int64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_uint32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_uint64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_sint32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_sint64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_fixed32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_fixed64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_sfixed32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_sfixed64_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_float_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_double_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_bool_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_string_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_bytes_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_nested_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_foreign_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_import_enum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_string_piece_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, default_cord_),
- offsetof(::protobuf_unittest_no_arena::TestAllTypesDefaultTypeInternal, oneof_uint32_),
- offsetof(::protobuf_unittest_no_arena::TestAllTypesDefaultTypeInternal, oneof_nested_message_),
- offsetof(::protobuf_unittest_no_arena::TestAllTypesDefaultTypeInternal, oneof_string_),
- offsetof(::protobuf_unittest_no_arena::TestAllTypesDefaultTypeInternal, oneof_bytes_),
- offsetof(::protobuf_unittest_no_arena::TestAllTypesDefaultTypeInternal, lazy_oneof_nested_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestAllTypes, oneof_field_),
- 15,
- 14,
- 16,
- 17,
- 19,
- 18,
- 20,
- 21,
- 23,
- 22,
- 24,
- 25,
- 26,
- 0,
- 1,
- 8,
- 9,
- 10,
- 11,
- 28,
- 29,
- 30,
- 2,
- 3,
- 12,
- 13,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- 31,
- 32,
- 34,
- 33,
- 35,
- 36,
- 38,
- 37,
- 39,
- 40,
- 42,
- 41,
- 43,
- 4,
- 5,
- 44,
- 45,
- 27,
- 6,
- 7,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::ForeignMessage, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::ForeignMessage, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::ForeignMessage, c_),
- 0,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestNoArenaMessage, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestNoArenaMessage, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest_no_arena::TestNoArenaMessage, arena_message_),
- 0,
- };
- static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, 6, sizeof(::protobuf_unittest_no_arena::TestAllTypes_NestedMessage)},
- { 7, 13, sizeof(::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup)},
- { 14, 20, sizeof(::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup)},
- { 21, 103, sizeof(::protobuf_unittest_no_arena::TestAllTypes)},
- { 179, 185, sizeof(::protobuf_unittest_no_arena::ForeignMessage)},
- { 186, 192, sizeof(::protobuf_unittest_no_arena::TestNoArenaMessage)},
- };
- static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest_no_arena::_TestAllTypes_NestedMessage_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest_no_arena::_TestAllTypes_OptionalGroup_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest_no_arena::_TestAllTypes_RepeatedGroup_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest_no_arena::_TestAllTypes_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest_no_arena::_ForeignMessage_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest_no_arena::_TestNoArenaMessage_default_instance_),
- };
- void protobuf_AssignDescriptors() {
- AddDescriptors();
- AssignDescriptors(
- "google/protobuf/unittest_no_arena.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, 6);
- }
- void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n\'google/protobuf/unittest_no_arena.prot"
- "o\022\032protobuf_unittest_no_arena\032%google/pr"
- "otobuf/unittest_import.proto\032$google/pro"
- "tobuf/unittest_arena.proto\"\320\032\n\014TestAllTy"
- "pes\022\026\n\016optional_int32\030\001 \001(\005\022\026\n\016optional_"
- "int64\030\002 \001(\003\022\027\n\017optional_uint32\030\003 \001(\r\022\027\n\017"
- "optional_uint64\030\004 \001(\004\022\027\n\017optional_sint32"
- "\030\005 \001(\021\022\027\n\017optional_sint64\030\006 \001(\022\022\030\n\020optio"
- "nal_fixed32\030\007 \001(\007\022\030\n\020optional_fixed64\030\010 "
- "\001(\006\022\031\n\021optional_sfixed32\030\t \001(\017\022\031\n\021option"
- "al_sfixed64\030\n \001(\020\022\026\n\016optional_float\030\013 \001("
- "\002\022\027\n\017optional_double\030\014 \001(\001\022\025\n\roptional_b"
- "ool\030\r \001(\010\022\027\n\017optional_string\030\016 \001(\t\022\026\n\016op"
- "tional_bytes\030\017 \001(\014\022M\n\roptionalgroup\030\020 \001("
- "\n26.protobuf_unittest_no_arena.TestAllTy"
- "pes.OptionalGroup\022W\n\027optional_nested_mes"
- "sage\030\022 \001(\01326.protobuf_unittest_no_arena."
- "TestAllTypes.NestedMessage\022L\n\030optional_f"
- "oreign_message\030\023 \001(\0132*.protobuf_unittest"
- "_no_arena.ForeignMessage\022H\n\027optional_imp"
- "ort_message\030\024 \001(\0132\'.protobuf_unittest_im"
- "port.ImportMessage\022Q\n\024optional_nested_en"
- "um\030\025 \001(\01623.protobuf_unittest_no_arena.Te"
- "stAllTypes.NestedEnum\022F\n\025optional_foreig"
- "n_enum\030\026 \001(\0162\'.protobuf_unittest_no_aren"
- "a.ForeignEnum\022B\n\024optional_import_enum\030\027 "
- "\001(\0162$.protobuf_unittest_import.ImportEnu"
- "m\022!\n\025optional_string_piece\030\030 \001(\tB\002\010\002\022\031\n\r"
- "optional_cord\030\031 \001(\tB\002\010\001\022U\n\036optional_publ"
- "ic_import_message\030\032 \001(\0132-.protobuf_unitt"
- "est_import.PublicImportMessage\022T\n\020option"
- "al_message\030\033 \001(\01326.protobuf_unittest_no_"
- "arena.TestAllTypes.NestedMessageB\002(\001\022\026\n\016"
- "repeated_int32\030\037 \003(\005\022\026\n\016repeated_int64\030 "
- " \003(\003\022\027\n\017repeated_uint32\030! \003(\r\022\027\n\017repeate"
- "d_uint64\030\" \003(\004\022\027\n\017repeated_sint32\030# \003(\021\022"
- "\027\n\017repeated_sint64\030$ \003(\022\022\030\n\020repeated_fix"
- "ed32\030% \003(\007\022\030\n\020repeated_fixed64\030& \003(\006\022\031\n\021"
- "repeated_sfixed32\030\' \003(\017\022\031\n\021repeated_sfix"
- "ed64\030( \003(\020\022\026\n\016repeated_float\030) \003(\002\022\027\n\017re"
- "peated_double\030* \003(\001\022\025\n\rrepeated_bool\030+ \003"
- "(\010\022\027\n\017repeated_string\030, \003(\t\022\026\n\016repeated_"
- "bytes\030- \003(\014\022M\n\rrepeatedgroup\030. \003(\n26.pro"
- "tobuf_unittest_no_arena.TestAllTypes.Rep"
- "eatedGroup\022W\n\027repeated_nested_message\0300 "
- "\003(\01326.protobuf_unittest_no_arena.TestAll"
- "Types.NestedMessage\022L\n\030repeated_foreign_"
- "message\0301 \003(\0132*.protobuf_unittest_no_are"
- "na.ForeignMessage\022H\n\027repeated_import_mes"
- "sage\0302 \003(\0132\'.protobuf_unittest_import.Im"
- "portMessage\022Q\n\024repeated_nested_enum\0303 \003("
- "\01623.protobuf_unittest_no_arena.TestAllTy"
- "pes.NestedEnum\022F\n\025repeated_foreign_enum\030"
- "4 \003(\0162\'.protobuf_unittest_no_arena.Forei"
- "gnEnum\022B\n\024repeated_import_enum\0305 \003(\0162$.p"
- "rotobuf_unittest_import.ImportEnum\022!\n\025re"
- "peated_string_piece\0306 \003(\tB\002\010\002\022\031\n\rrepeate"
- "d_cord\0307 \003(\tB\002\010\001\022Y\n\025repeated_lazy_messag"
- "e\0309 \003(\01326.protobuf_unittest_no_arena.Tes"
- "tAllTypes.NestedMessageB\002(\001\022\031\n\rdefault_i"
- "nt32\030= \001(\005:\00241\022\031\n\rdefault_int64\030> \001(\003:\0024"
- "2\022\032\n\016default_uint32\030\? \001(\r:\00243\022\032\n\016default"
- "_uint64\030@ \001(\004:\00244\022\033\n\016default_sint32\030A \001("
- "\021:\003-45\022\032\n\016default_sint64\030B \001(\022:\00246\022\033\n\017de"
- "fault_fixed32\030C \001(\007:\00247\022\033\n\017default_fixed"
- "64\030D \001(\006:\00248\022\034\n\020default_sfixed32\030E \001(\017:\002"
- "49\022\035\n\020default_sfixed64\030F \001(\020:\003-50\022\033\n\rdef"
- "ault_float\030G \001(\002:\00451.5\022\035\n\016default_double"
- "\030H \001(\001:\00552000\022\032\n\014default_bool\030I \001(\010:\004tru"
- "e\022\035\n\016default_string\030J \001(\t:\005hello\022\034\n\rdefa"
- "ult_bytes\030K \001(\014:\005world\022U\n\023default_nested"
- "_enum\030Q \001(\01623.protobuf_unittest_no_arena"
- ".TestAllTypes.NestedEnum:\003BAR\022R\n\024default"
- "_foreign_enum\030R \001(\0162\'.protobuf_unittest_"
- "no_arena.ForeignEnum:\013FOREIGN_BAR\022M\n\023def"
- "ault_import_enum\030S \001(\0162$.protobuf_unitte"
- "st_import.ImportEnum:\nIMPORT_BAR\022%\n\024defa"
- "ult_string_piece\030T \001(\t:\003abcB\002\010\002\022\035\n\014defau"
- "lt_cord\030U \001(\t:\003123B\002\010\001\022\026\n\014oneof_uint32\030o"
- " \001(\rH\000\022V\n\024oneof_nested_message\030p \001(\01326.p"
- "rotobuf_unittest_no_arena.TestAllTypes.N"
- "estedMessageH\000\022\026\n\014oneof_string\030q \001(\tH\000\022\025"
- "\n\013oneof_bytes\030r \001(\014H\000\022_\n\031lazy_oneof_nest"
- "ed_message\030s \001(\01326.protobuf_unittest_no_"
- "arena.TestAllTypes.NestedMessageB\002(\001H\000\032\033"
- "\n\rNestedMessage\022\n\n\002bb\030\001 \001(\005\032\032\n\rOptionalG"
- "roup\022\t\n\001a\030\021 \001(\005\032\032\n\rRepeatedGroup\022\t\n\001a\030/ "
- "\001(\005\"9\n\nNestedEnum\022\007\n\003FOO\020\001\022\007\n\003BAR\020\002\022\007\n\003B"
- "AZ\020\003\022\020\n\003NEG\020\377\377\377\377\377\377\377\377\377\001B\r\n\013oneof_field\"\033\n"
- "\016ForeignMessage\022\t\n\001c\030\001 \001(\005\"P\n\022TestNoAren"
- "aMessage\022:\n\rarena_message\030\001 \001(\0132#.proto2"
- "_arena_unittest.ArenaMessage*@\n\013ForeignE"
- "num\022\017\n\013FOREIGN_FOO\020\004\022\017\n\013FOREIGN_BAR\020\005\022\017\n"
- "\013FOREIGN_BAZ\020\006B%B\rUnittestProtoH\001\200\001\001\210\001\001\220"
- "\001\001\370\001\000\242\002\005NOARN"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 3773);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "google/protobuf/unittest_no_arena.proto", &protobuf_RegisterTypes);
- ::protobuf_google_2fprotobuf_2funittest_5fimport_2eproto::AddDescriptors();
- ::protobuf_google_2fprotobuf_2funittest_5farena_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_5farena_2eproto
- namespace protobuf_unittest_no_arena {
- const ::google::protobuf::EnumDescriptor* TestAllTypes_NestedEnum_descriptor() {
- protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::file_level_enum_descriptors[0];
- }
- bool TestAllTypes_NestedEnum_IsValid(int value) {
- switch (value) {
- case -1:
- case 1:
- case 2:
- case 3:
- 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::NEG;
- 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_5farena_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::file_level_enum_descriptors[1];
- }
- bool ForeignEnum_IsValid(int value) {
- switch (value) {
- case 4:
- case 5:
- case 6:
- 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_5farena_2eproto::scc_info_TestAllTypes_NestedMessage.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:protobuf_unittest_no_arena.TestAllTypes.NestedMessage)
- }
- TestAllTypes_NestedMessage::TestAllTypes_NestedMessage(const TestAllTypes_NestedMessage& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- bb_ = from.bb_;
- // @@protoc_insertion_point(copy_constructor:protobuf_unittest_no_arena.TestAllTypes.NestedMessage)
- }
- void TestAllTypes_NestedMessage::SharedCtor() {
- bb_ = 0;
- }
- TestAllTypes_NestedMessage::~TestAllTypes_NestedMessage() {
- // @@protoc_insertion_point(destructor:protobuf_unittest_no_arena.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_5farena_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const TestAllTypes_NestedMessage& TestAllTypes_NestedMessage::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::scc_info_TestAllTypes_NestedMessage.base);
- return *internal_default_instance();
- }
- void TestAllTypes_NestedMessage::Clear() {
- // @@protoc_insertion_point(message_clear_start:protobuf_unittest_no_arena.TestAllTypes.NestedMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- bb_ = 0;
- _has_bits_.Clear();
- _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:protobuf_unittest_no_arena.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)) {
- // optional int32 bb = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
- set_has_bb();
- 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:protobuf_unittest_no_arena.TestAllTypes.NestedMessage)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:protobuf_unittest_no_arena.TestAllTypes.NestedMessage)
- return false;
- #undef DO_
- }
- void TestAllTypes_NestedMessage::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:protobuf_unittest_no_arena.TestAllTypes.NestedMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 bb = 1;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->bb(), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:protobuf_unittest_no_arena.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:protobuf_unittest_no_arena.TestAllTypes.NestedMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 bb = 1;
- if (cached_has_bits & 0x00000001u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->bb(), target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest_no_arena.TestAllTypes.NestedMessage)
- return target;
- }
- size_t TestAllTypes_NestedMessage::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest_no_arena.TestAllTypes.NestedMessage)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- // optional int32 bb = 1;
- if (has_bb()) {
- 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:protobuf_unittest_no_arena.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:protobuf_unittest_no_arena.TestAllTypes.NestedMessage)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest_no_arena.TestAllTypes.NestedMessage)
- MergeFrom(*source);
- }
- }
- void TestAllTypes_NestedMessage::MergeFrom(const TestAllTypes_NestedMessage& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest_no_arena.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.has_bb()) {
- set_bb(from.bb());
- }
- }
- void TestAllTypes_NestedMessage::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest_no_arena.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:protobuf_unittest_no_arena.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_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata TestAllTypes_NestedMessage::GetMetadata() const {
- protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void TestAllTypes_OptionalGroup::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int TestAllTypes_OptionalGroup::kAFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestAllTypes_OptionalGroup::TestAllTypes_OptionalGroup()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::scc_info_TestAllTypes_OptionalGroup.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- }
- TestAllTypes_OptionalGroup::TestAllTypes_OptionalGroup(const TestAllTypes_OptionalGroup& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- a_ = from.a_;
- // @@protoc_insertion_point(copy_constructor:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- }
- void TestAllTypes_OptionalGroup::SharedCtor() {
- a_ = 0;
- }
- TestAllTypes_OptionalGroup::~TestAllTypes_OptionalGroup() {
- // @@protoc_insertion_point(destructor:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- SharedDtor();
- }
- void TestAllTypes_OptionalGroup::SharedDtor() {
- }
- void TestAllTypes_OptionalGroup::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* TestAllTypes_OptionalGroup::descriptor() {
- ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const TestAllTypes_OptionalGroup& TestAllTypes_OptionalGroup::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::scc_info_TestAllTypes_OptionalGroup.base);
- return *internal_default_instance();
- }
- void TestAllTypes_OptionalGroup::Clear() {
- // @@protoc_insertion_point(message_clear_start:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- a_ = 0;
- _has_bits_.Clear();
- _internal_metadata_.Clear();
- }
- bool TestAllTypes_OptionalGroup::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:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- 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)) {
- // optional int32 a = 17;
- case 17: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
- set_has_a();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &a_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- input->SetLastTag(tag);
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- return false;
- #undef DO_
- }
- void TestAllTypes_OptionalGroup::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 a = 17;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->a(), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- }
- ::google::protobuf::uint8* TestAllTypes_OptionalGroup::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 a = 17;
- if (cached_has_bits & 0x00000001u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(17, this->a(), target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- return target;
- }
- size_t TestAllTypes_OptionalGroup::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- // optional int32 a = 17;
- if (has_a()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->a());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void TestAllTypes_OptionalGroup::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- GOOGLE_DCHECK_NE(&from, this);
- const TestAllTypes_OptionalGroup* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const TestAllTypes_OptionalGroup>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- MergeFrom(*source);
- }
- }
- void TestAllTypes_OptionalGroup::MergeFrom(const TestAllTypes_OptionalGroup& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- 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_a()) {
- set_a(from.a());
- }
- }
- void TestAllTypes_OptionalGroup::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void TestAllTypes_OptionalGroup::CopyFrom(const TestAllTypes_OptionalGroup& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TestAllTypes_OptionalGroup::IsInitialized() const {
- return true;
- }
- void TestAllTypes_OptionalGroup::Swap(TestAllTypes_OptionalGroup* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void TestAllTypes_OptionalGroup::InternalSwap(TestAllTypes_OptionalGroup* other) {
- using std::swap;
- swap(a_, other->a_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata TestAllTypes_OptionalGroup::GetMetadata() const {
- protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void TestAllTypes_RepeatedGroup::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int TestAllTypes_RepeatedGroup::kAFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestAllTypes_RepeatedGroup::TestAllTypes_RepeatedGroup()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::scc_info_TestAllTypes_RepeatedGroup.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- }
- TestAllTypes_RepeatedGroup::TestAllTypes_RepeatedGroup(const TestAllTypes_RepeatedGroup& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- a_ = from.a_;
- // @@protoc_insertion_point(copy_constructor:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- }
- void TestAllTypes_RepeatedGroup::SharedCtor() {
- a_ = 0;
- }
- TestAllTypes_RepeatedGroup::~TestAllTypes_RepeatedGroup() {
- // @@protoc_insertion_point(destructor:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- SharedDtor();
- }
- void TestAllTypes_RepeatedGroup::SharedDtor() {
- }
- void TestAllTypes_RepeatedGroup::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* TestAllTypes_RepeatedGroup::descriptor() {
- ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const TestAllTypes_RepeatedGroup& TestAllTypes_RepeatedGroup::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::scc_info_TestAllTypes_RepeatedGroup.base);
- return *internal_default_instance();
- }
- void TestAllTypes_RepeatedGroup::Clear() {
- // @@protoc_insertion_point(message_clear_start:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- a_ = 0;
- _has_bits_.Clear();
- _internal_metadata_.Clear();
- }
- bool TestAllTypes_RepeatedGroup::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:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- 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)) {
- // optional int32 a = 47;
- case 47: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(120u /* 376 & 0xFF */)) {
- set_has_a();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &a_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- input->SetLastTag(tag);
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- return false;
- #undef DO_
- }
- void TestAllTypes_RepeatedGroup::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 a = 47;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(47, this->a(), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- }
- ::google::protobuf::uint8* TestAllTypes_RepeatedGroup::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 a = 47;
- if (cached_has_bits & 0x00000001u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(47, this->a(), target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- return target;
- }
- size_t TestAllTypes_RepeatedGroup::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- // optional int32 a = 47;
- if (has_a()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->a());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void TestAllTypes_RepeatedGroup::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- GOOGLE_DCHECK_NE(&from, this);
- const TestAllTypes_RepeatedGroup* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const TestAllTypes_RepeatedGroup>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- MergeFrom(*source);
- }
- }
- void TestAllTypes_RepeatedGroup::MergeFrom(const TestAllTypes_RepeatedGroup& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- 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_a()) {
- set_a(from.a());
- }
- }
- void TestAllTypes_RepeatedGroup::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void TestAllTypes_RepeatedGroup::CopyFrom(const TestAllTypes_RepeatedGroup& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TestAllTypes_RepeatedGroup::IsInitialized() const {
- return true;
- }
- void TestAllTypes_RepeatedGroup::Swap(TestAllTypes_RepeatedGroup* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void TestAllTypes_RepeatedGroup::InternalSwap(TestAllTypes_RepeatedGroup* other) {
- using std::swap;
- swap(a_, other->a_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata TestAllTypes_RepeatedGroup::GetMetadata() const {
- protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void TestAllTypes::InitAsDefaultInstance() {
- ::protobuf_unittest_no_arena::_TestAllTypes_default_instance_._instance.get_mutable()->optionalgroup_ = const_cast< ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup*>(
- ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup::internal_default_instance());
- ::protobuf_unittest_no_arena::_TestAllTypes_default_instance_._instance.get_mutable()->optional_nested_message_ = const_cast< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage*>(
- ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage::internal_default_instance());
- ::protobuf_unittest_no_arena::_TestAllTypes_default_instance_._instance.get_mutable()->optional_foreign_message_ = const_cast< ::protobuf_unittest_no_arena::ForeignMessage*>(
- ::protobuf_unittest_no_arena::ForeignMessage::internal_default_instance());
- ::protobuf_unittest_no_arena::_TestAllTypes_default_instance_._instance.get_mutable()->optional_import_message_ = const_cast< ::protobuf_unittest_import::ImportMessage*>(
- ::protobuf_unittest_import::ImportMessage::internal_default_instance());
- ::protobuf_unittest_no_arena::_TestAllTypes_default_instance_._instance.get_mutable()->optional_public_import_message_ = const_cast< ::protobuf_unittest_import::PublicImportMessage*>(
- ::protobuf_unittest_import::PublicImportMessage::internal_default_instance());
- ::protobuf_unittest_no_arena::_TestAllTypes_default_instance_._instance.get_mutable()->optional_message_ = const_cast< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage*>(
- ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage::internal_default_instance());
- ::protobuf_unittest_no_arena::_TestAllTypes_default_instance_.oneof_uint32_ = 0u;
- ::protobuf_unittest_no_arena::_TestAllTypes_default_instance_.oneof_nested_message_ = const_cast< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage*>(
- ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage::internal_default_instance());
- ::protobuf_unittest_no_arena::_TestAllTypes_default_instance_.oneof_string_.UnsafeSetDefault(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::protobuf_unittest_no_arena::_TestAllTypes_default_instance_.oneof_bytes_.UnsafeSetDefault(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::protobuf_unittest_no_arena::_TestAllTypes_default_instance_.lazy_oneof_nested_message_ = const_cast< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage*>(
- ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage::internal_default_instance());
- }
- void TestAllTypes::clear_optional_import_message() {
- if (optional_import_message_ != NULL) optional_import_message_->Clear();
- clear_has_optional_import_message();
- }
- void TestAllTypes::clear_optional_public_import_message() {
- if (optional_public_import_message_ != NULL) optional_public_import_message_->Clear();
- clear_has_optional_public_import_message();
- }
- void TestAllTypes::clear_repeated_import_message() {
- repeated_import_message_.Clear();
- }
- ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_;
- ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_;
- ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_;
- ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_;
- void TestAllTypes::set_allocated_oneof_nested_message(::protobuf_unittest_no_arena::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:protobuf_unittest_no_arena.TestAllTypes.oneof_nested_message)
- }
- void TestAllTypes::set_allocated_lazy_oneof_nested_message(::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* lazy_oneof_nested_message) {
- ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
- clear_oneof_field();
- if (lazy_oneof_nested_message) {
- ::google::protobuf::Arena* submessage_arena = NULL;
- if (message_arena != submessage_arena) {
- lazy_oneof_nested_message = ::google::protobuf::internal::GetOwnedMessage(
- message_arena, lazy_oneof_nested_message, submessage_arena);
- }
- set_has_lazy_oneof_nested_message();
- oneof_field_.lazy_oneof_nested_message_ = lazy_oneof_nested_message;
- }
- // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.lazy_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::kOptionalgroupFieldNumber;
- const int TestAllTypes::kOptionalNestedMessageFieldNumber;
- const int TestAllTypes::kOptionalForeignMessageFieldNumber;
- const int TestAllTypes::kOptionalImportMessageFieldNumber;
- const int TestAllTypes::kOptionalNestedEnumFieldNumber;
- const int TestAllTypes::kOptionalForeignEnumFieldNumber;
- const int TestAllTypes::kOptionalImportEnumFieldNumber;
- const int TestAllTypes::kOptionalStringPieceFieldNumber;
- const int TestAllTypes::kOptionalCordFieldNumber;
- const int TestAllTypes::kOptionalPublicImportMessageFieldNumber;
- const int TestAllTypes::kOptionalMessageFieldNumber;
- 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::kRepeatedgroupFieldNumber;
- const int TestAllTypes::kRepeatedNestedMessageFieldNumber;
- const int TestAllTypes::kRepeatedForeignMessageFieldNumber;
- const int TestAllTypes::kRepeatedImportMessageFieldNumber;
- const int TestAllTypes::kRepeatedNestedEnumFieldNumber;
- const int TestAllTypes::kRepeatedForeignEnumFieldNumber;
- const int TestAllTypes::kRepeatedImportEnumFieldNumber;
- const int TestAllTypes::kRepeatedStringPieceFieldNumber;
- const int TestAllTypes::kRepeatedCordFieldNumber;
- const int TestAllTypes::kRepeatedLazyMessageFieldNumber;
- const int TestAllTypes::kDefaultInt32FieldNumber;
- const int TestAllTypes::kDefaultInt64FieldNumber;
- const int TestAllTypes::kDefaultUint32FieldNumber;
- const int TestAllTypes::kDefaultUint64FieldNumber;
- const int TestAllTypes::kDefaultSint32FieldNumber;
- const int TestAllTypes::kDefaultSint64FieldNumber;
- const int TestAllTypes::kDefaultFixed32FieldNumber;
- const int TestAllTypes::kDefaultFixed64FieldNumber;
- const int TestAllTypes::kDefaultSfixed32FieldNumber;
- const int TestAllTypes::kDefaultSfixed64FieldNumber;
- const int TestAllTypes::kDefaultFloatFieldNumber;
- const int TestAllTypes::kDefaultDoubleFieldNumber;
- const int TestAllTypes::kDefaultBoolFieldNumber;
- const int TestAllTypes::kDefaultStringFieldNumber;
- const int TestAllTypes::kDefaultBytesFieldNumber;
- const int TestAllTypes::kDefaultNestedEnumFieldNumber;
- const int TestAllTypes::kDefaultForeignEnumFieldNumber;
- const int TestAllTypes::kDefaultImportEnumFieldNumber;
- const int TestAllTypes::kDefaultStringPieceFieldNumber;
- const int TestAllTypes::kDefaultCordFieldNumber;
- const int TestAllTypes::kOneofUint32FieldNumber;
- const int TestAllTypes::kOneofNestedMessageFieldNumber;
- const int TestAllTypes::kOneofStringFieldNumber;
- const int TestAllTypes::kOneofBytesFieldNumber;
- const int TestAllTypes::kLazyOneofNestedMessageFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestAllTypes::TestAllTypes()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::scc_info_TestAllTypes.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:protobuf_unittest_no_arena.TestAllTypes)
- }
- TestAllTypes::TestAllTypes(const TestAllTypes& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_),
- 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_),
- repeatedgroup_(from.repeatedgroup_),
- repeated_nested_message_(from.repeated_nested_message_),
- repeated_foreign_message_(from.repeated_foreign_message_),
- repeated_import_message_(from.repeated_import_message_),
- repeated_nested_enum_(from.repeated_nested_enum_),
- repeated_foreign_enum_(from.repeated_foreign_enum_),
- repeated_import_enum_(from.repeated_import_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.has_optional_string()) {
- optional_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_);
- }
- optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_optional_bytes()) {
- optional_bytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes_);
- }
- optional_string_piece_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_optional_string_piece()) {
- optional_string_piece_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_piece_);
- }
- optional_cord_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_optional_cord()) {
- optional_cord_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_cord_);
- }
- default_string_.UnsafeSetDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get());
- if (from.has_default_string()) {
- default_string_.AssignWithDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get(), from.default_string_);
- }
- default_bytes_.UnsafeSetDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get());
- if (from.has_default_bytes()) {
- default_bytes_.AssignWithDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get(), from.default_bytes_);
- }
- default_string_piece_.UnsafeSetDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
- if (from.has_default_string_piece()) {
- default_string_piece_.AssignWithDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get(), from.default_string_piece_);
- }
- default_cord_.UnsafeSetDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get());
- if (from.has_default_cord()) {
- default_cord_.AssignWithDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get(), from.default_cord_);
- }
- if (from.has_optionalgroup()) {
- optionalgroup_ = new ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup(*from.optionalgroup_);
- } else {
- optionalgroup_ = NULL;
- }
- if (from.has_optional_nested_message()) {
- optional_nested_message_ = new ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage(*from.optional_nested_message_);
- } else {
- optional_nested_message_ = NULL;
- }
- if (from.has_optional_foreign_message()) {
- optional_foreign_message_ = new ::protobuf_unittest_no_arena::ForeignMessage(*from.optional_foreign_message_);
- } else {
- optional_foreign_message_ = NULL;
- }
- if (from.has_optional_import_message()) {
- optional_import_message_ = new ::protobuf_unittest_import::ImportMessage(*from.optional_import_message_);
- } else {
- optional_import_message_ = NULL;
- }
- if (from.has_optional_public_import_message()) {
- optional_public_import_message_ = new ::protobuf_unittest_import::PublicImportMessage(*from.optional_public_import_message_);
- } else {
- optional_public_import_message_ = NULL;
- }
- if (from.has_optional_message()) {
- optional_message_ = new ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage(*from.optional_message_);
- } else {
- optional_message_ = NULL;
- }
- ::memcpy(&optional_int64_, &from.optional_int64_,
- static_cast<size_t>(reinterpret_cast<char*>(&default_foreign_enum_) -
- reinterpret_cast<char*>(&optional_int64_)) + sizeof(default_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()->::protobuf_unittest_no_arena::TestAllTypes_NestedMessage::MergeFrom(from.oneof_nested_message());
- break;
- }
- case kOneofString: {
- set_oneof_string(from.oneof_string());
- break;
- }
- case kOneofBytes: {
- set_oneof_bytes(from.oneof_bytes());
- break;
- }
- case kLazyOneofNestedMessage: {
- mutable_lazy_oneof_nested_message()->::protobuf_unittest_no_arena::TestAllTypes_NestedMessage::MergeFrom(from.lazy_oneof_nested_message());
- break;
- }
- case ONEOF_FIELD_NOT_SET: {
- break;
- }
- }
- // @@protoc_insertion_point(copy_constructor:protobuf_unittest_no_arena.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());
- default_string_.UnsafeSetDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get());
- default_bytes_.UnsafeSetDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get());
- default_string_piece_.UnsafeSetDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
- default_cord_.UnsafeSetDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get());
- ::memset(&optionalgroup_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&optional_bool_) -
- reinterpret_cast<char*>(&optionalgroup_)) + sizeof(optional_bool_));
- default_import_enum_ = 8;
- optional_nested_enum_ = 1;
- optional_foreign_enum_ = 4;
- optional_import_enum_ = 7;
- default_int32_ = 41;
- default_int64_ = GOOGLE_LONGLONG(42);
- default_uint64_ = GOOGLE_ULONGLONG(44);
- default_uint32_ = 43u;
- default_sint32_ = -45;
- default_sint64_ = GOOGLE_LONGLONG(46);
- default_fixed64_ = GOOGLE_ULONGLONG(48);
- default_fixed32_ = 47u;
- default_sfixed32_ = 49;
- default_sfixed64_ = GOOGLE_LONGLONG(-50);
- default_double_ = 52000;
- default_float_ = 51.5f;
- default_bool_ = true;
- default_nested_enum_ = 2;
- default_foreign_enum_ = 5;
- clear_has_oneof_field();
- }
- TestAllTypes::~TestAllTypes() {
- // @@protoc_insertion_point(destructor:protobuf_unittest_no_arena.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());
- default_string_.DestroyNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get());
- default_bytes_.DestroyNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get());
- default_string_piece_.DestroyNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
- default_cord_.DestroyNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get());
- if (this != internal_default_instance()) delete optionalgroup_;
- 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_import_message_;
- if (this != internal_default_instance()) delete optional_public_import_message_;
- if (this != internal_default_instance()) delete optional_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_5farena_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const TestAllTypes& TestAllTypes::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::scc_info_TestAllTypes.base);
- return *internal_default_instance();
- }
- void TestAllTypes::clear_oneof_field() {
- // @@protoc_insertion_point(one_of_clear_start:protobuf_unittest_no_arena.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 kOneofBytes: {
- oneof_field_.oneof_bytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- break;
- }
- case kLazyOneofNestedMessage: {
- delete oneof_field_.lazy_oneof_nested_message_;
- break;
- }
- case ONEOF_FIELD_NOT_SET: {
- break;
- }
- }
- _oneof_case_[0] = ONEOF_FIELD_NOT_SET;
- }
- void TestAllTypes::Clear() {
- // @@protoc_insertion_point(message_clear_start:protobuf_unittest_no_arena.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();
- repeatedgroup_.Clear();
- repeated_nested_message_.Clear();
- repeated_foreign_message_.Clear();
- repeated_import_message_.Clear();
- repeated_nested_enum_.Clear();
- repeated_foreign_enum_.Clear();
- repeated_import_enum_.Clear();
- repeated_string_piece_.Clear();
- repeated_cord_.Clear();
- repeated_lazy_message_.Clear();
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 255u) {
- if (cached_has_bits & 0x00000001u) {
- optional_string_.ClearNonDefaultToEmptyNoArena();
- }
- if (cached_has_bits & 0x00000002u) {
- optional_bytes_.ClearNonDefaultToEmptyNoArena();
- }
- if (cached_has_bits & 0x00000004u) {
- optional_string_piece_.ClearNonDefaultToEmptyNoArena();
- }
- if (cached_has_bits & 0x00000008u) {
- optional_cord_.ClearNonDefaultToEmptyNoArena();
- }
- if (cached_has_bits & 0x00000010u) {
- default_string_.UnsafeMutablePointer()->assign(*&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get());
- }
- if (cached_has_bits & 0x00000020u) {
- default_bytes_.UnsafeMutablePointer()->assign(*&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get());
- }
- if (cached_has_bits & 0x00000040u) {
- default_string_piece_.UnsafeMutablePointer()->assign(*&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
- }
- if (cached_has_bits & 0x00000080u) {
- default_cord_.UnsafeMutablePointer()->assign(*&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get());
- }
- }
- if (cached_has_bits & 16128u) {
- if (cached_has_bits & 0x00000100u) {
- GOOGLE_DCHECK(optionalgroup_ != NULL);
- optionalgroup_->Clear();
- }
- if (cached_has_bits & 0x00000200u) {
- GOOGLE_DCHECK(optional_nested_message_ != NULL);
- optional_nested_message_->Clear();
- }
- if (cached_has_bits & 0x00000400u) {
- GOOGLE_DCHECK(optional_foreign_message_ != NULL);
- optional_foreign_message_->Clear();
- }
- if (cached_has_bits & 0x00000800u) {
- GOOGLE_DCHECK(optional_import_message_ != NULL);
- optional_import_message_->Clear();
- }
- if (cached_has_bits & 0x00001000u) {
- GOOGLE_DCHECK(optional_public_import_message_ != NULL);
- optional_public_import_message_->Clear();
- }
- if (cached_has_bits & 0x00002000u) {
- GOOGLE_DCHECK(optional_message_ != NULL);
- optional_message_->Clear();
- }
- }
- if (cached_has_bits & 49152u) {
- ::memset(&optional_int64_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&optional_int32_) -
- reinterpret_cast<char*>(&optional_int64_)) + sizeof(optional_int32_));
- }
- if (cached_has_bits & 16711680u) {
- ::memset(&optional_uint32_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&optional_sfixed32_) -
- reinterpret_cast<char*>(&optional_uint32_)) + sizeof(optional_sfixed32_));
- }
- if (cached_has_bits & 4278190080u) {
- ::memset(&optional_float_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&optional_bool_) -
- reinterpret_cast<char*>(&optional_float_)) + sizeof(optional_bool_));
- default_import_enum_ = 8;
- optional_nested_enum_ = 1;
- optional_foreign_enum_ = 4;
- optional_import_enum_ = 7;
- default_int32_ = 41;
- }
- cached_has_bits = _has_bits_[1];
- if (cached_has_bits & 255u) {
- default_int64_ = GOOGLE_LONGLONG(42);
- default_uint64_ = GOOGLE_ULONGLONG(44);
- default_uint32_ = 43u;
- default_sint32_ = -45;
- default_sint64_ = GOOGLE_LONGLONG(46);
- default_fixed64_ = GOOGLE_ULONGLONG(48);
- default_fixed32_ = 47u;
- default_sfixed32_ = 49;
- }
- if (cached_has_bits & 16128u) {
- default_sfixed64_ = GOOGLE_LONGLONG(-50);
- default_double_ = 52000;
- default_float_ = 51.5f;
- default_bool_ = true;
- default_nested_enum_ = 2;
- default_foreign_enum_ = 5;
- }
- clear_oneof_field();
- _has_bits_.Clear();
- _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:protobuf_unittest_no_arena.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)) {
- // optional int32 optional_int32 = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
- set_has_optional_int32();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &optional_int32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional int64 optional_int64 = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
- set_has_optional_int64();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, &optional_int64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional uint32 optional_uint32 = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
- set_has_optional_uint32();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, &optional_uint32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional uint64 optional_uint64 = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
- set_has_optional_uint64();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, &optional_uint64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional sint32 optional_sint32 = 5;
- case 5: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
- set_has_optional_sint32();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- input, &optional_sint32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional sint64 optional_sint64 = 6;
- case 6: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
- set_has_optional_sint64();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- input, &optional_sint64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional fixed32 optional_fixed32 = 7;
- case 7: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
- set_has_optional_fixed32();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
- input, &optional_fixed32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional fixed64 optional_fixed64 = 8;
- case 8: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(65u /* 65 & 0xFF */)) {
- set_has_optional_fixed64();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
- input, &optional_fixed64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional sfixed32 optional_sfixed32 = 9;
- case 9: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(77u /* 77 & 0xFF */)) {
- set_has_optional_sfixed32();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
- input, &optional_sfixed32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional sfixed64 optional_sfixed64 = 10;
- case 10: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(81u /* 81 & 0xFF */)) {
- set_has_optional_sfixed64();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
- input, &optional_sfixed64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional float optional_float = 11;
- case 11: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(93u /* 93 & 0xFF */)) {
- set_has_optional_float();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- input, &optional_float_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional double optional_double = 12;
- case 12: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(97u /* 97 & 0xFF */)) {
- set_has_optional_double();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &optional_double_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional bool optional_bool = 13;
- case 13: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
- set_has_optional_bool();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, &optional_bool_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional 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()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->optional_string().data(), static_cast<int>(this->optional_string().length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "protobuf_unittest_no_arena.TestAllTypes.optional_string");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional 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;
- }
- // optional group OptionalGroup = 16 { ... };
- case 16: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(131u /* 131 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
- 16, input, mutable_optionalgroup()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional .protobuf_unittest_no_arena.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;
- }
- // optional .protobuf_unittest_no_arena.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;
- }
- // optional .protobuf_unittest_import.ImportMessage optional_import_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_import_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional .protobuf_unittest_no_arena.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)));
- if (::protobuf_unittest_no_arena::TestAllTypes_NestedEnum_IsValid(value)) {
- set_optional_nested_enum(static_cast< ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum >(value));
- } else {
- mutable_unknown_fields()->AddVarint(
- 21, static_cast< ::google::protobuf::uint64>(value));
- }
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional .protobuf_unittest_no_arena.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)));
- if (::protobuf_unittest_no_arena::ForeignEnum_IsValid(value)) {
- set_optional_foreign_enum(static_cast< ::protobuf_unittest_no_arena::ForeignEnum >(value));
- } else {
- mutable_unknown_fields()->AddVarint(
- 22, static_cast< ::google::protobuf::uint64>(value));
- }
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
- case 23: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(184u /* 184 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::protobuf_unittest_import::ImportEnum_IsValid(value)) {
- set_optional_import_enum(static_cast< ::protobuf_unittest_import::ImportEnum >(value));
- } else {
- mutable_unknown_fields()->AddVarint(
- 23, static_cast< ::google::protobuf::uint64>(value));
- }
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional 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()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->optional_string_piece().data(), static_cast<int>(this->optional_string_piece().length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "protobuf_unittest_no_arena.TestAllTypes.optional_string_piece");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional 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()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->optional_cord().data(), static_cast<int>(this->optional_cord().length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "protobuf_unittest_no_arena.TestAllTypes.optional_cord");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
- case 26: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(210u /* 210 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_optional_public_import_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage optional_message = 27 [lazy = true];
- case 27: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(218u /* 218 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_optional_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>(248u /* 248 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- 2, 248u, input, this->mutable_repeated_int32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(250u /* 250 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- 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>(0u /* 256 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- 2, 256u, input, this->mutable_repeated_int64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(2u /* 258 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- 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>(8u /* 264 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- 2, 264u, input, this->mutable_repeated_uint32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 266 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- 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>(16u /* 272 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- 2, 272u, input, this->mutable_repeated_uint64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 274 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- 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>(24u /* 280 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- 2, 280u, input, this->mutable_repeated_sint32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u /* 282 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- 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>(32u /* 288 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- 2, 288u, input, this->mutable_repeated_sint64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 290 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- 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>(45u /* 301 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
- 2, 301u, input, this->mutable_repeated_fixed32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u /* 298 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
- 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>(49u /* 305 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
- 2, 305u, input, this->mutable_repeated_fixed64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(50u /* 306 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
- 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>(61u /* 317 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
- 2, 317u, input, this->mutable_repeated_sfixed32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(58u /* 314 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
- 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>(65u /* 321 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
- 2, 321u, input, this->mutable_repeated_sfixed64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(66u /* 322 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
- 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>(77u /* 333 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- 2, 333u, input, this->mutable_repeated_float())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(74u /* 330 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- 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>(81u /* 337 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- 2, 337u, input, this->mutable_repeated_double())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(82u /* 338 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- 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>(88u /* 344 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- 2, 344u, input, this->mutable_repeated_bool())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(90u /* 346 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- 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()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->repeated_string(this->repeated_string_size() - 1).data(),
- static_cast<int>(this->repeated_string(this->repeated_string_size() - 1).length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "protobuf_unittest_no_arena.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 group RepeatedGroup = 46 { ... };
- case 46: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(115u /* 371 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(46, input, add_repeatedgroup()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .protobuf_unittest_no_arena.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 .protobuf_unittest_no_arena.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_import.ImportMessage repeated_import_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_import_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .protobuf_unittest_no_arena.TestAllTypes.NestedEnum repeated_nested_enum = 51;
- case 51: {
- 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)));
- if (::protobuf_unittest_no_arena::TestAllTypes_NestedEnum_IsValid(value)) {
- add_repeated_nested_enum(static_cast< ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum >(value));
- } else {
- mutable_unknown_fields()->AddVarint(
- 51, static_cast< ::google::protobuf::uint64>(value));
- }
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(154u /* 410 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
- input,
- 51,
- ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum_IsValid,
- mutable_unknown_fields(),
- this->mutable_repeated_nested_enum())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .protobuf_unittest_no_arena.ForeignEnum repeated_foreign_enum = 52;
- case 52: {
- 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)));
- if (::protobuf_unittest_no_arena::ForeignEnum_IsValid(value)) {
- add_repeated_foreign_enum(static_cast< ::protobuf_unittest_no_arena::ForeignEnum >(value));
- } else {
- mutable_unknown_fields()->AddVarint(
- 52, static_cast< ::google::protobuf::uint64>(value));
- }
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(162u /* 418 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
- input,
- 52,
- ::protobuf_unittest_no_arena::ForeignEnum_IsValid,
- mutable_unknown_fields(),
- this->mutable_repeated_foreign_enum())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
- case 53: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(168u /* 424 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::protobuf_unittest_import::ImportEnum_IsValid(value)) {
- add_repeated_import_enum(static_cast< ::protobuf_unittest_import::ImportEnum >(value));
- } else {
- mutable_unknown_fields()->AddVarint(
- 53, static_cast< ::google::protobuf::uint64>(value));
- }
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(170u /* 426 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
- input,
- 53,
- ::protobuf_unittest_import::ImportEnum_IsValid,
- mutable_unknown_fields(),
- this->mutable_repeated_import_enum())));
- } 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()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- 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::WireFormat::PARSE,
- "protobuf_unittest_no_arena.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()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->repeated_cord(this->repeated_cord_size() - 1).data(),
- static_cast<int>(this->repeated_cord(this->repeated_cord_size() - 1).length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "protobuf_unittest_no_arena.TestAllTypes.repeated_cord");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .protobuf_unittest_no_arena.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;
- }
- // optional int32 default_int32 = 61 [default = 41];
- case 61: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(232u /* 488 & 0xFF */)) {
- set_has_default_int32();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &default_int32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional int64 default_int64 = 62 [default = 42];
- case 62: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(240u /* 496 & 0xFF */)) {
- set_has_default_int64();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, &default_int64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional uint32 default_uint32 = 63 [default = 43];
- case 63: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(248u /* 504 & 0xFF */)) {
- set_has_default_uint32();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, &default_uint32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional uint64 default_uint64 = 64 [default = 44];
- case 64: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(0u /* 512 & 0xFF */)) {
- set_has_default_uint64();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, &default_uint64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional sint32 default_sint32 = 65 [default = -45];
- case 65: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 520 & 0xFF */)) {
- set_has_default_sint32();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- input, &default_sint32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional sint64 default_sint64 = 66 [default = 46];
- case 66: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(16u /* 528 & 0xFF */)) {
- set_has_default_sint64();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- input, &default_sint64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional fixed32 default_fixed32 = 67 [default = 47];
- case 67: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(29u /* 541 & 0xFF */)) {
- set_has_default_fixed32();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
- input, &default_fixed32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional fixed64 default_fixed64 = 68 [default = 48];
- case 68: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(33u /* 545 & 0xFF */)) {
- set_has_default_fixed64();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
- input, &default_fixed64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional sfixed32 default_sfixed32 = 69 [default = 49];
- case 69: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(45u /* 557 & 0xFF */)) {
- set_has_default_sfixed32();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
- input, &default_sfixed32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional sfixed64 default_sfixed64 = 70 [default = -50];
- case 70: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(49u /* 561 & 0xFF */)) {
- set_has_default_sfixed64();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
- input, &default_sfixed64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional float default_float = 71 [default = 51.5];
- case 71: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(61u /* 573 & 0xFF */)) {
- set_has_default_float();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- input, &default_float_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional double default_double = 72 [default = 52000];
- case 72: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(65u /* 577 & 0xFF */)) {
- set_has_default_double();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &default_double_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional bool default_bool = 73 [default = true];
- case 73: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(72u /* 584 & 0xFF */)) {
- set_has_default_bool();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, &default_bool_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional string default_string = 74 [default = "hello"];
- case 74: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(82u /* 594 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_default_string()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->default_string().data(), static_cast<int>(this->default_string().length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "protobuf_unittest_no_arena.TestAllTypes.default_string");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional bytes default_bytes = 75 [default = "world"];
- case 75: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(90u /* 602 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->mutable_default_bytes()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
- case 81: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(136u /* 648 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::protobuf_unittest_no_arena::TestAllTypes_NestedEnum_IsValid(value)) {
- set_default_nested_enum(static_cast< ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum >(value));
- } else {
- mutable_unknown_fields()->AddVarint(
- 81, static_cast< ::google::protobuf::uint64>(value));
- }
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional .protobuf_unittest_no_arena.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
- case 82: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(144u /* 656 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::protobuf_unittest_no_arena::ForeignEnum_IsValid(value)) {
- set_default_foreign_enum(static_cast< ::protobuf_unittest_no_arena::ForeignEnum >(value));
- } else {
- mutable_unknown_fields()->AddVarint(
- 82, static_cast< ::google::protobuf::uint64>(value));
- }
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
- case 83: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(152u /* 664 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::protobuf_unittest_import::ImportEnum_IsValid(value)) {
- set_default_import_enum(static_cast< ::protobuf_unittest_import::ImportEnum >(value));
- } else {
- mutable_unknown_fields()->AddVarint(
- 83, static_cast< ::google::protobuf::uint64>(value));
- }
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
- case 84: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(162u /* 674 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_default_string_piece()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->default_string_piece().data(), static_cast<int>(this->default_string_piece().length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "protobuf_unittest_no_arena.TestAllTypes.default_string_piece");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional string default_cord = 85 [default = "123", ctype = CORD];
- case 85: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(170u /* 682 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_default_cord()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->default_cord().data(), static_cast<int>(this->default_cord().length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "protobuf_unittest_no_arena.TestAllTypes.default_cord");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional 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;
- }
- // optional .protobuf_unittest_no_arena.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;
- }
- // optional 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()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "protobuf_unittest_no_arena.TestAllTypes.oneof_string");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional bytes oneof_bytes = 114;
- case 114: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(146u /* 914 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->mutable_oneof_bytes()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage lazy_oneof_nested_message = 115 [lazy = true];
- case 115: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(154u /* 922 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_lazy_oneof_nested_message()));
- } 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:protobuf_unittest_no_arena.TestAllTypes)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:protobuf_unittest_no_arena.TestAllTypes)
- return false;
- #undef DO_
- }
- void TestAllTypes::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:protobuf_unittest_no_arena.TestAllTypes)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 optional_int32 = 1;
- if (cached_has_bits & 0x00008000u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->optional_int32(), output);
- }
- // optional int64 optional_int64 = 2;
- if (cached_has_bits & 0x00004000u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->optional_int64(), output);
- }
- // optional uint32 optional_uint32 = 3;
- if (cached_has_bits & 0x00010000u) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->optional_uint32(), output);
- }
- // optional uint64 optional_uint64 = 4;
- if (cached_has_bits & 0x00020000u) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->optional_uint64(), output);
- }
- // optional sint32 optional_sint32 = 5;
- if (cached_has_bits & 0x00080000u) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt32(5, this->optional_sint32(), output);
- }
- // optional sint64 optional_sint64 = 6;
- if (cached_has_bits & 0x00040000u) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt64(6, this->optional_sint64(), output);
- }
- // optional fixed32 optional_fixed32 = 7;
- if (cached_has_bits & 0x00100000u) {
- ::google::protobuf::internal::WireFormatLite::WriteFixed32(7, this->optional_fixed32(), output);
- }
- // optional fixed64 optional_fixed64 = 8;
- if (cached_has_bits & 0x00200000u) {
- ::google::protobuf::internal::WireFormatLite::WriteFixed64(8, this->optional_fixed64(), output);
- }
- // optional sfixed32 optional_sfixed32 = 9;
- if (cached_has_bits & 0x00800000u) {
- ::google::protobuf::internal::WireFormatLite::WriteSFixed32(9, this->optional_sfixed32(), output);
- }
- // optional sfixed64 optional_sfixed64 = 10;
- if (cached_has_bits & 0x00400000u) {
- ::google::protobuf::internal::WireFormatLite::WriteSFixed64(10, this->optional_sfixed64(), output);
- }
- // optional float optional_float = 11;
- if (cached_has_bits & 0x01000000u) {
- ::google::protobuf::internal::WireFormatLite::WriteFloat(11, this->optional_float(), output);
- }
- // optional double optional_double = 12;
- if (cached_has_bits & 0x02000000u) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(12, this->optional_double(), output);
- }
- // optional bool optional_bool = 13;
- if (cached_has_bits & 0x04000000u) {
- ::google::protobuf::internal::WireFormatLite::WriteBool(13, this->optional_bool(), output);
- }
- // optional string optional_string = 14;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->optional_string().data(), static_cast<int>(this->optional_string().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.optional_string");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 14, this->optional_string(), output);
- }
- // optional bytes optional_bytes = 15;
- if (cached_has_bits & 0x00000002u) {
- ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
- 15, this->optional_bytes(), output);
- }
- // optional group OptionalGroup = 16 { ... };
- if (cached_has_bits & 0x00000100u) {
- ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
- 16, this->_internal_optionalgroup(), output);
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage optional_nested_message = 18;
- if (cached_has_bits & 0x00000200u) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 18, this->_internal_optional_nested_message(), output);
- }
- // optional .protobuf_unittest_no_arena.ForeignMessage optional_foreign_message = 19;
- if (cached_has_bits & 0x00000400u) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 19, this->_internal_optional_foreign_message(), output);
- }
- // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
- if (cached_has_bits & 0x00000800u) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 20, this->_internal_optional_import_message(), output);
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedEnum optional_nested_enum = 21;
- if (cached_has_bits & 0x10000000u) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 21, this->optional_nested_enum(), output);
- }
- // optional .protobuf_unittest_no_arena.ForeignEnum optional_foreign_enum = 22;
- if (cached_has_bits & 0x20000000u) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 22, this->optional_foreign_enum(), output);
- }
- // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
- if (cached_has_bits & 0x40000000u) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 23, this->optional_import_enum(), output);
- }
- // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
- if (cached_has_bits & 0x00000004u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->optional_string_piece().data(), static_cast<int>(this->optional_string_piece().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.optional_string_piece");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 24, this->optional_string_piece(), output);
- }
- // optional string optional_cord = 25 [ctype = CORD];
- if (cached_has_bits & 0x00000008u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->optional_cord().data(), static_cast<int>(this->optional_cord().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.optional_cord");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 25, this->optional_cord(), output);
- }
- // optional .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
- if (cached_has_bits & 0x00001000u) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 26, this->_internal_optional_public_import_message(), output);
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage optional_message = 27 [lazy = true];
- if (cached_has_bits & 0x00002000u) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 27, this->_internal_optional_message(), output);
- }
- // repeated int32 repeated_int32 = 31;
- for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(
- 31, this->repeated_int32(i), output);
- }
- // repeated int64 repeated_int64 = 32;
- for (int i = 0, n = this->repeated_int64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(
- 32, this->repeated_int64(i), output);
- }
- // repeated uint32 repeated_uint32 = 33;
- for (int i = 0, n = this->repeated_uint32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(
- 33, this->repeated_uint32(i), output);
- }
- // repeated uint64 repeated_uint64 = 34;
- for (int i = 0, n = this->repeated_uint64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(
- 34, this->repeated_uint64(i), output);
- }
- // repeated sint32 repeated_sint32 = 35;
- for (int i = 0, n = this->repeated_sint32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt32(
- 35, this->repeated_sint32(i), output);
- }
- // repeated sint64 repeated_sint64 = 36;
- for (int i = 0, n = this->repeated_sint64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt64(
- 36, this->repeated_sint64(i), output);
- }
- // repeated fixed32 repeated_fixed32 = 37;
- for (int i = 0, n = this->repeated_fixed32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteFixed32(
- 37, this->repeated_fixed32(i), output);
- }
- // repeated fixed64 repeated_fixed64 = 38;
- for (int i = 0, n = this->repeated_fixed64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteFixed64(
- 38, this->repeated_fixed64(i), output);
- }
- // repeated sfixed32 repeated_sfixed32 = 39;
- for (int i = 0, n = this->repeated_sfixed32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSFixed32(
- 39, this->repeated_sfixed32(i), output);
- }
- // repeated sfixed64 repeated_sfixed64 = 40;
- for (int i = 0, n = this->repeated_sfixed64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSFixed64(
- 40, this->repeated_sfixed64(i), output);
- }
- // repeated float repeated_float = 41;
- for (int i = 0, n = this->repeated_float_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteFloat(
- 41, this->repeated_float(i), output);
- }
- // repeated double repeated_double = 42;
- for (int i = 0, n = this->repeated_double_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(
- 42, this->repeated_double(i), output);
- }
- // repeated bool repeated_bool = 43;
- for (int i = 0, n = this->repeated_bool_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteBool(
- 43, this->repeated_bool(i), output);
- }
- // repeated string repeated_string = 44;
- for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->repeated_string(i).data(), static_cast<int>(this->repeated_string(i).length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.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 group RepeatedGroup = 46 { ... };
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeatedgroup_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
- 46,
- this->repeatedgroup(static_cast<int>(i)),
- output);
- }
- // repeated .protobuf_unittest_no_arena.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 .protobuf_unittest_no_arena.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_import.ImportMessage repeated_import_message = 50;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_import_message_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 50,
- this->repeated_import_message(static_cast<int>(i)),
- output);
- }
- // repeated .protobuf_unittest_no_arena.TestAllTypes.NestedEnum repeated_nested_enum = 51;
- for (int i = 0, n = this->repeated_nested_enum_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 51, this->repeated_nested_enum(i), output);
- }
- // repeated .protobuf_unittest_no_arena.ForeignEnum repeated_foreign_enum = 52;
- for (int i = 0, n = this->repeated_foreign_enum_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 52, this->repeated_foreign_enum(i), output);
- }
- // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
- for (int i = 0, n = this->repeated_import_enum_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 53, this->repeated_import_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::WireFormat::VerifyUTF8StringNamedField(
- this->repeated_string_piece(i).data(), static_cast<int>(this->repeated_string_piece(i).length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.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::WireFormat::VerifyUTF8StringNamedField(
- this->repeated_cord(i).data(), static_cast<int>(this->repeated_cord(i).length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.repeated_cord");
- ::google::protobuf::internal::WireFormatLite::WriteString(
- 55, this->repeated_cord(i), output);
- }
- // repeated .protobuf_unittest_no_arena.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);
- }
- // optional int32 default_int32 = 61 [default = 41];
- if (cached_has_bits & 0x80000000u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(61, this->default_int32(), output);
- }
- cached_has_bits = _has_bits_[1];
- // optional int64 default_int64 = 62 [default = 42];
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(62, this->default_int64(), output);
- }
- // optional uint32 default_uint32 = 63 [default = 43];
- if (cached_has_bits & 0x00000004u) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(63, this->default_uint32(), output);
- }
- // optional uint64 default_uint64 = 64 [default = 44];
- if (cached_has_bits & 0x00000002u) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(64, this->default_uint64(), output);
- }
- // optional sint32 default_sint32 = 65 [default = -45];
- if (cached_has_bits & 0x00000008u) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt32(65, this->default_sint32(), output);
- }
- // optional sint64 default_sint64 = 66 [default = 46];
- if (cached_has_bits & 0x00000010u) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt64(66, this->default_sint64(), output);
- }
- // optional fixed32 default_fixed32 = 67 [default = 47];
- if (cached_has_bits & 0x00000040u) {
- ::google::protobuf::internal::WireFormatLite::WriteFixed32(67, this->default_fixed32(), output);
- }
- // optional fixed64 default_fixed64 = 68 [default = 48];
- if (cached_has_bits & 0x00000020u) {
- ::google::protobuf::internal::WireFormatLite::WriteFixed64(68, this->default_fixed64(), output);
- }
- // optional sfixed32 default_sfixed32 = 69 [default = 49];
- if (cached_has_bits & 0x00000080u) {
- ::google::protobuf::internal::WireFormatLite::WriteSFixed32(69, this->default_sfixed32(), output);
- }
- // optional sfixed64 default_sfixed64 = 70 [default = -50];
- if (cached_has_bits & 0x00000100u) {
- ::google::protobuf::internal::WireFormatLite::WriteSFixed64(70, this->default_sfixed64(), output);
- }
- // optional float default_float = 71 [default = 51.5];
- if (cached_has_bits & 0x00000400u) {
- ::google::protobuf::internal::WireFormatLite::WriteFloat(71, this->default_float(), output);
- }
- // optional double default_double = 72 [default = 52000];
- if (cached_has_bits & 0x00000200u) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(72, this->default_double(), output);
- }
- // optional bool default_bool = 73 [default = true];
- if (cached_has_bits & 0x00000800u) {
- ::google::protobuf::internal::WireFormatLite::WriteBool(73, this->default_bool(), output);
- }
- cached_has_bits = _has_bits_[0];
- // optional string default_string = 74 [default = "hello"];
- if (cached_has_bits & 0x00000010u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->default_string().data(), static_cast<int>(this->default_string().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.default_string");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 74, this->default_string(), output);
- }
- // optional bytes default_bytes = 75 [default = "world"];
- if (cached_has_bits & 0x00000020u) {
- ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
- 75, this->default_bytes(), output);
- }
- cached_has_bits = _has_bits_[1];
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
- if (cached_has_bits & 0x00001000u) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 81, this->default_nested_enum(), output);
- }
- // optional .protobuf_unittest_no_arena.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
- if (cached_has_bits & 0x00002000u) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 82, this->default_foreign_enum(), output);
- }
- cached_has_bits = _has_bits_[0];
- // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
- if (cached_has_bits & 0x08000000u) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 83, this->default_import_enum(), output);
- }
- // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
- if (cached_has_bits & 0x00000040u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->default_string_piece().data(), static_cast<int>(this->default_string_piece().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.default_string_piece");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 84, this->default_string_piece(), output);
- }
- // optional string default_cord = 85 [default = "123", ctype = CORD];
- if (cached_has_bits & 0x00000080u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->default_cord().data(), static_cast<int>(this->default_cord().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.default_cord");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 85, this->default_cord(), output);
- }
- switch (oneof_field_case()) {
- case kOneofUint32:
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(111, this->oneof_uint32(), output);
- break;
- case kOneofNestedMessage:
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 112, this->_internal_oneof_nested_message(), output);
- break;
- case kOneofString:
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.oneof_string");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 113, this->oneof_string(), output);
- break;
- case kOneofBytes:
- ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
- 114, this->oneof_bytes(), output);
- break;
- case kLazyOneofNestedMessage:
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 115, this->_internal_lazy_oneof_nested_message(), output);
- break;
- default: ;
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:protobuf_unittest_no_arena.TestAllTypes)
- }
- ::google::protobuf::uint8* TestAllTypes::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest_no_arena.TestAllTypes)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 optional_int32 = 1;
- if (cached_has_bits & 0x00008000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->optional_int32(), target);
- }
- // optional int64 optional_int64 = 2;
- if (cached_has_bits & 0x00004000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->optional_int64(), target);
- }
- // optional uint32 optional_uint32 = 3;
- if (cached_has_bits & 0x00010000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->optional_uint32(), target);
- }
- // optional uint64 optional_uint64 = 4;
- if (cached_has_bits & 0x00020000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->optional_uint64(), target);
- }
- // optional sint32 optional_sint32 = 5;
- if (cached_has_bits & 0x00080000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(5, this->optional_sint32(), target);
- }
- // optional sint64 optional_sint64 = 6;
- if (cached_has_bits & 0x00040000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteSInt64ToArray(6, this->optional_sint64(), target);
- }
- // optional fixed32 optional_fixed32 = 7;
- if (cached_has_bits & 0x00100000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteFixed32ToArray(7, this->optional_fixed32(), target);
- }
- // optional fixed64 optional_fixed64 = 8;
- if (cached_has_bits & 0x00200000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteFixed64ToArray(8, this->optional_fixed64(), target);
- }
- // optional sfixed32 optional_sfixed32 = 9;
- if (cached_has_bits & 0x00800000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteSFixed32ToArray(9, this->optional_sfixed32(), target);
- }
- // optional sfixed64 optional_sfixed64 = 10;
- if (cached_has_bits & 0x00400000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteSFixed64ToArray(10, this->optional_sfixed64(), target);
- }
- // optional float optional_float = 11;
- if (cached_has_bits & 0x01000000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(11, this->optional_float(), target);
- }
- // optional double optional_double = 12;
- if (cached_has_bits & 0x02000000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(12, this->optional_double(), target);
- }
- // optional bool optional_bool = 13;
- if (cached_has_bits & 0x04000000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(13, this->optional_bool(), target);
- }
- // optional string optional_string = 14;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->optional_string().data(), static_cast<int>(this->optional_string().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.optional_string");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 14, this->optional_string(), target);
- }
- // optional bytes optional_bytes = 15;
- if (cached_has_bits & 0x00000002u) {
- target =
- ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
- 15, this->optional_bytes(), target);
- }
- // optional group OptionalGroup = 16 { ... };
- if (cached_has_bits & 0x00000100u) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteGroupToArray(
- 16, this->_internal_optionalgroup(), deterministic, target);
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage optional_nested_message = 18;
- if (cached_has_bits & 0x00000200u) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 18, this->_internal_optional_nested_message(), deterministic, target);
- }
- // optional .protobuf_unittest_no_arena.ForeignMessage optional_foreign_message = 19;
- if (cached_has_bits & 0x00000400u) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 19, this->_internal_optional_foreign_message(), deterministic, target);
- }
- // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
- if (cached_has_bits & 0x00000800u) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 20, this->_internal_optional_import_message(), deterministic, target);
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedEnum optional_nested_enum = 21;
- if (cached_has_bits & 0x10000000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 21, this->optional_nested_enum(), target);
- }
- // optional .protobuf_unittest_no_arena.ForeignEnum optional_foreign_enum = 22;
- if (cached_has_bits & 0x20000000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 22, this->optional_foreign_enum(), target);
- }
- // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
- if (cached_has_bits & 0x40000000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 23, this->optional_import_enum(), target);
- }
- // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
- if (cached_has_bits & 0x00000004u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->optional_string_piece().data(), static_cast<int>(this->optional_string_piece().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.optional_string_piece");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 24, this->optional_string_piece(), target);
- }
- // optional string optional_cord = 25 [ctype = CORD];
- if (cached_has_bits & 0x00000008u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->optional_cord().data(), static_cast<int>(this->optional_cord().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.optional_cord");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 25, this->optional_cord(), target);
- }
- // optional .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
- if (cached_has_bits & 0x00001000u) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 26, this->_internal_optional_public_import_message(), deterministic, target);
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage optional_message = 27 [lazy = true];
- if (cached_has_bits & 0x00002000u) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 27, this->_internal_optional_message(), deterministic, target);
- }
- // repeated int32 repeated_int32 = 31;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32ToArray(31, this->repeated_int32_, target);
- // repeated int64 repeated_int64 = 32;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt64ToArray(32, this->repeated_int64_, target);
- // repeated uint32 repeated_uint32 = 33;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteUInt32ToArray(33, this->repeated_uint32_, target);
- // repeated uint64 repeated_uint64 = 34;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteUInt64ToArray(34, this->repeated_uint64_, target);
- // repeated sint32 repeated_sint32 = 35;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteSInt32ToArray(35, this->repeated_sint32_, target);
- // repeated sint64 repeated_sint64 = 36;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteSInt64ToArray(36, this->repeated_sint64_, target);
- // repeated fixed32 repeated_fixed32 = 37;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteFixed32ToArray(37, this->repeated_fixed32_, target);
- // repeated fixed64 repeated_fixed64 = 38;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteFixed64ToArray(38, this->repeated_fixed64_, target);
- // repeated sfixed32 repeated_sfixed32 = 39;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteSFixed32ToArray(39, this->repeated_sfixed32_, target);
- // repeated sfixed64 repeated_sfixed64 = 40;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteSFixed64ToArray(40, this->repeated_sfixed64_, target);
- // repeated float repeated_float = 41;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteFloatToArray(41, this->repeated_float_, target);
- // repeated double repeated_double = 42;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteDoubleToArray(42, this->repeated_double_, target);
- // repeated bool repeated_bool = 43;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteBoolToArray(43, this->repeated_bool_, target);
- // repeated string repeated_string = 44;
- for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->repeated_string(i).data(), static_cast<int>(this->repeated_string(i).length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.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 group RepeatedGroup = 46 { ... };
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeatedgroup_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteGroupToArray(
- 46, this->repeatedgroup(static_cast<int>(i)), deterministic, target);
- }
- // repeated .protobuf_unittest_no_arena.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 .protobuf_unittest_no_arena.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_import.ImportMessage repeated_import_message = 50;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_import_message_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 50, this->repeated_import_message(static_cast<int>(i)), deterministic, target);
- }
- // repeated .protobuf_unittest_no_arena.TestAllTypes.NestedEnum repeated_nested_enum = 51;
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 51, this->repeated_nested_enum_, target);
- // repeated .protobuf_unittest_no_arena.ForeignEnum repeated_foreign_enum = 52;
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 52, this->repeated_foreign_enum_, target);
- // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 53, this->repeated_import_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::WireFormat::VerifyUTF8StringNamedField(
- this->repeated_string_piece(i).data(), static_cast<int>(this->repeated_string_piece(i).length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.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::WireFormat::VerifyUTF8StringNamedField(
- this->repeated_cord(i).data(), static_cast<int>(this->repeated_cord(i).length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.repeated_cord");
- target = ::google::protobuf::internal::WireFormatLite::
- WriteStringToArray(55, this->repeated_cord(i), target);
- }
- // repeated .protobuf_unittest_no_arena.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);
- }
- // optional int32 default_int32 = 61 [default = 41];
- if (cached_has_bits & 0x80000000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(61, this->default_int32(), target);
- }
- cached_has_bits = _has_bits_[1];
- // optional int64 default_int64 = 62 [default = 42];
- if (cached_has_bits & 0x00000001u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(62, this->default_int64(), target);
- }
- // optional uint32 default_uint32 = 63 [default = 43];
- if (cached_has_bits & 0x00000004u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(63, this->default_uint32(), target);
- }
- // optional uint64 default_uint64 = 64 [default = 44];
- if (cached_has_bits & 0x00000002u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(64, this->default_uint64(), target);
- }
- // optional sint32 default_sint32 = 65 [default = -45];
- if (cached_has_bits & 0x00000008u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(65, this->default_sint32(), target);
- }
- // optional sint64 default_sint64 = 66 [default = 46];
- if (cached_has_bits & 0x00000010u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteSInt64ToArray(66, this->default_sint64(), target);
- }
- // optional fixed32 default_fixed32 = 67 [default = 47];
- if (cached_has_bits & 0x00000040u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteFixed32ToArray(67, this->default_fixed32(), target);
- }
- // optional fixed64 default_fixed64 = 68 [default = 48];
- if (cached_has_bits & 0x00000020u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteFixed64ToArray(68, this->default_fixed64(), target);
- }
- // optional sfixed32 default_sfixed32 = 69 [default = 49];
- if (cached_has_bits & 0x00000080u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteSFixed32ToArray(69, this->default_sfixed32(), target);
- }
- // optional sfixed64 default_sfixed64 = 70 [default = -50];
- if (cached_has_bits & 0x00000100u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteSFixed64ToArray(70, this->default_sfixed64(), target);
- }
- // optional float default_float = 71 [default = 51.5];
- if (cached_has_bits & 0x00000400u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(71, this->default_float(), target);
- }
- // optional double default_double = 72 [default = 52000];
- if (cached_has_bits & 0x00000200u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(72, this->default_double(), target);
- }
- // optional bool default_bool = 73 [default = true];
- if (cached_has_bits & 0x00000800u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(73, this->default_bool(), target);
- }
- cached_has_bits = _has_bits_[0];
- // optional string default_string = 74 [default = "hello"];
- if (cached_has_bits & 0x00000010u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->default_string().data(), static_cast<int>(this->default_string().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.default_string");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 74, this->default_string(), target);
- }
- // optional bytes default_bytes = 75 [default = "world"];
- if (cached_has_bits & 0x00000020u) {
- target =
- ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
- 75, this->default_bytes(), target);
- }
- cached_has_bits = _has_bits_[1];
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
- if (cached_has_bits & 0x00001000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 81, this->default_nested_enum(), target);
- }
- // optional .protobuf_unittest_no_arena.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
- if (cached_has_bits & 0x00002000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 82, this->default_foreign_enum(), target);
- }
- cached_has_bits = _has_bits_[0];
- // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
- if (cached_has_bits & 0x08000000u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 83, this->default_import_enum(), target);
- }
- // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
- if (cached_has_bits & 0x00000040u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->default_string_piece().data(), static_cast<int>(this->default_string_piece().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.default_string_piece");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 84, this->default_string_piece(), target);
- }
- // optional string default_cord = 85 [default = "123", ctype = CORD];
- if (cached_has_bits & 0x00000080u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->default_cord().data(), static_cast<int>(this->default_cord().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.default_cord");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 85, this->default_cord(), target);
- }
- switch (oneof_field_case()) {
- case kOneofUint32:
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(111, this->oneof_uint32(), target);
- break;
- case kOneofNestedMessage:
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 112, this->_internal_oneof_nested_message(), deterministic, target);
- break;
- case kOneofString:
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest_no_arena.TestAllTypes.oneof_string");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 113, this->oneof_string(), target);
- break;
- case kOneofBytes:
- target =
- ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
- 114, this->oneof_bytes(), target);
- break;
- case kLazyOneofNestedMessage:
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 115, this->_internal_lazy_oneof_nested_message(), deterministic, target);
- break;
- default: ;
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest_no_arena.TestAllTypes)
- return target;
- }
- size_t TestAllTypes::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest_no_arena.TestAllTypes)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- // repeated int32 repeated_int32 = 31;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- Int32Size(this->repeated_int32_);
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_int32_size());
- total_size += data_size;
- }
- // repeated int64 repeated_int64 = 32;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- Int64Size(this->repeated_int64_);
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_int64_size());
- total_size += data_size;
- }
- // repeated uint32 repeated_uint32 = 33;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- UInt32Size(this->repeated_uint32_);
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_uint32_size());
- total_size += data_size;
- }
- // repeated uint64 repeated_uint64 = 34;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- UInt64Size(this->repeated_uint64_);
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_uint64_size());
- total_size += data_size;
- }
- // repeated sint32 repeated_sint32 = 35;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- SInt32Size(this->repeated_sint32_);
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_sint32_size());
- total_size += data_size;
- }
- // repeated sint64 repeated_sint64 = 36;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- SInt64Size(this->repeated_sint64_);
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_sint64_size());
- 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;
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_fixed32_size());
- 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;
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_fixed64_size());
- 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;
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_sfixed32_size());
- 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;
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_sfixed64_size());
- 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;
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_float_size());
- 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;
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_double_size());
- 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;
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_bool_size());
- 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 group RepeatedGroup = 46 { ... };
- {
- unsigned int count = static_cast<unsigned int>(this->repeatedgroup_size());
- total_size += 4UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::GroupSize(
- this->repeatedgroup(static_cast<int>(i)));
- }
- }
- // repeated .protobuf_unittest_no_arena.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 .protobuf_unittest_no_arena.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_import.ImportMessage repeated_import_message = 50;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_import_message_size());
- total_size += 2UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->repeated_import_message(static_cast<int>(i)));
- }
- }
- // repeated .protobuf_unittest_no_arena.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)));
- }
- total_size += (2UL * count) + data_size;
- }
- // repeated .protobuf_unittest_no_arena.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)));
- }
- total_size += (2UL * count) + data_size;
- }
- // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
- {
- size_t data_size = 0;
- unsigned int count = static_cast<unsigned int>(this->repeated_import_enum_size());for (unsigned int i = 0; i < count; i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
- this->repeated_import_enum(static_cast<int>(i)));
- }
- total_size += (2UL * count) + 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 .protobuf_unittest_no_arena.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)));
- }
- }
- if (_has_bits_[0 / 32] & 255u) {
- // optional string optional_string = 14;
- if (has_optional_string()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->optional_string());
- }
- // optional bytes optional_bytes = 15;
- if (has_optional_bytes()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->optional_bytes());
- }
- // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
- if (has_optional_string_piece()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->optional_string_piece());
- }
- // optional string optional_cord = 25 [ctype = CORD];
- if (has_optional_cord()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->optional_cord());
- }
- // optional string default_string = 74 [default = "hello"];
- if (has_default_string()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->default_string());
- }
- // optional bytes default_bytes = 75 [default = "world"];
- if (has_default_bytes()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->default_bytes());
- }
- // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
- if (has_default_string_piece()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->default_string_piece());
- }
- // optional string default_cord = 85 [default = "123", ctype = CORD];
- if (has_default_cord()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->default_cord());
- }
- }
- if (_has_bits_[8 / 32] & 65280u) {
- // optional group OptionalGroup = 16 { ... };
- if (has_optionalgroup()) {
- total_size += 4 +
- ::google::protobuf::internal::WireFormatLite::GroupSize(
- *optionalgroup_);
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage optional_nested_message = 18;
- if (has_optional_nested_message()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *optional_nested_message_);
- }
- // optional .protobuf_unittest_no_arena.ForeignMessage optional_foreign_message = 19;
- if (has_optional_foreign_message()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *optional_foreign_message_);
- }
- // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
- if (has_optional_import_message()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *optional_import_message_);
- }
- // optional .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
- if (has_optional_public_import_message()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *optional_public_import_message_);
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage optional_message = 27 [lazy = true];
- if (has_optional_message()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *optional_message_);
- }
- // optional int64 optional_int64 = 2;
- if (has_optional_int64()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int64Size(
- this->optional_int64());
- }
- // optional int32 optional_int32 = 1;
- if (has_optional_int32()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->optional_int32());
- }
- }
- if (_has_bits_[16 / 32] & 16711680u) {
- // optional uint32 optional_uint32 = 3;
- if (has_optional_uint32()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt32Size(
- this->optional_uint32());
- }
- // optional uint64 optional_uint64 = 4;
- if (has_optional_uint64()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt64Size(
- this->optional_uint64());
- }
- // optional sint64 optional_sint64 = 6;
- if (has_optional_sint64()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::SInt64Size(
- this->optional_sint64());
- }
- // optional sint32 optional_sint32 = 5;
- if (has_optional_sint32()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::SInt32Size(
- this->optional_sint32());
- }
- // optional fixed32 optional_fixed32 = 7;
- if (has_optional_fixed32()) {
- total_size += 1 + 4;
- }
- // optional fixed64 optional_fixed64 = 8;
- if (has_optional_fixed64()) {
- total_size += 1 + 8;
- }
- // optional sfixed64 optional_sfixed64 = 10;
- if (has_optional_sfixed64()) {
- total_size += 1 + 8;
- }
- // optional sfixed32 optional_sfixed32 = 9;
- if (has_optional_sfixed32()) {
- total_size += 1 + 4;
- }
- }
- if (_has_bits_[24 / 32] & 4278190080u) {
- // optional float optional_float = 11;
- if (has_optional_float()) {
- total_size += 1 + 4;
- }
- // optional double optional_double = 12;
- if (has_optional_double()) {
- total_size += 1 + 8;
- }
- // optional bool optional_bool = 13;
- if (has_optional_bool()) {
- total_size += 1 + 1;
- }
- // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
- if (has_default_import_enum()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->default_import_enum());
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedEnum optional_nested_enum = 21;
- if (has_optional_nested_enum()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_nested_enum());
- }
- // optional .protobuf_unittest_no_arena.ForeignEnum optional_foreign_enum = 22;
- if (has_optional_foreign_enum()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_foreign_enum());
- }
- // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
- if (has_optional_import_enum()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_import_enum());
- }
- // optional int32 default_int32 = 61 [default = 41];
- if (has_default_int32()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->default_int32());
- }
- }
- if (_has_bits_[32 / 32] & 255u) {
- // optional int64 default_int64 = 62 [default = 42];
- if (has_default_int64()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int64Size(
- this->default_int64());
- }
- // optional uint64 default_uint64 = 64 [default = 44];
- if (has_default_uint64()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::UInt64Size(
- this->default_uint64());
- }
- // optional uint32 default_uint32 = 63 [default = 43];
- if (has_default_uint32()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::UInt32Size(
- this->default_uint32());
- }
- // optional sint32 default_sint32 = 65 [default = -45];
- if (has_default_sint32()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::SInt32Size(
- this->default_sint32());
- }
- // optional sint64 default_sint64 = 66 [default = 46];
- if (has_default_sint64()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::SInt64Size(
- this->default_sint64());
- }
- // optional fixed64 default_fixed64 = 68 [default = 48];
- if (has_default_fixed64()) {
- total_size += 2 + 8;
- }
- // optional fixed32 default_fixed32 = 67 [default = 47];
- if (has_default_fixed32()) {
- total_size += 2 + 4;
- }
- // optional sfixed32 default_sfixed32 = 69 [default = 49];
- if (has_default_sfixed32()) {
- total_size += 2 + 4;
- }
- }
- if (_has_bits_[40 / 32] & 16128u) {
- // optional sfixed64 default_sfixed64 = 70 [default = -50];
- if (has_default_sfixed64()) {
- total_size += 2 + 8;
- }
- // optional double default_double = 72 [default = 52000];
- if (has_default_double()) {
- total_size += 2 + 8;
- }
- // optional float default_float = 71 [default = 51.5];
- if (has_default_float()) {
- total_size += 2 + 4;
- }
- // optional bool default_bool = 73 [default = true];
- if (has_default_bool()) {
- total_size += 2 + 1;
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
- if (has_default_nested_enum()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->default_nested_enum());
- }
- // optional .protobuf_unittest_no_arena.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
- if (has_default_foreign_enum()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->default_foreign_enum());
- }
- }
- switch (oneof_field_case()) {
- // optional uint32 oneof_uint32 = 111;
- case kOneofUint32: {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::UInt32Size(
- this->oneof_uint32());
- break;
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage oneof_nested_message = 112;
- case kOneofNestedMessage: {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *oneof_field_.oneof_nested_message_);
- break;
- }
- // optional string oneof_string = 113;
- case kOneofString: {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->oneof_string());
- break;
- }
- // optional bytes oneof_bytes = 114;
- case kOneofBytes: {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->oneof_bytes());
- break;
- }
- // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage lazy_oneof_nested_message = 115 [lazy = true];
- case kLazyOneofNestedMessage: {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *oneof_field_.lazy_oneof_nested_message_);
- 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:protobuf_unittest_no_arena.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:protobuf_unittest_no_arena.TestAllTypes)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest_no_arena.TestAllTypes)
- MergeFrom(*source);
- }
- }
- void TestAllTypes::MergeFrom(const TestAllTypes& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest_no_arena.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_);
- repeatedgroup_.MergeFrom(from.repeatedgroup_);
- repeated_nested_message_.MergeFrom(from.repeated_nested_message_);
- repeated_foreign_message_.MergeFrom(from.repeated_foreign_message_);
- repeated_import_message_.MergeFrom(from.repeated_import_message_);
- repeated_nested_enum_.MergeFrom(from.repeated_nested_enum_);
- repeated_foreign_enum_.MergeFrom(from.repeated_foreign_enum_);
- repeated_import_enum_.MergeFrom(from.repeated_import_enum_);
- repeated_string_piece_.MergeFrom(from.repeated_string_piece_);
- repeated_cord_.MergeFrom(from.repeated_cord_);
- repeated_lazy_message_.MergeFrom(from.repeated_lazy_message_);
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 255u) {
- if (cached_has_bits & 0x00000001u) {
- set_has_optional_string();
- optional_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_);
- }
- if (cached_has_bits & 0x00000002u) {
- set_has_optional_bytes();
- optional_bytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes_);
- }
- if (cached_has_bits & 0x00000004u) {
- set_has_optional_string_piece();
- optional_string_piece_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_piece_);
- }
- if (cached_has_bits & 0x00000008u) {
- set_has_optional_cord();
- optional_cord_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_cord_);
- }
- if (cached_has_bits & 0x00000010u) {
- set_has_default_string();
- default_string_.AssignWithDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get(), from.default_string_);
- }
- if (cached_has_bits & 0x00000020u) {
- set_has_default_bytes();
- default_bytes_.AssignWithDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get(), from.default_bytes_);
- }
- if (cached_has_bits & 0x00000040u) {
- set_has_default_string_piece();
- default_string_piece_.AssignWithDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get(), from.default_string_piece_);
- }
- if (cached_has_bits & 0x00000080u) {
- set_has_default_cord();
- default_cord_.AssignWithDefault(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get(), from.default_cord_);
- }
- }
- if (cached_has_bits & 65280u) {
- if (cached_has_bits & 0x00000100u) {
- mutable_optionalgroup()->::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup::MergeFrom(from.optionalgroup());
- }
- if (cached_has_bits & 0x00000200u) {
- mutable_optional_nested_message()->::protobuf_unittest_no_arena::TestAllTypes_NestedMessage::MergeFrom(from.optional_nested_message());
- }
- if (cached_has_bits & 0x00000400u) {
- mutable_optional_foreign_message()->::protobuf_unittest_no_arena::ForeignMessage::MergeFrom(from.optional_foreign_message());
- }
- if (cached_has_bits & 0x00000800u) {
- mutable_optional_import_message()->::protobuf_unittest_import::ImportMessage::MergeFrom(from.optional_import_message());
- }
- if (cached_has_bits & 0x00001000u) {
- mutable_optional_public_import_message()->::protobuf_unittest_import::PublicImportMessage::MergeFrom(from.optional_public_import_message());
- }
- if (cached_has_bits & 0x00002000u) {
- mutable_optional_message()->::protobuf_unittest_no_arena::TestAllTypes_NestedMessage::MergeFrom(from.optional_message());
- }
- if (cached_has_bits & 0x00004000u) {
- optional_int64_ = from.optional_int64_;
- }
- if (cached_has_bits & 0x00008000u) {
- optional_int32_ = from.optional_int32_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- if (cached_has_bits & 16711680u) {
- if (cached_has_bits & 0x00010000u) {
- optional_uint32_ = from.optional_uint32_;
- }
- if (cached_has_bits & 0x00020000u) {
- optional_uint64_ = from.optional_uint64_;
- }
- if (cached_has_bits & 0x00040000u) {
- optional_sint64_ = from.optional_sint64_;
- }
- if (cached_has_bits & 0x00080000u) {
- optional_sint32_ = from.optional_sint32_;
- }
- if (cached_has_bits & 0x00100000u) {
- optional_fixed32_ = from.optional_fixed32_;
- }
- if (cached_has_bits & 0x00200000u) {
- optional_fixed64_ = from.optional_fixed64_;
- }
- if (cached_has_bits & 0x00400000u) {
- optional_sfixed64_ = from.optional_sfixed64_;
- }
- if (cached_has_bits & 0x00800000u) {
- optional_sfixed32_ = from.optional_sfixed32_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- if (cached_has_bits & 4278190080u) {
- if (cached_has_bits & 0x01000000u) {
- optional_float_ = from.optional_float_;
- }
- if (cached_has_bits & 0x02000000u) {
- optional_double_ = from.optional_double_;
- }
- if (cached_has_bits & 0x04000000u) {
- optional_bool_ = from.optional_bool_;
- }
- if (cached_has_bits & 0x08000000u) {
- default_import_enum_ = from.default_import_enum_;
- }
- if (cached_has_bits & 0x10000000u) {
- optional_nested_enum_ = from.optional_nested_enum_;
- }
- if (cached_has_bits & 0x20000000u) {
- optional_foreign_enum_ = from.optional_foreign_enum_;
- }
- if (cached_has_bits & 0x40000000u) {
- optional_import_enum_ = from.optional_import_enum_;
- }
- if (cached_has_bits & 0x80000000u) {
- default_int32_ = from.default_int32_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- cached_has_bits = from._has_bits_[1];
- if (cached_has_bits & 255u) {
- if (cached_has_bits & 0x00000001u) {
- default_int64_ = from.default_int64_;
- }
- if (cached_has_bits & 0x00000002u) {
- default_uint64_ = from.default_uint64_;
- }
- if (cached_has_bits & 0x00000004u) {
- default_uint32_ = from.default_uint32_;
- }
- if (cached_has_bits & 0x00000008u) {
- default_sint32_ = from.default_sint32_;
- }
- if (cached_has_bits & 0x00000010u) {
- default_sint64_ = from.default_sint64_;
- }
- if (cached_has_bits & 0x00000020u) {
- default_fixed64_ = from.default_fixed64_;
- }
- if (cached_has_bits & 0x00000040u) {
- default_fixed32_ = from.default_fixed32_;
- }
- if (cached_has_bits & 0x00000080u) {
- default_sfixed32_ = from.default_sfixed32_;
- }
- _has_bits_[1] |= cached_has_bits;
- }
- if (cached_has_bits & 16128u) {
- if (cached_has_bits & 0x00000100u) {
- default_sfixed64_ = from.default_sfixed64_;
- }
- if (cached_has_bits & 0x00000200u) {
- default_double_ = from.default_double_;
- }
- if (cached_has_bits & 0x00000400u) {
- default_float_ = from.default_float_;
- }
- if (cached_has_bits & 0x00000800u) {
- default_bool_ = from.default_bool_;
- }
- if (cached_has_bits & 0x00001000u) {
- default_nested_enum_ = from.default_nested_enum_;
- }
- if (cached_has_bits & 0x00002000u) {
- default_foreign_enum_ = from.default_foreign_enum_;
- }
- _has_bits_[1] |= cached_has_bits;
- }
- switch (from.oneof_field_case()) {
- case kOneofUint32: {
- set_oneof_uint32(from.oneof_uint32());
- break;
- }
- case kOneofNestedMessage: {
- mutable_oneof_nested_message()->::protobuf_unittest_no_arena::TestAllTypes_NestedMessage::MergeFrom(from.oneof_nested_message());
- break;
- }
- case kOneofString: {
- set_oneof_string(from.oneof_string());
- break;
- }
- case kOneofBytes: {
- set_oneof_bytes(from.oneof_bytes());
- break;
- }
- case kLazyOneofNestedMessage: {
- mutable_lazy_oneof_nested_message()->::protobuf_unittest_no_arena::TestAllTypes_NestedMessage::MergeFrom(from.lazy_oneof_nested_message());
- break;
- }
- case ONEOF_FIELD_NOT_SET: {
- break;
- }
- }
- }
- void TestAllTypes::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest_no_arena.TestAllTypes)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void TestAllTypes::CopyFrom(const TestAllTypes& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest_no_arena.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(&repeatedgroup_)->InternalSwap(CastToBase(&other->repeatedgroup_));
- CastToBase(&repeated_nested_message_)->InternalSwap(CastToBase(&other->repeated_nested_message_));
- CastToBase(&repeated_foreign_message_)->InternalSwap(CastToBase(&other->repeated_foreign_message_));
- CastToBase(&repeated_import_message_)->InternalSwap(CastToBase(&other->repeated_import_message_));
- repeated_nested_enum_.InternalSwap(&other->repeated_nested_enum_);
- repeated_foreign_enum_.InternalSwap(&other->repeated_foreign_enum_);
- repeated_import_enum_.InternalSwap(&other->repeated_import_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());
- default_string_.Swap(&other->default_string_, &::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get(),
- GetArenaNoVirtual());
- default_bytes_.Swap(&other->default_bytes_, &::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get(),
- GetArenaNoVirtual());
- default_string_piece_.Swap(&other->default_string_piece_, &::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get(),
- GetArenaNoVirtual());
- default_cord_.Swap(&other->default_cord_, &::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get(),
- GetArenaNoVirtual());
- swap(optionalgroup_, other->optionalgroup_);
- swap(optional_nested_message_, other->optional_nested_message_);
- swap(optional_foreign_message_, other->optional_foreign_message_);
- swap(optional_import_message_, other->optional_import_message_);
- swap(optional_public_import_message_, other->optional_public_import_message_);
- swap(optional_message_, other->optional_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(default_import_enum_, other->default_import_enum_);
- swap(optional_nested_enum_, other->optional_nested_enum_);
- swap(optional_foreign_enum_, other->optional_foreign_enum_);
- swap(optional_import_enum_, other->optional_import_enum_);
- swap(default_int32_, other->default_int32_);
- swap(default_int64_, other->default_int64_);
- swap(default_uint64_, other->default_uint64_);
- swap(default_uint32_, other->default_uint32_);
- swap(default_sint32_, other->default_sint32_);
- swap(default_sint64_, other->default_sint64_);
- swap(default_fixed64_, other->default_fixed64_);
- swap(default_fixed32_, other->default_fixed32_);
- swap(default_sfixed32_, other->default_sfixed32_);
- swap(default_sfixed64_, other->default_sfixed64_);
- swap(default_double_, other->default_double_);
- swap(default_float_, other->default_float_);
- swap(default_bool_, other->default_bool_);
- swap(default_nested_enum_, other->default_nested_enum_);
- swap(default_foreign_enum_, other->default_foreign_enum_);
- swap(oneof_field_, other->oneof_field_);
- swap(_oneof_case_[0], other->_oneof_case_[0]);
- swap(_has_bits_[0], other->_has_bits_[0]);
- swap(_has_bits_[1], other->_has_bits_[1]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata TestAllTypes::GetMetadata() const {
- protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_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_5farena_2eproto::scc_info_ForeignMessage.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:protobuf_unittest_no_arena.ForeignMessage)
- }
- ForeignMessage::ForeignMessage(const ForeignMessage& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- c_ = from.c_;
- // @@protoc_insertion_point(copy_constructor:protobuf_unittest_no_arena.ForeignMessage)
- }
- void ForeignMessage::SharedCtor() {
- c_ = 0;
- }
- ForeignMessage::~ForeignMessage() {
- // @@protoc_insertion_point(destructor:protobuf_unittest_no_arena.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_5farena_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const ForeignMessage& ForeignMessage::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::scc_info_ForeignMessage.base);
- return *internal_default_instance();
- }
- void ForeignMessage::Clear() {
- // @@protoc_insertion_point(message_clear_start:protobuf_unittest_no_arena.ForeignMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- c_ = 0;
- _has_bits_.Clear();
- _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:protobuf_unittest_no_arena.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)) {
- // optional int32 c = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
- set_has_c();
- 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:protobuf_unittest_no_arena.ForeignMessage)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:protobuf_unittest_no_arena.ForeignMessage)
- return false;
- #undef DO_
- }
- void ForeignMessage::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:protobuf_unittest_no_arena.ForeignMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 c = 1;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->c(), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:protobuf_unittest_no_arena.ForeignMessage)
- }
- ::google::protobuf::uint8* ForeignMessage::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest_no_arena.ForeignMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 c = 1;
- if (cached_has_bits & 0x00000001u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->c(), target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest_no_arena.ForeignMessage)
- return target;
- }
- size_t ForeignMessage::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest_no_arena.ForeignMessage)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- // optional int32 c = 1;
- if (has_c()) {
- 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:protobuf_unittest_no_arena.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:protobuf_unittest_no_arena.ForeignMessage)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest_no_arena.ForeignMessage)
- MergeFrom(*source);
- }
- }
- void ForeignMessage::MergeFrom(const ForeignMessage& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest_no_arena.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.has_c()) {
- set_c(from.c());
- }
- }
- void ForeignMessage::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest_no_arena.ForeignMessage)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void ForeignMessage::CopyFrom(const ForeignMessage& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest_no_arena.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_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata ForeignMessage::GetMetadata() const {
- protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void TestNoArenaMessage::InitAsDefaultInstance() {
- ::protobuf_unittest_no_arena::_TestNoArenaMessage_default_instance_._instance.get_mutable()->arena_message_ = const_cast< ::proto2_arena_unittest::ArenaMessage*>(
- ::proto2_arena_unittest::ArenaMessage::internal_default_instance());
- }
- void TestNoArenaMessage::clear_arena_message() {
- if (arena_message_ != NULL) arena_message_->Clear();
- clear_has_arena_message();
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int TestNoArenaMessage::kArenaMessageFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestNoArenaMessage::TestNoArenaMessage()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::scc_info_TestNoArenaMessage.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:protobuf_unittest_no_arena.TestNoArenaMessage)
- }
- TestNoArenaMessage::TestNoArenaMessage(const TestNoArenaMessage& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- if (from.has_arena_message()) {
- arena_message_ = new ::proto2_arena_unittest::ArenaMessage(*from.arena_message_);
- } else {
- arena_message_ = NULL;
- }
- // @@protoc_insertion_point(copy_constructor:protobuf_unittest_no_arena.TestNoArenaMessage)
- }
- void TestNoArenaMessage::SharedCtor() {
- arena_message_ = NULL;
- }
- TestNoArenaMessage::~TestNoArenaMessage() {
- // @@protoc_insertion_point(destructor:protobuf_unittest_no_arena.TestNoArenaMessage)
- SharedDtor();
- }
- void TestNoArenaMessage::SharedDtor() {
- if (this != internal_default_instance()) delete arena_message_;
- }
- void TestNoArenaMessage::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* TestNoArenaMessage::descriptor() {
- ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const TestNoArenaMessage& TestNoArenaMessage::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::scc_info_TestNoArenaMessage.base);
- return *internal_default_instance();
- }
- void TestNoArenaMessage::Clear() {
- // @@protoc_insertion_point(message_clear_start:protobuf_unittest_no_arena.TestNoArenaMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- GOOGLE_DCHECK(arena_message_ != NULL);
- arena_message_->Clear();
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear();
- }
- bool TestNoArenaMessage::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:protobuf_unittest_no_arena.TestNoArenaMessage)
- 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)) {
- // optional .proto2_arena_unittest.ArenaMessage arena_message = 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_arena_message()));
- } 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:protobuf_unittest_no_arena.TestNoArenaMessage)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:protobuf_unittest_no_arena.TestNoArenaMessage)
- return false;
- #undef DO_
- }
- void TestNoArenaMessage::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:protobuf_unittest_no_arena.TestNoArenaMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional .proto2_arena_unittest.ArenaMessage arena_message = 1;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->_internal_arena_message(), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:protobuf_unittest_no_arena.TestNoArenaMessage)
- }
- ::google::protobuf::uint8* TestNoArenaMessage::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest_no_arena.TestNoArenaMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional .proto2_arena_unittest.ArenaMessage arena_message = 1;
- if (cached_has_bits & 0x00000001u) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 1, this->_internal_arena_message(), deterministic, target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest_no_arena.TestNoArenaMessage)
- return target;
- }
- size_t TestNoArenaMessage::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest_no_arena.TestNoArenaMessage)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- // optional .proto2_arena_unittest.ArenaMessage arena_message = 1;
- if (has_arena_message()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *arena_message_);
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void TestNoArenaMessage::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest_no_arena.TestNoArenaMessage)
- GOOGLE_DCHECK_NE(&from, this);
- const TestNoArenaMessage* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const TestNoArenaMessage>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest_no_arena.TestNoArenaMessage)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest_no_arena.TestNoArenaMessage)
- MergeFrom(*source);
- }
- }
- void TestNoArenaMessage::MergeFrom(const TestNoArenaMessage& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest_no_arena.TestNoArenaMessage)
- 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_arena_message()) {
- mutable_arena_message()->::proto2_arena_unittest::ArenaMessage::MergeFrom(from.arena_message());
- }
- }
- void TestNoArenaMessage::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest_no_arena.TestNoArenaMessage)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void TestNoArenaMessage::CopyFrom(const TestNoArenaMessage& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest_no_arena.TestNoArenaMessage)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TestNoArenaMessage::IsInitialized() const {
- return true;
- }
- void TestNoArenaMessage::Swap(TestNoArenaMessage* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void TestNoArenaMessage::InternalSwap(TestNoArenaMessage* other) {
- using std::swap;
- swap(arena_message_, other->arena_message_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata TestNoArenaMessage::GetMetadata() const {
- protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace protobuf_unittest_no_arena
- namespace google {
- namespace protobuf {
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage >(Arena* arena) {
- return Arena::CreateInternal< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup* Arena::CreateMaybeMessage< ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup >(Arena* arena) {
- return Arena::CreateInternal< ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup* Arena::CreateMaybeMessage< ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup >(Arena* arena) {
- return Arena::CreateInternal< ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest_no_arena::TestAllTypes* Arena::CreateMaybeMessage< ::protobuf_unittest_no_arena::TestAllTypes >(Arena* arena) {
- return Arena::CreateInternal< ::protobuf_unittest_no_arena::TestAllTypes >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest_no_arena::ForeignMessage* Arena::CreateMaybeMessage< ::protobuf_unittest_no_arena::ForeignMessage >(Arena* arena) {
- return Arena::CreateInternal< ::protobuf_unittest_no_arena::ForeignMessage >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest_no_arena::TestNoArenaMessage* Arena::CreateMaybeMessage< ::protobuf_unittest_no_arena::TestNoArenaMessage >(Arena* arena) {
- return Arena::CreateInternal< ::protobuf_unittest_no_arena::TestNoArenaMessage >(arena);
- }
- } // namespace protobuf
- } // namespace google
- // @@protoc_insertion_point(global_scope)
|