simpletest.pb.cc 271 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: simpletest.proto
  3. #include "simpletest.pb.h"
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/io/coded_stream.h>
  8. #include <google/protobuf/wire_format_lite_inl.h>
  9. #include <google/protobuf/descriptor.h>
  10. #include <google/protobuf/generated_message_reflection.h>
  11. #include <google/protobuf/reflection_ops.h>
  12. #include <google/protobuf/wire_format.h>
  13. // This is a temporary google only hack
  14. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  15. #include "third_party/protobuf/version.h"
  16. #endif
  17. // @@protoc_insertion_point(includes)
  18. namespace protobuf_simpletest_2eproto {
  19. extern PROTOBUF_INTERNAL_EXPORT_protobuf_simpletest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleStringMessage;
  20. extern PROTOBUF_INTERNAL_EXPORT_protobuf_simpletest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ComplexMessage;
  21. } // namespace protobuf_simpletest_2eproto
  22. namespace qtprotobufnamespace {
  23. namespace tests {
  24. class SimpleEnumMessageDefaultTypeInternal {
  25. public:
  26. ::google::protobuf::internal::ExplicitlyConstructed<SimpleEnumMessage>
  27. _instance;
  28. } _SimpleEnumMessage_default_instance_;
  29. class SimpleFileEnumMessageDefaultTypeInternal {
  30. public:
  31. ::google::protobuf::internal::ExplicitlyConstructed<SimpleFileEnumMessage>
  32. _instance;
  33. } _SimpleFileEnumMessage_default_instance_;
  34. class SimpleBoolMessageDefaultTypeInternal {
  35. public:
  36. ::google::protobuf::internal::ExplicitlyConstructed<SimpleBoolMessage>
  37. _instance;
  38. } _SimpleBoolMessage_default_instance_;
  39. class SimpleIntMessageDefaultTypeInternal {
  40. public:
  41. ::google::protobuf::internal::ExplicitlyConstructed<SimpleIntMessage>
  42. _instance;
  43. } _SimpleIntMessage_default_instance_;
  44. class SimpleSIntMessageDefaultTypeInternal {
  45. public:
  46. ::google::protobuf::internal::ExplicitlyConstructed<SimpleSIntMessage>
  47. _instance;
  48. } _SimpleSIntMessage_default_instance_;
  49. class SimpleUIntMessageDefaultTypeInternal {
  50. public:
  51. ::google::protobuf::internal::ExplicitlyConstructed<SimpleUIntMessage>
  52. _instance;
  53. } _SimpleUIntMessage_default_instance_;
  54. class SimpleInt64MessageDefaultTypeInternal {
  55. public:
  56. ::google::protobuf::internal::ExplicitlyConstructed<SimpleInt64Message>
  57. _instance;
  58. } _SimpleInt64Message_default_instance_;
  59. class SimpleSInt64MessageDefaultTypeInternal {
  60. public:
  61. ::google::protobuf::internal::ExplicitlyConstructed<SimpleSInt64Message>
  62. _instance;
  63. } _SimpleSInt64Message_default_instance_;
  64. class SimpleUInt64MessageDefaultTypeInternal {
  65. public:
  66. ::google::protobuf::internal::ExplicitlyConstructed<SimpleUInt64Message>
  67. _instance;
  68. } _SimpleUInt64Message_default_instance_;
  69. class SimpleStringMessageDefaultTypeInternal {
  70. public:
  71. ::google::protobuf::internal::ExplicitlyConstructed<SimpleStringMessage>
  72. _instance;
  73. } _SimpleStringMessage_default_instance_;
  74. class SimpleFloatMessageDefaultTypeInternal {
  75. public:
  76. ::google::protobuf::internal::ExplicitlyConstructed<SimpleFloatMessage>
  77. _instance;
  78. } _SimpleFloatMessage_default_instance_;
  79. class SimpleDoubleMessageDefaultTypeInternal {
  80. public:
  81. ::google::protobuf::internal::ExplicitlyConstructed<SimpleDoubleMessage>
  82. _instance;
  83. } _SimpleDoubleMessage_default_instance_;
  84. class SimpleBytesMessageDefaultTypeInternal {
  85. public:
  86. ::google::protobuf::internal::ExplicitlyConstructed<SimpleBytesMessage>
  87. _instance;
  88. } _SimpleBytesMessage_default_instance_;
  89. class SimpleFixedInt32MessageDefaultTypeInternal {
  90. public:
  91. ::google::protobuf::internal::ExplicitlyConstructed<SimpleFixedInt32Message>
  92. _instance;
  93. } _SimpleFixedInt32Message_default_instance_;
  94. class SimpleFixedInt64MessageDefaultTypeInternal {
  95. public:
  96. ::google::protobuf::internal::ExplicitlyConstructed<SimpleFixedInt64Message>
  97. _instance;
  98. } _SimpleFixedInt64Message_default_instance_;
  99. class SimpleSFixedInt32MessageDefaultTypeInternal {
  100. public:
  101. ::google::protobuf::internal::ExplicitlyConstructed<SimpleSFixedInt32Message>
  102. _instance;
  103. } _SimpleSFixedInt32Message_default_instance_;
  104. class SimpleSFixedInt64MessageDefaultTypeInternal {
  105. public:
  106. ::google::protobuf::internal::ExplicitlyConstructed<SimpleSFixedInt64Message>
  107. _instance;
  108. } _SimpleSFixedInt64Message_default_instance_;
  109. class ComplexMessageDefaultTypeInternal {
  110. public:
  111. ::google::protobuf::internal::ExplicitlyConstructed<ComplexMessage>
  112. _instance;
  113. } _ComplexMessage_default_instance_;
  114. class RepeatedIntMessageDefaultTypeInternal {
  115. public:
  116. ::google::protobuf::internal::ExplicitlyConstructed<RepeatedIntMessage>
  117. _instance;
  118. } _RepeatedIntMessage_default_instance_;
  119. class RepeatedStringMessageDefaultTypeInternal {
  120. public:
  121. ::google::protobuf::internal::ExplicitlyConstructed<RepeatedStringMessage>
  122. _instance;
  123. } _RepeatedStringMessage_default_instance_;
  124. class RepeatedDoubleMessageDefaultTypeInternal {
  125. public:
  126. ::google::protobuf::internal::ExplicitlyConstructed<RepeatedDoubleMessage>
  127. _instance;
  128. } _RepeatedDoubleMessage_default_instance_;
  129. class RepeatedBytesMessageDefaultTypeInternal {
  130. public:
  131. ::google::protobuf::internal::ExplicitlyConstructed<RepeatedBytesMessage>
  132. _instance;
  133. } _RepeatedBytesMessage_default_instance_;
  134. class RepeatedFloatMessageDefaultTypeInternal {
  135. public:
  136. ::google::protobuf::internal::ExplicitlyConstructed<RepeatedFloatMessage>
  137. _instance;
  138. } _RepeatedFloatMessage_default_instance_;
  139. class RepeatedComplexMessageDefaultTypeInternal {
  140. public:
  141. ::google::protobuf::internal::ExplicitlyConstructed<RepeatedComplexMessage>
  142. _instance;
  143. } _RepeatedComplexMessage_default_instance_;
  144. } // namespace tests
  145. } // namespace qtprotobufnamespace
  146. namespace protobuf_simpletest_2eproto {
  147. static void InitDefaultsSimpleEnumMessage() {
  148. GOOGLE_PROTOBUF_VERIFY_VERSION;
  149. {
  150. void* ptr = &::qtprotobufnamespace::tests::_SimpleEnumMessage_default_instance_;
  151. new (ptr) ::qtprotobufnamespace::tests::SimpleEnumMessage();
  152. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  153. }
  154. ::qtprotobufnamespace::tests::SimpleEnumMessage::InitAsDefaultInstance();
  155. }
  156. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleEnumMessage =
  157. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleEnumMessage}, {}};
  158. static void InitDefaultsSimpleFileEnumMessage() {
  159. GOOGLE_PROTOBUF_VERIFY_VERSION;
  160. {
  161. void* ptr = &::qtprotobufnamespace::tests::_SimpleFileEnumMessage_default_instance_;
  162. new (ptr) ::qtprotobufnamespace::tests::SimpleFileEnumMessage();
  163. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  164. }
  165. ::qtprotobufnamespace::tests::SimpleFileEnumMessage::InitAsDefaultInstance();
  166. }
  167. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleFileEnumMessage =
  168. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleFileEnumMessage}, {}};
  169. static void InitDefaultsSimpleBoolMessage() {
  170. GOOGLE_PROTOBUF_VERIFY_VERSION;
  171. {
  172. void* ptr = &::qtprotobufnamespace::tests::_SimpleBoolMessage_default_instance_;
  173. new (ptr) ::qtprotobufnamespace::tests::SimpleBoolMessage();
  174. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  175. }
  176. ::qtprotobufnamespace::tests::SimpleBoolMessage::InitAsDefaultInstance();
  177. }
  178. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleBoolMessage =
  179. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleBoolMessage}, {}};
  180. static void InitDefaultsSimpleIntMessage() {
  181. GOOGLE_PROTOBUF_VERIFY_VERSION;
  182. {
  183. void* ptr = &::qtprotobufnamespace::tests::_SimpleIntMessage_default_instance_;
  184. new (ptr) ::qtprotobufnamespace::tests::SimpleIntMessage();
  185. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  186. }
  187. ::qtprotobufnamespace::tests::SimpleIntMessage::InitAsDefaultInstance();
  188. }
  189. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleIntMessage =
  190. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleIntMessage}, {}};
  191. static void InitDefaultsSimpleSIntMessage() {
  192. GOOGLE_PROTOBUF_VERIFY_VERSION;
  193. {
  194. void* ptr = &::qtprotobufnamespace::tests::_SimpleSIntMessage_default_instance_;
  195. new (ptr) ::qtprotobufnamespace::tests::SimpleSIntMessage();
  196. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  197. }
  198. ::qtprotobufnamespace::tests::SimpleSIntMessage::InitAsDefaultInstance();
  199. }
  200. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleSIntMessage =
  201. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleSIntMessage}, {}};
  202. static void InitDefaultsSimpleUIntMessage() {
  203. GOOGLE_PROTOBUF_VERIFY_VERSION;
  204. {
  205. void* ptr = &::qtprotobufnamespace::tests::_SimpleUIntMessage_default_instance_;
  206. new (ptr) ::qtprotobufnamespace::tests::SimpleUIntMessage();
  207. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  208. }
  209. ::qtprotobufnamespace::tests::SimpleUIntMessage::InitAsDefaultInstance();
  210. }
  211. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleUIntMessage =
  212. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleUIntMessage}, {}};
  213. static void InitDefaultsSimpleInt64Message() {
  214. GOOGLE_PROTOBUF_VERIFY_VERSION;
  215. {
  216. void* ptr = &::qtprotobufnamespace::tests::_SimpleInt64Message_default_instance_;
  217. new (ptr) ::qtprotobufnamespace::tests::SimpleInt64Message();
  218. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  219. }
  220. ::qtprotobufnamespace::tests::SimpleInt64Message::InitAsDefaultInstance();
  221. }
  222. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleInt64Message =
  223. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleInt64Message}, {}};
  224. static void InitDefaultsSimpleSInt64Message() {
  225. GOOGLE_PROTOBUF_VERIFY_VERSION;
  226. {
  227. void* ptr = &::qtprotobufnamespace::tests::_SimpleSInt64Message_default_instance_;
  228. new (ptr) ::qtprotobufnamespace::tests::SimpleSInt64Message();
  229. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  230. }
  231. ::qtprotobufnamespace::tests::SimpleSInt64Message::InitAsDefaultInstance();
  232. }
  233. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleSInt64Message =
  234. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleSInt64Message}, {}};
  235. static void InitDefaultsSimpleUInt64Message() {
  236. GOOGLE_PROTOBUF_VERIFY_VERSION;
  237. {
  238. void* ptr = &::qtprotobufnamespace::tests::_SimpleUInt64Message_default_instance_;
  239. new (ptr) ::qtprotobufnamespace::tests::SimpleUInt64Message();
  240. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  241. }
  242. ::qtprotobufnamespace::tests::SimpleUInt64Message::InitAsDefaultInstance();
  243. }
  244. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleUInt64Message =
  245. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleUInt64Message}, {}};
  246. static void InitDefaultsSimpleStringMessage() {
  247. GOOGLE_PROTOBUF_VERIFY_VERSION;
  248. {
  249. void* ptr = &::qtprotobufnamespace::tests::_SimpleStringMessage_default_instance_;
  250. new (ptr) ::qtprotobufnamespace::tests::SimpleStringMessage();
  251. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  252. }
  253. ::qtprotobufnamespace::tests::SimpleStringMessage::InitAsDefaultInstance();
  254. }
  255. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleStringMessage =
  256. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleStringMessage}, {}};
  257. static void InitDefaultsSimpleFloatMessage() {
  258. GOOGLE_PROTOBUF_VERIFY_VERSION;
  259. {
  260. void* ptr = &::qtprotobufnamespace::tests::_SimpleFloatMessage_default_instance_;
  261. new (ptr) ::qtprotobufnamespace::tests::SimpleFloatMessage();
  262. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  263. }
  264. ::qtprotobufnamespace::tests::SimpleFloatMessage::InitAsDefaultInstance();
  265. }
  266. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleFloatMessage =
  267. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleFloatMessage}, {}};
  268. static void InitDefaultsSimpleDoubleMessage() {
  269. GOOGLE_PROTOBUF_VERIFY_VERSION;
  270. {
  271. void* ptr = &::qtprotobufnamespace::tests::_SimpleDoubleMessage_default_instance_;
  272. new (ptr) ::qtprotobufnamespace::tests::SimpleDoubleMessage();
  273. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  274. }
  275. ::qtprotobufnamespace::tests::SimpleDoubleMessage::InitAsDefaultInstance();
  276. }
  277. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleDoubleMessage =
  278. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleDoubleMessage}, {}};
  279. static void InitDefaultsSimpleBytesMessage() {
  280. GOOGLE_PROTOBUF_VERIFY_VERSION;
  281. {
  282. void* ptr = &::qtprotobufnamespace::tests::_SimpleBytesMessage_default_instance_;
  283. new (ptr) ::qtprotobufnamespace::tests::SimpleBytesMessage();
  284. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  285. }
  286. ::qtprotobufnamespace::tests::SimpleBytesMessage::InitAsDefaultInstance();
  287. }
  288. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleBytesMessage =
  289. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleBytesMessage}, {}};
  290. static void InitDefaultsSimpleFixedInt32Message() {
  291. GOOGLE_PROTOBUF_VERIFY_VERSION;
  292. {
  293. void* ptr = &::qtprotobufnamespace::tests::_SimpleFixedInt32Message_default_instance_;
  294. new (ptr) ::qtprotobufnamespace::tests::SimpleFixedInt32Message();
  295. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  296. }
  297. ::qtprotobufnamespace::tests::SimpleFixedInt32Message::InitAsDefaultInstance();
  298. }
  299. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleFixedInt32Message =
  300. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleFixedInt32Message}, {}};
  301. static void InitDefaultsSimpleFixedInt64Message() {
  302. GOOGLE_PROTOBUF_VERIFY_VERSION;
  303. {
  304. void* ptr = &::qtprotobufnamespace::tests::_SimpleFixedInt64Message_default_instance_;
  305. new (ptr) ::qtprotobufnamespace::tests::SimpleFixedInt64Message();
  306. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  307. }
  308. ::qtprotobufnamespace::tests::SimpleFixedInt64Message::InitAsDefaultInstance();
  309. }
  310. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleFixedInt64Message =
  311. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleFixedInt64Message}, {}};
  312. static void InitDefaultsSimpleSFixedInt32Message() {
  313. GOOGLE_PROTOBUF_VERIFY_VERSION;
  314. {
  315. void* ptr = &::qtprotobufnamespace::tests::_SimpleSFixedInt32Message_default_instance_;
  316. new (ptr) ::qtprotobufnamespace::tests::SimpleSFixedInt32Message();
  317. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  318. }
  319. ::qtprotobufnamespace::tests::SimpleSFixedInt32Message::InitAsDefaultInstance();
  320. }
  321. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleSFixedInt32Message =
  322. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleSFixedInt32Message}, {}};
  323. static void InitDefaultsSimpleSFixedInt64Message() {
  324. GOOGLE_PROTOBUF_VERIFY_VERSION;
  325. {
  326. void* ptr = &::qtprotobufnamespace::tests::_SimpleSFixedInt64Message_default_instance_;
  327. new (ptr) ::qtprotobufnamespace::tests::SimpleSFixedInt64Message();
  328. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  329. }
  330. ::qtprotobufnamespace::tests::SimpleSFixedInt64Message::InitAsDefaultInstance();
  331. }
  332. ::google::protobuf::internal::SCCInfo<0> scc_info_SimpleSFixedInt64Message =
  333. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleSFixedInt64Message}, {}};
  334. static void InitDefaultsComplexMessage() {
  335. GOOGLE_PROTOBUF_VERIFY_VERSION;
  336. {
  337. void* ptr = &::qtprotobufnamespace::tests::_ComplexMessage_default_instance_;
  338. new (ptr) ::qtprotobufnamespace::tests::ComplexMessage();
  339. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  340. }
  341. ::qtprotobufnamespace::tests::ComplexMessage::InitAsDefaultInstance();
  342. }
  343. ::google::protobuf::internal::SCCInfo<1> scc_info_ComplexMessage =
  344. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsComplexMessage}, {
  345. &protobuf_simpletest_2eproto::scc_info_SimpleStringMessage.base,}};
  346. static void InitDefaultsRepeatedIntMessage() {
  347. GOOGLE_PROTOBUF_VERIFY_VERSION;
  348. {
  349. void* ptr = &::qtprotobufnamespace::tests::_RepeatedIntMessage_default_instance_;
  350. new (ptr) ::qtprotobufnamespace::tests::RepeatedIntMessage();
  351. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  352. }
  353. ::qtprotobufnamespace::tests::RepeatedIntMessage::InitAsDefaultInstance();
  354. }
  355. ::google::protobuf::internal::SCCInfo<0> scc_info_RepeatedIntMessage =
  356. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRepeatedIntMessage}, {}};
  357. static void InitDefaultsRepeatedStringMessage() {
  358. GOOGLE_PROTOBUF_VERIFY_VERSION;
  359. {
  360. void* ptr = &::qtprotobufnamespace::tests::_RepeatedStringMessage_default_instance_;
  361. new (ptr) ::qtprotobufnamespace::tests::RepeatedStringMessage();
  362. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  363. }
  364. ::qtprotobufnamespace::tests::RepeatedStringMessage::InitAsDefaultInstance();
  365. }
  366. ::google::protobuf::internal::SCCInfo<0> scc_info_RepeatedStringMessage =
  367. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRepeatedStringMessage}, {}};
  368. static void InitDefaultsRepeatedDoubleMessage() {
  369. GOOGLE_PROTOBUF_VERIFY_VERSION;
  370. {
  371. void* ptr = &::qtprotobufnamespace::tests::_RepeatedDoubleMessage_default_instance_;
  372. new (ptr) ::qtprotobufnamespace::tests::RepeatedDoubleMessage();
  373. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  374. }
  375. ::qtprotobufnamespace::tests::RepeatedDoubleMessage::InitAsDefaultInstance();
  376. }
  377. ::google::protobuf::internal::SCCInfo<0> scc_info_RepeatedDoubleMessage =
  378. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRepeatedDoubleMessage}, {}};
  379. static void InitDefaultsRepeatedBytesMessage() {
  380. GOOGLE_PROTOBUF_VERIFY_VERSION;
  381. {
  382. void* ptr = &::qtprotobufnamespace::tests::_RepeatedBytesMessage_default_instance_;
  383. new (ptr) ::qtprotobufnamespace::tests::RepeatedBytesMessage();
  384. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  385. }
  386. ::qtprotobufnamespace::tests::RepeatedBytesMessage::InitAsDefaultInstance();
  387. }
  388. ::google::protobuf::internal::SCCInfo<0> scc_info_RepeatedBytesMessage =
  389. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRepeatedBytesMessage}, {}};
  390. static void InitDefaultsRepeatedFloatMessage() {
  391. GOOGLE_PROTOBUF_VERIFY_VERSION;
  392. {
  393. void* ptr = &::qtprotobufnamespace::tests::_RepeatedFloatMessage_default_instance_;
  394. new (ptr) ::qtprotobufnamespace::tests::RepeatedFloatMessage();
  395. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  396. }
  397. ::qtprotobufnamespace::tests::RepeatedFloatMessage::InitAsDefaultInstance();
  398. }
  399. ::google::protobuf::internal::SCCInfo<0> scc_info_RepeatedFloatMessage =
  400. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRepeatedFloatMessage}, {}};
  401. static void InitDefaultsRepeatedComplexMessage() {
  402. GOOGLE_PROTOBUF_VERIFY_VERSION;
  403. {
  404. void* ptr = &::qtprotobufnamespace::tests::_RepeatedComplexMessage_default_instance_;
  405. new (ptr) ::qtprotobufnamespace::tests::RepeatedComplexMessage();
  406. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  407. }
  408. ::qtprotobufnamespace::tests::RepeatedComplexMessage::InitAsDefaultInstance();
  409. }
  410. ::google::protobuf::internal::SCCInfo<1> scc_info_RepeatedComplexMessage =
  411. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsRepeatedComplexMessage}, {
  412. &protobuf_simpletest_2eproto::scc_info_ComplexMessage.base,}};
  413. void InitDefaults() {
  414. ::google::protobuf::internal::InitSCC(&scc_info_SimpleEnumMessage.base);
  415. ::google::protobuf::internal::InitSCC(&scc_info_SimpleFileEnumMessage.base);
  416. ::google::protobuf::internal::InitSCC(&scc_info_SimpleBoolMessage.base);
  417. ::google::protobuf::internal::InitSCC(&scc_info_SimpleIntMessage.base);
  418. ::google::protobuf::internal::InitSCC(&scc_info_SimpleSIntMessage.base);
  419. ::google::protobuf::internal::InitSCC(&scc_info_SimpleUIntMessage.base);
  420. ::google::protobuf::internal::InitSCC(&scc_info_SimpleInt64Message.base);
  421. ::google::protobuf::internal::InitSCC(&scc_info_SimpleSInt64Message.base);
  422. ::google::protobuf::internal::InitSCC(&scc_info_SimpleUInt64Message.base);
  423. ::google::protobuf::internal::InitSCC(&scc_info_SimpleStringMessage.base);
  424. ::google::protobuf::internal::InitSCC(&scc_info_SimpleFloatMessage.base);
  425. ::google::protobuf::internal::InitSCC(&scc_info_SimpleDoubleMessage.base);
  426. ::google::protobuf::internal::InitSCC(&scc_info_SimpleBytesMessage.base);
  427. ::google::protobuf::internal::InitSCC(&scc_info_SimpleFixedInt32Message.base);
  428. ::google::protobuf::internal::InitSCC(&scc_info_SimpleFixedInt64Message.base);
  429. ::google::protobuf::internal::InitSCC(&scc_info_SimpleSFixedInt32Message.base);
  430. ::google::protobuf::internal::InitSCC(&scc_info_SimpleSFixedInt64Message.base);
  431. ::google::protobuf::internal::InitSCC(&scc_info_ComplexMessage.base);
  432. ::google::protobuf::internal::InitSCC(&scc_info_RepeatedIntMessage.base);
  433. ::google::protobuf::internal::InitSCC(&scc_info_RepeatedStringMessage.base);
  434. ::google::protobuf::internal::InitSCC(&scc_info_RepeatedDoubleMessage.base);
  435. ::google::protobuf::internal::InitSCC(&scc_info_RepeatedBytesMessage.base);
  436. ::google::protobuf::internal::InitSCC(&scc_info_RepeatedFloatMessage.base);
  437. ::google::protobuf::internal::InitSCC(&scc_info_RepeatedComplexMessage.base);
  438. }
  439. ::google::protobuf::Metadata file_level_metadata[24];
  440. const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[2];
  441. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  442. ~0u, // no _has_bits_
  443. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleEnumMessage, _internal_metadata_),
  444. ~0u, // no _extensions_
  445. ~0u, // no _oneof_case_
  446. ~0u, // no _weak_field_map_
  447. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleEnumMessage, localenum_),
  448. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleEnumMessage, localenumlist_),
  449. ~0u, // no _has_bits_
  450. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleFileEnumMessage, _internal_metadata_),
  451. ~0u, // no _extensions_
  452. ~0u, // no _oneof_case_
  453. ~0u, // no _weak_field_map_
  454. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleFileEnumMessage, globalenum_),
  455. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleFileEnumMessage, globalenumlist_),
  456. ~0u, // no _has_bits_
  457. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleBoolMessage, _internal_metadata_),
  458. ~0u, // no _extensions_
  459. ~0u, // no _oneof_case_
  460. ~0u, // no _weak_field_map_
  461. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleBoolMessage, testfieldbool_),
  462. ~0u, // no _has_bits_
  463. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleIntMessage, _internal_metadata_),
  464. ~0u, // no _extensions_
  465. ~0u, // no _oneof_case_
  466. ~0u, // no _weak_field_map_
  467. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleIntMessage, testfieldint_),
  468. ~0u, // no _has_bits_
  469. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleSIntMessage, _internal_metadata_),
  470. ~0u, // no _extensions_
  471. ~0u, // no _oneof_case_
  472. ~0u, // no _weak_field_map_
  473. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleSIntMessage, testfieldint_),
  474. ~0u, // no _has_bits_
  475. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleUIntMessage, _internal_metadata_),
  476. ~0u, // no _extensions_
  477. ~0u, // no _oneof_case_
  478. ~0u, // no _weak_field_map_
  479. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleUIntMessage, testfieldint_),
  480. ~0u, // no _has_bits_
  481. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleInt64Message, _internal_metadata_),
  482. ~0u, // no _extensions_
  483. ~0u, // no _oneof_case_
  484. ~0u, // no _weak_field_map_
  485. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleInt64Message, testfieldint_),
  486. ~0u, // no _has_bits_
  487. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleSInt64Message, _internal_metadata_),
  488. ~0u, // no _extensions_
  489. ~0u, // no _oneof_case_
  490. ~0u, // no _weak_field_map_
  491. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleSInt64Message, testfieldint_),
  492. ~0u, // no _has_bits_
  493. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleUInt64Message, _internal_metadata_),
  494. ~0u, // no _extensions_
  495. ~0u, // no _oneof_case_
  496. ~0u, // no _weak_field_map_
  497. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleUInt64Message, testfieldint_),
  498. ~0u, // no _has_bits_
  499. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleStringMessage, _internal_metadata_),
  500. ~0u, // no _extensions_
  501. ~0u, // no _oneof_case_
  502. ~0u, // no _weak_field_map_
  503. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleStringMessage, testfieldstring_),
  504. ~0u, // no _has_bits_
  505. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleFloatMessage, _internal_metadata_),
  506. ~0u, // no _extensions_
  507. ~0u, // no _oneof_case_
  508. ~0u, // no _weak_field_map_
  509. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleFloatMessage, testfieldfloat_),
  510. ~0u, // no _has_bits_
  511. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleDoubleMessage, _internal_metadata_),
  512. ~0u, // no _extensions_
  513. ~0u, // no _oneof_case_
  514. ~0u, // no _weak_field_map_
  515. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleDoubleMessage, testfielddouble_),
  516. ~0u, // no _has_bits_
  517. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleBytesMessage, _internal_metadata_),
  518. ~0u, // no _extensions_
  519. ~0u, // no _oneof_case_
  520. ~0u, // no _weak_field_map_
  521. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleBytesMessage, testfieldbytes_),
  522. ~0u, // no _has_bits_
  523. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleFixedInt32Message, _internal_metadata_),
  524. ~0u, // no _extensions_
  525. ~0u, // no _oneof_case_
  526. ~0u, // no _weak_field_map_
  527. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleFixedInt32Message, testfieldfixedint32_),
  528. ~0u, // no _has_bits_
  529. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleFixedInt64Message, _internal_metadata_),
  530. ~0u, // no _extensions_
  531. ~0u, // no _oneof_case_
  532. ~0u, // no _weak_field_map_
  533. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleFixedInt64Message, testfieldfixedint64_),
  534. ~0u, // no _has_bits_
  535. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleSFixedInt32Message, _internal_metadata_),
  536. ~0u, // no _extensions_
  537. ~0u, // no _oneof_case_
  538. ~0u, // no _weak_field_map_
  539. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleSFixedInt32Message, testfieldfixedint32_),
  540. ~0u, // no _has_bits_
  541. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleSFixedInt64Message, _internal_metadata_),
  542. ~0u, // no _extensions_
  543. ~0u, // no _oneof_case_
  544. ~0u, // no _weak_field_map_
  545. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::SimpleSFixedInt64Message, testfieldfixedint64_),
  546. ~0u, // no _has_bits_
  547. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::ComplexMessage, _internal_metadata_),
  548. ~0u, // no _extensions_
  549. ~0u, // no _oneof_case_
  550. ~0u, // no _weak_field_map_
  551. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::ComplexMessage, testfieldint_),
  552. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::ComplexMessage, testcomplexfield_),
  553. ~0u, // no _has_bits_
  554. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::RepeatedIntMessage, _internal_metadata_),
  555. ~0u, // no _extensions_
  556. ~0u, // no _oneof_case_
  557. ~0u, // no _weak_field_map_
  558. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::RepeatedIntMessage, testrepeatedint_),
  559. ~0u, // no _has_bits_
  560. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::RepeatedStringMessage, _internal_metadata_),
  561. ~0u, // no _extensions_
  562. ~0u, // no _oneof_case_
  563. ~0u, // no _weak_field_map_
  564. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::RepeatedStringMessage, testrepeatedstring_),
  565. ~0u, // no _has_bits_
  566. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::RepeatedDoubleMessage, _internal_metadata_),
  567. ~0u, // no _extensions_
  568. ~0u, // no _oneof_case_
  569. ~0u, // no _weak_field_map_
  570. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::RepeatedDoubleMessage, testrepeateddouble_),
  571. ~0u, // no _has_bits_
  572. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::RepeatedBytesMessage, _internal_metadata_),
  573. ~0u, // no _extensions_
  574. ~0u, // no _oneof_case_
  575. ~0u, // no _weak_field_map_
  576. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::RepeatedBytesMessage, testrepeatedbytes_),
  577. ~0u, // no _has_bits_
  578. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::RepeatedFloatMessage, _internal_metadata_),
  579. ~0u, // no _extensions_
  580. ~0u, // no _oneof_case_
  581. ~0u, // no _weak_field_map_
  582. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::RepeatedFloatMessage, testrepeatedfloat_),
  583. ~0u, // no _has_bits_
  584. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::RepeatedComplexMessage, _internal_metadata_),
  585. ~0u, // no _extensions_
  586. ~0u, // no _oneof_case_
  587. ~0u, // no _weak_field_map_
  588. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobufnamespace::tests::RepeatedComplexMessage, testrepeatedcomplex_),
  589. };
  590. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  591. { 0, -1, sizeof(::qtprotobufnamespace::tests::SimpleEnumMessage)},
  592. { 7, -1, sizeof(::qtprotobufnamespace::tests::SimpleFileEnumMessage)},
  593. { 14, -1, sizeof(::qtprotobufnamespace::tests::SimpleBoolMessage)},
  594. { 20, -1, sizeof(::qtprotobufnamespace::tests::SimpleIntMessage)},
  595. { 26, -1, sizeof(::qtprotobufnamespace::tests::SimpleSIntMessage)},
  596. { 32, -1, sizeof(::qtprotobufnamespace::tests::SimpleUIntMessage)},
  597. { 38, -1, sizeof(::qtprotobufnamespace::tests::SimpleInt64Message)},
  598. { 44, -1, sizeof(::qtprotobufnamespace::tests::SimpleSInt64Message)},
  599. { 50, -1, sizeof(::qtprotobufnamespace::tests::SimpleUInt64Message)},
  600. { 56, -1, sizeof(::qtprotobufnamespace::tests::SimpleStringMessage)},
  601. { 62, -1, sizeof(::qtprotobufnamespace::tests::SimpleFloatMessage)},
  602. { 68, -1, sizeof(::qtprotobufnamespace::tests::SimpleDoubleMessage)},
  603. { 74, -1, sizeof(::qtprotobufnamespace::tests::SimpleBytesMessage)},
  604. { 80, -1, sizeof(::qtprotobufnamespace::tests::SimpleFixedInt32Message)},
  605. { 86, -1, sizeof(::qtprotobufnamespace::tests::SimpleFixedInt64Message)},
  606. { 92, -1, sizeof(::qtprotobufnamespace::tests::SimpleSFixedInt32Message)},
  607. { 98, -1, sizeof(::qtprotobufnamespace::tests::SimpleSFixedInt64Message)},
  608. { 104, -1, sizeof(::qtprotobufnamespace::tests::ComplexMessage)},
  609. { 111, -1, sizeof(::qtprotobufnamespace::tests::RepeatedIntMessage)},
  610. { 117, -1, sizeof(::qtprotobufnamespace::tests::RepeatedStringMessage)},
  611. { 123, -1, sizeof(::qtprotobufnamespace::tests::RepeatedDoubleMessage)},
  612. { 129, -1, sizeof(::qtprotobufnamespace::tests::RepeatedBytesMessage)},
  613. { 135, -1, sizeof(::qtprotobufnamespace::tests::RepeatedFloatMessage)},
  614. { 141, -1, sizeof(::qtprotobufnamespace::tests::RepeatedComplexMessage)},
  615. };
  616. static ::google::protobuf::Message const * const file_default_instances[] = {
  617. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleEnumMessage_default_instance_),
  618. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleFileEnumMessage_default_instance_),
  619. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleBoolMessage_default_instance_),
  620. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleIntMessage_default_instance_),
  621. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleSIntMessage_default_instance_),
  622. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleUIntMessage_default_instance_),
  623. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleInt64Message_default_instance_),
  624. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleSInt64Message_default_instance_),
  625. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleUInt64Message_default_instance_),
  626. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleStringMessage_default_instance_),
  627. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleFloatMessage_default_instance_),
  628. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleDoubleMessage_default_instance_),
  629. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleBytesMessage_default_instance_),
  630. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleFixedInt32Message_default_instance_),
  631. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleFixedInt64Message_default_instance_),
  632. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleSFixedInt32Message_default_instance_),
  633. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_SimpleSFixedInt64Message_default_instance_),
  634. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_ComplexMessage_default_instance_),
  635. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_RepeatedIntMessage_default_instance_),
  636. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_RepeatedStringMessage_default_instance_),
  637. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_RepeatedDoubleMessage_default_instance_),
  638. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_RepeatedBytesMessage_default_instance_),
  639. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_RepeatedFloatMessage_default_instance_),
  640. reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobufnamespace::tests::_RepeatedComplexMessage_default_instance_),
  641. };
  642. void protobuf_AssignDescriptors() {
  643. AddDescriptors();
  644. AssignDescriptors(
  645. "simpletest.proto", schemas, file_default_instances, TableStruct::offsets,
  646. file_level_metadata, file_level_enum_descriptors, NULL);
  647. }
  648. void protobuf_AssignDescriptorsOnce() {
  649. static ::google::protobuf::internal::once_flag once;
  650. ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
  651. }
  652. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  653. void protobuf_RegisterTypes(const ::std::string&) {
  654. protobuf_AssignDescriptorsOnce();
  655. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 24);
  656. }
  657. void AddDescriptorsImpl() {
  658. InitDefaults();
  659. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  660. "\n\020simpletest.proto\022\031qtprotobufnamespace."
  661. "tests\"\226\002\n\021SimpleEnumMessage\022I\n\tlocalEnum"
  662. "\030\001 \001(\01626.qtprotobufnamespace.tests.Simpl"
  663. "eEnumMessage.LocalEnum\022M\n\rlocalEnumList\030"
  664. "\002 \003(\01626.qtprotobufnamespace.tests.Simple"
  665. "EnumMessage.LocalEnum\"g\n\tLocalEnum\022\025\n\021LO"
  666. "CAL_ENUM_VALUE0\020\000\022\025\n\021LOCAL_ENUM_VALUE1\020\001"
  667. "\022\025\n\021LOCAL_ENUM_VALUE2\020\002\022\025\n\021LOCAL_ENUM_VA"
  668. "LUE3\020\003\"\215\001\n\025SimpleFileEnumMessage\0227\n\nglob"
  669. "alEnum\030\001 \001(\0162#.qtprotobufnamespace.tests"
  670. ".TestEnum\022;\n\016globalEnumList\030\002 \003(\0162#.qtpr"
  671. "otobufnamespace.tests.TestEnum\"*\n\021Simple"
  672. "BoolMessage\022\025\n\rtestFieldBool\030\001 \001(\010\"(\n\020Si"
  673. "mpleIntMessage\022\024\n\014testFieldInt\030\001 \001(\005\")\n\021"
  674. "SimpleSIntMessage\022\024\n\014testFieldInt\030\001 \001(\021\""
  675. ")\n\021SimpleUIntMessage\022\024\n\014testFieldInt\030\001 \001"
  676. "(\r\"*\n\022SimpleInt64Message\022\024\n\014testFieldInt"
  677. "\030\001 \001(\003\"+\n\023SimpleSInt64Message\022\024\n\014testFie"
  678. "ldInt\030\001 \001(\022\"+\n\023SimpleUInt64Message\022\024\n\014te"
  679. "stFieldInt\030\001 \001(\004\".\n\023SimpleStringMessage\022"
  680. "\027\n\017testFieldString\030\006 \001(\t\",\n\022SimpleFloatM"
  681. "essage\022\026\n\016testFieldFloat\030\007 \001(\002\".\n\023Simple"
  682. "DoubleMessage\022\027\n\017testFieldDouble\030\010 \001(\001\","
  683. "\n\022SimpleBytesMessage\022\026\n\016testFieldBytes\030\001"
  684. " \001(\014\"6\n\027SimpleFixedInt32Message\022\033\n\023testF"
  685. "ieldFixedInt32\030\001 \001(\007\"6\n\027SimpleFixedInt64"
  686. "Message\022\033\n\023testFieldFixedInt64\030\001 \001(\006\"7\n\030"
  687. "SimpleSFixedInt32Message\022\033\n\023testFieldFix"
  688. "edInt32\030\001 \001(\017\"7\n\030SimpleSFixedInt64Messag"
  689. "e\022\033\n\023testFieldFixedInt64\030\001 \001(\020\"p\n\016Comple"
  690. "xMessage\022\024\n\014testFieldInt\030\001 \001(\005\022H\n\020testCo"
  691. "mplexField\030\002 \001(\0132..qtprotobufnamespace.t"
  692. "ests.SimpleStringMessage\"-\n\022RepeatedIntM"
  693. "essage\022\027\n\017testRepeatedInt\030\001 \003(\021\"3\n\025Repea"
  694. "tedStringMessage\022\032\n\022testRepeatedString\030\001"
  695. " \003(\t\"3\n\025RepeatedDoubleMessage\022\032\n\022testRep"
  696. "eatedDouble\030\001 \003(\001\"1\n\024RepeatedBytesMessag"
  697. "e\022\031\n\021testRepeatedBytes\030\001 \003(\014\"1\n\024Repeated"
  698. "FloatMessage\022\031\n\021testRepeatedFloat\030\001 \003(\002\""
  699. "`\n\026RepeatedComplexMessage\022F\n\023testRepeate"
  700. "dComplex\030\001 \003(\0132).qtprotobufnamespace.tes"
  701. "ts.ComplexMessage*x\n\010TestEnum\022\024\n\020TEST_EN"
  702. "UM_VALUE0\020\000\022\024\n\020TEST_ENUM_VALUE1\020\001\022\024\n\020TES"
  703. "T_ENUM_VALUE2\020\002\022\024\n\020TEST_ENUM_VALUE3\020\004\022\024\n"
  704. "\020TEST_ENUM_VALUE4\020\003b\006proto3"
  705. };
  706. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  707. descriptor, 1787);
  708. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  709. "simpletest.proto", &protobuf_RegisterTypes);
  710. }
  711. void AddDescriptors() {
  712. static ::google::protobuf::internal::once_flag once;
  713. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  714. }
  715. // Force AddDescriptors() to be called at dynamic initialization time.
  716. struct StaticDescriptorInitializer {
  717. StaticDescriptorInitializer() {
  718. AddDescriptors();
  719. }
  720. } static_descriptor_initializer;
  721. } // namespace protobuf_simpletest_2eproto
  722. namespace qtprotobufnamespace {
  723. namespace tests {
  724. const ::google::protobuf::EnumDescriptor* SimpleEnumMessage_LocalEnum_descriptor() {
  725. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  726. return protobuf_simpletest_2eproto::file_level_enum_descriptors[0];
  727. }
  728. bool SimpleEnumMessage_LocalEnum_IsValid(int value) {
  729. switch (value) {
  730. case 0:
  731. case 1:
  732. case 2:
  733. case 3:
  734. return true;
  735. default:
  736. return false;
  737. }
  738. }
  739. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  740. const SimpleEnumMessage_LocalEnum SimpleEnumMessage::LOCAL_ENUM_VALUE0;
  741. const SimpleEnumMessage_LocalEnum SimpleEnumMessage::LOCAL_ENUM_VALUE1;
  742. const SimpleEnumMessage_LocalEnum SimpleEnumMessage::LOCAL_ENUM_VALUE2;
  743. const SimpleEnumMessage_LocalEnum SimpleEnumMessage::LOCAL_ENUM_VALUE3;
  744. const SimpleEnumMessage_LocalEnum SimpleEnumMessage::LocalEnum_MIN;
  745. const SimpleEnumMessage_LocalEnum SimpleEnumMessage::LocalEnum_MAX;
  746. const int SimpleEnumMessage::LocalEnum_ARRAYSIZE;
  747. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  748. const ::google::protobuf::EnumDescriptor* TestEnum_descriptor() {
  749. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  750. return protobuf_simpletest_2eproto::file_level_enum_descriptors[1];
  751. }
  752. bool TestEnum_IsValid(int value) {
  753. switch (value) {
  754. case 0:
  755. case 1:
  756. case 2:
  757. case 3:
  758. case 4:
  759. return true;
  760. default:
  761. return false;
  762. }
  763. }
  764. // ===================================================================
  765. void SimpleEnumMessage::InitAsDefaultInstance() {
  766. }
  767. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  768. const int SimpleEnumMessage::kLocalEnumFieldNumber;
  769. const int SimpleEnumMessage::kLocalEnumListFieldNumber;
  770. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  771. SimpleEnumMessage::SimpleEnumMessage()
  772. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  773. ::google::protobuf::internal::InitSCC(
  774. &protobuf_simpletest_2eproto::scc_info_SimpleEnumMessage.base);
  775. SharedCtor();
  776. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleEnumMessage)
  777. }
  778. SimpleEnumMessage::SimpleEnumMessage(const SimpleEnumMessage& from)
  779. : ::google::protobuf::Message(),
  780. _internal_metadata_(NULL),
  781. localenumlist_(from.localenumlist_) {
  782. _internal_metadata_.MergeFrom(from._internal_metadata_);
  783. localenum_ = from.localenum_;
  784. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleEnumMessage)
  785. }
  786. void SimpleEnumMessage::SharedCtor() {
  787. localenum_ = 0;
  788. }
  789. SimpleEnumMessage::~SimpleEnumMessage() {
  790. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleEnumMessage)
  791. SharedDtor();
  792. }
  793. void SimpleEnumMessage::SharedDtor() {
  794. }
  795. void SimpleEnumMessage::SetCachedSize(int size) const {
  796. _cached_size_.Set(size);
  797. }
  798. const ::google::protobuf::Descriptor* SimpleEnumMessage::descriptor() {
  799. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  800. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  801. }
  802. const SimpleEnumMessage& SimpleEnumMessage::default_instance() {
  803. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleEnumMessage.base);
  804. return *internal_default_instance();
  805. }
  806. void SimpleEnumMessage::Clear() {
  807. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleEnumMessage)
  808. ::google::protobuf::uint32 cached_has_bits = 0;
  809. // Prevent compiler warnings about cached_has_bits being unused
  810. (void) cached_has_bits;
  811. localenumlist_.Clear();
  812. localenum_ = 0;
  813. _internal_metadata_.Clear();
  814. }
  815. bool SimpleEnumMessage::MergePartialFromCodedStream(
  816. ::google::protobuf::io::CodedInputStream* input) {
  817. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  818. ::google::protobuf::uint32 tag;
  819. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleEnumMessage)
  820. for (;;) {
  821. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  822. tag = p.first;
  823. if (!p.second) goto handle_unusual;
  824. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  825. // .qtprotobufnamespace.tests.SimpleEnumMessage.LocalEnum localEnum = 1;
  826. case 1: {
  827. if (static_cast< ::google::protobuf::uint8>(tag) ==
  828. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  829. int value;
  830. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  831. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  832. input, &value)));
  833. set_localenum(static_cast< ::qtprotobufnamespace::tests::SimpleEnumMessage_LocalEnum >(value));
  834. } else {
  835. goto handle_unusual;
  836. }
  837. break;
  838. }
  839. // repeated .qtprotobufnamespace.tests.SimpleEnumMessage.LocalEnum localEnumList = 2;
  840. case 2: {
  841. if (static_cast< ::google::protobuf::uint8>(tag) ==
  842. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  843. ::google::protobuf::uint32 length;
  844. DO_(input->ReadVarint32(&length));
  845. ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(static_cast<int>(length));
  846. while (input->BytesUntilLimit() > 0) {
  847. int value;
  848. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  849. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  850. input, &value)));
  851. add_localenumlist(static_cast< ::qtprotobufnamespace::tests::SimpleEnumMessage_LocalEnum >(value));
  852. }
  853. input->PopLimit(limit);
  854. } else if (
  855. static_cast< ::google::protobuf::uint8>(tag) ==
  856. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  857. int value;
  858. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  859. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  860. input, &value)));
  861. add_localenumlist(static_cast< ::qtprotobufnamespace::tests::SimpleEnumMessage_LocalEnum >(value));
  862. } else {
  863. goto handle_unusual;
  864. }
  865. break;
  866. }
  867. default: {
  868. handle_unusual:
  869. if (tag == 0) {
  870. goto success;
  871. }
  872. DO_(::google::protobuf::internal::WireFormat::SkipField(
  873. input, tag, _internal_metadata_.mutable_unknown_fields()));
  874. break;
  875. }
  876. }
  877. }
  878. success:
  879. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleEnumMessage)
  880. return true;
  881. failure:
  882. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleEnumMessage)
  883. return false;
  884. #undef DO_
  885. }
  886. void SimpleEnumMessage::SerializeWithCachedSizes(
  887. ::google::protobuf::io::CodedOutputStream* output) const {
  888. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleEnumMessage)
  889. ::google::protobuf::uint32 cached_has_bits = 0;
  890. (void) cached_has_bits;
  891. // .qtprotobufnamespace.tests.SimpleEnumMessage.LocalEnum localEnum = 1;
  892. if (this->localenum() != 0) {
  893. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  894. 1, this->localenum(), output);
  895. }
  896. // repeated .qtprotobufnamespace.tests.SimpleEnumMessage.LocalEnum localEnumList = 2;
  897. if (this->localenumlist_size() > 0) {
  898. ::google::protobuf::internal::WireFormatLite::WriteTag(
  899. 2,
  900. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  901. output);
  902. output->WriteVarint32(
  903. static_cast< ::google::protobuf::uint32>(_localenumlist_cached_byte_size_));
  904. }
  905. for (int i = 0, n = this->localenumlist_size(); i < n; i++) {
  906. ::google::protobuf::internal::WireFormatLite::WriteEnumNoTag(
  907. this->localenumlist(i), output);
  908. }
  909. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  910. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  911. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  912. }
  913. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleEnumMessage)
  914. }
  915. ::google::protobuf::uint8* SimpleEnumMessage::InternalSerializeWithCachedSizesToArray(
  916. bool deterministic, ::google::protobuf::uint8* target) const {
  917. (void)deterministic; // Unused
  918. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleEnumMessage)
  919. ::google::protobuf::uint32 cached_has_bits = 0;
  920. (void) cached_has_bits;
  921. // .qtprotobufnamespace.tests.SimpleEnumMessage.LocalEnum localEnum = 1;
  922. if (this->localenum() != 0) {
  923. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  924. 1, this->localenum(), target);
  925. }
  926. // repeated .qtprotobufnamespace.tests.SimpleEnumMessage.LocalEnum localEnumList = 2;
  927. if (this->localenumlist_size() > 0) {
  928. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  929. 2,
  930. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  931. target);
  932. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( static_cast< ::google::protobuf::uint32>(
  933. _localenumlist_cached_byte_size_), target);
  934. target = ::google::protobuf::internal::WireFormatLite::WriteEnumNoTagToArray(
  935. this->localenumlist_, target);
  936. }
  937. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  938. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  939. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  940. }
  941. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleEnumMessage)
  942. return target;
  943. }
  944. size_t SimpleEnumMessage::ByteSizeLong() const {
  945. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleEnumMessage)
  946. size_t total_size = 0;
  947. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  948. total_size +=
  949. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  950. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  951. }
  952. // repeated .qtprotobufnamespace.tests.SimpleEnumMessage.LocalEnum localEnumList = 2;
  953. {
  954. size_t data_size = 0;
  955. unsigned int count = static_cast<unsigned int>(this->localenumlist_size());for (unsigned int i = 0; i < count; i++) {
  956. data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
  957. this->localenumlist(static_cast<int>(i)));
  958. }
  959. if (data_size > 0) {
  960. total_size += 1 +
  961. ::google::protobuf::internal::WireFormatLite::Int32Size(
  962. static_cast< ::google::protobuf::int32>(data_size));
  963. }
  964. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  965. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  966. _localenumlist_cached_byte_size_ = cached_size;
  967. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  968. total_size += data_size;
  969. }
  970. // .qtprotobufnamespace.tests.SimpleEnumMessage.LocalEnum localEnum = 1;
  971. if (this->localenum() != 0) {
  972. total_size += 1 +
  973. ::google::protobuf::internal::WireFormatLite::EnumSize(this->localenum());
  974. }
  975. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  976. SetCachedSize(cached_size);
  977. return total_size;
  978. }
  979. void SimpleEnumMessage::MergeFrom(const ::google::protobuf::Message& from) {
  980. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleEnumMessage)
  981. GOOGLE_DCHECK_NE(&from, this);
  982. const SimpleEnumMessage* source =
  983. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleEnumMessage>(
  984. &from);
  985. if (source == NULL) {
  986. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleEnumMessage)
  987. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  988. } else {
  989. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleEnumMessage)
  990. MergeFrom(*source);
  991. }
  992. }
  993. void SimpleEnumMessage::MergeFrom(const SimpleEnumMessage& from) {
  994. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleEnumMessage)
  995. GOOGLE_DCHECK_NE(&from, this);
  996. _internal_metadata_.MergeFrom(from._internal_metadata_);
  997. ::google::protobuf::uint32 cached_has_bits = 0;
  998. (void) cached_has_bits;
  999. localenumlist_.MergeFrom(from.localenumlist_);
  1000. if (from.localenum() != 0) {
  1001. set_localenum(from.localenum());
  1002. }
  1003. }
  1004. void SimpleEnumMessage::CopyFrom(const ::google::protobuf::Message& from) {
  1005. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleEnumMessage)
  1006. if (&from == this) return;
  1007. Clear();
  1008. MergeFrom(from);
  1009. }
  1010. void SimpleEnumMessage::CopyFrom(const SimpleEnumMessage& from) {
  1011. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleEnumMessage)
  1012. if (&from == this) return;
  1013. Clear();
  1014. MergeFrom(from);
  1015. }
  1016. bool SimpleEnumMessage::IsInitialized() const {
  1017. return true;
  1018. }
  1019. void SimpleEnumMessage::Swap(SimpleEnumMessage* other) {
  1020. if (other == this) return;
  1021. InternalSwap(other);
  1022. }
  1023. void SimpleEnumMessage::InternalSwap(SimpleEnumMessage* other) {
  1024. using std::swap;
  1025. localenumlist_.InternalSwap(&other->localenumlist_);
  1026. swap(localenum_, other->localenum_);
  1027. _internal_metadata_.Swap(&other->_internal_metadata_);
  1028. }
  1029. ::google::protobuf::Metadata SimpleEnumMessage::GetMetadata() const {
  1030. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  1031. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  1032. }
  1033. // ===================================================================
  1034. void SimpleFileEnumMessage::InitAsDefaultInstance() {
  1035. }
  1036. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1037. const int SimpleFileEnumMessage::kGlobalEnumFieldNumber;
  1038. const int SimpleFileEnumMessage::kGlobalEnumListFieldNumber;
  1039. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1040. SimpleFileEnumMessage::SimpleFileEnumMessage()
  1041. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1042. ::google::protobuf::internal::InitSCC(
  1043. &protobuf_simpletest_2eproto::scc_info_SimpleFileEnumMessage.base);
  1044. SharedCtor();
  1045. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1046. }
  1047. SimpleFileEnumMessage::SimpleFileEnumMessage(const SimpleFileEnumMessage& from)
  1048. : ::google::protobuf::Message(),
  1049. _internal_metadata_(NULL),
  1050. globalenumlist_(from.globalenumlist_) {
  1051. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1052. globalenum_ = from.globalenum_;
  1053. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1054. }
  1055. void SimpleFileEnumMessage::SharedCtor() {
  1056. globalenum_ = 0;
  1057. }
  1058. SimpleFileEnumMessage::~SimpleFileEnumMessage() {
  1059. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1060. SharedDtor();
  1061. }
  1062. void SimpleFileEnumMessage::SharedDtor() {
  1063. }
  1064. void SimpleFileEnumMessage::SetCachedSize(int size) const {
  1065. _cached_size_.Set(size);
  1066. }
  1067. const ::google::protobuf::Descriptor* SimpleFileEnumMessage::descriptor() {
  1068. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  1069. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1070. }
  1071. const SimpleFileEnumMessage& SimpleFileEnumMessage::default_instance() {
  1072. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleFileEnumMessage.base);
  1073. return *internal_default_instance();
  1074. }
  1075. void SimpleFileEnumMessage::Clear() {
  1076. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1077. ::google::protobuf::uint32 cached_has_bits = 0;
  1078. // Prevent compiler warnings about cached_has_bits being unused
  1079. (void) cached_has_bits;
  1080. globalenumlist_.Clear();
  1081. globalenum_ = 0;
  1082. _internal_metadata_.Clear();
  1083. }
  1084. bool SimpleFileEnumMessage::MergePartialFromCodedStream(
  1085. ::google::protobuf::io::CodedInputStream* input) {
  1086. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1087. ::google::protobuf::uint32 tag;
  1088. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1089. for (;;) {
  1090. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1091. tag = p.first;
  1092. if (!p.second) goto handle_unusual;
  1093. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1094. // .qtprotobufnamespace.tests.TestEnum globalEnum = 1;
  1095. case 1: {
  1096. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1097. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1098. int value;
  1099. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1100. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1101. input, &value)));
  1102. set_globalenum(static_cast< ::qtprotobufnamespace::tests::TestEnum >(value));
  1103. } else {
  1104. goto handle_unusual;
  1105. }
  1106. break;
  1107. }
  1108. // repeated .qtprotobufnamespace.tests.TestEnum globalEnumList = 2;
  1109. case 2: {
  1110. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1111. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1112. ::google::protobuf::uint32 length;
  1113. DO_(input->ReadVarint32(&length));
  1114. ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(static_cast<int>(length));
  1115. while (input->BytesUntilLimit() > 0) {
  1116. int value;
  1117. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1118. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1119. input, &value)));
  1120. add_globalenumlist(static_cast< ::qtprotobufnamespace::tests::TestEnum >(value));
  1121. }
  1122. input->PopLimit(limit);
  1123. } else if (
  1124. static_cast< ::google::protobuf::uint8>(tag) ==
  1125. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  1126. int value;
  1127. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1128. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1129. input, &value)));
  1130. add_globalenumlist(static_cast< ::qtprotobufnamespace::tests::TestEnum >(value));
  1131. } else {
  1132. goto handle_unusual;
  1133. }
  1134. break;
  1135. }
  1136. default: {
  1137. handle_unusual:
  1138. if (tag == 0) {
  1139. goto success;
  1140. }
  1141. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1142. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1143. break;
  1144. }
  1145. }
  1146. }
  1147. success:
  1148. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1149. return true;
  1150. failure:
  1151. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1152. return false;
  1153. #undef DO_
  1154. }
  1155. void SimpleFileEnumMessage::SerializeWithCachedSizes(
  1156. ::google::protobuf::io::CodedOutputStream* output) const {
  1157. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1158. ::google::protobuf::uint32 cached_has_bits = 0;
  1159. (void) cached_has_bits;
  1160. // .qtprotobufnamespace.tests.TestEnum globalEnum = 1;
  1161. if (this->globalenum() != 0) {
  1162. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  1163. 1, this->globalenum(), output);
  1164. }
  1165. // repeated .qtprotobufnamespace.tests.TestEnum globalEnumList = 2;
  1166. if (this->globalenumlist_size() > 0) {
  1167. ::google::protobuf::internal::WireFormatLite::WriteTag(
  1168. 2,
  1169. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  1170. output);
  1171. output->WriteVarint32(
  1172. static_cast< ::google::protobuf::uint32>(_globalenumlist_cached_byte_size_));
  1173. }
  1174. for (int i = 0, n = this->globalenumlist_size(); i < n; i++) {
  1175. ::google::protobuf::internal::WireFormatLite::WriteEnumNoTag(
  1176. this->globalenumlist(i), output);
  1177. }
  1178. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1179. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1180. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1181. }
  1182. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1183. }
  1184. ::google::protobuf::uint8* SimpleFileEnumMessage::InternalSerializeWithCachedSizesToArray(
  1185. bool deterministic, ::google::protobuf::uint8* target) const {
  1186. (void)deterministic; // Unused
  1187. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1188. ::google::protobuf::uint32 cached_has_bits = 0;
  1189. (void) cached_has_bits;
  1190. // .qtprotobufnamespace.tests.TestEnum globalEnum = 1;
  1191. if (this->globalenum() != 0) {
  1192. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  1193. 1, this->globalenum(), target);
  1194. }
  1195. // repeated .qtprotobufnamespace.tests.TestEnum globalEnumList = 2;
  1196. if (this->globalenumlist_size() > 0) {
  1197. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  1198. 2,
  1199. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  1200. target);
  1201. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( static_cast< ::google::protobuf::uint32>(
  1202. _globalenumlist_cached_byte_size_), target);
  1203. target = ::google::protobuf::internal::WireFormatLite::WriteEnumNoTagToArray(
  1204. this->globalenumlist_, target);
  1205. }
  1206. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1207. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1208. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1209. }
  1210. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1211. return target;
  1212. }
  1213. size_t SimpleFileEnumMessage::ByteSizeLong() const {
  1214. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1215. size_t total_size = 0;
  1216. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1217. total_size +=
  1218. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1219. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1220. }
  1221. // repeated .qtprotobufnamespace.tests.TestEnum globalEnumList = 2;
  1222. {
  1223. size_t data_size = 0;
  1224. unsigned int count = static_cast<unsigned int>(this->globalenumlist_size());for (unsigned int i = 0; i < count; i++) {
  1225. data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
  1226. this->globalenumlist(static_cast<int>(i)));
  1227. }
  1228. if (data_size > 0) {
  1229. total_size += 1 +
  1230. ::google::protobuf::internal::WireFormatLite::Int32Size(
  1231. static_cast< ::google::protobuf::int32>(data_size));
  1232. }
  1233. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  1234. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1235. _globalenumlist_cached_byte_size_ = cached_size;
  1236. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1237. total_size += data_size;
  1238. }
  1239. // .qtprotobufnamespace.tests.TestEnum globalEnum = 1;
  1240. if (this->globalenum() != 0) {
  1241. total_size += 1 +
  1242. ::google::protobuf::internal::WireFormatLite::EnumSize(this->globalenum());
  1243. }
  1244. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1245. SetCachedSize(cached_size);
  1246. return total_size;
  1247. }
  1248. void SimpleFileEnumMessage::MergeFrom(const ::google::protobuf::Message& from) {
  1249. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1250. GOOGLE_DCHECK_NE(&from, this);
  1251. const SimpleFileEnumMessage* source =
  1252. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleFileEnumMessage>(
  1253. &from);
  1254. if (source == NULL) {
  1255. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1256. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1257. } else {
  1258. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1259. MergeFrom(*source);
  1260. }
  1261. }
  1262. void SimpleFileEnumMessage::MergeFrom(const SimpleFileEnumMessage& from) {
  1263. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1264. GOOGLE_DCHECK_NE(&from, this);
  1265. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1266. ::google::protobuf::uint32 cached_has_bits = 0;
  1267. (void) cached_has_bits;
  1268. globalenumlist_.MergeFrom(from.globalenumlist_);
  1269. if (from.globalenum() != 0) {
  1270. set_globalenum(from.globalenum());
  1271. }
  1272. }
  1273. void SimpleFileEnumMessage::CopyFrom(const ::google::protobuf::Message& from) {
  1274. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1275. if (&from == this) return;
  1276. Clear();
  1277. MergeFrom(from);
  1278. }
  1279. void SimpleFileEnumMessage::CopyFrom(const SimpleFileEnumMessage& from) {
  1280. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleFileEnumMessage)
  1281. if (&from == this) return;
  1282. Clear();
  1283. MergeFrom(from);
  1284. }
  1285. bool SimpleFileEnumMessage::IsInitialized() const {
  1286. return true;
  1287. }
  1288. void SimpleFileEnumMessage::Swap(SimpleFileEnumMessage* other) {
  1289. if (other == this) return;
  1290. InternalSwap(other);
  1291. }
  1292. void SimpleFileEnumMessage::InternalSwap(SimpleFileEnumMessage* other) {
  1293. using std::swap;
  1294. globalenumlist_.InternalSwap(&other->globalenumlist_);
  1295. swap(globalenum_, other->globalenum_);
  1296. _internal_metadata_.Swap(&other->_internal_metadata_);
  1297. }
  1298. ::google::protobuf::Metadata SimpleFileEnumMessage::GetMetadata() const {
  1299. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  1300. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  1301. }
  1302. // ===================================================================
  1303. void SimpleBoolMessage::InitAsDefaultInstance() {
  1304. }
  1305. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1306. const int SimpleBoolMessage::kTestFieldBoolFieldNumber;
  1307. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1308. SimpleBoolMessage::SimpleBoolMessage()
  1309. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1310. ::google::protobuf::internal::InitSCC(
  1311. &protobuf_simpletest_2eproto::scc_info_SimpleBoolMessage.base);
  1312. SharedCtor();
  1313. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleBoolMessage)
  1314. }
  1315. SimpleBoolMessage::SimpleBoolMessage(const SimpleBoolMessage& from)
  1316. : ::google::protobuf::Message(),
  1317. _internal_metadata_(NULL) {
  1318. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1319. testfieldbool_ = from.testfieldbool_;
  1320. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleBoolMessage)
  1321. }
  1322. void SimpleBoolMessage::SharedCtor() {
  1323. testfieldbool_ = false;
  1324. }
  1325. SimpleBoolMessage::~SimpleBoolMessage() {
  1326. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleBoolMessage)
  1327. SharedDtor();
  1328. }
  1329. void SimpleBoolMessage::SharedDtor() {
  1330. }
  1331. void SimpleBoolMessage::SetCachedSize(int size) const {
  1332. _cached_size_.Set(size);
  1333. }
  1334. const ::google::protobuf::Descriptor* SimpleBoolMessage::descriptor() {
  1335. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  1336. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1337. }
  1338. const SimpleBoolMessage& SimpleBoolMessage::default_instance() {
  1339. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleBoolMessage.base);
  1340. return *internal_default_instance();
  1341. }
  1342. void SimpleBoolMessage::Clear() {
  1343. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleBoolMessage)
  1344. ::google::protobuf::uint32 cached_has_bits = 0;
  1345. // Prevent compiler warnings about cached_has_bits being unused
  1346. (void) cached_has_bits;
  1347. testfieldbool_ = false;
  1348. _internal_metadata_.Clear();
  1349. }
  1350. bool SimpleBoolMessage::MergePartialFromCodedStream(
  1351. ::google::protobuf::io::CodedInputStream* input) {
  1352. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1353. ::google::protobuf::uint32 tag;
  1354. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleBoolMessage)
  1355. for (;;) {
  1356. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1357. tag = p.first;
  1358. if (!p.second) goto handle_unusual;
  1359. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1360. // bool testFieldBool = 1;
  1361. case 1: {
  1362. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1363. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1364. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1365. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  1366. input, &testfieldbool_)));
  1367. } else {
  1368. goto handle_unusual;
  1369. }
  1370. break;
  1371. }
  1372. default: {
  1373. handle_unusual:
  1374. if (tag == 0) {
  1375. goto success;
  1376. }
  1377. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1378. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1379. break;
  1380. }
  1381. }
  1382. }
  1383. success:
  1384. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleBoolMessage)
  1385. return true;
  1386. failure:
  1387. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleBoolMessage)
  1388. return false;
  1389. #undef DO_
  1390. }
  1391. void SimpleBoolMessage::SerializeWithCachedSizes(
  1392. ::google::protobuf::io::CodedOutputStream* output) const {
  1393. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleBoolMessage)
  1394. ::google::protobuf::uint32 cached_has_bits = 0;
  1395. (void) cached_has_bits;
  1396. // bool testFieldBool = 1;
  1397. if (this->testfieldbool() != 0) {
  1398. ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->testfieldbool(), output);
  1399. }
  1400. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1401. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1402. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1403. }
  1404. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleBoolMessage)
  1405. }
  1406. ::google::protobuf::uint8* SimpleBoolMessage::InternalSerializeWithCachedSizesToArray(
  1407. bool deterministic, ::google::protobuf::uint8* target) const {
  1408. (void)deterministic; // Unused
  1409. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleBoolMessage)
  1410. ::google::protobuf::uint32 cached_has_bits = 0;
  1411. (void) cached_has_bits;
  1412. // bool testFieldBool = 1;
  1413. if (this->testfieldbool() != 0) {
  1414. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->testfieldbool(), target);
  1415. }
  1416. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1417. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1418. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1419. }
  1420. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleBoolMessage)
  1421. return target;
  1422. }
  1423. size_t SimpleBoolMessage::ByteSizeLong() const {
  1424. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleBoolMessage)
  1425. size_t total_size = 0;
  1426. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1427. total_size +=
  1428. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1429. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1430. }
  1431. // bool testFieldBool = 1;
  1432. if (this->testfieldbool() != 0) {
  1433. total_size += 1 + 1;
  1434. }
  1435. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1436. SetCachedSize(cached_size);
  1437. return total_size;
  1438. }
  1439. void SimpleBoolMessage::MergeFrom(const ::google::protobuf::Message& from) {
  1440. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleBoolMessage)
  1441. GOOGLE_DCHECK_NE(&from, this);
  1442. const SimpleBoolMessage* source =
  1443. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleBoolMessage>(
  1444. &from);
  1445. if (source == NULL) {
  1446. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleBoolMessage)
  1447. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1448. } else {
  1449. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleBoolMessage)
  1450. MergeFrom(*source);
  1451. }
  1452. }
  1453. void SimpleBoolMessage::MergeFrom(const SimpleBoolMessage& from) {
  1454. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleBoolMessage)
  1455. GOOGLE_DCHECK_NE(&from, this);
  1456. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1457. ::google::protobuf::uint32 cached_has_bits = 0;
  1458. (void) cached_has_bits;
  1459. if (from.testfieldbool() != 0) {
  1460. set_testfieldbool(from.testfieldbool());
  1461. }
  1462. }
  1463. void SimpleBoolMessage::CopyFrom(const ::google::protobuf::Message& from) {
  1464. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleBoolMessage)
  1465. if (&from == this) return;
  1466. Clear();
  1467. MergeFrom(from);
  1468. }
  1469. void SimpleBoolMessage::CopyFrom(const SimpleBoolMessage& from) {
  1470. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleBoolMessage)
  1471. if (&from == this) return;
  1472. Clear();
  1473. MergeFrom(from);
  1474. }
  1475. bool SimpleBoolMessage::IsInitialized() const {
  1476. return true;
  1477. }
  1478. void SimpleBoolMessage::Swap(SimpleBoolMessage* other) {
  1479. if (other == this) return;
  1480. InternalSwap(other);
  1481. }
  1482. void SimpleBoolMessage::InternalSwap(SimpleBoolMessage* other) {
  1483. using std::swap;
  1484. swap(testfieldbool_, other->testfieldbool_);
  1485. _internal_metadata_.Swap(&other->_internal_metadata_);
  1486. }
  1487. ::google::protobuf::Metadata SimpleBoolMessage::GetMetadata() const {
  1488. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  1489. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  1490. }
  1491. // ===================================================================
  1492. void SimpleIntMessage::InitAsDefaultInstance() {
  1493. }
  1494. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1495. const int SimpleIntMessage::kTestFieldIntFieldNumber;
  1496. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1497. SimpleIntMessage::SimpleIntMessage()
  1498. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1499. ::google::protobuf::internal::InitSCC(
  1500. &protobuf_simpletest_2eproto::scc_info_SimpleIntMessage.base);
  1501. SharedCtor();
  1502. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleIntMessage)
  1503. }
  1504. SimpleIntMessage::SimpleIntMessage(const SimpleIntMessage& from)
  1505. : ::google::protobuf::Message(),
  1506. _internal_metadata_(NULL) {
  1507. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1508. testfieldint_ = from.testfieldint_;
  1509. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleIntMessage)
  1510. }
  1511. void SimpleIntMessage::SharedCtor() {
  1512. testfieldint_ = 0;
  1513. }
  1514. SimpleIntMessage::~SimpleIntMessage() {
  1515. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleIntMessage)
  1516. SharedDtor();
  1517. }
  1518. void SimpleIntMessage::SharedDtor() {
  1519. }
  1520. void SimpleIntMessage::SetCachedSize(int size) const {
  1521. _cached_size_.Set(size);
  1522. }
  1523. const ::google::protobuf::Descriptor* SimpleIntMessage::descriptor() {
  1524. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  1525. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1526. }
  1527. const SimpleIntMessage& SimpleIntMessage::default_instance() {
  1528. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleIntMessage.base);
  1529. return *internal_default_instance();
  1530. }
  1531. void SimpleIntMessage::Clear() {
  1532. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleIntMessage)
  1533. ::google::protobuf::uint32 cached_has_bits = 0;
  1534. // Prevent compiler warnings about cached_has_bits being unused
  1535. (void) cached_has_bits;
  1536. testfieldint_ = 0;
  1537. _internal_metadata_.Clear();
  1538. }
  1539. bool SimpleIntMessage::MergePartialFromCodedStream(
  1540. ::google::protobuf::io::CodedInputStream* input) {
  1541. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1542. ::google::protobuf::uint32 tag;
  1543. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleIntMessage)
  1544. for (;;) {
  1545. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1546. tag = p.first;
  1547. if (!p.second) goto handle_unusual;
  1548. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1549. // int32 testFieldInt = 1;
  1550. case 1: {
  1551. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1552. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1553. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1554. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  1555. input, &testfieldint_)));
  1556. } else {
  1557. goto handle_unusual;
  1558. }
  1559. break;
  1560. }
  1561. default: {
  1562. handle_unusual:
  1563. if (tag == 0) {
  1564. goto success;
  1565. }
  1566. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1567. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1568. break;
  1569. }
  1570. }
  1571. }
  1572. success:
  1573. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleIntMessage)
  1574. return true;
  1575. failure:
  1576. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleIntMessage)
  1577. return false;
  1578. #undef DO_
  1579. }
  1580. void SimpleIntMessage::SerializeWithCachedSizes(
  1581. ::google::protobuf::io::CodedOutputStream* output) const {
  1582. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleIntMessage)
  1583. ::google::protobuf::uint32 cached_has_bits = 0;
  1584. (void) cached_has_bits;
  1585. // int32 testFieldInt = 1;
  1586. if (this->testfieldint() != 0) {
  1587. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->testfieldint(), output);
  1588. }
  1589. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1590. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1591. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1592. }
  1593. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleIntMessage)
  1594. }
  1595. ::google::protobuf::uint8* SimpleIntMessage::InternalSerializeWithCachedSizesToArray(
  1596. bool deterministic, ::google::protobuf::uint8* target) const {
  1597. (void)deterministic; // Unused
  1598. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleIntMessage)
  1599. ::google::protobuf::uint32 cached_has_bits = 0;
  1600. (void) cached_has_bits;
  1601. // int32 testFieldInt = 1;
  1602. if (this->testfieldint() != 0) {
  1603. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->testfieldint(), target);
  1604. }
  1605. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1606. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1607. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1608. }
  1609. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleIntMessage)
  1610. return target;
  1611. }
  1612. size_t SimpleIntMessage::ByteSizeLong() const {
  1613. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleIntMessage)
  1614. size_t total_size = 0;
  1615. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1616. total_size +=
  1617. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1618. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1619. }
  1620. // int32 testFieldInt = 1;
  1621. if (this->testfieldint() != 0) {
  1622. total_size += 1 +
  1623. ::google::protobuf::internal::WireFormatLite::Int32Size(
  1624. this->testfieldint());
  1625. }
  1626. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1627. SetCachedSize(cached_size);
  1628. return total_size;
  1629. }
  1630. void SimpleIntMessage::MergeFrom(const ::google::protobuf::Message& from) {
  1631. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleIntMessage)
  1632. GOOGLE_DCHECK_NE(&from, this);
  1633. const SimpleIntMessage* source =
  1634. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleIntMessage>(
  1635. &from);
  1636. if (source == NULL) {
  1637. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleIntMessage)
  1638. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1639. } else {
  1640. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleIntMessage)
  1641. MergeFrom(*source);
  1642. }
  1643. }
  1644. void SimpleIntMessage::MergeFrom(const SimpleIntMessage& from) {
  1645. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleIntMessage)
  1646. GOOGLE_DCHECK_NE(&from, this);
  1647. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1648. ::google::protobuf::uint32 cached_has_bits = 0;
  1649. (void) cached_has_bits;
  1650. if (from.testfieldint() != 0) {
  1651. set_testfieldint(from.testfieldint());
  1652. }
  1653. }
  1654. void SimpleIntMessage::CopyFrom(const ::google::protobuf::Message& from) {
  1655. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleIntMessage)
  1656. if (&from == this) return;
  1657. Clear();
  1658. MergeFrom(from);
  1659. }
  1660. void SimpleIntMessage::CopyFrom(const SimpleIntMessage& from) {
  1661. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleIntMessage)
  1662. if (&from == this) return;
  1663. Clear();
  1664. MergeFrom(from);
  1665. }
  1666. bool SimpleIntMessage::IsInitialized() const {
  1667. return true;
  1668. }
  1669. void SimpleIntMessage::Swap(SimpleIntMessage* other) {
  1670. if (other == this) return;
  1671. InternalSwap(other);
  1672. }
  1673. void SimpleIntMessage::InternalSwap(SimpleIntMessage* other) {
  1674. using std::swap;
  1675. swap(testfieldint_, other->testfieldint_);
  1676. _internal_metadata_.Swap(&other->_internal_metadata_);
  1677. }
  1678. ::google::protobuf::Metadata SimpleIntMessage::GetMetadata() const {
  1679. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  1680. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  1681. }
  1682. // ===================================================================
  1683. void SimpleSIntMessage::InitAsDefaultInstance() {
  1684. }
  1685. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1686. const int SimpleSIntMessage::kTestFieldIntFieldNumber;
  1687. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1688. SimpleSIntMessage::SimpleSIntMessage()
  1689. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1690. ::google::protobuf::internal::InitSCC(
  1691. &protobuf_simpletest_2eproto::scc_info_SimpleSIntMessage.base);
  1692. SharedCtor();
  1693. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleSIntMessage)
  1694. }
  1695. SimpleSIntMessage::SimpleSIntMessage(const SimpleSIntMessage& from)
  1696. : ::google::protobuf::Message(),
  1697. _internal_metadata_(NULL) {
  1698. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1699. testfieldint_ = from.testfieldint_;
  1700. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleSIntMessage)
  1701. }
  1702. void SimpleSIntMessage::SharedCtor() {
  1703. testfieldint_ = 0;
  1704. }
  1705. SimpleSIntMessage::~SimpleSIntMessage() {
  1706. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleSIntMessage)
  1707. SharedDtor();
  1708. }
  1709. void SimpleSIntMessage::SharedDtor() {
  1710. }
  1711. void SimpleSIntMessage::SetCachedSize(int size) const {
  1712. _cached_size_.Set(size);
  1713. }
  1714. const ::google::protobuf::Descriptor* SimpleSIntMessage::descriptor() {
  1715. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  1716. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1717. }
  1718. const SimpleSIntMessage& SimpleSIntMessage::default_instance() {
  1719. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleSIntMessage.base);
  1720. return *internal_default_instance();
  1721. }
  1722. void SimpleSIntMessage::Clear() {
  1723. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleSIntMessage)
  1724. ::google::protobuf::uint32 cached_has_bits = 0;
  1725. // Prevent compiler warnings about cached_has_bits being unused
  1726. (void) cached_has_bits;
  1727. testfieldint_ = 0;
  1728. _internal_metadata_.Clear();
  1729. }
  1730. bool SimpleSIntMessage::MergePartialFromCodedStream(
  1731. ::google::protobuf::io::CodedInputStream* input) {
  1732. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1733. ::google::protobuf::uint32 tag;
  1734. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleSIntMessage)
  1735. for (;;) {
  1736. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1737. tag = p.first;
  1738. if (!p.second) goto handle_unusual;
  1739. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1740. // sint32 testFieldInt = 1;
  1741. case 1: {
  1742. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1743. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1744. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1745. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  1746. input, &testfieldint_)));
  1747. } else {
  1748. goto handle_unusual;
  1749. }
  1750. break;
  1751. }
  1752. default: {
  1753. handle_unusual:
  1754. if (tag == 0) {
  1755. goto success;
  1756. }
  1757. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1758. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1759. break;
  1760. }
  1761. }
  1762. }
  1763. success:
  1764. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleSIntMessage)
  1765. return true;
  1766. failure:
  1767. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleSIntMessage)
  1768. return false;
  1769. #undef DO_
  1770. }
  1771. void SimpleSIntMessage::SerializeWithCachedSizes(
  1772. ::google::protobuf::io::CodedOutputStream* output) const {
  1773. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleSIntMessage)
  1774. ::google::protobuf::uint32 cached_has_bits = 0;
  1775. (void) cached_has_bits;
  1776. // sint32 testFieldInt = 1;
  1777. if (this->testfieldint() != 0) {
  1778. ::google::protobuf::internal::WireFormatLite::WriteSInt32(1, this->testfieldint(), output);
  1779. }
  1780. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1781. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1782. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1783. }
  1784. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleSIntMessage)
  1785. }
  1786. ::google::protobuf::uint8* SimpleSIntMessage::InternalSerializeWithCachedSizesToArray(
  1787. bool deterministic, ::google::protobuf::uint8* target) const {
  1788. (void)deterministic; // Unused
  1789. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleSIntMessage)
  1790. ::google::protobuf::uint32 cached_has_bits = 0;
  1791. (void) cached_has_bits;
  1792. // sint32 testFieldInt = 1;
  1793. if (this->testfieldint() != 0) {
  1794. target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(1, this->testfieldint(), target);
  1795. }
  1796. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1797. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1798. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1799. }
  1800. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleSIntMessage)
  1801. return target;
  1802. }
  1803. size_t SimpleSIntMessage::ByteSizeLong() const {
  1804. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleSIntMessage)
  1805. size_t total_size = 0;
  1806. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1807. total_size +=
  1808. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1809. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1810. }
  1811. // sint32 testFieldInt = 1;
  1812. if (this->testfieldint() != 0) {
  1813. total_size += 1 +
  1814. ::google::protobuf::internal::WireFormatLite::SInt32Size(
  1815. this->testfieldint());
  1816. }
  1817. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1818. SetCachedSize(cached_size);
  1819. return total_size;
  1820. }
  1821. void SimpleSIntMessage::MergeFrom(const ::google::protobuf::Message& from) {
  1822. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleSIntMessage)
  1823. GOOGLE_DCHECK_NE(&from, this);
  1824. const SimpleSIntMessage* source =
  1825. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleSIntMessage>(
  1826. &from);
  1827. if (source == NULL) {
  1828. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleSIntMessage)
  1829. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1830. } else {
  1831. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleSIntMessage)
  1832. MergeFrom(*source);
  1833. }
  1834. }
  1835. void SimpleSIntMessage::MergeFrom(const SimpleSIntMessage& from) {
  1836. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleSIntMessage)
  1837. GOOGLE_DCHECK_NE(&from, this);
  1838. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1839. ::google::protobuf::uint32 cached_has_bits = 0;
  1840. (void) cached_has_bits;
  1841. if (from.testfieldint() != 0) {
  1842. set_testfieldint(from.testfieldint());
  1843. }
  1844. }
  1845. void SimpleSIntMessage::CopyFrom(const ::google::protobuf::Message& from) {
  1846. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleSIntMessage)
  1847. if (&from == this) return;
  1848. Clear();
  1849. MergeFrom(from);
  1850. }
  1851. void SimpleSIntMessage::CopyFrom(const SimpleSIntMessage& from) {
  1852. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleSIntMessage)
  1853. if (&from == this) return;
  1854. Clear();
  1855. MergeFrom(from);
  1856. }
  1857. bool SimpleSIntMessage::IsInitialized() const {
  1858. return true;
  1859. }
  1860. void SimpleSIntMessage::Swap(SimpleSIntMessage* other) {
  1861. if (other == this) return;
  1862. InternalSwap(other);
  1863. }
  1864. void SimpleSIntMessage::InternalSwap(SimpleSIntMessage* other) {
  1865. using std::swap;
  1866. swap(testfieldint_, other->testfieldint_);
  1867. _internal_metadata_.Swap(&other->_internal_metadata_);
  1868. }
  1869. ::google::protobuf::Metadata SimpleSIntMessage::GetMetadata() const {
  1870. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  1871. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  1872. }
  1873. // ===================================================================
  1874. void SimpleUIntMessage::InitAsDefaultInstance() {
  1875. }
  1876. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1877. const int SimpleUIntMessage::kTestFieldIntFieldNumber;
  1878. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1879. SimpleUIntMessage::SimpleUIntMessage()
  1880. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1881. ::google::protobuf::internal::InitSCC(
  1882. &protobuf_simpletest_2eproto::scc_info_SimpleUIntMessage.base);
  1883. SharedCtor();
  1884. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleUIntMessage)
  1885. }
  1886. SimpleUIntMessage::SimpleUIntMessage(const SimpleUIntMessage& from)
  1887. : ::google::protobuf::Message(),
  1888. _internal_metadata_(NULL) {
  1889. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1890. testfieldint_ = from.testfieldint_;
  1891. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleUIntMessage)
  1892. }
  1893. void SimpleUIntMessage::SharedCtor() {
  1894. testfieldint_ = 0u;
  1895. }
  1896. SimpleUIntMessage::~SimpleUIntMessage() {
  1897. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleUIntMessage)
  1898. SharedDtor();
  1899. }
  1900. void SimpleUIntMessage::SharedDtor() {
  1901. }
  1902. void SimpleUIntMessage::SetCachedSize(int size) const {
  1903. _cached_size_.Set(size);
  1904. }
  1905. const ::google::protobuf::Descriptor* SimpleUIntMessage::descriptor() {
  1906. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  1907. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1908. }
  1909. const SimpleUIntMessage& SimpleUIntMessage::default_instance() {
  1910. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleUIntMessage.base);
  1911. return *internal_default_instance();
  1912. }
  1913. void SimpleUIntMessage::Clear() {
  1914. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleUIntMessage)
  1915. ::google::protobuf::uint32 cached_has_bits = 0;
  1916. // Prevent compiler warnings about cached_has_bits being unused
  1917. (void) cached_has_bits;
  1918. testfieldint_ = 0u;
  1919. _internal_metadata_.Clear();
  1920. }
  1921. bool SimpleUIntMessage::MergePartialFromCodedStream(
  1922. ::google::protobuf::io::CodedInputStream* input) {
  1923. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1924. ::google::protobuf::uint32 tag;
  1925. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleUIntMessage)
  1926. for (;;) {
  1927. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1928. tag = p.first;
  1929. if (!p.second) goto handle_unusual;
  1930. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1931. // uint32 testFieldInt = 1;
  1932. case 1: {
  1933. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1934. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1935. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1936. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  1937. input, &testfieldint_)));
  1938. } else {
  1939. goto handle_unusual;
  1940. }
  1941. break;
  1942. }
  1943. default: {
  1944. handle_unusual:
  1945. if (tag == 0) {
  1946. goto success;
  1947. }
  1948. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1949. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1950. break;
  1951. }
  1952. }
  1953. }
  1954. success:
  1955. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleUIntMessage)
  1956. return true;
  1957. failure:
  1958. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleUIntMessage)
  1959. return false;
  1960. #undef DO_
  1961. }
  1962. void SimpleUIntMessage::SerializeWithCachedSizes(
  1963. ::google::protobuf::io::CodedOutputStream* output) const {
  1964. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleUIntMessage)
  1965. ::google::protobuf::uint32 cached_has_bits = 0;
  1966. (void) cached_has_bits;
  1967. // uint32 testFieldInt = 1;
  1968. if (this->testfieldint() != 0) {
  1969. ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->testfieldint(), output);
  1970. }
  1971. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1972. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1973. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1974. }
  1975. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleUIntMessage)
  1976. }
  1977. ::google::protobuf::uint8* SimpleUIntMessage::InternalSerializeWithCachedSizesToArray(
  1978. bool deterministic, ::google::protobuf::uint8* target) const {
  1979. (void)deterministic; // Unused
  1980. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleUIntMessage)
  1981. ::google::protobuf::uint32 cached_has_bits = 0;
  1982. (void) cached_has_bits;
  1983. // uint32 testFieldInt = 1;
  1984. if (this->testfieldint() != 0) {
  1985. target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->testfieldint(), target);
  1986. }
  1987. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1988. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1989. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1990. }
  1991. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleUIntMessage)
  1992. return target;
  1993. }
  1994. size_t SimpleUIntMessage::ByteSizeLong() const {
  1995. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleUIntMessage)
  1996. size_t total_size = 0;
  1997. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1998. total_size +=
  1999. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2000. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2001. }
  2002. // uint32 testFieldInt = 1;
  2003. if (this->testfieldint() != 0) {
  2004. total_size += 1 +
  2005. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  2006. this->testfieldint());
  2007. }
  2008. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2009. SetCachedSize(cached_size);
  2010. return total_size;
  2011. }
  2012. void SimpleUIntMessage::MergeFrom(const ::google::protobuf::Message& from) {
  2013. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleUIntMessage)
  2014. GOOGLE_DCHECK_NE(&from, this);
  2015. const SimpleUIntMessage* source =
  2016. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleUIntMessage>(
  2017. &from);
  2018. if (source == NULL) {
  2019. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleUIntMessage)
  2020. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2021. } else {
  2022. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleUIntMessage)
  2023. MergeFrom(*source);
  2024. }
  2025. }
  2026. void SimpleUIntMessage::MergeFrom(const SimpleUIntMessage& from) {
  2027. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleUIntMessage)
  2028. GOOGLE_DCHECK_NE(&from, this);
  2029. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2030. ::google::protobuf::uint32 cached_has_bits = 0;
  2031. (void) cached_has_bits;
  2032. if (from.testfieldint() != 0) {
  2033. set_testfieldint(from.testfieldint());
  2034. }
  2035. }
  2036. void SimpleUIntMessage::CopyFrom(const ::google::protobuf::Message& from) {
  2037. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleUIntMessage)
  2038. if (&from == this) return;
  2039. Clear();
  2040. MergeFrom(from);
  2041. }
  2042. void SimpleUIntMessage::CopyFrom(const SimpleUIntMessage& from) {
  2043. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleUIntMessage)
  2044. if (&from == this) return;
  2045. Clear();
  2046. MergeFrom(from);
  2047. }
  2048. bool SimpleUIntMessage::IsInitialized() const {
  2049. return true;
  2050. }
  2051. void SimpleUIntMessage::Swap(SimpleUIntMessage* other) {
  2052. if (other == this) return;
  2053. InternalSwap(other);
  2054. }
  2055. void SimpleUIntMessage::InternalSwap(SimpleUIntMessage* other) {
  2056. using std::swap;
  2057. swap(testfieldint_, other->testfieldint_);
  2058. _internal_metadata_.Swap(&other->_internal_metadata_);
  2059. }
  2060. ::google::protobuf::Metadata SimpleUIntMessage::GetMetadata() const {
  2061. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  2062. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  2063. }
  2064. // ===================================================================
  2065. void SimpleInt64Message::InitAsDefaultInstance() {
  2066. }
  2067. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2068. const int SimpleInt64Message::kTestFieldIntFieldNumber;
  2069. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2070. SimpleInt64Message::SimpleInt64Message()
  2071. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2072. ::google::protobuf::internal::InitSCC(
  2073. &protobuf_simpletest_2eproto::scc_info_SimpleInt64Message.base);
  2074. SharedCtor();
  2075. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleInt64Message)
  2076. }
  2077. SimpleInt64Message::SimpleInt64Message(const SimpleInt64Message& from)
  2078. : ::google::protobuf::Message(),
  2079. _internal_metadata_(NULL) {
  2080. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2081. testfieldint_ = from.testfieldint_;
  2082. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleInt64Message)
  2083. }
  2084. void SimpleInt64Message::SharedCtor() {
  2085. testfieldint_ = GOOGLE_LONGLONG(0);
  2086. }
  2087. SimpleInt64Message::~SimpleInt64Message() {
  2088. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleInt64Message)
  2089. SharedDtor();
  2090. }
  2091. void SimpleInt64Message::SharedDtor() {
  2092. }
  2093. void SimpleInt64Message::SetCachedSize(int size) const {
  2094. _cached_size_.Set(size);
  2095. }
  2096. const ::google::protobuf::Descriptor* SimpleInt64Message::descriptor() {
  2097. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  2098. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2099. }
  2100. const SimpleInt64Message& SimpleInt64Message::default_instance() {
  2101. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleInt64Message.base);
  2102. return *internal_default_instance();
  2103. }
  2104. void SimpleInt64Message::Clear() {
  2105. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleInt64Message)
  2106. ::google::protobuf::uint32 cached_has_bits = 0;
  2107. // Prevent compiler warnings about cached_has_bits being unused
  2108. (void) cached_has_bits;
  2109. testfieldint_ = GOOGLE_LONGLONG(0);
  2110. _internal_metadata_.Clear();
  2111. }
  2112. bool SimpleInt64Message::MergePartialFromCodedStream(
  2113. ::google::protobuf::io::CodedInputStream* input) {
  2114. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2115. ::google::protobuf::uint32 tag;
  2116. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleInt64Message)
  2117. for (;;) {
  2118. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2119. tag = p.first;
  2120. if (!p.second) goto handle_unusual;
  2121. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2122. // int64 testFieldInt = 1;
  2123. case 1: {
  2124. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2125. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  2126. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2127. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  2128. input, &testfieldint_)));
  2129. } else {
  2130. goto handle_unusual;
  2131. }
  2132. break;
  2133. }
  2134. default: {
  2135. handle_unusual:
  2136. if (tag == 0) {
  2137. goto success;
  2138. }
  2139. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2140. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2141. break;
  2142. }
  2143. }
  2144. }
  2145. success:
  2146. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleInt64Message)
  2147. return true;
  2148. failure:
  2149. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleInt64Message)
  2150. return false;
  2151. #undef DO_
  2152. }
  2153. void SimpleInt64Message::SerializeWithCachedSizes(
  2154. ::google::protobuf::io::CodedOutputStream* output) const {
  2155. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleInt64Message)
  2156. ::google::protobuf::uint32 cached_has_bits = 0;
  2157. (void) cached_has_bits;
  2158. // int64 testFieldInt = 1;
  2159. if (this->testfieldint() != 0) {
  2160. ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->testfieldint(), output);
  2161. }
  2162. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2163. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2164. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2165. }
  2166. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleInt64Message)
  2167. }
  2168. ::google::protobuf::uint8* SimpleInt64Message::InternalSerializeWithCachedSizesToArray(
  2169. bool deterministic, ::google::protobuf::uint8* target) const {
  2170. (void)deterministic; // Unused
  2171. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleInt64Message)
  2172. ::google::protobuf::uint32 cached_has_bits = 0;
  2173. (void) cached_has_bits;
  2174. // int64 testFieldInt = 1;
  2175. if (this->testfieldint() != 0) {
  2176. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->testfieldint(), target);
  2177. }
  2178. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2179. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2180. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2181. }
  2182. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleInt64Message)
  2183. return target;
  2184. }
  2185. size_t SimpleInt64Message::ByteSizeLong() const {
  2186. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleInt64Message)
  2187. size_t total_size = 0;
  2188. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2189. total_size +=
  2190. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2191. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2192. }
  2193. // int64 testFieldInt = 1;
  2194. if (this->testfieldint() != 0) {
  2195. total_size += 1 +
  2196. ::google::protobuf::internal::WireFormatLite::Int64Size(
  2197. this->testfieldint());
  2198. }
  2199. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2200. SetCachedSize(cached_size);
  2201. return total_size;
  2202. }
  2203. void SimpleInt64Message::MergeFrom(const ::google::protobuf::Message& from) {
  2204. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleInt64Message)
  2205. GOOGLE_DCHECK_NE(&from, this);
  2206. const SimpleInt64Message* source =
  2207. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleInt64Message>(
  2208. &from);
  2209. if (source == NULL) {
  2210. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleInt64Message)
  2211. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2212. } else {
  2213. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleInt64Message)
  2214. MergeFrom(*source);
  2215. }
  2216. }
  2217. void SimpleInt64Message::MergeFrom(const SimpleInt64Message& from) {
  2218. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleInt64Message)
  2219. GOOGLE_DCHECK_NE(&from, this);
  2220. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2221. ::google::protobuf::uint32 cached_has_bits = 0;
  2222. (void) cached_has_bits;
  2223. if (from.testfieldint() != 0) {
  2224. set_testfieldint(from.testfieldint());
  2225. }
  2226. }
  2227. void SimpleInt64Message::CopyFrom(const ::google::protobuf::Message& from) {
  2228. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleInt64Message)
  2229. if (&from == this) return;
  2230. Clear();
  2231. MergeFrom(from);
  2232. }
  2233. void SimpleInt64Message::CopyFrom(const SimpleInt64Message& from) {
  2234. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleInt64Message)
  2235. if (&from == this) return;
  2236. Clear();
  2237. MergeFrom(from);
  2238. }
  2239. bool SimpleInt64Message::IsInitialized() const {
  2240. return true;
  2241. }
  2242. void SimpleInt64Message::Swap(SimpleInt64Message* other) {
  2243. if (other == this) return;
  2244. InternalSwap(other);
  2245. }
  2246. void SimpleInt64Message::InternalSwap(SimpleInt64Message* other) {
  2247. using std::swap;
  2248. swap(testfieldint_, other->testfieldint_);
  2249. _internal_metadata_.Swap(&other->_internal_metadata_);
  2250. }
  2251. ::google::protobuf::Metadata SimpleInt64Message::GetMetadata() const {
  2252. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  2253. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  2254. }
  2255. // ===================================================================
  2256. void SimpleSInt64Message::InitAsDefaultInstance() {
  2257. }
  2258. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2259. const int SimpleSInt64Message::kTestFieldIntFieldNumber;
  2260. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2261. SimpleSInt64Message::SimpleSInt64Message()
  2262. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2263. ::google::protobuf::internal::InitSCC(
  2264. &protobuf_simpletest_2eproto::scc_info_SimpleSInt64Message.base);
  2265. SharedCtor();
  2266. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleSInt64Message)
  2267. }
  2268. SimpleSInt64Message::SimpleSInt64Message(const SimpleSInt64Message& from)
  2269. : ::google::protobuf::Message(),
  2270. _internal_metadata_(NULL) {
  2271. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2272. testfieldint_ = from.testfieldint_;
  2273. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleSInt64Message)
  2274. }
  2275. void SimpleSInt64Message::SharedCtor() {
  2276. testfieldint_ = GOOGLE_LONGLONG(0);
  2277. }
  2278. SimpleSInt64Message::~SimpleSInt64Message() {
  2279. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleSInt64Message)
  2280. SharedDtor();
  2281. }
  2282. void SimpleSInt64Message::SharedDtor() {
  2283. }
  2284. void SimpleSInt64Message::SetCachedSize(int size) const {
  2285. _cached_size_.Set(size);
  2286. }
  2287. const ::google::protobuf::Descriptor* SimpleSInt64Message::descriptor() {
  2288. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  2289. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2290. }
  2291. const SimpleSInt64Message& SimpleSInt64Message::default_instance() {
  2292. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleSInt64Message.base);
  2293. return *internal_default_instance();
  2294. }
  2295. void SimpleSInt64Message::Clear() {
  2296. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleSInt64Message)
  2297. ::google::protobuf::uint32 cached_has_bits = 0;
  2298. // Prevent compiler warnings about cached_has_bits being unused
  2299. (void) cached_has_bits;
  2300. testfieldint_ = GOOGLE_LONGLONG(0);
  2301. _internal_metadata_.Clear();
  2302. }
  2303. bool SimpleSInt64Message::MergePartialFromCodedStream(
  2304. ::google::protobuf::io::CodedInputStream* input) {
  2305. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2306. ::google::protobuf::uint32 tag;
  2307. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleSInt64Message)
  2308. for (;;) {
  2309. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2310. tag = p.first;
  2311. if (!p.second) goto handle_unusual;
  2312. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2313. // sint64 testFieldInt = 1;
  2314. case 1: {
  2315. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2316. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  2317. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2318. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  2319. input, &testfieldint_)));
  2320. } else {
  2321. goto handle_unusual;
  2322. }
  2323. break;
  2324. }
  2325. default: {
  2326. handle_unusual:
  2327. if (tag == 0) {
  2328. goto success;
  2329. }
  2330. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2331. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2332. break;
  2333. }
  2334. }
  2335. }
  2336. success:
  2337. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleSInt64Message)
  2338. return true;
  2339. failure:
  2340. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleSInt64Message)
  2341. return false;
  2342. #undef DO_
  2343. }
  2344. void SimpleSInt64Message::SerializeWithCachedSizes(
  2345. ::google::protobuf::io::CodedOutputStream* output) const {
  2346. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleSInt64Message)
  2347. ::google::protobuf::uint32 cached_has_bits = 0;
  2348. (void) cached_has_bits;
  2349. // sint64 testFieldInt = 1;
  2350. if (this->testfieldint() != 0) {
  2351. ::google::protobuf::internal::WireFormatLite::WriteSInt64(1, this->testfieldint(), output);
  2352. }
  2353. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2354. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2355. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2356. }
  2357. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleSInt64Message)
  2358. }
  2359. ::google::protobuf::uint8* SimpleSInt64Message::InternalSerializeWithCachedSizesToArray(
  2360. bool deterministic, ::google::protobuf::uint8* target) const {
  2361. (void)deterministic; // Unused
  2362. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleSInt64Message)
  2363. ::google::protobuf::uint32 cached_has_bits = 0;
  2364. (void) cached_has_bits;
  2365. // sint64 testFieldInt = 1;
  2366. if (this->testfieldint() != 0) {
  2367. target = ::google::protobuf::internal::WireFormatLite::WriteSInt64ToArray(1, this->testfieldint(), target);
  2368. }
  2369. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2370. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2371. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2372. }
  2373. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleSInt64Message)
  2374. return target;
  2375. }
  2376. size_t SimpleSInt64Message::ByteSizeLong() const {
  2377. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleSInt64Message)
  2378. size_t total_size = 0;
  2379. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2380. total_size +=
  2381. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2382. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2383. }
  2384. // sint64 testFieldInt = 1;
  2385. if (this->testfieldint() != 0) {
  2386. total_size += 1 +
  2387. ::google::protobuf::internal::WireFormatLite::SInt64Size(
  2388. this->testfieldint());
  2389. }
  2390. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2391. SetCachedSize(cached_size);
  2392. return total_size;
  2393. }
  2394. void SimpleSInt64Message::MergeFrom(const ::google::protobuf::Message& from) {
  2395. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleSInt64Message)
  2396. GOOGLE_DCHECK_NE(&from, this);
  2397. const SimpleSInt64Message* source =
  2398. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleSInt64Message>(
  2399. &from);
  2400. if (source == NULL) {
  2401. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleSInt64Message)
  2402. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2403. } else {
  2404. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleSInt64Message)
  2405. MergeFrom(*source);
  2406. }
  2407. }
  2408. void SimpleSInt64Message::MergeFrom(const SimpleSInt64Message& from) {
  2409. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleSInt64Message)
  2410. GOOGLE_DCHECK_NE(&from, this);
  2411. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2412. ::google::protobuf::uint32 cached_has_bits = 0;
  2413. (void) cached_has_bits;
  2414. if (from.testfieldint() != 0) {
  2415. set_testfieldint(from.testfieldint());
  2416. }
  2417. }
  2418. void SimpleSInt64Message::CopyFrom(const ::google::protobuf::Message& from) {
  2419. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleSInt64Message)
  2420. if (&from == this) return;
  2421. Clear();
  2422. MergeFrom(from);
  2423. }
  2424. void SimpleSInt64Message::CopyFrom(const SimpleSInt64Message& from) {
  2425. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleSInt64Message)
  2426. if (&from == this) return;
  2427. Clear();
  2428. MergeFrom(from);
  2429. }
  2430. bool SimpleSInt64Message::IsInitialized() const {
  2431. return true;
  2432. }
  2433. void SimpleSInt64Message::Swap(SimpleSInt64Message* other) {
  2434. if (other == this) return;
  2435. InternalSwap(other);
  2436. }
  2437. void SimpleSInt64Message::InternalSwap(SimpleSInt64Message* other) {
  2438. using std::swap;
  2439. swap(testfieldint_, other->testfieldint_);
  2440. _internal_metadata_.Swap(&other->_internal_metadata_);
  2441. }
  2442. ::google::protobuf::Metadata SimpleSInt64Message::GetMetadata() const {
  2443. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  2444. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  2445. }
  2446. // ===================================================================
  2447. void SimpleUInt64Message::InitAsDefaultInstance() {
  2448. }
  2449. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2450. const int SimpleUInt64Message::kTestFieldIntFieldNumber;
  2451. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2452. SimpleUInt64Message::SimpleUInt64Message()
  2453. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2454. ::google::protobuf::internal::InitSCC(
  2455. &protobuf_simpletest_2eproto::scc_info_SimpleUInt64Message.base);
  2456. SharedCtor();
  2457. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleUInt64Message)
  2458. }
  2459. SimpleUInt64Message::SimpleUInt64Message(const SimpleUInt64Message& from)
  2460. : ::google::protobuf::Message(),
  2461. _internal_metadata_(NULL) {
  2462. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2463. testfieldint_ = from.testfieldint_;
  2464. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleUInt64Message)
  2465. }
  2466. void SimpleUInt64Message::SharedCtor() {
  2467. testfieldint_ = GOOGLE_ULONGLONG(0);
  2468. }
  2469. SimpleUInt64Message::~SimpleUInt64Message() {
  2470. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleUInt64Message)
  2471. SharedDtor();
  2472. }
  2473. void SimpleUInt64Message::SharedDtor() {
  2474. }
  2475. void SimpleUInt64Message::SetCachedSize(int size) const {
  2476. _cached_size_.Set(size);
  2477. }
  2478. const ::google::protobuf::Descriptor* SimpleUInt64Message::descriptor() {
  2479. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  2480. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2481. }
  2482. const SimpleUInt64Message& SimpleUInt64Message::default_instance() {
  2483. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleUInt64Message.base);
  2484. return *internal_default_instance();
  2485. }
  2486. void SimpleUInt64Message::Clear() {
  2487. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleUInt64Message)
  2488. ::google::protobuf::uint32 cached_has_bits = 0;
  2489. // Prevent compiler warnings about cached_has_bits being unused
  2490. (void) cached_has_bits;
  2491. testfieldint_ = GOOGLE_ULONGLONG(0);
  2492. _internal_metadata_.Clear();
  2493. }
  2494. bool SimpleUInt64Message::MergePartialFromCodedStream(
  2495. ::google::protobuf::io::CodedInputStream* input) {
  2496. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2497. ::google::protobuf::uint32 tag;
  2498. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleUInt64Message)
  2499. for (;;) {
  2500. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2501. tag = p.first;
  2502. if (!p.second) goto handle_unusual;
  2503. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2504. // uint64 testFieldInt = 1;
  2505. case 1: {
  2506. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2507. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  2508. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2509. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  2510. input, &testfieldint_)));
  2511. } else {
  2512. goto handle_unusual;
  2513. }
  2514. break;
  2515. }
  2516. default: {
  2517. handle_unusual:
  2518. if (tag == 0) {
  2519. goto success;
  2520. }
  2521. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2522. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2523. break;
  2524. }
  2525. }
  2526. }
  2527. success:
  2528. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleUInt64Message)
  2529. return true;
  2530. failure:
  2531. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleUInt64Message)
  2532. return false;
  2533. #undef DO_
  2534. }
  2535. void SimpleUInt64Message::SerializeWithCachedSizes(
  2536. ::google::protobuf::io::CodedOutputStream* output) const {
  2537. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleUInt64Message)
  2538. ::google::protobuf::uint32 cached_has_bits = 0;
  2539. (void) cached_has_bits;
  2540. // uint64 testFieldInt = 1;
  2541. if (this->testfieldint() != 0) {
  2542. ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->testfieldint(), output);
  2543. }
  2544. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2545. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2546. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2547. }
  2548. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleUInt64Message)
  2549. }
  2550. ::google::protobuf::uint8* SimpleUInt64Message::InternalSerializeWithCachedSizesToArray(
  2551. bool deterministic, ::google::protobuf::uint8* target) const {
  2552. (void)deterministic; // Unused
  2553. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleUInt64Message)
  2554. ::google::protobuf::uint32 cached_has_bits = 0;
  2555. (void) cached_has_bits;
  2556. // uint64 testFieldInt = 1;
  2557. if (this->testfieldint() != 0) {
  2558. target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->testfieldint(), target);
  2559. }
  2560. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2561. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2562. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2563. }
  2564. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleUInt64Message)
  2565. return target;
  2566. }
  2567. size_t SimpleUInt64Message::ByteSizeLong() const {
  2568. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleUInt64Message)
  2569. size_t total_size = 0;
  2570. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2571. total_size +=
  2572. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2573. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2574. }
  2575. // uint64 testFieldInt = 1;
  2576. if (this->testfieldint() != 0) {
  2577. total_size += 1 +
  2578. ::google::protobuf::internal::WireFormatLite::UInt64Size(
  2579. this->testfieldint());
  2580. }
  2581. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2582. SetCachedSize(cached_size);
  2583. return total_size;
  2584. }
  2585. void SimpleUInt64Message::MergeFrom(const ::google::protobuf::Message& from) {
  2586. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleUInt64Message)
  2587. GOOGLE_DCHECK_NE(&from, this);
  2588. const SimpleUInt64Message* source =
  2589. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleUInt64Message>(
  2590. &from);
  2591. if (source == NULL) {
  2592. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleUInt64Message)
  2593. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2594. } else {
  2595. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleUInt64Message)
  2596. MergeFrom(*source);
  2597. }
  2598. }
  2599. void SimpleUInt64Message::MergeFrom(const SimpleUInt64Message& from) {
  2600. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleUInt64Message)
  2601. GOOGLE_DCHECK_NE(&from, this);
  2602. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2603. ::google::protobuf::uint32 cached_has_bits = 0;
  2604. (void) cached_has_bits;
  2605. if (from.testfieldint() != 0) {
  2606. set_testfieldint(from.testfieldint());
  2607. }
  2608. }
  2609. void SimpleUInt64Message::CopyFrom(const ::google::protobuf::Message& from) {
  2610. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleUInt64Message)
  2611. if (&from == this) return;
  2612. Clear();
  2613. MergeFrom(from);
  2614. }
  2615. void SimpleUInt64Message::CopyFrom(const SimpleUInt64Message& from) {
  2616. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleUInt64Message)
  2617. if (&from == this) return;
  2618. Clear();
  2619. MergeFrom(from);
  2620. }
  2621. bool SimpleUInt64Message::IsInitialized() const {
  2622. return true;
  2623. }
  2624. void SimpleUInt64Message::Swap(SimpleUInt64Message* other) {
  2625. if (other == this) return;
  2626. InternalSwap(other);
  2627. }
  2628. void SimpleUInt64Message::InternalSwap(SimpleUInt64Message* other) {
  2629. using std::swap;
  2630. swap(testfieldint_, other->testfieldint_);
  2631. _internal_metadata_.Swap(&other->_internal_metadata_);
  2632. }
  2633. ::google::protobuf::Metadata SimpleUInt64Message::GetMetadata() const {
  2634. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  2635. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  2636. }
  2637. // ===================================================================
  2638. void SimpleStringMessage::InitAsDefaultInstance() {
  2639. }
  2640. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2641. const int SimpleStringMessage::kTestFieldStringFieldNumber;
  2642. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2643. SimpleStringMessage::SimpleStringMessage()
  2644. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2645. ::google::protobuf::internal::InitSCC(
  2646. &protobuf_simpletest_2eproto::scc_info_SimpleStringMessage.base);
  2647. SharedCtor();
  2648. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleStringMessage)
  2649. }
  2650. SimpleStringMessage::SimpleStringMessage(const SimpleStringMessage& from)
  2651. : ::google::protobuf::Message(),
  2652. _internal_metadata_(NULL) {
  2653. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2654. testfieldstring_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2655. if (from.testfieldstring().size() > 0) {
  2656. testfieldstring_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.testfieldstring_);
  2657. }
  2658. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleStringMessage)
  2659. }
  2660. void SimpleStringMessage::SharedCtor() {
  2661. testfieldstring_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2662. }
  2663. SimpleStringMessage::~SimpleStringMessage() {
  2664. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleStringMessage)
  2665. SharedDtor();
  2666. }
  2667. void SimpleStringMessage::SharedDtor() {
  2668. testfieldstring_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2669. }
  2670. void SimpleStringMessage::SetCachedSize(int size) const {
  2671. _cached_size_.Set(size);
  2672. }
  2673. const ::google::protobuf::Descriptor* SimpleStringMessage::descriptor() {
  2674. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  2675. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2676. }
  2677. const SimpleStringMessage& SimpleStringMessage::default_instance() {
  2678. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleStringMessage.base);
  2679. return *internal_default_instance();
  2680. }
  2681. void SimpleStringMessage::Clear() {
  2682. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleStringMessage)
  2683. ::google::protobuf::uint32 cached_has_bits = 0;
  2684. // Prevent compiler warnings about cached_has_bits being unused
  2685. (void) cached_has_bits;
  2686. testfieldstring_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2687. _internal_metadata_.Clear();
  2688. }
  2689. bool SimpleStringMessage::MergePartialFromCodedStream(
  2690. ::google::protobuf::io::CodedInputStream* input) {
  2691. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2692. ::google::protobuf::uint32 tag;
  2693. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleStringMessage)
  2694. for (;;) {
  2695. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2696. tag = p.first;
  2697. if (!p.second) goto handle_unusual;
  2698. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2699. // string testFieldString = 6;
  2700. case 6: {
  2701. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2702. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  2703. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2704. input, this->mutable_testfieldstring()));
  2705. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2706. this->testfieldstring().data(), static_cast<int>(this->testfieldstring().length()),
  2707. ::google::protobuf::internal::WireFormatLite::PARSE,
  2708. "qtprotobufnamespace.tests.SimpleStringMessage.testFieldString"));
  2709. } else {
  2710. goto handle_unusual;
  2711. }
  2712. break;
  2713. }
  2714. default: {
  2715. handle_unusual:
  2716. if (tag == 0) {
  2717. goto success;
  2718. }
  2719. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2720. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2721. break;
  2722. }
  2723. }
  2724. }
  2725. success:
  2726. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleStringMessage)
  2727. return true;
  2728. failure:
  2729. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleStringMessage)
  2730. return false;
  2731. #undef DO_
  2732. }
  2733. void SimpleStringMessage::SerializeWithCachedSizes(
  2734. ::google::protobuf::io::CodedOutputStream* output) const {
  2735. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleStringMessage)
  2736. ::google::protobuf::uint32 cached_has_bits = 0;
  2737. (void) cached_has_bits;
  2738. // string testFieldString = 6;
  2739. if (this->testfieldstring().size() > 0) {
  2740. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2741. this->testfieldstring().data(), static_cast<int>(this->testfieldstring().length()),
  2742. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2743. "qtprotobufnamespace.tests.SimpleStringMessage.testFieldString");
  2744. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2745. 6, this->testfieldstring(), output);
  2746. }
  2747. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2748. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2749. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2750. }
  2751. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleStringMessage)
  2752. }
  2753. ::google::protobuf::uint8* SimpleStringMessage::InternalSerializeWithCachedSizesToArray(
  2754. bool deterministic, ::google::protobuf::uint8* target) const {
  2755. (void)deterministic; // Unused
  2756. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleStringMessage)
  2757. ::google::protobuf::uint32 cached_has_bits = 0;
  2758. (void) cached_has_bits;
  2759. // string testFieldString = 6;
  2760. if (this->testfieldstring().size() > 0) {
  2761. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2762. this->testfieldstring().data(), static_cast<int>(this->testfieldstring().length()),
  2763. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2764. "qtprotobufnamespace.tests.SimpleStringMessage.testFieldString");
  2765. target =
  2766. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2767. 6, this->testfieldstring(), target);
  2768. }
  2769. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2770. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2771. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2772. }
  2773. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleStringMessage)
  2774. return target;
  2775. }
  2776. size_t SimpleStringMessage::ByteSizeLong() const {
  2777. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleStringMessage)
  2778. size_t total_size = 0;
  2779. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2780. total_size +=
  2781. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2782. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2783. }
  2784. // string testFieldString = 6;
  2785. if (this->testfieldstring().size() > 0) {
  2786. total_size += 1 +
  2787. ::google::protobuf::internal::WireFormatLite::StringSize(
  2788. this->testfieldstring());
  2789. }
  2790. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2791. SetCachedSize(cached_size);
  2792. return total_size;
  2793. }
  2794. void SimpleStringMessage::MergeFrom(const ::google::protobuf::Message& from) {
  2795. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleStringMessage)
  2796. GOOGLE_DCHECK_NE(&from, this);
  2797. const SimpleStringMessage* source =
  2798. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleStringMessage>(
  2799. &from);
  2800. if (source == NULL) {
  2801. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleStringMessage)
  2802. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2803. } else {
  2804. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleStringMessage)
  2805. MergeFrom(*source);
  2806. }
  2807. }
  2808. void SimpleStringMessage::MergeFrom(const SimpleStringMessage& from) {
  2809. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleStringMessage)
  2810. GOOGLE_DCHECK_NE(&from, this);
  2811. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2812. ::google::protobuf::uint32 cached_has_bits = 0;
  2813. (void) cached_has_bits;
  2814. if (from.testfieldstring().size() > 0) {
  2815. testfieldstring_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.testfieldstring_);
  2816. }
  2817. }
  2818. void SimpleStringMessage::CopyFrom(const ::google::protobuf::Message& from) {
  2819. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleStringMessage)
  2820. if (&from == this) return;
  2821. Clear();
  2822. MergeFrom(from);
  2823. }
  2824. void SimpleStringMessage::CopyFrom(const SimpleStringMessage& from) {
  2825. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleStringMessage)
  2826. if (&from == this) return;
  2827. Clear();
  2828. MergeFrom(from);
  2829. }
  2830. bool SimpleStringMessage::IsInitialized() const {
  2831. return true;
  2832. }
  2833. void SimpleStringMessage::Swap(SimpleStringMessage* other) {
  2834. if (other == this) return;
  2835. InternalSwap(other);
  2836. }
  2837. void SimpleStringMessage::InternalSwap(SimpleStringMessage* other) {
  2838. using std::swap;
  2839. testfieldstring_.Swap(&other->testfieldstring_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  2840. GetArenaNoVirtual());
  2841. _internal_metadata_.Swap(&other->_internal_metadata_);
  2842. }
  2843. ::google::protobuf::Metadata SimpleStringMessage::GetMetadata() const {
  2844. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  2845. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  2846. }
  2847. // ===================================================================
  2848. void SimpleFloatMessage::InitAsDefaultInstance() {
  2849. }
  2850. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2851. const int SimpleFloatMessage::kTestFieldFloatFieldNumber;
  2852. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2853. SimpleFloatMessage::SimpleFloatMessage()
  2854. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2855. ::google::protobuf::internal::InitSCC(
  2856. &protobuf_simpletest_2eproto::scc_info_SimpleFloatMessage.base);
  2857. SharedCtor();
  2858. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleFloatMessage)
  2859. }
  2860. SimpleFloatMessage::SimpleFloatMessage(const SimpleFloatMessage& from)
  2861. : ::google::protobuf::Message(),
  2862. _internal_metadata_(NULL) {
  2863. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2864. testfieldfloat_ = from.testfieldfloat_;
  2865. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleFloatMessage)
  2866. }
  2867. void SimpleFloatMessage::SharedCtor() {
  2868. testfieldfloat_ = 0;
  2869. }
  2870. SimpleFloatMessage::~SimpleFloatMessage() {
  2871. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleFloatMessage)
  2872. SharedDtor();
  2873. }
  2874. void SimpleFloatMessage::SharedDtor() {
  2875. }
  2876. void SimpleFloatMessage::SetCachedSize(int size) const {
  2877. _cached_size_.Set(size);
  2878. }
  2879. const ::google::protobuf::Descriptor* SimpleFloatMessage::descriptor() {
  2880. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  2881. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2882. }
  2883. const SimpleFloatMessage& SimpleFloatMessage::default_instance() {
  2884. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleFloatMessage.base);
  2885. return *internal_default_instance();
  2886. }
  2887. void SimpleFloatMessage::Clear() {
  2888. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleFloatMessage)
  2889. ::google::protobuf::uint32 cached_has_bits = 0;
  2890. // Prevent compiler warnings about cached_has_bits being unused
  2891. (void) cached_has_bits;
  2892. testfieldfloat_ = 0;
  2893. _internal_metadata_.Clear();
  2894. }
  2895. bool SimpleFloatMessage::MergePartialFromCodedStream(
  2896. ::google::protobuf::io::CodedInputStream* input) {
  2897. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2898. ::google::protobuf::uint32 tag;
  2899. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleFloatMessage)
  2900. for (;;) {
  2901. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2902. tag = p.first;
  2903. if (!p.second) goto handle_unusual;
  2904. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2905. // float testFieldFloat = 7;
  2906. case 7: {
  2907. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2908. static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
  2909. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2910. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  2911. input, &testfieldfloat_)));
  2912. } else {
  2913. goto handle_unusual;
  2914. }
  2915. break;
  2916. }
  2917. default: {
  2918. handle_unusual:
  2919. if (tag == 0) {
  2920. goto success;
  2921. }
  2922. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2923. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2924. break;
  2925. }
  2926. }
  2927. }
  2928. success:
  2929. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleFloatMessage)
  2930. return true;
  2931. failure:
  2932. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleFloatMessage)
  2933. return false;
  2934. #undef DO_
  2935. }
  2936. void SimpleFloatMessage::SerializeWithCachedSizes(
  2937. ::google::protobuf::io::CodedOutputStream* output) const {
  2938. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleFloatMessage)
  2939. ::google::protobuf::uint32 cached_has_bits = 0;
  2940. (void) cached_has_bits;
  2941. // float testFieldFloat = 7;
  2942. if (this->testfieldfloat() != 0) {
  2943. ::google::protobuf::internal::WireFormatLite::WriteFloat(7, this->testfieldfloat(), output);
  2944. }
  2945. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2946. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2947. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2948. }
  2949. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleFloatMessage)
  2950. }
  2951. ::google::protobuf::uint8* SimpleFloatMessage::InternalSerializeWithCachedSizesToArray(
  2952. bool deterministic, ::google::protobuf::uint8* target) const {
  2953. (void)deterministic; // Unused
  2954. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleFloatMessage)
  2955. ::google::protobuf::uint32 cached_has_bits = 0;
  2956. (void) cached_has_bits;
  2957. // float testFieldFloat = 7;
  2958. if (this->testfieldfloat() != 0) {
  2959. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(7, this->testfieldfloat(), target);
  2960. }
  2961. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2962. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2963. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2964. }
  2965. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleFloatMessage)
  2966. return target;
  2967. }
  2968. size_t SimpleFloatMessage::ByteSizeLong() const {
  2969. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleFloatMessage)
  2970. size_t total_size = 0;
  2971. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2972. total_size +=
  2973. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2974. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2975. }
  2976. // float testFieldFloat = 7;
  2977. if (this->testfieldfloat() != 0) {
  2978. total_size += 1 + 4;
  2979. }
  2980. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2981. SetCachedSize(cached_size);
  2982. return total_size;
  2983. }
  2984. void SimpleFloatMessage::MergeFrom(const ::google::protobuf::Message& from) {
  2985. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleFloatMessage)
  2986. GOOGLE_DCHECK_NE(&from, this);
  2987. const SimpleFloatMessage* source =
  2988. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleFloatMessage>(
  2989. &from);
  2990. if (source == NULL) {
  2991. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleFloatMessage)
  2992. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2993. } else {
  2994. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleFloatMessage)
  2995. MergeFrom(*source);
  2996. }
  2997. }
  2998. void SimpleFloatMessage::MergeFrom(const SimpleFloatMessage& from) {
  2999. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleFloatMessage)
  3000. GOOGLE_DCHECK_NE(&from, this);
  3001. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3002. ::google::protobuf::uint32 cached_has_bits = 0;
  3003. (void) cached_has_bits;
  3004. if (from.testfieldfloat() != 0) {
  3005. set_testfieldfloat(from.testfieldfloat());
  3006. }
  3007. }
  3008. void SimpleFloatMessage::CopyFrom(const ::google::protobuf::Message& from) {
  3009. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleFloatMessage)
  3010. if (&from == this) return;
  3011. Clear();
  3012. MergeFrom(from);
  3013. }
  3014. void SimpleFloatMessage::CopyFrom(const SimpleFloatMessage& from) {
  3015. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleFloatMessage)
  3016. if (&from == this) return;
  3017. Clear();
  3018. MergeFrom(from);
  3019. }
  3020. bool SimpleFloatMessage::IsInitialized() const {
  3021. return true;
  3022. }
  3023. void SimpleFloatMessage::Swap(SimpleFloatMessage* other) {
  3024. if (other == this) return;
  3025. InternalSwap(other);
  3026. }
  3027. void SimpleFloatMessage::InternalSwap(SimpleFloatMessage* other) {
  3028. using std::swap;
  3029. swap(testfieldfloat_, other->testfieldfloat_);
  3030. _internal_metadata_.Swap(&other->_internal_metadata_);
  3031. }
  3032. ::google::protobuf::Metadata SimpleFloatMessage::GetMetadata() const {
  3033. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  3034. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  3035. }
  3036. // ===================================================================
  3037. void SimpleDoubleMessage::InitAsDefaultInstance() {
  3038. }
  3039. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3040. const int SimpleDoubleMessage::kTestFieldDoubleFieldNumber;
  3041. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3042. SimpleDoubleMessage::SimpleDoubleMessage()
  3043. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3044. ::google::protobuf::internal::InitSCC(
  3045. &protobuf_simpletest_2eproto::scc_info_SimpleDoubleMessage.base);
  3046. SharedCtor();
  3047. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3048. }
  3049. SimpleDoubleMessage::SimpleDoubleMessage(const SimpleDoubleMessage& from)
  3050. : ::google::protobuf::Message(),
  3051. _internal_metadata_(NULL) {
  3052. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3053. testfielddouble_ = from.testfielddouble_;
  3054. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3055. }
  3056. void SimpleDoubleMessage::SharedCtor() {
  3057. testfielddouble_ = 0;
  3058. }
  3059. SimpleDoubleMessage::~SimpleDoubleMessage() {
  3060. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3061. SharedDtor();
  3062. }
  3063. void SimpleDoubleMessage::SharedDtor() {
  3064. }
  3065. void SimpleDoubleMessage::SetCachedSize(int size) const {
  3066. _cached_size_.Set(size);
  3067. }
  3068. const ::google::protobuf::Descriptor* SimpleDoubleMessage::descriptor() {
  3069. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  3070. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3071. }
  3072. const SimpleDoubleMessage& SimpleDoubleMessage::default_instance() {
  3073. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleDoubleMessage.base);
  3074. return *internal_default_instance();
  3075. }
  3076. void SimpleDoubleMessage::Clear() {
  3077. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3078. ::google::protobuf::uint32 cached_has_bits = 0;
  3079. // Prevent compiler warnings about cached_has_bits being unused
  3080. (void) cached_has_bits;
  3081. testfielddouble_ = 0;
  3082. _internal_metadata_.Clear();
  3083. }
  3084. bool SimpleDoubleMessage::MergePartialFromCodedStream(
  3085. ::google::protobuf::io::CodedInputStream* input) {
  3086. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3087. ::google::protobuf::uint32 tag;
  3088. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3089. for (;;) {
  3090. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3091. tag = p.first;
  3092. if (!p.second) goto handle_unusual;
  3093. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3094. // double testFieldDouble = 8;
  3095. case 8: {
  3096. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3097. static_cast< ::google::protobuf::uint8>(65u /* 65 & 0xFF */)) {
  3098. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  3099. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  3100. input, &testfielddouble_)));
  3101. } else {
  3102. goto handle_unusual;
  3103. }
  3104. break;
  3105. }
  3106. default: {
  3107. handle_unusual:
  3108. if (tag == 0) {
  3109. goto success;
  3110. }
  3111. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3112. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3113. break;
  3114. }
  3115. }
  3116. }
  3117. success:
  3118. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3119. return true;
  3120. failure:
  3121. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3122. return false;
  3123. #undef DO_
  3124. }
  3125. void SimpleDoubleMessage::SerializeWithCachedSizes(
  3126. ::google::protobuf::io::CodedOutputStream* output) const {
  3127. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3128. ::google::protobuf::uint32 cached_has_bits = 0;
  3129. (void) cached_has_bits;
  3130. // double testFieldDouble = 8;
  3131. if (this->testfielddouble() != 0) {
  3132. ::google::protobuf::internal::WireFormatLite::WriteDouble(8, this->testfielddouble(), output);
  3133. }
  3134. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3135. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3136. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3137. }
  3138. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3139. }
  3140. ::google::protobuf::uint8* SimpleDoubleMessage::InternalSerializeWithCachedSizesToArray(
  3141. bool deterministic, ::google::protobuf::uint8* target) const {
  3142. (void)deterministic; // Unused
  3143. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3144. ::google::protobuf::uint32 cached_has_bits = 0;
  3145. (void) cached_has_bits;
  3146. // double testFieldDouble = 8;
  3147. if (this->testfielddouble() != 0) {
  3148. target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(8, this->testfielddouble(), target);
  3149. }
  3150. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3151. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3152. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3153. }
  3154. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3155. return target;
  3156. }
  3157. size_t SimpleDoubleMessage::ByteSizeLong() const {
  3158. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3159. size_t total_size = 0;
  3160. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3161. total_size +=
  3162. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3163. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3164. }
  3165. // double testFieldDouble = 8;
  3166. if (this->testfielddouble() != 0) {
  3167. total_size += 1 + 8;
  3168. }
  3169. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3170. SetCachedSize(cached_size);
  3171. return total_size;
  3172. }
  3173. void SimpleDoubleMessage::MergeFrom(const ::google::protobuf::Message& from) {
  3174. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3175. GOOGLE_DCHECK_NE(&from, this);
  3176. const SimpleDoubleMessage* source =
  3177. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleDoubleMessage>(
  3178. &from);
  3179. if (source == NULL) {
  3180. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3181. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3182. } else {
  3183. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3184. MergeFrom(*source);
  3185. }
  3186. }
  3187. void SimpleDoubleMessage::MergeFrom(const SimpleDoubleMessage& from) {
  3188. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3189. GOOGLE_DCHECK_NE(&from, this);
  3190. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3191. ::google::protobuf::uint32 cached_has_bits = 0;
  3192. (void) cached_has_bits;
  3193. if (from.testfielddouble() != 0) {
  3194. set_testfielddouble(from.testfielddouble());
  3195. }
  3196. }
  3197. void SimpleDoubleMessage::CopyFrom(const ::google::protobuf::Message& from) {
  3198. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3199. if (&from == this) return;
  3200. Clear();
  3201. MergeFrom(from);
  3202. }
  3203. void SimpleDoubleMessage::CopyFrom(const SimpleDoubleMessage& from) {
  3204. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleDoubleMessage)
  3205. if (&from == this) return;
  3206. Clear();
  3207. MergeFrom(from);
  3208. }
  3209. bool SimpleDoubleMessage::IsInitialized() const {
  3210. return true;
  3211. }
  3212. void SimpleDoubleMessage::Swap(SimpleDoubleMessage* other) {
  3213. if (other == this) return;
  3214. InternalSwap(other);
  3215. }
  3216. void SimpleDoubleMessage::InternalSwap(SimpleDoubleMessage* other) {
  3217. using std::swap;
  3218. swap(testfielddouble_, other->testfielddouble_);
  3219. _internal_metadata_.Swap(&other->_internal_metadata_);
  3220. }
  3221. ::google::protobuf::Metadata SimpleDoubleMessage::GetMetadata() const {
  3222. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  3223. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  3224. }
  3225. // ===================================================================
  3226. void SimpleBytesMessage::InitAsDefaultInstance() {
  3227. }
  3228. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3229. const int SimpleBytesMessage::kTestFieldBytesFieldNumber;
  3230. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3231. SimpleBytesMessage::SimpleBytesMessage()
  3232. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3233. ::google::protobuf::internal::InitSCC(
  3234. &protobuf_simpletest_2eproto::scc_info_SimpleBytesMessage.base);
  3235. SharedCtor();
  3236. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleBytesMessage)
  3237. }
  3238. SimpleBytesMessage::SimpleBytesMessage(const SimpleBytesMessage& from)
  3239. : ::google::protobuf::Message(),
  3240. _internal_metadata_(NULL) {
  3241. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3242. testfieldbytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3243. if (from.testfieldbytes().size() > 0) {
  3244. testfieldbytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.testfieldbytes_);
  3245. }
  3246. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleBytesMessage)
  3247. }
  3248. void SimpleBytesMessage::SharedCtor() {
  3249. testfieldbytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3250. }
  3251. SimpleBytesMessage::~SimpleBytesMessage() {
  3252. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleBytesMessage)
  3253. SharedDtor();
  3254. }
  3255. void SimpleBytesMessage::SharedDtor() {
  3256. testfieldbytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3257. }
  3258. void SimpleBytesMessage::SetCachedSize(int size) const {
  3259. _cached_size_.Set(size);
  3260. }
  3261. const ::google::protobuf::Descriptor* SimpleBytesMessage::descriptor() {
  3262. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  3263. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3264. }
  3265. const SimpleBytesMessage& SimpleBytesMessage::default_instance() {
  3266. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleBytesMessage.base);
  3267. return *internal_default_instance();
  3268. }
  3269. void SimpleBytesMessage::Clear() {
  3270. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleBytesMessage)
  3271. ::google::protobuf::uint32 cached_has_bits = 0;
  3272. // Prevent compiler warnings about cached_has_bits being unused
  3273. (void) cached_has_bits;
  3274. testfieldbytes_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3275. _internal_metadata_.Clear();
  3276. }
  3277. bool SimpleBytesMessage::MergePartialFromCodedStream(
  3278. ::google::protobuf::io::CodedInputStream* input) {
  3279. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3280. ::google::protobuf::uint32 tag;
  3281. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleBytesMessage)
  3282. for (;;) {
  3283. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3284. tag = p.first;
  3285. if (!p.second) goto handle_unusual;
  3286. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3287. // bytes testFieldBytes = 1;
  3288. case 1: {
  3289. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3290. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3291. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  3292. input, this->mutable_testfieldbytes()));
  3293. } else {
  3294. goto handle_unusual;
  3295. }
  3296. break;
  3297. }
  3298. default: {
  3299. handle_unusual:
  3300. if (tag == 0) {
  3301. goto success;
  3302. }
  3303. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3304. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3305. break;
  3306. }
  3307. }
  3308. }
  3309. success:
  3310. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleBytesMessage)
  3311. return true;
  3312. failure:
  3313. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleBytesMessage)
  3314. return false;
  3315. #undef DO_
  3316. }
  3317. void SimpleBytesMessage::SerializeWithCachedSizes(
  3318. ::google::protobuf::io::CodedOutputStream* output) const {
  3319. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleBytesMessage)
  3320. ::google::protobuf::uint32 cached_has_bits = 0;
  3321. (void) cached_has_bits;
  3322. // bytes testFieldBytes = 1;
  3323. if (this->testfieldbytes().size() > 0) {
  3324. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  3325. 1, this->testfieldbytes(), output);
  3326. }
  3327. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3328. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3329. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3330. }
  3331. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleBytesMessage)
  3332. }
  3333. ::google::protobuf::uint8* SimpleBytesMessage::InternalSerializeWithCachedSizesToArray(
  3334. bool deterministic, ::google::protobuf::uint8* target) const {
  3335. (void)deterministic; // Unused
  3336. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleBytesMessage)
  3337. ::google::protobuf::uint32 cached_has_bits = 0;
  3338. (void) cached_has_bits;
  3339. // bytes testFieldBytes = 1;
  3340. if (this->testfieldbytes().size() > 0) {
  3341. target =
  3342. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  3343. 1, this->testfieldbytes(), target);
  3344. }
  3345. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3346. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3347. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3348. }
  3349. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleBytesMessage)
  3350. return target;
  3351. }
  3352. size_t SimpleBytesMessage::ByteSizeLong() const {
  3353. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleBytesMessage)
  3354. size_t total_size = 0;
  3355. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3356. total_size +=
  3357. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3358. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3359. }
  3360. // bytes testFieldBytes = 1;
  3361. if (this->testfieldbytes().size() > 0) {
  3362. total_size += 1 +
  3363. ::google::protobuf::internal::WireFormatLite::BytesSize(
  3364. this->testfieldbytes());
  3365. }
  3366. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3367. SetCachedSize(cached_size);
  3368. return total_size;
  3369. }
  3370. void SimpleBytesMessage::MergeFrom(const ::google::protobuf::Message& from) {
  3371. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleBytesMessage)
  3372. GOOGLE_DCHECK_NE(&from, this);
  3373. const SimpleBytesMessage* source =
  3374. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleBytesMessage>(
  3375. &from);
  3376. if (source == NULL) {
  3377. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleBytesMessage)
  3378. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3379. } else {
  3380. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleBytesMessage)
  3381. MergeFrom(*source);
  3382. }
  3383. }
  3384. void SimpleBytesMessage::MergeFrom(const SimpleBytesMessage& from) {
  3385. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleBytesMessage)
  3386. GOOGLE_DCHECK_NE(&from, this);
  3387. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3388. ::google::protobuf::uint32 cached_has_bits = 0;
  3389. (void) cached_has_bits;
  3390. if (from.testfieldbytes().size() > 0) {
  3391. testfieldbytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.testfieldbytes_);
  3392. }
  3393. }
  3394. void SimpleBytesMessage::CopyFrom(const ::google::protobuf::Message& from) {
  3395. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleBytesMessage)
  3396. if (&from == this) return;
  3397. Clear();
  3398. MergeFrom(from);
  3399. }
  3400. void SimpleBytesMessage::CopyFrom(const SimpleBytesMessage& from) {
  3401. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleBytesMessage)
  3402. if (&from == this) return;
  3403. Clear();
  3404. MergeFrom(from);
  3405. }
  3406. bool SimpleBytesMessage::IsInitialized() const {
  3407. return true;
  3408. }
  3409. void SimpleBytesMessage::Swap(SimpleBytesMessage* other) {
  3410. if (other == this) return;
  3411. InternalSwap(other);
  3412. }
  3413. void SimpleBytesMessage::InternalSwap(SimpleBytesMessage* other) {
  3414. using std::swap;
  3415. testfieldbytes_.Swap(&other->testfieldbytes_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  3416. GetArenaNoVirtual());
  3417. _internal_metadata_.Swap(&other->_internal_metadata_);
  3418. }
  3419. ::google::protobuf::Metadata SimpleBytesMessage::GetMetadata() const {
  3420. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  3421. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  3422. }
  3423. // ===================================================================
  3424. void SimpleFixedInt32Message::InitAsDefaultInstance() {
  3425. }
  3426. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3427. const int SimpleFixedInt32Message::kTestFieldFixedInt32FieldNumber;
  3428. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3429. SimpleFixedInt32Message::SimpleFixedInt32Message()
  3430. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3431. ::google::protobuf::internal::InitSCC(
  3432. &protobuf_simpletest_2eproto::scc_info_SimpleFixedInt32Message.base);
  3433. SharedCtor();
  3434. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3435. }
  3436. SimpleFixedInt32Message::SimpleFixedInt32Message(const SimpleFixedInt32Message& from)
  3437. : ::google::protobuf::Message(),
  3438. _internal_metadata_(NULL) {
  3439. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3440. testfieldfixedint32_ = from.testfieldfixedint32_;
  3441. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3442. }
  3443. void SimpleFixedInt32Message::SharedCtor() {
  3444. testfieldfixedint32_ = 0u;
  3445. }
  3446. SimpleFixedInt32Message::~SimpleFixedInt32Message() {
  3447. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3448. SharedDtor();
  3449. }
  3450. void SimpleFixedInt32Message::SharedDtor() {
  3451. }
  3452. void SimpleFixedInt32Message::SetCachedSize(int size) const {
  3453. _cached_size_.Set(size);
  3454. }
  3455. const ::google::protobuf::Descriptor* SimpleFixedInt32Message::descriptor() {
  3456. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  3457. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3458. }
  3459. const SimpleFixedInt32Message& SimpleFixedInt32Message::default_instance() {
  3460. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleFixedInt32Message.base);
  3461. return *internal_default_instance();
  3462. }
  3463. void SimpleFixedInt32Message::Clear() {
  3464. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3465. ::google::protobuf::uint32 cached_has_bits = 0;
  3466. // Prevent compiler warnings about cached_has_bits being unused
  3467. (void) cached_has_bits;
  3468. testfieldfixedint32_ = 0u;
  3469. _internal_metadata_.Clear();
  3470. }
  3471. bool SimpleFixedInt32Message::MergePartialFromCodedStream(
  3472. ::google::protobuf::io::CodedInputStream* input) {
  3473. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3474. ::google::protobuf::uint32 tag;
  3475. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3476. for (;;) {
  3477. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3478. tag = p.first;
  3479. if (!p.second) goto handle_unusual;
  3480. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3481. // fixed32 testFieldFixedInt32 = 1;
  3482. case 1: {
  3483. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3484. static_cast< ::google::protobuf::uint8>(13u /* 13 & 0xFF */)) {
  3485. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  3486. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  3487. input, &testfieldfixedint32_)));
  3488. } else {
  3489. goto handle_unusual;
  3490. }
  3491. break;
  3492. }
  3493. default: {
  3494. handle_unusual:
  3495. if (tag == 0) {
  3496. goto success;
  3497. }
  3498. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3499. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3500. break;
  3501. }
  3502. }
  3503. }
  3504. success:
  3505. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3506. return true;
  3507. failure:
  3508. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3509. return false;
  3510. #undef DO_
  3511. }
  3512. void SimpleFixedInt32Message::SerializeWithCachedSizes(
  3513. ::google::protobuf::io::CodedOutputStream* output) const {
  3514. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3515. ::google::protobuf::uint32 cached_has_bits = 0;
  3516. (void) cached_has_bits;
  3517. // fixed32 testFieldFixedInt32 = 1;
  3518. if (this->testfieldfixedint32() != 0) {
  3519. ::google::protobuf::internal::WireFormatLite::WriteFixed32(1, this->testfieldfixedint32(), output);
  3520. }
  3521. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3522. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3523. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3524. }
  3525. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3526. }
  3527. ::google::protobuf::uint8* SimpleFixedInt32Message::InternalSerializeWithCachedSizesToArray(
  3528. bool deterministic, ::google::protobuf::uint8* target) const {
  3529. (void)deterministic; // Unused
  3530. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3531. ::google::protobuf::uint32 cached_has_bits = 0;
  3532. (void) cached_has_bits;
  3533. // fixed32 testFieldFixedInt32 = 1;
  3534. if (this->testfieldfixedint32() != 0) {
  3535. target = ::google::protobuf::internal::WireFormatLite::WriteFixed32ToArray(1, this->testfieldfixedint32(), target);
  3536. }
  3537. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3538. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3539. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3540. }
  3541. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3542. return target;
  3543. }
  3544. size_t SimpleFixedInt32Message::ByteSizeLong() const {
  3545. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3546. size_t total_size = 0;
  3547. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3548. total_size +=
  3549. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3550. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3551. }
  3552. // fixed32 testFieldFixedInt32 = 1;
  3553. if (this->testfieldfixedint32() != 0) {
  3554. total_size += 1 + 4;
  3555. }
  3556. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3557. SetCachedSize(cached_size);
  3558. return total_size;
  3559. }
  3560. void SimpleFixedInt32Message::MergeFrom(const ::google::protobuf::Message& from) {
  3561. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3562. GOOGLE_DCHECK_NE(&from, this);
  3563. const SimpleFixedInt32Message* source =
  3564. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleFixedInt32Message>(
  3565. &from);
  3566. if (source == NULL) {
  3567. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3568. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3569. } else {
  3570. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3571. MergeFrom(*source);
  3572. }
  3573. }
  3574. void SimpleFixedInt32Message::MergeFrom(const SimpleFixedInt32Message& from) {
  3575. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3576. GOOGLE_DCHECK_NE(&from, this);
  3577. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3578. ::google::protobuf::uint32 cached_has_bits = 0;
  3579. (void) cached_has_bits;
  3580. if (from.testfieldfixedint32() != 0) {
  3581. set_testfieldfixedint32(from.testfieldfixedint32());
  3582. }
  3583. }
  3584. void SimpleFixedInt32Message::CopyFrom(const ::google::protobuf::Message& from) {
  3585. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3586. if (&from == this) return;
  3587. Clear();
  3588. MergeFrom(from);
  3589. }
  3590. void SimpleFixedInt32Message::CopyFrom(const SimpleFixedInt32Message& from) {
  3591. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleFixedInt32Message)
  3592. if (&from == this) return;
  3593. Clear();
  3594. MergeFrom(from);
  3595. }
  3596. bool SimpleFixedInt32Message::IsInitialized() const {
  3597. return true;
  3598. }
  3599. void SimpleFixedInt32Message::Swap(SimpleFixedInt32Message* other) {
  3600. if (other == this) return;
  3601. InternalSwap(other);
  3602. }
  3603. void SimpleFixedInt32Message::InternalSwap(SimpleFixedInt32Message* other) {
  3604. using std::swap;
  3605. swap(testfieldfixedint32_, other->testfieldfixedint32_);
  3606. _internal_metadata_.Swap(&other->_internal_metadata_);
  3607. }
  3608. ::google::protobuf::Metadata SimpleFixedInt32Message::GetMetadata() const {
  3609. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  3610. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  3611. }
  3612. // ===================================================================
  3613. void SimpleFixedInt64Message::InitAsDefaultInstance() {
  3614. }
  3615. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3616. const int SimpleFixedInt64Message::kTestFieldFixedInt64FieldNumber;
  3617. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3618. SimpleFixedInt64Message::SimpleFixedInt64Message()
  3619. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3620. ::google::protobuf::internal::InitSCC(
  3621. &protobuf_simpletest_2eproto::scc_info_SimpleFixedInt64Message.base);
  3622. SharedCtor();
  3623. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3624. }
  3625. SimpleFixedInt64Message::SimpleFixedInt64Message(const SimpleFixedInt64Message& from)
  3626. : ::google::protobuf::Message(),
  3627. _internal_metadata_(NULL) {
  3628. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3629. testfieldfixedint64_ = from.testfieldfixedint64_;
  3630. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3631. }
  3632. void SimpleFixedInt64Message::SharedCtor() {
  3633. testfieldfixedint64_ = GOOGLE_ULONGLONG(0);
  3634. }
  3635. SimpleFixedInt64Message::~SimpleFixedInt64Message() {
  3636. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3637. SharedDtor();
  3638. }
  3639. void SimpleFixedInt64Message::SharedDtor() {
  3640. }
  3641. void SimpleFixedInt64Message::SetCachedSize(int size) const {
  3642. _cached_size_.Set(size);
  3643. }
  3644. const ::google::protobuf::Descriptor* SimpleFixedInt64Message::descriptor() {
  3645. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  3646. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3647. }
  3648. const SimpleFixedInt64Message& SimpleFixedInt64Message::default_instance() {
  3649. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleFixedInt64Message.base);
  3650. return *internal_default_instance();
  3651. }
  3652. void SimpleFixedInt64Message::Clear() {
  3653. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3654. ::google::protobuf::uint32 cached_has_bits = 0;
  3655. // Prevent compiler warnings about cached_has_bits being unused
  3656. (void) cached_has_bits;
  3657. testfieldfixedint64_ = GOOGLE_ULONGLONG(0);
  3658. _internal_metadata_.Clear();
  3659. }
  3660. bool SimpleFixedInt64Message::MergePartialFromCodedStream(
  3661. ::google::protobuf::io::CodedInputStream* input) {
  3662. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3663. ::google::protobuf::uint32 tag;
  3664. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3665. for (;;) {
  3666. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3667. tag = p.first;
  3668. if (!p.second) goto handle_unusual;
  3669. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3670. // fixed64 testFieldFixedInt64 = 1;
  3671. case 1: {
  3672. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3673. static_cast< ::google::protobuf::uint8>(9u /* 9 & 0xFF */)) {
  3674. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  3675. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  3676. input, &testfieldfixedint64_)));
  3677. } else {
  3678. goto handle_unusual;
  3679. }
  3680. break;
  3681. }
  3682. default: {
  3683. handle_unusual:
  3684. if (tag == 0) {
  3685. goto success;
  3686. }
  3687. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3688. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3689. break;
  3690. }
  3691. }
  3692. }
  3693. success:
  3694. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3695. return true;
  3696. failure:
  3697. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3698. return false;
  3699. #undef DO_
  3700. }
  3701. void SimpleFixedInt64Message::SerializeWithCachedSizes(
  3702. ::google::protobuf::io::CodedOutputStream* output) const {
  3703. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3704. ::google::protobuf::uint32 cached_has_bits = 0;
  3705. (void) cached_has_bits;
  3706. // fixed64 testFieldFixedInt64 = 1;
  3707. if (this->testfieldfixedint64() != 0) {
  3708. ::google::protobuf::internal::WireFormatLite::WriteFixed64(1, this->testfieldfixedint64(), output);
  3709. }
  3710. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3711. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3712. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3713. }
  3714. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3715. }
  3716. ::google::protobuf::uint8* SimpleFixedInt64Message::InternalSerializeWithCachedSizesToArray(
  3717. bool deterministic, ::google::protobuf::uint8* target) const {
  3718. (void)deterministic; // Unused
  3719. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3720. ::google::protobuf::uint32 cached_has_bits = 0;
  3721. (void) cached_has_bits;
  3722. // fixed64 testFieldFixedInt64 = 1;
  3723. if (this->testfieldfixedint64() != 0) {
  3724. target = ::google::protobuf::internal::WireFormatLite::WriteFixed64ToArray(1, this->testfieldfixedint64(), target);
  3725. }
  3726. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3727. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3728. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3729. }
  3730. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3731. return target;
  3732. }
  3733. size_t SimpleFixedInt64Message::ByteSizeLong() const {
  3734. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3735. size_t total_size = 0;
  3736. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3737. total_size +=
  3738. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3739. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3740. }
  3741. // fixed64 testFieldFixedInt64 = 1;
  3742. if (this->testfieldfixedint64() != 0) {
  3743. total_size += 1 + 8;
  3744. }
  3745. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3746. SetCachedSize(cached_size);
  3747. return total_size;
  3748. }
  3749. void SimpleFixedInt64Message::MergeFrom(const ::google::protobuf::Message& from) {
  3750. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3751. GOOGLE_DCHECK_NE(&from, this);
  3752. const SimpleFixedInt64Message* source =
  3753. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleFixedInt64Message>(
  3754. &from);
  3755. if (source == NULL) {
  3756. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3757. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3758. } else {
  3759. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3760. MergeFrom(*source);
  3761. }
  3762. }
  3763. void SimpleFixedInt64Message::MergeFrom(const SimpleFixedInt64Message& from) {
  3764. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3765. GOOGLE_DCHECK_NE(&from, this);
  3766. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3767. ::google::protobuf::uint32 cached_has_bits = 0;
  3768. (void) cached_has_bits;
  3769. if (from.testfieldfixedint64() != 0) {
  3770. set_testfieldfixedint64(from.testfieldfixedint64());
  3771. }
  3772. }
  3773. void SimpleFixedInt64Message::CopyFrom(const ::google::protobuf::Message& from) {
  3774. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3775. if (&from == this) return;
  3776. Clear();
  3777. MergeFrom(from);
  3778. }
  3779. void SimpleFixedInt64Message::CopyFrom(const SimpleFixedInt64Message& from) {
  3780. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleFixedInt64Message)
  3781. if (&from == this) return;
  3782. Clear();
  3783. MergeFrom(from);
  3784. }
  3785. bool SimpleFixedInt64Message::IsInitialized() const {
  3786. return true;
  3787. }
  3788. void SimpleFixedInt64Message::Swap(SimpleFixedInt64Message* other) {
  3789. if (other == this) return;
  3790. InternalSwap(other);
  3791. }
  3792. void SimpleFixedInt64Message::InternalSwap(SimpleFixedInt64Message* other) {
  3793. using std::swap;
  3794. swap(testfieldfixedint64_, other->testfieldfixedint64_);
  3795. _internal_metadata_.Swap(&other->_internal_metadata_);
  3796. }
  3797. ::google::protobuf::Metadata SimpleFixedInt64Message::GetMetadata() const {
  3798. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  3799. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  3800. }
  3801. // ===================================================================
  3802. void SimpleSFixedInt32Message::InitAsDefaultInstance() {
  3803. }
  3804. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3805. const int SimpleSFixedInt32Message::kTestFieldFixedInt32FieldNumber;
  3806. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3807. SimpleSFixedInt32Message::SimpleSFixedInt32Message()
  3808. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3809. ::google::protobuf::internal::InitSCC(
  3810. &protobuf_simpletest_2eproto::scc_info_SimpleSFixedInt32Message.base);
  3811. SharedCtor();
  3812. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3813. }
  3814. SimpleSFixedInt32Message::SimpleSFixedInt32Message(const SimpleSFixedInt32Message& from)
  3815. : ::google::protobuf::Message(),
  3816. _internal_metadata_(NULL) {
  3817. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3818. testfieldfixedint32_ = from.testfieldfixedint32_;
  3819. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3820. }
  3821. void SimpleSFixedInt32Message::SharedCtor() {
  3822. testfieldfixedint32_ = 0;
  3823. }
  3824. SimpleSFixedInt32Message::~SimpleSFixedInt32Message() {
  3825. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3826. SharedDtor();
  3827. }
  3828. void SimpleSFixedInt32Message::SharedDtor() {
  3829. }
  3830. void SimpleSFixedInt32Message::SetCachedSize(int size) const {
  3831. _cached_size_.Set(size);
  3832. }
  3833. const ::google::protobuf::Descriptor* SimpleSFixedInt32Message::descriptor() {
  3834. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  3835. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3836. }
  3837. const SimpleSFixedInt32Message& SimpleSFixedInt32Message::default_instance() {
  3838. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleSFixedInt32Message.base);
  3839. return *internal_default_instance();
  3840. }
  3841. void SimpleSFixedInt32Message::Clear() {
  3842. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3843. ::google::protobuf::uint32 cached_has_bits = 0;
  3844. // Prevent compiler warnings about cached_has_bits being unused
  3845. (void) cached_has_bits;
  3846. testfieldfixedint32_ = 0;
  3847. _internal_metadata_.Clear();
  3848. }
  3849. bool SimpleSFixedInt32Message::MergePartialFromCodedStream(
  3850. ::google::protobuf::io::CodedInputStream* input) {
  3851. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3852. ::google::protobuf::uint32 tag;
  3853. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3854. for (;;) {
  3855. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3856. tag = p.first;
  3857. if (!p.second) goto handle_unusual;
  3858. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3859. // sfixed32 testFieldFixedInt32 = 1;
  3860. case 1: {
  3861. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3862. static_cast< ::google::protobuf::uint8>(13u /* 13 & 0xFF */)) {
  3863. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  3864. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  3865. input, &testfieldfixedint32_)));
  3866. } else {
  3867. goto handle_unusual;
  3868. }
  3869. break;
  3870. }
  3871. default: {
  3872. handle_unusual:
  3873. if (tag == 0) {
  3874. goto success;
  3875. }
  3876. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3877. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3878. break;
  3879. }
  3880. }
  3881. }
  3882. success:
  3883. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3884. return true;
  3885. failure:
  3886. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3887. return false;
  3888. #undef DO_
  3889. }
  3890. void SimpleSFixedInt32Message::SerializeWithCachedSizes(
  3891. ::google::protobuf::io::CodedOutputStream* output) const {
  3892. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3893. ::google::protobuf::uint32 cached_has_bits = 0;
  3894. (void) cached_has_bits;
  3895. // sfixed32 testFieldFixedInt32 = 1;
  3896. if (this->testfieldfixedint32() != 0) {
  3897. ::google::protobuf::internal::WireFormatLite::WriteSFixed32(1, this->testfieldfixedint32(), output);
  3898. }
  3899. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3900. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3901. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3902. }
  3903. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3904. }
  3905. ::google::protobuf::uint8* SimpleSFixedInt32Message::InternalSerializeWithCachedSizesToArray(
  3906. bool deterministic, ::google::protobuf::uint8* target) const {
  3907. (void)deterministic; // Unused
  3908. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3909. ::google::protobuf::uint32 cached_has_bits = 0;
  3910. (void) cached_has_bits;
  3911. // sfixed32 testFieldFixedInt32 = 1;
  3912. if (this->testfieldfixedint32() != 0) {
  3913. target = ::google::protobuf::internal::WireFormatLite::WriteSFixed32ToArray(1, this->testfieldfixedint32(), target);
  3914. }
  3915. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3916. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3917. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3918. }
  3919. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3920. return target;
  3921. }
  3922. size_t SimpleSFixedInt32Message::ByteSizeLong() const {
  3923. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3924. size_t total_size = 0;
  3925. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3926. total_size +=
  3927. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3928. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3929. }
  3930. // sfixed32 testFieldFixedInt32 = 1;
  3931. if (this->testfieldfixedint32() != 0) {
  3932. total_size += 1 + 4;
  3933. }
  3934. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3935. SetCachedSize(cached_size);
  3936. return total_size;
  3937. }
  3938. void SimpleSFixedInt32Message::MergeFrom(const ::google::protobuf::Message& from) {
  3939. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3940. GOOGLE_DCHECK_NE(&from, this);
  3941. const SimpleSFixedInt32Message* source =
  3942. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleSFixedInt32Message>(
  3943. &from);
  3944. if (source == NULL) {
  3945. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3946. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3947. } else {
  3948. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3949. MergeFrom(*source);
  3950. }
  3951. }
  3952. void SimpleSFixedInt32Message::MergeFrom(const SimpleSFixedInt32Message& from) {
  3953. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3954. GOOGLE_DCHECK_NE(&from, this);
  3955. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3956. ::google::protobuf::uint32 cached_has_bits = 0;
  3957. (void) cached_has_bits;
  3958. if (from.testfieldfixedint32() != 0) {
  3959. set_testfieldfixedint32(from.testfieldfixedint32());
  3960. }
  3961. }
  3962. void SimpleSFixedInt32Message::CopyFrom(const ::google::protobuf::Message& from) {
  3963. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3964. if (&from == this) return;
  3965. Clear();
  3966. MergeFrom(from);
  3967. }
  3968. void SimpleSFixedInt32Message::CopyFrom(const SimpleSFixedInt32Message& from) {
  3969. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleSFixedInt32Message)
  3970. if (&from == this) return;
  3971. Clear();
  3972. MergeFrom(from);
  3973. }
  3974. bool SimpleSFixedInt32Message::IsInitialized() const {
  3975. return true;
  3976. }
  3977. void SimpleSFixedInt32Message::Swap(SimpleSFixedInt32Message* other) {
  3978. if (other == this) return;
  3979. InternalSwap(other);
  3980. }
  3981. void SimpleSFixedInt32Message::InternalSwap(SimpleSFixedInt32Message* other) {
  3982. using std::swap;
  3983. swap(testfieldfixedint32_, other->testfieldfixedint32_);
  3984. _internal_metadata_.Swap(&other->_internal_metadata_);
  3985. }
  3986. ::google::protobuf::Metadata SimpleSFixedInt32Message::GetMetadata() const {
  3987. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  3988. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  3989. }
  3990. // ===================================================================
  3991. void SimpleSFixedInt64Message::InitAsDefaultInstance() {
  3992. }
  3993. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3994. const int SimpleSFixedInt64Message::kTestFieldFixedInt64FieldNumber;
  3995. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3996. SimpleSFixedInt64Message::SimpleSFixedInt64Message()
  3997. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3998. ::google::protobuf::internal::InitSCC(
  3999. &protobuf_simpletest_2eproto::scc_info_SimpleSFixedInt64Message.base);
  4000. SharedCtor();
  4001. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4002. }
  4003. SimpleSFixedInt64Message::SimpleSFixedInt64Message(const SimpleSFixedInt64Message& from)
  4004. : ::google::protobuf::Message(),
  4005. _internal_metadata_(NULL) {
  4006. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4007. testfieldfixedint64_ = from.testfieldfixedint64_;
  4008. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4009. }
  4010. void SimpleSFixedInt64Message::SharedCtor() {
  4011. testfieldfixedint64_ = GOOGLE_LONGLONG(0);
  4012. }
  4013. SimpleSFixedInt64Message::~SimpleSFixedInt64Message() {
  4014. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4015. SharedDtor();
  4016. }
  4017. void SimpleSFixedInt64Message::SharedDtor() {
  4018. }
  4019. void SimpleSFixedInt64Message::SetCachedSize(int size) const {
  4020. _cached_size_.Set(size);
  4021. }
  4022. const ::google::protobuf::Descriptor* SimpleSFixedInt64Message::descriptor() {
  4023. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  4024. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4025. }
  4026. const SimpleSFixedInt64Message& SimpleSFixedInt64Message::default_instance() {
  4027. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_SimpleSFixedInt64Message.base);
  4028. return *internal_default_instance();
  4029. }
  4030. void SimpleSFixedInt64Message::Clear() {
  4031. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4032. ::google::protobuf::uint32 cached_has_bits = 0;
  4033. // Prevent compiler warnings about cached_has_bits being unused
  4034. (void) cached_has_bits;
  4035. testfieldfixedint64_ = GOOGLE_LONGLONG(0);
  4036. _internal_metadata_.Clear();
  4037. }
  4038. bool SimpleSFixedInt64Message::MergePartialFromCodedStream(
  4039. ::google::protobuf::io::CodedInputStream* input) {
  4040. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4041. ::google::protobuf::uint32 tag;
  4042. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4043. for (;;) {
  4044. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4045. tag = p.first;
  4046. if (!p.second) goto handle_unusual;
  4047. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4048. // sfixed64 testFieldFixedInt64 = 1;
  4049. case 1: {
  4050. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4051. static_cast< ::google::protobuf::uint8>(9u /* 9 & 0xFF */)) {
  4052. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  4053. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  4054. input, &testfieldfixedint64_)));
  4055. } else {
  4056. goto handle_unusual;
  4057. }
  4058. break;
  4059. }
  4060. default: {
  4061. handle_unusual:
  4062. if (tag == 0) {
  4063. goto success;
  4064. }
  4065. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4066. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4067. break;
  4068. }
  4069. }
  4070. }
  4071. success:
  4072. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4073. return true;
  4074. failure:
  4075. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4076. return false;
  4077. #undef DO_
  4078. }
  4079. void SimpleSFixedInt64Message::SerializeWithCachedSizes(
  4080. ::google::protobuf::io::CodedOutputStream* output) const {
  4081. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4082. ::google::protobuf::uint32 cached_has_bits = 0;
  4083. (void) cached_has_bits;
  4084. // sfixed64 testFieldFixedInt64 = 1;
  4085. if (this->testfieldfixedint64() != 0) {
  4086. ::google::protobuf::internal::WireFormatLite::WriteSFixed64(1, this->testfieldfixedint64(), output);
  4087. }
  4088. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4089. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4090. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4091. }
  4092. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4093. }
  4094. ::google::protobuf::uint8* SimpleSFixedInt64Message::InternalSerializeWithCachedSizesToArray(
  4095. bool deterministic, ::google::protobuf::uint8* target) const {
  4096. (void)deterministic; // Unused
  4097. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4098. ::google::protobuf::uint32 cached_has_bits = 0;
  4099. (void) cached_has_bits;
  4100. // sfixed64 testFieldFixedInt64 = 1;
  4101. if (this->testfieldfixedint64() != 0) {
  4102. target = ::google::protobuf::internal::WireFormatLite::WriteSFixed64ToArray(1, this->testfieldfixedint64(), target);
  4103. }
  4104. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4105. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4106. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4107. }
  4108. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4109. return target;
  4110. }
  4111. size_t SimpleSFixedInt64Message::ByteSizeLong() const {
  4112. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4113. size_t total_size = 0;
  4114. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4115. total_size +=
  4116. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4117. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4118. }
  4119. // sfixed64 testFieldFixedInt64 = 1;
  4120. if (this->testfieldfixedint64() != 0) {
  4121. total_size += 1 + 8;
  4122. }
  4123. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4124. SetCachedSize(cached_size);
  4125. return total_size;
  4126. }
  4127. void SimpleSFixedInt64Message::MergeFrom(const ::google::protobuf::Message& from) {
  4128. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4129. GOOGLE_DCHECK_NE(&from, this);
  4130. const SimpleSFixedInt64Message* source =
  4131. ::google::protobuf::internal::DynamicCastToGenerated<const SimpleSFixedInt64Message>(
  4132. &from);
  4133. if (source == NULL) {
  4134. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4135. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4136. } else {
  4137. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4138. MergeFrom(*source);
  4139. }
  4140. }
  4141. void SimpleSFixedInt64Message::MergeFrom(const SimpleSFixedInt64Message& from) {
  4142. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4143. GOOGLE_DCHECK_NE(&from, this);
  4144. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4145. ::google::protobuf::uint32 cached_has_bits = 0;
  4146. (void) cached_has_bits;
  4147. if (from.testfieldfixedint64() != 0) {
  4148. set_testfieldfixedint64(from.testfieldfixedint64());
  4149. }
  4150. }
  4151. void SimpleSFixedInt64Message::CopyFrom(const ::google::protobuf::Message& from) {
  4152. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4153. if (&from == this) return;
  4154. Clear();
  4155. MergeFrom(from);
  4156. }
  4157. void SimpleSFixedInt64Message::CopyFrom(const SimpleSFixedInt64Message& from) {
  4158. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.SimpleSFixedInt64Message)
  4159. if (&from == this) return;
  4160. Clear();
  4161. MergeFrom(from);
  4162. }
  4163. bool SimpleSFixedInt64Message::IsInitialized() const {
  4164. return true;
  4165. }
  4166. void SimpleSFixedInt64Message::Swap(SimpleSFixedInt64Message* other) {
  4167. if (other == this) return;
  4168. InternalSwap(other);
  4169. }
  4170. void SimpleSFixedInt64Message::InternalSwap(SimpleSFixedInt64Message* other) {
  4171. using std::swap;
  4172. swap(testfieldfixedint64_, other->testfieldfixedint64_);
  4173. _internal_metadata_.Swap(&other->_internal_metadata_);
  4174. }
  4175. ::google::protobuf::Metadata SimpleSFixedInt64Message::GetMetadata() const {
  4176. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  4177. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  4178. }
  4179. // ===================================================================
  4180. void ComplexMessage::InitAsDefaultInstance() {
  4181. ::qtprotobufnamespace::tests::_ComplexMessage_default_instance_._instance.get_mutable()->testcomplexfield_ = const_cast< ::qtprotobufnamespace::tests::SimpleStringMessage*>(
  4182. ::qtprotobufnamespace::tests::SimpleStringMessage::internal_default_instance());
  4183. }
  4184. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4185. const int ComplexMessage::kTestFieldIntFieldNumber;
  4186. const int ComplexMessage::kTestComplexFieldFieldNumber;
  4187. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4188. ComplexMessage::ComplexMessage()
  4189. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4190. ::google::protobuf::internal::InitSCC(
  4191. &protobuf_simpletest_2eproto::scc_info_ComplexMessage.base);
  4192. SharedCtor();
  4193. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.ComplexMessage)
  4194. }
  4195. ComplexMessage::ComplexMessage(const ComplexMessage& from)
  4196. : ::google::protobuf::Message(),
  4197. _internal_metadata_(NULL) {
  4198. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4199. if (from.has_testcomplexfield()) {
  4200. testcomplexfield_ = new ::qtprotobufnamespace::tests::SimpleStringMessage(*from.testcomplexfield_);
  4201. } else {
  4202. testcomplexfield_ = NULL;
  4203. }
  4204. testfieldint_ = from.testfieldint_;
  4205. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.ComplexMessage)
  4206. }
  4207. void ComplexMessage::SharedCtor() {
  4208. ::memset(&testcomplexfield_, 0, static_cast<size_t>(
  4209. reinterpret_cast<char*>(&testfieldint_) -
  4210. reinterpret_cast<char*>(&testcomplexfield_)) + sizeof(testfieldint_));
  4211. }
  4212. ComplexMessage::~ComplexMessage() {
  4213. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.ComplexMessage)
  4214. SharedDtor();
  4215. }
  4216. void ComplexMessage::SharedDtor() {
  4217. if (this != internal_default_instance()) delete testcomplexfield_;
  4218. }
  4219. void ComplexMessage::SetCachedSize(int size) const {
  4220. _cached_size_.Set(size);
  4221. }
  4222. const ::google::protobuf::Descriptor* ComplexMessage::descriptor() {
  4223. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  4224. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4225. }
  4226. const ComplexMessage& ComplexMessage::default_instance() {
  4227. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_ComplexMessage.base);
  4228. return *internal_default_instance();
  4229. }
  4230. void ComplexMessage::Clear() {
  4231. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.ComplexMessage)
  4232. ::google::protobuf::uint32 cached_has_bits = 0;
  4233. // Prevent compiler warnings about cached_has_bits being unused
  4234. (void) cached_has_bits;
  4235. if (GetArenaNoVirtual() == NULL && testcomplexfield_ != NULL) {
  4236. delete testcomplexfield_;
  4237. }
  4238. testcomplexfield_ = NULL;
  4239. testfieldint_ = 0;
  4240. _internal_metadata_.Clear();
  4241. }
  4242. bool ComplexMessage::MergePartialFromCodedStream(
  4243. ::google::protobuf::io::CodedInputStream* input) {
  4244. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4245. ::google::protobuf::uint32 tag;
  4246. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.ComplexMessage)
  4247. for (;;) {
  4248. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4249. tag = p.first;
  4250. if (!p.second) goto handle_unusual;
  4251. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4252. // int32 testFieldInt = 1;
  4253. case 1: {
  4254. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4255. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  4256. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  4257. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  4258. input, &testfieldint_)));
  4259. } else {
  4260. goto handle_unusual;
  4261. }
  4262. break;
  4263. }
  4264. // .qtprotobufnamespace.tests.SimpleStringMessage testComplexField = 2;
  4265. case 2: {
  4266. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4267. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  4268. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4269. input, mutable_testcomplexfield()));
  4270. } else {
  4271. goto handle_unusual;
  4272. }
  4273. break;
  4274. }
  4275. default: {
  4276. handle_unusual:
  4277. if (tag == 0) {
  4278. goto success;
  4279. }
  4280. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4281. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4282. break;
  4283. }
  4284. }
  4285. }
  4286. success:
  4287. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.ComplexMessage)
  4288. return true;
  4289. failure:
  4290. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.ComplexMessage)
  4291. return false;
  4292. #undef DO_
  4293. }
  4294. void ComplexMessage::SerializeWithCachedSizes(
  4295. ::google::protobuf::io::CodedOutputStream* output) const {
  4296. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.ComplexMessage)
  4297. ::google::protobuf::uint32 cached_has_bits = 0;
  4298. (void) cached_has_bits;
  4299. // int32 testFieldInt = 1;
  4300. if (this->testfieldint() != 0) {
  4301. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->testfieldint(), output);
  4302. }
  4303. // .qtprotobufnamespace.tests.SimpleStringMessage testComplexField = 2;
  4304. if (this->has_testcomplexfield()) {
  4305. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4306. 2, this->_internal_testcomplexfield(), output);
  4307. }
  4308. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4309. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4310. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4311. }
  4312. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.ComplexMessage)
  4313. }
  4314. ::google::protobuf::uint8* ComplexMessage::InternalSerializeWithCachedSizesToArray(
  4315. bool deterministic, ::google::protobuf::uint8* target) const {
  4316. (void)deterministic; // Unused
  4317. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.ComplexMessage)
  4318. ::google::protobuf::uint32 cached_has_bits = 0;
  4319. (void) cached_has_bits;
  4320. // int32 testFieldInt = 1;
  4321. if (this->testfieldint() != 0) {
  4322. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->testfieldint(), target);
  4323. }
  4324. // .qtprotobufnamespace.tests.SimpleStringMessage testComplexField = 2;
  4325. if (this->has_testcomplexfield()) {
  4326. target = ::google::protobuf::internal::WireFormatLite::
  4327. InternalWriteMessageToArray(
  4328. 2, this->_internal_testcomplexfield(), deterministic, target);
  4329. }
  4330. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4331. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4332. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4333. }
  4334. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.ComplexMessage)
  4335. return target;
  4336. }
  4337. size_t ComplexMessage::ByteSizeLong() const {
  4338. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.ComplexMessage)
  4339. size_t total_size = 0;
  4340. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4341. total_size +=
  4342. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4343. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4344. }
  4345. // .qtprotobufnamespace.tests.SimpleStringMessage testComplexField = 2;
  4346. if (this->has_testcomplexfield()) {
  4347. total_size += 1 +
  4348. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4349. *testcomplexfield_);
  4350. }
  4351. // int32 testFieldInt = 1;
  4352. if (this->testfieldint() != 0) {
  4353. total_size += 1 +
  4354. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4355. this->testfieldint());
  4356. }
  4357. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4358. SetCachedSize(cached_size);
  4359. return total_size;
  4360. }
  4361. void ComplexMessage::MergeFrom(const ::google::protobuf::Message& from) {
  4362. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.ComplexMessage)
  4363. GOOGLE_DCHECK_NE(&from, this);
  4364. const ComplexMessage* source =
  4365. ::google::protobuf::internal::DynamicCastToGenerated<const ComplexMessage>(
  4366. &from);
  4367. if (source == NULL) {
  4368. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.ComplexMessage)
  4369. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4370. } else {
  4371. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.ComplexMessage)
  4372. MergeFrom(*source);
  4373. }
  4374. }
  4375. void ComplexMessage::MergeFrom(const ComplexMessage& from) {
  4376. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.ComplexMessage)
  4377. GOOGLE_DCHECK_NE(&from, this);
  4378. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4379. ::google::protobuf::uint32 cached_has_bits = 0;
  4380. (void) cached_has_bits;
  4381. if (from.has_testcomplexfield()) {
  4382. mutable_testcomplexfield()->::qtprotobufnamespace::tests::SimpleStringMessage::MergeFrom(from.testcomplexfield());
  4383. }
  4384. if (from.testfieldint() != 0) {
  4385. set_testfieldint(from.testfieldint());
  4386. }
  4387. }
  4388. void ComplexMessage::CopyFrom(const ::google::protobuf::Message& from) {
  4389. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.ComplexMessage)
  4390. if (&from == this) return;
  4391. Clear();
  4392. MergeFrom(from);
  4393. }
  4394. void ComplexMessage::CopyFrom(const ComplexMessage& from) {
  4395. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.ComplexMessage)
  4396. if (&from == this) return;
  4397. Clear();
  4398. MergeFrom(from);
  4399. }
  4400. bool ComplexMessage::IsInitialized() const {
  4401. return true;
  4402. }
  4403. void ComplexMessage::Swap(ComplexMessage* other) {
  4404. if (other == this) return;
  4405. InternalSwap(other);
  4406. }
  4407. void ComplexMessage::InternalSwap(ComplexMessage* other) {
  4408. using std::swap;
  4409. swap(testcomplexfield_, other->testcomplexfield_);
  4410. swap(testfieldint_, other->testfieldint_);
  4411. _internal_metadata_.Swap(&other->_internal_metadata_);
  4412. }
  4413. ::google::protobuf::Metadata ComplexMessage::GetMetadata() const {
  4414. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  4415. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  4416. }
  4417. // ===================================================================
  4418. void RepeatedIntMessage::InitAsDefaultInstance() {
  4419. }
  4420. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4421. const int RepeatedIntMessage::kTestRepeatedIntFieldNumber;
  4422. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4423. RepeatedIntMessage::RepeatedIntMessage()
  4424. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4425. ::google::protobuf::internal::InitSCC(
  4426. &protobuf_simpletest_2eproto::scc_info_RepeatedIntMessage.base);
  4427. SharedCtor();
  4428. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.RepeatedIntMessage)
  4429. }
  4430. RepeatedIntMessage::RepeatedIntMessage(const RepeatedIntMessage& from)
  4431. : ::google::protobuf::Message(),
  4432. _internal_metadata_(NULL),
  4433. testrepeatedint_(from.testrepeatedint_) {
  4434. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4435. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.RepeatedIntMessage)
  4436. }
  4437. void RepeatedIntMessage::SharedCtor() {
  4438. }
  4439. RepeatedIntMessage::~RepeatedIntMessage() {
  4440. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.RepeatedIntMessage)
  4441. SharedDtor();
  4442. }
  4443. void RepeatedIntMessage::SharedDtor() {
  4444. }
  4445. void RepeatedIntMessage::SetCachedSize(int size) const {
  4446. _cached_size_.Set(size);
  4447. }
  4448. const ::google::protobuf::Descriptor* RepeatedIntMessage::descriptor() {
  4449. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  4450. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4451. }
  4452. const RepeatedIntMessage& RepeatedIntMessage::default_instance() {
  4453. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_RepeatedIntMessage.base);
  4454. return *internal_default_instance();
  4455. }
  4456. void RepeatedIntMessage::Clear() {
  4457. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.RepeatedIntMessage)
  4458. ::google::protobuf::uint32 cached_has_bits = 0;
  4459. // Prevent compiler warnings about cached_has_bits being unused
  4460. (void) cached_has_bits;
  4461. testrepeatedint_.Clear();
  4462. _internal_metadata_.Clear();
  4463. }
  4464. bool RepeatedIntMessage::MergePartialFromCodedStream(
  4465. ::google::protobuf::io::CodedInputStream* input) {
  4466. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4467. ::google::protobuf::uint32 tag;
  4468. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.RepeatedIntMessage)
  4469. for (;;) {
  4470. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4471. tag = p.first;
  4472. if (!p.second) goto handle_unusual;
  4473. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4474. // repeated sint32 testRepeatedInt = 1;
  4475. case 1: {
  4476. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4477. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4478. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4479. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  4480. input, this->mutable_testrepeatedint())));
  4481. } else if (
  4482. static_cast< ::google::protobuf::uint8>(tag) ==
  4483. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  4484. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4485. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  4486. 1, 10u, input, this->mutable_testrepeatedint())));
  4487. } else {
  4488. goto handle_unusual;
  4489. }
  4490. break;
  4491. }
  4492. default: {
  4493. handle_unusual:
  4494. if (tag == 0) {
  4495. goto success;
  4496. }
  4497. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4498. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4499. break;
  4500. }
  4501. }
  4502. }
  4503. success:
  4504. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.RepeatedIntMessage)
  4505. return true;
  4506. failure:
  4507. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.RepeatedIntMessage)
  4508. return false;
  4509. #undef DO_
  4510. }
  4511. void RepeatedIntMessage::SerializeWithCachedSizes(
  4512. ::google::protobuf::io::CodedOutputStream* output) const {
  4513. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.RepeatedIntMessage)
  4514. ::google::protobuf::uint32 cached_has_bits = 0;
  4515. (void) cached_has_bits;
  4516. // repeated sint32 testRepeatedInt = 1;
  4517. if (this->testrepeatedint_size() > 0) {
  4518. ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4519. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4520. _testrepeatedint_cached_byte_size_));
  4521. }
  4522. for (int i = 0, n = this->testrepeatedint_size(); i < n; i++) {
  4523. ::google::protobuf::internal::WireFormatLite::WriteSInt32NoTag(
  4524. this->testrepeatedint(i), output);
  4525. }
  4526. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4527. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4528. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4529. }
  4530. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.RepeatedIntMessage)
  4531. }
  4532. ::google::protobuf::uint8* RepeatedIntMessage::InternalSerializeWithCachedSizesToArray(
  4533. bool deterministic, ::google::protobuf::uint8* target) const {
  4534. (void)deterministic; // Unused
  4535. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.RepeatedIntMessage)
  4536. ::google::protobuf::uint32 cached_has_bits = 0;
  4537. (void) cached_has_bits;
  4538. // repeated sint32 testRepeatedInt = 1;
  4539. if (this->testrepeatedint_size() > 0) {
  4540. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  4541. 1,
  4542. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  4543. target);
  4544. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  4545. static_cast< ::google::protobuf::int32>(
  4546. _testrepeatedint_cached_byte_size_), target);
  4547. target = ::google::protobuf::internal::WireFormatLite::
  4548. WriteSInt32NoTagToArray(this->testrepeatedint_, target);
  4549. }
  4550. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4551. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4552. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4553. }
  4554. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.RepeatedIntMessage)
  4555. return target;
  4556. }
  4557. size_t RepeatedIntMessage::ByteSizeLong() const {
  4558. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.RepeatedIntMessage)
  4559. size_t total_size = 0;
  4560. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4561. total_size +=
  4562. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4563. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4564. }
  4565. // repeated sint32 testRepeatedInt = 1;
  4566. {
  4567. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  4568. SInt32Size(this->testrepeatedint_);
  4569. if (data_size > 0) {
  4570. total_size += 1 +
  4571. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4572. static_cast< ::google::protobuf::int32>(data_size));
  4573. }
  4574. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4575. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4576. _testrepeatedint_cached_byte_size_ = cached_size;
  4577. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4578. total_size += data_size;
  4579. }
  4580. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4581. SetCachedSize(cached_size);
  4582. return total_size;
  4583. }
  4584. void RepeatedIntMessage::MergeFrom(const ::google::protobuf::Message& from) {
  4585. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.RepeatedIntMessage)
  4586. GOOGLE_DCHECK_NE(&from, this);
  4587. const RepeatedIntMessage* source =
  4588. ::google::protobuf::internal::DynamicCastToGenerated<const RepeatedIntMessage>(
  4589. &from);
  4590. if (source == NULL) {
  4591. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.RepeatedIntMessage)
  4592. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4593. } else {
  4594. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.RepeatedIntMessage)
  4595. MergeFrom(*source);
  4596. }
  4597. }
  4598. void RepeatedIntMessage::MergeFrom(const RepeatedIntMessage& from) {
  4599. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.RepeatedIntMessage)
  4600. GOOGLE_DCHECK_NE(&from, this);
  4601. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4602. ::google::protobuf::uint32 cached_has_bits = 0;
  4603. (void) cached_has_bits;
  4604. testrepeatedint_.MergeFrom(from.testrepeatedint_);
  4605. }
  4606. void RepeatedIntMessage::CopyFrom(const ::google::protobuf::Message& from) {
  4607. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.RepeatedIntMessage)
  4608. if (&from == this) return;
  4609. Clear();
  4610. MergeFrom(from);
  4611. }
  4612. void RepeatedIntMessage::CopyFrom(const RepeatedIntMessage& from) {
  4613. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.RepeatedIntMessage)
  4614. if (&from == this) return;
  4615. Clear();
  4616. MergeFrom(from);
  4617. }
  4618. bool RepeatedIntMessage::IsInitialized() const {
  4619. return true;
  4620. }
  4621. void RepeatedIntMessage::Swap(RepeatedIntMessage* other) {
  4622. if (other == this) return;
  4623. InternalSwap(other);
  4624. }
  4625. void RepeatedIntMessage::InternalSwap(RepeatedIntMessage* other) {
  4626. using std::swap;
  4627. testrepeatedint_.InternalSwap(&other->testrepeatedint_);
  4628. _internal_metadata_.Swap(&other->_internal_metadata_);
  4629. }
  4630. ::google::protobuf::Metadata RepeatedIntMessage::GetMetadata() const {
  4631. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  4632. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  4633. }
  4634. // ===================================================================
  4635. void RepeatedStringMessage::InitAsDefaultInstance() {
  4636. }
  4637. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4638. const int RepeatedStringMessage::kTestRepeatedStringFieldNumber;
  4639. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4640. RepeatedStringMessage::RepeatedStringMessage()
  4641. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4642. ::google::protobuf::internal::InitSCC(
  4643. &protobuf_simpletest_2eproto::scc_info_RepeatedStringMessage.base);
  4644. SharedCtor();
  4645. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.RepeatedStringMessage)
  4646. }
  4647. RepeatedStringMessage::RepeatedStringMessage(const RepeatedStringMessage& from)
  4648. : ::google::protobuf::Message(),
  4649. _internal_metadata_(NULL),
  4650. testrepeatedstring_(from.testrepeatedstring_) {
  4651. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4652. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.RepeatedStringMessage)
  4653. }
  4654. void RepeatedStringMessage::SharedCtor() {
  4655. }
  4656. RepeatedStringMessage::~RepeatedStringMessage() {
  4657. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.RepeatedStringMessage)
  4658. SharedDtor();
  4659. }
  4660. void RepeatedStringMessage::SharedDtor() {
  4661. }
  4662. void RepeatedStringMessage::SetCachedSize(int size) const {
  4663. _cached_size_.Set(size);
  4664. }
  4665. const ::google::protobuf::Descriptor* RepeatedStringMessage::descriptor() {
  4666. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  4667. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4668. }
  4669. const RepeatedStringMessage& RepeatedStringMessage::default_instance() {
  4670. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_RepeatedStringMessage.base);
  4671. return *internal_default_instance();
  4672. }
  4673. void RepeatedStringMessage::Clear() {
  4674. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.RepeatedStringMessage)
  4675. ::google::protobuf::uint32 cached_has_bits = 0;
  4676. // Prevent compiler warnings about cached_has_bits being unused
  4677. (void) cached_has_bits;
  4678. testrepeatedstring_.Clear();
  4679. _internal_metadata_.Clear();
  4680. }
  4681. bool RepeatedStringMessage::MergePartialFromCodedStream(
  4682. ::google::protobuf::io::CodedInputStream* input) {
  4683. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4684. ::google::protobuf::uint32 tag;
  4685. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.RepeatedStringMessage)
  4686. for (;;) {
  4687. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4688. tag = p.first;
  4689. if (!p.second) goto handle_unusual;
  4690. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4691. // repeated string testRepeatedString = 1;
  4692. case 1: {
  4693. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4694. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4695. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  4696. input, this->add_testrepeatedstring()));
  4697. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4698. this->testrepeatedstring(this->testrepeatedstring_size() - 1).data(),
  4699. static_cast<int>(this->testrepeatedstring(this->testrepeatedstring_size() - 1).length()),
  4700. ::google::protobuf::internal::WireFormatLite::PARSE,
  4701. "qtprotobufnamespace.tests.RepeatedStringMessage.testRepeatedString"));
  4702. } else {
  4703. goto handle_unusual;
  4704. }
  4705. break;
  4706. }
  4707. default: {
  4708. handle_unusual:
  4709. if (tag == 0) {
  4710. goto success;
  4711. }
  4712. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4713. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4714. break;
  4715. }
  4716. }
  4717. }
  4718. success:
  4719. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.RepeatedStringMessage)
  4720. return true;
  4721. failure:
  4722. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.RepeatedStringMessage)
  4723. return false;
  4724. #undef DO_
  4725. }
  4726. void RepeatedStringMessage::SerializeWithCachedSizes(
  4727. ::google::protobuf::io::CodedOutputStream* output) const {
  4728. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.RepeatedStringMessage)
  4729. ::google::protobuf::uint32 cached_has_bits = 0;
  4730. (void) cached_has_bits;
  4731. // repeated string testRepeatedString = 1;
  4732. for (int i = 0, n = this->testrepeatedstring_size(); i < n; i++) {
  4733. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4734. this->testrepeatedstring(i).data(), static_cast<int>(this->testrepeatedstring(i).length()),
  4735. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4736. "qtprotobufnamespace.tests.RepeatedStringMessage.testRepeatedString");
  4737. ::google::protobuf::internal::WireFormatLite::WriteString(
  4738. 1, this->testrepeatedstring(i), output);
  4739. }
  4740. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4741. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4742. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4743. }
  4744. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.RepeatedStringMessage)
  4745. }
  4746. ::google::protobuf::uint8* RepeatedStringMessage::InternalSerializeWithCachedSizesToArray(
  4747. bool deterministic, ::google::protobuf::uint8* target) const {
  4748. (void)deterministic; // Unused
  4749. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.RepeatedStringMessage)
  4750. ::google::protobuf::uint32 cached_has_bits = 0;
  4751. (void) cached_has_bits;
  4752. // repeated string testRepeatedString = 1;
  4753. for (int i = 0, n = this->testrepeatedstring_size(); i < n; i++) {
  4754. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4755. this->testrepeatedstring(i).data(), static_cast<int>(this->testrepeatedstring(i).length()),
  4756. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4757. "qtprotobufnamespace.tests.RepeatedStringMessage.testRepeatedString");
  4758. target = ::google::protobuf::internal::WireFormatLite::
  4759. WriteStringToArray(1, this->testrepeatedstring(i), target);
  4760. }
  4761. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4762. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4763. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4764. }
  4765. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.RepeatedStringMessage)
  4766. return target;
  4767. }
  4768. size_t RepeatedStringMessage::ByteSizeLong() const {
  4769. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.RepeatedStringMessage)
  4770. size_t total_size = 0;
  4771. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4772. total_size +=
  4773. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4774. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4775. }
  4776. // repeated string testRepeatedString = 1;
  4777. total_size += 1 *
  4778. ::google::protobuf::internal::FromIntSize(this->testrepeatedstring_size());
  4779. for (int i = 0, n = this->testrepeatedstring_size(); i < n; i++) {
  4780. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  4781. this->testrepeatedstring(i));
  4782. }
  4783. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4784. SetCachedSize(cached_size);
  4785. return total_size;
  4786. }
  4787. void RepeatedStringMessage::MergeFrom(const ::google::protobuf::Message& from) {
  4788. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.RepeatedStringMessage)
  4789. GOOGLE_DCHECK_NE(&from, this);
  4790. const RepeatedStringMessage* source =
  4791. ::google::protobuf::internal::DynamicCastToGenerated<const RepeatedStringMessage>(
  4792. &from);
  4793. if (source == NULL) {
  4794. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.RepeatedStringMessage)
  4795. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4796. } else {
  4797. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.RepeatedStringMessage)
  4798. MergeFrom(*source);
  4799. }
  4800. }
  4801. void RepeatedStringMessage::MergeFrom(const RepeatedStringMessage& from) {
  4802. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.RepeatedStringMessage)
  4803. GOOGLE_DCHECK_NE(&from, this);
  4804. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4805. ::google::protobuf::uint32 cached_has_bits = 0;
  4806. (void) cached_has_bits;
  4807. testrepeatedstring_.MergeFrom(from.testrepeatedstring_);
  4808. }
  4809. void RepeatedStringMessage::CopyFrom(const ::google::protobuf::Message& from) {
  4810. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.RepeatedStringMessage)
  4811. if (&from == this) return;
  4812. Clear();
  4813. MergeFrom(from);
  4814. }
  4815. void RepeatedStringMessage::CopyFrom(const RepeatedStringMessage& from) {
  4816. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.RepeatedStringMessage)
  4817. if (&from == this) return;
  4818. Clear();
  4819. MergeFrom(from);
  4820. }
  4821. bool RepeatedStringMessage::IsInitialized() const {
  4822. return true;
  4823. }
  4824. void RepeatedStringMessage::Swap(RepeatedStringMessage* other) {
  4825. if (other == this) return;
  4826. InternalSwap(other);
  4827. }
  4828. void RepeatedStringMessage::InternalSwap(RepeatedStringMessage* other) {
  4829. using std::swap;
  4830. testrepeatedstring_.InternalSwap(CastToBase(&other->testrepeatedstring_));
  4831. _internal_metadata_.Swap(&other->_internal_metadata_);
  4832. }
  4833. ::google::protobuf::Metadata RepeatedStringMessage::GetMetadata() const {
  4834. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  4835. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  4836. }
  4837. // ===================================================================
  4838. void RepeatedDoubleMessage::InitAsDefaultInstance() {
  4839. }
  4840. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4841. const int RepeatedDoubleMessage::kTestRepeatedDoubleFieldNumber;
  4842. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4843. RepeatedDoubleMessage::RepeatedDoubleMessage()
  4844. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4845. ::google::protobuf::internal::InitSCC(
  4846. &protobuf_simpletest_2eproto::scc_info_RepeatedDoubleMessage.base);
  4847. SharedCtor();
  4848. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  4849. }
  4850. RepeatedDoubleMessage::RepeatedDoubleMessage(const RepeatedDoubleMessage& from)
  4851. : ::google::protobuf::Message(),
  4852. _internal_metadata_(NULL),
  4853. testrepeateddouble_(from.testrepeateddouble_) {
  4854. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4855. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  4856. }
  4857. void RepeatedDoubleMessage::SharedCtor() {
  4858. }
  4859. RepeatedDoubleMessage::~RepeatedDoubleMessage() {
  4860. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  4861. SharedDtor();
  4862. }
  4863. void RepeatedDoubleMessage::SharedDtor() {
  4864. }
  4865. void RepeatedDoubleMessage::SetCachedSize(int size) const {
  4866. _cached_size_.Set(size);
  4867. }
  4868. const ::google::protobuf::Descriptor* RepeatedDoubleMessage::descriptor() {
  4869. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  4870. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4871. }
  4872. const RepeatedDoubleMessage& RepeatedDoubleMessage::default_instance() {
  4873. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_RepeatedDoubleMessage.base);
  4874. return *internal_default_instance();
  4875. }
  4876. void RepeatedDoubleMessage::Clear() {
  4877. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  4878. ::google::protobuf::uint32 cached_has_bits = 0;
  4879. // Prevent compiler warnings about cached_has_bits being unused
  4880. (void) cached_has_bits;
  4881. testrepeateddouble_.Clear();
  4882. _internal_metadata_.Clear();
  4883. }
  4884. bool RepeatedDoubleMessage::MergePartialFromCodedStream(
  4885. ::google::protobuf::io::CodedInputStream* input) {
  4886. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4887. ::google::protobuf::uint32 tag;
  4888. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  4889. for (;;) {
  4890. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4891. tag = p.first;
  4892. if (!p.second) goto handle_unusual;
  4893. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4894. // repeated double testRepeatedDouble = 1;
  4895. case 1: {
  4896. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4897. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4898. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4899. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  4900. input, this->mutable_testrepeateddouble())));
  4901. } else if (
  4902. static_cast< ::google::protobuf::uint8>(tag) ==
  4903. static_cast< ::google::protobuf::uint8>(9u /* 9 & 0xFF */)) {
  4904. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4905. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  4906. 1, 10u, input, this->mutable_testrepeateddouble())));
  4907. } else {
  4908. goto handle_unusual;
  4909. }
  4910. break;
  4911. }
  4912. default: {
  4913. handle_unusual:
  4914. if (tag == 0) {
  4915. goto success;
  4916. }
  4917. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4918. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4919. break;
  4920. }
  4921. }
  4922. }
  4923. success:
  4924. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  4925. return true;
  4926. failure:
  4927. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  4928. return false;
  4929. #undef DO_
  4930. }
  4931. void RepeatedDoubleMessage::SerializeWithCachedSizes(
  4932. ::google::protobuf::io::CodedOutputStream* output) const {
  4933. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  4934. ::google::protobuf::uint32 cached_has_bits = 0;
  4935. (void) cached_has_bits;
  4936. // repeated double testRepeatedDouble = 1;
  4937. if (this->testrepeateddouble_size() > 0) {
  4938. ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4939. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4940. _testrepeateddouble_cached_byte_size_));
  4941. ::google::protobuf::internal::WireFormatLite::WriteDoubleArray(
  4942. this->testrepeateddouble().data(), this->testrepeateddouble_size(), output);
  4943. }
  4944. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4945. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4946. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4947. }
  4948. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  4949. }
  4950. ::google::protobuf::uint8* RepeatedDoubleMessage::InternalSerializeWithCachedSizesToArray(
  4951. bool deterministic, ::google::protobuf::uint8* target) const {
  4952. (void)deterministic; // Unused
  4953. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  4954. ::google::protobuf::uint32 cached_has_bits = 0;
  4955. (void) cached_has_bits;
  4956. // repeated double testRepeatedDouble = 1;
  4957. if (this->testrepeateddouble_size() > 0) {
  4958. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  4959. 1,
  4960. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  4961. target);
  4962. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  4963. static_cast< ::google::protobuf::int32>(
  4964. _testrepeateddouble_cached_byte_size_), target);
  4965. target = ::google::protobuf::internal::WireFormatLite::
  4966. WriteDoubleNoTagToArray(this->testrepeateddouble_, target);
  4967. }
  4968. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4969. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4970. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4971. }
  4972. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  4973. return target;
  4974. }
  4975. size_t RepeatedDoubleMessage::ByteSizeLong() const {
  4976. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  4977. size_t total_size = 0;
  4978. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4979. total_size +=
  4980. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4981. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4982. }
  4983. // repeated double testRepeatedDouble = 1;
  4984. {
  4985. unsigned int count = static_cast<unsigned int>(this->testrepeateddouble_size());
  4986. size_t data_size = 8UL * count;
  4987. if (data_size > 0) {
  4988. total_size += 1 +
  4989. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4990. static_cast< ::google::protobuf::int32>(data_size));
  4991. }
  4992. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4993. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4994. _testrepeateddouble_cached_byte_size_ = cached_size;
  4995. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4996. total_size += data_size;
  4997. }
  4998. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4999. SetCachedSize(cached_size);
  5000. return total_size;
  5001. }
  5002. void RepeatedDoubleMessage::MergeFrom(const ::google::protobuf::Message& from) {
  5003. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  5004. GOOGLE_DCHECK_NE(&from, this);
  5005. const RepeatedDoubleMessage* source =
  5006. ::google::protobuf::internal::DynamicCastToGenerated<const RepeatedDoubleMessage>(
  5007. &from);
  5008. if (source == NULL) {
  5009. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  5010. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5011. } else {
  5012. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  5013. MergeFrom(*source);
  5014. }
  5015. }
  5016. void RepeatedDoubleMessage::MergeFrom(const RepeatedDoubleMessage& from) {
  5017. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  5018. GOOGLE_DCHECK_NE(&from, this);
  5019. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5020. ::google::protobuf::uint32 cached_has_bits = 0;
  5021. (void) cached_has_bits;
  5022. testrepeateddouble_.MergeFrom(from.testrepeateddouble_);
  5023. }
  5024. void RepeatedDoubleMessage::CopyFrom(const ::google::protobuf::Message& from) {
  5025. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  5026. if (&from == this) return;
  5027. Clear();
  5028. MergeFrom(from);
  5029. }
  5030. void RepeatedDoubleMessage::CopyFrom(const RepeatedDoubleMessage& from) {
  5031. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.RepeatedDoubleMessage)
  5032. if (&from == this) return;
  5033. Clear();
  5034. MergeFrom(from);
  5035. }
  5036. bool RepeatedDoubleMessage::IsInitialized() const {
  5037. return true;
  5038. }
  5039. void RepeatedDoubleMessage::Swap(RepeatedDoubleMessage* other) {
  5040. if (other == this) return;
  5041. InternalSwap(other);
  5042. }
  5043. void RepeatedDoubleMessage::InternalSwap(RepeatedDoubleMessage* other) {
  5044. using std::swap;
  5045. testrepeateddouble_.InternalSwap(&other->testrepeateddouble_);
  5046. _internal_metadata_.Swap(&other->_internal_metadata_);
  5047. }
  5048. ::google::protobuf::Metadata RepeatedDoubleMessage::GetMetadata() const {
  5049. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  5050. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  5051. }
  5052. // ===================================================================
  5053. void RepeatedBytesMessage::InitAsDefaultInstance() {
  5054. }
  5055. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5056. const int RepeatedBytesMessage::kTestRepeatedBytesFieldNumber;
  5057. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5058. RepeatedBytesMessage::RepeatedBytesMessage()
  5059. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  5060. ::google::protobuf::internal::InitSCC(
  5061. &protobuf_simpletest_2eproto::scc_info_RepeatedBytesMessage.base);
  5062. SharedCtor();
  5063. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5064. }
  5065. RepeatedBytesMessage::RepeatedBytesMessage(const RepeatedBytesMessage& from)
  5066. : ::google::protobuf::Message(),
  5067. _internal_metadata_(NULL),
  5068. testrepeatedbytes_(from.testrepeatedbytes_) {
  5069. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5070. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5071. }
  5072. void RepeatedBytesMessage::SharedCtor() {
  5073. }
  5074. RepeatedBytesMessage::~RepeatedBytesMessage() {
  5075. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5076. SharedDtor();
  5077. }
  5078. void RepeatedBytesMessage::SharedDtor() {
  5079. }
  5080. void RepeatedBytesMessage::SetCachedSize(int size) const {
  5081. _cached_size_.Set(size);
  5082. }
  5083. const ::google::protobuf::Descriptor* RepeatedBytesMessage::descriptor() {
  5084. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  5085. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  5086. }
  5087. const RepeatedBytesMessage& RepeatedBytesMessage::default_instance() {
  5088. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_RepeatedBytesMessage.base);
  5089. return *internal_default_instance();
  5090. }
  5091. void RepeatedBytesMessage::Clear() {
  5092. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5093. ::google::protobuf::uint32 cached_has_bits = 0;
  5094. // Prevent compiler warnings about cached_has_bits being unused
  5095. (void) cached_has_bits;
  5096. testrepeatedbytes_.Clear();
  5097. _internal_metadata_.Clear();
  5098. }
  5099. bool RepeatedBytesMessage::MergePartialFromCodedStream(
  5100. ::google::protobuf::io::CodedInputStream* input) {
  5101. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5102. ::google::protobuf::uint32 tag;
  5103. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5104. for (;;) {
  5105. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5106. tag = p.first;
  5107. if (!p.second) goto handle_unusual;
  5108. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5109. // repeated bytes testRepeatedBytes = 1;
  5110. case 1: {
  5111. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5112. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  5113. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  5114. input, this->add_testrepeatedbytes()));
  5115. } else {
  5116. goto handle_unusual;
  5117. }
  5118. break;
  5119. }
  5120. default: {
  5121. handle_unusual:
  5122. if (tag == 0) {
  5123. goto success;
  5124. }
  5125. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5126. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5127. break;
  5128. }
  5129. }
  5130. }
  5131. success:
  5132. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5133. return true;
  5134. failure:
  5135. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5136. return false;
  5137. #undef DO_
  5138. }
  5139. void RepeatedBytesMessage::SerializeWithCachedSizes(
  5140. ::google::protobuf::io::CodedOutputStream* output) const {
  5141. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5142. ::google::protobuf::uint32 cached_has_bits = 0;
  5143. (void) cached_has_bits;
  5144. // repeated bytes testRepeatedBytes = 1;
  5145. for (int i = 0, n = this->testrepeatedbytes_size(); i < n; i++) {
  5146. ::google::protobuf::internal::WireFormatLite::WriteBytes(
  5147. 1, this->testrepeatedbytes(i), output);
  5148. }
  5149. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5150. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5151. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5152. }
  5153. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5154. }
  5155. ::google::protobuf::uint8* RepeatedBytesMessage::InternalSerializeWithCachedSizesToArray(
  5156. bool deterministic, ::google::protobuf::uint8* target) const {
  5157. (void)deterministic; // Unused
  5158. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5159. ::google::protobuf::uint32 cached_has_bits = 0;
  5160. (void) cached_has_bits;
  5161. // repeated bytes testRepeatedBytes = 1;
  5162. for (int i = 0, n = this->testrepeatedbytes_size(); i < n; i++) {
  5163. target = ::google::protobuf::internal::WireFormatLite::
  5164. WriteBytesToArray(1, this->testrepeatedbytes(i), target);
  5165. }
  5166. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5167. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5168. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5169. }
  5170. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5171. return target;
  5172. }
  5173. size_t RepeatedBytesMessage::ByteSizeLong() const {
  5174. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5175. size_t total_size = 0;
  5176. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5177. total_size +=
  5178. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5179. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5180. }
  5181. // repeated bytes testRepeatedBytes = 1;
  5182. total_size += 1 *
  5183. ::google::protobuf::internal::FromIntSize(this->testrepeatedbytes_size());
  5184. for (int i = 0, n = this->testrepeatedbytes_size(); i < n; i++) {
  5185. total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
  5186. this->testrepeatedbytes(i));
  5187. }
  5188. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5189. SetCachedSize(cached_size);
  5190. return total_size;
  5191. }
  5192. void RepeatedBytesMessage::MergeFrom(const ::google::protobuf::Message& from) {
  5193. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5194. GOOGLE_DCHECK_NE(&from, this);
  5195. const RepeatedBytesMessage* source =
  5196. ::google::protobuf::internal::DynamicCastToGenerated<const RepeatedBytesMessage>(
  5197. &from);
  5198. if (source == NULL) {
  5199. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5200. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5201. } else {
  5202. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5203. MergeFrom(*source);
  5204. }
  5205. }
  5206. void RepeatedBytesMessage::MergeFrom(const RepeatedBytesMessage& from) {
  5207. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5208. GOOGLE_DCHECK_NE(&from, this);
  5209. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5210. ::google::protobuf::uint32 cached_has_bits = 0;
  5211. (void) cached_has_bits;
  5212. testrepeatedbytes_.MergeFrom(from.testrepeatedbytes_);
  5213. }
  5214. void RepeatedBytesMessage::CopyFrom(const ::google::protobuf::Message& from) {
  5215. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5216. if (&from == this) return;
  5217. Clear();
  5218. MergeFrom(from);
  5219. }
  5220. void RepeatedBytesMessage::CopyFrom(const RepeatedBytesMessage& from) {
  5221. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.RepeatedBytesMessage)
  5222. if (&from == this) return;
  5223. Clear();
  5224. MergeFrom(from);
  5225. }
  5226. bool RepeatedBytesMessage::IsInitialized() const {
  5227. return true;
  5228. }
  5229. void RepeatedBytesMessage::Swap(RepeatedBytesMessage* other) {
  5230. if (other == this) return;
  5231. InternalSwap(other);
  5232. }
  5233. void RepeatedBytesMessage::InternalSwap(RepeatedBytesMessage* other) {
  5234. using std::swap;
  5235. testrepeatedbytes_.InternalSwap(CastToBase(&other->testrepeatedbytes_));
  5236. _internal_metadata_.Swap(&other->_internal_metadata_);
  5237. }
  5238. ::google::protobuf::Metadata RepeatedBytesMessage::GetMetadata() const {
  5239. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  5240. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  5241. }
  5242. // ===================================================================
  5243. void RepeatedFloatMessage::InitAsDefaultInstance() {
  5244. }
  5245. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5246. const int RepeatedFloatMessage::kTestRepeatedFloatFieldNumber;
  5247. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5248. RepeatedFloatMessage::RepeatedFloatMessage()
  5249. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  5250. ::google::protobuf::internal::InitSCC(
  5251. &protobuf_simpletest_2eproto::scc_info_RepeatedFloatMessage.base);
  5252. SharedCtor();
  5253. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5254. }
  5255. RepeatedFloatMessage::RepeatedFloatMessage(const RepeatedFloatMessage& from)
  5256. : ::google::protobuf::Message(),
  5257. _internal_metadata_(NULL),
  5258. testrepeatedfloat_(from.testrepeatedfloat_) {
  5259. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5260. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5261. }
  5262. void RepeatedFloatMessage::SharedCtor() {
  5263. }
  5264. RepeatedFloatMessage::~RepeatedFloatMessage() {
  5265. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5266. SharedDtor();
  5267. }
  5268. void RepeatedFloatMessage::SharedDtor() {
  5269. }
  5270. void RepeatedFloatMessage::SetCachedSize(int size) const {
  5271. _cached_size_.Set(size);
  5272. }
  5273. const ::google::protobuf::Descriptor* RepeatedFloatMessage::descriptor() {
  5274. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  5275. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  5276. }
  5277. const RepeatedFloatMessage& RepeatedFloatMessage::default_instance() {
  5278. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_RepeatedFloatMessage.base);
  5279. return *internal_default_instance();
  5280. }
  5281. void RepeatedFloatMessage::Clear() {
  5282. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5283. ::google::protobuf::uint32 cached_has_bits = 0;
  5284. // Prevent compiler warnings about cached_has_bits being unused
  5285. (void) cached_has_bits;
  5286. testrepeatedfloat_.Clear();
  5287. _internal_metadata_.Clear();
  5288. }
  5289. bool RepeatedFloatMessage::MergePartialFromCodedStream(
  5290. ::google::protobuf::io::CodedInputStream* input) {
  5291. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5292. ::google::protobuf::uint32 tag;
  5293. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5294. for (;;) {
  5295. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5296. tag = p.first;
  5297. if (!p.second) goto handle_unusual;
  5298. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5299. // repeated float testRepeatedFloat = 1;
  5300. case 1: {
  5301. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5302. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  5303. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  5304. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  5305. input, this->mutable_testrepeatedfloat())));
  5306. } else if (
  5307. static_cast< ::google::protobuf::uint8>(tag) ==
  5308. static_cast< ::google::protobuf::uint8>(13u /* 13 & 0xFF */)) {
  5309. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  5310. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  5311. 1, 10u, input, this->mutable_testrepeatedfloat())));
  5312. } else {
  5313. goto handle_unusual;
  5314. }
  5315. break;
  5316. }
  5317. default: {
  5318. handle_unusual:
  5319. if (tag == 0) {
  5320. goto success;
  5321. }
  5322. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5323. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5324. break;
  5325. }
  5326. }
  5327. }
  5328. success:
  5329. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5330. return true;
  5331. failure:
  5332. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5333. return false;
  5334. #undef DO_
  5335. }
  5336. void RepeatedFloatMessage::SerializeWithCachedSizes(
  5337. ::google::protobuf::io::CodedOutputStream* output) const {
  5338. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5339. ::google::protobuf::uint32 cached_has_bits = 0;
  5340. (void) cached_has_bits;
  5341. // repeated float testRepeatedFloat = 1;
  5342. if (this->testrepeatedfloat_size() > 0) {
  5343. ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  5344. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  5345. _testrepeatedfloat_cached_byte_size_));
  5346. ::google::protobuf::internal::WireFormatLite::WriteFloatArray(
  5347. this->testrepeatedfloat().data(), this->testrepeatedfloat_size(), output);
  5348. }
  5349. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5350. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5351. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5352. }
  5353. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5354. }
  5355. ::google::protobuf::uint8* RepeatedFloatMessage::InternalSerializeWithCachedSizesToArray(
  5356. bool deterministic, ::google::protobuf::uint8* target) const {
  5357. (void)deterministic; // Unused
  5358. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5359. ::google::protobuf::uint32 cached_has_bits = 0;
  5360. (void) cached_has_bits;
  5361. // repeated float testRepeatedFloat = 1;
  5362. if (this->testrepeatedfloat_size() > 0) {
  5363. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  5364. 1,
  5365. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  5366. target);
  5367. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  5368. static_cast< ::google::protobuf::int32>(
  5369. _testrepeatedfloat_cached_byte_size_), target);
  5370. target = ::google::protobuf::internal::WireFormatLite::
  5371. WriteFloatNoTagToArray(this->testrepeatedfloat_, target);
  5372. }
  5373. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5374. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5375. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5376. }
  5377. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5378. return target;
  5379. }
  5380. size_t RepeatedFloatMessage::ByteSizeLong() const {
  5381. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5382. size_t total_size = 0;
  5383. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5384. total_size +=
  5385. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5386. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5387. }
  5388. // repeated float testRepeatedFloat = 1;
  5389. {
  5390. unsigned int count = static_cast<unsigned int>(this->testrepeatedfloat_size());
  5391. size_t data_size = 4UL * count;
  5392. if (data_size > 0) {
  5393. total_size += 1 +
  5394. ::google::protobuf::internal::WireFormatLite::Int32Size(
  5395. static_cast< ::google::protobuf::int32>(data_size));
  5396. }
  5397. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  5398. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5399. _testrepeatedfloat_cached_byte_size_ = cached_size;
  5400. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5401. total_size += data_size;
  5402. }
  5403. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5404. SetCachedSize(cached_size);
  5405. return total_size;
  5406. }
  5407. void RepeatedFloatMessage::MergeFrom(const ::google::protobuf::Message& from) {
  5408. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5409. GOOGLE_DCHECK_NE(&from, this);
  5410. const RepeatedFloatMessage* source =
  5411. ::google::protobuf::internal::DynamicCastToGenerated<const RepeatedFloatMessage>(
  5412. &from);
  5413. if (source == NULL) {
  5414. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5415. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5416. } else {
  5417. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5418. MergeFrom(*source);
  5419. }
  5420. }
  5421. void RepeatedFloatMessage::MergeFrom(const RepeatedFloatMessage& from) {
  5422. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5423. GOOGLE_DCHECK_NE(&from, this);
  5424. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5425. ::google::protobuf::uint32 cached_has_bits = 0;
  5426. (void) cached_has_bits;
  5427. testrepeatedfloat_.MergeFrom(from.testrepeatedfloat_);
  5428. }
  5429. void RepeatedFloatMessage::CopyFrom(const ::google::protobuf::Message& from) {
  5430. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5431. if (&from == this) return;
  5432. Clear();
  5433. MergeFrom(from);
  5434. }
  5435. void RepeatedFloatMessage::CopyFrom(const RepeatedFloatMessage& from) {
  5436. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.RepeatedFloatMessage)
  5437. if (&from == this) return;
  5438. Clear();
  5439. MergeFrom(from);
  5440. }
  5441. bool RepeatedFloatMessage::IsInitialized() const {
  5442. return true;
  5443. }
  5444. void RepeatedFloatMessage::Swap(RepeatedFloatMessage* other) {
  5445. if (other == this) return;
  5446. InternalSwap(other);
  5447. }
  5448. void RepeatedFloatMessage::InternalSwap(RepeatedFloatMessage* other) {
  5449. using std::swap;
  5450. testrepeatedfloat_.InternalSwap(&other->testrepeatedfloat_);
  5451. _internal_metadata_.Swap(&other->_internal_metadata_);
  5452. }
  5453. ::google::protobuf::Metadata RepeatedFloatMessage::GetMetadata() const {
  5454. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  5455. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  5456. }
  5457. // ===================================================================
  5458. void RepeatedComplexMessage::InitAsDefaultInstance() {
  5459. }
  5460. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5461. const int RepeatedComplexMessage::kTestRepeatedComplexFieldNumber;
  5462. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5463. RepeatedComplexMessage::RepeatedComplexMessage()
  5464. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  5465. ::google::protobuf::internal::InitSCC(
  5466. &protobuf_simpletest_2eproto::scc_info_RepeatedComplexMessage.base);
  5467. SharedCtor();
  5468. // @@protoc_insertion_point(constructor:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5469. }
  5470. RepeatedComplexMessage::RepeatedComplexMessage(const RepeatedComplexMessage& from)
  5471. : ::google::protobuf::Message(),
  5472. _internal_metadata_(NULL),
  5473. testrepeatedcomplex_(from.testrepeatedcomplex_) {
  5474. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5475. // @@protoc_insertion_point(copy_constructor:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5476. }
  5477. void RepeatedComplexMessage::SharedCtor() {
  5478. }
  5479. RepeatedComplexMessage::~RepeatedComplexMessage() {
  5480. // @@protoc_insertion_point(destructor:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5481. SharedDtor();
  5482. }
  5483. void RepeatedComplexMessage::SharedDtor() {
  5484. }
  5485. void RepeatedComplexMessage::SetCachedSize(int size) const {
  5486. _cached_size_.Set(size);
  5487. }
  5488. const ::google::protobuf::Descriptor* RepeatedComplexMessage::descriptor() {
  5489. ::protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  5490. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  5491. }
  5492. const RepeatedComplexMessage& RepeatedComplexMessage::default_instance() {
  5493. ::google::protobuf::internal::InitSCC(&protobuf_simpletest_2eproto::scc_info_RepeatedComplexMessage.base);
  5494. return *internal_default_instance();
  5495. }
  5496. void RepeatedComplexMessage::Clear() {
  5497. // @@protoc_insertion_point(message_clear_start:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5498. ::google::protobuf::uint32 cached_has_bits = 0;
  5499. // Prevent compiler warnings about cached_has_bits being unused
  5500. (void) cached_has_bits;
  5501. testrepeatedcomplex_.Clear();
  5502. _internal_metadata_.Clear();
  5503. }
  5504. bool RepeatedComplexMessage::MergePartialFromCodedStream(
  5505. ::google::protobuf::io::CodedInputStream* input) {
  5506. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5507. ::google::protobuf::uint32 tag;
  5508. // @@protoc_insertion_point(parse_start:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5509. for (;;) {
  5510. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5511. tag = p.first;
  5512. if (!p.second) goto handle_unusual;
  5513. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5514. // repeated .qtprotobufnamespace.tests.ComplexMessage testRepeatedComplex = 1;
  5515. case 1: {
  5516. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5517. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  5518. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5519. input, add_testrepeatedcomplex()));
  5520. } else {
  5521. goto handle_unusual;
  5522. }
  5523. break;
  5524. }
  5525. default: {
  5526. handle_unusual:
  5527. if (tag == 0) {
  5528. goto success;
  5529. }
  5530. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5531. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5532. break;
  5533. }
  5534. }
  5535. }
  5536. success:
  5537. // @@protoc_insertion_point(parse_success:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5538. return true;
  5539. failure:
  5540. // @@protoc_insertion_point(parse_failure:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5541. return false;
  5542. #undef DO_
  5543. }
  5544. void RepeatedComplexMessage::SerializeWithCachedSizes(
  5545. ::google::protobuf::io::CodedOutputStream* output) const {
  5546. // @@protoc_insertion_point(serialize_start:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5547. ::google::protobuf::uint32 cached_has_bits = 0;
  5548. (void) cached_has_bits;
  5549. // repeated .qtprotobufnamespace.tests.ComplexMessage testRepeatedComplex = 1;
  5550. for (unsigned int i = 0,
  5551. n = static_cast<unsigned int>(this->testrepeatedcomplex_size()); i < n; i++) {
  5552. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5553. 1,
  5554. this->testrepeatedcomplex(static_cast<int>(i)),
  5555. output);
  5556. }
  5557. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5558. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5559. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5560. }
  5561. // @@protoc_insertion_point(serialize_end:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5562. }
  5563. ::google::protobuf::uint8* RepeatedComplexMessage::InternalSerializeWithCachedSizesToArray(
  5564. bool deterministic, ::google::protobuf::uint8* target) const {
  5565. (void)deterministic; // Unused
  5566. // @@protoc_insertion_point(serialize_to_array_start:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5567. ::google::protobuf::uint32 cached_has_bits = 0;
  5568. (void) cached_has_bits;
  5569. // repeated .qtprotobufnamespace.tests.ComplexMessage testRepeatedComplex = 1;
  5570. for (unsigned int i = 0,
  5571. n = static_cast<unsigned int>(this->testrepeatedcomplex_size()); i < n; i++) {
  5572. target = ::google::protobuf::internal::WireFormatLite::
  5573. InternalWriteMessageToArray(
  5574. 1, this->testrepeatedcomplex(static_cast<int>(i)), deterministic, target);
  5575. }
  5576. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5577. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5578. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5579. }
  5580. // @@protoc_insertion_point(serialize_to_array_end:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5581. return target;
  5582. }
  5583. size_t RepeatedComplexMessage::ByteSizeLong() const {
  5584. // @@protoc_insertion_point(message_byte_size_start:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5585. size_t total_size = 0;
  5586. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5587. total_size +=
  5588. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5589. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5590. }
  5591. // repeated .qtprotobufnamespace.tests.ComplexMessage testRepeatedComplex = 1;
  5592. {
  5593. unsigned int count = static_cast<unsigned int>(this->testrepeatedcomplex_size());
  5594. total_size += 1UL * count;
  5595. for (unsigned int i = 0; i < count; i++) {
  5596. total_size +=
  5597. ::google::protobuf::internal::WireFormatLite::MessageSize(
  5598. this->testrepeatedcomplex(static_cast<int>(i)));
  5599. }
  5600. }
  5601. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5602. SetCachedSize(cached_size);
  5603. return total_size;
  5604. }
  5605. void RepeatedComplexMessage::MergeFrom(const ::google::protobuf::Message& from) {
  5606. // @@protoc_insertion_point(generalized_merge_from_start:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5607. GOOGLE_DCHECK_NE(&from, this);
  5608. const RepeatedComplexMessage* source =
  5609. ::google::protobuf::internal::DynamicCastToGenerated<const RepeatedComplexMessage>(
  5610. &from);
  5611. if (source == NULL) {
  5612. // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5613. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5614. } else {
  5615. // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5616. MergeFrom(*source);
  5617. }
  5618. }
  5619. void RepeatedComplexMessage::MergeFrom(const RepeatedComplexMessage& from) {
  5620. // @@protoc_insertion_point(class_specific_merge_from_start:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5621. GOOGLE_DCHECK_NE(&from, this);
  5622. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5623. ::google::protobuf::uint32 cached_has_bits = 0;
  5624. (void) cached_has_bits;
  5625. testrepeatedcomplex_.MergeFrom(from.testrepeatedcomplex_);
  5626. }
  5627. void RepeatedComplexMessage::CopyFrom(const ::google::protobuf::Message& from) {
  5628. // @@protoc_insertion_point(generalized_copy_from_start:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5629. if (&from == this) return;
  5630. Clear();
  5631. MergeFrom(from);
  5632. }
  5633. void RepeatedComplexMessage::CopyFrom(const RepeatedComplexMessage& from) {
  5634. // @@protoc_insertion_point(class_specific_copy_from_start:qtprotobufnamespace.tests.RepeatedComplexMessage)
  5635. if (&from == this) return;
  5636. Clear();
  5637. MergeFrom(from);
  5638. }
  5639. bool RepeatedComplexMessage::IsInitialized() const {
  5640. return true;
  5641. }
  5642. void RepeatedComplexMessage::Swap(RepeatedComplexMessage* other) {
  5643. if (other == this) return;
  5644. InternalSwap(other);
  5645. }
  5646. void RepeatedComplexMessage::InternalSwap(RepeatedComplexMessage* other) {
  5647. using std::swap;
  5648. CastToBase(&testrepeatedcomplex_)->InternalSwap(CastToBase(&other->testrepeatedcomplex_));
  5649. _internal_metadata_.Swap(&other->_internal_metadata_);
  5650. }
  5651. ::google::protobuf::Metadata RepeatedComplexMessage::GetMetadata() const {
  5652. protobuf_simpletest_2eproto::protobuf_AssignDescriptorsOnce();
  5653. return ::protobuf_simpletest_2eproto::file_level_metadata[kIndexInFileMessages];
  5654. }
  5655. // @@protoc_insertion_point(namespace_scope)
  5656. } // namespace tests
  5657. } // namespace qtprotobufnamespace
  5658. namespace google {
  5659. namespace protobuf {
  5660. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleEnumMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleEnumMessage >(Arena* arena) {
  5661. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleEnumMessage >(arena);
  5662. }
  5663. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleFileEnumMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleFileEnumMessage >(Arena* arena) {
  5664. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleFileEnumMessage >(arena);
  5665. }
  5666. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleBoolMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleBoolMessage >(Arena* arena) {
  5667. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleBoolMessage >(arena);
  5668. }
  5669. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleIntMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleIntMessage >(Arena* arena) {
  5670. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleIntMessage >(arena);
  5671. }
  5672. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleSIntMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleSIntMessage >(Arena* arena) {
  5673. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleSIntMessage >(arena);
  5674. }
  5675. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleUIntMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleUIntMessage >(Arena* arena) {
  5676. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleUIntMessage >(arena);
  5677. }
  5678. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleInt64Message* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleInt64Message >(Arena* arena) {
  5679. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleInt64Message >(arena);
  5680. }
  5681. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleSInt64Message* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleSInt64Message >(Arena* arena) {
  5682. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleSInt64Message >(arena);
  5683. }
  5684. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleUInt64Message* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleUInt64Message >(Arena* arena) {
  5685. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleUInt64Message >(arena);
  5686. }
  5687. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleStringMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleStringMessage >(Arena* arena) {
  5688. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleStringMessage >(arena);
  5689. }
  5690. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleFloatMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleFloatMessage >(Arena* arena) {
  5691. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleFloatMessage >(arena);
  5692. }
  5693. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleDoubleMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleDoubleMessage >(Arena* arena) {
  5694. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleDoubleMessage >(arena);
  5695. }
  5696. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleBytesMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleBytesMessage >(Arena* arena) {
  5697. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleBytesMessage >(arena);
  5698. }
  5699. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleFixedInt32Message* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleFixedInt32Message >(Arena* arena) {
  5700. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleFixedInt32Message >(arena);
  5701. }
  5702. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleFixedInt64Message* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleFixedInt64Message >(Arena* arena) {
  5703. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleFixedInt64Message >(arena);
  5704. }
  5705. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleSFixedInt32Message* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleSFixedInt32Message >(Arena* arena) {
  5706. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleSFixedInt32Message >(arena);
  5707. }
  5708. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::SimpleSFixedInt64Message* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::SimpleSFixedInt64Message >(Arena* arena) {
  5709. return Arena::CreateInternal< ::qtprotobufnamespace::tests::SimpleSFixedInt64Message >(arena);
  5710. }
  5711. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::ComplexMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::ComplexMessage >(Arena* arena) {
  5712. return Arena::CreateInternal< ::qtprotobufnamespace::tests::ComplexMessage >(arena);
  5713. }
  5714. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::RepeatedIntMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::RepeatedIntMessage >(Arena* arena) {
  5715. return Arena::CreateInternal< ::qtprotobufnamespace::tests::RepeatedIntMessage >(arena);
  5716. }
  5717. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::RepeatedStringMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::RepeatedStringMessage >(Arena* arena) {
  5718. return Arena::CreateInternal< ::qtprotobufnamespace::tests::RepeatedStringMessage >(arena);
  5719. }
  5720. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::RepeatedDoubleMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::RepeatedDoubleMessage >(Arena* arena) {
  5721. return Arena::CreateInternal< ::qtprotobufnamespace::tests::RepeatedDoubleMessage >(arena);
  5722. }
  5723. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::RepeatedBytesMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::RepeatedBytesMessage >(Arena* arena) {
  5724. return Arena::CreateInternal< ::qtprotobufnamespace::tests::RepeatedBytesMessage >(arena);
  5725. }
  5726. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::RepeatedFloatMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::RepeatedFloatMessage >(Arena* arena) {
  5727. return Arena::CreateInternal< ::qtprotobufnamespace::tests::RepeatedFloatMessage >(arena);
  5728. }
  5729. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobufnamespace::tests::RepeatedComplexMessage* Arena::CreateMaybeMessage< ::qtprotobufnamespace::tests::RepeatedComplexMessage >(Arena* arena) {
  5730. return Arena::CreateInternal< ::qtprotobufnamespace::tests::RepeatedComplexMessage >(arena);
  5731. }
  5732. } // namespace protobuf
  5733. } // namespace google
  5734. // @@protoc_insertion_point(global_scope)