unittest_lite.pb.cc 477 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/unittest_lite.proto
  3. #include <google/protobuf/unittest_lite.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/io/zero_copy_stream_impl_lite.h>
  10. // This is a temporary google only hack
  11. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  12. #include "third_party/protobuf/version.h"
  13. #endif
  14. // @@protoc_insertion_point(includes)
  15. namespace protobuf_google_2fprotobuf_2funittest_5fimport_5flite_2eproto {
  16. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fimport_5flite_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ImportMessageLite;
  17. } // namespace protobuf_google_2fprotobuf_2funittest_5fimport_5flite_2eproto
  18. namespace protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_5flite_2eproto {
  19. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_5flite_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PublicImportMessageLite;
  20. } // namespace protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_5flite_2eproto
  21. namespace protobuf_google_2fprotobuf_2funittest_5flite_2eproto {
  22. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5flite_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ForeignMessageLite;
  23. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5flite_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_OptionalGroup_extension_lite;
  24. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5flite_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_RepeatedGroup_extension_lite;
  25. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5flite_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypesLite_NestedMessage;
  26. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5flite_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypesLite_OptionalGroup;
  27. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5flite_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypesLite_RepeatedGroup;
  28. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5flite_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestHugeFieldNumbersLite_OptionalGroup;
  29. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5flite_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse;
  30. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5flite_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMergeLite_OptionalGroup;
  31. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5flite_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMergeLite_RepeatedFieldsGenerator_Group1;
  32. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5flite_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMergeLite_RepeatedFieldsGenerator_Group2;
  33. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5flite_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMergeLite_RepeatedGroup;
  34. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5flite_2eproto ::google::protobuf::internal::SCCInfo<6> scc_info_TestAllTypesLite;
  35. } // namespace protobuf_google_2fprotobuf_2funittest_5flite_2eproto
  36. namespace protobuf_unittest {
  37. class TestAllTypesLite_NestedMessageDefaultTypeInternal {
  38. public:
  39. ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypesLite_NestedMessage>
  40. _instance;
  41. } _TestAllTypesLite_NestedMessage_default_instance_;
  42. class TestAllTypesLite_OptionalGroupDefaultTypeInternal {
  43. public:
  44. ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypesLite_OptionalGroup>
  45. _instance;
  46. } _TestAllTypesLite_OptionalGroup_default_instance_;
  47. class TestAllTypesLite_RepeatedGroupDefaultTypeInternal {
  48. public:
  49. ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypesLite_RepeatedGroup>
  50. _instance;
  51. } _TestAllTypesLite_RepeatedGroup_default_instance_;
  52. class TestAllTypesLiteDefaultTypeInternal {
  53. public:
  54. ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypesLite>
  55. _instance;
  56. ::google::protobuf::uint32 oneof_uint32_;
  57. const ::protobuf_unittest::TestAllTypesLite_NestedMessage* oneof_nested_message_;
  58. ::google::protobuf::internal::ArenaStringPtr oneof_string_;
  59. ::google::protobuf::internal::ArenaStringPtr oneof_bytes_;
  60. const ::protobuf_unittest::TestAllTypesLite_NestedMessage* oneof_lazy_nested_message_;
  61. } _TestAllTypesLite_default_instance_;
  62. class ForeignMessageLiteDefaultTypeInternal {
  63. public:
  64. ::google::protobuf::internal::ExplicitlyConstructed<ForeignMessageLite>
  65. _instance;
  66. } _ForeignMessageLite_default_instance_;
  67. class TestPackedTypesLiteDefaultTypeInternal {
  68. public:
  69. ::google::protobuf::internal::ExplicitlyConstructed<TestPackedTypesLite>
  70. _instance;
  71. } _TestPackedTypesLite_default_instance_;
  72. class TestAllExtensionsLiteDefaultTypeInternal {
  73. public:
  74. ::google::protobuf::internal::ExplicitlyConstructed<TestAllExtensionsLite>
  75. _instance;
  76. } _TestAllExtensionsLite_default_instance_;
  77. class OptionalGroup_extension_liteDefaultTypeInternal {
  78. public:
  79. ::google::protobuf::internal::ExplicitlyConstructed<OptionalGroup_extension_lite>
  80. _instance;
  81. } _OptionalGroup_extension_lite_default_instance_;
  82. class RepeatedGroup_extension_liteDefaultTypeInternal {
  83. public:
  84. ::google::protobuf::internal::ExplicitlyConstructed<RepeatedGroup_extension_lite>
  85. _instance;
  86. } _RepeatedGroup_extension_lite_default_instance_;
  87. class TestPackedExtensionsLiteDefaultTypeInternal {
  88. public:
  89. ::google::protobuf::internal::ExplicitlyConstructed<TestPackedExtensionsLite>
  90. _instance;
  91. } _TestPackedExtensionsLite_default_instance_;
  92. class TestNestedExtensionLiteDefaultTypeInternal {
  93. public:
  94. ::google::protobuf::internal::ExplicitlyConstructed<TestNestedExtensionLite>
  95. _instance;
  96. } _TestNestedExtensionLite_default_instance_;
  97. class TestDeprecatedLiteDefaultTypeInternal {
  98. public:
  99. ::google::protobuf::internal::ExplicitlyConstructed<TestDeprecatedLite>
  100. _instance;
  101. } _TestDeprecatedLite_default_instance_;
  102. class TestParsingMergeLite_RepeatedFieldsGenerator_Group1DefaultTypeInternal {
  103. public:
  104. ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMergeLite_RepeatedFieldsGenerator_Group1>
  105. _instance;
  106. } _TestParsingMergeLite_RepeatedFieldsGenerator_Group1_default_instance_;
  107. class TestParsingMergeLite_RepeatedFieldsGenerator_Group2DefaultTypeInternal {
  108. public:
  109. ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMergeLite_RepeatedFieldsGenerator_Group2>
  110. _instance;
  111. } _TestParsingMergeLite_RepeatedFieldsGenerator_Group2_default_instance_;
  112. class TestParsingMergeLite_RepeatedFieldsGeneratorDefaultTypeInternal {
  113. public:
  114. ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMergeLite_RepeatedFieldsGenerator>
  115. _instance;
  116. } _TestParsingMergeLite_RepeatedFieldsGenerator_default_instance_;
  117. class TestParsingMergeLite_OptionalGroupDefaultTypeInternal {
  118. public:
  119. ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMergeLite_OptionalGroup>
  120. _instance;
  121. } _TestParsingMergeLite_OptionalGroup_default_instance_;
  122. class TestParsingMergeLite_RepeatedGroupDefaultTypeInternal {
  123. public:
  124. ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMergeLite_RepeatedGroup>
  125. _instance;
  126. } _TestParsingMergeLite_RepeatedGroup_default_instance_;
  127. class TestParsingMergeLiteDefaultTypeInternal {
  128. public:
  129. ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMergeLite>
  130. _instance;
  131. } _TestParsingMergeLite_default_instance_;
  132. class TestEmptyMessageLiteDefaultTypeInternal {
  133. public:
  134. ::google::protobuf::internal::ExplicitlyConstructed<TestEmptyMessageLite>
  135. _instance;
  136. } _TestEmptyMessageLite_default_instance_;
  137. class TestEmptyMessageWithExtensionsLiteDefaultTypeInternal {
  138. public:
  139. ::google::protobuf::internal::ExplicitlyConstructed<TestEmptyMessageWithExtensionsLite>
  140. _instance;
  141. } _TestEmptyMessageWithExtensionsLite_default_instance_;
  142. class V1MessageLiteDefaultTypeInternal {
  143. public:
  144. ::google::protobuf::internal::ExplicitlyConstructed<V1MessageLite>
  145. _instance;
  146. } _V1MessageLite_default_instance_;
  147. class V2MessageLiteDefaultTypeInternal {
  148. public:
  149. ::google::protobuf::internal::ExplicitlyConstructed<V2MessageLite>
  150. _instance;
  151. } _V2MessageLite_default_instance_;
  152. class TestHugeFieldNumbersLite_OptionalGroupDefaultTypeInternal {
  153. public:
  154. ::google::protobuf::internal::ExplicitlyConstructed<TestHugeFieldNumbersLite_OptionalGroup>
  155. _instance;
  156. } _TestHugeFieldNumbersLite_OptionalGroup_default_instance_;
  157. class TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUseDefaultTypeInternal {
  158. public:
  159. ::google::protobuf::internal::ExplicitlyConstructed<TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse>
  160. _instance;
  161. } _TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse_default_instance_;
  162. class TestHugeFieldNumbersLiteDefaultTypeInternal {
  163. public:
  164. ::google::protobuf::internal::ExplicitlyConstructed<TestHugeFieldNumbersLite>
  165. _instance;
  166. ::google::protobuf::uint32 oneof_uint32_;
  167. const ::protobuf_unittest::TestAllTypesLite* oneof_test_all_types_;
  168. ::google::protobuf::internal::ArenaStringPtr oneof_string_;
  169. ::google::protobuf::internal::ArenaStringPtr oneof_bytes_;
  170. } _TestHugeFieldNumbersLite_default_instance_;
  171. class TestOneofParsingLiteDefaultTypeInternal {
  172. public:
  173. ::google::protobuf::internal::ExplicitlyConstructed<TestOneofParsingLite>
  174. _instance;
  175. ::google::protobuf::int32 oneof_int32_;
  176. const ::protobuf_unittest::TestAllTypesLite* oneof_submessage_;
  177. ::google::protobuf::internal::ArenaStringPtr oneof_string_;
  178. ::google::protobuf::internal::ArenaStringPtr oneof_bytes_;
  179. ::google::protobuf::internal::ArenaStringPtr oneof_string_cord_;
  180. ::google::protobuf::internal::ArenaStringPtr oneof_bytes_cord_;
  181. ::google::protobuf::internal::ArenaStringPtr oneof_string_string_piece_;
  182. ::google::protobuf::internal::ArenaStringPtr oneof_bytes_string_piece_;
  183. int oneof_enum_;
  184. } _TestOneofParsingLite_default_instance_;
  185. class PackedInt32DefaultTypeInternal {
  186. public:
  187. ::google::protobuf::internal::ExplicitlyConstructed<PackedInt32>
  188. _instance;
  189. } _PackedInt32_default_instance_;
  190. class NonPackedInt32DefaultTypeInternal {
  191. public:
  192. ::google::protobuf::internal::ExplicitlyConstructed<NonPackedInt32>
  193. _instance;
  194. } _NonPackedInt32_default_instance_;
  195. class PackedFixed32DefaultTypeInternal {
  196. public:
  197. ::google::protobuf::internal::ExplicitlyConstructed<PackedFixed32>
  198. _instance;
  199. } _PackedFixed32_default_instance_;
  200. class NonPackedFixed32DefaultTypeInternal {
  201. public:
  202. ::google::protobuf::internal::ExplicitlyConstructed<NonPackedFixed32>
  203. _instance;
  204. } _NonPackedFixed32_default_instance_;
  205. } // namespace protobuf_unittest
  206. namespace protobuf_google_2fprotobuf_2funittest_5flite_2eproto {
  207. static void InitDefaultsTestAllTypesLite_NestedMessage() {
  208. GOOGLE_PROTOBUF_VERIFY_VERSION;
  209. {
  210. void* ptr = &::protobuf_unittest::_TestAllTypesLite_NestedMessage_default_instance_;
  211. new (ptr) ::protobuf_unittest::TestAllTypesLite_NestedMessage();
  212. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  213. }
  214. ::protobuf_unittest::TestAllTypesLite_NestedMessage::InitAsDefaultInstance();
  215. }
  216. ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypesLite_NestedMessage =
  217. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestAllTypesLite_NestedMessage}, {}};
  218. static void InitDefaultsTestAllTypesLite_OptionalGroup() {
  219. GOOGLE_PROTOBUF_VERIFY_VERSION;
  220. {
  221. void* ptr = &::protobuf_unittest::_TestAllTypesLite_OptionalGroup_default_instance_;
  222. new (ptr) ::protobuf_unittest::TestAllTypesLite_OptionalGroup();
  223. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  224. }
  225. ::protobuf_unittest::TestAllTypesLite_OptionalGroup::InitAsDefaultInstance();
  226. }
  227. ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypesLite_OptionalGroup =
  228. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestAllTypesLite_OptionalGroup}, {}};
  229. static void InitDefaultsTestAllTypesLite_RepeatedGroup() {
  230. GOOGLE_PROTOBUF_VERIFY_VERSION;
  231. {
  232. void* ptr = &::protobuf_unittest::_TestAllTypesLite_RepeatedGroup_default_instance_;
  233. new (ptr) ::protobuf_unittest::TestAllTypesLite_RepeatedGroup();
  234. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  235. }
  236. ::protobuf_unittest::TestAllTypesLite_RepeatedGroup::InitAsDefaultInstance();
  237. }
  238. ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypesLite_RepeatedGroup =
  239. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestAllTypesLite_RepeatedGroup}, {}};
  240. static void InitDefaultsTestAllTypesLite() {
  241. GOOGLE_PROTOBUF_VERIFY_VERSION;
  242. ::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_.DefaultConstruct();
  243. *::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_.get_mutable() = ::std::string("hello", 5);
  244. ::google::protobuf::internal::OnShutdownDestroyString(
  245. ::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_.get_mutable());
  246. ::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_bytes_.DefaultConstruct();
  247. *::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_bytes_.get_mutable() = ::std::string("world", 5);
  248. ::google::protobuf::internal::OnShutdownDestroyString(
  249. ::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_bytes_.get_mutable());
  250. ::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_piece_.DefaultConstruct();
  251. *::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_piece_.get_mutable() = ::std::string("abc", 3);
  252. ::google::protobuf::internal::OnShutdownDestroyString(
  253. ::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_piece_.get_mutable());
  254. ::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_cord_.DefaultConstruct();
  255. *::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_cord_.get_mutable() = ::std::string("123", 3);
  256. ::google::protobuf::internal::OnShutdownDestroyString(
  257. ::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_cord_.get_mutable());
  258. {
  259. void* ptr = &::protobuf_unittest::_TestAllTypesLite_default_instance_;
  260. new (ptr) ::protobuf_unittest::TestAllTypesLite();
  261. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  262. }
  263. ::protobuf_unittest::TestAllTypesLite::InitAsDefaultInstance();
  264. }
  265. ::google::protobuf::internal::SCCInfo<6> scc_info_TestAllTypesLite =
  266. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 6, InitDefaultsTestAllTypesLite}, {
  267. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite_OptionalGroup.base,
  268. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite_NestedMessage.base,
  269. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_ForeignMessageLite.base,
  270. &protobuf_google_2fprotobuf_2funittest_5fimport_5flite_2eproto::scc_info_ImportMessageLite.base,
  271. &protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_5flite_2eproto::scc_info_PublicImportMessageLite.base,
  272. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite_RepeatedGroup.base,}};
  273. static void InitDefaultsForeignMessageLite() {
  274. GOOGLE_PROTOBUF_VERIFY_VERSION;
  275. {
  276. void* ptr = &::protobuf_unittest::_ForeignMessageLite_default_instance_;
  277. new (ptr) ::protobuf_unittest::ForeignMessageLite();
  278. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  279. }
  280. ::protobuf_unittest::ForeignMessageLite::InitAsDefaultInstance();
  281. }
  282. ::google::protobuf::internal::SCCInfo<0> scc_info_ForeignMessageLite =
  283. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsForeignMessageLite}, {}};
  284. static void InitDefaultsTestPackedTypesLite() {
  285. GOOGLE_PROTOBUF_VERIFY_VERSION;
  286. {
  287. void* ptr = &::protobuf_unittest::_TestPackedTypesLite_default_instance_;
  288. new (ptr) ::protobuf_unittest::TestPackedTypesLite();
  289. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  290. }
  291. ::protobuf_unittest::TestPackedTypesLite::InitAsDefaultInstance();
  292. }
  293. ::google::protobuf::internal::SCCInfo<0> scc_info_TestPackedTypesLite =
  294. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestPackedTypesLite}, {}};
  295. static void InitDefaultsTestAllExtensionsLite() {
  296. GOOGLE_PROTOBUF_VERIFY_VERSION;
  297. {
  298. void* ptr = &::protobuf_unittest::_TestAllExtensionsLite_default_instance_;
  299. new (ptr) ::protobuf_unittest::TestAllExtensionsLite();
  300. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  301. }
  302. ::protobuf_unittest::TestAllExtensionsLite::InitAsDefaultInstance();
  303. }
  304. ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllExtensionsLite =
  305. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestAllExtensionsLite}, {}};
  306. static void InitDefaultsOptionalGroup_extension_lite() {
  307. GOOGLE_PROTOBUF_VERIFY_VERSION;
  308. {
  309. void* ptr = &::protobuf_unittest::_OptionalGroup_extension_lite_default_instance_;
  310. new (ptr) ::protobuf_unittest::OptionalGroup_extension_lite();
  311. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  312. }
  313. ::protobuf_unittest::OptionalGroup_extension_lite::InitAsDefaultInstance();
  314. }
  315. ::google::protobuf::internal::SCCInfo<0> scc_info_OptionalGroup_extension_lite =
  316. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsOptionalGroup_extension_lite}, {}};
  317. static void InitDefaultsRepeatedGroup_extension_lite() {
  318. GOOGLE_PROTOBUF_VERIFY_VERSION;
  319. {
  320. void* ptr = &::protobuf_unittest::_RepeatedGroup_extension_lite_default_instance_;
  321. new (ptr) ::protobuf_unittest::RepeatedGroup_extension_lite();
  322. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  323. }
  324. ::protobuf_unittest::RepeatedGroup_extension_lite::InitAsDefaultInstance();
  325. }
  326. ::google::protobuf::internal::SCCInfo<0> scc_info_RepeatedGroup_extension_lite =
  327. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRepeatedGroup_extension_lite}, {}};
  328. static void InitDefaultsTestPackedExtensionsLite() {
  329. GOOGLE_PROTOBUF_VERIFY_VERSION;
  330. {
  331. void* ptr = &::protobuf_unittest::_TestPackedExtensionsLite_default_instance_;
  332. new (ptr) ::protobuf_unittest::TestPackedExtensionsLite();
  333. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  334. }
  335. ::protobuf_unittest::TestPackedExtensionsLite::InitAsDefaultInstance();
  336. }
  337. ::google::protobuf::internal::SCCInfo<0> scc_info_TestPackedExtensionsLite =
  338. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestPackedExtensionsLite}, {}};
  339. static void InitDefaultsTestNestedExtensionLite() {
  340. GOOGLE_PROTOBUF_VERIFY_VERSION;
  341. {
  342. void* ptr = &::protobuf_unittest::_TestNestedExtensionLite_default_instance_;
  343. new (ptr) ::protobuf_unittest::TestNestedExtensionLite();
  344. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  345. }
  346. ::protobuf_unittest::TestNestedExtensionLite::InitAsDefaultInstance();
  347. }
  348. ::google::protobuf::internal::SCCInfo<0> scc_info_TestNestedExtensionLite =
  349. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestNestedExtensionLite}, {}};
  350. static void InitDefaultsTestDeprecatedLite() {
  351. GOOGLE_PROTOBUF_VERIFY_VERSION;
  352. {
  353. void* ptr = &::protobuf_unittest::_TestDeprecatedLite_default_instance_;
  354. new (ptr) ::protobuf_unittest::TestDeprecatedLite();
  355. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  356. }
  357. ::protobuf_unittest::TestDeprecatedLite::InitAsDefaultInstance();
  358. }
  359. ::google::protobuf::internal::SCCInfo<0> scc_info_TestDeprecatedLite =
  360. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestDeprecatedLite}, {}};
  361. static void InitDefaultsTestParsingMergeLite_RepeatedFieldsGenerator_Group1() {
  362. GOOGLE_PROTOBUF_VERIFY_VERSION;
  363. {
  364. void* ptr = &::protobuf_unittest::_TestParsingMergeLite_RepeatedFieldsGenerator_Group1_default_instance_;
  365. new (ptr) ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator_Group1();
  366. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  367. }
  368. ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator_Group1::InitAsDefaultInstance();
  369. }
  370. ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMergeLite_RepeatedFieldsGenerator_Group1 =
  371. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestParsingMergeLite_RepeatedFieldsGenerator_Group1}, {
  372. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite.base,}};
  373. static void InitDefaultsTestParsingMergeLite_RepeatedFieldsGenerator_Group2() {
  374. GOOGLE_PROTOBUF_VERIFY_VERSION;
  375. {
  376. void* ptr = &::protobuf_unittest::_TestParsingMergeLite_RepeatedFieldsGenerator_Group2_default_instance_;
  377. new (ptr) ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator_Group2();
  378. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  379. }
  380. ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator_Group2::InitAsDefaultInstance();
  381. }
  382. ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMergeLite_RepeatedFieldsGenerator_Group2 =
  383. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestParsingMergeLite_RepeatedFieldsGenerator_Group2}, {
  384. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite.base,}};
  385. static void InitDefaultsTestParsingMergeLite_RepeatedFieldsGenerator() {
  386. GOOGLE_PROTOBUF_VERIFY_VERSION;
  387. {
  388. void* ptr = &::protobuf_unittest::_TestParsingMergeLite_RepeatedFieldsGenerator_default_instance_;
  389. new (ptr) ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator();
  390. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  391. }
  392. ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator::InitAsDefaultInstance();
  393. }
  394. ::google::protobuf::internal::SCCInfo<3> scc_info_TestParsingMergeLite_RepeatedFieldsGenerator =
  395. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsTestParsingMergeLite_RepeatedFieldsGenerator}, {
  396. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite.base,
  397. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite_RepeatedFieldsGenerator_Group1.base,
  398. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite_RepeatedFieldsGenerator_Group2.base,}};
  399. static void InitDefaultsTestParsingMergeLite_OptionalGroup() {
  400. GOOGLE_PROTOBUF_VERIFY_VERSION;
  401. {
  402. void* ptr = &::protobuf_unittest::_TestParsingMergeLite_OptionalGroup_default_instance_;
  403. new (ptr) ::protobuf_unittest::TestParsingMergeLite_OptionalGroup();
  404. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  405. }
  406. ::protobuf_unittest::TestParsingMergeLite_OptionalGroup::InitAsDefaultInstance();
  407. }
  408. ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMergeLite_OptionalGroup =
  409. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestParsingMergeLite_OptionalGroup}, {
  410. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite.base,}};
  411. static void InitDefaultsTestParsingMergeLite_RepeatedGroup() {
  412. GOOGLE_PROTOBUF_VERIFY_VERSION;
  413. {
  414. void* ptr = &::protobuf_unittest::_TestParsingMergeLite_RepeatedGroup_default_instance_;
  415. new (ptr) ::protobuf_unittest::TestParsingMergeLite_RepeatedGroup();
  416. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  417. }
  418. ::protobuf_unittest::TestParsingMergeLite_RepeatedGroup::InitAsDefaultInstance();
  419. }
  420. ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMergeLite_RepeatedGroup =
  421. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestParsingMergeLite_RepeatedGroup}, {
  422. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite.base,}};
  423. static void InitDefaultsTestParsingMergeLite() {
  424. GOOGLE_PROTOBUF_VERIFY_VERSION;
  425. {
  426. void* ptr = &::protobuf_unittest::_TestParsingMergeLite_default_instance_;
  427. new (ptr) ::protobuf_unittest::TestParsingMergeLite();
  428. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  429. }
  430. ::protobuf_unittest::TestParsingMergeLite::InitAsDefaultInstance();
  431. }
  432. ::google::protobuf::internal::SCCInfo<3> scc_info_TestParsingMergeLite =
  433. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsTestParsingMergeLite}, {
  434. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite.base,
  435. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite_OptionalGroup.base,
  436. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite_RepeatedGroup.base,}};
  437. static void InitDefaultsTestEmptyMessageLite() {
  438. GOOGLE_PROTOBUF_VERIFY_VERSION;
  439. {
  440. void* ptr = &::protobuf_unittest::_TestEmptyMessageLite_default_instance_;
  441. new (ptr) ::protobuf_unittest::TestEmptyMessageLite();
  442. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  443. }
  444. ::protobuf_unittest::TestEmptyMessageLite::InitAsDefaultInstance();
  445. }
  446. ::google::protobuf::internal::SCCInfo<0> scc_info_TestEmptyMessageLite =
  447. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestEmptyMessageLite}, {}};
  448. static void InitDefaultsTestEmptyMessageWithExtensionsLite() {
  449. GOOGLE_PROTOBUF_VERIFY_VERSION;
  450. {
  451. void* ptr = &::protobuf_unittest::_TestEmptyMessageWithExtensionsLite_default_instance_;
  452. new (ptr) ::protobuf_unittest::TestEmptyMessageWithExtensionsLite();
  453. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  454. }
  455. ::protobuf_unittest::TestEmptyMessageWithExtensionsLite::InitAsDefaultInstance();
  456. }
  457. ::google::protobuf::internal::SCCInfo<0> scc_info_TestEmptyMessageWithExtensionsLite =
  458. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestEmptyMessageWithExtensionsLite}, {}};
  459. static void InitDefaultsV1MessageLite() {
  460. GOOGLE_PROTOBUF_VERIFY_VERSION;
  461. {
  462. void* ptr = &::protobuf_unittest::_V1MessageLite_default_instance_;
  463. new (ptr) ::protobuf_unittest::V1MessageLite();
  464. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  465. }
  466. ::protobuf_unittest::V1MessageLite::InitAsDefaultInstance();
  467. }
  468. ::google::protobuf::internal::SCCInfo<0> scc_info_V1MessageLite =
  469. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsV1MessageLite}, {}};
  470. static void InitDefaultsV2MessageLite() {
  471. GOOGLE_PROTOBUF_VERIFY_VERSION;
  472. {
  473. void* ptr = &::protobuf_unittest::_V2MessageLite_default_instance_;
  474. new (ptr) ::protobuf_unittest::V2MessageLite();
  475. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  476. }
  477. ::protobuf_unittest::V2MessageLite::InitAsDefaultInstance();
  478. }
  479. ::google::protobuf::internal::SCCInfo<0> scc_info_V2MessageLite =
  480. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsV2MessageLite}, {}};
  481. static void InitDefaultsTestHugeFieldNumbersLite_OptionalGroup() {
  482. GOOGLE_PROTOBUF_VERIFY_VERSION;
  483. {
  484. void* ptr = &::protobuf_unittest::_TestHugeFieldNumbersLite_OptionalGroup_default_instance_;
  485. new (ptr) ::protobuf_unittest::TestHugeFieldNumbersLite_OptionalGroup();
  486. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  487. }
  488. ::protobuf_unittest::TestHugeFieldNumbersLite_OptionalGroup::InitAsDefaultInstance();
  489. }
  490. ::google::protobuf::internal::SCCInfo<0> scc_info_TestHugeFieldNumbersLite_OptionalGroup =
  491. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestHugeFieldNumbersLite_OptionalGroup}, {}};
  492. static void InitDefaultsTestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse() {
  493. GOOGLE_PROTOBUF_VERIFY_VERSION;
  494. {
  495. void* ptr = &::protobuf_unittest::_TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse_default_instance_;
  496. new (ptr) ::protobuf_unittest::TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse();
  497. }
  498. ::protobuf_unittest::TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse::InitAsDefaultInstance();
  499. }
  500. ::google::protobuf::internal::SCCInfo<0> scc_info_TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse =
  501. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse}, {}};
  502. static void InitDefaultsTestHugeFieldNumbersLite() {
  503. GOOGLE_PROTOBUF_VERIFY_VERSION;
  504. {
  505. void* ptr = &::protobuf_unittest::_TestHugeFieldNumbersLite_default_instance_;
  506. new (ptr) ::protobuf_unittest::TestHugeFieldNumbersLite();
  507. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  508. }
  509. ::protobuf_unittest::TestHugeFieldNumbersLite::InitAsDefaultInstance();
  510. }
  511. ::google::protobuf::internal::SCCInfo<4> scc_info_TestHugeFieldNumbersLite =
  512. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsTestHugeFieldNumbersLite}, {
  513. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_ForeignMessageLite.base,
  514. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestHugeFieldNumbersLite_OptionalGroup.base,
  515. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse.base,
  516. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite.base,}};
  517. static void InitDefaultsTestOneofParsingLite() {
  518. GOOGLE_PROTOBUF_VERIFY_VERSION;
  519. ::protobuf_unittest::TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_bytes_.DefaultConstruct();
  520. *::protobuf_unittest::TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_bytes_.get_mutable() = ::std::string("default bytes", 13);
  521. ::google::protobuf::internal::OnShutdownDestroyString(
  522. ::protobuf_unittest::TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_bytes_.get_mutable());
  523. ::protobuf_unittest::TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_string_cord_.DefaultConstruct();
  524. *::protobuf_unittest::TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_string_cord_.get_mutable() = ::std::string("default Cord", 12);
  525. ::google::protobuf::internal::OnShutdownDestroyString(
  526. ::protobuf_unittest::TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_string_cord_.get_mutable());
  527. ::protobuf_unittest::TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_bytes_string_piece_.DefaultConstruct();
  528. *::protobuf_unittest::TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_bytes_string_piece_.get_mutable() = ::std::string("default StringPiece", 19);
  529. ::google::protobuf::internal::OnShutdownDestroyString(
  530. ::protobuf_unittest::TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_bytes_string_piece_.get_mutable());
  531. {
  532. void* ptr = &::protobuf_unittest::_TestOneofParsingLite_default_instance_;
  533. new (ptr) ::protobuf_unittest::TestOneofParsingLite();
  534. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  535. }
  536. ::protobuf_unittest::TestOneofParsingLite::InitAsDefaultInstance();
  537. }
  538. ::google::protobuf::internal::SCCInfo<1> scc_info_TestOneofParsingLite =
  539. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestOneofParsingLite}, {
  540. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite.base,}};
  541. static void InitDefaultsPackedInt32() {
  542. GOOGLE_PROTOBUF_VERIFY_VERSION;
  543. {
  544. void* ptr = &::protobuf_unittest::_PackedInt32_default_instance_;
  545. new (ptr) ::protobuf_unittest::PackedInt32();
  546. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  547. }
  548. ::protobuf_unittest::PackedInt32::InitAsDefaultInstance();
  549. }
  550. ::google::protobuf::internal::SCCInfo<0> scc_info_PackedInt32 =
  551. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPackedInt32}, {}};
  552. static void InitDefaultsNonPackedInt32() {
  553. GOOGLE_PROTOBUF_VERIFY_VERSION;
  554. {
  555. void* ptr = &::protobuf_unittest::_NonPackedInt32_default_instance_;
  556. new (ptr) ::protobuf_unittest::NonPackedInt32();
  557. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  558. }
  559. ::protobuf_unittest::NonPackedInt32::InitAsDefaultInstance();
  560. }
  561. ::google::protobuf::internal::SCCInfo<0> scc_info_NonPackedInt32 =
  562. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsNonPackedInt32}, {}};
  563. static void InitDefaultsPackedFixed32() {
  564. GOOGLE_PROTOBUF_VERIFY_VERSION;
  565. {
  566. void* ptr = &::protobuf_unittest::_PackedFixed32_default_instance_;
  567. new (ptr) ::protobuf_unittest::PackedFixed32();
  568. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  569. }
  570. ::protobuf_unittest::PackedFixed32::InitAsDefaultInstance();
  571. }
  572. ::google::protobuf::internal::SCCInfo<0> scc_info_PackedFixed32 =
  573. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPackedFixed32}, {}};
  574. static void InitDefaultsNonPackedFixed32() {
  575. GOOGLE_PROTOBUF_VERIFY_VERSION;
  576. {
  577. void* ptr = &::protobuf_unittest::_NonPackedFixed32_default_instance_;
  578. new (ptr) ::protobuf_unittest::NonPackedFixed32();
  579. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  580. }
  581. ::protobuf_unittest::NonPackedFixed32::InitAsDefaultInstance();
  582. }
  583. ::google::protobuf::internal::SCCInfo<0> scc_info_NonPackedFixed32 =
  584. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsNonPackedFixed32}, {}};
  585. void InitDefaults() {
  586. ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypesLite_NestedMessage.base);
  587. ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypesLite_OptionalGroup.base);
  588. ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypesLite_RepeatedGroup.base);
  589. ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypesLite.base);
  590. ::google::protobuf::internal::InitSCC(&scc_info_ForeignMessageLite.base);
  591. ::google::protobuf::internal::InitSCC(&scc_info_TestPackedTypesLite.base);
  592. ::google::protobuf::internal::InitSCC(&scc_info_TestAllExtensionsLite.base);
  593. ::google::protobuf::internal::InitSCC(&scc_info_OptionalGroup_extension_lite.base);
  594. ::google::protobuf::internal::InitSCC(&scc_info_RepeatedGroup_extension_lite.base);
  595. ::google::protobuf::internal::InitSCC(&scc_info_TestPackedExtensionsLite.base);
  596. ::google::protobuf::internal::InitSCC(&scc_info_TestNestedExtensionLite.base);
  597. ::google::protobuf::internal::InitSCC(&scc_info_TestDeprecatedLite.base);
  598. ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMergeLite_RepeatedFieldsGenerator_Group1.base);
  599. ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMergeLite_RepeatedFieldsGenerator_Group2.base);
  600. ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMergeLite_RepeatedFieldsGenerator.base);
  601. ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMergeLite_OptionalGroup.base);
  602. ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMergeLite_RepeatedGroup.base);
  603. ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMergeLite.base);
  604. ::google::protobuf::internal::InitSCC(&scc_info_TestEmptyMessageLite.base);
  605. ::google::protobuf::internal::InitSCC(&scc_info_TestEmptyMessageWithExtensionsLite.base);
  606. ::google::protobuf::internal::InitSCC(&scc_info_V1MessageLite.base);
  607. ::google::protobuf::internal::InitSCC(&scc_info_V2MessageLite.base);
  608. ::google::protobuf::internal::InitSCC(&scc_info_TestHugeFieldNumbersLite_OptionalGroup.base);
  609. ::google::protobuf::internal::InitSCC(&scc_info_TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse.base);
  610. ::google::protobuf::internal::InitSCC(&scc_info_TestHugeFieldNumbersLite.base);
  611. ::google::protobuf::internal::InitSCC(&scc_info_TestOneofParsingLite.base);
  612. ::google::protobuf::internal::InitSCC(&scc_info_PackedInt32.base);
  613. ::google::protobuf::internal::InitSCC(&scc_info_NonPackedInt32.base);
  614. ::google::protobuf::internal::InitSCC(&scc_info_PackedFixed32.base);
  615. ::google::protobuf::internal::InitSCC(&scc_info_NonPackedFixed32.base);
  616. }
  617. } // namespace protobuf_google_2fprotobuf_2funittest_5flite_2eproto
  618. namespace protobuf_unittest {
  619. bool TestAllTypesLite_NestedEnum_IsValid(int value) {
  620. switch (value) {
  621. case 1:
  622. case 2:
  623. case 3:
  624. return true;
  625. default:
  626. return false;
  627. }
  628. }
  629. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  630. const TestAllTypesLite_NestedEnum TestAllTypesLite::FOO;
  631. const TestAllTypesLite_NestedEnum TestAllTypesLite::BAR;
  632. const TestAllTypesLite_NestedEnum TestAllTypesLite::BAZ;
  633. const TestAllTypesLite_NestedEnum TestAllTypesLite::NestedEnum_MIN;
  634. const TestAllTypesLite_NestedEnum TestAllTypesLite::NestedEnum_MAX;
  635. const int TestAllTypesLite::NestedEnum_ARRAYSIZE;
  636. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  637. bool ForeignEnumLite_IsValid(int value) {
  638. switch (value) {
  639. case 4:
  640. case 5:
  641. case 6:
  642. return true;
  643. default:
  644. return false;
  645. }
  646. }
  647. bool V1EnumLite_IsValid(int value) {
  648. switch (value) {
  649. case 1:
  650. return true;
  651. default:
  652. return false;
  653. }
  654. }
  655. bool V2EnumLite_IsValid(int value) {
  656. switch (value) {
  657. case 1:
  658. case 2:
  659. return true;
  660. default:
  661. return false;
  662. }
  663. }
  664. // ===================================================================
  665. void TestAllTypesLite_NestedMessage::InitAsDefaultInstance() {
  666. }
  667. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  668. const int TestAllTypesLite_NestedMessage::kBbFieldNumber;
  669. const int TestAllTypesLite_NestedMessage::kCcFieldNumber;
  670. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  671. TestAllTypesLite_NestedMessage::TestAllTypesLite_NestedMessage()
  672. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  673. ::google::protobuf::internal::InitSCC(
  674. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite_NestedMessage.base);
  675. SharedCtor();
  676. // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllTypesLite.NestedMessage)
  677. }
  678. TestAllTypesLite_NestedMessage::TestAllTypesLite_NestedMessage(const TestAllTypesLite_NestedMessage& from)
  679. : ::google::protobuf::MessageLite(),
  680. _internal_metadata_(NULL),
  681. _has_bits_(from._has_bits_) {
  682. _internal_metadata_.MergeFrom(from._internal_metadata_);
  683. ::memcpy(&cc_, &from.cc_,
  684. static_cast<size_t>(reinterpret_cast<char*>(&bb_) -
  685. reinterpret_cast<char*>(&cc_)) + sizeof(bb_));
  686. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllTypesLite.NestedMessage)
  687. }
  688. void TestAllTypesLite_NestedMessage::SharedCtor() {
  689. ::memset(&cc_, 0, static_cast<size_t>(
  690. reinterpret_cast<char*>(&bb_) -
  691. reinterpret_cast<char*>(&cc_)) + sizeof(bb_));
  692. }
  693. TestAllTypesLite_NestedMessage::~TestAllTypesLite_NestedMessage() {
  694. // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllTypesLite.NestedMessage)
  695. SharedDtor();
  696. }
  697. void TestAllTypesLite_NestedMessage::SharedDtor() {
  698. }
  699. void TestAllTypesLite_NestedMessage::SetCachedSize(int size) const {
  700. _cached_size_.Set(size);
  701. }
  702. const TestAllTypesLite_NestedMessage& TestAllTypesLite_NestedMessage::default_instance() {
  703. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite_NestedMessage.base);
  704. return *internal_default_instance();
  705. }
  706. void TestAllTypesLite_NestedMessage::Clear() {
  707. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestAllTypesLite.NestedMessage)
  708. ::google::protobuf::uint32 cached_has_bits = 0;
  709. // Prevent compiler warnings about cached_has_bits being unused
  710. (void) cached_has_bits;
  711. cached_has_bits = _has_bits_[0];
  712. if (cached_has_bits & 3u) {
  713. ::memset(&cc_, 0, static_cast<size_t>(
  714. reinterpret_cast<char*>(&bb_) -
  715. reinterpret_cast<char*>(&cc_)) + sizeof(bb_));
  716. }
  717. _has_bits_.Clear();
  718. _internal_metadata_.Clear();
  719. }
  720. bool TestAllTypesLite_NestedMessage::MergePartialFromCodedStream(
  721. ::google::protobuf::io::CodedInputStream* input) {
  722. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  723. ::google::protobuf::uint32 tag;
  724. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  725. &_internal_metadata_);
  726. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  727. unknown_fields_setter.buffer());
  728. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  729. &unknown_fields_output, false);
  730. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestAllTypesLite.NestedMessage)
  731. for (;;) {
  732. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  733. tag = p.first;
  734. if (!p.second) goto handle_unusual;
  735. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  736. // optional int32 bb = 1;
  737. case 1: {
  738. if (static_cast< ::google::protobuf::uint8>(tag) ==
  739. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  740. set_has_bb();
  741. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  742. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  743. input, &bb_)));
  744. } else {
  745. goto handle_unusual;
  746. }
  747. break;
  748. }
  749. // optional int64 cc = 2;
  750. case 2: {
  751. if (static_cast< ::google::protobuf::uint8>(tag) ==
  752. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  753. set_has_cc();
  754. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  755. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  756. input, &cc_)));
  757. } else {
  758. goto handle_unusual;
  759. }
  760. break;
  761. }
  762. default: {
  763. handle_unusual:
  764. if (tag == 0) {
  765. goto success;
  766. }
  767. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  768. input, tag, &unknown_fields_stream));
  769. break;
  770. }
  771. }
  772. }
  773. success:
  774. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestAllTypesLite.NestedMessage)
  775. return true;
  776. failure:
  777. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllTypesLite.NestedMessage)
  778. return false;
  779. #undef DO_
  780. }
  781. void TestAllTypesLite_NestedMessage::SerializeWithCachedSizes(
  782. ::google::protobuf::io::CodedOutputStream* output) const {
  783. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestAllTypesLite.NestedMessage)
  784. ::google::protobuf::uint32 cached_has_bits = 0;
  785. (void) cached_has_bits;
  786. cached_has_bits = _has_bits_[0];
  787. // optional int32 bb = 1;
  788. if (cached_has_bits & 0x00000002u) {
  789. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->bb(), output);
  790. }
  791. // optional int64 cc = 2;
  792. if (cached_has_bits & 0x00000001u) {
  793. ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->cc(), output);
  794. }
  795. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  796. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  797. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllTypesLite.NestedMessage)
  798. }
  799. size_t TestAllTypesLite_NestedMessage::ByteSizeLong() const {
  800. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllTypesLite.NestedMessage)
  801. size_t total_size = 0;
  802. total_size += _internal_metadata_.unknown_fields().size();
  803. if (_has_bits_[0 / 32] & 3u) {
  804. // optional int64 cc = 2;
  805. if (has_cc()) {
  806. total_size += 1 +
  807. ::google::protobuf::internal::WireFormatLite::Int64Size(
  808. this->cc());
  809. }
  810. // optional int32 bb = 1;
  811. if (has_bb()) {
  812. total_size += 1 +
  813. ::google::protobuf::internal::WireFormatLite::Int32Size(
  814. this->bb());
  815. }
  816. }
  817. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  818. SetCachedSize(cached_size);
  819. return total_size;
  820. }
  821. void TestAllTypesLite_NestedMessage::CheckTypeAndMergeFrom(
  822. const ::google::protobuf::MessageLite& from) {
  823. MergeFrom(*::google::protobuf::down_cast<const TestAllTypesLite_NestedMessage*>(&from));
  824. }
  825. void TestAllTypesLite_NestedMessage::MergeFrom(const TestAllTypesLite_NestedMessage& from) {
  826. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestAllTypesLite.NestedMessage)
  827. GOOGLE_DCHECK_NE(&from, this);
  828. _internal_metadata_.MergeFrom(from._internal_metadata_);
  829. ::google::protobuf::uint32 cached_has_bits = 0;
  830. (void) cached_has_bits;
  831. cached_has_bits = from._has_bits_[0];
  832. if (cached_has_bits & 3u) {
  833. if (cached_has_bits & 0x00000001u) {
  834. cc_ = from.cc_;
  835. }
  836. if (cached_has_bits & 0x00000002u) {
  837. bb_ = from.bb_;
  838. }
  839. _has_bits_[0] |= cached_has_bits;
  840. }
  841. }
  842. void TestAllTypesLite_NestedMessage::CopyFrom(const TestAllTypesLite_NestedMessage& from) {
  843. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllTypesLite.NestedMessage)
  844. if (&from == this) return;
  845. Clear();
  846. MergeFrom(from);
  847. }
  848. bool TestAllTypesLite_NestedMessage::IsInitialized() const {
  849. return true;
  850. }
  851. void TestAllTypesLite_NestedMessage::Swap(TestAllTypesLite_NestedMessage* other) {
  852. if (other == this) return;
  853. InternalSwap(other);
  854. }
  855. void TestAllTypesLite_NestedMessage::InternalSwap(TestAllTypesLite_NestedMessage* other) {
  856. using std::swap;
  857. swap(cc_, other->cc_);
  858. swap(bb_, other->bb_);
  859. swap(_has_bits_[0], other->_has_bits_[0]);
  860. _internal_metadata_.Swap(&other->_internal_metadata_);
  861. }
  862. ::std::string TestAllTypesLite_NestedMessage::GetTypeName() const {
  863. return "protobuf_unittest.TestAllTypesLite.NestedMessage";
  864. }
  865. // ===================================================================
  866. void TestAllTypesLite_OptionalGroup::InitAsDefaultInstance() {
  867. }
  868. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  869. const int TestAllTypesLite_OptionalGroup::kAFieldNumber;
  870. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  871. TestAllTypesLite_OptionalGroup::TestAllTypesLite_OptionalGroup()
  872. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  873. ::google::protobuf::internal::InitSCC(
  874. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite_OptionalGroup.base);
  875. SharedCtor();
  876. // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllTypesLite.OptionalGroup)
  877. }
  878. TestAllTypesLite_OptionalGroup::TestAllTypesLite_OptionalGroup(const TestAllTypesLite_OptionalGroup& from)
  879. : ::google::protobuf::MessageLite(),
  880. _internal_metadata_(NULL),
  881. _has_bits_(from._has_bits_) {
  882. _internal_metadata_.MergeFrom(from._internal_metadata_);
  883. a_ = from.a_;
  884. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllTypesLite.OptionalGroup)
  885. }
  886. void TestAllTypesLite_OptionalGroup::SharedCtor() {
  887. a_ = 0;
  888. }
  889. TestAllTypesLite_OptionalGroup::~TestAllTypesLite_OptionalGroup() {
  890. // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllTypesLite.OptionalGroup)
  891. SharedDtor();
  892. }
  893. void TestAllTypesLite_OptionalGroup::SharedDtor() {
  894. }
  895. void TestAllTypesLite_OptionalGroup::SetCachedSize(int size) const {
  896. _cached_size_.Set(size);
  897. }
  898. const TestAllTypesLite_OptionalGroup& TestAllTypesLite_OptionalGroup::default_instance() {
  899. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite_OptionalGroup.base);
  900. return *internal_default_instance();
  901. }
  902. void TestAllTypesLite_OptionalGroup::Clear() {
  903. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestAllTypesLite.OptionalGroup)
  904. ::google::protobuf::uint32 cached_has_bits = 0;
  905. // Prevent compiler warnings about cached_has_bits being unused
  906. (void) cached_has_bits;
  907. a_ = 0;
  908. _has_bits_.Clear();
  909. _internal_metadata_.Clear();
  910. }
  911. bool TestAllTypesLite_OptionalGroup::MergePartialFromCodedStream(
  912. ::google::protobuf::io::CodedInputStream* input) {
  913. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  914. ::google::protobuf::uint32 tag;
  915. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  916. &_internal_metadata_);
  917. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  918. unknown_fields_setter.buffer());
  919. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  920. &unknown_fields_output, false);
  921. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestAllTypesLite.OptionalGroup)
  922. for (;;) {
  923. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  924. tag = p.first;
  925. if (!p.second) goto handle_unusual;
  926. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  927. // optional int32 a = 17;
  928. case 17: {
  929. if (static_cast< ::google::protobuf::uint8>(tag) ==
  930. static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
  931. set_has_a();
  932. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  933. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  934. input, &a_)));
  935. } else {
  936. goto handle_unusual;
  937. }
  938. break;
  939. }
  940. default: {
  941. handle_unusual:
  942. if (tag == 0 ||
  943. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  944. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  945. input->SetLastTag(tag);
  946. goto success;
  947. }
  948. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  949. input, tag, &unknown_fields_stream));
  950. break;
  951. }
  952. }
  953. }
  954. success:
  955. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestAllTypesLite.OptionalGroup)
  956. return true;
  957. failure:
  958. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllTypesLite.OptionalGroup)
  959. return false;
  960. #undef DO_
  961. }
  962. void TestAllTypesLite_OptionalGroup::SerializeWithCachedSizes(
  963. ::google::protobuf::io::CodedOutputStream* output) const {
  964. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestAllTypesLite.OptionalGroup)
  965. ::google::protobuf::uint32 cached_has_bits = 0;
  966. (void) cached_has_bits;
  967. cached_has_bits = _has_bits_[0];
  968. // optional int32 a = 17;
  969. if (cached_has_bits & 0x00000001u) {
  970. ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->a(), output);
  971. }
  972. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  973. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  974. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllTypesLite.OptionalGroup)
  975. }
  976. size_t TestAllTypesLite_OptionalGroup::ByteSizeLong() const {
  977. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllTypesLite.OptionalGroup)
  978. size_t total_size = 0;
  979. total_size += _internal_metadata_.unknown_fields().size();
  980. // optional int32 a = 17;
  981. if (has_a()) {
  982. total_size += 2 +
  983. ::google::protobuf::internal::WireFormatLite::Int32Size(
  984. this->a());
  985. }
  986. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  987. SetCachedSize(cached_size);
  988. return total_size;
  989. }
  990. void TestAllTypesLite_OptionalGroup::CheckTypeAndMergeFrom(
  991. const ::google::protobuf::MessageLite& from) {
  992. MergeFrom(*::google::protobuf::down_cast<const TestAllTypesLite_OptionalGroup*>(&from));
  993. }
  994. void TestAllTypesLite_OptionalGroup::MergeFrom(const TestAllTypesLite_OptionalGroup& from) {
  995. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestAllTypesLite.OptionalGroup)
  996. GOOGLE_DCHECK_NE(&from, this);
  997. _internal_metadata_.MergeFrom(from._internal_metadata_);
  998. ::google::protobuf::uint32 cached_has_bits = 0;
  999. (void) cached_has_bits;
  1000. if (from.has_a()) {
  1001. set_a(from.a());
  1002. }
  1003. }
  1004. void TestAllTypesLite_OptionalGroup::CopyFrom(const TestAllTypesLite_OptionalGroup& from) {
  1005. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllTypesLite.OptionalGroup)
  1006. if (&from == this) return;
  1007. Clear();
  1008. MergeFrom(from);
  1009. }
  1010. bool TestAllTypesLite_OptionalGroup::IsInitialized() const {
  1011. return true;
  1012. }
  1013. void TestAllTypesLite_OptionalGroup::Swap(TestAllTypesLite_OptionalGroup* other) {
  1014. if (other == this) return;
  1015. InternalSwap(other);
  1016. }
  1017. void TestAllTypesLite_OptionalGroup::InternalSwap(TestAllTypesLite_OptionalGroup* other) {
  1018. using std::swap;
  1019. swap(a_, other->a_);
  1020. swap(_has_bits_[0], other->_has_bits_[0]);
  1021. _internal_metadata_.Swap(&other->_internal_metadata_);
  1022. }
  1023. ::std::string TestAllTypesLite_OptionalGroup::GetTypeName() const {
  1024. return "protobuf_unittest.TestAllTypesLite.OptionalGroup";
  1025. }
  1026. // ===================================================================
  1027. void TestAllTypesLite_RepeatedGroup::InitAsDefaultInstance() {
  1028. }
  1029. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1030. const int TestAllTypesLite_RepeatedGroup::kAFieldNumber;
  1031. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1032. TestAllTypesLite_RepeatedGroup::TestAllTypesLite_RepeatedGroup()
  1033. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  1034. ::google::protobuf::internal::InitSCC(
  1035. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite_RepeatedGroup.base);
  1036. SharedCtor();
  1037. // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllTypesLite.RepeatedGroup)
  1038. }
  1039. TestAllTypesLite_RepeatedGroup::TestAllTypesLite_RepeatedGroup(const TestAllTypesLite_RepeatedGroup& from)
  1040. : ::google::protobuf::MessageLite(),
  1041. _internal_metadata_(NULL),
  1042. _has_bits_(from._has_bits_) {
  1043. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1044. a_ = from.a_;
  1045. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllTypesLite.RepeatedGroup)
  1046. }
  1047. void TestAllTypesLite_RepeatedGroup::SharedCtor() {
  1048. a_ = 0;
  1049. }
  1050. TestAllTypesLite_RepeatedGroup::~TestAllTypesLite_RepeatedGroup() {
  1051. // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllTypesLite.RepeatedGroup)
  1052. SharedDtor();
  1053. }
  1054. void TestAllTypesLite_RepeatedGroup::SharedDtor() {
  1055. }
  1056. void TestAllTypesLite_RepeatedGroup::SetCachedSize(int size) const {
  1057. _cached_size_.Set(size);
  1058. }
  1059. const TestAllTypesLite_RepeatedGroup& TestAllTypesLite_RepeatedGroup::default_instance() {
  1060. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite_RepeatedGroup.base);
  1061. return *internal_default_instance();
  1062. }
  1063. void TestAllTypesLite_RepeatedGroup::Clear() {
  1064. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestAllTypesLite.RepeatedGroup)
  1065. ::google::protobuf::uint32 cached_has_bits = 0;
  1066. // Prevent compiler warnings about cached_has_bits being unused
  1067. (void) cached_has_bits;
  1068. a_ = 0;
  1069. _has_bits_.Clear();
  1070. _internal_metadata_.Clear();
  1071. }
  1072. bool TestAllTypesLite_RepeatedGroup::MergePartialFromCodedStream(
  1073. ::google::protobuf::io::CodedInputStream* input) {
  1074. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1075. ::google::protobuf::uint32 tag;
  1076. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  1077. &_internal_metadata_);
  1078. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  1079. unknown_fields_setter.buffer());
  1080. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  1081. &unknown_fields_output, false);
  1082. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestAllTypesLite.RepeatedGroup)
  1083. for (;;) {
  1084. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  1085. tag = p.first;
  1086. if (!p.second) goto handle_unusual;
  1087. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1088. // optional int32 a = 47;
  1089. case 47: {
  1090. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1091. static_cast< ::google::protobuf::uint8>(120u /* 376 & 0xFF */)) {
  1092. set_has_a();
  1093. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1094. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  1095. input, &a_)));
  1096. } else {
  1097. goto handle_unusual;
  1098. }
  1099. break;
  1100. }
  1101. default: {
  1102. handle_unusual:
  1103. if (tag == 0 ||
  1104. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  1105. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  1106. input->SetLastTag(tag);
  1107. goto success;
  1108. }
  1109. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  1110. input, tag, &unknown_fields_stream));
  1111. break;
  1112. }
  1113. }
  1114. }
  1115. success:
  1116. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestAllTypesLite.RepeatedGroup)
  1117. return true;
  1118. failure:
  1119. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllTypesLite.RepeatedGroup)
  1120. return false;
  1121. #undef DO_
  1122. }
  1123. void TestAllTypesLite_RepeatedGroup::SerializeWithCachedSizes(
  1124. ::google::protobuf::io::CodedOutputStream* output) const {
  1125. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestAllTypesLite.RepeatedGroup)
  1126. ::google::protobuf::uint32 cached_has_bits = 0;
  1127. (void) cached_has_bits;
  1128. cached_has_bits = _has_bits_[0];
  1129. // optional int32 a = 47;
  1130. if (cached_has_bits & 0x00000001u) {
  1131. ::google::protobuf::internal::WireFormatLite::WriteInt32(47, this->a(), output);
  1132. }
  1133. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  1134. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  1135. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllTypesLite.RepeatedGroup)
  1136. }
  1137. size_t TestAllTypesLite_RepeatedGroup::ByteSizeLong() const {
  1138. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllTypesLite.RepeatedGroup)
  1139. size_t total_size = 0;
  1140. total_size += _internal_metadata_.unknown_fields().size();
  1141. // optional int32 a = 47;
  1142. if (has_a()) {
  1143. total_size += 2 +
  1144. ::google::protobuf::internal::WireFormatLite::Int32Size(
  1145. this->a());
  1146. }
  1147. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1148. SetCachedSize(cached_size);
  1149. return total_size;
  1150. }
  1151. void TestAllTypesLite_RepeatedGroup::CheckTypeAndMergeFrom(
  1152. const ::google::protobuf::MessageLite& from) {
  1153. MergeFrom(*::google::protobuf::down_cast<const TestAllTypesLite_RepeatedGroup*>(&from));
  1154. }
  1155. void TestAllTypesLite_RepeatedGroup::MergeFrom(const TestAllTypesLite_RepeatedGroup& from) {
  1156. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestAllTypesLite.RepeatedGroup)
  1157. GOOGLE_DCHECK_NE(&from, this);
  1158. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1159. ::google::protobuf::uint32 cached_has_bits = 0;
  1160. (void) cached_has_bits;
  1161. if (from.has_a()) {
  1162. set_a(from.a());
  1163. }
  1164. }
  1165. void TestAllTypesLite_RepeatedGroup::CopyFrom(const TestAllTypesLite_RepeatedGroup& from) {
  1166. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllTypesLite.RepeatedGroup)
  1167. if (&from == this) return;
  1168. Clear();
  1169. MergeFrom(from);
  1170. }
  1171. bool TestAllTypesLite_RepeatedGroup::IsInitialized() const {
  1172. return true;
  1173. }
  1174. void TestAllTypesLite_RepeatedGroup::Swap(TestAllTypesLite_RepeatedGroup* other) {
  1175. if (other == this) return;
  1176. InternalSwap(other);
  1177. }
  1178. void TestAllTypesLite_RepeatedGroup::InternalSwap(TestAllTypesLite_RepeatedGroup* other) {
  1179. using std::swap;
  1180. swap(a_, other->a_);
  1181. swap(_has_bits_[0], other->_has_bits_[0]);
  1182. _internal_metadata_.Swap(&other->_internal_metadata_);
  1183. }
  1184. ::std::string TestAllTypesLite_RepeatedGroup::GetTypeName() const {
  1185. return "protobuf_unittest.TestAllTypesLite.RepeatedGroup";
  1186. }
  1187. // ===================================================================
  1188. void TestAllTypesLite::InitAsDefaultInstance() {
  1189. ::protobuf_unittest::_TestAllTypesLite_default_instance_._instance.get_mutable()->optionalgroup_ = const_cast< ::protobuf_unittest::TestAllTypesLite_OptionalGroup*>(
  1190. ::protobuf_unittest::TestAllTypesLite_OptionalGroup::internal_default_instance());
  1191. ::protobuf_unittest::_TestAllTypesLite_default_instance_._instance.get_mutable()->optional_nested_message_ = const_cast< ::protobuf_unittest::TestAllTypesLite_NestedMessage*>(
  1192. ::protobuf_unittest::TestAllTypesLite_NestedMessage::internal_default_instance());
  1193. ::protobuf_unittest::_TestAllTypesLite_default_instance_._instance.get_mutable()->optional_foreign_message_ = const_cast< ::protobuf_unittest::ForeignMessageLite*>(
  1194. ::protobuf_unittest::ForeignMessageLite::internal_default_instance());
  1195. ::protobuf_unittest::_TestAllTypesLite_default_instance_._instance.get_mutable()->optional_import_message_ = const_cast< ::protobuf_unittest_import::ImportMessageLite*>(
  1196. ::protobuf_unittest_import::ImportMessageLite::internal_default_instance());
  1197. ::protobuf_unittest::_TestAllTypesLite_default_instance_._instance.get_mutable()->optional_public_import_message_ = const_cast< ::protobuf_unittest_import::PublicImportMessageLite*>(
  1198. ::protobuf_unittest_import::PublicImportMessageLite::internal_default_instance());
  1199. ::protobuf_unittest::_TestAllTypesLite_default_instance_._instance.get_mutable()->optional_lazy_message_ = const_cast< ::protobuf_unittest::TestAllTypesLite_NestedMessage*>(
  1200. ::protobuf_unittest::TestAllTypesLite_NestedMessage::internal_default_instance());
  1201. }
  1202. void TestAllTypesLite::clear_optional_import_message() {
  1203. if (optional_import_message_ != NULL) optional_import_message_->Clear();
  1204. clear_has_optional_import_message();
  1205. }
  1206. void TestAllTypesLite::clear_optional_public_import_message() {
  1207. if (optional_public_import_message_ != NULL) optional_public_import_message_->Clear();
  1208. clear_has_optional_public_import_message();
  1209. }
  1210. void TestAllTypesLite::clear_repeated_import_message() {
  1211. repeated_import_message_.Clear();
  1212. }
  1213. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_;
  1214. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_bytes_;
  1215. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_piece_;
  1216. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_cord_;
  1217. void TestAllTypesLite::set_allocated_oneof_nested_message(::protobuf_unittest::TestAllTypesLite_NestedMessage* oneof_nested_message) {
  1218. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1219. clear_oneof_field();
  1220. if (oneof_nested_message) {
  1221. ::google::protobuf::Arena* submessage_arena = NULL;
  1222. if (message_arena != submessage_arena) {
  1223. oneof_nested_message = ::google::protobuf::internal::GetOwnedMessage(
  1224. message_arena, oneof_nested_message, submessage_arena);
  1225. }
  1226. set_has_oneof_nested_message();
  1227. oneof_field_.oneof_nested_message_ = oneof_nested_message;
  1228. }
  1229. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestAllTypesLite.oneof_nested_message)
  1230. }
  1231. void TestAllTypesLite::set_allocated_oneof_lazy_nested_message(::protobuf_unittest::TestAllTypesLite_NestedMessage* oneof_lazy_nested_message) {
  1232. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1233. clear_oneof_field();
  1234. if (oneof_lazy_nested_message) {
  1235. ::google::protobuf::Arena* submessage_arena = NULL;
  1236. if (message_arena != submessage_arena) {
  1237. oneof_lazy_nested_message = ::google::protobuf::internal::GetOwnedMessage(
  1238. message_arena, oneof_lazy_nested_message, submessage_arena);
  1239. }
  1240. set_has_oneof_lazy_nested_message();
  1241. oneof_field_.oneof_lazy_nested_message_ = oneof_lazy_nested_message;
  1242. }
  1243. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestAllTypesLite.oneof_lazy_nested_message)
  1244. }
  1245. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1246. const int TestAllTypesLite::kOptionalInt32FieldNumber;
  1247. const int TestAllTypesLite::kOptionalInt64FieldNumber;
  1248. const int TestAllTypesLite::kOptionalUint32FieldNumber;
  1249. const int TestAllTypesLite::kOptionalUint64FieldNumber;
  1250. const int TestAllTypesLite::kOptionalSint32FieldNumber;
  1251. const int TestAllTypesLite::kOptionalSint64FieldNumber;
  1252. const int TestAllTypesLite::kOptionalFixed32FieldNumber;
  1253. const int TestAllTypesLite::kOptionalFixed64FieldNumber;
  1254. const int TestAllTypesLite::kOptionalSfixed32FieldNumber;
  1255. const int TestAllTypesLite::kOptionalSfixed64FieldNumber;
  1256. const int TestAllTypesLite::kOptionalFloatFieldNumber;
  1257. const int TestAllTypesLite::kOptionalDoubleFieldNumber;
  1258. const int TestAllTypesLite::kOptionalBoolFieldNumber;
  1259. const int TestAllTypesLite::kOptionalStringFieldNumber;
  1260. const int TestAllTypesLite::kOptionalBytesFieldNumber;
  1261. const int TestAllTypesLite::kOptionalgroupFieldNumber;
  1262. const int TestAllTypesLite::kOptionalNestedMessageFieldNumber;
  1263. const int TestAllTypesLite::kOptionalForeignMessageFieldNumber;
  1264. const int TestAllTypesLite::kOptionalImportMessageFieldNumber;
  1265. const int TestAllTypesLite::kOptionalNestedEnumFieldNumber;
  1266. const int TestAllTypesLite::kOptionalForeignEnumFieldNumber;
  1267. const int TestAllTypesLite::kOptionalImportEnumFieldNumber;
  1268. const int TestAllTypesLite::kOptionalStringPieceFieldNumber;
  1269. const int TestAllTypesLite::kOptionalCordFieldNumber;
  1270. const int TestAllTypesLite::kOptionalPublicImportMessageFieldNumber;
  1271. const int TestAllTypesLite::kOptionalLazyMessageFieldNumber;
  1272. const int TestAllTypesLite::kRepeatedInt32FieldNumber;
  1273. const int TestAllTypesLite::kRepeatedInt64FieldNumber;
  1274. const int TestAllTypesLite::kRepeatedUint32FieldNumber;
  1275. const int TestAllTypesLite::kRepeatedUint64FieldNumber;
  1276. const int TestAllTypesLite::kRepeatedSint32FieldNumber;
  1277. const int TestAllTypesLite::kRepeatedSint64FieldNumber;
  1278. const int TestAllTypesLite::kRepeatedFixed32FieldNumber;
  1279. const int TestAllTypesLite::kRepeatedFixed64FieldNumber;
  1280. const int TestAllTypesLite::kRepeatedSfixed32FieldNumber;
  1281. const int TestAllTypesLite::kRepeatedSfixed64FieldNumber;
  1282. const int TestAllTypesLite::kRepeatedFloatFieldNumber;
  1283. const int TestAllTypesLite::kRepeatedDoubleFieldNumber;
  1284. const int TestAllTypesLite::kRepeatedBoolFieldNumber;
  1285. const int TestAllTypesLite::kRepeatedStringFieldNumber;
  1286. const int TestAllTypesLite::kRepeatedBytesFieldNumber;
  1287. const int TestAllTypesLite::kRepeatedgroupFieldNumber;
  1288. const int TestAllTypesLite::kRepeatedNestedMessageFieldNumber;
  1289. const int TestAllTypesLite::kRepeatedForeignMessageFieldNumber;
  1290. const int TestAllTypesLite::kRepeatedImportMessageFieldNumber;
  1291. const int TestAllTypesLite::kRepeatedNestedEnumFieldNumber;
  1292. const int TestAllTypesLite::kRepeatedForeignEnumFieldNumber;
  1293. const int TestAllTypesLite::kRepeatedImportEnumFieldNumber;
  1294. const int TestAllTypesLite::kRepeatedStringPieceFieldNumber;
  1295. const int TestAllTypesLite::kRepeatedCordFieldNumber;
  1296. const int TestAllTypesLite::kRepeatedLazyMessageFieldNumber;
  1297. const int TestAllTypesLite::kDefaultInt32FieldNumber;
  1298. const int TestAllTypesLite::kDefaultInt64FieldNumber;
  1299. const int TestAllTypesLite::kDefaultUint32FieldNumber;
  1300. const int TestAllTypesLite::kDefaultUint64FieldNumber;
  1301. const int TestAllTypesLite::kDefaultSint32FieldNumber;
  1302. const int TestAllTypesLite::kDefaultSint64FieldNumber;
  1303. const int TestAllTypesLite::kDefaultFixed32FieldNumber;
  1304. const int TestAllTypesLite::kDefaultFixed64FieldNumber;
  1305. const int TestAllTypesLite::kDefaultSfixed32FieldNumber;
  1306. const int TestAllTypesLite::kDefaultSfixed64FieldNumber;
  1307. const int TestAllTypesLite::kDefaultFloatFieldNumber;
  1308. const int TestAllTypesLite::kDefaultDoubleFieldNumber;
  1309. const int TestAllTypesLite::kDefaultBoolFieldNumber;
  1310. const int TestAllTypesLite::kDefaultStringFieldNumber;
  1311. const int TestAllTypesLite::kDefaultBytesFieldNumber;
  1312. const int TestAllTypesLite::kDefaultNestedEnumFieldNumber;
  1313. const int TestAllTypesLite::kDefaultForeignEnumFieldNumber;
  1314. const int TestAllTypesLite::kDefaultImportEnumFieldNumber;
  1315. const int TestAllTypesLite::kDefaultStringPieceFieldNumber;
  1316. const int TestAllTypesLite::kDefaultCordFieldNumber;
  1317. const int TestAllTypesLite::kOneofUint32FieldNumber;
  1318. const int TestAllTypesLite::kOneofNestedMessageFieldNumber;
  1319. const int TestAllTypesLite::kOneofStringFieldNumber;
  1320. const int TestAllTypesLite::kOneofBytesFieldNumber;
  1321. const int TestAllTypesLite::kOneofLazyNestedMessageFieldNumber;
  1322. const int TestAllTypesLite::kDeceptivelyNamedListFieldNumber;
  1323. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1324. TestAllTypesLite::TestAllTypesLite()
  1325. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  1326. ::google::protobuf::internal::InitSCC(
  1327. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite.base);
  1328. SharedCtor();
  1329. // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllTypesLite)
  1330. }
  1331. TestAllTypesLite::TestAllTypesLite(const TestAllTypesLite& from)
  1332. : ::google::protobuf::MessageLite(),
  1333. _internal_metadata_(NULL),
  1334. _has_bits_(from._has_bits_),
  1335. repeated_int32_(from.repeated_int32_),
  1336. repeated_int64_(from.repeated_int64_),
  1337. repeated_uint32_(from.repeated_uint32_),
  1338. repeated_uint64_(from.repeated_uint64_),
  1339. repeated_sint32_(from.repeated_sint32_),
  1340. repeated_sint64_(from.repeated_sint64_),
  1341. repeated_fixed32_(from.repeated_fixed32_),
  1342. repeated_fixed64_(from.repeated_fixed64_),
  1343. repeated_sfixed32_(from.repeated_sfixed32_),
  1344. repeated_sfixed64_(from.repeated_sfixed64_),
  1345. repeated_float_(from.repeated_float_),
  1346. repeated_double_(from.repeated_double_),
  1347. repeated_bool_(from.repeated_bool_),
  1348. repeated_string_(from.repeated_string_),
  1349. repeated_bytes_(from.repeated_bytes_),
  1350. repeatedgroup_(from.repeatedgroup_),
  1351. repeated_nested_message_(from.repeated_nested_message_),
  1352. repeated_foreign_message_(from.repeated_foreign_message_),
  1353. repeated_import_message_(from.repeated_import_message_),
  1354. repeated_nested_enum_(from.repeated_nested_enum_),
  1355. repeated_foreign_enum_(from.repeated_foreign_enum_),
  1356. repeated_import_enum_(from.repeated_import_enum_),
  1357. repeated_string_piece_(from.repeated_string_piece_),
  1358. repeated_cord_(from.repeated_cord_),
  1359. repeated_lazy_message_(from.repeated_lazy_message_) {
  1360. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1361. optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1362. if (from.has_optional_string()) {
  1363. optional_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_);
  1364. }
  1365. optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1366. if (from.has_optional_bytes()) {
  1367. optional_bytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes_);
  1368. }
  1369. optional_string_piece_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1370. if (from.has_optional_string_piece()) {
  1371. optional_string_piece_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_piece_);
  1372. }
  1373. optional_cord_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1374. if (from.has_optional_cord()) {
  1375. optional_cord_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_cord_);
  1376. }
  1377. default_string_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_.get());
  1378. if (from.has_default_string()) {
  1379. default_string_.AssignWithDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_.get(), from.default_string_);
  1380. }
  1381. default_bytes_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_bytes_.get());
  1382. if (from.has_default_bytes()) {
  1383. default_bytes_.AssignWithDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_bytes_.get(), from.default_bytes_);
  1384. }
  1385. default_string_piece_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
  1386. if (from.has_default_string_piece()) {
  1387. default_string_piece_.AssignWithDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_piece_.get(), from.default_string_piece_);
  1388. }
  1389. default_cord_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_cord_.get());
  1390. if (from.has_default_cord()) {
  1391. default_cord_.AssignWithDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_cord_.get(), from.default_cord_);
  1392. }
  1393. if (from.has_optionalgroup()) {
  1394. optionalgroup_ = new ::protobuf_unittest::TestAllTypesLite_OptionalGroup(*from.optionalgroup_);
  1395. } else {
  1396. optionalgroup_ = NULL;
  1397. }
  1398. if (from.has_optional_nested_message()) {
  1399. optional_nested_message_ = new ::protobuf_unittest::TestAllTypesLite_NestedMessage(*from.optional_nested_message_);
  1400. } else {
  1401. optional_nested_message_ = NULL;
  1402. }
  1403. if (from.has_optional_foreign_message()) {
  1404. optional_foreign_message_ = new ::protobuf_unittest::ForeignMessageLite(*from.optional_foreign_message_);
  1405. } else {
  1406. optional_foreign_message_ = NULL;
  1407. }
  1408. if (from.has_optional_import_message()) {
  1409. optional_import_message_ = new ::protobuf_unittest_import::ImportMessageLite(*from.optional_import_message_);
  1410. } else {
  1411. optional_import_message_ = NULL;
  1412. }
  1413. if (from.has_optional_public_import_message()) {
  1414. optional_public_import_message_ = new ::protobuf_unittest_import::PublicImportMessageLite(*from.optional_public_import_message_);
  1415. } else {
  1416. optional_public_import_message_ = NULL;
  1417. }
  1418. if (from.has_optional_lazy_message()) {
  1419. optional_lazy_message_ = new ::protobuf_unittest::TestAllTypesLite_NestedMessage(*from.optional_lazy_message_);
  1420. } else {
  1421. optional_lazy_message_ = NULL;
  1422. }
  1423. ::memcpy(&optional_int64_, &from.optional_int64_,
  1424. static_cast<size_t>(reinterpret_cast<char*>(&default_foreign_enum_) -
  1425. reinterpret_cast<char*>(&optional_int64_)) + sizeof(default_foreign_enum_));
  1426. clear_has_oneof_field();
  1427. switch (from.oneof_field_case()) {
  1428. case kOneofUint32: {
  1429. set_oneof_uint32(from.oneof_uint32());
  1430. break;
  1431. }
  1432. case kOneofNestedMessage: {
  1433. mutable_oneof_nested_message()->::protobuf_unittest::TestAllTypesLite_NestedMessage::MergeFrom(from.oneof_nested_message());
  1434. break;
  1435. }
  1436. case kOneofString: {
  1437. set_oneof_string(from.oneof_string());
  1438. break;
  1439. }
  1440. case kOneofBytes: {
  1441. set_oneof_bytes(from.oneof_bytes());
  1442. break;
  1443. }
  1444. case kOneofLazyNestedMessage: {
  1445. mutable_oneof_lazy_nested_message()->::protobuf_unittest::TestAllTypesLite_NestedMessage::MergeFrom(from.oneof_lazy_nested_message());
  1446. break;
  1447. }
  1448. case ONEOF_FIELD_NOT_SET: {
  1449. break;
  1450. }
  1451. }
  1452. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllTypesLite)
  1453. }
  1454. void TestAllTypesLite::SharedCtor() {
  1455. optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1456. optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1457. optional_string_piece_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1458. optional_cord_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1459. default_string_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_.get());
  1460. default_bytes_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_bytes_.get());
  1461. default_string_piece_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
  1462. default_cord_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_cord_.get());
  1463. ::memset(&optionalgroup_, 0, static_cast<size_t>(
  1464. reinterpret_cast<char*>(&deceptively_named_list_) -
  1465. reinterpret_cast<char*>(&optionalgroup_)) + sizeof(deceptively_named_list_));
  1466. default_import_enum_ = 8;
  1467. optional_nested_enum_ = 1;
  1468. optional_foreign_enum_ = 4;
  1469. optional_import_enum_ = 7;
  1470. default_int32_ = 41;
  1471. default_int64_ = GOOGLE_LONGLONG(42);
  1472. default_uint64_ = GOOGLE_ULONGLONG(44);
  1473. default_uint32_ = 43u;
  1474. default_sint32_ = -45;
  1475. default_sint64_ = GOOGLE_LONGLONG(46);
  1476. default_fixed64_ = GOOGLE_ULONGLONG(48);
  1477. default_fixed32_ = 47u;
  1478. default_sfixed32_ = 49;
  1479. default_sfixed64_ = GOOGLE_LONGLONG(-50);
  1480. default_double_ = 52000;
  1481. default_float_ = 51.5f;
  1482. default_bool_ = true;
  1483. default_nested_enum_ = 2;
  1484. default_foreign_enum_ = 5;
  1485. clear_has_oneof_field();
  1486. }
  1487. TestAllTypesLite::~TestAllTypesLite() {
  1488. // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllTypesLite)
  1489. SharedDtor();
  1490. }
  1491. void TestAllTypesLite::SharedDtor() {
  1492. optional_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1493. optional_bytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1494. optional_string_piece_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1495. optional_cord_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1496. default_string_.DestroyNoArena(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_.get());
  1497. default_bytes_.DestroyNoArena(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_bytes_.get());
  1498. default_string_piece_.DestroyNoArena(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
  1499. default_cord_.DestroyNoArena(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_cord_.get());
  1500. if (this != internal_default_instance()) delete optionalgroup_;
  1501. if (this != internal_default_instance()) delete optional_nested_message_;
  1502. if (this != internal_default_instance()) delete optional_foreign_message_;
  1503. if (this != internal_default_instance()) delete optional_import_message_;
  1504. if (this != internal_default_instance()) delete optional_public_import_message_;
  1505. if (this != internal_default_instance()) delete optional_lazy_message_;
  1506. if (has_oneof_field()) {
  1507. clear_oneof_field();
  1508. }
  1509. }
  1510. void TestAllTypesLite::SetCachedSize(int size) const {
  1511. _cached_size_.Set(size);
  1512. }
  1513. const TestAllTypesLite& TestAllTypesLite::default_instance() {
  1514. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllTypesLite.base);
  1515. return *internal_default_instance();
  1516. }
  1517. void TestAllTypesLite::clear_oneof_field() {
  1518. // @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestAllTypesLite)
  1519. switch (oneof_field_case()) {
  1520. case kOneofUint32: {
  1521. // No need to clear
  1522. break;
  1523. }
  1524. case kOneofNestedMessage: {
  1525. delete oneof_field_.oneof_nested_message_;
  1526. break;
  1527. }
  1528. case kOneofString: {
  1529. oneof_field_.oneof_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1530. break;
  1531. }
  1532. case kOneofBytes: {
  1533. oneof_field_.oneof_bytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1534. break;
  1535. }
  1536. case kOneofLazyNestedMessage: {
  1537. delete oneof_field_.oneof_lazy_nested_message_;
  1538. break;
  1539. }
  1540. case ONEOF_FIELD_NOT_SET: {
  1541. break;
  1542. }
  1543. }
  1544. _oneof_case_[0] = ONEOF_FIELD_NOT_SET;
  1545. }
  1546. void TestAllTypesLite::Clear() {
  1547. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestAllTypesLite)
  1548. ::google::protobuf::uint32 cached_has_bits = 0;
  1549. // Prevent compiler warnings about cached_has_bits being unused
  1550. (void) cached_has_bits;
  1551. repeated_int32_.Clear();
  1552. repeated_int64_.Clear();
  1553. repeated_uint32_.Clear();
  1554. repeated_uint64_.Clear();
  1555. repeated_sint32_.Clear();
  1556. repeated_sint64_.Clear();
  1557. repeated_fixed32_.Clear();
  1558. repeated_fixed64_.Clear();
  1559. repeated_sfixed32_.Clear();
  1560. repeated_sfixed64_.Clear();
  1561. repeated_float_.Clear();
  1562. repeated_double_.Clear();
  1563. repeated_bool_.Clear();
  1564. repeated_string_.Clear();
  1565. repeated_bytes_.Clear();
  1566. repeatedgroup_.Clear();
  1567. repeated_nested_message_.Clear();
  1568. repeated_foreign_message_.Clear();
  1569. repeated_import_message_.Clear();
  1570. repeated_nested_enum_.Clear();
  1571. repeated_foreign_enum_.Clear();
  1572. repeated_import_enum_.Clear();
  1573. repeated_string_piece_.Clear();
  1574. repeated_cord_.Clear();
  1575. repeated_lazy_message_.Clear();
  1576. cached_has_bits = _has_bits_[0];
  1577. if (cached_has_bits & 255u) {
  1578. if (cached_has_bits & 0x00000001u) {
  1579. optional_string_.ClearNonDefaultToEmptyNoArena();
  1580. }
  1581. if (cached_has_bits & 0x00000002u) {
  1582. optional_bytes_.ClearNonDefaultToEmptyNoArena();
  1583. }
  1584. if (cached_has_bits & 0x00000004u) {
  1585. optional_string_piece_.ClearNonDefaultToEmptyNoArena();
  1586. }
  1587. if (cached_has_bits & 0x00000008u) {
  1588. optional_cord_.ClearNonDefaultToEmptyNoArena();
  1589. }
  1590. if (cached_has_bits & 0x00000010u) {
  1591. default_string_.UnsafeMutablePointer()->assign(*&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_.get());
  1592. }
  1593. if (cached_has_bits & 0x00000020u) {
  1594. default_bytes_.UnsafeMutablePointer()->assign(*&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_bytes_.get());
  1595. }
  1596. if (cached_has_bits & 0x00000040u) {
  1597. default_string_piece_.UnsafeMutablePointer()->assign(*&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
  1598. }
  1599. if (cached_has_bits & 0x00000080u) {
  1600. default_cord_.UnsafeMutablePointer()->assign(*&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_cord_.get());
  1601. }
  1602. }
  1603. if (cached_has_bits & 16128u) {
  1604. if (cached_has_bits & 0x00000100u) {
  1605. GOOGLE_DCHECK(optionalgroup_ != NULL);
  1606. optionalgroup_->Clear();
  1607. }
  1608. if (cached_has_bits & 0x00000200u) {
  1609. GOOGLE_DCHECK(optional_nested_message_ != NULL);
  1610. optional_nested_message_->Clear();
  1611. }
  1612. if (cached_has_bits & 0x00000400u) {
  1613. GOOGLE_DCHECK(optional_foreign_message_ != NULL);
  1614. optional_foreign_message_->Clear();
  1615. }
  1616. if (cached_has_bits & 0x00000800u) {
  1617. GOOGLE_DCHECK(optional_import_message_ != NULL);
  1618. optional_import_message_->Clear();
  1619. }
  1620. if (cached_has_bits & 0x00001000u) {
  1621. GOOGLE_DCHECK(optional_public_import_message_ != NULL);
  1622. optional_public_import_message_->Clear();
  1623. }
  1624. if (cached_has_bits & 0x00002000u) {
  1625. GOOGLE_DCHECK(optional_lazy_message_ != NULL);
  1626. optional_lazy_message_->Clear();
  1627. }
  1628. }
  1629. if (cached_has_bits & 49152u) {
  1630. ::memset(&optional_int64_, 0, static_cast<size_t>(
  1631. reinterpret_cast<char*>(&optional_int32_) -
  1632. reinterpret_cast<char*>(&optional_int64_)) + sizeof(optional_int32_));
  1633. }
  1634. if (cached_has_bits & 16711680u) {
  1635. ::memset(&optional_uint32_, 0, static_cast<size_t>(
  1636. reinterpret_cast<char*>(&optional_sfixed32_) -
  1637. reinterpret_cast<char*>(&optional_uint32_)) + sizeof(optional_sfixed32_));
  1638. }
  1639. if (cached_has_bits & 4278190080u) {
  1640. ::memset(&optional_float_, 0, static_cast<size_t>(
  1641. reinterpret_cast<char*>(&deceptively_named_list_) -
  1642. reinterpret_cast<char*>(&optional_float_)) + sizeof(deceptively_named_list_));
  1643. default_import_enum_ = 8;
  1644. optional_nested_enum_ = 1;
  1645. optional_foreign_enum_ = 4;
  1646. optional_import_enum_ = 7;
  1647. }
  1648. cached_has_bits = _has_bits_[1];
  1649. if (cached_has_bits & 255u) {
  1650. default_int32_ = 41;
  1651. default_int64_ = GOOGLE_LONGLONG(42);
  1652. default_uint64_ = GOOGLE_ULONGLONG(44);
  1653. default_uint32_ = 43u;
  1654. default_sint32_ = -45;
  1655. default_sint64_ = GOOGLE_LONGLONG(46);
  1656. default_fixed64_ = GOOGLE_ULONGLONG(48);
  1657. default_fixed32_ = 47u;
  1658. }
  1659. if (cached_has_bits & 32512u) {
  1660. default_sfixed32_ = 49;
  1661. default_sfixed64_ = GOOGLE_LONGLONG(-50);
  1662. default_double_ = 52000;
  1663. default_float_ = 51.5f;
  1664. default_bool_ = true;
  1665. default_nested_enum_ = 2;
  1666. default_foreign_enum_ = 5;
  1667. }
  1668. clear_oneof_field();
  1669. _has_bits_.Clear();
  1670. _internal_metadata_.Clear();
  1671. }
  1672. bool TestAllTypesLite::MergePartialFromCodedStream(
  1673. ::google::protobuf::io::CodedInputStream* input) {
  1674. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1675. ::google::protobuf::uint32 tag;
  1676. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  1677. &_internal_metadata_);
  1678. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  1679. unknown_fields_setter.buffer());
  1680. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  1681. &unknown_fields_output, false);
  1682. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestAllTypesLite)
  1683. for (;;) {
  1684. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  1685. tag = p.first;
  1686. if (!p.second) goto handle_unusual;
  1687. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1688. // optional int32 optional_int32 = 1;
  1689. case 1: {
  1690. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1691. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1692. set_has_optional_int32();
  1693. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1694. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  1695. input, &optional_int32_)));
  1696. } else {
  1697. goto handle_unusual;
  1698. }
  1699. break;
  1700. }
  1701. // optional int64 optional_int64 = 2;
  1702. case 2: {
  1703. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1704. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  1705. set_has_optional_int64();
  1706. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1707. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  1708. input, &optional_int64_)));
  1709. } else {
  1710. goto handle_unusual;
  1711. }
  1712. break;
  1713. }
  1714. // optional uint32 optional_uint32 = 3;
  1715. case 3: {
  1716. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1717. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  1718. set_has_optional_uint32();
  1719. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1720. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  1721. input, &optional_uint32_)));
  1722. } else {
  1723. goto handle_unusual;
  1724. }
  1725. break;
  1726. }
  1727. // optional uint64 optional_uint64 = 4;
  1728. case 4: {
  1729. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1730. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  1731. set_has_optional_uint64();
  1732. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1733. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  1734. input, &optional_uint64_)));
  1735. } else {
  1736. goto handle_unusual;
  1737. }
  1738. break;
  1739. }
  1740. // optional sint32 optional_sint32 = 5;
  1741. case 5: {
  1742. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1743. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  1744. set_has_optional_sint32();
  1745. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1746. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  1747. input, &optional_sint32_)));
  1748. } else {
  1749. goto handle_unusual;
  1750. }
  1751. break;
  1752. }
  1753. // optional sint64 optional_sint64 = 6;
  1754. case 6: {
  1755. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1756. static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
  1757. set_has_optional_sint64();
  1758. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1759. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  1760. input, &optional_sint64_)));
  1761. } else {
  1762. goto handle_unusual;
  1763. }
  1764. break;
  1765. }
  1766. // optional fixed32 optional_fixed32 = 7;
  1767. case 7: {
  1768. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1769. static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
  1770. set_has_optional_fixed32();
  1771. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1772. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  1773. input, &optional_fixed32_)));
  1774. } else {
  1775. goto handle_unusual;
  1776. }
  1777. break;
  1778. }
  1779. // optional fixed64 optional_fixed64 = 8;
  1780. case 8: {
  1781. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1782. static_cast< ::google::protobuf::uint8>(65u /* 65 & 0xFF */)) {
  1783. set_has_optional_fixed64();
  1784. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1785. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  1786. input, &optional_fixed64_)));
  1787. } else {
  1788. goto handle_unusual;
  1789. }
  1790. break;
  1791. }
  1792. // optional sfixed32 optional_sfixed32 = 9;
  1793. case 9: {
  1794. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1795. static_cast< ::google::protobuf::uint8>(77u /* 77 & 0xFF */)) {
  1796. set_has_optional_sfixed32();
  1797. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1798. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  1799. input, &optional_sfixed32_)));
  1800. } else {
  1801. goto handle_unusual;
  1802. }
  1803. break;
  1804. }
  1805. // optional sfixed64 optional_sfixed64 = 10;
  1806. case 10: {
  1807. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1808. static_cast< ::google::protobuf::uint8>(81u /* 81 & 0xFF */)) {
  1809. set_has_optional_sfixed64();
  1810. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1811. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  1812. input, &optional_sfixed64_)));
  1813. } else {
  1814. goto handle_unusual;
  1815. }
  1816. break;
  1817. }
  1818. // optional float optional_float = 11;
  1819. case 11: {
  1820. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1821. static_cast< ::google::protobuf::uint8>(93u /* 93 & 0xFF */)) {
  1822. set_has_optional_float();
  1823. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1824. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  1825. input, &optional_float_)));
  1826. } else {
  1827. goto handle_unusual;
  1828. }
  1829. break;
  1830. }
  1831. // optional double optional_double = 12;
  1832. case 12: {
  1833. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1834. static_cast< ::google::protobuf::uint8>(97u /* 97 & 0xFF */)) {
  1835. set_has_optional_double();
  1836. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1837. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  1838. input, &optional_double_)));
  1839. } else {
  1840. goto handle_unusual;
  1841. }
  1842. break;
  1843. }
  1844. // optional bool optional_bool = 13;
  1845. case 13: {
  1846. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1847. static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
  1848. set_has_optional_bool();
  1849. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1850. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  1851. input, &optional_bool_)));
  1852. } else {
  1853. goto handle_unusual;
  1854. }
  1855. break;
  1856. }
  1857. // optional string optional_string = 14;
  1858. case 14: {
  1859. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1860. static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
  1861. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1862. input, this->mutable_optional_string()));
  1863. } else {
  1864. goto handle_unusual;
  1865. }
  1866. break;
  1867. }
  1868. // optional bytes optional_bytes = 15;
  1869. case 15: {
  1870. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1871. static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
  1872. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  1873. input, this->mutable_optional_bytes()));
  1874. } else {
  1875. goto handle_unusual;
  1876. }
  1877. break;
  1878. }
  1879. // optional group OptionalGroup = 16 { ... };
  1880. case 16: {
  1881. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1882. static_cast< ::google::protobuf::uint8>(131u /* 131 & 0xFF */)) {
  1883. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
  1884. 16, input, mutable_optionalgroup()));
  1885. } else {
  1886. goto handle_unusual;
  1887. }
  1888. break;
  1889. }
  1890. // optional .protobuf_unittest.TestAllTypesLite.NestedMessage optional_nested_message = 18;
  1891. case 18: {
  1892. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1893. static_cast< ::google::protobuf::uint8>(146u /* 146 & 0xFF */)) {
  1894. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1895. input, mutable_optional_nested_message()));
  1896. } else {
  1897. goto handle_unusual;
  1898. }
  1899. break;
  1900. }
  1901. // optional .protobuf_unittest.ForeignMessageLite optional_foreign_message = 19;
  1902. case 19: {
  1903. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1904. static_cast< ::google::protobuf::uint8>(154u /* 154 & 0xFF */)) {
  1905. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1906. input, mutable_optional_foreign_message()));
  1907. } else {
  1908. goto handle_unusual;
  1909. }
  1910. break;
  1911. }
  1912. // optional .protobuf_unittest_import.ImportMessageLite optional_import_message = 20;
  1913. case 20: {
  1914. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1915. static_cast< ::google::protobuf::uint8>(162u /* 162 & 0xFF */)) {
  1916. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1917. input, mutable_optional_import_message()));
  1918. } else {
  1919. goto handle_unusual;
  1920. }
  1921. break;
  1922. }
  1923. // optional .protobuf_unittest.TestAllTypesLite.NestedEnum optional_nested_enum = 21;
  1924. case 21: {
  1925. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1926. static_cast< ::google::protobuf::uint8>(168u /* 168 & 0xFF */)) {
  1927. int value;
  1928. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1929. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1930. input, &value)));
  1931. if (::protobuf_unittest::TestAllTypesLite_NestedEnum_IsValid(value)) {
  1932. set_optional_nested_enum(static_cast< ::protobuf_unittest::TestAllTypesLite_NestedEnum >(value));
  1933. } else {
  1934. unknown_fields_stream.WriteVarint32(168u);
  1935. unknown_fields_stream.WriteVarint32(
  1936. static_cast< ::google::protobuf::uint32>(value));
  1937. }
  1938. } else {
  1939. goto handle_unusual;
  1940. }
  1941. break;
  1942. }
  1943. // optional .protobuf_unittest.ForeignEnumLite optional_foreign_enum = 22;
  1944. case 22: {
  1945. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1946. static_cast< ::google::protobuf::uint8>(176u /* 176 & 0xFF */)) {
  1947. int value;
  1948. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1949. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1950. input, &value)));
  1951. if (::protobuf_unittest::ForeignEnumLite_IsValid(value)) {
  1952. set_optional_foreign_enum(static_cast< ::protobuf_unittest::ForeignEnumLite >(value));
  1953. } else {
  1954. unknown_fields_stream.WriteVarint32(176u);
  1955. unknown_fields_stream.WriteVarint32(
  1956. static_cast< ::google::protobuf::uint32>(value));
  1957. }
  1958. } else {
  1959. goto handle_unusual;
  1960. }
  1961. break;
  1962. }
  1963. // optional .protobuf_unittest_import.ImportEnumLite optional_import_enum = 23;
  1964. case 23: {
  1965. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1966. static_cast< ::google::protobuf::uint8>(184u /* 184 & 0xFF */)) {
  1967. int value;
  1968. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1969. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1970. input, &value)));
  1971. if (::protobuf_unittest_import::ImportEnumLite_IsValid(value)) {
  1972. set_optional_import_enum(static_cast< ::protobuf_unittest_import::ImportEnumLite >(value));
  1973. } else {
  1974. unknown_fields_stream.WriteVarint32(184u);
  1975. unknown_fields_stream.WriteVarint32(
  1976. static_cast< ::google::protobuf::uint32>(value));
  1977. }
  1978. } else {
  1979. goto handle_unusual;
  1980. }
  1981. break;
  1982. }
  1983. // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
  1984. case 24: {
  1985. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1986. static_cast< ::google::protobuf::uint8>(194u /* 194 & 0xFF */)) {
  1987. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1988. input, this->mutable_optional_string_piece()));
  1989. } else {
  1990. goto handle_unusual;
  1991. }
  1992. break;
  1993. }
  1994. // optional string optional_cord = 25 [ctype = CORD];
  1995. case 25: {
  1996. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1997. static_cast< ::google::protobuf::uint8>(202u /* 202 & 0xFF */)) {
  1998. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1999. input, this->mutable_optional_cord()));
  2000. } else {
  2001. goto handle_unusual;
  2002. }
  2003. break;
  2004. }
  2005. // optional .protobuf_unittest_import.PublicImportMessageLite optional_public_import_message = 26;
  2006. case 26: {
  2007. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2008. static_cast< ::google::protobuf::uint8>(210u /* 210 & 0xFF */)) {
  2009. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2010. input, mutable_optional_public_import_message()));
  2011. } else {
  2012. goto handle_unusual;
  2013. }
  2014. break;
  2015. }
  2016. // optional .protobuf_unittest.TestAllTypesLite.NestedMessage optional_lazy_message = 27 [lazy = true];
  2017. case 27: {
  2018. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2019. static_cast< ::google::protobuf::uint8>(218u /* 218 & 0xFF */)) {
  2020. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2021. input, mutable_optional_lazy_message()));
  2022. } else {
  2023. goto handle_unusual;
  2024. }
  2025. break;
  2026. }
  2027. // repeated int32 repeated_int32 = 31;
  2028. case 31: {
  2029. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2030. static_cast< ::google::protobuf::uint8>(248u /* 248 & 0xFF */)) {
  2031. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  2032. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  2033. 2, 248u, input, this->mutable_repeated_int32())));
  2034. } else if (
  2035. static_cast< ::google::protobuf::uint8>(tag) ==
  2036. static_cast< ::google::protobuf::uint8>(250u /* 250 & 0xFF */)) {
  2037. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  2038. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  2039. input, this->mutable_repeated_int32())));
  2040. } else {
  2041. goto handle_unusual;
  2042. }
  2043. break;
  2044. }
  2045. // repeated int64 repeated_int64 = 32;
  2046. case 32: {
  2047. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2048. static_cast< ::google::protobuf::uint8>(0u /* 256 & 0xFF */)) {
  2049. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  2050. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  2051. 2, 256u, input, this->mutable_repeated_int64())));
  2052. } else if (
  2053. static_cast< ::google::protobuf::uint8>(tag) ==
  2054. static_cast< ::google::protobuf::uint8>(2u /* 258 & 0xFF */)) {
  2055. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  2056. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  2057. input, this->mutable_repeated_int64())));
  2058. } else {
  2059. goto handle_unusual;
  2060. }
  2061. break;
  2062. }
  2063. // repeated uint32 repeated_uint32 = 33;
  2064. case 33: {
  2065. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2066. static_cast< ::google::protobuf::uint8>(8u /* 264 & 0xFF */)) {
  2067. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  2068. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  2069. 2, 264u, input, this->mutable_repeated_uint32())));
  2070. } else if (
  2071. static_cast< ::google::protobuf::uint8>(tag) ==
  2072. static_cast< ::google::protobuf::uint8>(10u /* 266 & 0xFF */)) {
  2073. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  2074. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  2075. input, this->mutable_repeated_uint32())));
  2076. } else {
  2077. goto handle_unusual;
  2078. }
  2079. break;
  2080. }
  2081. // repeated uint64 repeated_uint64 = 34;
  2082. case 34: {
  2083. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2084. static_cast< ::google::protobuf::uint8>(16u /* 272 & 0xFF */)) {
  2085. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  2086. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  2087. 2, 272u, input, this->mutable_repeated_uint64())));
  2088. } else if (
  2089. static_cast< ::google::protobuf::uint8>(tag) ==
  2090. static_cast< ::google::protobuf::uint8>(18u /* 274 & 0xFF */)) {
  2091. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  2092. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  2093. input, this->mutable_repeated_uint64())));
  2094. } else {
  2095. goto handle_unusual;
  2096. }
  2097. break;
  2098. }
  2099. // repeated sint32 repeated_sint32 = 35;
  2100. case 35: {
  2101. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2102. static_cast< ::google::protobuf::uint8>(24u /* 280 & 0xFF */)) {
  2103. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  2104. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  2105. 2, 280u, input, this->mutable_repeated_sint32())));
  2106. } else if (
  2107. static_cast< ::google::protobuf::uint8>(tag) ==
  2108. static_cast< ::google::protobuf::uint8>(26u /* 282 & 0xFF */)) {
  2109. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  2110. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  2111. input, this->mutable_repeated_sint32())));
  2112. } else {
  2113. goto handle_unusual;
  2114. }
  2115. break;
  2116. }
  2117. // repeated sint64 repeated_sint64 = 36;
  2118. case 36: {
  2119. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2120. static_cast< ::google::protobuf::uint8>(32u /* 288 & 0xFF */)) {
  2121. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  2122. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  2123. 2, 288u, input, this->mutable_repeated_sint64())));
  2124. } else if (
  2125. static_cast< ::google::protobuf::uint8>(tag) ==
  2126. static_cast< ::google::protobuf::uint8>(34u /* 290 & 0xFF */)) {
  2127. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  2128. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  2129. input, this->mutable_repeated_sint64())));
  2130. } else {
  2131. goto handle_unusual;
  2132. }
  2133. break;
  2134. }
  2135. // repeated fixed32 repeated_fixed32 = 37;
  2136. case 37: {
  2137. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2138. static_cast< ::google::protobuf::uint8>(45u /* 301 & 0xFF */)) {
  2139. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  2140. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  2141. 2, 301u, input, this->mutable_repeated_fixed32())));
  2142. } else if (
  2143. static_cast< ::google::protobuf::uint8>(tag) ==
  2144. static_cast< ::google::protobuf::uint8>(42u /* 298 & 0xFF */)) {
  2145. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  2146. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  2147. input, this->mutable_repeated_fixed32())));
  2148. } else {
  2149. goto handle_unusual;
  2150. }
  2151. break;
  2152. }
  2153. // repeated fixed64 repeated_fixed64 = 38;
  2154. case 38: {
  2155. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2156. static_cast< ::google::protobuf::uint8>(49u /* 305 & 0xFF */)) {
  2157. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  2158. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  2159. 2, 305u, input, this->mutable_repeated_fixed64())));
  2160. } else if (
  2161. static_cast< ::google::protobuf::uint8>(tag) ==
  2162. static_cast< ::google::protobuf::uint8>(50u /* 306 & 0xFF */)) {
  2163. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  2164. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  2165. input, this->mutable_repeated_fixed64())));
  2166. } else {
  2167. goto handle_unusual;
  2168. }
  2169. break;
  2170. }
  2171. // repeated sfixed32 repeated_sfixed32 = 39;
  2172. case 39: {
  2173. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2174. static_cast< ::google::protobuf::uint8>(61u /* 317 & 0xFF */)) {
  2175. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  2176. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  2177. 2, 317u, input, this->mutable_repeated_sfixed32())));
  2178. } else if (
  2179. static_cast< ::google::protobuf::uint8>(tag) ==
  2180. static_cast< ::google::protobuf::uint8>(58u /* 314 & 0xFF */)) {
  2181. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  2182. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  2183. input, this->mutable_repeated_sfixed32())));
  2184. } else {
  2185. goto handle_unusual;
  2186. }
  2187. break;
  2188. }
  2189. // repeated sfixed64 repeated_sfixed64 = 40;
  2190. case 40: {
  2191. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2192. static_cast< ::google::protobuf::uint8>(65u /* 321 & 0xFF */)) {
  2193. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  2194. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  2195. 2, 321u, input, this->mutable_repeated_sfixed64())));
  2196. } else if (
  2197. static_cast< ::google::protobuf::uint8>(tag) ==
  2198. static_cast< ::google::protobuf::uint8>(66u /* 322 & 0xFF */)) {
  2199. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  2200. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  2201. input, this->mutable_repeated_sfixed64())));
  2202. } else {
  2203. goto handle_unusual;
  2204. }
  2205. break;
  2206. }
  2207. // repeated float repeated_float = 41;
  2208. case 41: {
  2209. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2210. static_cast< ::google::protobuf::uint8>(77u /* 333 & 0xFF */)) {
  2211. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  2212. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  2213. 2, 333u, input, this->mutable_repeated_float())));
  2214. } else if (
  2215. static_cast< ::google::protobuf::uint8>(tag) ==
  2216. static_cast< ::google::protobuf::uint8>(74u /* 330 & 0xFF */)) {
  2217. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  2218. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  2219. input, this->mutable_repeated_float())));
  2220. } else {
  2221. goto handle_unusual;
  2222. }
  2223. break;
  2224. }
  2225. // repeated double repeated_double = 42;
  2226. case 42: {
  2227. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2228. static_cast< ::google::protobuf::uint8>(81u /* 337 & 0xFF */)) {
  2229. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  2230. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  2231. 2, 337u, input, this->mutable_repeated_double())));
  2232. } else if (
  2233. static_cast< ::google::protobuf::uint8>(tag) ==
  2234. static_cast< ::google::protobuf::uint8>(82u /* 338 & 0xFF */)) {
  2235. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  2236. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  2237. input, this->mutable_repeated_double())));
  2238. } else {
  2239. goto handle_unusual;
  2240. }
  2241. break;
  2242. }
  2243. // repeated bool repeated_bool = 43;
  2244. case 43: {
  2245. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2246. static_cast< ::google::protobuf::uint8>(88u /* 344 & 0xFF */)) {
  2247. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  2248. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  2249. 2, 344u, input, this->mutable_repeated_bool())));
  2250. } else if (
  2251. static_cast< ::google::protobuf::uint8>(tag) ==
  2252. static_cast< ::google::protobuf::uint8>(90u /* 346 & 0xFF */)) {
  2253. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  2254. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  2255. input, this->mutable_repeated_bool())));
  2256. } else {
  2257. goto handle_unusual;
  2258. }
  2259. break;
  2260. }
  2261. // repeated string repeated_string = 44;
  2262. case 44: {
  2263. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2264. static_cast< ::google::protobuf::uint8>(98u /* 354 & 0xFF */)) {
  2265. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2266. input, this->add_repeated_string()));
  2267. } else {
  2268. goto handle_unusual;
  2269. }
  2270. break;
  2271. }
  2272. // repeated bytes repeated_bytes = 45;
  2273. case 45: {
  2274. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2275. static_cast< ::google::protobuf::uint8>(106u /* 362 & 0xFF */)) {
  2276. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  2277. input, this->add_repeated_bytes()));
  2278. } else {
  2279. goto handle_unusual;
  2280. }
  2281. break;
  2282. }
  2283. // repeated group RepeatedGroup = 46 { ... };
  2284. case 46: {
  2285. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2286. static_cast< ::google::protobuf::uint8>(115u /* 371 & 0xFF */)) {
  2287. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(46, input, add_repeatedgroup()));
  2288. } else {
  2289. goto handle_unusual;
  2290. }
  2291. break;
  2292. }
  2293. // repeated .protobuf_unittest.TestAllTypesLite.NestedMessage repeated_nested_message = 48;
  2294. case 48: {
  2295. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2296. static_cast< ::google::protobuf::uint8>(130u /* 386 & 0xFF */)) {
  2297. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2298. input, add_repeated_nested_message()));
  2299. } else {
  2300. goto handle_unusual;
  2301. }
  2302. break;
  2303. }
  2304. // repeated .protobuf_unittest.ForeignMessageLite repeated_foreign_message = 49;
  2305. case 49: {
  2306. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2307. static_cast< ::google::protobuf::uint8>(138u /* 394 & 0xFF */)) {
  2308. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2309. input, add_repeated_foreign_message()));
  2310. } else {
  2311. goto handle_unusual;
  2312. }
  2313. break;
  2314. }
  2315. // repeated .protobuf_unittest_import.ImportMessageLite repeated_import_message = 50;
  2316. case 50: {
  2317. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2318. static_cast< ::google::protobuf::uint8>(146u /* 402 & 0xFF */)) {
  2319. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2320. input, add_repeated_import_message()));
  2321. } else {
  2322. goto handle_unusual;
  2323. }
  2324. break;
  2325. }
  2326. // repeated .protobuf_unittest.TestAllTypesLite.NestedEnum repeated_nested_enum = 51;
  2327. case 51: {
  2328. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2329. static_cast< ::google::protobuf::uint8>(152u /* 408 & 0xFF */)) {
  2330. int value;
  2331. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2332. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  2333. input, &value)));
  2334. if (::protobuf_unittest::TestAllTypesLite_NestedEnum_IsValid(value)) {
  2335. add_repeated_nested_enum(static_cast< ::protobuf_unittest::TestAllTypesLite_NestedEnum >(value));
  2336. } else {
  2337. unknown_fields_stream.WriteVarint32(tag);
  2338. unknown_fields_stream.WriteVarint32(
  2339. static_cast< ::google::protobuf::uint32>(value));
  2340. }
  2341. } else if (
  2342. static_cast< ::google::protobuf::uint8>(tag) ==
  2343. static_cast< ::google::protobuf::uint8>(154u /* 410 & 0xFF */)) {
  2344. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedEnumPreserveUnknowns(
  2345. input,
  2346. 51,
  2347. ::protobuf_unittest::TestAllTypesLite_NestedEnum_IsValid,
  2348. &unknown_fields_stream,
  2349. this->mutable_repeated_nested_enum())));
  2350. } else {
  2351. goto handle_unusual;
  2352. }
  2353. break;
  2354. }
  2355. // repeated .protobuf_unittest.ForeignEnumLite repeated_foreign_enum = 52;
  2356. case 52: {
  2357. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2358. static_cast< ::google::protobuf::uint8>(160u /* 416 & 0xFF */)) {
  2359. int value;
  2360. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2361. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  2362. input, &value)));
  2363. if (::protobuf_unittest::ForeignEnumLite_IsValid(value)) {
  2364. add_repeated_foreign_enum(static_cast< ::protobuf_unittest::ForeignEnumLite >(value));
  2365. } else {
  2366. unknown_fields_stream.WriteVarint32(tag);
  2367. unknown_fields_stream.WriteVarint32(
  2368. static_cast< ::google::protobuf::uint32>(value));
  2369. }
  2370. } else if (
  2371. static_cast< ::google::protobuf::uint8>(tag) ==
  2372. static_cast< ::google::protobuf::uint8>(162u /* 418 & 0xFF */)) {
  2373. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedEnumPreserveUnknowns(
  2374. input,
  2375. 52,
  2376. ::protobuf_unittest::ForeignEnumLite_IsValid,
  2377. &unknown_fields_stream,
  2378. this->mutable_repeated_foreign_enum())));
  2379. } else {
  2380. goto handle_unusual;
  2381. }
  2382. break;
  2383. }
  2384. // repeated .protobuf_unittest_import.ImportEnumLite repeated_import_enum = 53;
  2385. case 53: {
  2386. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2387. static_cast< ::google::protobuf::uint8>(168u /* 424 & 0xFF */)) {
  2388. int value;
  2389. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2390. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  2391. input, &value)));
  2392. if (::protobuf_unittest_import::ImportEnumLite_IsValid(value)) {
  2393. add_repeated_import_enum(static_cast< ::protobuf_unittest_import::ImportEnumLite >(value));
  2394. } else {
  2395. unknown_fields_stream.WriteVarint32(tag);
  2396. unknown_fields_stream.WriteVarint32(
  2397. static_cast< ::google::protobuf::uint32>(value));
  2398. }
  2399. } else if (
  2400. static_cast< ::google::protobuf::uint8>(tag) ==
  2401. static_cast< ::google::protobuf::uint8>(170u /* 426 & 0xFF */)) {
  2402. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedEnumPreserveUnknowns(
  2403. input,
  2404. 53,
  2405. ::protobuf_unittest_import::ImportEnumLite_IsValid,
  2406. &unknown_fields_stream,
  2407. this->mutable_repeated_import_enum())));
  2408. } else {
  2409. goto handle_unusual;
  2410. }
  2411. break;
  2412. }
  2413. // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
  2414. case 54: {
  2415. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2416. static_cast< ::google::protobuf::uint8>(178u /* 434 & 0xFF */)) {
  2417. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2418. input, this->add_repeated_string_piece()));
  2419. } else {
  2420. goto handle_unusual;
  2421. }
  2422. break;
  2423. }
  2424. // repeated string repeated_cord = 55 [ctype = CORD];
  2425. case 55: {
  2426. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2427. static_cast< ::google::protobuf::uint8>(186u /* 442 & 0xFF */)) {
  2428. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2429. input, this->add_repeated_cord()));
  2430. } else {
  2431. goto handle_unusual;
  2432. }
  2433. break;
  2434. }
  2435. // repeated .protobuf_unittest.TestAllTypesLite.NestedMessage repeated_lazy_message = 57 [lazy = true];
  2436. case 57: {
  2437. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2438. static_cast< ::google::protobuf::uint8>(202u /* 458 & 0xFF */)) {
  2439. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2440. input, add_repeated_lazy_message()));
  2441. } else {
  2442. goto handle_unusual;
  2443. }
  2444. break;
  2445. }
  2446. // optional int32 default_int32 = 61 [default = 41];
  2447. case 61: {
  2448. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2449. static_cast< ::google::protobuf::uint8>(232u /* 488 & 0xFF */)) {
  2450. set_has_default_int32();
  2451. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2452. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  2453. input, &default_int32_)));
  2454. } else {
  2455. goto handle_unusual;
  2456. }
  2457. break;
  2458. }
  2459. // optional int64 default_int64 = 62 [default = 42];
  2460. case 62: {
  2461. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2462. static_cast< ::google::protobuf::uint8>(240u /* 496 & 0xFF */)) {
  2463. set_has_default_int64();
  2464. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2465. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  2466. input, &default_int64_)));
  2467. } else {
  2468. goto handle_unusual;
  2469. }
  2470. break;
  2471. }
  2472. // optional uint32 default_uint32 = 63 [default = 43];
  2473. case 63: {
  2474. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2475. static_cast< ::google::protobuf::uint8>(248u /* 504 & 0xFF */)) {
  2476. set_has_default_uint32();
  2477. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2478. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  2479. input, &default_uint32_)));
  2480. } else {
  2481. goto handle_unusual;
  2482. }
  2483. break;
  2484. }
  2485. // optional uint64 default_uint64 = 64 [default = 44];
  2486. case 64: {
  2487. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2488. static_cast< ::google::protobuf::uint8>(0u /* 512 & 0xFF */)) {
  2489. set_has_default_uint64();
  2490. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2491. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  2492. input, &default_uint64_)));
  2493. } else {
  2494. goto handle_unusual;
  2495. }
  2496. break;
  2497. }
  2498. // optional sint32 default_sint32 = 65 [default = -45];
  2499. case 65: {
  2500. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2501. static_cast< ::google::protobuf::uint8>(8u /* 520 & 0xFF */)) {
  2502. set_has_default_sint32();
  2503. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2504. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  2505. input, &default_sint32_)));
  2506. } else {
  2507. goto handle_unusual;
  2508. }
  2509. break;
  2510. }
  2511. // optional sint64 default_sint64 = 66 [default = 46];
  2512. case 66: {
  2513. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2514. static_cast< ::google::protobuf::uint8>(16u /* 528 & 0xFF */)) {
  2515. set_has_default_sint64();
  2516. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2517. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  2518. input, &default_sint64_)));
  2519. } else {
  2520. goto handle_unusual;
  2521. }
  2522. break;
  2523. }
  2524. // optional fixed32 default_fixed32 = 67 [default = 47];
  2525. case 67: {
  2526. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2527. static_cast< ::google::protobuf::uint8>(29u /* 541 & 0xFF */)) {
  2528. set_has_default_fixed32();
  2529. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2530. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  2531. input, &default_fixed32_)));
  2532. } else {
  2533. goto handle_unusual;
  2534. }
  2535. break;
  2536. }
  2537. // optional fixed64 default_fixed64 = 68 [default = 48];
  2538. case 68: {
  2539. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2540. static_cast< ::google::protobuf::uint8>(33u /* 545 & 0xFF */)) {
  2541. set_has_default_fixed64();
  2542. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2543. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  2544. input, &default_fixed64_)));
  2545. } else {
  2546. goto handle_unusual;
  2547. }
  2548. break;
  2549. }
  2550. // optional sfixed32 default_sfixed32 = 69 [default = 49];
  2551. case 69: {
  2552. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2553. static_cast< ::google::protobuf::uint8>(45u /* 557 & 0xFF */)) {
  2554. set_has_default_sfixed32();
  2555. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2556. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  2557. input, &default_sfixed32_)));
  2558. } else {
  2559. goto handle_unusual;
  2560. }
  2561. break;
  2562. }
  2563. // optional sfixed64 default_sfixed64 = 70 [default = -50];
  2564. case 70: {
  2565. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2566. static_cast< ::google::protobuf::uint8>(49u /* 561 & 0xFF */)) {
  2567. set_has_default_sfixed64();
  2568. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2569. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  2570. input, &default_sfixed64_)));
  2571. } else {
  2572. goto handle_unusual;
  2573. }
  2574. break;
  2575. }
  2576. // optional float default_float = 71 [default = 51.5];
  2577. case 71: {
  2578. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2579. static_cast< ::google::protobuf::uint8>(61u /* 573 & 0xFF */)) {
  2580. set_has_default_float();
  2581. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2582. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  2583. input, &default_float_)));
  2584. } else {
  2585. goto handle_unusual;
  2586. }
  2587. break;
  2588. }
  2589. // optional double default_double = 72 [default = 52000];
  2590. case 72: {
  2591. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2592. static_cast< ::google::protobuf::uint8>(65u /* 577 & 0xFF */)) {
  2593. set_has_default_double();
  2594. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2595. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  2596. input, &default_double_)));
  2597. } else {
  2598. goto handle_unusual;
  2599. }
  2600. break;
  2601. }
  2602. // optional bool default_bool = 73 [default = true];
  2603. case 73: {
  2604. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2605. static_cast< ::google::protobuf::uint8>(72u /* 584 & 0xFF */)) {
  2606. set_has_default_bool();
  2607. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2608. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  2609. input, &default_bool_)));
  2610. } else {
  2611. goto handle_unusual;
  2612. }
  2613. break;
  2614. }
  2615. // optional string default_string = 74 [default = "hello"];
  2616. case 74: {
  2617. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2618. static_cast< ::google::protobuf::uint8>(82u /* 594 & 0xFF */)) {
  2619. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2620. input, this->mutable_default_string()));
  2621. } else {
  2622. goto handle_unusual;
  2623. }
  2624. break;
  2625. }
  2626. // optional bytes default_bytes = 75 [default = "world"];
  2627. case 75: {
  2628. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2629. static_cast< ::google::protobuf::uint8>(90u /* 602 & 0xFF */)) {
  2630. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  2631. input, this->mutable_default_bytes()));
  2632. } else {
  2633. goto handle_unusual;
  2634. }
  2635. break;
  2636. }
  2637. // optional .protobuf_unittest.TestAllTypesLite.NestedEnum default_nested_enum = 81 [default = BAR];
  2638. case 81: {
  2639. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2640. static_cast< ::google::protobuf::uint8>(136u /* 648 & 0xFF */)) {
  2641. int value;
  2642. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2643. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  2644. input, &value)));
  2645. if (::protobuf_unittest::TestAllTypesLite_NestedEnum_IsValid(value)) {
  2646. set_default_nested_enum(static_cast< ::protobuf_unittest::TestAllTypesLite_NestedEnum >(value));
  2647. } else {
  2648. unknown_fields_stream.WriteVarint32(648u);
  2649. unknown_fields_stream.WriteVarint32(
  2650. static_cast< ::google::protobuf::uint32>(value));
  2651. }
  2652. } else {
  2653. goto handle_unusual;
  2654. }
  2655. break;
  2656. }
  2657. // optional .protobuf_unittest.ForeignEnumLite default_foreign_enum = 82 [default = FOREIGN_LITE_BAR];
  2658. case 82: {
  2659. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2660. static_cast< ::google::protobuf::uint8>(144u /* 656 & 0xFF */)) {
  2661. int value;
  2662. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2663. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  2664. input, &value)));
  2665. if (::protobuf_unittest::ForeignEnumLite_IsValid(value)) {
  2666. set_default_foreign_enum(static_cast< ::protobuf_unittest::ForeignEnumLite >(value));
  2667. } else {
  2668. unknown_fields_stream.WriteVarint32(656u);
  2669. unknown_fields_stream.WriteVarint32(
  2670. static_cast< ::google::protobuf::uint32>(value));
  2671. }
  2672. } else {
  2673. goto handle_unusual;
  2674. }
  2675. break;
  2676. }
  2677. // optional .protobuf_unittest_import.ImportEnumLite default_import_enum = 83 [default = IMPORT_LITE_BAR];
  2678. case 83: {
  2679. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2680. static_cast< ::google::protobuf::uint8>(152u /* 664 & 0xFF */)) {
  2681. int value;
  2682. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2683. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  2684. input, &value)));
  2685. if (::protobuf_unittest_import::ImportEnumLite_IsValid(value)) {
  2686. set_default_import_enum(static_cast< ::protobuf_unittest_import::ImportEnumLite >(value));
  2687. } else {
  2688. unknown_fields_stream.WriteVarint32(664u);
  2689. unknown_fields_stream.WriteVarint32(
  2690. static_cast< ::google::protobuf::uint32>(value));
  2691. }
  2692. } else {
  2693. goto handle_unusual;
  2694. }
  2695. break;
  2696. }
  2697. // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
  2698. case 84: {
  2699. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2700. static_cast< ::google::protobuf::uint8>(162u /* 674 & 0xFF */)) {
  2701. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2702. input, this->mutable_default_string_piece()));
  2703. } else {
  2704. goto handle_unusual;
  2705. }
  2706. break;
  2707. }
  2708. // optional string default_cord = 85 [default = "123", ctype = CORD];
  2709. case 85: {
  2710. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2711. static_cast< ::google::protobuf::uint8>(170u /* 682 & 0xFF */)) {
  2712. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2713. input, this->mutable_default_cord()));
  2714. } else {
  2715. goto handle_unusual;
  2716. }
  2717. break;
  2718. }
  2719. // optional uint32 oneof_uint32 = 111;
  2720. case 111: {
  2721. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2722. static_cast< ::google::protobuf::uint8>(120u /* 888 & 0xFF */)) {
  2723. clear_oneof_field();
  2724. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2725. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  2726. input, &oneof_field_.oneof_uint32_)));
  2727. set_has_oneof_uint32();
  2728. } else {
  2729. goto handle_unusual;
  2730. }
  2731. break;
  2732. }
  2733. // optional .protobuf_unittest.TestAllTypesLite.NestedMessage oneof_nested_message = 112;
  2734. case 112: {
  2735. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2736. static_cast< ::google::protobuf::uint8>(130u /* 898 & 0xFF */)) {
  2737. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2738. input, mutable_oneof_nested_message()));
  2739. } else {
  2740. goto handle_unusual;
  2741. }
  2742. break;
  2743. }
  2744. // optional string oneof_string = 113;
  2745. case 113: {
  2746. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2747. static_cast< ::google::protobuf::uint8>(138u /* 906 & 0xFF */)) {
  2748. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2749. input, this->mutable_oneof_string()));
  2750. } else {
  2751. goto handle_unusual;
  2752. }
  2753. break;
  2754. }
  2755. // optional bytes oneof_bytes = 114;
  2756. case 114: {
  2757. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2758. static_cast< ::google::protobuf::uint8>(146u /* 914 & 0xFF */)) {
  2759. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  2760. input, this->mutable_oneof_bytes()));
  2761. } else {
  2762. goto handle_unusual;
  2763. }
  2764. break;
  2765. }
  2766. // optional .protobuf_unittest.TestAllTypesLite.NestedMessage oneof_lazy_nested_message = 115 [lazy = true];
  2767. case 115: {
  2768. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2769. static_cast< ::google::protobuf::uint8>(154u /* 922 & 0xFF */)) {
  2770. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2771. input, mutable_oneof_lazy_nested_message()));
  2772. } else {
  2773. goto handle_unusual;
  2774. }
  2775. break;
  2776. }
  2777. // optional int32 deceptively_named_list = 116;
  2778. case 116: {
  2779. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2780. static_cast< ::google::protobuf::uint8>(160u /* 928 & 0xFF */)) {
  2781. set_has_deceptively_named_list();
  2782. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2783. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  2784. input, &deceptively_named_list_)));
  2785. } else {
  2786. goto handle_unusual;
  2787. }
  2788. break;
  2789. }
  2790. default: {
  2791. handle_unusual:
  2792. if (tag == 0) {
  2793. goto success;
  2794. }
  2795. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  2796. input, tag, &unknown_fields_stream));
  2797. break;
  2798. }
  2799. }
  2800. }
  2801. success:
  2802. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestAllTypesLite)
  2803. return true;
  2804. failure:
  2805. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllTypesLite)
  2806. return false;
  2807. #undef DO_
  2808. }
  2809. void TestAllTypesLite::SerializeWithCachedSizes(
  2810. ::google::protobuf::io::CodedOutputStream* output) const {
  2811. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestAllTypesLite)
  2812. ::google::protobuf::uint32 cached_has_bits = 0;
  2813. (void) cached_has_bits;
  2814. cached_has_bits = _has_bits_[0];
  2815. // optional int32 optional_int32 = 1;
  2816. if (cached_has_bits & 0x00008000u) {
  2817. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->optional_int32(), output);
  2818. }
  2819. // optional int64 optional_int64 = 2;
  2820. if (cached_has_bits & 0x00004000u) {
  2821. ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->optional_int64(), output);
  2822. }
  2823. // optional uint32 optional_uint32 = 3;
  2824. if (cached_has_bits & 0x00010000u) {
  2825. ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->optional_uint32(), output);
  2826. }
  2827. // optional uint64 optional_uint64 = 4;
  2828. if (cached_has_bits & 0x00020000u) {
  2829. ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->optional_uint64(), output);
  2830. }
  2831. // optional sint32 optional_sint32 = 5;
  2832. if (cached_has_bits & 0x00080000u) {
  2833. ::google::protobuf::internal::WireFormatLite::WriteSInt32(5, this->optional_sint32(), output);
  2834. }
  2835. // optional sint64 optional_sint64 = 6;
  2836. if (cached_has_bits & 0x00040000u) {
  2837. ::google::protobuf::internal::WireFormatLite::WriteSInt64(6, this->optional_sint64(), output);
  2838. }
  2839. // optional fixed32 optional_fixed32 = 7;
  2840. if (cached_has_bits & 0x00100000u) {
  2841. ::google::protobuf::internal::WireFormatLite::WriteFixed32(7, this->optional_fixed32(), output);
  2842. }
  2843. // optional fixed64 optional_fixed64 = 8;
  2844. if (cached_has_bits & 0x00200000u) {
  2845. ::google::protobuf::internal::WireFormatLite::WriteFixed64(8, this->optional_fixed64(), output);
  2846. }
  2847. // optional sfixed32 optional_sfixed32 = 9;
  2848. if (cached_has_bits & 0x00800000u) {
  2849. ::google::protobuf::internal::WireFormatLite::WriteSFixed32(9, this->optional_sfixed32(), output);
  2850. }
  2851. // optional sfixed64 optional_sfixed64 = 10;
  2852. if (cached_has_bits & 0x00400000u) {
  2853. ::google::protobuf::internal::WireFormatLite::WriteSFixed64(10, this->optional_sfixed64(), output);
  2854. }
  2855. // optional float optional_float = 11;
  2856. if (cached_has_bits & 0x01000000u) {
  2857. ::google::protobuf::internal::WireFormatLite::WriteFloat(11, this->optional_float(), output);
  2858. }
  2859. // optional double optional_double = 12;
  2860. if (cached_has_bits & 0x02000000u) {
  2861. ::google::protobuf::internal::WireFormatLite::WriteDouble(12, this->optional_double(), output);
  2862. }
  2863. // optional bool optional_bool = 13;
  2864. if (cached_has_bits & 0x04000000u) {
  2865. ::google::protobuf::internal::WireFormatLite::WriteBool(13, this->optional_bool(), output);
  2866. }
  2867. // optional string optional_string = 14;
  2868. if (cached_has_bits & 0x00000001u) {
  2869. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2870. 14, this->optional_string(), output);
  2871. }
  2872. // optional bytes optional_bytes = 15;
  2873. if (cached_has_bits & 0x00000002u) {
  2874. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  2875. 15, this->optional_bytes(), output);
  2876. }
  2877. // optional group OptionalGroup = 16 { ... };
  2878. if (cached_has_bits & 0x00000100u) {
  2879. ::google::protobuf::internal::WireFormatLite::WriteGroup(
  2880. 16, this->_internal_optionalgroup(), output);
  2881. }
  2882. // optional .protobuf_unittest.TestAllTypesLite.NestedMessage optional_nested_message = 18;
  2883. if (cached_has_bits & 0x00000200u) {
  2884. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  2885. 18, this->_internal_optional_nested_message(), output);
  2886. }
  2887. // optional .protobuf_unittest.ForeignMessageLite optional_foreign_message = 19;
  2888. if (cached_has_bits & 0x00000400u) {
  2889. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  2890. 19, this->_internal_optional_foreign_message(), output);
  2891. }
  2892. // optional .protobuf_unittest_import.ImportMessageLite optional_import_message = 20;
  2893. if (cached_has_bits & 0x00000800u) {
  2894. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  2895. 20, this->_internal_optional_import_message(), output);
  2896. }
  2897. // optional .protobuf_unittest.TestAllTypesLite.NestedEnum optional_nested_enum = 21;
  2898. if (cached_has_bits & 0x20000000u) {
  2899. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  2900. 21, this->optional_nested_enum(), output);
  2901. }
  2902. // optional .protobuf_unittest.ForeignEnumLite optional_foreign_enum = 22;
  2903. if (cached_has_bits & 0x40000000u) {
  2904. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  2905. 22, this->optional_foreign_enum(), output);
  2906. }
  2907. // optional .protobuf_unittest_import.ImportEnumLite optional_import_enum = 23;
  2908. if (cached_has_bits & 0x80000000u) {
  2909. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  2910. 23, this->optional_import_enum(), output);
  2911. }
  2912. // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
  2913. if (cached_has_bits & 0x00000004u) {
  2914. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2915. 24, this->optional_string_piece(), output);
  2916. }
  2917. // optional string optional_cord = 25 [ctype = CORD];
  2918. if (cached_has_bits & 0x00000008u) {
  2919. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2920. 25, this->optional_cord(), output);
  2921. }
  2922. // optional .protobuf_unittest_import.PublicImportMessageLite optional_public_import_message = 26;
  2923. if (cached_has_bits & 0x00001000u) {
  2924. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  2925. 26, this->_internal_optional_public_import_message(), output);
  2926. }
  2927. // optional .protobuf_unittest.TestAllTypesLite.NestedMessage optional_lazy_message = 27 [lazy = true];
  2928. if (cached_has_bits & 0x00002000u) {
  2929. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  2930. 27, this->_internal_optional_lazy_message(), output);
  2931. }
  2932. // repeated int32 repeated_int32 = 31;
  2933. for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
  2934. ::google::protobuf::internal::WireFormatLite::WriteInt32(
  2935. 31, this->repeated_int32(i), output);
  2936. }
  2937. // repeated int64 repeated_int64 = 32;
  2938. for (int i = 0, n = this->repeated_int64_size(); i < n; i++) {
  2939. ::google::protobuf::internal::WireFormatLite::WriteInt64(
  2940. 32, this->repeated_int64(i), output);
  2941. }
  2942. // repeated uint32 repeated_uint32 = 33;
  2943. for (int i = 0, n = this->repeated_uint32_size(); i < n; i++) {
  2944. ::google::protobuf::internal::WireFormatLite::WriteUInt32(
  2945. 33, this->repeated_uint32(i), output);
  2946. }
  2947. // repeated uint64 repeated_uint64 = 34;
  2948. for (int i = 0, n = this->repeated_uint64_size(); i < n; i++) {
  2949. ::google::protobuf::internal::WireFormatLite::WriteUInt64(
  2950. 34, this->repeated_uint64(i), output);
  2951. }
  2952. // repeated sint32 repeated_sint32 = 35;
  2953. for (int i = 0, n = this->repeated_sint32_size(); i < n; i++) {
  2954. ::google::protobuf::internal::WireFormatLite::WriteSInt32(
  2955. 35, this->repeated_sint32(i), output);
  2956. }
  2957. // repeated sint64 repeated_sint64 = 36;
  2958. for (int i = 0, n = this->repeated_sint64_size(); i < n; i++) {
  2959. ::google::protobuf::internal::WireFormatLite::WriteSInt64(
  2960. 36, this->repeated_sint64(i), output);
  2961. }
  2962. // repeated fixed32 repeated_fixed32 = 37;
  2963. for (int i = 0, n = this->repeated_fixed32_size(); i < n; i++) {
  2964. ::google::protobuf::internal::WireFormatLite::WriteFixed32(
  2965. 37, this->repeated_fixed32(i), output);
  2966. }
  2967. // repeated fixed64 repeated_fixed64 = 38;
  2968. for (int i = 0, n = this->repeated_fixed64_size(); i < n; i++) {
  2969. ::google::protobuf::internal::WireFormatLite::WriteFixed64(
  2970. 38, this->repeated_fixed64(i), output);
  2971. }
  2972. // repeated sfixed32 repeated_sfixed32 = 39;
  2973. for (int i = 0, n = this->repeated_sfixed32_size(); i < n; i++) {
  2974. ::google::protobuf::internal::WireFormatLite::WriteSFixed32(
  2975. 39, this->repeated_sfixed32(i), output);
  2976. }
  2977. // repeated sfixed64 repeated_sfixed64 = 40;
  2978. for (int i = 0, n = this->repeated_sfixed64_size(); i < n; i++) {
  2979. ::google::protobuf::internal::WireFormatLite::WriteSFixed64(
  2980. 40, this->repeated_sfixed64(i), output);
  2981. }
  2982. // repeated float repeated_float = 41;
  2983. for (int i = 0, n = this->repeated_float_size(); i < n; i++) {
  2984. ::google::protobuf::internal::WireFormatLite::WriteFloat(
  2985. 41, this->repeated_float(i), output);
  2986. }
  2987. // repeated double repeated_double = 42;
  2988. for (int i = 0, n = this->repeated_double_size(); i < n; i++) {
  2989. ::google::protobuf::internal::WireFormatLite::WriteDouble(
  2990. 42, this->repeated_double(i), output);
  2991. }
  2992. // repeated bool repeated_bool = 43;
  2993. for (int i = 0, n = this->repeated_bool_size(); i < n; i++) {
  2994. ::google::protobuf::internal::WireFormatLite::WriteBool(
  2995. 43, this->repeated_bool(i), output);
  2996. }
  2997. // repeated string repeated_string = 44;
  2998. for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
  2999. ::google::protobuf::internal::WireFormatLite::WriteString(
  3000. 44, this->repeated_string(i), output);
  3001. }
  3002. // repeated bytes repeated_bytes = 45;
  3003. for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
  3004. ::google::protobuf::internal::WireFormatLite::WriteBytes(
  3005. 45, this->repeated_bytes(i), output);
  3006. }
  3007. // repeated group RepeatedGroup = 46 { ... };
  3008. for (unsigned int i = 0,
  3009. n = static_cast<unsigned int>(this->repeatedgroup_size()); i < n; i++) {
  3010. ::google::protobuf::internal::WireFormatLite::WriteGroup(
  3011. 46,
  3012. this->repeatedgroup(static_cast<int>(i)),
  3013. output);
  3014. }
  3015. // repeated .protobuf_unittest.TestAllTypesLite.NestedMessage repeated_nested_message = 48;
  3016. for (unsigned int i = 0,
  3017. n = static_cast<unsigned int>(this->repeated_nested_message_size()); i < n; i++) {
  3018. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  3019. 48,
  3020. this->repeated_nested_message(static_cast<int>(i)),
  3021. output);
  3022. }
  3023. // repeated .protobuf_unittest.ForeignMessageLite repeated_foreign_message = 49;
  3024. for (unsigned int i = 0,
  3025. n = static_cast<unsigned int>(this->repeated_foreign_message_size()); i < n; i++) {
  3026. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  3027. 49,
  3028. this->repeated_foreign_message(static_cast<int>(i)),
  3029. output);
  3030. }
  3031. // repeated .protobuf_unittest_import.ImportMessageLite repeated_import_message = 50;
  3032. for (unsigned int i = 0,
  3033. n = static_cast<unsigned int>(this->repeated_import_message_size()); i < n; i++) {
  3034. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  3035. 50,
  3036. this->repeated_import_message(static_cast<int>(i)),
  3037. output);
  3038. }
  3039. // repeated .protobuf_unittest.TestAllTypesLite.NestedEnum repeated_nested_enum = 51;
  3040. for (int i = 0, n = this->repeated_nested_enum_size(); i < n; i++) {
  3041. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  3042. 51, this->repeated_nested_enum(i), output);
  3043. }
  3044. // repeated .protobuf_unittest.ForeignEnumLite repeated_foreign_enum = 52;
  3045. for (int i = 0, n = this->repeated_foreign_enum_size(); i < n; i++) {
  3046. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  3047. 52, this->repeated_foreign_enum(i), output);
  3048. }
  3049. // repeated .protobuf_unittest_import.ImportEnumLite repeated_import_enum = 53;
  3050. for (int i = 0, n = this->repeated_import_enum_size(); i < n; i++) {
  3051. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  3052. 53, this->repeated_import_enum(i), output);
  3053. }
  3054. // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
  3055. for (int i = 0, n = this->repeated_string_piece_size(); i < n; i++) {
  3056. ::google::protobuf::internal::WireFormatLite::WriteString(
  3057. 54, this->repeated_string_piece(i), output);
  3058. }
  3059. // repeated string repeated_cord = 55 [ctype = CORD];
  3060. for (int i = 0, n = this->repeated_cord_size(); i < n; i++) {
  3061. ::google::protobuf::internal::WireFormatLite::WriteString(
  3062. 55, this->repeated_cord(i), output);
  3063. }
  3064. // repeated .protobuf_unittest.TestAllTypesLite.NestedMessage repeated_lazy_message = 57 [lazy = true];
  3065. for (unsigned int i = 0,
  3066. n = static_cast<unsigned int>(this->repeated_lazy_message_size()); i < n; i++) {
  3067. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  3068. 57,
  3069. this->repeated_lazy_message(static_cast<int>(i)),
  3070. output);
  3071. }
  3072. cached_has_bits = _has_bits_[1];
  3073. // optional int32 default_int32 = 61 [default = 41];
  3074. if (cached_has_bits & 0x00000001u) {
  3075. ::google::protobuf::internal::WireFormatLite::WriteInt32(61, this->default_int32(), output);
  3076. }
  3077. // optional int64 default_int64 = 62 [default = 42];
  3078. if (cached_has_bits & 0x00000002u) {
  3079. ::google::protobuf::internal::WireFormatLite::WriteInt64(62, this->default_int64(), output);
  3080. }
  3081. // optional uint32 default_uint32 = 63 [default = 43];
  3082. if (cached_has_bits & 0x00000008u) {
  3083. ::google::protobuf::internal::WireFormatLite::WriteUInt32(63, this->default_uint32(), output);
  3084. }
  3085. // optional uint64 default_uint64 = 64 [default = 44];
  3086. if (cached_has_bits & 0x00000004u) {
  3087. ::google::protobuf::internal::WireFormatLite::WriteUInt64(64, this->default_uint64(), output);
  3088. }
  3089. // optional sint32 default_sint32 = 65 [default = -45];
  3090. if (cached_has_bits & 0x00000010u) {
  3091. ::google::protobuf::internal::WireFormatLite::WriteSInt32(65, this->default_sint32(), output);
  3092. }
  3093. // optional sint64 default_sint64 = 66 [default = 46];
  3094. if (cached_has_bits & 0x00000020u) {
  3095. ::google::protobuf::internal::WireFormatLite::WriteSInt64(66, this->default_sint64(), output);
  3096. }
  3097. // optional fixed32 default_fixed32 = 67 [default = 47];
  3098. if (cached_has_bits & 0x00000080u) {
  3099. ::google::protobuf::internal::WireFormatLite::WriteFixed32(67, this->default_fixed32(), output);
  3100. }
  3101. // optional fixed64 default_fixed64 = 68 [default = 48];
  3102. if (cached_has_bits & 0x00000040u) {
  3103. ::google::protobuf::internal::WireFormatLite::WriteFixed64(68, this->default_fixed64(), output);
  3104. }
  3105. // optional sfixed32 default_sfixed32 = 69 [default = 49];
  3106. if (cached_has_bits & 0x00000100u) {
  3107. ::google::protobuf::internal::WireFormatLite::WriteSFixed32(69, this->default_sfixed32(), output);
  3108. }
  3109. // optional sfixed64 default_sfixed64 = 70 [default = -50];
  3110. if (cached_has_bits & 0x00000200u) {
  3111. ::google::protobuf::internal::WireFormatLite::WriteSFixed64(70, this->default_sfixed64(), output);
  3112. }
  3113. // optional float default_float = 71 [default = 51.5];
  3114. if (cached_has_bits & 0x00000800u) {
  3115. ::google::protobuf::internal::WireFormatLite::WriteFloat(71, this->default_float(), output);
  3116. }
  3117. // optional double default_double = 72 [default = 52000];
  3118. if (cached_has_bits & 0x00000400u) {
  3119. ::google::protobuf::internal::WireFormatLite::WriteDouble(72, this->default_double(), output);
  3120. }
  3121. // optional bool default_bool = 73 [default = true];
  3122. if (cached_has_bits & 0x00001000u) {
  3123. ::google::protobuf::internal::WireFormatLite::WriteBool(73, this->default_bool(), output);
  3124. }
  3125. cached_has_bits = _has_bits_[0];
  3126. // optional string default_string = 74 [default = "hello"];
  3127. if (cached_has_bits & 0x00000010u) {
  3128. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  3129. 74, this->default_string(), output);
  3130. }
  3131. // optional bytes default_bytes = 75 [default = "world"];
  3132. if (cached_has_bits & 0x00000020u) {
  3133. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  3134. 75, this->default_bytes(), output);
  3135. }
  3136. cached_has_bits = _has_bits_[1];
  3137. // optional .protobuf_unittest.TestAllTypesLite.NestedEnum default_nested_enum = 81 [default = BAR];
  3138. if (cached_has_bits & 0x00002000u) {
  3139. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  3140. 81, this->default_nested_enum(), output);
  3141. }
  3142. // optional .protobuf_unittest.ForeignEnumLite default_foreign_enum = 82 [default = FOREIGN_LITE_BAR];
  3143. if (cached_has_bits & 0x00004000u) {
  3144. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  3145. 82, this->default_foreign_enum(), output);
  3146. }
  3147. cached_has_bits = _has_bits_[0];
  3148. // optional .protobuf_unittest_import.ImportEnumLite default_import_enum = 83 [default = IMPORT_LITE_BAR];
  3149. if (cached_has_bits & 0x10000000u) {
  3150. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  3151. 83, this->default_import_enum(), output);
  3152. }
  3153. // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
  3154. if (cached_has_bits & 0x00000040u) {
  3155. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  3156. 84, this->default_string_piece(), output);
  3157. }
  3158. // optional string default_cord = 85 [default = "123", ctype = CORD];
  3159. if (cached_has_bits & 0x00000080u) {
  3160. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  3161. 85, this->default_cord(), output);
  3162. }
  3163. switch (oneof_field_case()) {
  3164. case kOneofUint32:
  3165. ::google::protobuf::internal::WireFormatLite::WriteUInt32(111, this->oneof_uint32(), output);
  3166. break;
  3167. case kOneofNestedMessage:
  3168. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  3169. 112, this->_internal_oneof_nested_message(), output);
  3170. break;
  3171. case kOneofString:
  3172. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  3173. 113, this->oneof_string(), output);
  3174. break;
  3175. case kOneofBytes:
  3176. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  3177. 114, this->oneof_bytes(), output);
  3178. break;
  3179. case kOneofLazyNestedMessage:
  3180. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  3181. 115, this->_internal_oneof_lazy_nested_message(), output);
  3182. break;
  3183. default: ;
  3184. }
  3185. // optional int32 deceptively_named_list = 116;
  3186. if (cached_has_bits & 0x08000000u) {
  3187. ::google::protobuf::internal::WireFormatLite::WriteInt32(116, this->deceptively_named_list(), output);
  3188. }
  3189. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  3190. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  3191. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllTypesLite)
  3192. }
  3193. size_t TestAllTypesLite::ByteSizeLong() const {
  3194. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllTypesLite)
  3195. size_t total_size = 0;
  3196. total_size += _internal_metadata_.unknown_fields().size();
  3197. // repeated int32 repeated_int32 = 31;
  3198. {
  3199. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  3200. Int32Size(this->repeated_int32_);
  3201. total_size += 2 *
  3202. ::google::protobuf::internal::FromIntSize(this->repeated_int32_size());
  3203. total_size += data_size;
  3204. }
  3205. // repeated int64 repeated_int64 = 32;
  3206. {
  3207. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  3208. Int64Size(this->repeated_int64_);
  3209. total_size += 2 *
  3210. ::google::protobuf::internal::FromIntSize(this->repeated_int64_size());
  3211. total_size += data_size;
  3212. }
  3213. // repeated uint32 repeated_uint32 = 33;
  3214. {
  3215. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  3216. UInt32Size(this->repeated_uint32_);
  3217. total_size += 2 *
  3218. ::google::protobuf::internal::FromIntSize(this->repeated_uint32_size());
  3219. total_size += data_size;
  3220. }
  3221. // repeated uint64 repeated_uint64 = 34;
  3222. {
  3223. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  3224. UInt64Size(this->repeated_uint64_);
  3225. total_size += 2 *
  3226. ::google::protobuf::internal::FromIntSize(this->repeated_uint64_size());
  3227. total_size += data_size;
  3228. }
  3229. // repeated sint32 repeated_sint32 = 35;
  3230. {
  3231. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  3232. SInt32Size(this->repeated_sint32_);
  3233. total_size += 2 *
  3234. ::google::protobuf::internal::FromIntSize(this->repeated_sint32_size());
  3235. total_size += data_size;
  3236. }
  3237. // repeated sint64 repeated_sint64 = 36;
  3238. {
  3239. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  3240. SInt64Size(this->repeated_sint64_);
  3241. total_size += 2 *
  3242. ::google::protobuf::internal::FromIntSize(this->repeated_sint64_size());
  3243. total_size += data_size;
  3244. }
  3245. // repeated fixed32 repeated_fixed32 = 37;
  3246. {
  3247. unsigned int count = static_cast<unsigned int>(this->repeated_fixed32_size());
  3248. size_t data_size = 4UL * count;
  3249. total_size += 2 *
  3250. ::google::protobuf::internal::FromIntSize(this->repeated_fixed32_size());
  3251. total_size += data_size;
  3252. }
  3253. // repeated fixed64 repeated_fixed64 = 38;
  3254. {
  3255. unsigned int count = static_cast<unsigned int>(this->repeated_fixed64_size());
  3256. size_t data_size = 8UL * count;
  3257. total_size += 2 *
  3258. ::google::protobuf::internal::FromIntSize(this->repeated_fixed64_size());
  3259. total_size += data_size;
  3260. }
  3261. // repeated sfixed32 repeated_sfixed32 = 39;
  3262. {
  3263. unsigned int count = static_cast<unsigned int>(this->repeated_sfixed32_size());
  3264. size_t data_size = 4UL * count;
  3265. total_size += 2 *
  3266. ::google::protobuf::internal::FromIntSize(this->repeated_sfixed32_size());
  3267. total_size += data_size;
  3268. }
  3269. // repeated sfixed64 repeated_sfixed64 = 40;
  3270. {
  3271. unsigned int count = static_cast<unsigned int>(this->repeated_sfixed64_size());
  3272. size_t data_size = 8UL * count;
  3273. total_size += 2 *
  3274. ::google::protobuf::internal::FromIntSize(this->repeated_sfixed64_size());
  3275. total_size += data_size;
  3276. }
  3277. // repeated float repeated_float = 41;
  3278. {
  3279. unsigned int count = static_cast<unsigned int>(this->repeated_float_size());
  3280. size_t data_size = 4UL * count;
  3281. total_size += 2 *
  3282. ::google::protobuf::internal::FromIntSize(this->repeated_float_size());
  3283. total_size += data_size;
  3284. }
  3285. // repeated double repeated_double = 42;
  3286. {
  3287. unsigned int count = static_cast<unsigned int>(this->repeated_double_size());
  3288. size_t data_size = 8UL * count;
  3289. total_size += 2 *
  3290. ::google::protobuf::internal::FromIntSize(this->repeated_double_size());
  3291. total_size += data_size;
  3292. }
  3293. // repeated bool repeated_bool = 43;
  3294. {
  3295. unsigned int count = static_cast<unsigned int>(this->repeated_bool_size());
  3296. size_t data_size = 1UL * count;
  3297. total_size += 2 *
  3298. ::google::protobuf::internal::FromIntSize(this->repeated_bool_size());
  3299. total_size += data_size;
  3300. }
  3301. // repeated string repeated_string = 44;
  3302. total_size += 2 *
  3303. ::google::protobuf::internal::FromIntSize(this->repeated_string_size());
  3304. for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
  3305. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  3306. this->repeated_string(i));
  3307. }
  3308. // repeated bytes repeated_bytes = 45;
  3309. total_size += 2 *
  3310. ::google::protobuf::internal::FromIntSize(this->repeated_bytes_size());
  3311. for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
  3312. total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
  3313. this->repeated_bytes(i));
  3314. }
  3315. // repeated group RepeatedGroup = 46 { ... };
  3316. {
  3317. unsigned int count = static_cast<unsigned int>(this->repeatedgroup_size());
  3318. total_size += 4UL * count;
  3319. for (unsigned int i = 0; i < count; i++) {
  3320. total_size +=
  3321. ::google::protobuf::internal::WireFormatLite::GroupSize(
  3322. this->repeatedgroup(static_cast<int>(i)));
  3323. }
  3324. }
  3325. // repeated .protobuf_unittest.TestAllTypesLite.NestedMessage repeated_nested_message = 48;
  3326. {
  3327. unsigned int count = static_cast<unsigned int>(this->repeated_nested_message_size());
  3328. total_size += 2UL * count;
  3329. for (unsigned int i = 0; i < count; i++) {
  3330. total_size +=
  3331. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3332. this->repeated_nested_message(static_cast<int>(i)));
  3333. }
  3334. }
  3335. // repeated .protobuf_unittest.ForeignMessageLite repeated_foreign_message = 49;
  3336. {
  3337. unsigned int count = static_cast<unsigned int>(this->repeated_foreign_message_size());
  3338. total_size += 2UL * count;
  3339. for (unsigned int i = 0; i < count; i++) {
  3340. total_size +=
  3341. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3342. this->repeated_foreign_message(static_cast<int>(i)));
  3343. }
  3344. }
  3345. // repeated .protobuf_unittest_import.ImportMessageLite repeated_import_message = 50;
  3346. {
  3347. unsigned int count = static_cast<unsigned int>(this->repeated_import_message_size());
  3348. total_size += 2UL * count;
  3349. for (unsigned int i = 0; i < count; i++) {
  3350. total_size +=
  3351. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3352. this->repeated_import_message(static_cast<int>(i)));
  3353. }
  3354. }
  3355. // repeated .protobuf_unittest.TestAllTypesLite.NestedEnum repeated_nested_enum = 51;
  3356. {
  3357. size_t data_size = 0;
  3358. unsigned int count = static_cast<unsigned int>(this->repeated_nested_enum_size());for (unsigned int i = 0; i < count; i++) {
  3359. data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
  3360. this->repeated_nested_enum(static_cast<int>(i)));
  3361. }
  3362. total_size += (2UL * count) + data_size;
  3363. }
  3364. // repeated .protobuf_unittest.ForeignEnumLite repeated_foreign_enum = 52;
  3365. {
  3366. size_t data_size = 0;
  3367. unsigned int count = static_cast<unsigned int>(this->repeated_foreign_enum_size());for (unsigned int i = 0; i < count; i++) {
  3368. data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
  3369. this->repeated_foreign_enum(static_cast<int>(i)));
  3370. }
  3371. total_size += (2UL * count) + data_size;
  3372. }
  3373. // repeated .protobuf_unittest_import.ImportEnumLite repeated_import_enum = 53;
  3374. {
  3375. size_t data_size = 0;
  3376. unsigned int count = static_cast<unsigned int>(this->repeated_import_enum_size());for (unsigned int i = 0; i < count; i++) {
  3377. data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
  3378. this->repeated_import_enum(static_cast<int>(i)));
  3379. }
  3380. total_size += (2UL * count) + data_size;
  3381. }
  3382. // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
  3383. total_size += 2 *
  3384. ::google::protobuf::internal::FromIntSize(this->repeated_string_piece_size());
  3385. for (int i = 0, n = this->repeated_string_piece_size(); i < n; i++) {
  3386. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  3387. this->repeated_string_piece(i));
  3388. }
  3389. // repeated string repeated_cord = 55 [ctype = CORD];
  3390. total_size += 2 *
  3391. ::google::protobuf::internal::FromIntSize(this->repeated_cord_size());
  3392. for (int i = 0, n = this->repeated_cord_size(); i < n; i++) {
  3393. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  3394. this->repeated_cord(i));
  3395. }
  3396. // repeated .protobuf_unittest.TestAllTypesLite.NestedMessage repeated_lazy_message = 57 [lazy = true];
  3397. {
  3398. unsigned int count = static_cast<unsigned int>(this->repeated_lazy_message_size());
  3399. total_size += 2UL * count;
  3400. for (unsigned int i = 0; i < count; i++) {
  3401. total_size +=
  3402. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3403. this->repeated_lazy_message(static_cast<int>(i)));
  3404. }
  3405. }
  3406. if (_has_bits_[0 / 32] & 255u) {
  3407. // optional string optional_string = 14;
  3408. if (has_optional_string()) {
  3409. total_size += 1 +
  3410. ::google::protobuf::internal::WireFormatLite::StringSize(
  3411. this->optional_string());
  3412. }
  3413. // optional bytes optional_bytes = 15;
  3414. if (has_optional_bytes()) {
  3415. total_size += 1 +
  3416. ::google::protobuf::internal::WireFormatLite::BytesSize(
  3417. this->optional_bytes());
  3418. }
  3419. // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
  3420. if (has_optional_string_piece()) {
  3421. total_size += 2 +
  3422. ::google::protobuf::internal::WireFormatLite::StringSize(
  3423. this->optional_string_piece());
  3424. }
  3425. // optional string optional_cord = 25 [ctype = CORD];
  3426. if (has_optional_cord()) {
  3427. total_size += 2 +
  3428. ::google::protobuf::internal::WireFormatLite::StringSize(
  3429. this->optional_cord());
  3430. }
  3431. // optional string default_string = 74 [default = "hello"];
  3432. if (has_default_string()) {
  3433. total_size += 2 +
  3434. ::google::protobuf::internal::WireFormatLite::StringSize(
  3435. this->default_string());
  3436. }
  3437. // optional bytes default_bytes = 75 [default = "world"];
  3438. if (has_default_bytes()) {
  3439. total_size += 2 +
  3440. ::google::protobuf::internal::WireFormatLite::BytesSize(
  3441. this->default_bytes());
  3442. }
  3443. // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
  3444. if (has_default_string_piece()) {
  3445. total_size += 2 +
  3446. ::google::protobuf::internal::WireFormatLite::StringSize(
  3447. this->default_string_piece());
  3448. }
  3449. // optional string default_cord = 85 [default = "123", ctype = CORD];
  3450. if (has_default_cord()) {
  3451. total_size += 2 +
  3452. ::google::protobuf::internal::WireFormatLite::StringSize(
  3453. this->default_cord());
  3454. }
  3455. }
  3456. if (_has_bits_[8 / 32] & 65280u) {
  3457. // optional group OptionalGroup = 16 { ... };
  3458. if (has_optionalgroup()) {
  3459. total_size += 4 +
  3460. ::google::protobuf::internal::WireFormatLite::GroupSize(
  3461. *optionalgroup_);
  3462. }
  3463. // optional .protobuf_unittest.TestAllTypesLite.NestedMessage optional_nested_message = 18;
  3464. if (has_optional_nested_message()) {
  3465. total_size += 2 +
  3466. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3467. *optional_nested_message_);
  3468. }
  3469. // optional .protobuf_unittest.ForeignMessageLite optional_foreign_message = 19;
  3470. if (has_optional_foreign_message()) {
  3471. total_size += 2 +
  3472. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3473. *optional_foreign_message_);
  3474. }
  3475. // optional .protobuf_unittest_import.ImportMessageLite optional_import_message = 20;
  3476. if (has_optional_import_message()) {
  3477. total_size += 2 +
  3478. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3479. *optional_import_message_);
  3480. }
  3481. // optional .protobuf_unittest_import.PublicImportMessageLite optional_public_import_message = 26;
  3482. if (has_optional_public_import_message()) {
  3483. total_size += 2 +
  3484. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3485. *optional_public_import_message_);
  3486. }
  3487. // optional .protobuf_unittest.TestAllTypesLite.NestedMessage optional_lazy_message = 27 [lazy = true];
  3488. if (has_optional_lazy_message()) {
  3489. total_size += 2 +
  3490. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3491. *optional_lazy_message_);
  3492. }
  3493. // optional int64 optional_int64 = 2;
  3494. if (has_optional_int64()) {
  3495. total_size += 1 +
  3496. ::google::protobuf::internal::WireFormatLite::Int64Size(
  3497. this->optional_int64());
  3498. }
  3499. // optional int32 optional_int32 = 1;
  3500. if (has_optional_int32()) {
  3501. total_size += 1 +
  3502. ::google::protobuf::internal::WireFormatLite::Int32Size(
  3503. this->optional_int32());
  3504. }
  3505. }
  3506. if (_has_bits_[16 / 32] & 16711680u) {
  3507. // optional uint32 optional_uint32 = 3;
  3508. if (has_optional_uint32()) {
  3509. total_size += 1 +
  3510. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  3511. this->optional_uint32());
  3512. }
  3513. // optional uint64 optional_uint64 = 4;
  3514. if (has_optional_uint64()) {
  3515. total_size += 1 +
  3516. ::google::protobuf::internal::WireFormatLite::UInt64Size(
  3517. this->optional_uint64());
  3518. }
  3519. // optional sint64 optional_sint64 = 6;
  3520. if (has_optional_sint64()) {
  3521. total_size += 1 +
  3522. ::google::protobuf::internal::WireFormatLite::SInt64Size(
  3523. this->optional_sint64());
  3524. }
  3525. // optional sint32 optional_sint32 = 5;
  3526. if (has_optional_sint32()) {
  3527. total_size += 1 +
  3528. ::google::protobuf::internal::WireFormatLite::SInt32Size(
  3529. this->optional_sint32());
  3530. }
  3531. // optional fixed32 optional_fixed32 = 7;
  3532. if (has_optional_fixed32()) {
  3533. total_size += 1 + 4;
  3534. }
  3535. // optional fixed64 optional_fixed64 = 8;
  3536. if (has_optional_fixed64()) {
  3537. total_size += 1 + 8;
  3538. }
  3539. // optional sfixed64 optional_sfixed64 = 10;
  3540. if (has_optional_sfixed64()) {
  3541. total_size += 1 + 8;
  3542. }
  3543. // optional sfixed32 optional_sfixed32 = 9;
  3544. if (has_optional_sfixed32()) {
  3545. total_size += 1 + 4;
  3546. }
  3547. }
  3548. if (_has_bits_[24 / 32] & 4278190080u) {
  3549. // optional float optional_float = 11;
  3550. if (has_optional_float()) {
  3551. total_size += 1 + 4;
  3552. }
  3553. // optional double optional_double = 12;
  3554. if (has_optional_double()) {
  3555. total_size += 1 + 8;
  3556. }
  3557. // optional bool optional_bool = 13;
  3558. if (has_optional_bool()) {
  3559. total_size += 1 + 1;
  3560. }
  3561. // optional int32 deceptively_named_list = 116;
  3562. if (has_deceptively_named_list()) {
  3563. total_size += 2 +
  3564. ::google::protobuf::internal::WireFormatLite::Int32Size(
  3565. this->deceptively_named_list());
  3566. }
  3567. // optional .protobuf_unittest_import.ImportEnumLite default_import_enum = 83 [default = IMPORT_LITE_BAR];
  3568. if (has_default_import_enum()) {
  3569. total_size += 2 +
  3570. ::google::protobuf::internal::WireFormatLite::EnumSize(this->default_import_enum());
  3571. }
  3572. // optional .protobuf_unittest.TestAllTypesLite.NestedEnum optional_nested_enum = 21;
  3573. if (has_optional_nested_enum()) {
  3574. total_size += 2 +
  3575. ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_nested_enum());
  3576. }
  3577. // optional .protobuf_unittest.ForeignEnumLite optional_foreign_enum = 22;
  3578. if (has_optional_foreign_enum()) {
  3579. total_size += 2 +
  3580. ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_foreign_enum());
  3581. }
  3582. // optional .protobuf_unittest_import.ImportEnumLite optional_import_enum = 23;
  3583. if (has_optional_import_enum()) {
  3584. total_size += 2 +
  3585. ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_import_enum());
  3586. }
  3587. }
  3588. if (_has_bits_[32 / 32] & 255u) {
  3589. // optional int32 default_int32 = 61 [default = 41];
  3590. if (has_default_int32()) {
  3591. total_size += 2 +
  3592. ::google::protobuf::internal::WireFormatLite::Int32Size(
  3593. this->default_int32());
  3594. }
  3595. // optional int64 default_int64 = 62 [default = 42];
  3596. if (has_default_int64()) {
  3597. total_size += 2 +
  3598. ::google::protobuf::internal::WireFormatLite::Int64Size(
  3599. this->default_int64());
  3600. }
  3601. // optional uint64 default_uint64 = 64 [default = 44];
  3602. if (has_default_uint64()) {
  3603. total_size += 2 +
  3604. ::google::protobuf::internal::WireFormatLite::UInt64Size(
  3605. this->default_uint64());
  3606. }
  3607. // optional uint32 default_uint32 = 63 [default = 43];
  3608. if (has_default_uint32()) {
  3609. total_size += 2 +
  3610. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  3611. this->default_uint32());
  3612. }
  3613. // optional sint32 default_sint32 = 65 [default = -45];
  3614. if (has_default_sint32()) {
  3615. total_size += 2 +
  3616. ::google::protobuf::internal::WireFormatLite::SInt32Size(
  3617. this->default_sint32());
  3618. }
  3619. // optional sint64 default_sint64 = 66 [default = 46];
  3620. if (has_default_sint64()) {
  3621. total_size += 2 +
  3622. ::google::protobuf::internal::WireFormatLite::SInt64Size(
  3623. this->default_sint64());
  3624. }
  3625. // optional fixed64 default_fixed64 = 68 [default = 48];
  3626. if (has_default_fixed64()) {
  3627. total_size += 2 + 8;
  3628. }
  3629. // optional fixed32 default_fixed32 = 67 [default = 47];
  3630. if (has_default_fixed32()) {
  3631. total_size += 2 + 4;
  3632. }
  3633. }
  3634. if (_has_bits_[40 / 32] & 32512u) {
  3635. // optional sfixed32 default_sfixed32 = 69 [default = 49];
  3636. if (has_default_sfixed32()) {
  3637. total_size += 2 + 4;
  3638. }
  3639. // optional sfixed64 default_sfixed64 = 70 [default = -50];
  3640. if (has_default_sfixed64()) {
  3641. total_size += 2 + 8;
  3642. }
  3643. // optional double default_double = 72 [default = 52000];
  3644. if (has_default_double()) {
  3645. total_size += 2 + 8;
  3646. }
  3647. // optional float default_float = 71 [default = 51.5];
  3648. if (has_default_float()) {
  3649. total_size += 2 + 4;
  3650. }
  3651. // optional bool default_bool = 73 [default = true];
  3652. if (has_default_bool()) {
  3653. total_size += 2 + 1;
  3654. }
  3655. // optional .protobuf_unittest.TestAllTypesLite.NestedEnum default_nested_enum = 81 [default = BAR];
  3656. if (has_default_nested_enum()) {
  3657. total_size += 2 +
  3658. ::google::protobuf::internal::WireFormatLite::EnumSize(this->default_nested_enum());
  3659. }
  3660. // optional .protobuf_unittest.ForeignEnumLite default_foreign_enum = 82 [default = FOREIGN_LITE_BAR];
  3661. if (has_default_foreign_enum()) {
  3662. total_size += 2 +
  3663. ::google::protobuf::internal::WireFormatLite::EnumSize(this->default_foreign_enum());
  3664. }
  3665. }
  3666. switch (oneof_field_case()) {
  3667. // optional uint32 oneof_uint32 = 111;
  3668. case kOneofUint32: {
  3669. total_size += 2 +
  3670. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  3671. this->oneof_uint32());
  3672. break;
  3673. }
  3674. // optional .protobuf_unittest.TestAllTypesLite.NestedMessage oneof_nested_message = 112;
  3675. case kOneofNestedMessage: {
  3676. total_size += 2 +
  3677. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3678. *oneof_field_.oneof_nested_message_);
  3679. break;
  3680. }
  3681. // optional string oneof_string = 113;
  3682. case kOneofString: {
  3683. total_size += 2 +
  3684. ::google::protobuf::internal::WireFormatLite::StringSize(
  3685. this->oneof_string());
  3686. break;
  3687. }
  3688. // optional bytes oneof_bytes = 114;
  3689. case kOneofBytes: {
  3690. total_size += 2 +
  3691. ::google::protobuf::internal::WireFormatLite::BytesSize(
  3692. this->oneof_bytes());
  3693. break;
  3694. }
  3695. // optional .protobuf_unittest.TestAllTypesLite.NestedMessage oneof_lazy_nested_message = 115 [lazy = true];
  3696. case kOneofLazyNestedMessage: {
  3697. total_size += 2 +
  3698. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3699. *oneof_field_.oneof_lazy_nested_message_);
  3700. break;
  3701. }
  3702. case ONEOF_FIELD_NOT_SET: {
  3703. break;
  3704. }
  3705. }
  3706. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3707. SetCachedSize(cached_size);
  3708. return total_size;
  3709. }
  3710. void TestAllTypesLite::CheckTypeAndMergeFrom(
  3711. const ::google::protobuf::MessageLite& from) {
  3712. MergeFrom(*::google::protobuf::down_cast<const TestAllTypesLite*>(&from));
  3713. }
  3714. void TestAllTypesLite::MergeFrom(const TestAllTypesLite& from) {
  3715. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestAllTypesLite)
  3716. GOOGLE_DCHECK_NE(&from, this);
  3717. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3718. ::google::protobuf::uint32 cached_has_bits = 0;
  3719. (void) cached_has_bits;
  3720. repeated_int32_.MergeFrom(from.repeated_int32_);
  3721. repeated_int64_.MergeFrom(from.repeated_int64_);
  3722. repeated_uint32_.MergeFrom(from.repeated_uint32_);
  3723. repeated_uint64_.MergeFrom(from.repeated_uint64_);
  3724. repeated_sint32_.MergeFrom(from.repeated_sint32_);
  3725. repeated_sint64_.MergeFrom(from.repeated_sint64_);
  3726. repeated_fixed32_.MergeFrom(from.repeated_fixed32_);
  3727. repeated_fixed64_.MergeFrom(from.repeated_fixed64_);
  3728. repeated_sfixed32_.MergeFrom(from.repeated_sfixed32_);
  3729. repeated_sfixed64_.MergeFrom(from.repeated_sfixed64_);
  3730. repeated_float_.MergeFrom(from.repeated_float_);
  3731. repeated_double_.MergeFrom(from.repeated_double_);
  3732. repeated_bool_.MergeFrom(from.repeated_bool_);
  3733. repeated_string_.MergeFrom(from.repeated_string_);
  3734. repeated_bytes_.MergeFrom(from.repeated_bytes_);
  3735. repeatedgroup_.MergeFrom(from.repeatedgroup_);
  3736. repeated_nested_message_.MergeFrom(from.repeated_nested_message_);
  3737. repeated_foreign_message_.MergeFrom(from.repeated_foreign_message_);
  3738. repeated_import_message_.MergeFrom(from.repeated_import_message_);
  3739. repeated_nested_enum_.MergeFrom(from.repeated_nested_enum_);
  3740. repeated_foreign_enum_.MergeFrom(from.repeated_foreign_enum_);
  3741. repeated_import_enum_.MergeFrom(from.repeated_import_enum_);
  3742. repeated_string_piece_.MergeFrom(from.repeated_string_piece_);
  3743. repeated_cord_.MergeFrom(from.repeated_cord_);
  3744. repeated_lazy_message_.MergeFrom(from.repeated_lazy_message_);
  3745. cached_has_bits = from._has_bits_[0];
  3746. if (cached_has_bits & 255u) {
  3747. if (cached_has_bits & 0x00000001u) {
  3748. set_has_optional_string();
  3749. optional_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_);
  3750. }
  3751. if (cached_has_bits & 0x00000002u) {
  3752. set_has_optional_bytes();
  3753. optional_bytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes_);
  3754. }
  3755. if (cached_has_bits & 0x00000004u) {
  3756. set_has_optional_string_piece();
  3757. optional_string_piece_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_piece_);
  3758. }
  3759. if (cached_has_bits & 0x00000008u) {
  3760. set_has_optional_cord();
  3761. optional_cord_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_cord_);
  3762. }
  3763. if (cached_has_bits & 0x00000010u) {
  3764. set_has_default_string();
  3765. default_string_.AssignWithDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_.get(), from.default_string_);
  3766. }
  3767. if (cached_has_bits & 0x00000020u) {
  3768. set_has_default_bytes();
  3769. default_bytes_.AssignWithDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_bytes_.get(), from.default_bytes_);
  3770. }
  3771. if (cached_has_bits & 0x00000040u) {
  3772. set_has_default_string_piece();
  3773. default_string_piece_.AssignWithDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_piece_.get(), from.default_string_piece_);
  3774. }
  3775. if (cached_has_bits & 0x00000080u) {
  3776. set_has_default_cord();
  3777. default_cord_.AssignWithDefault(&::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_cord_.get(), from.default_cord_);
  3778. }
  3779. }
  3780. if (cached_has_bits & 65280u) {
  3781. if (cached_has_bits & 0x00000100u) {
  3782. mutable_optionalgroup()->::protobuf_unittest::TestAllTypesLite_OptionalGroup::MergeFrom(from.optionalgroup());
  3783. }
  3784. if (cached_has_bits & 0x00000200u) {
  3785. mutable_optional_nested_message()->::protobuf_unittest::TestAllTypesLite_NestedMessage::MergeFrom(from.optional_nested_message());
  3786. }
  3787. if (cached_has_bits & 0x00000400u) {
  3788. mutable_optional_foreign_message()->::protobuf_unittest::ForeignMessageLite::MergeFrom(from.optional_foreign_message());
  3789. }
  3790. if (cached_has_bits & 0x00000800u) {
  3791. mutable_optional_import_message()->::protobuf_unittest_import::ImportMessageLite::MergeFrom(from.optional_import_message());
  3792. }
  3793. if (cached_has_bits & 0x00001000u) {
  3794. mutable_optional_public_import_message()->::protobuf_unittest_import::PublicImportMessageLite::MergeFrom(from.optional_public_import_message());
  3795. }
  3796. if (cached_has_bits & 0x00002000u) {
  3797. mutable_optional_lazy_message()->::protobuf_unittest::TestAllTypesLite_NestedMessage::MergeFrom(from.optional_lazy_message());
  3798. }
  3799. if (cached_has_bits & 0x00004000u) {
  3800. optional_int64_ = from.optional_int64_;
  3801. }
  3802. if (cached_has_bits & 0x00008000u) {
  3803. optional_int32_ = from.optional_int32_;
  3804. }
  3805. _has_bits_[0] |= cached_has_bits;
  3806. }
  3807. if (cached_has_bits & 16711680u) {
  3808. if (cached_has_bits & 0x00010000u) {
  3809. optional_uint32_ = from.optional_uint32_;
  3810. }
  3811. if (cached_has_bits & 0x00020000u) {
  3812. optional_uint64_ = from.optional_uint64_;
  3813. }
  3814. if (cached_has_bits & 0x00040000u) {
  3815. optional_sint64_ = from.optional_sint64_;
  3816. }
  3817. if (cached_has_bits & 0x00080000u) {
  3818. optional_sint32_ = from.optional_sint32_;
  3819. }
  3820. if (cached_has_bits & 0x00100000u) {
  3821. optional_fixed32_ = from.optional_fixed32_;
  3822. }
  3823. if (cached_has_bits & 0x00200000u) {
  3824. optional_fixed64_ = from.optional_fixed64_;
  3825. }
  3826. if (cached_has_bits & 0x00400000u) {
  3827. optional_sfixed64_ = from.optional_sfixed64_;
  3828. }
  3829. if (cached_has_bits & 0x00800000u) {
  3830. optional_sfixed32_ = from.optional_sfixed32_;
  3831. }
  3832. _has_bits_[0] |= cached_has_bits;
  3833. }
  3834. if (cached_has_bits & 4278190080u) {
  3835. if (cached_has_bits & 0x01000000u) {
  3836. optional_float_ = from.optional_float_;
  3837. }
  3838. if (cached_has_bits & 0x02000000u) {
  3839. optional_double_ = from.optional_double_;
  3840. }
  3841. if (cached_has_bits & 0x04000000u) {
  3842. optional_bool_ = from.optional_bool_;
  3843. }
  3844. if (cached_has_bits & 0x08000000u) {
  3845. deceptively_named_list_ = from.deceptively_named_list_;
  3846. }
  3847. if (cached_has_bits & 0x10000000u) {
  3848. default_import_enum_ = from.default_import_enum_;
  3849. }
  3850. if (cached_has_bits & 0x20000000u) {
  3851. optional_nested_enum_ = from.optional_nested_enum_;
  3852. }
  3853. if (cached_has_bits & 0x40000000u) {
  3854. optional_foreign_enum_ = from.optional_foreign_enum_;
  3855. }
  3856. if (cached_has_bits & 0x80000000u) {
  3857. optional_import_enum_ = from.optional_import_enum_;
  3858. }
  3859. _has_bits_[0] |= cached_has_bits;
  3860. }
  3861. cached_has_bits = from._has_bits_[1];
  3862. if (cached_has_bits & 255u) {
  3863. if (cached_has_bits & 0x00000001u) {
  3864. default_int32_ = from.default_int32_;
  3865. }
  3866. if (cached_has_bits & 0x00000002u) {
  3867. default_int64_ = from.default_int64_;
  3868. }
  3869. if (cached_has_bits & 0x00000004u) {
  3870. default_uint64_ = from.default_uint64_;
  3871. }
  3872. if (cached_has_bits & 0x00000008u) {
  3873. default_uint32_ = from.default_uint32_;
  3874. }
  3875. if (cached_has_bits & 0x00000010u) {
  3876. default_sint32_ = from.default_sint32_;
  3877. }
  3878. if (cached_has_bits & 0x00000020u) {
  3879. default_sint64_ = from.default_sint64_;
  3880. }
  3881. if (cached_has_bits & 0x00000040u) {
  3882. default_fixed64_ = from.default_fixed64_;
  3883. }
  3884. if (cached_has_bits & 0x00000080u) {
  3885. default_fixed32_ = from.default_fixed32_;
  3886. }
  3887. _has_bits_[1] |= cached_has_bits;
  3888. }
  3889. if (cached_has_bits & 32512u) {
  3890. if (cached_has_bits & 0x00000100u) {
  3891. default_sfixed32_ = from.default_sfixed32_;
  3892. }
  3893. if (cached_has_bits & 0x00000200u) {
  3894. default_sfixed64_ = from.default_sfixed64_;
  3895. }
  3896. if (cached_has_bits & 0x00000400u) {
  3897. default_double_ = from.default_double_;
  3898. }
  3899. if (cached_has_bits & 0x00000800u) {
  3900. default_float_ = from.default_float_;
  3901. }
  3902. if (cached_has_bits & 0x00001000u) {
  3903. default_bool_ = from.default_bool_;
  3904. }
  3905. if (cached_has_bits & 0x00002000u) {
  3906. default_nested_enum_ = from.default_nested_enum_;
  3907. }
  3908. if (cached_has_bits & 0x00004000u) {
  3909. default_foreign_enum_ = from.default_foreign_enum_;
  3910. }
  3911. _has_bits_[1] |= cached_has_bits;
  3912. }
  3913. switch (from.oneof_field_case()) {
  3914. case kOneofUint32: {
  3915. set_oneof_uint32(from.oneof_uint32());
  3916. break;
  3917. }
  3918. case kOneofNestedMessage: {
  3919. mutable_oneof_nested_message()->::protobuf_unittest::TestAllTypesLite_NestedMessage::MergeFrom(from.oneof_nested_message());
  3920. break;
  3921. }
  3922. case kOneofString: {
  3923. set_oneof_string(from.oneof_string());
  3924. break;
  3925. }
  3926. case kOneofBytes: {
  3927. set_oneof_bytes(from.oneof_bytes());
  3928. break;
  3929. }
  3930. case kOneofLazyNestedMessage: {
  3931. mutable_oneof_lazy_nested_message()->::protobuf_unittest::TestAllTypesLite_NestedMessage::MergeFrom(from.oneof_lazy_nested_message());
  3932. break;
  3933. }
  3934. case ONEOF_FIELD_NOT_SET: {
  3935. break;
  3936. }
  3937. }
  3938. }
  3939. void TestAllTypesLite::CopyFrom(const TestAllTypesLite& from) {
  3940. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllTypesLite)
  3941. if (&from == this) return;
  3942. Clear();
  3943. MergeFrom(from);
  3944. }
  3945. bool TestAllTypesLite::IsInitialized() const {
  3946. return true;
  3947. }
  3948. void TestAllTypesLite::Swap(TestAllTypesLite* other) {
  3949. if (other == this) return;
  3950. InternalSwap(other);
  3951. }
  3952. void TestAllTypesLite::InternalSwap(TestAllTypesLite* other) {
  3953. using std::swap;
  3954. repeated_int32_.InternalSwap(&other->repeated_int32_);
  3955. repeated_int64_.InternalSwap(&other->repeated_int64_);
  3956. repeated_uint32_.InternalSwap(&other->repeated_uint32_);
  3957. repeated_uint64_.InternalSwap(&other->repeated_uint64_);
  3958. repeated_sint32_.InternalSwap(&other->repeated_sint32_);
  3959. repeated_sint64_.InternalSwap(&other->repeated_sint64_);
  3960. repeated_fixed32_.InternalSwap(&other->repeated_fixed32_);
  3961. repeated_fixed64_.InternalSwap(&other->repeated_fixed64_);
  3962. repeated_sfixed32_.InternalSwap(&other->repeated_sfixed32_);
  3963. repeated_sfixed64_.InternalSwap(&other->repeated_sfixed64_);
  3964. repeated_float_.InternalSwap(&other->repeated_float_);
  3965. repeated_double_.InternalSwap(&other->repeated_double_);
  3966. repeated_bool_.InternalSwap(&other->repeated_bool_);
  3967. repeated_string_.InternalSwap(CastToBase(&other->repeated_string_));
  3968. repeated_bytes_.InternalSwap(CastToBase(&other->repeated_bytes_));
  3969. CastToBase(&repeatedgroup_)->InternalSwap(CastToBase(&other->repeatedgroup_));
  3970. CastToBase(&repeated_nested_message_)->InternalSwap(CastToBase(&other->repeated_nested_message_));
  3971. CastToBase(&repeated_foreign_message_)->InternalSwap(CastToBase(&other->repeated_foreign_message_));
  3972. CastToBase(&repeated_import_message_)->InternalSwap(CastToBase(&other->repeated_import_message_));
  3973. repeated_nested_enum_.InternalSwap(&other->repeated_nested_enum_);
  3974. repeated_foreign_enum_.InternalSwap(&other->repeated_foreign_enum_);
  3975. repeated_import_enum_.InternalSwap(&other->repeated_import_enum_);
  3976. repeated_string_piece_.InternalSwap(CastToBase(&other->repeated_string_piece_));
  3977. repeated_cord_.InternalSwap(CastToBase(&other->repeated_cord_));
  3978. CastToBase(&repeated_lazy_message_)->InternalSwap(CastToBase(&other->repeated_lazy_message_));
  3979. optional_string_.Swap(&other->optional_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  3980. GetArenaNoVirtual());
  3981. optional_bytes_.Swap(&other->optional_bytes_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  3982. GetArenaNoVirtual());
  3983. optional_string_piece_.Swap(&other->optional_string_piece_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  3984. GetArenaNoVirtual());
  3985. optional_cord_.Swap(&other->optional_cord_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  3986. GetArenaNoVirtual());
  3987. default_string_.Swap(&other->default_string_, &::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_.get(),
  3988. GetArenaNoVirtual());
  3989. default_bytes_.Swap(&other->default_bytes_, &::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_bytes_.get(),
  3990. GetArenaNoVirtual());
  3991. default_string_piece_.Swap(&other->default_string_piece_, &::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_string_piece_.get(),
  3992. GetArenaNoVirtual());
  3993. default_cord_.Swap(&other->default_cord_, &::protobuf_unittest::TestAllTypesLite::_i_give_permission_to_break_this_code_default_default_cord_.get(),
  3994. GetArenaNoVirtual());
  3995. swap(optionalgroup_, other->optionalgroup_);
  3996. swap(optional_nested_message_, other->optional_nested_message_);
  3997. swap(optional_foreign_message_, other->optional_foreign_message_);
  3998. swap(optional_import_message_, other->optional_import_message_);
  3999. swap(optional_public_import_message_, other->optional_public_import_message_);
  4000. swap(optional_lazy_message_, other->optional_lazy_message_);
  4001. swap(optional_int64_, other->optional_int64_);
  4002. swap(optional_int32_, other->optional_int32_);
  4003. swap(optional_uint32_, other->optional_uint32_);
  4004. swap(optional_uint64_, other->optional_uint64_);
  4005. swap(optional_sint64_, other->optional_sint64_);
  4006. swap(optional_sint32_, other->optional_sint32_);
  4007. swap(optional_fixed32_, other->optional_fixed32_);
  4008. swap(optional_fixed64_, other->optional_fixed64_);
  4009. swap(optional_sfixed64_, other->optional_sfixed64_);
  4010. swap(optional_sfixed32_, other->optional_sfixed32_);
  4011. swap(optional_float_, other->optional_float_);
  4012. swap(optional_double_, other->optional_double_);
  4013. swap(optional_bool_, other->optional_bool_);
  4014. swap(deceptively_named_list_, other->deceptively_named_list_);
  4015. swap(default_import_enum_, other->default_import_enum_);
  4016. swap(optional_nested_enum_, other->optional_nested_enum_);
  4017. swap(optional_foreign_enum_, other->optional_foreign_enum_);
  4018. swap(optional_import_enum_, other->optional_import_enum_);
  4019. swap(default_int32_, other->default_int32_);
  4020. swap(default_int64_, other->default_int64_);
  4021. swap(default_uint64_, other->default_uint64_);
  4022. swap(default_uint32_, other->default_uint32_);
  4023. swap(default_sint32_, other->default_sint32_);
  4024. swap(default_sint64_, other->default_sint64_);
  4025. swap(default_fixed64_, other->default_fixed64_);
  4026. swap(default_fixed32_, other->default_fixed32_);
  4027. swap(default_sfixed32_, other->default_sfixed32_);
  4028. swap(default_sfixed64_, other->default_sfixed64_);
  4029. swap(default_double_, other->default_double_);
  4030. swap(default_float_, other->default_float_);
  4031. swap(default_bool_, other->default_bool_);
  4032. swap(default_nested_enum_, other->default_nested_enum_);
  4033. swap(default_foreign_enum_, other->default_foreign_enum_);
  4034. swap(oneof_field_, other->oneof_field_);
  4035. swap(_oneof_case_[0], other->_oneof_case_[0]);
  4036. swap(_has_bits_[0], other->_has_bits_[0]);
  4037. swap(_has_bits_[1], other->_has_bits_[1]);
  4038. _internal_metadata_.Swap(&other->_internal_metadata_);
  4039. }
  4040. ::std::string TestAllTypesLite::GetTypeName() const {
  4041. return "protobuf_unittest.TestAllTypesLite";
  4042. }
  4043. // ===================================================================
  4044. void ForeignMessageLite::InitAsDefaultInstance() {
  4045. }
  4046. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4047. const int ForeignMessageLite::kCFieldNumber;
  4048. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4049. ForeignMessageLite::ForeignMessageLite()
  4050. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  4051. ::google::protobuf::internal::InitSCC(
  4052. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_ForeignMessageLite.base);
  4053. SharedCtor();
  4054. // @@protoc_insertion_point(constructor:protobuf_unittest.ForeignMessageLite)
  4055. }
  4056. ForeignMessageLite::ForeignMessageLite(const ForeignMessageLite& from)
  4057. : ::google::protobuf::MessageLite(),
  4058. _internal_metadata_(NULL),
  4059. _has_bits_(from._has_bits_) {
  4060. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4061. c_ = from.c_;
  4062. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.ForeignMessageLite)
  4063. }
  4064. void ForeignMessageLite::SharedCtor() {
  4065. c_ = 0;
  4066. }
  4067. ForeignMessageLite::~ForeignMessageLite() {
  4068. // @@protoc_insertion_point(destructor:protobuf_unittest.ForeignMessageLite)
  4069. SharedDtor();
  4070. }
  4071. void ForeignMessageLite::SharedDtor() {
  4072. }
  4073. void ForeignMessageLite::SetCachedSize(int size) const {
  4074. _cached_size_.Set(size);
  4075. }
  4076. const ForeignMessageLite& ForeignMessageLite::default_instance() {
  4077. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_ForeignMessageLite.base);
  4078. return *internal_default_instance();
  4079. }
  4080. void ForeignMessageLite::Clear() {
  4081. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.ForeignMessageLite)
  4082. ::google::protobuf::uint32 cached_has_bits = 0;
  4083. // Prevent compiler warnings about cached_has_bits being unused
  4084. (void) cached_has_bits;
  4085. c_ = 0;
  4086. _has_bits_.Clear();
  4087. _internal_metadata_.Clear();
  4088. }
  4089. bool ForeignMessageLite::MergePartialFromCodedStream(
  4090. ::google::protobuf::io::CodedInputStream* input) {
  4091. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4092. ::google::protobuf::uint32 tag;
  4093. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  4094. &_internal_metadata_);
  4095. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  4096. unknown_fields_setter.buffer());
  4097. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  4098. &unknown_fields_output, false);
  4099. // @@protoc_insertion_point(parse_start:protobuf_unittest.ForeignMessageLite)
  4100. for (;;) {
  4101. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4102. tag = p.first;
  4103. if (!p.second) goto handle_unusual;
  4104. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4105. // optional int32 c = 1;
  4106. case 1: {
  4107. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4108. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  4109. set_has_c();
  4110. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  4111. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  4112. input, &c_)));
  4113. } else {
  4114. goto handle_unusual;
  4115. }
  4116. break;
  4117. }
  4118. default: {
  4119. handle_unusual:
  4120. if (tag == 0) {
  4121. goto success;
  4122. }
  4123. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  4124. input, tag, &unknown_fields_stream));
  4125. break;
  4126. }
  4127. }
  4128. }
  4129. success:
  4130. // @@protoc_insertion_point(parse_success:protobuf_unittest.ForeignMessageLite)
  4131. return true;
  4132. failure:
  4133. // @@protoc_insertion_point(parse_failure:protobuf_unittest.ForeignMessageLite)
  4134. return false;
  4135. #undef DO_
  4136. }
  4137. void ForeignMessageLite::SerializeWithCachedSizes(
  4138. ::google::protobuf::io::CodedOutputStream* output) const {
  4139. // @@protoc_insertion_point(serialize_start:protobuf_unittest.ForeignMessageLite)
  4140. ::google::protobuf::uint32 cached_has_bits = 0;
  4141. (void) cached_has_bits;
  4142. cached_has_bits = _has_bits_[0];
  4143. // optional int32 c = 1;
  4144. if (cached_has_bits & 0x00000001u) {
  4145. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->c(), output);
  4146. }
  4147. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  4148. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  4149. // @@protoc_insertion_point(serialize_end:protobuf_unittest.ForeignMessageLite)
  4150. }
  4151. size_t ForeignMessageLite::ByteSizeLong() const {
  4152. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.ForeignMessageLite)
  4153. size_t total_size = 0;
  4154. total_size += _internal_metadata_.unknown_fields().size();
  4155. // optional int32 c = 1;
  4156. if (has_c()) {
  4157. total_size += 1 +
  4158. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4159. this->c());
  4160. }
  4161. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4162. SetCachedSize(cached_size);
  4163. return total_size;
  4164. }
  4165. void ForeignMessageLite::CheckTypeAndMergeFrom(
  4166. const ::google::protobuf::MessageLite& from) {
  4167. MergeFrom(*::google::protobuf::down_cast<const ForeignMessageLite*>(&from));
  4168. }
  4169. void ForeignMessageLite::MergeFrom(const ForeignMessageLite& from) {
  4170. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.ForeignMessageLite)
  4171. GOOGLE_DCHECK_NE(&from, this);
  4172. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4173. ::google::protobuf::uint32 cached_has_bits = 0;
  4174. (void) cached_has_bits;
  4175. if (from.has_c()) {
  4176. set_c(from.c());
  4177. }
  4178. }
  4179. void ForeignMessageLite::CopyFrom(const ForeignMessageLite& from) {
  4180. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.ForeignMessageLite)
  4181. if (&from == this) return;
  4182. Clear();
  4183. MergeFrom(from);
  4184. }
  4185. bool ForeignMessageLite::IsInitialized() const {
  4186. return true;
  4187. }
  4188. void ForeignMessageLite::Swap(ForeignMessageLite* other) {
  4189. if (other == this) return;
  4190. InternalSwap(other);
  4191. }
  4192. void ForeignMessageLite::InternalSwap(ForeignMessageLite* other) {
  4193. using std::swap;
  4194. swap(c_, other->c_);
  4195. swap(_has_bits_[0], other->_has_bits_[0]);
  4196. _internal_metadata_.Swap(&other->_internal_metadata_);
  4197. }
  4198. ::std::string ForeignMessageLite::GetTypeName() const {
  4199. return "protobuf_unittest.ForeignMessageLite";
  4200. }
  4201. // ===================================================================
  4202. void TestPackedTypesLite::InitAsDefaultInstance() {
  4203. }
  4204. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4205. const int TestPackedTypesLite::kPackedInt32FieldNumber;
  4206. const int TestPackedTypesLite::kPackedInt64FieldNumber;
  4207. const int TestPackedTypesLite::kPackedUint32FieldNumber;
  4208. const int TestPackedTypesLite::kPackedUint64FieldNumber;
  4209. const int TestPackedTypesLite::kPackedSint32FieldNumber;
  4210. const int TestPackedTypesLite::kPackedSint64FieldNumber;
  4211. const int TestPackedTypesLite::kPackedFixed32FieldNumber;
  4212. const int TestPackedTypesLite::kPackedFixed64FieldNumber;
  4213. const int TestPackedTypesLite::kPackedSfixed32FieldNumber;
  4214. const int TestPackedTypesLite::kPackedSfixed64FieldNumber;
  4215. const int TestPackedTypesLite::kPackedFloatFieldNumber;
  4216. const int TestPackedTypesLite::kPackedDoubleFieldNumber;
  4217. const int TestPackedTypesLite::kPackedBoolFieldNumber;
  4218. const int TestPackedTypesLite::kPackedEnumFieldNumber;
  4219. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4220. TestPackedTypesLite::TestPackedTypesLite()
  4221. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  4222. ::google::protobuf::internal::InitSCC(
  4223. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestPackedTypesLite.base);
  4224. SharedCtor();
  4225. // @@protoc_insertion_point(constructor:protobuf_unittest.TestPackedTypesLite)
  4226. }
  4227. TestPackedTypesLite::TestPackedTypesLite(const TestPackedTypesLite& from)
  4228. : ::google::protobuf::MessageLite(),
  4229. _internal_metadata_(NULL),
  4230. _has_bits_(from._has_bits_),
  4231. packed_int32_(from.packed_int32_),
  4232. packed_int64_(from.packed_int64_),
  4233. packed_uint32_(from.packed_uint32_),
  4234. packed_uint64_(from.packed_uint64_),
  4235. packed_sint32_(from.packed_sint32_),
  4236. packed_sint64_(from.packed_sint64_),
  4237. packed_fixed32_(from.packed_fixed32_),
  4238. packed_fixed64_(from.packed_fixed64_),
  4239. packed_sfixed32_(from.packed_sfixed32_),
  4240. packed_sfixed64_(from.packed_sfixed64_),
  4241. packed_float_(from.packed_float_),
  4242. packed_double_(from.packed_double_),
  4243. packed_bool_(from.packed_bool_),
  4244. packed_enum_(from.packed_enum_) {
  4245. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4246. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestPackedTypesLite)
  4247. }
  4248. void TestPackedTypesLite::SharedCtor() {
  4249. }
  4250. TestPackedTypesLite::~TestPackedTypesLite() {
  4251. // @@protoc_insertion_point(destructor:protobuf_unittest.TestPackedTypesLite)
  4252. SharedDtor();
  4253. }
  4254. void TestPackedTypesLite::SharedDtor() {
  4255. }
  4256. void TestPackedTypesLite::SetCachedSize(int size) const {
  4257. _cached_size_.Set(size);
  4258. }
  4259. const TestPackedTypesLite& TestPackedTypesLite::default_instance() {
  4260. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestPackedTypesLite.base);
  4261. return *internal_default_instance();
  4262. }
  4263. void TestPackedTypesLite::Clear() {
  4264. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestPackedTypesLite)
  4265. ::google::protobuf::uint32 cached_has_bits = 0;
  4266. // Prevent compiler warnings about cached_has_bits being unused
  4267. (void) cached_has_bits;
  4268. packed_int32_.Clear();
  4269. packed_int64_.Clear();
  4270. packed_uint32_.Clear();
  4271. packed_uint64_.Clear();
  4272. packed_sint32_.Clear();
  4273. packed_sint64_.Clear();
  4274. packed_fixed32_.Clear();
  4275. packed_fixed64_.Clear();
  4276. packed_sfixed32_.Clear();
  4277. packed_sfixed64_.Clear();
  4278. packed_float_.Clear();
  4279. packed_double_.Clear();
  4280. packed_bool_.Clear();
  4281. packed_enum_.Clear();
  4282. _has_bits_.Clear();
  4283. _internal_metadata_.Clear();
  4284. }
  4285. bool TestPackedTypesLite::MergePartialFromCodedStream(
  4286. ::google::protobuf::io::CodedInputStream* input) {
  4287. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4288. ::google::protobuf::uint32 tag;
  4289. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  4290. &_internal_metadata_);
  4291. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  4292. unknown_fields_setter.buffer());
  4293. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  4294. &unknown_fields_output, false);
  4295. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestPackedTypesLite)
  4296. for (;;) {
  4297. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  4298. tag = p.first;
  4299. if (!p.second) goto handle_unusual;
  4300. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4301. // repeated int32 packed_int32 = 90 [packed = true];
  4302. case 90: {
  4303. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4304. static_cast< ::google::protobuf::uint8>(210u /* 722 & 0xFF */)) {
  4305. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4306. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  4307. input, this->mutable_packed_int32())));
  4308. } else if (
  4309. static_cast< ::google::protobuf::uint8>(tag) ==
  4310. static_cast< ::google::protobuf::uint8>(208u /* 720 & 0xFF */)) {
  4311. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4312. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  4313. 2, 722u, input, this->mutable_packed_int32())));
  4314. } else {
  4315. goto handle_unusual;
  4316. }
  4317. break;
  4318. }
  4319. // repeated int64 packed_int64 = 91 [packed = true];
  4320. case 91: {
  4321. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4322. static_cast< ::google::protobuf::uint8>(218u /* 730 & 0xFF */)) {
  4323. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4324. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  4325. input, this->mutable_packed_int64())));
  4326. } else if (
  4327. static_cast< ::google::protobuf::uint8>(tag) ==
  4328. static_cast< ::google::protobuf::uint8>(216u /* 728 & 0xFF */)) {
  4329. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4330. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  4331. 2, 730u, input, this->mutable_packed_int64())));
  4332. } else {
  4333. goto handle_unusual;
  4334. }
  4335. break;
  4336. }
  4337. // repeated uint32 packed_uint32 = 92 [packed = true];
  4338. case 92: {
  4339. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4340. static_cast< ::google::protobuf::uint8>(226u /* 738 & 0xFF */)) {
  4341. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4342. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  4343. input, this->mutable_packed_uint32())));
  4344. } else if (
  4345. static_cast< ::google::protobuf::uint8>(tag) ==
  4346. static_cast< ::google::protobuf::uint8>(224u /* 736 & 0xFF */)) {
  4347. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4348. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  4349. 2, 738u, input, this->mutable_packed_uint32())));
  4350. } else {
  4351. goto handle_unusual;
  4352. }
  4353. break;
  4354. }
  4355. // repeated uint64 packed_uint64 = 93 [packed = true];
  4356. case 93: {
  4357. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4358. static_cast< ::google::protobuf::uint8>(234u /* 746 & 0xFF */)) {
  4359. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4360. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  4361. input, this->mutable_packed_uint64())));
  4362. } else if (
  4363. static_cast< ::google::protobuf::uint8>(tag) ==
  4364. static_cast< ::google::protobuf::uint8>(232u /* 744 & 0xFF */)) {
  4365. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4366. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  4367. 2, 746u, input, this->mutable_packed_uint64())));
  4368. } else {
  4369. goto handle_unusual;
  4370. }
  4371. break;
  4372. }
  4373. // repeated sint32 packed_sint32 = 94 [packed = true];
  4374. case 94: {
  4375. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4376. static_cast< ::google::protobuf::uint8>(242u /* 754 & 0xFF */)) {
  4377. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4378. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  4379. input, this->mutable_packed_sint32())));
  4380. } else if (
  4381. static_cast< ::google::protobuf::uint8>(tag) ==
  4382. static_cast< ::google::protobuf::uint8>(240u /* 752 & 0xFF */)) {
  4383. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4384. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  4385. 2, 754u, input, this->mutable_packed_sint32())));
  4386. } else {
  4387. goto handle_unusual;
  4388. }
  4389. break;
  4390. }
  4391. // repeated sint64 packed_sint64 = 95 [packed = true];
  4392. case 95: {
  4393. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4394. static_cast< ::google::protobuf::uint8>(250u /* 762 & 0xFF */)) {
  4395. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4396. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  4397. input, this->mutable_packed_sint64())));
  4398. } else if (
  4399. static_cast< ::google::protobuf::uint8>(tag) ==
  4400. static_cast< ::google::protobuf::uint8>(248u /* 760 & 0xFF */)) {
  4401. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4402. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  4403. 2, 762u, input, this->mutable_packed_sint64())));
  4404. } else {
  4405. goto handle_unusual;
  4406. }
  4407. break;
  4408. }
  4409. // repeated fixed32 packed_fixed32 = 96 [packed = true];
  4410. case 96: {
  4411. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4412. static_cast< ::google::protobuf::uint8>(2u /* 770 & 0xFF */)) {
  4413. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4414. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  4415. input, this->mutable_packed_fixed32())));
  4416. } else if (
  4417. static_cast< ::google::protobuf::uint8>(tag) ==
  4418. static_cast< ::google::protobuf::uint8>(5u /* 773 & 0xFF */)) {
  4419. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4420. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  4421. 2, 770u, input, this->mutable_packed_fixed32())));
  4422. } else {
  4423. goto handle_unusual;
  4424. }
  4425. break;
  4426. }
  4427. // repeated fixed64 packed_fixed64 = 97 [packed = true];
  4428. case 97: {
  4429. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4430. static_cast< ::google::protobuf::uint8>(10u /* 778 & 0xFF */)) {
  4431. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4432. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  4433. input, this->mutable_packed_fixed64())));
  4434. } else if (
  4435. static_cast< ::google::protobuf::uint8>(tag) ==
  4436. static_cast< ::google::protobuf::uint8>(9u /* 777 & 0xFF */)) {
  4437. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4438. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  4439. 2, 778u, input, this->mutable_packed_fixed64())));
  4440. } else {
  4441. goto handle_unusual;
  4442. }
  4443. break;
  4444. }
  4445. // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
  4446. case 98: {
  4447. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4448. static_cast< ::google::protobuf::uint8>(18u /* 786 & 0xFF */)) {
  4449. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4450. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  4451. input, this->mutable_packed_sfixed32())));
  4452. } else if (
  4453. static_cast< ::google::protobuf::uint8>(tag) ==
  4454. static_cast< ::google::protobuf::uint8>(21u /* 789 & 0xFF */)) {
  4455. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4456. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  4457. 2, 786u, input, this->mutable_packed_sfixed32())));
  4458. } else {
  4459. goto handle_unusual;
  4460. }
  4461. break;
  4462. }
  4463. // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
  4464. case 99: {
  4465. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4466. static_cast< ::google::protobuf::uint8>(26u /* 794 & 0xFF */)) {
  4467. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4468. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  4469. input, this->mutable_packed_sfixed64())));
  4470. } else if (
  4471. static_cast< ::google::protobuf::uint8>(tag) ==
  4472. static_cast< ::google::protobuf::uint8>(25u /* 793 & 0xFF */)) {
  4473. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4474. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  4475. 2, 794u, input, this->mutable_packed_sfixed64())));
  4476. } else {
  4477. goto handle_unusual;
  4478. }
  4479. break;
  4480. }
  4481. // repeated float packed_float = 100 [packed = true];
  4482. case 100: {
  4483. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4484. static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) {
  4485. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4486. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  4487. input, this->mutable_packed_float())));
  4488. } else if (
  4489. static_cast< ::google::protobuf::uint8>(tag) ==
  4490. static_cast< ::google::protobuf::uint8>(37u /* 805 & 0xFF */)) {
  4491. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4492. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  4493. 2, 802u, input, this->mutable_packed_float())));
  4494. } else {
  4495. goto handle_unusual;
  4496. }
  4497. break;
  4498. }
  4499. // repeated double packed_double = 101 [packed = true];
  4500. case 101: {
  4501. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4502. static_cast< ::google::protobuf::uint8>(42u /* 810 & 0xFF */)) {
  4503. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4504. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  4505. input, this->mutable_packed_double())));
  4506. } else if (
  4507. static_cast< ::google::protobuf::uint8>(tag) ==
  4508. static_cast< ::google::protobuf::uint8>(41u /* 809 & 0xFF */)) {
  4509. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4510. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  4511. 2, 810u, input, this->mutable_packed_double())));
  4512. } else {
  4513. goto handle_unusual;
  4514. }
  4515. break;
  4516. }
  4517. // repeated bool packed_bool = 102 [packed = true];
  4518. case 102: {
  4519. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4520. static_cast< ::google::protobuf::uint8>(50u /* 818 & 0xFF */)) {
  4521. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  4522. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  4523. input, this->mutable_packed_bool())));
  4524. } else if (
  4525. static_cast< ::google::protobuf::uint8>(tag) ==
  4526. static_cast< ::google::protobuf::uint8>(48u /* 816 & 0xFF */)) {
  4527. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  4528. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  4529. 2, 818u, input, this->mutable_packed_bool())));
  4530. } else {
  4531. goto handle_unusual;
  4532. }
  4533. break;
  4534. }
  4535. // repeated .protobuf_unittest.ForeignEnumLite packed_enum = 103 [packed = true];
  4536. case 103: {
  4537. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4538. static_cast< ::google::protobuf::uint8>(58u /* 826 & 0xFF */)) {
  4539. ::google::protobuf::uint32 length;
  4540. DO_(input->ReadVarint32(&length));
  4541. ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(static_cast<int>(length));
  4542. while (input->BytesUntilLimit() > 0) {
  4543. int value;
  4544. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  4545. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  4546. input, &value)));
  4547. if (::protobuf_unittest::ForeignEnumLite_IsValid(value)) {
  4548. add_packed_enum(static_cast< ::protobuf_unittest::ForeignEnumLite >(value));
  4549. } else {
  4550. unknown_fields_stream.WriteVarint32(tag);
  4551. unknown_fields_stream.WriteVarint32(
  4552. static_cast< ::google::protobuf::uint32>(value));
  4553. }
  4554. }
  4555. input->PopLimit(limit);
  4556. } else if (
  4557. static_cast< ::google::protobuf::uint8>(tag) ==
  4558. static_cast< ::google::protobuf::uint8>(56u /* 824 & 0xFF */)) {
  4559. int value;
  4560. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  4561. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  4562. input, &value)));
  4563. if (::protobuf_unittest::ForeignEnumLite_IsValid(value)) {
  4564. add_packed_enum(static_cast< ::protobuf_unittest::ForeignEnumLite >(value));
  4565. } else {
  4566. unknown_fields_stream.WriteVarint32(tag);
  4567. unknown_fields_stream.WriteVarint32(
  4568. static_cast< ::google::protobuf::uint32>(value));
  4569. }
  4570. } else {
  4571. goto handle_unusual;
  4572. }
  4573. break;
  4574. }
  4575. default: {
  4576. handle_unusual:
  4577. if (tag == 0) {
  4578. goto success;
  4579. }
  4580. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  4581. input, tag, &unknown_fields_stream));
  4582. break;
  4583. }
  4584. }
  4585. }
  4586. success:
  4587. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestPackedTypesLite)
  4588. return true;
  4589. failure:
  4590. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestPackedTypesLite)
  4591. return false;
  4592. #undef DO_
  4593. }
  4594. void TestPackedTypesLite::SerializeWithCachedSizes(
  4595. ::google::protobuf::io::CodedOutputStream* output) const {
  4596. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestPackedTypesLite)
  4597. ::google::protobuf::uint32 cached_has_bits = 0;
  4598. (void) cached_has_bits;
  4599. // repeated int32 packed_int32 = 90 [packed = true];
  4600. if (this->packed_int32_size() > 0) {
  4601. ::google::protobuf::internal::WireFormatLite::WriteTag(90, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4602. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4603. _packed_int32_cached_byte_size_));
  4604. }
  4605. for (int i = 0, n = this->packed_int32_size(); i < n; i++) {
  4606. ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
  4607. this->packed_int32(i), output);
  4608. }
  4609. // repeated int64 packed_int64 = 91 [packed = true];
  4610. if (this->packed_int64_size() > 0) {
  4611. ::google::protobuf::internal::WireFormatLite::WriteTag(91, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4612. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4613. _packed_int64_cached_byte_size_));
  4614. }
  4615. for (int i = 0, n = this->packed_int64_size(); i < n; i++) {
  4616. ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag(
  4617. this->packed_int64(i), output);
  4618. }
  4619. // repeated uint32 packed_uint32 = 92 [packed = true];
  4620. if (this->packed_uint32_size() > 0) {
  4621. ::google::protobuf::internal::WireFormatLite::WriteTag(92, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4622. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4623. _packed_uint32_cached_byte_size_));
  4624. }
  4625. for (int i = 0, n = this->packed_uint32_size(); i < n; i++) {
  4626. ::google::protobuf::internal::WireFormatLite::WriteUInt32NoTag(
  4627. this->packed_uint32(i), output);
  4628. }
  4629. // repeated uint64 packed_uint64 = 93 [packed = true];
  4630. if (this->packed_uint64_size() > 0) {
  4631. ::google::protobuf::internal::WireFormatLite::WriteTag(93, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4632. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4633. _packed_uint64_cached_byte_size_));
  4634. }
  4635. for (int i = 0, n = this->packed_uint64_size(); i < n; i++) {
  4636. ::google::protobuf::internal::WireFormatLite::WriteUInt64NoTag(
  4637. this->packed_uint64(i), output);
  4638. }
  4639. // repeated sint32 packed_sint32 = 94 [packed = true];
  4640. if (this->packed_sint32_size() > 0) {
  4641. ::google::protobuf::internal::WireFormatLite::WriteTag(94, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4642. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4643. _packed_sint32_cached_byte_size_));
  4644. }
  4645. for (int i = 0, n = this->packed_sint32_size(); i < n; i++) {
  4646. ::google::protobuf::internal::WireFormatLite::WriteSInt32NoTag(
  4647. this->packed_sint32(i), output);
  4648. }
  4649. // repeated sint64 packed_sint64 = 95 [packed = true];
  4650. if (this->packed_sint64_size() > 0) {
  4651. ::google::protobuf::internal::WireFormatLite::WriteTag(95, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4652. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4653. _packed_sint64_cached_byte_size_));
  4654. }
  4655. for (int i = 0, n = this->packed_sint64_size(); i < n; i++) {
  4656. ::google::protobuf::internal::WireFormatLite::WriteSInt64NoTag(
  4657. this->packed_sint64(i), output);
  4658. }
  4659. // repeated fixed32 packed_fixed32 = 96 [packed = true];
  4660. if (this->packed_fixed32_size() > 0) {
  4661. ::google::protobuf::internal::WireFormatLite::WriteTag(96, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4662. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4663. _packed_fixed32_cached_byte_size_));
  4664. ::google::protobuf::internal::WireFormatLite::WriteFixed32Array(
  4665. this->packed_fixed32().data(), this->packed_fixed32_size(), output);
  4666. }
  4667. // repeated fixed64 packed_fixed64 = 97 [packed = true];
  4668. if (this->packed_fixed64_size() > 0) {
  4669. ::google::protobuf::internal::WireFormatLite::WriteTag(97, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4670. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4671. _packed_fixed64_cached_byte_size_));
  4672. ::google::protobuf::internal::WireFormatLite::WriteFixed64Array(
  4673. this->packed_fixed64().data(), this->packed_fixed64_size(), output);
  4674. }
  4675. // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
  4676. if (this->packed_sfixed32_size() > 0) {
  4677. ::google::protobuf::internal::WireFormatLite::WriteTag(98, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4678. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4679. _packed_sfixed32_cached_byte_size_));
  4680. ::google::protobuf::internal::WireFormatLite::WriteSFixed32Array(
  4681. this->packed_sfixed32().data(), this->packed_sfixed32_size(), output);
  4682. }
  4683. // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
  4684. if (this->packed_sfixed64_size() > 0) {
  4685. ::google::protobuf::internal::WireFormatLite::WriteTag(99, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4686. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4687. _packed_sfixed64_cached_byte_size_));
  4688. ::google::protobuf::internal::WireFormatLite::WriteSFixed64Array(
  4689. this->packed_sfixed64().data(), this->packed_sfixed64_size(), output);
  4690. }
  4691. // repeated float packed_float = 100 [packed = true];
  4692. if (this->packed_float_size() > 0) {
  4693. ::google::protobuf::internal::WireFormatLite::WriteTag(100, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4694. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4695. _packed_float_cached_byte_size_));
  4696. ::google::protobuf::internal::WireFormatLite::WriteFloatArray(
  4697. this->packed_float().data(), this->packed_float_size(), output);
  4698. }
  4699. // repeated double packed_double = 101 [packed = true];
  4700. if (this->packed_double_size() > 0) {
  4701. ::google::protobuf::internal::WireFormatLite::WriteTag(101, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4702. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4703. _packed_double_cached_byte_size_));
  4704. ::google::protobuf::internal::WireFormatLite::WriteDoubleArray(
  4705. this->packed_double().data(), this->packed_double_size(), output);
  4706. }
  4707. // repeated bool packed_bool = 102 [packed = true];
  4708. if (this->packed_bool_size() > 0) {
  4709. ::google::protobuf::internal::WireFormatLite::WriteTag(102, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  4710. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  4711. _packed_bool_cached_byte_size_));
  4712. ::google::protobuf::internal::WireFormatLite::WriteBoolArray(
  4713. this->packed_bool().data(), this->packed_bool_size(), output);
  4714. }
  4715. // repeated .protobuf_unittest.ForeignEnumLite packed_enum = 103 [packed = true];
  4716. if (this->packed_enum_size() > 0) {
  4717. ::google::protobuf::internal::WireFormatLite::WriteTag(
  4718. 103,
  4719. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  4720. output);
  4721. output->WriteVarint32(
  4722. static_cast< ::google::protobuf::uint32>(_packed_enum_cached_byte_size_));
  4723. }
  4724. for (int i = 0, n = this->packed_enum_size(); i < n; i++) {
  4725. ::google::protobuf::internal::WireFormatLite::WriteEnumNoTag(
  4726. this->packed_enum(i), output);
  4727. }
  4728. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  4729. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  4730. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestPackedTypesLite)
  4731. }
  4732. size_t TestPackedTypesLite::ByteSizeLong() const {
  4733. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestPackedTypesLite)
  4734. size_t total_size = 0;
  4735. total_size += _internal_metadata_.unknown_fields().size();
  4736. // repeated int32 packed_int32 = 90 [packed = true];
  4737. {
  4738. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  4739. Int32Size(this->packed_int32_);
  4740. if (data_size > 0) {
  4741. total_size += 2 +
  4742. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4743. static_cast< ::google::protobuf::int32>(data_size));
  4744. }
  4745. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4746. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4747. _packed_int32_cached_byte_size_ = cached_size;
  4748. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4749. total_size += data_size;
  4750. }
  4751. // repeated int64 packed_int64 = 91 [packed = true];
  4752. {
  4753. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  4754. Int64Size(this->packed_int64_);
  4755. if (data_size > 0) {
  4756. total_size += 2 +
  4757. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4758. static_cast< ::google::protobuf::int32>(data_size));
  4759. }
  4760. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4761. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4762. _packed_int64_cached_byte_size_ = cached_size;
  4763. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4764. total_size += data_size;
  4765. }
  4766. // repeated uint32 packed_uint32 = 92 [packed = true];
  4767. {
  4768. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  4769. UInt32Size(this->packed_uint32_);
  4770. if (data_size > 0) {
  4771. total_size += 2 +
  4772. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4773. static_cast< ::google::protobuf::int32>(data_size));
  4774. }
  4775. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4776. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4777. _packed_uint32_cached_byte_size_ = cached_size;
  4778. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4779. total_size += data_size;
  4780. }
  4781. // repeated uint64 packed_uint64 = 93 [packed = true];
  4782. {
  4783. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  4784. UInt64Size(this->packed_uint64_);
  4785. if (data_size > 0) {
  4786. total_size += 2 +
  4787. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4788. static_cast< ::google::protobuf::int32>(data_size));
  4789. }
  4790. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4791. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4792. _packed_uint64_cached_byte_size_ = cached_size;
  4793. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4794. total_size += data_size;
  4795. }
  4796. // repeated sint32 packed_sint32 = 94 [packed = true];
  4797. {
  4798. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  4799. SInt32Size(this->packed_sint32_);
  4800. if (data_size > 0) {
  4801. total_size += 2 +
  4802. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4803. static_cast< ::google::protobuf::int32>(data_size));
  4804. }
  4805. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4806. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4807. _packed_sint32_cached_byte_size_ = cached_size;
  4808. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4809. total_size += data_size;
  4810. }
  4811. // repeated sint64 packed_sint64 = 95 [packed = true];
  4812. {
  4813. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  4814. SInt64Size(this->packed_sint64_);
  4815. if (data_size > 0) {
  4816. total_size += 2 +
  4817. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4818. static_cast< ::google::protobuf::int32>(data_size));
  4819. }
  4820. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4821. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4822. _packed_sint64_cached_byte_size_ = cached_size;
  4823. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4824. total_size += data_size;
  4825. }
  4826. // repeated fixed32 packed_fixed32 = 96 [packed = true];
  4827. {
  4828. unsigned int count = static_cast<unsigned int>(this->packed_fixed32_size());
  4829. size_t data_size = 4UL * count;
  4830. if (data_size > 0) {
  4831. total_size += 2 +
  4832. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4833. static_cast< ::google::protobuf::int32>(data_size));
  4834. }
  4835. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4836. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4837. _packed_fixed32_cached_byte_size_ = cached_size;
  4838. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4839. total_size += data_size;
  4840. }
  4841. // repeated fixed64 packed_fixed64 = 97 [packed = true];
  4842. {
  4843. unsigned int count = static_cast<unsigned int>(this->packed_fixed64_size());
  4844. size_t data_size = 8UL * count;
  4845. if (data_size > 0) {
  4846. total_size += 2 +
  4847. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4848. static_cast< ::google::protobuf::int32>(data_size));
  4849. }
  4850. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4851. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4852. _packed_fixed64_cached_byte_size_ = cached_size;
  4853. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4854. total_size += data_size;
  4855. }
  4856. // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
  4857. {
  4858. unsigned int count = static_cast<unsigned int>(this->packed_sfixed32_size());
  4859. size_t data_size = 4UL * count;
  4860. if (data_size > 0) {
  4861. total_size += 2 +
  4862. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4863. static_cast< ::google::protobuf::int32>(data_size));
  4864. }
  4865. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4866. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4867. _packed_sfixed32_cached_byte_size_ = cached_size;
  4868. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4869. total_size += data_size;
  4870. }
  4871. // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
  4872. {
  4873. unsigned int count = static_cast<unsigned int>(this->packed_sfixed64_size());
  4874. size_t data_size = 8UL * count;
  4875. if (data_size > 0) {
  4876. total_size += 2 +
  4877. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4878. static_cast< ::google::protobuf::int32>(data_size));
  4879. }
  4880. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4881. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4882. _packed_sfixed64_cached_byte_size_ = cached_size;
  4883. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4884. total_size += data_size;
  4885. }
  4886. // repeated float packed_float = 100 [packed = true];
  4887. {
  4888. unsigned int count = static_cast<unsigned int>(this->packed_float_size());
  4889. size_t data_size = 4UL * count;
  4890. if (data_size > 0) {
  4891. total_size += 2 +
  4892. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4893. static_cast< ::google::protobuf::int32>(data_size));
  4894. }
  4895. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4896. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4897. _packed_float_cached_byte_size_ = cached_size;
  4898. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4899. total_size += data_size;
  4900. }
  4901. // repeated double packed_double = 101 [packed = true];
  4902. {
  4903. unsigned int count = static_cast<unsigned int>(this->packed_double_size());
  4904. size_t data_size = 8UL * count;
  4905. if (data_size > 0) {
  4906. total_size += 2 +
  4907. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4908. static_cast< ::google::protobuf::int32>(data_size));
  4909. }
  4910. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4911. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4912. _packed_double_cached_byte_size_ = cached_size;
  4913. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4914. total_size += data_size;
  4915. }
  4916. // repeated bool packed_bool = 102 [packed = true];
  4917. {
  4918. unsigned int count = static_cast<unsigned int>(this->packed_bool_size());
  4919. size_t data_size = 1UL * count;
  4920. if (data_size > 0) {
  4921. total_size += 2 +
  4922. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4923. static_cast< ::google::protobuf::int32>(data_size));
  4924. }
  4925. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4926. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4927. _packed_bool_cached_byte_size_ = cached_size;
  4928. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4929. total_size += data_size;
  4930. }
  4931. // repeated .protobuf_unittest.ForeignEnumLite packed_enum = 103 [packed = true];
  4932. {
  4933. size_t data_size = 0;
  4934. unsigned int count = static_cast<unsigned int>(this->packed_enum_size());for (unsigned int i = 0; i < count; i++) {
  4935. data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
  4936. this->packed_enum(static_cast<int>(i)));
  4937. }
  4938. if (data_size > 0) {
  4939. total_size += 2 +
  4940. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4941. static_cast< ::google::protobuf::int32>(data_size));
  4942. }
  4943. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  4944. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4945. _packed_enum_cached_byte_size_ = cached_size;
  4946. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4947. total_size += data_size;
  4948. }
  4949. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4950. SetCachedSize(cached_size);
  4951. return total_size;
  4952. }
  4953. void TestPackedTypesLite::CheckTypeAndMergeFrom(
  4954. const ::google::protobuf::MessageLite& from) {
  4955. MergeFrom(*::google::protobuf::down_cast<const TestPackedTypesLite*>(&from));
  4956. }
  4957. void TestPackedTypesLite::MergeFrom(const TestPackedTypesLite& from) {
  4958. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestPackedTypesLite)
  4959. GOOGLE_DCHECK_NE(&from, this);
  4960. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4961. ::google::protobuf::uint32 cached_has_bits = 0;
  4962. (void) cached_has_bits;
  4963. packed_int32_.MergeFrom(from.packed_int32_);
  4964. packed_int64_.MergeFrom(from.packed_int64_);
  4965. packed_uint32_.MergeFrom(from.packed_uint32_);
  4966. packed_uint64_.MergeFrom(from.packed_uint64_);
  4967. packed_sint32_.MergeFrom(from.packed_sint32_);
  4968. packed_sint64_.MergeFrom(from.packed_sint64_);
  4969. packed_fixed32_.MergeFrom(from.packed_fixed32_);
  4970. packed_fixed64_.MergeFrom(from.packed_fixed64_);
  4971. packed_sfixed32_.MergeFrom(from.packed_sfixed32_);
  4972. packed_sfixed64_.MergeFrom(from.packed_sfixed64_);
  4973. packed_float_.MergeFrom(from.packed_float_);
  4974. packed_double_.MergeFrom(from.packed_double_);
  4975. packed_bool_.MergeFrom(from.packed_bool_);
  4976. packed_enum_.MergeFrom(from.packed_enum_);
  4977. }
  4978. void TestPackedTypesLite::CopyFrom(const TestPackedTypesLite& from) {
  4979. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestPackedTypesLite)
  4980. if (&from == this) return;
  4981. Clear();
  4982. MergeFrom(from);
  4983. }
  4984. bool TestPackedTypesLite::IsInitialized() const {
  4985. return true;
  4986. }
  4987. void TestPackedTypesLite::Swap(TestPackedTypesLite* other) {
  4988. if (other == this) return;
  4989. InternalSwap(other);
  4990. }
  4991. void TestPackedTypesLite::InternalSwap(TestPackedTypesLite* other) {
  4992. using std::swap;
  4993. packed_int32_.InternalSwap(&other->packed_int32_);
  4994. packed_int64_.InternalSwap(&other->packed_int64_);
  4995. packed_uint32_.InternalSwap(&other->packed_uint32_);
  4996. packed_uint64_.InternalSwap(&other->packed_uint64_);
  4997. packed_sint32_.InternalSwap(&other->packed_sint32_);
  4998. packed_sint64_.InternalSwap(&other->packed_sint64_);
  4999. packed_fixed32_.InternalSwap(&other->packed_fixed32_);
  5000. packed_fixed64_.InternalSwap(&other->packed_fixed64_);
  5001. packed_sfixed32_.InternalSwap(&other->packed_sfixed32_);
  5002. packed_sfixed64_.InternalSwap(&other->packed_sfixed64_);
  5003. packed_float_.InternalSwap(&other->packed_float_);
  5004. packed_double_.InternalSwap(&other->packed_double_);
  5005. packed_bool_.InternalSwap(&other->packed_bool_);
  5006. packed_enum_.InternalSwap(&other->packed_enum_);
  5007. swap(_has_bits_[0], other->_has_bits_[0]);
  5008. _internal_metadata_.Swap(&other->_internal_metadata_);
  5009. }
  5010. ::std::string TestPackedTypesLite::GetTypeName() const {
  5011. return "protobuf_unittest.TestPackedTypesLite";
  5012. }
  5013. // ===================================================================
  5014. void TestAllExtensionsLite::InitAsDefaultInstance() {
  5015. }
  5016. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5017. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5018. TestAllExtensionsLite::TestAllExtensionsLite()
  5019. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  5020. ::google::protobuf::internal::InitSCC(
  5021. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllExtensionsLite.base);
  5022. SharedCtor();
  5023. // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllExtensionsLite)
  5024. }
  5025. TestAllExtensionsLite::TestAllExtensionsLite(const TestAllExtensionsLite& from)
  5026. : ::google::protobuf::MessageLite(),
  5027. _internal_metadata_(NULL),
  5028. _has_bits_(from._has_bits_) {
  5029. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5030. _extensions_.MergeFrom(from._extensions_);
  5031. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllExtensionsLite)
  5032. }
  5033. void TestAllExtensionsLite::SharedCtor() {
  5034. }
  5035. TestAllExtensionsLite::~TestAllExtensionsLite() {
  5036. // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllExtensionsLite)
  5037. SharedDtor();
  5038. }
  5039. void TestAllExtensionsLite::SharedDtor() {
  5040. }
  5041. void TestAllExtensionsLite::SetCachedSize(int size) const {
  5042. _cached_size_.Set(size);
  5043. }
  5044. const TestAllExtensionsLite& TestAllExtensionsLite::default_instance() {
  5045. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestAllExtensionsLite.base);
  5046. return *internal_default_instance();
  5047. }
  5048. void TestAllExtensionsLite::Clear() {
  5049. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestAllExtensionsLite)
  5050. ::google::protobuf::uint32 cached_has_bits = 0;
  5051. // Prevent compiler warnings about cached_has_bits being unused
  5052. (void) cached_has_bits;
  5053. _extensions_.Clear();
  5054. _has_bits_.Clear();
  5055. _internal_metadata_.Clear();
  5056. }
  5057. bool TestAllExtensionsLite::MergePartialFromCodedStream(
  5058. ::google::protobuf::io::CodedInputStream* input) {
  5059. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5060. ::google::protobuf::uint32 tag;
  5061. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  5062. &_internal_metadata_);
  5063. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  5064. unknown_fields_setter.buffer());
  5065. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  5066. &unknown_fields_output, false);
  5067. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestAllExtensionsLite)
  5068. for (;;) {
  5069. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5070. tag = p.first;
  5071. if (!p.second) goto handle_unusual;
  5072. handle_unusual:
  5073. if (tag == 0) {
  5074. goto success;
  5075. }
  5076. if ((8u <= tag)) {
  5077. DO_(_extensions_.ParseField(tag, input,
  5078. internal_default_instance(),
  5079. &unknown_fields_stream));
  5080. continue;
  5081. }
  5082. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  5083. input, tag, &unknown_fields_stream));
  5084. }
  5085. success:
  5086. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestAllExtensionsLite)
  5087. return true;
  5088. failure:
  5089. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllExtensionsLite)
  5090. return false;
  5091. #undef DO_
  5092. }
  5093. void TestAllExtensionsLite::SerializeWithCachedSizes(
  5094. ::google::protobuf::io::CodedOutputStream* output) const {
  5095. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestAllExtensionsLite)
  5096. ::google::protobuf::uint32 cached_has_bits = 0;
  5097. (void) cached_has_bits;
  5098. // Extension range [1, 536870912)
  5099. _extensions_.SerializeWithCachedSizes(
  5100. 1, 536870912, output);
  5101. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  5102. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  5103. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllExtensionsLite)
  5104. }
  5105. size_t TestAllExtensionsLite::ByteSizeLong() const {
  5106. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllExtensionsLite)
  5107. size_t total_size = 0;
  5108. total_size += _extensions_.ByteSize();
  5109. total_size += _internal_metadata_.unknown_fields().size();
  5110. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5111. SetCachedSize(cached_size);
  5112. return total_size;
  5113. }
  5114. void TestAllExtensionsLite::CheckTypeAndMergeFrom(
  5115. const ::google::protobuf::MessageLite& from) {
  5116. MergeFrom(*::google::protobuf::down_cast<const TestAllExtensionsLite*>(&from));
  5117. }
  5118. void TestAllExtensionsLite::MergeFrom(const TestAllExtensionsLite& from) {
  5119. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestAllExtensionsLite)
  5120. GOOGLE_DCHECK_NE(&from, this);
  5121. _extensions_.MergeFrom(from._extensions_);
  5122. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5123. ::google::protobuf::uint32 cached_has_bits = 0;
  5124. (void) cached_has_bits;
  5125. }
  5126. void TestAllExtensionsLite::CopyFrom(const TestAllExtensionsLite& from) {
  5127. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllExtensionsLite)
  5128. if (&from == this) return;
  5129. Clear();
  5130. MergeFrom(from);
  5131. }
  5132. bool TestAllExtensionsLite::IsInitialized() const {
  5133. if (!_extensions_.IsInitialized()) {
  5134. return false;
  5135. }
  5136. return true;
  5137. }
  5138. void TestAllExtensionsLite::Swap(TestAllExtensionsLite* other) {
  5139. if (other == this) return;
  5140. InternalSwap(other);
  5141. }
  5142. void TestAllExtensionsLite::InternalSwap(TestAllExtensionsLite* other) {
  5143. using std::swap;
  5144. swap(_has_bits_[0], other->_has_bits_[0]);
  5145. _internal_metadata_.Swap(&other->_internal_metadata_);
  5146. _extensions_.Swap(&other->_extensions_);
  5147. }
  5148. ::std::string TestAllExtensionsLite::GetTypeName() const {
  5149. return "protobuf_unittest.TestAllExtensionsLite";
  5150. }
  5151. // ===================================================================
  5152. void OptionalGroup_extension_lite::InitAsDefaultInstance() {
  5153. }
  5154. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5155. const int OptionalGroup_extension_lite::kAFieldNumber;
  5156. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5157. OptionalGroup_extension_lite::OptionalGroup_extension_lite()
  5158. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  5159. ::google::protobuf::internal::InitSCC(
  5160. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_OptionalGroup_extension_lite.base);
  5161. SharedCtor();
  5162. // @@protoc_insertion_point(constructor:protobuf_unittest.OptionalGroup_extension_lite)
  5163. }
  5164. OptionalGroup_extension_lite::OptionalGroup_extension_lite(const OptionalGroup_extension_lite& from)
  5165. : ::google::protobuf::MessageLite(),
  5166. _internal_metadata_(NULL),
  5167. _has_bits_(from._has_bits_) {
  5168. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5169. a_ = from.a_;
  5170. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.OptionalGroup_extension_lite)
  5171. }
  5172. void OptionalGroup_extension_lite::SharedCtor() {
  5173. a_ = 0;
  5174. }
  5175. OptionalGroup_extension_lite::~OptionalGroup_extension_lite() {
  5176. // @@protoc_insertion_point(destructor:protobuf_unittest.OptionalGroup_extension_lite)
  5177. SharedDtor();
  5178. }
  5179. void OptionalGroup_extension_lite::SharedDtor() {
  5180. }
  5181. void OptionalGroup_extension_lite::SetCachedSize(int size) const {
  5182. _cached_size_.Set(size);
  5183. }
  5184. const OptionalGroup_extension_lite& OptionalGroup_extension_lite::default_instance() {
  5185. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_OptionalGroup_extension_lite.base);
  5186. return *internal_default_instance();
  5187. }
  5188. void OptionalGroup_extension_lite::Clear() {
  5189. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.OptionalGroup_extension_lite)
  5190. ::google::protobuf::uint32 cached_has_bits = 0;
  5191. // Prevent compiler warnings about cached_has_bits being unused
  5192. (void) cached_has_bits;
  5193. a_ = 0;
  5194. _has_bits_.Clear();
  5195. _internal_metadata_.Clear();
  5196. }
  5197. bool OptionalGroup_extension_lite::MergePartialFromCodedStream(
  5198. ::google::protobuf::io::CodedInputStream* input) {
  5199. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5200. ::google::protobuf::uint32 tag;
  5201. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  5202. &_internal_metadata_);
  5203. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  5204. unknown_fields_setter.buffer());
  5205. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  5206. &unknown_fields_output, false);
  5207. // @@protoc_insertion_point(parse_start:protobuf_unittest.OptionalGroup_extension_lite)
  5208. for (;;) {
  5209. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  5210. tag = p.first;
  5211. if (!p.second) goto handle_unusual;
  5212. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5213. // optional int32 a = 17;
  5214. case 17: {
  5215. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5216. static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
  5217. set_has_a();
  5218. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5219. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  5220. input, &a_)));
  5221. } else {
  5222. goto handle_unusual;
  5223. }
  5224. break;
  5225. }
  5226. default: {
  5227. handle_unusual:
  5228. if (tag == 0 ||
  5229. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  5230. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  5231. input->SetLastTag(tag);
  5232. goto success;
  5233. }
  5234. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  5235. input, tag, &unknown_fields_stream));
  5236. break;
  5237. }
  5238. }
  5239. }
  5240. success:
  5241. // @@protoc_insertion_point(parse_success:protobuf_unittest.OptionalGroup_extension_lite)
  5242. return true;
  5243. failure:
  5244. // @@protoc_insertion_point(parse_failure:protobuf_unittest.OptionalGroup_extension_lite)
  5245. return false;
  5246. #undef DO_
  5247. }
  5248. void OptionalGroup_extension_lite::SerializeWithCachedSizes(
  5249. ::google::protobuf::io::CodedOutputStream* output) const {
  5250. // @@protoc_insertion_point(serialize_start:protobuf_unittest.OptionalGroup_extension_lite)
  5251. ::google::protobuf::uint32 cached_has_bits = 0;
  5252. (void) cached_has_bits;
  5253. cached_has_bits = _has_bits_[0];
  5254. // optional int32 a = 17;
  5255. if (cached_has_bits & 0x00000001u) {
  5256. ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->a(), output);
  5257. }
  5258. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  5259. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  5260. // @@protoc_insertion_point(serialize_end:protobuf_unittest.OptionalGroup_extension_lite)
  5261. }
  5262. size_t OptionalGroup_extension_lite::ByteSizeLong() const {
  5263. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.OptionalGroup_extension_lite)
  5264. size_t total_size = 0;
  5265. total_size += _internal_metadata_.unknown_fields().size();
  5266. // optional int32 a = 17;
  5267. if (has_a()) {
  5268. total_size += 2 +
  5269. ::google::protobuf::internal::WireFormatLite::Int32Size(
  5270. this->a());
  5271. }
  5272. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5273. SetCachedSize(cached_size);
  5274. return total_size;
  5275. }
  5276. void OptionalGroup_extension_lite::CheckTypeAndMergeFrom(
  5277. const ::google::protobuf::MessageLite& from) {
  5278. MergeFrom(*::google::protobuf::down_cast<const OptionalGroup_extension_lite*>(&from));
  5279. }
  5280. void OptionalGroup_extension_lite::MergeFrom(const OptionalGroup_extension_lite& from) {
  5281. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.OptionalGroup_extension_lite)
  5282. GOOGLE_DCHECK_NE(&from, this);
  5283. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5284. ::google::protobuf::uint32 cached_has_bits = 0;
  5285. (void) cached_has_bits;
  5286. if (from.has_a()) {
  5287. set_a(from.a());
  5288. }
  5289. }
  5290. void OptionalGroup_extension_lite::CopyFrom(const OptionalGroup_extension_lite& from) {
  5291. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.OptionalGroup_extension_lite)
  5292. if (&from == this) return;
  5293. Clear();
  5294. MergeFrom(from);
  5295. }
  5296. bool OptionalGroup_extension_lite::IsInitialized() const {
  5297. return true;
  5298. }
  5299. void OptionalGroup_extension_lite::Swap(OptionalGroup_extension_lite* other) {
  5300. if (other == this) return;
  5301. InternalSwap(other);
  5302. }
  5303. void OptionalGroup_extension_lite::InternalSwap(OptionalGroup_extension_lite* other) {
  5304. using std::swap;
  5305. swap(a_, other->a_);
  5306. swap(_has_bits_[0], other->_has_bits_[0]);
  5307. _internal_metadata_.Swap(&other->_internal_metadata_);
  5308. }
  5309. ::std::string OptionalGroup_extension_lite::GetTypeName() const {
  5310. return "protobuf_unittest.OptionalGroup_extension_lite";
  5311. }
  5312. // ===================================================================
  5313. void RepeatedGroup_extension_lite::InitAsDefaultInstance() {
  5314. }
  5315. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5316. const int RepeatedGroup_extension_lite::kAFieldNumber;
  5317. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5318. RepeatedGroup_extension_lite::RepeatedGroup_extension_lite()
  5319. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  5320. ::google::protobuf::internal::InitSCC(
  5321. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_RepeatedGroup_extension_lite.base);
  5322. SharedCtor();
  5323. // @@protoc_insertion_point(constructor:protobuf_unittest.RepeatedGroup_extension_lite)
  5324. }
  5325. RepeatedGroup_extension_lite::RepeatedGroup_extension_lite(const RepeatedGroup_extension_lite& from)
  5326. : ::google::protobuf::MessageLite(),
  5327. _internal_metadata_(NULL),
  5328. _has_bits_(from._has_bits_) {
  5329. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5330. a_ = from.a_;
  5331. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.RepeatedGroup_extension_lite)
  5332. }
  5333. void RepeatedGroup_extension_lite::SharedCtor() {
  5334. a_ = 0;
  5335. }
  5336. RepeatedGroup_extension_lite::~RepeatedGroup_extension_lite() {
  5337. // @@protoc_insertion_point(destructor:protobuf_unittest.RepeatedGroup_extension_lite)
  5338. SharedDtor();
  5339. }
  5340. void RepeatedGroup_extension_lite::SharedDtor() {
  5341. }
  5342. void RepeatedGroup_extension_lite::SetCachedSize(int size) const {
  5343. _cached_size_.Set(size);
  5344. }
  5345. const RepeatedGroup_extension_lite& RepeatedGroup_extension_lite::default_instance() {
  5346. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_RepeatedGroup_extension_lite.base);
  5347. return *internal_default_instance();
  5348. }
  5349. void RepeatedGroup_extension_lite::Clear() {
  5350. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.RepeatedGroup_extension_lite)
  5351. ::google::protobuf::uint32 cached_has_bits = 0;
  5352. // Prevent compiler warnings about cached_has_bits being unused
  5353. (void) cached_has_bits;
  5354. a_ = 0;
  5355. _has_bits_.Clear();
  5356. _internal_metadata_.Clear();
  5357. }
  5358. bool RepeatedGroup_extension_lite::MergePartialFromCodedStream(
  5359. ::google::protobuf::io::CodedInputStream* input) {
  5360. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5361. ::google::protobuf::uint32 tag;
  5362. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  5363. &_internal_metadata_);
  5364. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  5365. unknown_fields_setter.buffer());
  5366. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  5367. &unknown_fields_output, false);
  5368. // @@protoc_insertion_point(parse_start:protobuf_unittest.RepeatedGroup_extension_lite)
  5369. for (;;) {
  5370. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  5371. tag = p.first;
  5372. if (!p.second) goto handle_unusual;
  5373. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5374. // optional int32 a = 47;
  5375. case 47: {
  5376. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5377. static_cast< ::google::protobuf::uint8>(120u /* 376 & 0xFF */)) {
  5378. set_has_a();
  5379. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5380. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  5381. input, &a_)));
  5382. } else {
  5383. goto handle_unusual;
  5384. }
  5385. break;
  5386. }
  5387. default: {
  5388. handle_unusual:
  5389. if (tag == 0 ||
  5390. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  5391. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  5392. input->SetLastTag(tag);
  5393. goto success;
  5394. }
  5395. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  5396. input, tag, &unknown_fields_stream));
  5397. break;
  5398. }
  5399. }
  5400. }
  5401. success:
  5402. // @@protoc_insertion_point(parse_success:protobuf_unittest.RepeatedGroup_extension_lite)
  5403. return true;
  5404. failure:
  5405. // @@protoc_insertion_point(parse_failure:protobuf_unittest.RepeatedGroup_extension_lite)
  5406. return false;
  5407. #undef DO_
  5408. }
  5409. void RepeatedGroup_extension_lite::SerializeWithCachedSizes(
  5410. ::google::protobuf::io::CodedOutputStream* output) const {
  5411. // @@protoc_insertion_point(serialize_start:protobuf_unittest.RepeatedGroup_extension_lite)
  5412. ::google::protobuf::uint32 cached_has_bits = 0;
  5413. (void) cached_has_bits;
  5414. cached_has_bits = _has_bits_[0];
  5415. // optional int32 a = 47;
  5416. if (cached_has_bits & 0x00000001u) {
  5417. ::google::protobuf::internal::WireFormatLite::WriteInt32(47, this->a(), output);
  5418. }
  5419. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  5420. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  5421. // @@protoc_insertion_point(serialize_end:protobuf_unittest.RepeatedGroup_extension_lite)
  5422. }
  5423. size_t RepeatedGroup_extension_lite::ByteSizeLong() const {
  5424. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.RepeatedGroup_extension_lite)
  5425. size_t total_size = 0;
  5426. total_size += _internal_metadata_.unknown_fields().size();
  5427. // optional int32 a = 47;
  5428. if (has_a()) {
  5429. total_size += 2 +
  5430. ::google::protobuf::internal::WireFormatLite::Int32Size(
  5431. this->a());
  5432. }
  5433. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5434. SetCachedSize(cached_size);
  5435. return total_size;
  5436. }
  5437. void RepeatedGroup_extension_lite::CheckTypeAndMergeFrom(
  5438. const ::google::protobuf::MessageLite& from) {
  5439. MergeFrom(*::google::protobuf::down_cast<const RepeatedGroup_extension_lite*>(&from));
  5440. }
  5441. void RepeatedGroup_extension_lite::MergeFrom(const RepeatedGroup_extension_lite& from) {
  5442. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.RepeatedGroup_extension_lite)
  5443. GOOGLE_DCHECK_NE(&from, this);
  5444. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5445. ::google::protobuf::uint32 cached_has_bits = 0;
  5446. (void) cached_has_bits;
  5447. if (from.has_a()) {
  5448. set_a(from.a());
  5449. }
  5450. }
  5451. void RepeatedGroup_extension_lite::CopyFrom(const RepeatedGroup_extension_lite& from) {
  5452. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.RepeatedGroup_extension_lite)
  5453. if (&from == this) return;
  5454. Clear();
  5455. MergeFrom(from);
  5456. }
  5457. bool RepeatedGroup_extension_lite::IsInitialized() const {
  5458. return true;
  5459. }
  5460. void RepeatedGroup_extension_lite::Swap(RepeatedGroup_extension_lite* other) {
  5461. if (other == this) return;
  5462. InternalSwap(other);
  5463. }
  5464. void RepeatedGroup_extension_lite::InternalSwap(RepeatedGroup_extension_lite* other) {
  5465. using std::swap;
  5466. swap(a_, other->a_);
  5467. swap(_has_bits_[0], other->_has_bits_[0]);
  5468. _internal_metadata_.Swap(&other->_internal_metadata_);
  5469. }
  5470. ::std::string RepeatedGroup_extension_lite::GetTypeName() const {
  5471. return "protobuf_unittest.RepeatedGroup_extension_lite";
  5472. }
  5473. // ===================================================================
  5474. void TestPackedExtensionsLite::InitAsDefaultInstance() {
  5475. }
  5476. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5477. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5478. TestPackedExtensionsLite::TestPackedExtensionsLite()
  5479. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  5480. ::google::protobuf::internal::InitSCC(
  5481. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestPackedExtensionsLite.base);
  5482. SharedCtor();
  5483. // @@protoc_insertion_point(constructor:protobuf_unittest.TestPackedExtensionsLite)
  5484. }
  5485. TestPackedExtensionsLite::TestPackedExtensionsLite(const TestPackedExtensionsLite& from)
  5486. : ::google::protobuf::MessageLite(),
  5487. _internal_metadata_(NULL),
  5488. _has_bits_(from._has_bits_) {
  5489. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5490. _extensions_.MergeFrom(from._extensions_);
  5491. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestPackedExtensionsLite)
  5492. }
  5493. void TestPackedExtensionsLite::SharedCtor() {
  5494. }
  5495. TestPackedExtensionsLite::~TestPackedExtensionsLite() {
  5496. // @@protoc_insertion_point(destructor:protobuf_unittest.TestPackedExtensionsLite)
  5497. SharedDtor();
  5498. }
  5499. void TestPackedExtensionsLite::SharedDtor() {
  5500. }
  5501. void TestPackedExtensionsLite::SetCachedSize(int size) const {
  5502. _cached_size_.Set(size);
  5503. }
  5504. const TestPackedExtensionsLite& TestPackedExtensionsLite::default_instance() {
  5505. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestPackedExtensionsLite.base);
  5506. return *internal_default_instance();
  5507. }
  5508. void TestPackedExtensionsLite::Clear() {
  5509. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestPackedExtensionsLite)
  5510. ::google::protobuf::uint32 cached_has_bits = 0;
  5511. // Prevent compiler warnings about cached_has_bits being unused
  5512. (void) cached_has_bits;
  5513. _extensions_.Clear();
  5514. _has_bits_.Clear();
  5515. _internal_metadata_.Clear();
  5516. }
  5517. bool TestPackedExtensionsLite::MergePartialFromCodedStream(
  5518. ::google::protobuf::io::CodedInputStream* input) {
  5519. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5520. ::google::protobuf::uint32 tag;
  5521. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  5522. &_internal_metadata_);
  5523. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  5524. unknown_fields_setter.buffer());
  5525. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  5526. &unknown_fields_output, false);
  5527. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestPackedExtensionsLite)
  5528. for (;;) {
  5529. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5530. tag = p.first;
  5531. if (!p.second) goto handle_unusual;
  5532. handle_unusual:
  5533. if (tag == 0) {
  5534. goto success;
  5535. }
  5536. if ((8u <= tag)) {
  5537. DO_(_extensions_.ParseField(tag, input,
  5538. internal_default_instance(),
  5539. &unknown_fields_stream));
  5540. continue;
  5541. }
  5542. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  5543. input, tag, &unknown_fields_stream));
  5544. }
  5545. success:
  5546. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestPackedExtensionsLite)
  5547. return true;
  5548. failure:
  5549. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestPackedExtensionsLite)
  5550. return false;
  5551. #undef DO_
  5552. }
  5553. void TestPackedExtensionsLite::SerializeWithCachedSizes(
  5554. ::google::protobuf::io::CodedOutputStream* output) const {
  5555. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestPackedExtensionsLite)
  5556. ::google::protobuf::uint32 cached_has_bits = 0;
  5557. (void) cached_has_bits;
  5558. // Extension range [1, 536870912)
  5559. _extensions_.SerializeWithCachedSizes(
  5560. 1, 536870912, output);
  5561. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  5562. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  5563. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestPackedExtensionsLite)
  5564. }
  5565. size_t TestPackedExtensionsLite::ByteSizeLong() const {
  5566. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestPackedExtensionsLite)
  5567. size_t total_size = 0;
  5568. total_size += _extensions_.ByteSize();
  5569. total_size += _internal_metadata_.unknown_fields().size();
  5570. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5571. SetCachedSize(cached_size);
  5572. return total_size;
  5573. }
  5574. void TestPackedExtensionsLite::CheckTypeAndMergeFrom(
  5575. const ::google::protobuf::MessageLite& from) {
  5576. MergeFrom(*::google::protobuf::down_cast<const TestPackedExtensionsLite*>(&from));
  5577. }
  5578. void TestPackedExtensionsLite::MergeFrom(const TestPackedExtensionsLite& from) {
  5579. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestPackedExtensionsLite)
  5580. GOOGLE_DCHECK_NE(&from, this);
  5581. _extensions_.MergeFrom(from._extensions_);
  5582. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5583. ::google::protobuf::uint32 cached_has_bits = 0;
  5584. (void) cached_has_bits;
  5585. }
  5586. void TestPackedExtensionsLite::CopyFrom(const TestPackedExtensionsLite& from) {
  5587. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestPackedExtensionsLite)
  5588. if (&from == this) return;
  5589. Clear();
  5590. MergeFrom(from);
  5591. }
  5592. bool TestPackedExtensionsLite::IsInitialized() const {
  5593. if (!_extensions_.IsInitialized()) {
  5594. return false;
  5595. }
  5596. return true;
  5597. }
  5598. void TestPackedExtensionsLite::Swap(TestPackedExtensionsLite* other) {
  5599. if (other == this) return;
  5600. InternalSwap(other);
  5601. }
  5602. void TestPackedExtensionsLite::InternalSwap(TestPackedExtensionsLite* other) {
  5603. using std::swap;
  5604. swap(_has_bits_[0], other->_has_bits_[0]);
  5605. _internal_metadata_.Swap(&other->_internal_metadata_);
  5606. _extensions_.Swap(&other->_extensions_);
  5607. }
  5608. ::std::string TestPackedExtensionsLite::GetTypeName() const {
  5609. return "protobuf_unittest.TestPackedExtensionsLite";
  5610. }
  5611. // ===================================================================
  5612. void TestNestedExtensionLite::InitAsDefaultInstance() {
  5613. }
  5614. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5615. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5616. TestNestedExtensionLite::TestNestedExtensionLite()
  5617. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  5618. ::google::protobuf::internal::InitSCC(
  5619. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestNestedExtensionLite.base);
  5620. SharedCtor();
  5621. // @@protoc_insertion_point(constructor:protobuf_unittest.TestNestedExtensionLite)
  5622. }
  5623. TestNestedExtensionLite::TestNestedExtensionLite(const TestNestedExtensionLite& from)
  5624. : ::google::protobuf::MessageLite(),
  5625. _internal_metadata_(NULL),
  5626. _has_bits_(from._has_bits_) {
  5627. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5628. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestNestedExtensionLite)
  5629. }
  5630. void TestNestedExtensionLite::SharedCtor() {
  5631. }
  5632. TestNestedExtensionLite::~TestNestedExtensionLite() {
  5633. // @@protoc_insertion_point(destructor:protobuf_unittest.TestNestedExtensionLite)
  5634. SharedDtor();
  5635. }
  5636. void TestNestedExtensionLite::SharedDtor() {
  5637. }
  5638. void TestNestedExtensionLite::SetCachedSize(int size) const {
  5639. _cached_size_.Set(size);
  5640. }
  5641. const TestNestedExtensionLite& TestNestedExtensionLite::default_instance() {
  5642. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestNestedExtensionLite.base);
  5643. return *internal_default_instance();
  5644. }
  5645. void TestNestedExtensionLite::Clear() {
  5646. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestNestedExtensionLite)
  5647. ::google::protobuf::uint32 cached_has_bits = 0;
  5648. // Prevent compiler warnings about cached_has_bits being unused
  5649. (void) cached_has_bits;
  5650. _has_bits_.Clear();
  5651. _internal_metadata_.Clear();
  5652. }
  5653. bool TestNestedExtensionLite::MergePartialFromCodedStream(
  5654. ::google::protobuf::io::CodedInputStream* input) {
  5655. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5656. ::google::protobuf::uint32 tag;
  5657. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  5658. &_internal_metadata_);
  5659. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  5660. unknown_fields_setter.buffer());
  5661. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  5662. &unknown_fields_output, false);
  5663. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestNestedExtensionLite)
  5664. for (;;) {
  5665. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5666. tag = p.first;
  5667. if (!p.second) goto handle_unusual;
  5668. handle_unusual:
  5669. if (tag == 0) {
  5670. goto success;
  5671. }
  5672. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  5673. input, tag, &unknown_fields_stream));
  5674. }
  5675. success:
  5676. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestNestedExtensionLite)
  5677. return true;
  5678. failure:
  5679. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestNestedExtensionLite)
  5680. return false;
  5681. #undef DO_
  5682. }
  5683. void TestNestedExtensionLite::SerializeWithCachedSizes(
  5684. ::google::protobuf::io::CodedOutputStream* output) const {
  5685. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestNestedExtensionLite)
  5686. ::google::protobuf::uint32 cached_has_bits = 0;
  5687. (void) cached_has_bits;
  5688. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  5689. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  5690. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestNestedExtensionLite)
  5691. }
  5692. size_t TestNestedExtensionLite::ByteSizeLong() const {
  5693. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestNestedExtensionLite)
  5694. size_t total_size = 0;
  5695. total_size += _internal_metadata_.unknown_fields().size();
  5696. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5697. SetCachedSize(cached_size);
  5698. return total_size;
  5699. }
  5700. void TestNestedExtensionLite::CheckTypeAndMergeFrom(
  5701. const ::google::protobuf::MessageLite& from) {
  5702. MergeFrom(*::google::protobuf::down_cast<const TestNestedExtensionLite*>(&from));
  5703. }
  5704. void TestNestedExtensionLite::MergeFrom(const TestNestedExtensionLite& from) {
  5705. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestNestedExtensionLite)
  5706. GOOGLE_DCHECK_NE(&from, this);
  5707. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5708. ::google::protobuf::uint32 cached_has_bits = 0;
  5709. (void) cached_has_bits;
  5710. }
  5711. void TestNestedExtensionLite::CopyFrom(const TestNestedExtensionLite& from) {
  5712. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestNestedExtensionLite)
  5713. if (&from == this) return;
  5714. Clear();
  5715. MergeFrom(from);
  5716. }
  5717. bool TestNestedExtensionLite::IsInitialized() const {
  5718. return true;
  5719. }
  5720. void TestNestedExtensionLite::Swap(TestNestedExtensionLite* other) {
  5721. if (other == this) return;
  5722. InternalSwap(other);
  5723. }
  5724. void TestNestedExtensionLite::InternalSwap(TestNestedExtensionLite* other) {
  5725. using std::swap;
  5726. swap(_has_bits_[0], other->_has_bits_[0]);
  5727. _internal_metadata_.Swap(&other->_internal_metadata_);
  5728. }
  5729. ::std::string TestNestedExtensionLite::GetTypeName() const {
  5730. return "protobuf_unittest.TestNestedExtensionLite";
  5731. }
  5732. // ===================================================================
  5733. void TestDeprecatedLite::InitAsDefaultInstance() {
  5734. }
  5735. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5736. const int TestDeprecatedLite::kDeprecatedFieldFieldNumber;
  5737. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5738. TestDeprecatedLite::TestDeprecatedLite()
  5739. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  5740. ::google::protobuf::internal::InitSCC(
  5741. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestDeprecatedLite.base);
  5742. SharedCtor();
  5743. // @@protoc_insertion_point(constructor:protobuf_unittest.TestDeprecatedLite)
  5744. }
  5745. TestDeprecatedLite::TestDeprecatedLite(const TestDeprecatedLite& from)
  5746. : ::google::protobuf::MessageLite(),
  5747. _internal_metadata_(NULL),
  5748. _has_bits_(from._has_bits_) {
  5749. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5750. deprecated_field_ = from.deprecated_field_;
  5751. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDeprecatedLite)
  5752. }
  5753. void TestDeprecatedLite::SharedCtor() {
  5754. deprecated_field_ = 0;
  5755. }
  5756. TestDeprecatedLite::~TestDeprecatedLite() {
  5757. // @@protoc_insertion_point(destructor:protobuf_unittest.TestDeprecatedLite)
  5758. SharedDtor();
  5759. }
  5760. void TestDeprecatedLite::SharedDtor() {
  5761. }
  5762. void TestDeprecatedLite::SetCachedSize(int size) const {
  5763. _cached_size_.Set(size);
  5764. }
  5765. const TestDeprecatedLite& TestDeprecatedLite::default_instance() {
  5766. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestDeprecatedLite.base);
  5767. return *internal_default_instance();
  5768. }
  5769. void TestDeprecatedLite::Clear() {
  5770. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestDeprecatedLite)
  5771. ::google::protobuf::uint32 cached_has_bits = 0;
  5772. // Prevent compiler warnings about cached_has_bits being unused
  5773. (void) cached_has_bits;
  5774. deprecated_field_ = 0;
  5775. _has_bits_.Clear();
  5776. _internal_metadata_.Clear();
  5777. }
  5778. bool TestDeprecatedLite::MergePartialFromCodedStream(
  5779. ::google::protobuf::io::CodedInputStream* input) {
  5780. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5781. ::google::protobuf::uint32 tag;
  5782. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  5783. &_internal_metadata_);
  5784. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  5785. unknown_fields_setter.buffer());
  5786. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  5787. &unknown_fields_output, false);
  5788. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestDeprecatedLite)
  5789. for (;;) {
  5790. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5791. tag = p.first;
  5792. if (!p.second) goto handle_unusual;
  5793. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5794. // optional int32 deprecated_field = 1 [deprecated = true];
  5795. case 1: {
  5796. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5797. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  5798. set_has_deprecated_field();
  5799. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5800. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  5801. input, &deprecated_field_)));
  5802. } else {
  5803. goto handle_unusual;
  5804. }
  5805. break;
  5806. }
  5807. default: {
  5808. handle_unusual:
  5809. if (tag == 0) {
  5810. goto success;
  5811. }
  5812. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  5813. input, tag, &unknown_fields_stream));
  5814. break;
  5815. }
  5816. }
  5817. }
  5818. success:
  5819. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestDeprecatedLite)
  5820. return true;
  5821. failure:
  5822. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDeprecatedLite)
  5823. return false;
  5824. #undef DO_
  5825. }
  5826. void TestDeprecatedLite::SerializeWithCachedSizes(
  5827. ::google::protobuf::io::CodedOutputStream* output) const {
  5828. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestDeprecatedLite)
  5829. ::google::protobuf::uint32 cached_has_bits = 0;
  5830. (void) cached_has_bits;
  5831. cached_has_bits = _has_bits_[0];
  5832. // optional int32 deprecated_field = 1 [deprecated = true];
  5833. if (cached_has_bits & 0x00000001u) {
  5834. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->deprecated_field(), output);
  5835. }
  5836. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  5837. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  5838. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDeprecatedLite)
  5839. }
  5840. size_t TestDeprecatedLite::ByteSizeLong() const {
  5841. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDeprecatedLite)
  5842. size_t total_size = 0;
  5843. total_size += _internal_metadata_.unknown_fields().size();
  5844. // optional int32 deprecated_field = 1 [deprecated = true];
  5845. if (has_deprecated_field()) {
  5846. total_size += 1 +
  5847. ::google::protobuf::internal::WireFormatLite::Int32Size(
  5848. this->deprecated_field());
  5849. }
  5850. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5851. SetCachedSize(cached_size);
  5852. return total_size;
  5853. }
  5854. void TestDeprecatedLite::CheckTypeAndMergeFrom(
  5855. const ::google::protobuf::MessageLite& from) {
  5856. MergeFrom(*::google::protobuf::down_cast<const TestDeprecatedLite*>(&from));
  5857. }
  5858. void TestDeprecatedLite::MergeFrom(const TestDeprecatedLite& from) {
  5859. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestDeprecatedLite)
  5860. GOOGLE_DCHECK_NE(&from, this);
  5861. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5862. ::google::protobuf::uint32 cached_has_bits = 0;
  5863. (void) cached_has_bits;
  5864. if (from.has_deprecated_field()) {
  5865. set_deprecated_field(from.deprecated_field());
  5866. }
  5867. }
  5868. void TestDeprecatedLite::CopyFrom(const TestDeprecatedLite& from) {
  5869. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDeprecatedLite)
  5870. if (&from == this) return;
  5871. Clear();
  5872. MergeFrom(from);
  5873. }
  5874. bool TestDeprecatedLite::IsInitialized() const {
  5875. return true;
  5876. }
  5877. void TestDeprecatedLite::Swap(TestDeprecatedLite* other) {
  5878. if (other == this) return;
  5879. InternalSwap(other);
  5880. }
  5881. void TestDeprecatedLite::InternalSwap(TestDeprecatedLite* other) {
  5882. using std::swap;
  5883. swap(deprecated_field_, other->deprecated_field_);
  5884. swap(_has_bits_[0], other->_has_bits_[0]);
  5885. _internal_metadata_.Swap(&other->_internal_metadata_);
  5886. }
  5887. ::std::string TestDeprecatedLite::GetTypeName() const {
  5888. return "protobuf_unittest.TestDeprecatedLite";
  5889. }
  5890. // ===================================================================
  5891. void TestParsingMergeLite_RepeatedFieldsGenerator_Group1::InitAsDefaultInstance() {
  5892. ::protobuf_unittest::_TestParsingMergeLite_RepeatedFieldsGenerator_Group1_default_instance_._instance.get_mutable()->field1_ = const_cast< ::protobuf_unittest::TestAllTypesLite*>(
  5893. ::protobuf_unittest::TestAllTypesLite::internal_default_instance());
  5894. }
  5895. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5896. const int TestParsingMergeLite_RepeatedFieldsGenerator_Group1::kField1FieldNumber;
  5897. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5898. TestParsingMergeLite_RepeatedFieldsGenerator_Group1::TestParsingMergeLite_RepeatedFieldsGenerator_Group1()
  5899. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  5900. ::google::protobuf::internal::InitSCC(
  5901. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite_RepeatedFieldsGenerator_Group1.base);
  5902. SharedCtor();
  5903. // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group1)
  5904. }
  5905. TestParsingMergeLite_RepeatedFieldsGenerator_Group1::TestParsingMergeLite_RepeatedFieldsGenerator_Group1(const TestParsingMergeLite_RepeatedFieldsGenerator_Group1& from)
  5906. : ::google::protobuf::MessageLite(),
  5907. _internal_metadata_(NULL),
  5908. _has_bits_(from._has_bits_) {
  5909. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5910. if (from.has_field1()) {
  5911. field1_ = new ::protobuf_unittest::TestAllTypesLite(*from.field1_);
  5912. } else {
  5913. field1_ = NULL;
  5914. }
  5915. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group1)
  5916. }
  5917. void TestParsingMergeLite_RepeatedFieldsGenerator_Group1::SharedCtor() {
  5918. field1_ = NULL;
  5919. }
  5920. TestParsingMergeLite_RepeatedFieldsGenerator_Group1::~TestParsingMergeLite_RepeatedFieldsGenerator_Group1() {
  5921. // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group1)
  5922. SharedDtor();
  5923. }
  5924. void TestParsingMergeLite_RepeatedFieldsGenerator_Group1::SharedDtor() {
  5925. if (this != internal_default_instance()) delete field1_;
  5926. }
  5927. void TestParsingMergeLite_RepeatedFieldsGenerator_Group1::SetCachedSize(int size) const {
  5928. _cached_size_.Set(size);
  5929. }
  5930. const TestParsingMergeLite_RepeatedFieldsGenerator_Group1& TestParsingMergeLite_RepeatedFieldsGenerator_Group1::default_instance() {
  5931. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite_RepeatedFieldsGenerator_Group1.base);
  5932. return *internal_default_instance();
  5933. }
  5934. void TestParsingMergeLite_RepeatedFieldsGenerator_Group1::Clear() {
  5935. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group1)
  5936. ::google::protobuf::uint32 cached_has_bits = 0;
  5937. // Prevent compiler warnings about cached_has_bits being unused
  5938. (void) cached_has_bits;
  5939. cached_has_bits = _has_bits_[0];
  5940. if (cached_has_bits & 0x00000001u) {
  5941. GOOGLE_DCHECK(field1_ != NULL);
  5942. field1_->Clear();
  5943. }
  5944. _has_bits_.Clear();
  5945. _internal_metadata_.Clear();
  5946. }
  5947. bool TestParsingMergeLite_RepeatedFieldsGenerator_Group1::MergePartialFromCodedStream(
  5948. ::google::protobuf::io::CodedInputStream* input) {
  5949. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5950. ::google::protobuf::uint32 tag;
  5951. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  5952. &_internal_metadata_);
  5953. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  5954. unknown_fields_setter.buffer());
  5955. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  5956. &unknown_fields_output, false);
  5957. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group1)
  5958. for (;;) {
  5959. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5960. tag = p.first;
  5961. if (!p.second) goto handle_unusual;
  5962. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5963. // optional .protobuf_unittest.TestAllTypesLite field1 = 11;
  5964. case 11: {
  5965. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5966. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  5967. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5968. input, mutable_field1()));
  5969. } else {
  5970. goto handle_unusual;
  5971. }
  5972. break;
  5973. }
  5974. default: {
  5975. handle_unusual:
  5976. if (tag == 0 ||
  5977. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  5978. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  5979. input->SetLastTag(tag);
  5980. goto success;
  5981. }
  5982. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  5983. input, tag, &unknown_fields_stream));
  5984. break;
  5985. }
  5986. }
  5987. }
  5988. success:
  5989. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group1)
  5990. return true;
  5991. failure:
  5992. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group1)
  5993. return false;
  5994. #undef DO_
  5995. }
  5996. void TestParsingMergeLite_RepeatedFieldsGenerator_Group1::SerializeWithCachedSizes(
  5997. ::google::protobuf::io::CodedOutputStream* output) const {
  5998. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group1)
  5999. ::google::protobuf::uint32 cached_has_bits = 0;
  6000. (void) cached_has_bits;
  6001. cached_has_bits = _has_bits_[0];
  6002. // optional .protobuf_unittest.TestAllTypesLite field1 = 11;
  6003. if (cached_has_bits & 0x00000001u) {
  6004. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  6005. 11, this->_internal_field1(), output);
  6006. }
  6007. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  6008. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  6009. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group1)
  6010. }
  6011. size_t TestParsingMergeLite_RepeatedFieldsGenerator_Group1::ByteSizeLong() const {
  6012. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group1)
  6013. size_t total_size = 0;
  6014. total_size += _internal_metadata_.unknown_fields().size();
  6015. // optional .protobuf_unittest.TestAllTypesLite field1 = 11;
  6016. if (has_field1()) {
  6017. total_size += 1 +
  6018. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6019. *field1_);
  6020. }
  6021. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6022. SetCachedSize(cached_size);
  6023. return total_size;
  6024. }
  6025. void TestParsingMergeLite_RepeatedFieldsGenerator_Group1::CheckTypeAndMergeFrom(
  6026. const ::google::protobuf::MessageLite& from) {
  6027. MergeFrom(*::google::protobuf::down_cast<const TestParsingMergeLite_RepeatedFieldsGenerator_Group1*>(&from));
  6028. }
  6029. void TestParsingMergeLite_RepeatedFieldsGenerator_Group1::MergeFrom(const TestParsingMergeLite_RepeatedFieldsGenerator_Group1& from) {
  6030. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group1)
  6031. GOOGLE_DCHECK_NE(&from, this);
  6032. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6033. ::google::protobuf::uint32 cached_has_bits = 0;
  6034. (void) cached_has_bits;
  6035. if (from.has_field1()) {
  6036. mutable_field1()->::protobuf_unittest::TestAllTypesLite::MergeFrom(from.field1());
  6037. }
  6038. }
  6039. void TestParsingMergeLite_RepeatedFieldsGenerator_Group1::CopyFrom(const TestParsingMergeLite_RepeatedFieldsGenerator_Group1& from) {
  6040. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group1)
  6041. if (&from == this) return;
  6042. Clear();
  6043. MergeFrom(from);
  6044. }
  6045. bool TestParsingMergeLite_RepeatedFieldsGenerator_Group1::IsInitialized() const {
  6046. return true;
  6047. }
  6048. void TestParsingMergeLite_RepeatedFieldsGenerator_Group1::Swap(TestParsingMergeLite_RepeatedFieldsGenerator_Group1* other) {
  6049. if (other == this) return;
  6050. InternalSwap(other);
  6051. }
  6052. void TestParsingMergeLite_RepeatedFieldsGenerator_Group1::InternalSwap(TestParsingMergeLite_RepeatedFieldsGenerator_Group1* other) {
  6053. using std::swap;
  6054. swap(field1_, other->field1_);
  6055. swap(_has_bits_[0], other->_has_bits_[0]);
  6056. _internal_metadata_.Swap(&other->_internal_metadata_);
  6057. }
  6058. ::std::string TestParsingMergeLite_RepeatedFieldsGenerator_Group1::GetTypeName() const {
  6059. return "protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group1";
  6060. }
  6061. // ===================================================================
  6062. void TestParsingMergeLite_RepeatedFieldsGenerator_Group2::InitAsDefaultInstance() {
  6063. ::protobuf_unittest::_TestParsingMergeLite_RepeatedFieldsGenerator_Group2_default_instance_._instance.get_mutable()->field1_ = const_cast< ::protobuf_unittest::TestAllTypesLite*>(
  6064. ::protobuf_unittest::TestAllTypesLite::internal_default_instance());
  6065. }
  6066. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6067. const int TestParsingMergeLite_RepeatedFieldsGenerator_Group2::kField1FieldNumber;
  6068. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6069. TestParsingMergeLite_RepeatedFieldsGenerator_Group2::TestParsingMergeLite_RepeatedFieldsGenerator_Group2()
  6070. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  6071. ::google::protobuf::internal::InitSCC(
  6072. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite_RepeatedFieldsGenerator_Group2.base);
  6073. SharedCtor();
  6074. // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group2)
  6075. }
  6076. TestParsingMergeLite_RepeatedFieldsGenerator_Group2::TestParsingMergeLite_RepeatedFieldsGenerator_Group2(const TestParsingMergeLite_RepeatedFieldsGenerator_Group2& from)
  6077. : ::google::protobuf::MessageLite(),
  6078. _internal_metadata_(NULL),
  6079. _has_bits_(from._has_bits_) {
  6080. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6081. if (from.has_field1()) {
  6082. field1_ = new ::protobuf_unittest::TestAllTypesLite(*from.field1_);
  6083. } else {
  6084. field1_ = NULL;
  6085. }
  6086. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group2)
  6087. }
  6088. void TestParsingMergeLite_RepeatedFieldsGenerator_Group2::SharedCtor() {
  6089. field1_ = NULL;
  6090. }
  6091. TestParsingMergeLite_RepeatedFieldsGenerator_Group2::~TestParsingMergeLite_RepeatedFieldsGenerator_Group2() {
  6092. // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group2)
  6093. SharedDtor();
  6094. }
  6095. void TestParsingMergeLite_RepeatedFieldsGenerator_Group2::SharedDtor() {
  6096. if (this != internal_default_instance()) delete field1_;
  6097. }
  6098. void TestParsingMergeLite_RepeatedFieldsGenerator_Group2::SetCachedSize(int size) const {
  6099. _cached_size_.Set(size);
  6100. }
  6101. const TestParsingMergeLite_RepeatedFieldsGenerator_Group2& TestParsingMergeLite_RepeatedFieldsGenerator_Group2::default_instance() {
  6102. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite_RepeatedFieldsGenerator_Group2.base);
  6103. return *internal_default_instance();
  6104. }
  6105. void TestParsingMergeLite_RepeatedFieldsGenerator_Group2::Clear() {
  6106. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group2)
  6107. ::google::protobuf::uint32 cached_has_bits = 0;
  6108. // Prevent compiler warnings about cached_has_bits being unused
  6109. (void) cached_has_bits;
  6110. cached_has_bits = _has_bits_[0];
  6111. if (cached_has_bits & 0x00000001u) {
  6112. GOOGLE_DCHECK(field1_ != NULL);
  6113. field1_->Clear();
  6114. }
  6115. _has_bits_.Clear();
  6116. _internal_metadata_.Clear();
  6117. }
  6118. bool TestParsingMergeLite_RepeatedFieldsGenerator_Group2::MergePartialFromCodedStream(
  6119. ::google::protobuf::io::CodedInputStream* input) {
  6120. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6121. ::google::protobuf::uint32 tag;
  6122. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  6123. &_internal_metadata_);
  6124. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  6125. unknown_fields_setter.buffer());
  6126. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  6127. &unknown_fields_output, false);
  6128. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group2)
  6129. for (;;) {
  6130. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  6131. tag = p.first;
  6132. if (!p.second) goto handle_unusual;
  6133. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6134. // optional .protobuf_unittest.TestAllTypesLite field1 = 21;
  6135. case 21: {
  6136. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6137. static_cast< ::google::protobuf::uint8>(170u /* 170 & 0xFF */)) {
  6138. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6139. input, mutable_field1()));
  6140. } else {
  6141. goto handle_unusual;
  6142. }
  6143. break;
  6144. }
  6145. default: {
  6146. handle_unusual:
  6147. if (tag == 0 ||
  6148. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  6149. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  6150. input->SetLastTag(tag);
  6151. goto success;
  6152. }
  6153. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  6154. input, tag, &unknown_fields_stream));
  6155. break;
  6156. }
  6157. }
  6158. }
  6159. success:
  6160. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group2)
  6161. return true;
  6162. failure:
  6163. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group2)
  6164. return false;
  6165. #undef DO_
  6166. }
  6167. void TestParsingMergeLite_RepeatedFieldsGenerator_Group2::SerializeWithCachedSizes(
  6168. ::google::protobuf::io::CodedOutputStream* output) const {
  6169. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group2)
  6170. ::google::protobuf::uint32 cached_has_bits = 0;
  6171. (void) cached_has_bits;
  6172. cached_has_bits = _has_bits_[0];
  6173. // optional .protobuf_unittest.TestAllTypesLite field1 = 21;
  6174. if (cached_has_bits & 0x00000001u) {
  6175. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  6176. 21, this->_internal_field1(), output);
  6177. }
  6178. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  6179. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  6180. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group2)
  6181. }
  6182. size_t TestParsingMergeLite_RepeatedFieldsGenerator_Group2::ByteSizeLong() const {
  6183. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group2)
  6184. size_t total_size = 0;
  6185. total_size += _internal_metadata_.unknown_fields().size();
  6186. // optional .protobuf_unittest.TestAllTypesLite field1 = 21;
  6187. if (has_field1()) {
  6188. total_size += 2 +
  6189. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6190. *field1_);
  6191. }
  6192. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6193. SetCachedSize(cached_size);
  6194. return total_size;
  6195. }
  6196. void TestParsingMergeLite_RepeatedFieldsGenerator_Group2::CheckTypeAndMergeFrom(
  6197. const ::google::protobuf::MessageLite& from) {
  6198. MergeFrom(*::google::protobuf::down_cast<const TestParsingMergeLite_RepeatedFieldsGenerator_Group2*>(&from));
  6199. }
  6200. void TestParsingMergeLite_RepeatedFieldsGenerator_Group2::MergeFrom(const TestParsingMergeLite_RepeatedFieldsGenerator_Group2& from) {
  6201. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group2)
  6202. GOOGLE_DCHECK_NE(&from, this);
  6203. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6204. ::google::protobuf::uint32 cached_has_bits = 0;
  6205. (void) cached_has_bits;
  6206. if (from.has_field1()) {
  6207. mutable_field1()->::protobuf_unittest::TestAllTypesLite::MergeFrom(from.field1());
  6208. }
  6209. }
  6210. void TestParsingMergeLite_RepeatedFieldsGenerator_Group2::CopyFrom(const TestParsingMergeLite_RepeatedFieldsGenerator_Group2& from) {
  6211. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group2)
  6212. if (&from == this) return;
  6213. Clear();
  6214. MergeFrom(from);
  6215. }
  6216. bool TestParsingMergeLite_RepeatedFieldsGenerator_Group2::IsInitialized() const {
  6217. return true;
  6218. }
  6219. void TestParsingMergeLite_RepeatedFieldsGenerator_Group2::Swap(TestParsingMergeLite_RepeatedFieldsGenerator_Group2* other) {
  6220. if (other == this) return;
  6221. InternalSwap(other);
  6222. }
  6223. void TestParsingMergeLite_RepeatedFieldsGenerator_Group2::InternalSwap(TestParsingMergeLite_RepeatedFieldsGenerator_Group2* other) {
  6224. using std::swap;
  6225. swap(field1_, other->field1_);
  6226. swap(_has_bits_[0], other->_has_bits_[0]);
  6227. _internal_metadata_.Swap(&other->_internal_metadata_);
  6228. }
  6229. ::std::string TestParsingMergeLite_RepeatedFieldsGenerator_Group2::GetTypeName() const {
  6230. return "protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator.Group2";
  6231. }
  6232. // ===================================================================
  6233. void TestParsingMergeLite_RepeatedFieldsGenerator::InitAsDefaultInstance() {
  6234. }
  6235. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6236. const int TestParsingMergeLite_RepeatedFieldsGenerator::kField1FieldNumber;
  6237. const int TestParsingMergeLite_RepeatedFieldsGenerator::kField2FieldNumber;
  6238. const int TestParsingMergeLite_RepeatedFieldsGenerator::kField3FieldNumber;
  6239. const int TestParsingMergeLite_RepeatedFieldsGenerator::kGroup1FieldNumber;
  6240. const int TestParsingMergeLite_RepeatedFieldsGenerator::kGroup2FieldNumber;
  6241. const int TestParsingMergeLite_RepeatedFieldsGenerator::kExt1FieldNumber;
  6242. const int TestParsingMergeLite_RepeatedFieldsGenerator::kExt2FieldNumber;
  6243. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6244. TestParsingMergeLite_RepeatedFieldsGenerator::TestParsingMergeLite_RepeatedFieldsGenerator()
  6245. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  6246. ::google::protobuf::internal::InitSCC(
  6247. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite_RepeatedFieldsGenerator.base);
  6248. SharedCtor();
  6249. // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator)
  6250. }
  6251. TestParsingMergeLite_RepeatedFieldsGenerator::TestParsingMergeLite_RepeatedFieldsGenerator(const TestParsingMergeLite_RepeatedFieldsGenerator& from)
  6252. : ::google::protobuf::MessageLite(),
  6253. _internal_metadata_(NULL),
  6254. _has_bits_(from._has_bits_),
  6255. field1_(from.field1_),
  6256. field2_(from.field2_),
  6257. field3_(from.field3_),
  6258. group1_(from.group1_),
  6259. group2_(from.group2_),
  6260. ext1_(from.ext1_),
  6261. ext2_(from.ext2_) {
  6262. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6263. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator)
  6264. }
  6265. void TestParsingMergeLite_RepeatedFieldsGenerator::SharedCtor() {
  6266. }
  6267. TestParsingMergeLite_RepeatedFieldsGenerator::~TestParsingMergeLite_RepeatedFieldsGenerator() {
  6268. // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator)
  6269. SharedDtor();
  6270. }
  6271. void TestParsingMergeLite_RepeatedFieldsGenerator::SharedDtor() {
  6272. }
  6273. void TestParsingMergeLite_RepeatedFieldsGenerator::SetCachedSize(int size) const {
  6274. _cached_size_.Set(size);
  6275. }
  6276. const TestParsingMergeLite_RepeatedFieldsGenerator& TestParsingMergeLite_RepeatedFieldsGenerator::default_instance() {
  6277. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite_RepeatedFieldsGenerator.base);
  6278. return *internal_default_instance();
  6279. }
  6280. void TestParsingMergeLite_RepeatedFieldsGenerator::Clear() {
  6281. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator)
  6282. ::google::protobuf::uint32 cached_has_bits = 0;
  6283. // Prevent compiler warnings about cached_has_bits being unused
  6284. (void) cached_has_bits;
  6285. field1_.Clear();
  6286. field2_.Clear();
  6287. field3_.Clear();
  6288. group1_.Clear();
  6289. group2_.Clear();
  6290. ext1_.Clear();
  6291. ext2_.Clear();
  6292. _has_bits_.Clear();
  6293. _internal_metadata_.Clear();
  6294. }
  6295. bool TestParsingMergeLite_RepeatedFieldsGenerator::MergePartialFromCodedStream(
  6296. ::google::protobuf::io::CodedInputStream* input) {
  6297. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6298. ::google::protobuf::uint32 tag;
  6299. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  6300. &_internal_metadata_);
  6301. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  6302. unknown_fields_setter.buffer());
  6303. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  6304. &unknown_fields_output, false);
  6305. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator)
  6306. for (;;) {
  6307. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  6308. tag = p.first;
  6309. if (!p.second) goto handle_unusual;
  6310. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6311. // repeated .protobuf_unittest.TestAllTypesLite field1 = 1;
  6312. case 1: {
  6313. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6314. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  6315. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6316. input, add_field1()));
  6317. } else {
  6318. goto handle_unusual;
  6319. }
  6320. break;
  6321. }
  6322. // repeated .protobuf_unittest.TestAllTypesLite field2 = 2;
  6323. case 2: {
  6324. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6325. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  6326. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6327. input, add_field2()));
  6328. } else {
  6329. goto handle_unusual;
  6330. }
  6331. break;
  6332. }
  6333. // repeated .protobuf_unittest.TestAllTypesLite field3 = 3;
  6334. case 3: {
  6335. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6336. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  6337. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6338. input, add_field3()));
  6339. } else {
  6340. goto handle_unusual;
  6341. }
  6342. break;
  6343. }
  6344. // repeated group Group1 = 10 { ... };
  6345. case 10: {
  6346. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6347. static_cast< ::google::protobuf::uint8>(83u /* 83 & 0xFF */)) {
  6348. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(10, input, add_group1()));
  6349. } else {
  6350. goto handle_unusual;
  6351. }
  6352. break;
  6353. }
  6354. // repeated group Group2 = 20 { ... };
  6355. case 20: {
  6356. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6357. static_cast< ::google::protobuf::uint8>(163u /* 163 & 0xFF */)) {
  6358. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(20, input, add_group2()));
  6359. } else {
  6360. goto handle_unusual;
  6361. }
  6362. break;
  6363. }
  6364. // repeated .protobuf_unittest.TestAllTypesLite ext1 = 1000;
  6365. case 1000: {
  6366. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6367. static_cast< ::google::protobuf::uint8>(66u /* 8002 & 0xFF */)) {
  6368. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6369. input, add_ext1()));
  6370. } else {
  6371. goto handle_unusual;
  6372. }
  6373. break;
  6374. }
  6375. // repeated .protobuf_unittest.TestAllTypesLite ext2 = 1001;
  6376. case 1001: {
  6377. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6378. static_cast< ::google::protobuf::uint8>(74u /* 8010 & 0xFF */)) {
  6379. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6380. input, add_ext2()));
  6381. } else {
  6382. goto handle_unusual;
  6383. }
  6384. break;
  6385. }
  6386. default: {
  6387. handle_unusual:
  6388. if (tag == 0) {
  6389. goto success;
  6390. }
  6391. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  6392. input, tag, &unknown_fields_stream));
  6393. break;
  6394. }
  6395. }
  6396. }
  6397. success:
  6398. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator)
  6399. return true;
  6400. failure:
  6401. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator)
  6402. return false;
  6403. #undef DO_
  6404. }
  6405. void TestParsingMergeLite_RepeatedFieldsGenerator::SerializeWithCachedSizes(
  6406. ::google::protobuf::io::CodedOutputStream* output) const {
  6407. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator)
  6408. ::google::protobuf::uint32 cached_has_bits = 0;
  6409. (void) cached_has_bits;
  6410. // repeated .protobuf_unittest.TestAllTypesLite field1 = 1;
  6411. for (unsigned int i = 0,
  6412. n = static_cast<unsigned int>(this->field1_size()); i < n; i++) {
  6413. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  6414. 1,
  6415. this->field1(static_cast<int>(i)),
  6416. output);
  6417. }
  6418. // repeated .protobuf_unittest.TestAllTypesLite field2 = 2;
  6419. for (unsigned int i = 0,
  6420. n = static_cast<unsigned int>(this->field2_size()); i < n; i++) {
  6421. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  6422. 2,
  6423. this->field2(static_cast<int>(i)),
  6424. output);
  6425. }
  6426. // repeated .protobuf_unittest.TestAllTypesLite field3 = 3;
  6427. for (unsigned int i = 0,
  6428. n = static_cast<unsigned int>(this->field3_size()); i < n; i++) {
  6429. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  6430. 3,
  6431. this->field3(static_cast<int>(i)),
  6432. output);
  6433. }
  6434. // repeated group Group1 = 10 { ... };
  6435. for (unsigned int i = 0,
  6436. n = static_cast<unsigned int>(this->group1_size()); i < n; i++) {
  6437. ::google::protobuf::internal::WireFormatLite::WriteGroup(
  6438. 10,
  6439. this->group1(static_cast<int>(i)),
  6440. output);
  6441. }
  6442. // repeated group Group2 = 20 { ... };
  6443. for (unsigned int i = 0,
  6444. n = static_cast<unsigned int>(this->group2_size()); i < n; i++) {
  6445. ::google::protobuf::internal::WireFormatLite::WriteGroup(
  6446. 20,
  6447. this->group2(static_cast<int>(i)),
  6448. output);
  6449. }
  6450. // repeated .protobuf_unittest.TestAllTypesLite ext1 = 1000;
  6451. for (unsigned int i = 0,
  6452. n = static_cast<unsigned int>(this->ext1_size()); i < n; i++) {
  6453. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  6454. 1000,
  6455. this->ext1(static_cast<int>(i)),
  6456. output);
  6457. }
  6458. // repeated .protobuf_unittest.TestAllTypesLite ext2 = 1001;
  6459. for (unsigned int i = 0,
  6460. n = static_cast<unsigned int>(this->ext2_size()); i < n; i++) {
  6461. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  6462. 1001,
  6463. this->ext2(static_cast<int>(i)),
  6464. output);
  6465. }
  6466. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  6467. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  6468. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator)
  6469. }
  6470. size_t TestParsingMergeLite_RepeatedFieldsGenerator::ByteSizeLong() const {
  6471. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator)
  6472. size_t total_size = 0;
  6473. total_size += _internal_metadata_.unknown_fields().size();
  6474. // repeated .protobuf_unittest.TestAllTypesLite field1 = 1;
  6475. {
  6476. unsigned int count = static_cast<unsigned int>(this->field1_size());
  6477. total_size += 1UL * count;
  6478. for (unsigned int i = 0; i < count; i++) {
  6479. total_size +=
  6480. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6481. this->field1(static_cast<int>(i)));
  6482. }
  6483. }
  6484. // repeated .protobuf_unittest.TestAllTypesLite field2 = 2;
  6485. {
  6486. unsigned int count = static_cast<unsigned int>(this->field2_size());
  6487. total_size += 1UL * count;
  6488. for (unsigned int i = 0; i < count; i++) {
  6489. total_size +=
  6490. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6491. this->field2(static_cast<int>(i)));
  6492. }
  6493. }
  6494. // repeated .protobuf_unittest.TestAllTypesLite field3 = 3;
  6495. {
  6496. unsigned int count = static_cast<unsigned int>(this->field3_size());
  6497. total_size += 1UL * count;
  6498. for (unsigned int i = 0; i < count; i++) {
  6499. total_size +=
  6500. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6501. this->field3(static_cast<int>(i)));
  6502. }
  6503. }
  6504. // repeated group Group1 = 10 { ... };
  6505. {
  6506. unsigned int count = static_cast<unsigned int>(this->group1_size());
  6507. total_size += 2UL * count;
  6508. for (unsigned int i = 0; i < count; i++) {
  6509. total_size +=
  6510. ::google::protobuf::internal::WireFormatLite::GroupSize(
  6511. this->group1(static_cast<int>(i)));
  6512. }
  6513. }
  6514. // repeated group Group2 = 20 { ... };
  6515. {
  6516. unsigned int count = static_cast<unsigned int>(this->group2_size());
  6517. total_size += 4UL * count;
  6518. for (unsigned int i = 0; i < count; i++) {
  6519. total_size +=
  6520. ::google::protobuf::internal::WireFormatLite::GroupSize(
  6521. this->group2(static_cast<int>(i)));
  6522. }
  6523. }
  6524. // repeated .protobuf_unittest.TestAllTypesLite ext1 = 1000;
  6525. {
  6526. unsigned int count = static_cast<unsigned int>(this->ext1_size());
  6527. total_size += 2UL * count;
  6528. for (unsigned int i = 0; i < count; i++) {
  6529. total_size +=
  6530. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6531. this->ext1(static_cast<int>(i)));
  6532. }
  6533. }
  6534. // repeated .protobuf_unittest.TestAllTypesLite ext2 = 1001;
  6535. {
  6536. unsigned int count = static_cast<unsigned int>(this->ext2_size());
  6537. total_size += 2UL * count;
  6538. for (unsigned int i = 0; i < count; i++) {
  6539. total_size +=
  6540. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6541. this->ext2(static_cast<int>(i)));
  6542. }
  6543. }
  6544. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6545. SetCachedSize(cached_size);
  6546. return total_size;
  6547. }
  6548. void TestParsingMergeLite_RepeatedFieldsGenerator::CheckTypeAndMergeFrom(
  6549. const ::google::protobuf::MessageLite& from) {
  6550. MergeFrom(*::google::protobuf::down_cast<const TestParsingMergeLite_RepeatedFieldsGenerator*>(&from));
  6551. }
  6552. void TestParsingMergeLite_RepeatedFieldsGenerator::MergeFrom(const TestParsingMergeLite_RepeatedFieldsGenerator& from) {
  6553. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator)
  6554. GOOGLE_DCHECK_NE(&from, this);
  6555. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6556. ::google::protobuf::uint32 cached_has_bits = 0;
  6557. (void) cached_has_bits;
  6558. field1_.MergeFrom(from.field1_);
  6559. field2_.MergeFrom(from.field2_);
  6560. field3_.MergeFrom(from.field3_);
  6561. group1_.MergeFrom(from.group1_);
  6562. group2_.MergeFrom(from.group2_);
  6563. ext1_.MergeFrom(from.ext1_);
  6564. ext2_.MergeFrom(from.ext2_);
  6565. }
  6566. void TestParsingMergeLite_RepeatedFieldsGenerator::CopyFrom(const TestParsingMergeLite_RepeatedFieldsGenerator& from) {
  6567. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator)
  6568. if (&from == this) return;
  6569. Clear();
  6570. MergeFrom(from);
  6571. }
  6572. bool TestParsingMergeLite_RepeatedFieldsGenerator::IsInitialized() const {
  6573. return true;
  6574. }
  6575. void TestParsingMergeLite_RepeatedFieldsGenerator::Swap(TestParsingMergeLite_RepeatedFieldsGenerator* other) {
  6576. if (other == this) return;
  6577. InternalSwap(other);
  6578. }
  6579. void TestParsingMergeLite_RepeatedFieldsGenerator::InternalSwap(TestParsingMergeLite_RepeatedFieldsGenerator* other) {
  6580. using std::swap;
  6581. CastToBase(&field1_)->InternalSwap(CastToBase(&other->field1_));
  6582. CastToBase(&field2_)->InternalSwap(CastToBase(&other->field2_));
  6583. CastToBase(&field3_)->InternalSwap(CastToBase(&other->field3_));
  6584. CastToBase(&group1_)->InternalSwap(CastToBase(&other->group1_));
  6585. CastToBase(&group2_)->InternalSwap(CastToBase(&other->group2_));
  6586. CastToBase(&ext1_)->InternalSwap(CastToBase(&other->ext1_));
  6587. CastToBase(&ext2_)->InternalSwap(CastToBase(&other->ext2_));
  6588. swap(_has_bits_[0], other->_has_bits_[0]);
  6589. _internal_metadata_.Swap(&other->_internal_metadata_);
  6590. }
  6591. ::std::string TestParsingMergeLite_RepeatedFieldsGenerator::GetTypeName() const {
  6592. return "protobuf_unittest.TestParsingMergeLite.RepeatedFieldsGenerator";
  6593. }
  6594. // ===================================================================
  6595. void TestParsingMergeLite_OptionalGroup::InitAsDefaultInstance() {
  6596. ::protobuf_unittest::_TestParsingMergeLite_OptionalGroup_default_instance_._instance.get_mutable()->optional_group_all_types_ = const_cast< ::protobuf_unittest::TestAllTypesLite*>(
  6597. ::protobuf_unittest::TestAllTypesLite::internal_default_instance());
  6598. }
  6599. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6600. const int TestParsingMergeLite_OptionalGroup::kOptionalGroupAllTypesFieldNumber;
  6601. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6602. TestParsingMergeLite_OptionalGroup::TestParsingMergeLite_OptionalGroup()
  6603. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  6604. ::google::protobuf::internal::InitSCC(
  6605. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite_OptionalGroup.base);
  6606. SharedCtor();
  6607. // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMergeLite.OptionalGroup)
  6608. }
  6609. TestParsingMergeLite_OptionalGroup::TestParsingMergeLite_OptionalGroup(const TestParsingMergeLite_OptionalGroup& from)
  6610. : ::google::protobuf::MessageLite(),
  6611. _internal_metadata_(NULL),
  6612. _has_bits_(from._has_bits_) {
  6613. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6614. if (from.has_optional_group_all_types()) {
  6615. optional_group_all_types_ = new ::protobuf_unittest::TestAllTypesLite(*from.optional_group_all_types_);
  6616. } else {
  6617. optional_group_all_types_ = NULL;
  6618. }
  6619. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMergeLite.OptionalGroup)
  6620. }
  6621. void TestParsingMergeLite_OptionalGroup::SharedCtor() {
  6622. optional_group_all_types_ = NULL;
  6623. }
  6624. TestParsingMergeLite_OptionalGroup::~TestParsingMergeLite_OptionalGroup() {
  6625. // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMergeLite.OptionalGroup)
  6626. SharedDtor();
  6627. }
  6628. void TestParsingMergeLite_OptionalGroup::SharedDtor() {
  6629. if (this != internal_default_instance()) delete optional_group_all_types_;
  6630. }
  6631. void TestParsingMergeLite_OptionalGroup::SetCachedSize(int size) const {
  6632. _cached_size_.Set(size);
  6633. }
  6634. const TestParsingMergeLite_OptionalGroup& TestParsingMergeLite_OptionalGroup::default_instance() {
  6635. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite_OptionalGroup.base);
  6636. return *internal_default_instance();
  6637. }
  6638. void TestParsingMergeLite_OptionalGroup::Clear() {
  6639. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestParsingMergeLite.OptionalGroup)
  6640. ::google::protobuf::uint32 cached_has_bits = 0;
  6641. // Prevent compiler warnings about cached_has_bits being unused
  6642. (void) cached_has_bits;
  6643. cached_has_bits = _has_bits_[0];
  6644. if (cached_has_bits & 0x00000001u) {
  6645. GOOGLE_DCHECK(optional_group_all_types_ != NULL);
  6646. optional_group_all_types_->Clear();
  6647. }
  6648. _has_bits_.Clear();
  6649. _internal_metadata_.Clear();
  6650. }
  6651. bool TestParsingMergeLite_OptionalGroup::MergePartialFromCodedStream(
  6652. ::google::protobuf::io::CodedInputStream* input) {
  6653. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6654. ::google::protobuf::uint32 tag;
  6655. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  6656. &_internal_metadata_);
  6657. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  6658. unknown_fields_setter.buffer());
  6659. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  6660. &unknown_fields_output, false);
  6661. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestParsingMergeLite.OptionalGroup)
  6662. for (;;) {
  6663. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6664. tag = p.first;
  6665. if (!p.second) goto handle_unusual;
  6666. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6667. // optional .protobuf_unittest.TestAllTypesLite optional_group_all_types = 11;
  6668. case 11: {
  6669. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6670. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  6671. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6672. input, mutable_optional_group_all_types()));
  6673. } else {
  6674. goto handle_unusual;
  6675. }
  6676. break;
  6677. }
  6678. default: {
  6679. handle_unusual:
  6680. if (tag == 0 ||
  6681. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  6682. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  6683. input->SetLastTag(tag);
  6684. goto success;
  6685. }
  6686. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  6687. input, tag, &unknown_fields_stream));
  6688. break;
  6689. }
  6690. }
  6691. }
  6692. success:
  6693. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMergeLite.OptionalGroup)
  6694. return true;
  6695. failure:
  6696. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMergeLite.OptionalGroup)
  6697. return false;
  6698. #undef DO_
  6699. }
  6700. void TestParsingMergeLite_OptionalGroup::SerializeWithCachedSizes(
  6701. ::google::protobuf::io::CodedOutputStream* output) const {
  6702. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMergeLite.OptionalGroup)
  6703. ::google::protobuf::uint32 cached_has_bits = 0;
  6704. (void) cached_has_bits;
  6705. cached_has_bits = _has_bits_[0];
  6706. // optional .protobuf_unittest.TestAllTypesLite optional_group_all_types = 11;
  6707. if (cached_has_bits & 0x00000001u) {
  6708. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  6709. 11, this->_internal_optional_group_all_types(), output);
  6710. }
  6711. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  6712. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  6713. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMergeLite.OptionalGroup)
  6714. }
  6715. size_t TestParsingMergeLite_OptionalGroup::ByteSizeLong() const {
  6716. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMergeLite.OptionalGroup)
  6717. size_t total_size = 0;
  6718. total_size += _internal_metadata_.unknown_fields().size();
  6719. // optional .protobuf_unittest.TestAllTypesLite optional_group_all_types = 11;
  6720. if (has_optional_group_all_types()) {
  6721. total_size += 1 +
  6722. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6723. *optional_group_all_types_);
  6724. }
  6725. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6726. SetCachedSize(cached_size);
  6727. return total_size;
  6728. }
  6729. void TestParsingMergeLite_OptionalGroup::CheckTypeAndMergeFrom(
  6730. const ::google::protobuf::MessageLite& from) {
  6731. MergeFrom(*::google::protobuf::down_cast<const TestParsingMergeLite_OptionalGroup*>(&from));
  6732. }
  6733. void TestParsingMergeLite_OptionalGroup::MergeFrom(const TestParsingMergeLite_OptionalGroup& from) {
  6734. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMergeLite.OptionalGroup)
  6735. GOOGLE_DCHECK_NE(&from, this);
  6736. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6737. ::google::protobuf::uint32 cached_has_bits = 0;
  6738. (void) cached_has_bits;
  6739. if (from.has_optional_group_all_types()) {
  6740. mutable_optional_group_all_types()->::protobuf_unittest::TestAllTypesLite::MergeFrom(from.optional_group_all_types());
  6741. }
  6742. }
  6743. void TestParsingMergeLite_OptionalGroup::CopyFrom(const TestParsingMergeLite_OptionalGroup& from) {
  6744. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMergeLite.OptionalGroup)
  6745. if (&from == this) return;
  6746. Clear();
  6747. MergeFrom(from);
  6748. }
  6749. bool TestParsingMergeLite_OptionalGroup::IsInitialized() const {
  6750. return true;
  6751. }
  6752. void TestParsingMergeLite_OptionalGroup::Swap(TestParsingMergeLite_OptionalGroup* other) {
  6753. if (other == this) return;
  6754. InternalSwap(other);
  6755. }
  6756. void TestParsingMergeLite_OptionalGroup::InternalSwap(TestParsingMergeLite_OptionalGroup* other) {
  6757. using std::swap;
  6758. swap(optional_group_all_types_, other->optional_group_all_types_);
  6759. swap(_has_bits_[0], other->_has_bits_[0]);
  6760. _internal_metadata_.Swap(&other->_internal_metadata_);
  6761. }
  6762. ::std::string TestParsingMergeLite_OptionalGroup::GetTypeName() const {
  6763. return "protobuf_unittest.TestParsingMergeLite.OptionalGroup";
  6764. }
  6765. // ===================================================================
  6766. void TestParsingMergeLite_RepeatedGroup::InitAsDefaultInstance() {
  6767. ::protobuf_unittest::_TestParsingMergeLite_RepeatedGroup_default_instance_._instance.get_mutable()->repeated_group_all_types_ = const_cast< ::protobuf_unittest::TestAllTypesLite*>(
  6768. ::protobuf_unittest::TestAllTypesLite::internal_default_instance());
  6769. }
  6770. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6771. const int TestParsingMergeLite_RepeatedGroup::kRepeatedGroupAllTypesFieldNumber;
  6772. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6773. TestParsingMergeLite_RepeatedGroup::TestParsingMergeLite_RepeatedGroup()
  6774. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  6775. ::google::protobuf::internal::InitSCC(
  6776. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite_RepeatedGroup.base);
  6777. SharedCtor();
  6778. // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMergeLite.RepeatedGroup)
  6779. }
  6780. TestParsingMergeLite_RepeatedGroup::TestParsingMergeLite_RepeatedGroup(const TestParsingMergeLite_RepeatedGroup& from)
  6781. : ::google::protobuf::MessageLite(),
  6782. _internal_metadata_(NULL),
  6783. _has_bits_(from._has_bits_) {
  6784. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6785. if (from.has_repeated_group_all_types()) {
  6786. repeated_group_all_types_ = new ::protobuf_unittest::TestAllTypesLite(*from.repeated_group_all_types_);
  6787. } else {
  6788. repeated_group_all_types_ = NULL;
  6789. }
  6790. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMergeLite.RepeatedGroup)
  6791. }
  6792. void TestParsingMergeLite_RepeatedGroup::SharedCtor() {
  6793. repeated_group_all_types_ = NULL;
  6794. }
  6795. TestParsingMergeLite_RepeatedGroup::~TestParsingMergeLite_RepeatedGroup() {
  6796. // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMergeLite.RepeatedGroup)
  6797. SharedDtor();
  6798. }
  6799. void TestParsingMergeLite_RepeatedGroup::SharedDtor() {
  6800. if (this != internal_default_instance()) delete repeated_group_all_types_;
  6801. }
  6802. void TestParsingMergeLite_RepeatedGroup::SetCachedSize(int size) const {
  6803. _cached_size_.Set(size);
  6804. }
  6805. const TestParsingMergeLite_RepeatedGroup& TestParsingMergeLite_RepeatedGroup::default_instance() {
  6806. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite_RepeatedGroup.base);
  6807. return *internal_default_instance();
  6808. }
  6809. void TestParsingMergeLite_RepeatedGroup::Clear() {
  6810. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestParsingMergeLite.RepeatedGroup)
  6811. ::google::protobuf::uint32 cached_has_bits = 0;
  6812. // Prevent compiler warnings about cached_has_bits being unused
  6813. (void) cached_has_bits;
  6814. cached_has_bits = _has_bits_[0];
  6815. if (cached_has_bits & 0x00000001u) {
  6816. GOOGLE_DCHECK(repeated_group_all_types_ != NULL);
  6817. repeated_group_all_types_->Clear();
  6818. }
  6819. _has_bits_.Clear();
  6820. _internal_metadata_.Clear();
  6821. }
  6822. bool TestParsingMergeLite_RepeatedGroup::MergePartialFromCodedStream(
  6823. ::google::protobuf::io::CodedInputStream* input) {
  6824. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6825. ::google::protobuf::uint32 tag;
  6826. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  6827. &_internal_metadata_);
  6828. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  6829. unknown_fields_setter.buffer());
  6830. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  6831. &unknown_fields_output, false);
  6832. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestParsingMergeLite.RepeatedGroup)
  6833. for (;;) {
  6834. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  6835. tag = p.first;
  6836. if (!p.second) goto handle_unusual;
  6837. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6838. // optional .protobuf_unittest.TestAllTypesLite repeated_group_all_types = 21;
  6839. case 21: {
  6840. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6841. static_cast< ::google::protobuf::uint8>(170u /* 170 & 0xFF */)) {
  6842. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6843. input, mutable_repeated_group_all_types()));
  6844. } else {
  6845. goto handle_unusual;
  6846. }
  6847. break;
  6848. }
  6849. default: {
  6850. handle_unusual:
  6851. if (tag == 0 ||
  6852. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  6853. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  6854. input->SetLastTag(tag);
  6855. goto success;
  6856. }
  6857. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  6858. input, tag, &unknown_fields_stream));
  6859. break;
  6860. }
  6861. }
  6862. }
  6863. success:
  6864. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMergeLite.RepeatedGroup)
  6865. return true;
  6866. failure:
  6867. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMergeLite.RepeatedGroup)
  6868. return false;
  6869. #undef DO_
  6870. }
  6871. void TestParsingMergeLite_RepeatedGroup::SerializeWithCachedSizes(
  6872. ::google::protobuf::io::CodedOutputStream* output) const {
  6873. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMergeLite.RepeatedGroup)
  6874. ::google::protobuf::uint32 cached_has_bits = 0;
  6875. (void) cached_has_bits;
  6876. cached_has_bits = _has_bits_[0];
  6877. // optional .protobuf_unittest.TestAllTypesLite repeated_group_all_types = 21;
  6878. if (cached_has_bits & 0x00000001u) {
  6879. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  6880. 21, this->_internal_repeated_group_all_types(), output);
  6881. }
  6882. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  6883. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  6884. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMergeLite.RepeatedGroup)
  6885. }
  6886. size_t TestParsingMergeLite_RepeatedGroup::ByteSizeLong() const {
  6887. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMergeLite.RepeatedGroup)
  6888. size_t total_size = 0;
  6889. total_size += _internal_metadata_.unknown_fields().size();
  6890. // optional .protobuf_unittest.TestAllTypesLite repeated_group_all_types = 21;
  6891. if (has_repeated_group_all_types()) {
  6892. total_size += 2 +
  6893. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6894. *repeated_group_all_types_);
  6895. }
  6896. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6897. SetCachedSize(cached_size);
  6898. return total_size;
  6899. }
  6900. void TestParsingMergeLite_RepeatedGroup::CheckTypeAndMergeFrom(
  6901. const ::google::protobuf::MessageLite& from) {
  6902. MergeFrom(*::google::protobuf::down_cast<const TestParsingMergeLite_RepeatedGroup*>(&from));
  6903. }
  6904. void TestParsingMergeLite_RepeatedGroup::MergeFrom(const TestParsingMergeLite_RepeatedGroup& from) {
  6905. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMergeLite.RepeatedGroup)
  6906. GOOGLE_DCHECK_NE(&from, this);
  6907. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6908. ::google::protobuf::uint32 cached_has_bits = 0;
  6909. (void) cached_has_bits;
  6910. if (from.has_repeated_group_all_types()) {
  6911. mutable_repeated_group_all_types()->::protobuf_unittest::TestAllTypesLite::MergeFrom(from.repeated_group_all_types());
  6912. }
  6913. }
  6914. void TestParsingMergeLite_RepeatedGroup::CopyFrom(const TestParsingMergeLite_RepeatedGroup& from) {
  6915. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMergeLite.RepeatedGroup)
  6916. if (&from == this) return;
  6917. Clear();
  6918. MergeFrom(from);
  6919. }
  6920. bool TestParsingMergeLite_RepeatedGroup::IsInitialized() const {
  6921. return true;
  6922. }
  6923. void TestParsingMergeLite_RepeatedGroup::Swap(TestParsingMergeLite_RepeatedGroup* other) {
  6924. if (other == this) return;
  6925. InternalSwap(other);
  6926. }
  6927. void TestParsingMergeLite_RepeatedGroup::InternalSwap(TestParsingMergeLite_RepeatedGroup* other) {
  6928. using std::swap;
  6929. swap(repeated_group_all_types_, other->repeated_group_all_types_);
  6930. swap(_has_bits_[0], other->_has_bits_[0]);
  6931. _internal_metadata_.Swap(&other->_internal_metadata_);
  6932. }
  6933. ::std::string TestParsingMergeLite_RepeatedGroup::GetTypeName() const {
  6934. return "protobuf_unittest.TestParsingMergeLite.RepeatedGroup";
  6935. }
  6936. // ===================================================================
  6937. void TestParsingMergeLite::InitAsDefaultInstance() {
  6938. ::protobuf_unittest::_TestParsingMergeLite_default_instance_._instance.get_mutable()->required_all_types_ = const_cast< ::protobuf_unittest::TestAllTypesLite*>(
  6939. ::protobuf_unittest::TestAllTypesLite::internal_default_instance());
  6940. ::protobuf_unittest::_TestParsingMergeLite_default_instance_._instance.get_mutable()->optional_all_types_ = const_cast< ::protobuf_unittest::TestAllTypesLite*>(
  6941. ::protobuf_unittest::TestAllTypesLite::internal_default_instance());
  6942. ::protobuf_unittest::_TestParsingMergeLite_default_instance_._instance.get_mutable()->optionalgroup_ = const_cast< ::protobuf_unittest::TestParsingMergeLite_OptionalGroup*>(
  6943. ::protobuf_unittest::TestParsingMergeLite_OptionalGroup::internal_default_instance());
  6944. }
  6945. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6946. const int TestParsingMergeLite::kRequiredAllTypesFieldNumber;
  6947. const int TestParsingMergeLite::kOptionalAllTypesFieldNumber;
  6948. const int TestParsingMergeLite::kRepeatedAllTypesFieldNumber;
  6949. const int TestParsingMergeLite::kOptionalgroupFieldNumber;
  6950. const int TestParsingMergeLite::kRepeatedgroupFieldNumber;
  6951. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6952. TestParsingMergeLite::TestParsingMergeLite()
  6953. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  6954. ::google::protobuf::internal::InitSCC(
  6955. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite.base);
  6956. SharedCtor();
  6957. // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMergeLite)
  6958. }
  6959. TestParsingMergeLite::TestParsingMergeLite(const TestParsingMergeLite& from)
  6960. : ::google::protobuf::MessageLite(),
  6961. _internal_metadata_(NULL),
  6962. _has_bits_(from._has_bits_),
  6963. repeated_all_types_(from.repeated_all_types_),
  6964. repeatedgroup_(from.repeatedgroup_) {
  6965. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6966. _extensions_.MergeFrom(from._extensions_);
  6967. if (from.has_required_all_types()) {
  6968. required_all_types_ = new ::protobuf_unittest::TestAllTypesLite(*from.required_all_types_);
  6969. } else {
  6970. required_all_types_ = NULL;
  6971. }
  6972. if (from.has_optional_all_types()) {
  6973. optional_all_types_ = new ::protobuf_unittest::TestAllTypesLite(*from.optional_all_types_);
  6974. } else {
  6975. optional_all_types_ = NULL;
  6976. }
  6977. if (from.has_optionalgroup()) {
  6978. optionalgroup_ = new ::protobuf_unittest::TestParsingMergeLite_OptionalGroup(*from.optionalgroup_);
  6979. } else {
  6980. optionalgroup_ = NULL;
  6981. }
  6982. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMergeLite)
  6983. }
  6984. void TestParsingMergeLite::SharedCtor() {
  6985. ::memset(&required_all_types_, 0, static_cast<size_t>(
  6986. reinterpret_cast<char*>(&optionalgroup_) -
  6987. reinterpret_cast<char*>(&required_all_types_)) + sizeof(optionalgroup_));
  6988. }
  6989. TestParsingMergeLite::~TestParsingMergeLite() {
  6990. // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMergeLite)
  6991. SharedDtor();
  6992. }
  6993. void TestParsingMergeLite::SharedDtor() {
  6994. if (this != internal_default_instance()) delete required_all_types_;
  6995. if (this != internal_default_instance()) delete optional_all_types_;
  6996. if (this != internal_default_instance()) delete optionalgroup_;
  6997. }
  6998. void TestParsingMergeLite::SetCachedSize(int size) const {
  6999. _cached_size_.Set(size);
  7000. }
  7001. const TestParsingMergeLite& TestParsingMergeLite::default_instance() {
  7002. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestParsingMergeLite.base);
  7003. return *internal_default_instance();
  7004. }
  7005. void TestParsingMergeLite::Clear() {
  7006. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestParsingMergeLite)
  7007. ::google::protobuf::uint32 cached_has_bits = 0;
  7008. // Prevent compiler warnings about cached_has_bits being unused
  7009. (void) cached_has_bits;
  7010. _extensions_.Clear();
  7011. repeated_all_types_.Clear();
  7012. repeatedgroup_.Clear();
  7013. cached_has_bits = _has_bits_[0];
  7014. if (cached_has_bits & 7u) {
  7015. if (cached_has_bits & 0x00000001u) {
  7016. GOOGLE_DCHECK(required_all_types_ != NULL);
  7017. required_all_types_->Clear();
  7018. }
  7019. if (cached_has_bits & 0x00000002u) {
  7020. GOOGLE_DCHECK(optional_all_types_ != NULL);
  7021. optional_all_types_->Clear();
  7022. }
  7023. if (cached_has_bits & 0x00000004u) {
  7024. GOOGLE_DCHECK(optionalgroup_ != NULL);
  7025. optionalgroup_->Clear();
  7026. }
  7027. }
  7028. _has_bits_.Clear();
  7029. _internal_metadata_.Clear();
  7030. }
  7031. bool TestParsingMergeLite::MergePartialFromCodedStream(
  7032. ::google::protobuf::io::CodedInputStream* input) {
  7033. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  7034. ::google::protobuf::uint32 tag;
  7035. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  7036. &_internal_metadata_);
  7037. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  7038. unknown_fields_setter.buffer());
  7039. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  7040. &unknown_fields_output, false);
  7041. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestParsingMergeLite)
  7042. for (;;) {
  7043. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  7044. tag = p.first;
  7045. if (!p.second) goto handle_unusual;
  7046. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  7047. // required .protobuf_unittest.TestAllTypesLite required_all_types = 1;
  7048. case 1: {
  7049. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7050. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  7051. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  7052. input, mutable_required_all_types()));
  7053. } else {
  7054. goto handle_unusual;
  7055. }
  7056. break;
  7057. }
  7058. // optional .protobuf_unittest.TestAllTypesLite optional_all_types = 2;
  7059. case 2: {
  7060. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7061. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  7062. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  7063. input, mutable_optional_all_types()));
  7064. } else {
  7065. goto handle_unusual;
  7066. }
  7067. break;
  7068. }
  7069. // repeated .protobuf_unittest.TestAllTypesLite repeated_all_types = 3;
  7070. case 3: {
  7071. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7072. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  7073. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  7074. input, add_repeated_all_types()));
  7075. } else {
  7076. goto handle_unusual;
  7077. }
  7078. break;
  7079. }
  7080. // optional group OptionalGroup = 10 { ... };
  7081. case 10: {
  7082. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7083. static_cast< ::google::protobuf::uint8>(83u /* 83 & 0xFF */)) {
  7084. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
  7085. 10, input, mutable_optionalgroup()));
  7086. } else {
  7087. goto handle_unusual;
  7088. }
  7089. break;
  7090. }
  7091. // repeated group RepeatedGroup = 20 { ... };
  7092. case 20: {
  7093. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7094. static_cast< ::google::protobuf::uint8>(163u /* 163 & 0xFF */)) {
  7095. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(20, input, add_repeatedgroup()));
  7096. } else {
  7097. goto handle_unusual;
  7098. }
  7099. break;
  7100. }
  7101. default: {
  7102. handle_unusual:
  7103. if (tag == 0) {
  7104. goto success;
  7105. }
  7106. if ((8000u <= tag)) {
  7107. DO_(_extensions_.ParseField(tag, input,
  7108. internal_default_instance(),
  7109. &unknown_fields_stream));
  7110. continue;
  7111. }
  7112. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  7113. input, tag, &unknown_fields_stream));
  7114. break;
  7115. }
  7116. }
  7117. }
  7118. success:
  7119. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMergeLite)
  7120. return true;
  7121. failure:
  7122. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMergeLite)
  7123. return false;
  7124. #undef DO_
  7125. }
  7126. void TestParsingMergeLite::SerializeWithCachedSizes(
  7127. ::google::protobuf::io::CodedOutputStream* output) const {
  7128. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMergeLite)
  7129. ::google::protobuf::uint32 cached_has_bits = 0;
  7130. (void) cached_has_bits;
  7131. cached_has_bits = _has_bits_[0];
  7132. // required .protobuf_unittest.TestAllTypesLite required_all_types = 1;
  7133. if (cached_has_bits & 0x00000001u) {
  7134. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  7135. 1, this->_internal_required_all_types(), output);
  7136. }
  7137. // optional .protobuf_unittest.TestAllTypesLite optional_all_types = 2;
  7138. if (cached_has_bits & 0x00000002u) {
  7139. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  7140. 2, this->_internal_optional_all_types(), output);
  7141. }
  7142. // repeated .protobuf_unittest.TestAllTypesLite repeated_all_types = 3;
  7143. for (unsigned int i = 0,
  7144. n = static_cast<unsigned int>(this->repeated_all_types_size()); i < n; i++) {
  7145. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  7146. 3,
  7147. this->repeated_all_types(static_cast<int>(i)),
  7148. output);
  7149. }
  7150. // optional group OptionalGroup = 10 { ... };
  7151. if (cached_has_bits & 0x00000004u) {
  7152. ::google::protobuf::internal::WireFormatLite::WriteGroup(
  7153. 10, this->_internal_optionalgroup(), output);
  7154. }
  7155. // repeated group RepeatedGroup = 20 { ... };
  7156. for (unsigned int i = 0,
  7157. n = static_cast<unsigned int>(this->repeatedgroup_size()); i < n; i++) {
  7158. ::google::protobuf::internal::WireFormatLite::WriteGroup(
  7159. 20,
  7160. this->repeatedgroup(static_cast<int>(i)),
  7161. output);
  7162. }
  7163. // Extension range [1000, 536870912)
  7164. _extensions_.SerializeWithCachedSizes(
  7165. 1000, 536870912, output);
  7166. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  7167. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  7168. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMergeLite)
  7169. }
  7170. size_t TestParsingMergeLite::ByteSizeLong() const {
  7171. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMergeLite)
  7172. size_t total_size = 0;
  7173. total_size += _extensions_.ByteSize();
  7174. total_size += _internal_metadata_.unknown_fields().size();
  7175. // required .protobuf_unittest.TestAllTypesLite required_all_types = 1;
  7176. if (has_required_all_types()) {
  7177. total_size += 1 +
  7178. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7179. *required_all_types_);
  7180. }
  7181. // repeated .protobuf_unittest.TestAllTypesLite repeated_all_types = 3;
  7182. {
  7183. unsigned int count = static_cast<unsigned int>(this->repeated_all_types_size());
  7184. total_size += 1UL * count;
  7185. for (unsigned int i = 0; i < count; i++) {
  7186. total_size +=
  7187. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7188. this->repeated_all_types(static_cast<int>(i)));
  7189. }
  7190. }
  7191. // repeated group RepeatedGroup = 20 { ... };
  7192. {
  7193. unsigned int count = static_cast<unsigned int>(this->repeatedgroup_size());
  7194. total_size += 4UL * count;
  7195. for (unsigned int i = 0; i < count; i++) {
  7196. total_size +=
  7197. ::google::protobuf::internal::WireFormatLite::GroupSize(
  7198. this->repeatedgroup(static_cast<int>(i)));
  7199. }
  7200. }
  7201. if (_has_bits_[0 / 32] & 6u) {
  7202. // optional .protobuf_unittest.TestAllTypesLite optional_all_types = 2;
  7203. if (has_optional_all_types()) {
  7204. total_size += 1 +
  7205. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7206. *optional_all_types_);
  7207. }
  7208. // optional group OptionalGroup = 10 { ... };
  7209. if (has_optionalgroup()) {
  7210. total_size += 2 +
  7211. ::google::protobuf::internal::WireFormatLite::GroupSize(
  7212. *optionalgroup_);
  7213. }
  7214. }
  7215. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  7216. SetCachedSize(cached_size);
  7217. return total_size;
  7218. }
  7219. void TestParsingMergeLite::CheckTypeAndMergeFrom(
  7220. const ::google::protobuf::MessageLite& from) {
  7221. MergeFrom(*::google::protobuf::down_cast<const TestParsingMergeLite*>(&from));
  7222. }
  7223. void TestParsingMergeLite::MergeFrom(const TestParsingMergeLite& from) {
  7224. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMergeLite)
  7225. GOOGLE_DCHECK_NE(&from, this);
  7226. _extensions_.MergeFrom(from._extensions_);
  7227. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7228. ::google::protobuf::uint32 cached_has_bits = 0;
  7229. (void) cached_has_bits;
  7230. repeated_all_types_.MergeFrom(from.repeated_all_types_);
  7231. repeatedgroup_.MergeFrom(from.repeatedgroup_);
  7232. cached_has_bits = from._has_bits_[0];
  7233. if (cached_has_bits & 7u) {
  7234. if (cached_has_bits & 0x00000001u) {
  7235. mutable_required_all_types()->::protobuf_unittest::TestAllTypesLite::MergeFrom(from.required_all_types());
  7236. }
  7237. if (cached_has_bits & 0x00000002u) {
  7238. mutable_optional_all_types()->::protobuf_unittest::TestAllTypesLite::MergeFrom(from.optional_all_types());
  7239. }
  7240. if (cached_has_bits & 0x00000004u) {
  7241. mutable_optionalgroup()->::protobuf_unittest::TestParsingMergeLite_OptionalGroup::MergeFrom(from.optionalgroup());
  7242. }
  7243. }
  7244. }
  7245. void TestParsingMergeLite::CopyFrom(const TestParsingMergeLite& from) {
  7246. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMergeLite)
  7247. if (&from == this) return;
  7248. Clear();
  7249. MergeFrom(from);
  7250. }
  7251. bool TestParsingMergeLite::IsInitialized() const {
  7252. if (!_extensions_.IsInitialized()) {
  7253. return false;
  7254. }
  7255. if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
  7256. return true;
  7257. }
  7258. void TestParsingMergeLite::Swap(TestParsingMergeLite* other) {
  7259. if (other == this) return;
  7260. InternalSwap(other);
  7261. }
  7262. void TestParsingMergeLite::InternalSwap(TestParsingMergeLite* other) {
  7263. using std::swap;
  7264. CastToBase(&repeated_all_types_)->InternalSwap(CastToBase(&other->repeated_all_types_));
  7265. CastToBase(&repeatedgroup_)->InternalSwap(CastToBase(&other->repeatedgroup_));
  7266. swap(required_all_types_, other->required_all_types_);
  7267. swap(optional_all_types_, other->optional_all_types_);
  7268. swap(optionalgroup_, other->optionalgroup_);
  7269. swap(_has_bits_[0], other->_has_bits_[0]);
  7270. _internal_metadata_.Swap(&other->_internal_metadata_);
  7271. _extensions_.Swap(&other->_extensions_);
  7272. }
  7273. ::std::string TestParsingMergeLite::GetTypeName() const {
  7274. return "protobuf_unittest.TestParsingMergeLite";
  7275. }
  7276. // ===================================================================
  7277. void TestEmptyMessageLite::InitAsDefaultInstance() {
  7278. }
  7279. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  7280. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  7281. TestEmptyMessageLite::TestEmptyMessageLite()
  7282. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  7283. ::google::protobuf::internal::InitSCC(
  7284. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestEmptyMessageLite.base);
  7285. SharedCtor();
  7286. // @@protoc_insertion_point(constructor:protobuf_unittest.TestEmptyMessageLite)
  7287. }
  7288. TestEmptyMessageLite::TestEmptyMessageLite(const TestEmptyMessageLite& from)
  7289. : ::google::protobuf::MessageLite(),
  7290. _internal_metadata_(NULL),
  7291. _has_bits_(from._has_bits_) {
  7292. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7293. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestEmptyMessageLite)
  7294. }
  7295. void TestEmptyMessageLite::SharedCtor() {
  7296. }
  7297. TestEmptyMessageLite::~TestEmptyMessageLite() {
  7298. // @@protoc_insertion_point(destructor:protobuf_unittest.TestEmptyMessageLite)
  7299. SharedDtor();
  7300. }
  7301. void TestEmptyMessageLite::SharedDtor() {
  7302. }
  7303. void TestEmptyMessageLite::SetCachedSize(int size) const {
  7304. _cached_size_.Set(size);
  7305. }
  7306. const TestEmptyMessageLite& TestEmptyMessageLite::default_instance() {
  7307. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestEmptyMessageLite.base);
  7308. return *internal_default_instance();
  7309. }
  7310. void TestEmptyMessageLite::Clear() {
  7311. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestEmptyMessageLite)
  7312. ::google::protobuf::uint32 cached_has_bits = 0;
  7313. // Prevent compiler warnings about cached_has_bits being unused
  7314. (void) cached_has_bits;
  7315. _has_bits_.Clear();
  7316. _internal_metadata_.Clear();
  7317. }
  7318. bool TestEmptyMessageLite::MergePartialFromCodedStream(
  7319. ::google::protobuf::io::CodedInputStream* input) {
  7320. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  7321. ::google::protobuf::uint32 tag;
  7322. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  7323. &_internal_metadata_);
  7324. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  7325. unknown_fields_setter.buffer());
  7326. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  7327. &unknown_fields_output, false);
  7328. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestEmptyMessageLite)
  7329. for (;;) {
  7330. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  7331. tag = p.first;
  7332. if (!p.second) goto handle_unusual;
  7333. handle_unusual:
  7334. if (tag == 0) {
  7335. goto success;
  7336. }
  7337. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  7338. input, tag, &unknown_fields_stream));
  7339. }
  7340. success:
  7341. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestEmptyMessageLite)
  7342. return true;
  7343. failure:
  7344. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestEmptyMessageLite)
  7345. return false;
  7346. #undef DO_
  7347. }
  7348. void TestEmptyMessageLite::SerializeWithCachedSizes(
  7349. ::google::protobuf::io::CodedOutputStream* output) const {
  7350. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestEmptyMessageLite)
  7351. ::google::protobuf::uint32 cached_has_bits = 0;
  7352. (void) cached_has_bits;
  7353. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  7354. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  7355. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestEmptyMessageLite)
  7356. }
  7357. size_t TestEmptyMessageLite::ByteSizeLong() const {
  7358. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestEmptyMessageLite)
  7359. size_t total_size = 0;
  7360. total_size += _internal_metadata_.unknown_fields().size();
  7361. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  7362. SetCachedSize(cached_size);
  7363. return total_size;
  7364. }
  7365. void TestEmptyMessageLite::CheckTypeAndMergeFrom(
  7366. const ::google::protobuf::MessageLite& from) {
  7367. MergeFrom(*::google::protobuf::down_cast<const TestEmptyMessageLite*>(&from));
  7368. }
  7369. void TestEmptyMessageLite::MergeFrom(const TestEmptyMessageLite& from) {
  7370. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestEmptyMessageLite)
  7371. GOOGLE_DCHECK_NE(&from, this);
  7372. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7373. ::google::protobuf::uint32 cached_has_bits = 0;
  7374. (void) cached_has_bits;
  7375. }
  7376. void TestEmptyMessageLite::CopyFrom(const TestEmptyMessageLite& from) {
  7377. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestEmptyMessageLite)
  7378. if (&from == this) return;
  7379. Clear();
  7380. MergeFrom(from);
  7381. }
  7382. bool TestEmptyMessageLite::IsInitialized() const {
  7383. return true;
  7384. }
  7385. void TestEmptyMessageLite::Swap(TestEmptyMessageLite* other) {
  7386. if (other == this) return;
  7387. InternalSwap(other);
  7388. }
  7389. void TestEmptyMessageLite::InternalSwap(TestEmptyMessageLite* other) {
  7390. using std::swap;
  7391. swap(_has_bits_[0], other->_has_bits_[0]);
  7392. _internal_metadata_.Swap(&other->_internal_metadata_);
  7393. }
  7394. ::std::string TestEmptyMessageLite::GetTypeName() const {
  7395. return "protobuf_unittest.TestEmptyMessageLite";
  7396. }
  7397. // ===================================================================
  7398. void TestEmptyMessageWithExtensionsLite::InitAsDefaultInstance() {
  7399. }
  7400. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  7401. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  7402. TestEmptyMessageWithExtensionsLite::TestEmptyMessageWithExtensionsLite()
  7403. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  7404. ::google::protobuf::internal::InitSCC(
  7405. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestEmptyMessageWithExtensionsLite.base);
  7406. SharedCtor();
  7407. // @@protoc_insertion_point(constructor:protobuf_unittest.TestEmptyMessageWithExtensionsLite)
  7408. }
  7409. TestEmptyMessageWithExtensionsLite::TestEmptyMessageWithExtensionsLite(const TestEmptyMessageWithExtensionsLite& from)
  7410. : ::google::protobuf::MessageLite(),
  7411. _internal_metadata_(NULL),
  7412. _has_bits_(from._has_bits_) {
  7413. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7414. _extensions_.MergeFrom(from._extensions_);
  7415. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestEmptyMessageWithExtensionsLite)
  7416. }
  7417. void TestEmptyMessageWithExtensionsLite::SharedCtor() {
  7418. }
  7419. TestEmptyMessageWithExtensionsLite::~TestEmptyMessageWithExtensionsLite() {
  7420. // @@protoc_insertion_point(destructor:protobuf_unittest.TestEmptyMessageWithExtensionsLite)
  7421. SharedDtor();
  7422. }
  7423. void TestEmptyMessageWithExtensionsLite::SharedDtor() {
  7424. }
  7425. void TestEmptyMessageWithExtensionsLite::SetCachedSize(int size) const {
  7426. _cached_size_.Set(size);
  7427. }
  7428. const TestEmptyMessageWithExtensionsLite& TestEmptyMessageWithExtensionsLite::default_instance() {
  7429. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestEmptyMessageWithExtensionsLite.base);
  7430. return *internal_default_instance();
  7431. }
  7432. void TestEmptyMessageWithExtensionsLite::Clear() {
  7433. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestEmptyMessageWithExtensionsLite)
  7434. ::google::protobuf::uint32 cached_has_bits = 0;
  7435. // Prevent compiler warnings about cached_has_bits being unused
  7436. (void) cached_has_bits;
  7437. _extensions_.Clear();
  7438. _has_bits_.Clear();
  7439. _internal_metadata_.Clear();
  7440. }
  7441. bool TestEmptyMessageWithExtensionsLite::MergePartialFromCodedStream(
  7442. ::google::protobuf::io::CodedInputStream* input) {
  7443. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  7444. ::google::protobuf::uint32 tag;
  7445. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  7446. &_internal_metadata_);
  7447. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  7448. unknown_fields_setter.buffer());
  7449. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  7450. &unknown_fields_output, false);
  7451. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestEmptyMessageWithExtensionsLite)
  7452. for (;;) {
  7453. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  7454. tag = p.first;
  7455. if (!p.second) goto handle_unusual;
  7456. handle_unusual:
  7457. if (tag == 0) {
  7458. goto success;
  7459. }
  7460. if ((8u <= tag)) {
  7461. DO_(_extensions_.ParseField(tag, input,
  7462. internal_default_instance(),
  7463. &unknown_fields_stream));
  7464. continue;
  7465. }
  7466. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  7467. input, tag, &unknown_fields_stream));
  7468. }
  7469. success:
  7470. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestEmptyMessageWithExtensionsLite)
  7471. return true;
  7472. failure:
  7473. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestEmptyMessageWithExtensionsLite)
  7474. return false;
  7475. #undef DO_
  7476. }
  7477. void TestEmptyMessageWithExtensionsLite::SerializeWithCachedSizes(
  7478. ::google::protobuf::io::CodedOutputStream* output) const {
  7479. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestEmptyMessageWithExtensionsLite)
  7480. ::google::protobuf::uint32 cached_has_bits = 0;
  7481. (void) cached_has_bits;
  7482. // Extension range [1, 536870912)
  7483. _extensions_.SerializeWithCachedSizes(
  7484. 1, 536870912, output);
  7485. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  7486. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  7487. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestEmptyMessageWithExtensionsLite)
  7488. }
  7489. size_t TestEmptyMessageWithExtensionsLite::ByteSizeLong() const {
  7490. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestEmptyMessageWithExtensionsLite)
  7491. size_t total_size = 0;
  7492. total_size += _extensions_.ByteSize();
  7493. total_size += _internal_metadata_.unknown_fields().size();
  7494. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  7495. SetCachedSize(cached_size);
  7496. return total_size;
  7497. }
  7498. void TestEmptyMessageWithExtensionsLite::CheckTypeAndMergeFrom(
  7499. const ::google::protobuf::MessageLite& from) {
  7500. MergeFrom(*::google::protobuf::down_cast<const TestEmptyMessageWithExtensionsLite*>(&from));
  7501. }
  7502. void TestEmptyMessageWithExtensionsLite::MergeFrom(const TestEmptyMessageWithExtensionsLite& from) {
  7503. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestEmptyMessageWithExtensionsLite)
  7504. GOOGLE_DCHECK_NE(&from, this);
  7505. _extensions_.MergeFrom(from._extensions_);
  7506. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7507. ::google::protobuf::uint32 cached_has_bits = 0;
  7508. (void) cached_has_bits;
  7509. }
  7510. void TestEmptyMessageWithExtensionsLite::CopyFrom(const TestEmptyMessageWithExtensionsLite& from) {
  7511. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestEmptyMessageWithExtensionsLite)
  7512. if (&from == this) return;
  7513. Clear();
  7514. MergeFrom(from);
  7515. }
  7516. bool TestEmptyMessageWithExtensionsLite::IsInitialized() const {
  7517. if (!_extensions_.IsInitialized()) {
  7518. return false;
  7519. }
  7520. return true;
  7521. }
  7522. void TestEmptyMessageWithExtensionsLite::Swap(TestEmptyMessageWithExtensionsLite* other) {
  7523. if (other == this) return;
  7524. InternalSwap(other);
  7525. }
  7526. void TestEmptyMessageWithExtensionsLite::InternalSwap(TestEmptyMessageWithExtensionsLite* other) {
  7527. using std::swap;
  7528. swap(_has_bits_[0], other->_has_bits_[0]);
  7529. _internal_metadata_.Swap(&other->_internal_metadata_);
  7530. _extensions_.Swap(&other->_extensions_);
  7531. }
  7532. ::std::string TestEmptyMessageWithExtensionsLite::GetTypeName() const {
  7533. return "protobuf_unittest.TestEmptyMessageWithExtensionsLite";
  7534. }
  7535. // ===================================================================
  7536. void V1MessageLite::InitAsDefaultInstance() {
  7537. }
  7538. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  7539. const int V1MessageLite::kIntFieldFieldNumber;
  7540. const int V1MessageLite::kEnumFieldFieldNumber;
  7541. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  7542. V1MessageLite::V1MessageLite()
  7543. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  7544. ::google::protobuf::internal::InitSCC(
  7545. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_V1MessageLite.base);
  7546. SharedCtor();
  7547. // @@protoc_insertion_point(constructor:protobuf_unittest.V1MessageLite)
  7548. }
  7549. V1MessageLite::V1MessageLite(const V1MessageLite& from)
  7550. : ::google::protobuf::MessageLite(),
  7551. _internal_metadata_(NULL),
  7552. _has_bits_(from._has_bits_) {
  7553. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7554. ::memcpy(&int_field_, &from.int_field_,
  7555. static_cast<size_t>(reinterpret_cast<char*>(&enum_field_) -
  7556. reinterpret_cast<char*>(&int_field_)) + sizeof(enum_field_));
  7557. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.V1MessageLite)
  7558. }
  7559. void V1MessageLite::SharedCtor() {
  7560. int_field_ = 0;
  7561. enum_field_ = 1;
  7562. }
  7563. V1MessageLite::~V1MessageLite() {
  7564. // @@protoc_insertion_point(destructor:protobuf_unittest.V1MessageLite)
  7565. SharedDtor();
  7566. }
  7567. void V1MessageLite::SharedDtor() {
  7568. }
  7569. void V1MessageLite::SetCachedSize(int size) const {
  7570. _cached_size_.Set(size);
  7571. }
  7572. const V1MessageLite& V1MessageLite::default_instance() {
  7573. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_V1MessageLite.base);
  7574. return *internal_default_instance();
  7575. }
  7576. void V1MessageLite::Clear() {
  7577. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.V1MessageLite)
  7578. ::google::protobuf::uint32 cached_has_bits = 0;
  7579. // Prevent compiler warnings about cached_has_bits being unused
  7580. (void) cached_has_bits;
  7581. cached_has_bits = _has_bits_[0];
  7582. if (cached_has_bits & 3u) {
  7583. int_field_ = 0;
  7584. enum_field_ = 1;
  7585. }
  7586. _has_bits_.Clear();
  7587. _internal_metadata_.Clear();
  7588. }
  7589. bool V1MessageLite::MergePartialFromCodedStream(
  7590. ::google::protobuf::io::CodedInputStream* input) {
  7591. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  7592. ::google::protobuf::uint32 tag;
  7593. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  7594. &_internal_metadata_);
  7595. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  7596. unknown_fields_setter.buffer());
  7597. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  7598. &unknown_fields_output, false);
  7599. // @@protoc_insertion_point(parse_start:protobuf_unittest.V1MessageLite)
  7600. for (;;) {
  7601. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  7602. tag = p.first;
  7603. if (!p.second) goto handle_unusual;
  7604. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  7605. // required int32 int_field = 1;
  7606. case 1: {
  7607. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7608. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  7609. set_has_int_field();
  7610. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  7611. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  7612. input, &int_field_)));
  7613. } else {
  7614. goto handle_unusual;
  7615. }
  7616. break;
  7617. }
  7618. // optional .protobuf_unittest.V1EnumLite enum_field = 2 [default = V1_FIRST];
  7619. case 2: {
  7620. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7621. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  7622. int value;
  7623. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  7624. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  7625. input, &value)));
  7626. if (::protobuf_unittest::V1EnumLite_IsValid(value)) {
  7627. set_enum_field(static_cast< ::protobuf_unittest::V1EnumLite >(value));
  7628. } else {
  7629. unknown_fields_stream.WriteVarint32(16u);
  7630. unknown_fields_stream.WriteVarint32(
  7631. static_cast< ::google::protobuf::uint32>(value));
  7632. }
  7633. } else {
  7634. goto handle_unusual;
  7635. }
  7636. break;
  7637. }
  7638. default: {
  7639. handle_unusual:
  7640. if (tag == 0) {
  7641. goto success;
  7642. }
  7643. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  7644. input, tag, &unknown_fields_stream));
  7645. break;
  7646. }
  7647. }
  7648. }
  7649. success:
  7650. // @@protoc_insertion_point(parse_success:protobuf_unittest.V1MessageLite)
  7651. return true;
  7652. failure:
  7653. // @@protoc_insertion_point(parse_failure:protobuf_unittest.V1MessageLite)
  7654. return false;
  7655. #undef DO_
  7656. }
  7657. void V1MessageLite::SerializeWithCachedSizes(
  7658. ::google::protobuf::io::CodedOutputStream* output) const {
  7659. // @@protoc_insertion_point(serialize_start:protobuf_unittest.V1MessageLite)
  7660. ::google::protobuf::uint32 cached_has_bits = 0;
  7661. (void) cached_has_bits;
  7662. cached_has_bits = _has_bits_[0];
  7663. // required int32 int_field = 1;
  7664. if (cached_has_bits & 0x00000001u) {
  7665. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->int_field(), output);
  7666. }
  7667. // optional .protobuf_unittest.V1EnumLite enum_field = 2 [default = V1_FIRST];
  7668. if (cached_has_bits & 0x00000002u) {
  7669. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  7670. 2, this->enum_field(), output);
  7671. }
  7672. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  7673. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  7674. // @@protoc_insertion_point(serialize_end:protobuf_unittest.V1MessageLite)
  7675. }
  7676. size_t V1MessageLite::ByteSizeLong() const {
  7677. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.V1MessageLite)
  7678. size_t total_size = 0;
  7679. total_size += _internal_metadata_.unknown_fields().size();
  7680. // required int32 int_field = 1;
  7681. if (has_int_field()) {
  7682. total_size += 1 +
  7683. ::google::protobuf::internal::WireFormatLite::Int32Size(
  7684. this->int_field());
  7685. }
  7686. // optional .protobuf_unittest.V1EnumLite enum_field = 2 [default = V1_FIRST];
  7687. if (has_enum_field()) {
  7688. total_size += 1 +
  7689. ::google::protobuf::internal::WireFormatLite::EnumSize(this->enum_field());
  7690. }
  7691. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  7692. SetCachedSize(cached_size);
  7693. return total_size;
  7694. }
  7695. void V1MessageLite::CheckTypeAndMergeFrom(
  7696. const ::google::protobuf::MessageLite& from) {
  7697. MergeFrom(*::google::protobuf::down_cast<const V1MessageLite*>(&from));
  7698. }
  7699. void V1MessageLite::MergeFrom(const V1MessageLite& from) {
  7700. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.V1MessageLite)
  7701. GOOGLE_DCHECK_NE(&from, this);
  7702. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7703. ::google::protobuf::uint32 cached_has_bits = 0;
  7704. (void) cached_has_bits;
  7705. cached_has_bits = from._has_bits_[0];
  7706. if (cached_has_bits & 3u) {
  7707. if (cached_has_bits & 0x00000001u) {
  7708. int_field_ = from.int_field_;
  7709. }
  7710. if (cached_has_bits & 0x00000002u) {
  7711. enum_field_ = from.enum_field_;
  7712. }
  7713. _has_bits_[0] |= cached_has_bits;
  7714. }
  7715. }
  7716. void V1MessageLite::CopyFrom(const V1MessageLite& from) {
  7717. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.V1MessageLite)
  7718. if (&from == this) return;
  7719. Clear();
  7720. MergeFrom(from);
  7721. }
  7722. bool V1MessageLite::IsInitialized() const {
  7723. if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
  7724. return true;
  7725. }
  7726. void V1MessageLite::Swap(V1MessageLite* other) {
  7727. if (other == this) return;
  7728. InternalSwap(other);
  7729. }
  7730. void V1MessageLite::InternalSwap(V1MessageLite* other) {
  7731. using std::swap;
  7732. swap(int_field_, other->int_field_);
  7733. swap(enum_field_, other->enum_field_);
  7734. swap(_has_bits_[0], other->_has_bits_[0]);
  7735. _internal_metadata_.Swap(&other->_internal_metadata_);
  7736. }
  7737. ::std::string V1MessageLite::GetTypeName() const {
  7738. return "protobuf_unittest.V1MessageLite";
  7739. }
  7740. // ===================================================================
  7741. void V2MessageLite::InitAsDefaultInstance() {
  7742. }
  7743. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  7744. const int V2MessageLite::kIntFieldFieldNumber;
  7745. const int V2MessageLite::kEnumFieldFieldNumber;
  7746. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  7747. V2MessageLite::V2MessageLite()
  7748. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  7749. ::google::protobuf::internal::InitSCC(
  7750. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_V2MessageLite.base);
  7751. SharedCtor();
  7752. // @@protoc_insertion_point(constructor:protobuf_unittest.V2MessageLite)
  7753. }
  7754. V2MessageLite::V2MessageLite(const V2MessageLite& from)
  7755. : ::google::protobuf::MessageLite(),
  7756. _internal_metadata_(NULL),
  7757. _has_bits_(from._has_bits_) {
  7758. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7759. ::memcpy(&int_field_, &from.int_field_,
  7760. static_cast<size_t>(reinterpret_cast<char*>(&enum_field_) -
  7761. reinterpret_cast<char*>(&int_field_)) + sizeof(enum_field_));
  7762. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.V2MessageLite)
  7763. }
  7764. void V2MessageLite::SharedCtor() {
  7765. int_field_ = 0;
  7766. enum_field_ = 1;
  7767. }
  7768. V2MessageLite::~V2MessageLite() {
  7769. // @@protoc_insertion_point(destructor:protobuf_unittest.V2MessageLite)
  7770. SharedDtor();
  7771. }
  7772. void V2MessageLite::SharedDtor() {
  7773. }
  7774. void V2MessageLite::SetCachedSize(int size) const {
  7775. _cached_size_.Set(size);
  7776. }
  7777. const V2MessageLite& V2MessageLite::default_instance() {
  7778. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_V2MessageLite.base);
  7779. return *internal_default_instance();
  7780. }
  7781. void V2MessageLite::Clear() {
  7782. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.V2MessageLite)
  7783. ::google::protobuf::uint32 cached_has_bits = 0;
  7784. // Prevent compiler warnings about cached_has_bits being unused
  7785. (void) cached_has_bits;
  7786. cached_has_bits = _has_bits_[0];
  7787. if (cached_has_bits & 3u) {
  7788. int_field_ = 0;
  7789. enum_field_ = 1;
  7790. }
  7791. _has_bits_.Clear();
  7792. _internal_metadata_.Clear();
  7793. }
  7794. bool V2MessageLite::MergePartialFromCodedStream(
  7795. ::google::protobuf::io::CodedInputStream* input) {
  7796. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  7797. ::google::protobuf::uint32 tag;
  7798. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  7799. &_internal_metadata_);
  7800. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  7801. unknown_fields_setter.buffer());
  7802. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  7803. &unknown_fields_output, false);
  7804. // @@protoc_insertion_point(parse_start:protobuf_unittest.V2MessageLite)
  7805. for (;;) {
  7806. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  7807. tag = p.first;
  7808. if (!p.second) goto handle_unusual;
  7809. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  7810. // required int32 int_field = 1;
  7811. case 1: {
  7812. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7813. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  7814. set_has_int_field();
  7815. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  7816. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  7817. input, &int_field_)));
  7818. } else {
  7819. goto handle_unusual;
  7820. }
  7821. break;
  7822. }
  7823. // optional .protobuf_unittest.V2EnumLite enum_field = 2 [default = V2_FIRST];
  7824. case 2: {
  7825. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7826. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  7827. int value;
  7828. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  7829. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  7830. input, &value)));
  7831. if (::protobuf_unittest::V2EnumLite_IsValid(value)) {
  7832. set_enum_field(static_cast< ::protobuf_unittest::V2EnumLite >(value));
  7833. } else {
  7834. unknown_fields_stream.WriteVarint32(16u);
  7835. unknown_fields_stream.WriteVarint32(
  7836. static_cast< ::google::protobuf::uint32>(value));
  7837. }
  7838. } else {
  7839. goto handle_unusual;
  7840. }
  7841. break;
  7842. }
  7843. default: {
  7844. handle_unusual:
  7845. if (tag == 0) {
  7846. goto success;
  7847. }
  7848. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  7849. input, tag, &unknown_fields_stream));
  7850. break;
  7851. }
  7852. }
  7853. }
  7854. success:
  7855. // @@protoc_insertion_point(parse_success:protobuf_unittest.V2MessageLite)
  7856. return true;
  7857. failure:
  7858. // @@protoc_insertion_point(parse_failure:protobuf_unittest.V2MessageLite)
  7859. return false;
  7860. #undef DO_
  7861. }
  7862. void V2MessageLite::SerializeWithCachedSizes(
  7863. ::google::protobuf::io::CodedOutputStream* output) const {
  7864. // @@protoc_insertion_point(serialize_start:protobuf_unittest.V2MessageLite)
  7865. ::google::protobuf::uint32 cached_has_bits = 0;
  7866. (void) cached_has_bits;
  7867. cached_has_bits = _has_bits_[0];
  7868. // required int32 int_field = 1;
  7869. if (cached_has_bits & 0x00000001u) {
  7870. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->int_field(), output);
  7871. }
  7872. // optional .protobuf_unittest.V2EnumLite enum_field = 2 [default = V2_FIRST];
  7873. if (cached_has_bits & 0x00000002u) {
  7874. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  7875. 2, this->enum_field(), output);
  7876. }
  7877. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  7878. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  7879. // @@protoc_insertion_point(serialize_end:protobuf_unittest.V2MessageLite)
  7880. }
  7881. size_t V2MessageLite::ByteSizeLong() const {
  7882. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.V2MessageLite)
  7883. size_t total_size = 0;
  7884. total_size += _internal_metadata_.unknown_fields().size();
  7885. // required int32 int_field = 1;
  7886. if (has_int_field()) {
  7887. total_size += 1 +
  7888. ::google::protobuf::internal::WireFormatLite::Int32Size(
  7889. this->int_field());
  7890. }
  7891. // optional .protobuf_unittest.V2EnumLite enum_field = 2 [default = V2_FIRST];
  7892. if (has_enum_field()) {
  7893. total_size += 1 +
  7894. ::google::protobuf::internal::WireFormatLite::EnumSize(this->enum_field());
  7895. }
  7896. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  7897. SetCachedSize(cached_size);
  7898. return total_size;
  7899. }
  7900. void V2MessageLite::CheckTypeAndMergeFrom(
  7901. const ::google::protobuf::MessageLite& from) {
  7902. MergeFrom(*::google::protobuf::down_cast<const V2MessageLite*>(&from));
  7903. }
  7904. void V2MessageLite::MergeFrom(const V2MessageLite& from) {
  7905. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.V2MessageLite)
  7906. GOOGLE_DCHECK_NE(&from, this);
  7907. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7908. ::google::protobuf::uint32 cached_has_bits = 0;
  7909. (void) cached_has_bits;
  7910. cached_has_bits = from._has_bits_[0];
  7911. if (cached_has_bits & 3u) {
  7912. if (cached_has_bits & 0x00000001u) {
  7913. int_field_ = from.int_field_;
  7914. }
  7915. if (cached_has_bits & 0x00000002u) {
  7916. enum_field_ = from.enum_field_;
  7917. }
  7918. _has_bits_[0] |= cached_has_bits;
  7919. }
  7920. }
  7921. void V2MessageLite::CopyFrom(const V2MessageLite& from) {
  7922. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.V2MessageLite)
  7923. if (&from == this) return;
  7924. Clear();
  7925. MergeFrom(from);
  7926. }
  7927. bool V2MessageLite::IsInitialized() const {
  7928. if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
  7929. return true;
  7930. }
  7931. void V2MessageLite::Swap(V2MessageLite* other) {
  7932. if (other == this) return;
  7933. InternalSwap(other);
  7934. }
  7935. void V2MessageLite::InternalSwap(V2MessageLite* other) {
  7936. using std::swap;
  7937. swap(int_field_, other->int_field_);
  7938. swap(enum_field_, other->enum_field_);
  7939. swap(_has_bits_[0], other->_has_bits_[0]);
  7940. _internal_metadata_.Swap(&other->_internal_metadata_);
  7941. }
  7942. ::std::string V2MessageLite::GetTypeName() const {
  7943. return "protobuf_unittest.V2MessageLite";
  7944. }
  7945. // ===================================================================
  7946. void TestHugeFieldNumbersLite_OptionalGroup::InitAsDefaultInstance() {
  7947. }
  7948. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  7949. const int TestHugeFieldNumbersLite_OptionalGroup::kGroupAFieldNumber;
  7950. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  7951. TestHugeFieldNumbersLite_OptionalGroup::TestHugeFieldNumbersLite_OptionalGroup()
  7952. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  7953. ::google::protobuf::internal::InitSCC(
  7954. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestHugeFieldNumbersLite_OptionalGroup.base);
  7955. SharedCtor();
  7956. // @@protoc_insertion_point(constructor:protobuf_unittest.TestHugeFieldNumbersLite.OptionalGroup)
  7957. }
  7958. TestHugeFieldNumbersLite_OptionalGroup::TestHugeFieldNumbersLite_OptionalGroup(const TestHugeFieldNumbersLite_OptionalGroup& from)
  7959. : ::google::protobuf::MessageLite(),
  7960. _internal_metadata_(NULL),
  7961. _has_bits_(from._has_bits_) {
  7962. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7963. group_a_ = from.group_a_;
  7964. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestHugeFieldNumbersLite.OptionalGroup)
  7965. }
  7966. void TestHugeFieldNumbersLite_OptionalGroup::SharedCtor() {
  7967. group_a_ = 0;
  7968. }
  7969. TestHugeFieldNumbersLite_OptionalGroup::~TestHugeFieldNumbersLite_OptionalGroup() {
  7970. // @@protoc_insertion_point(destructor:protobuf_unittest.TestHugeFieldNumbersLite.OptionalGroup)
  7971. SharedDtor();
  7972. }
  7973. void TestHugeFieldNumbersLite_OptionalGroup::SharedDtor() {
  7974. }
  7975. void TestHugeFieldNumbersLite_OptionalGroup::SetCachedSize(int size) const {
  7976. _cached_size_.Set(size);
  7977. }
  7978. const TestHugeFieldNumbersLite_OptionalGroup& TestHugeFieldNumbersLite_OptionalGroup::default_instance() {
  7979. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestHugeFieldNumbersLite_OptionalGroup.base);
  7980. return *internal_default_instance();
  7981. }
  7982. void TestHugeFieldNumbersLite_OptionalGroup::Clear() {
  7983. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestHugeFieldNumbersLite.OptionalGroup)
  7984. ::google::protobuf::uint32 cached_has_bits = 0;
  7985. // Prevent compiler warnings about cached_has_bits being unused
  7986. (void) cached_has_bits;
  7987. group_a_ = 0;
  7988. _has_bits_.Clear();
  7989. _internal_metadata_.Clear();
  7990. }
  7991. bool TestHugeFieldNumbersLite_OptionalGroup::MergePartialFromCodedStream(
  7992. ::google::protobuf::io::CodedInputStream* input) {
  7993. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  7994. ::google::protobuf::uint32 tag;
  7995. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  7996. &_internal_metadata_);
  7997. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  7998. unknown_fields_setter.buffer());
  7999. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  8000. &unknown_fields_output, false);
  8001. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestHugeFieldNumbersLite.OptionalGroup)
  8002. for (;;) {
  8003. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(4294960077u);
  8004. tag = p.first;
  8005. if (!p.second) goto handle_unusual;
  8006. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  8007. // optional int32 group_a = 536870009;
  8008. case 536870009: {
  8009. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8010. static_cast< ::google::protobuf::uint8>(200u /* 4294960072 & 0xFF */)) {
  8011. set_has_group_a();
  8012. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  8013. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  8014. input, &group_a_)));
  8015. } else {
  8016. goto handle_unusual;
  8017. }
  8018. break;
  8019. }
  8020. default: {
  8021. handle_unusual:
  8022. if (tag == 0 ||
  8023. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  8024. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  8025. input->SetLastTag(tag);
  8026. goto success;
  8027. }
  8028. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  8029. input, tag, &unknown_fields_stream));
  8030. break;
  8031. }
  8032. }
  8033. }
  8034. success:
  8035. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestHugeFieldNumbersLite.OptionalGroup)
  8036. return true;
  8037. failure:
  8038. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestHugeFieldNumbersLite.OptionalGroup)
  8039. return false;
  8040. #undef DO_
  8041. }
  8042. void TestHugeFieldNumbersLite_OptionalGroup::SerializeWithCachedSizes(
  8043. ::google::protobuf::io::CodedOutputStream* output) const {
  8044. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestHugeFieldNumbersLite.OptionalGroup)
  8045. ::google::protobuf::uint32 cached_has_bits = 0;
  8046. (void) cached_has_bits;
  8047. cached_has_bits = _has_bits_[0];
  8048. // optional int32 group_a = 536870009;
  8049. if (cached_has_bits & 0x00000001u) {
  8050. ::google::protobuf::internal::WireFormatLite::WriteInt32(536870009, this->group_a(), output);
  8051. }
  8052. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  8053. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  8054. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestHugeFieldNumbersLite.OptionalGroup)
  8055. }
  8056. size_t TestHugeFieldNumbersLite_OptionalGroup::ByteSizeLong() const {
  8057. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestHugeFieldNumbersLite.OptionalGroup)
  8058. size_t total_size = 0;
  8059. total_size += _internal_metadata_.unknown_fields().size();
  8060. // optional int32 group_a = 536870009;
  8061. if (has_group_a()) {
  8062. total_size += 5 +
  8063. ::google::protobuf::internal::WireFormatLite::Int32Size(
  8064. this->group_a());
  8065. }
  8066. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  8067. SetCachedSize(cached_size);
  8068. return total_size;
  8069. }
  8070. void TestHugeFieldNumbersLite_OptionalGroup::CheckTypeAndMergeFrom(
  8071. const ::google::protobuf::MessageLite& from) {
  8072. MergeFrom(*::google::protobuf::down_cast<const TestHugeFieldNumbersLite_OptionalGroup*>(&from));
  8073. }
  8074. void TestHugeFieldNumbersLite_OptionalGroup::MergeFrom(const TestHugeFieldNumbersLite_OptionalGroup& from) {
  8075. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestHugeFieldNumbersLite.OptionalGroup)
  8076. GOOGLE_DCHECK_NE(&from, this);
  8077. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8078. ::google::protobuf::uint32 cached_has_bits = 0;
  8079. (void) cached_has_bits;
  8080. if (from.has_group_a()) {
  8081. set_group_a(from.group_a());
  8082. }
  8083. }
  8084. void TestHugeFieldNumbersLite_OptionalGroup::CopyFrom(const TestHugeFieldNumbersLite_OptionalGroup& from) {
  8085. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestHugeFieldNumbersLite.OptionalGroup)
  8086. if (&from == this) return;
  8087. Clear();
  8088. MergeFrom(from);
  8089. }
  8090. bool TestHugeFieldNumbersLite_OptionalGroup::IsInitialized() const {
  8091. return true;
  8092. }
  8093. void TestHugeFieldNumbersLite_OptionalGroup::Swap(TestHugeFieldNumbersLite_OptionalGroup* other) {
  8094. if (other == this) return;
  8095. InternalSwap(other);
  8096. }
  8097. void TestHugeFieldNumbersLite_OptionalGroup::InternalSwap(TestHugeFieldNumbersLite_OptionalGroup* other) {
  8098. using std::swap;
  8099. swap(group_a_, other->group_a_);
  8100. swap(_has_bits_[0], other->_has_bits_[0]);
  8101. _internal_metadata_.Swap(&other->_internal_metadata_);
  8102. }
  8103. ::std::string TestHugeFieldNumbersLite_OptionalGroup::GetTypeName() const {
  8104. return "protobuf_unittest.TestHugeFieldNumbersLite.OptionalGroup";
  8105. }
  8106. // ===================================================================
  8107. TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse::TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse() {}
  8108. TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse::TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  8109. void TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse::MergeFrom(const TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse& other) {
  8110. MergeFromInternal(other);
  8111. }
  8112. // ===================================================================
  8113. void TestHugeFieldNumbersLite::InitAsDefaultInstance() {
  8114. ::protobuf_unittest::_TestHugeFieldNumbersLite_default_instance_._instance.get_mutable()->optional_message_ = const_cast< ::protobuf_unittest::ForeignMessageLite*>(
  8115. ::protobuf_unittest::ForeignMessageLite::internal_default_instance());
  8116. ::protobuf_unittest::_TestHugeFieldNumbersLite_default_instance_._instance.get_mutable()->optionalgroup_ = const_cast< ::protobuf_unittest::TestHugeFieldNumbersLite_OptionalGroup*>(
  8117. ::protobuf_unittest::TestHugeFieldNumbersLite_OptionalGroup::internal_default_instance());
  8118. }
  8119. void TestHugeFieldNumbersLite::set_allocated_oneof_test_all_types(::protobuf_unittest::TestAllTypesLite* oneof_test_all_types) {
  8120. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  8121. clear_oneof_field();
  8122. if (oneof_test_all_types) {
  8123. ::google::protobuf::Arena* submessage_arena = NULL;
  8124. if (message_arena != submessage_arena) {
  8125. oneof_test_all_types = ::google::protobuf::internal::GetOwnedMessage(
  8126. message_arena, oneof_test_all_types, submessage_arena);
  8127. }
  8128. set_has_oneof_test_all_types();
  8129. oneof_field_.oneof_test_all_types_ = oneof_test_all_types;
  8130. }
  8131. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestHugeFieldNumbersLite.oneof_test_all_types)
  8132. }
  8133. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  8134. const int TestHugeFieldNumbersLite::kOptionalInt32FieldNumber;
  8135. const int TestHugeFieldNumbersLite::kFixed32FieldNumber;
  8136. const int TestHugeFieldNumbersLite::kRepeatedInt32FieldNumber;
  8137. const int TestHugeFieldNumbersLite::kPackedInt32FieldNumber;
  8138. const int TestHugeFieldNumbersLite::kOptionalEnumFieldNumber;
  8139. const int TestHugeFieldNumbersLite::kOptionalStringFieldNumber;
  8140. const int TestHugeFieldNumbersLite::kOptionalBytesFieldNumber;
  8141. const int TestHugeFieldNumbersLite::kOptionalMessageFieldNumber;
  8142. const int TestHugeFieldNumbersLite::kOptionalgroupFieldNumber;
  8143. const int TestHugeFieldNumbersLite::kStringStringMapFieldNumber;
  8144. const int TestHugeFieldNumbersLite::kOneofUint32FieldNumber;
  8145. const int TestHugeFieldNumbersLite::kOneofTestAllTypesFieldNumber;
  8146. const int TestHugeFieldNumbersLite::kOneofStringFieldNumber;
  8147. const int TestHugeFieldNumbersLite::kOneofBytesFieldNumber;
  8148. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  8149. TestHugeFieldNumbersLite::TestHugeFieldNumbersLite()
  8150. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  8151. ::google::protobuf::internal::InitSCC(
  8152. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestHugeFieldNumbersLite.base);
  8153. SharedCtor();
  8154. // @@protoc_insertion_point(constructor:protobuf_unittest.TestHugeFieldNumbersLite)
  8155. }
  8156. TestHugeFieldNumbersLite::TestHugeFieldNumbersLite(const TestHugeFieldNumbersLite& from)
  8157. : ::google::protobuf::MessageLite(),
  8158. _internal_metadata_(NULL),
  8159. _has_bits_(from._has_bits_),
  8160. repeated_int32_(from.repeated_int32_),
  8161. packed_int32_(from.packed_int32_) {
  8162. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8163. _extensions_.MergeFrom(from._extensions_);
  8164. string_string_map_.MergeFrom(from.string_string_map_);
  8165. optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  8166. if (from.has_optional_string()) {
  8167. optional_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_);
  8168. }
  8169. optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  8170. if (from.has_optional_bytes()) {
  8171. optional_bytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes_);
  8172. }
  8173. if (from.has_optional_message()) {
  8174. optional_message_ = new ::protobuf_unittest::ForeignMessageLite(*from.optional_message_);
  8175. } else {
  8176. optional_message_ = NULL;
  8177. }
  8178. if (from.has_optionalgroup()) {
  8179. optionalgroup_ = new ::protobuf_unittest::TestHugeFieldNumbersLite_OptionalGroup(*from.optionalgroup_);
  8180. } else {
  8181. optionalgroup_ = NULL;
  8182. }
  8183. ::memcpy(&optional_int32_, &from.optional_int32_,
  8184. static_cast<size_t>(reinterpret_cast<char*>(&optional_enum_) -
  8185. reinterpret_cast<char*>(&optional_int32_)) + sizeof(optional_enum_));
  8186. clear_has_oneof_field();
  8187. switch (from.oneof_field_case()) {
  8188. case kOneofUint32: {
  8189. set_oneof_uint32(from.oneof_uint32());
  8190. break;
  8191. }
  8192. case kOneofTestAllTypes: {
  8193. mutable_oneof_test_all_types()->::protobuf_unittest::TestAllTypesLite::MergeFrom(from.oneof_test_all_types());
  8194. break;
  8195. }
  8196. case kOneofString: {
  8197. set_oneof_string(from.oneof_string());
  8198. break;
  8199. }
  8200. case kOneofBytes: {
  8201. set_oneof_bytes(from.oneof_bytes());
  8202. break;
  8203. }
  8204. case ONEOF_FIELD_NOT_SET: {
  8205. break;
  8206. }
  8207. }
  8208. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestHugeFieldNumbersLite)
  8209. }
  8210. void TestHugeFieldNumbersLite::SharedCtor() {
  8211. optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  8212. optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  8213. ::memset(&optional_message_, 0, static_cast<size_t>(
  8214. reinterpret_cast<char*>(&fixed_32_) -
  8215. reinterpret_cast<char*>(&optional_message_)) + sizeof(fixed_32_));
  8216. optional_enum_ = 4;
  8217. clear_has_oneof_field();
  8218. }
  8219. TestHugeFieldNumbersLite::~TestHugeFieldNumbersLite() {
  8220. // @@protoc_insertion_point(destructor:protobuf_unittest.TestHugeFieldNumbersLite)
  8221. SharedDtor();
  8222. }
  8223. void TestHugeFieldNumbersLite::SharedDtor() {
  8224. optional_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  8225. optional_bytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  8226. if (this != internal_default_instance()) delete optional_message_;
  8227. if (this != internal_default_instance()) delete optionalgroup_;
  8228. if (has_oneof_field()) {
  8229. clear_oneof_field();
  8230. }
  8231. }
  8232. void TestHugeFieldNumbersLite::SetCachedSize(int size) const {
  8233. _cached_size_.Set(size);
  8234. }
  8235. const TestHugeFieldNumbersLite& TestHugeFieldNumbersLite::default_instance() {
  8236. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestHugeFieldNumbersLite.base);
  8237. return *internal_default_instance();
  8238. }
  8239. void TestHugeFieldNumbersLite::clear_oneof_field() {
  8240. // @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestHugeFieldNumbersLite)
  8241. switch (oneof_field_case()) {
  8242. case kOneofUint32: {
  8243. // No need to clear
  8244. break;
  8245. }
  8246. case kOneofTestAllTypes: {
  8247. delete oneof_field_.oneof_test_all_types_;
  8248. break;
  8249. }
  8250. case kOneofString: {
  8251. oneof_field_.oneof_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  8252. break;
  8253. }
  8254. case kOneofBytes: {
  8255. oneof_field_.oneof_bytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  8256. break;
  8257. }
  8258. case ONEOF_FIELD_NOT_SET: {
  8259. break;
  8260. }
  8261. }
  8262. _oneof_case_[0] = ONEOF_FIELD_NOT_SET;
  8263. }
  8264. void TestHugeFieldNumbersLite::Clear() {
  8265. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestHugeFieldNumbersLite)
  8266. ::google::protobuf::uint32 cached_has_bits = 0;
  8267. // Prevent compiler warnings about cached_has_bits being unused
  8268. (void) cached_has_bits;
  8269. _extensions_.Clear();
  8270. repeated_int32_.Clear();
  8271. packed_int32_.Clear();
  8272. string_string_map_.Clear();
  8273. cached_has_bits = _has_bits_[0];
  8274. if (cached_has_bits & 15u) {
  8275. if (cached_has_bits & 0x00000001u) {
  8276. optional_string_.ClearNonDefaultToEmptyNoArena();
  8277. }
  8278. if (cached_has_bits & 0x00000002u) {
  8279. optional_bytes_.ClearNonDefaultToEmptyNoArena();
  8280. }
  8281. if (cached_has_bits & 0x00000004u) {
  8282. GOOGLE_DCHECK(optional_message_ != NULL);
  8283. optional_message_->Clear();
  8284. }
  8285. if (cached_has_bits & 0x00000008u) {
  8286. GOOGLE_DCHECK(optionalgroup_ != NULL);
  8287. optionalgroup_->Clear();
  8288. }
  8289. }
  8290. if (cached_has_bits & 112u) {
  8291. ::memset(&optional_int32_, 0, static_cast<size_t>(
  8292. reinterpret_cast<char*>(&fixed_32_) -
  8293. reinterpret_cast<char*>(&optional_int32_)) + sizeof(fixed_32_));
  8294. optional_enum_ = 4;
  8295. }
  8296. clear_oneof_field();
  8297. _has_bits_.Clear();
  8298. _internal_metadata_.Clear();
  8299. }
  8300. bool TestHugeFieldNumbersLite::MergePartialFromCodedStream(
  8301. ::google::protobuf::io::CodedInputStream* input) {
  8302. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  8303. ::google::protobuf::uint32 tag;
  8304. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  8305. &_internal_metadata_);
  8306. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  8307. unknown_fields_setter.buffer());
  8308. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  8309. &unknown_fields_output, false);
  8310. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestHugeFieldNumbersLite)
  8311. for (;;) {
  8312. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(4294960117u);
  8313. tag = p.first;
  8314. if (!p.second) goto handle_unusual;
  8315. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  8316. // optional int32 optional_int32 = 536870000;
  8317. case 536870000: {
  8318. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8319. static_cast< ::google::protobuf::uint8>(128u /* 4294960000 & 0xFF */)) {
  8320. set_has_optional_int32();
  8321. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  8322. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  8323. input, &optional_int32_)));
  8324. } else {
  8325. goto handle_unusual;
  8326. }
  8327. break;
  8328. }
  8329. // optional int32 fixed_32 = 536870001;
  8330. case 536870001: {
  8331. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8332. static_cast< ::google::protobuf::uint8>(136u /* 4294960008 & 0xFF */)) {
  8333. set_has_fixed_32();
  8334. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  8335. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  8336. input, &fixed_32_)));
  8337. } else {
  8338. goto handle_unusual;
  8339. }
  8340. break;
  8341. }
  8342. // repeated int32 repeated_int32 = 536870002 [packed = false];
  8343. case 536870002: {
  8344. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8345. static_cast< ::google::protobuf::uint8>(144u /* 4294960016 & 0xFF */)) {
  8346. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  8347. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  8348. 5, 4294960016u, input, this->mutable_repeated_int32())));
  8349. } else if (
  8350. static_cast< ::google::protobuf::uint8>(tag) ==
  8351. static_cast< ::google::protobuf::uint8>(146u /* 4294960018 & 0xFF */)) {
  8352. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  8353. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  8354. input, this->mutable_repeated_int32())));
  8355. } else {
  8356. goto handle_unusual;
  8357. }
  8358. break;
  8359. }
  8360. // repeated int32 packed_int32 = 536870003 [packed = true];
  8361. case 536870003: {
  8362. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8363. static_cast< ::google::protobuf::uint8>(154u /* 4294960026 & 0xFF */)) {
  8364. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  8365. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  8366. input, this->mutable_packed_int32())));
  8367. } else if (
  8368. static_cast< ::google::protobuf::uint8>(tag) ==
  8369. static_cast< ::google::protobuf::uint8>(152u /* 4294960024 & 0xFF */)) {
  8370. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  8371. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  8372. 5, 4294960026u, input, this->mutable_packed_int32())));
  8373. } else {
  8374. goto handle_unusual;
  8375. }
  8376. break;
  8377. }
  8378. // optional .protobuf_unittest.ForeignEnumLite optional_enum = 536870004;
  8379. case 536870004: {
  8380. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8381. static_cast< ::google::protobuf::uint8>(160u /* 4294960032 & 0xFF */)) {
  8382. int value;
  8383. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  8384. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  8385. input, &value)));
  8386. if (::protobuf_unittest::ForeignEnumLite_IsValid(value)) {
  8387. set_optional_enum(static_cast< ::protobuf_unittest::ForeignEnumLite >(value));
  8388. } else {
  8389. unknown_fields_stream.WriteVarint32(4294960032u);
  8390. unknown_fields_stream.WriteVarint32(
  8391. static_cast< ::google::protobuf::uint32>(value));
  8392. }
  8393. } else {
  8394. goto handle_unusual;
  8395. }
  8396. break;
  8397. }
  8398. // optional string optional_string = 536870005;
  8399. case 536870005: {
  8400. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8401. static_cast< ::google::protobuf::uint8>(170u /* 4294960042 & 0xFF */)) {
  8402. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  8403. input, this->mutable_optional_string()));
  8404. } else {
  8405. goto handle_unusual;
  8406. }
  8407. break;
  8408. }
  8409. // optional bytes optional_bytes = 536870006;
  8410. case 536870006: {
  8411. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8412. static_cast< ::google::protobuf::uint8>(178u /* 4294960050 & 0xFF */)) {
  8413. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  8414. input, this->mutable_optional_bytes()));
  8415. } else {
  8416. goto handle_unusual;
  8417. }
  8418. break;
  8419. }
  8420. // optional .protobuf_unittest.ForeignMessageLite optional_message = 536870007;
  8421. case 536870007: {
  8422. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8423. static_cast< ::google::protobuf::uint8>(186u /* 4294960058 & 0xFF */)) {
  8424. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8425. input, mutable_optional_message()));
  8426. } else {
  8427. goto handle_unusual;
  8428. }
  8429. break;
  8430. }
  8431. // optional group OptionalGroup = 536870008 { ... };
  8432. case 536870008: {
  8433. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8434. static_cast< ::google::protobuf::uint8>(195u /* 4294960067 & 0xFF */)) {
  8435. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
  8436. 536870008, input, mutable_optionalgroup()));
  8437. } else {
  8438. goto handle_unusual;
  8439. }
  8440. break;
  8441. }
  8442. // map<string, string> string_string_map = 536870010;
  8443. case 536870010: {
  8444. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8445. static_cast< ::google::protobuf::uint8>(210u /* 4294960082 & 0xFF */)) {
  8446. TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapFieldLite<
  8447. TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse,
  8448. ::std::string, ::std::string,
  8449. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  8450. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  8451. 0 >,
  8452. ::google::protobuf::Map< ::std::string, ::std::string > > parser(&string_string_map_);
  8453. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  8454. input, &parser));
  8455. } else {
  8456. goto handle_unusual;
  8457. }
  8458. break;
  8459. }
  8460. // optional uint32 oneof_uint32 = 536870011;
  8461. case 536870011: {
  8462. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8463. static_cast< ::google::protobuf::uint8>(216u /* 4294960088 & 0xFF */)) {
  8464. clear_oneof_field();
  8465. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  8466. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  8467. input, &oneof_field_.oneof_uint32_)));
  8468. set_has_oneof_uint32();
  8469. } else {
  8470. goto handle_unusual;
  8471. }
  8472. break;
  8473. }
  8474. // optional .protobuf_unittest.TestAllTypesLite oneof_test_all_types = 536870012;
  8475. case 536870012: {
  8476. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8477. static_cast< ::google::protobuf::uint8>(226u /* 4294960098 & 0xFF */)) {
  8478. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8479. input, mutable_oneof_test_all_types()));
  8480. } else {
  8481. goto handle_unusual;
  8482. }
  8483. break;
  8484. }
  8485. // optional string oneof_string = 536870013;
  8486. case 536870013: {
  8487. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8488. static_cast< ::google::protobuf::uint8>(234u /* 4294960106 & 0xFF */)) {
  8489. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  8490. input, this->mutable_oneof_string()));
  8491. } else {
  8492. goto handle_unusual;
  8493. }
  8494. break;
  8495. }
  8496. // optional bytes oneof_bytes = 536870014;
  8497. case 536870014: {
  8498. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8499. static_cast< ::google::protobuf::uint8>(242u /* 4294960114 & 0xFF */)) {
  8500. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  8501. input, this->mutable_oneof_bytes()));
  8502. } else {
  8503. goto handle_unusual;
  8504. }
  8505. break;
  8506. }
  8507. default: {
  8508. handle_unusual:
  8509. if (tag == 0) {
  8510. goto success;
  8511. }
  8512. if ((4294880000u <= tag && tag < 4294960000u)) {
  8513. DO_(_extensions_.ParseField(tag, input,
  8514. internal_default_instance(),
  8515. &unknown_fields_stream));
  8516. continue;
  8517. }
  8518. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  8519. input, tag, &unknown_fields_stream));
  8520. break;
  8521. }
  8522. }
  8523. }
  8524. success:
  8525. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestHugeFieldNumbersLite)
  8526. return true;
  8527. failure:
  8528. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestHugeFieldNumbersLite)
  8529. return false;
  8530. #undef DO_
  8531. }
  8532. void TestHugeFieldNumbersLite::SerializeWithCachedSizes(
  8533. ::google::protobuf::io::CodedOutputStream* output) const {
  8534. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestHugeFieldNumbersLite)
  8535. ::google::protobuf::uint32 cached_has_bits = 0;
  8536. (void) cached_has_bits;
  8537. // Extension range [536860000, 536870000)
  8538. _extensions_.SerializeWithCachedSizes(
  8539. 536860000, 536870000, output);
  8540. cached_has_bits = _has_bits_[0];
  8541. // optional int32 optional_int32 = 536870000;
  8542. if (cached_has_bits & 0x00000010u) {
  8543. ::google::protobuf::internal::WireFormatLite::WriteInt32(536870000, this->optional_int32(), output);
  8544. }
  8545. // optional int32 fixed_32 = 536870001;
  8546. if (cached_has_bits & 0x00000020u) {
  8547. ::google::protobuf::internal::WireFormatLite::WriteInt32(536870001, this->fixed_32(), output);
  8548. }
  8549. // repeated int32 repeated_int32 = 536870002 [packed = false];
  8550. for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
  8551. ::google::protobuf::internal::WireFormatLite::WriteInt32(
  8552. 536870002, this->repeated_int32(i), output);
  8553. }
  8554. // repeated int32 packed_int32 = 536870003 [packed = true];
  8555. if (this->packed_int32_size() > 0) {
  8556. ::google::protobuf::internal::WireFormatLite::WriteTag(536870003, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  8557. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  8558. _packed_int32_cached_byte_size_));
  8559. }
  8560. for (int i = 0, n = this->packed_int32_size(); i < n; i++) {
  8561. ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
  8562. this->packed_int32(i), output);
  8563. }
  8564. // optional .protobuf_unittest.ForeignEnumLite optional_enum = 536870004;
  8565. if (cached_has_bits & 0x00000040u) {
  8566. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  8567. 536870004, this->optional_enum(), output);
  8568. }
  8569. // optional string optional_string = 536870005;
  8570. if (cached_has_bits & 0x00000001u) {
  8571. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  8572. 536870005, this->optional_string(), output);
  8573. }
  8574. // optional bytes optional_bytes = 536870006;
  8575. if (cached_has_bits & 0x00000002u) {
  8576. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  8577. 536870006, this->optional_bytes(), output);
  8578. }
  8579. // optional .protobuf_unittest.ForeignMessageLite optional_message = 536870007;
  8580. if (cached_has_bits & 0x00000004u) {
  8581. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  8582. 536870007, this->_internal_optional_message(), output);
  8583. }
  8584. // optional group OptionalGroup = 536870008 { ... };
  8585. if (cached_has_bits & 0x00000008u) {
  8586. ::google::protobuf::internal::WireFormatLite::WriteGroup(
  8587. 536870008, this->_internal_optionalgroup(), output);
  8588. }
  8589. // map<string, string> string_string_map = 536870010;
  8590. if (!this->string_string_map().empty()) {
  8591. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  8592. ConstPtr;
  8593. typedef ConstPtr SortItem;
  8594. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  8595. struct Utf8Check {
  8596. static void Check(ConstPtr p) {
  8597. }
  8598. };
  8599. if (output->IsSerializationDeterministic() &&
  8600. this->string_string_map().size() > 1) {
  8601. ::std::unique_ptr<SortItem[]> items(
  8602. new SortItem[this->string_string_map().size()]);
  8603. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  8604. size_type n = 0;
  8605. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  8606. it = this->string_string_map().begin();
  8607. it != this->string_string_map().end(); ++it, ++n) {
  8608. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  8609. }
  8610. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  8611. ::std::unique_ptr<TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse> entry;
  8612. for (size_type i = 0; i < n; i++) {
  8613. entry.reset(string_string_map_.NewEntryWrapper(
  8614. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  8615. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  8616. 536870010, *entry, output);
  8617. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  8618. }
  8619. } else {
  8620. ::std::unique_ptr<TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse> entry;
  8621. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  8622. it = this->string_string_map().begin();
  8623. it != this->string_string_map().end(); ++it) {
  8624. entry.reset(string_string_map_.NewEntryWrapper(
  8625. it->first, it->second));
  8626. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  8627. 536870010, *entry, output);
  8628. Utf8Check::Check(&*it);
  8629. }
  8630. }
  8631. }
  8632. switch (oneof_field_case()) {
  8633. case kOneofUint32:
  8634. ::google::protobuf::internal::WireFormatLite::WriteUInt32(536870011, this->oneof_uint32(), output);
  8635. break;
  8636. case kOneofTestAllTypes:
  8637. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  8638. 536870012, this->_internal_oneof_test_all_types(), output);
  8639. break;
  8640. case kOneofString:
  8641. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  8642. 536870013, this->oneof_string(), output);
  8643. break;
  8644. case kOneofBytes:
  8645. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  8646. 536870014, this->oneof_bytes(), output);
  8647. break;
  8648. default: ;
  8649. }
  8650. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  8651. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  8652. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestHugeFieldNumbersLite)
  8653. }
  8654. size_t TestHugeFieldNumbersLite::ByteSizeLong() const {
  8655. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestHugeFieldNumbersLite)
  8656. size_t total_size = 0;
  8657. total_size += _extensions_.ByteSize();
  8658. total_size += _internal_metadata_.unknown_fields().size();
  8659. // repeated int32 repeated_int32 = 536870002 [packed = false];
  8660. {
  8661. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  8662. Int32Size(this->repeated_int32_);
  8663. total_size += 5 *
  8664. ::google::protobuf::internal::FromIntSize(this->repeated_int32_size());
  8665. total_size += data_size;
  8666. }
  8667. // repeated int32 packed_int32 = 536870003 [packed = true];
  8668. {
  8669. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  8670. Int32Size(this->packed_int32_);
  8671. if (data_size > 0) {
  8672. total_size += 5 +
  8673. ::google::protobuf::internal::WireFormatLite::Int32Size(
  8674. static_cast< ::google::protobuf::int32>(data_size));
  8675. }
  8676. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  8677. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  8678. _packed_int32_cached_byte_size_ = cached_size;
  8679. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  8680. total_size += data_size;
  8681. }
  8682. // map<string, string> string_string_map = 536870010;
  8683. total_size += 5 *
  8684. ::google::protobuf::internal::FromIntSize(this->string_string_map_size());
  8685. {
  8686. ::std::unique_ptr<TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse> entry;
  8687. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  8688. it = this->string_string_map().begin();
  8689. it != this->string_string_map().end(); ++it) {
  8690. entry.reset(string_string_map_.NewEntryWrapper(it->first, it->second));
  8691. total_size += ::google::protobuf::internal::WireFormatLite::
  8692. MessageSizeNoVirtual(*entry);
  8693. }
  8694. }
  8695. if (_has_bits_[0 / 32] & 127u) {
  8696. // optional string optional_string = 536870005;
  8697. if (has_optional_string()) {
  8698. total_size += 5 +
  8699. ::google::protobuf::internal::WireFormatLite::StringSize(
  8700. this->optional_string());
  8701. }
  8702. // optional bytes optional_bytes = 536870006;
  8703. if (has_optional_bytes()) {
  8704. total_size += 5 +
  8705. ::google::protobuf::internal::WireFormatLite::BytesSize(
  8706. this->optional_bytes());
  8707. }
  8708. // optional .protobuf_unittest.ForeignMessageLite optional_message = 536870007;
  8709. if (has_optional_message()) {
  8710. total_size += 5 +
  8711. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8712. *optional_message_);
  8713. }
  8714. // optional group OptionalGroup = 536870008 { ... };
  8715. if (has_optionalgroup()) {
  8716. total_size += 10 +
  8717. ::google::protobuf::internal::WireFormatLite::GroupSize(
  8718. *optionalgroup_);
  8719. }
  8720. // optional int32 optional_int32 = 536870000;
  8721. if (has_optional_int32()) {
  8722. total_size += 5 +
  8723. ::google::protobuf::internal::WireFormatLite::Int32Size(
  8724. this->optional_int32());
  8725. }
  8726. // optional int32 fixed_32 = 536870001;
  8727. if (has_fixed_32()) {
  8728. total_size += 5 +
  8729. ::google::protobuf::internal::WireFormatLite::Int32Size(
  8730. this->fixed_32());
  8731. }
  8732. // optional .protobuf_unittest.ForeignEnumLite optional_enum = 536870004;
  8733. if (has_optional_enum()) {
  8734. total_size += 5 +
  8735. ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_enum());
  8736. }
  8737. }
  8738. switch (oneof_field_case()) {
  8739. // optional uint32 oneof_uint32 = 536870011;
  8740. case kOneofUint32: {
  8741. total_size += 5 +
  8742. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  8743. this->oneof_uint32());
  8744. break;
  8745. }
  8746. // optional .protobuf_unittest.TestAllTypesLite oneof_test_all_types = 536870012;
  8747. case kOneofTestAllTypes: {
  8748. total_size += 5 +
  8749. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8750. *oneof_field_.oneof_test_all_types_);
  8751. break;
  8752. }
  8753. // optional string oneof_string = 536870013;
  8754. case kOneofString: {
  8755. total_size += 5 +
  8756. ::google::protobuf::internal::WireFormatLite::StringSize(
  8757. this->oneof_string());
  8758. break;
  8759. }
  8760. // optional bytes oneof_bytes = 536870014;
  8761. case kOneofBytes: {
  8762. total_size += 5 +
  8763. ::google::protobuf::internal::WireFormatLite::BytesSize(
  8764. this->oneof_bytes());
  8765. break;
  8766. }
  8767. case ONEOF_FIELD_NOT_SET: {
  8768. break;
  8769. }
  8770. }
  8771. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  8772. SetCachedSize(cached_size);
  8773. return total_size;
  8774. }
  8775. void TestHugeFieldNumbersLite::CheckTypeAndMergeFrom(
  8776. const ::google::protobuf::MessageLite& from) {
  8777. MergeFrom(*::google::protobuf::down_cast<const TestHugeFieldNumbersLite*>(&from));
  8778. }
  8779. void TestHugeFieldNumbersLite::MergeFrom(const TestHugeFieldNumbersLite& from) {
  8780. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestHugeFieldNumbersLite)
  8781. GOOGLE_DCHECK_NE(&from, this);
  8782. _extensions_.MergeFrom(from._extensions_);
  8783. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8784. ::google::protobuf::uint32 cached_has_bits = 0;
  8785. (void) cached_has_bits;
  8786. repeated_int32_.MergeFrom(from.repeated_int32_);
  8787. packed_int32_.MergeFrom(from.packed_int32_);
  8788. string_string_map_.MergeFrom(from.string_string_map_);
  8789. cached_has_bits = from._has_bits_[0];
  8790. if (cached_has_bits & 127u) {
  8791. if (cached_has_bits & 0x00000001u) {
  8792. set_has_optional_string();
  8793. optional_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_);
  8794. }
  8795. if (cached_has_bits & 0x00000002u) {
  8796. set_has_optional_bytes();
  8797. optional_bytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes_);
  8798. }
  8799. if (cached_has_bits & 0x00000004u) {
  8800. mutable_optional_message()->::protobuf_unittest::ForeignMessageLite::MergeFrom(from.optional_message());
  8801. }
  8802. if (cached_has_bits & 0x00000008u) {
  8803. mutable_optionalgroup()->::protobuf_unittest::TestHugeFieldNumbersLite_OptionalGroup::MergeFrom(from.optionalgroup());
  8804. }
  8805. if (cached_has_bits & 0x00000010u) {
  8806. optional_int32_ = from.optional_int32_;
  8807. }
  8808. if (cached_has_bits & 0x00000020u) {
  8809. fixed_32_ = from.fixed_32_;
  8810. }
  8811. if (cached_has_bits & 0x00000040u) {
  8812. optional_enum_ = from.optional_enum_;
  8813. }
  8814. _has_bits_[0] |= cached_has_bits;
  8815. }
  8816. switch (from.oneof_field_case()) {
  8817. case kOneofUint32: {
  8818. set_oneof_uint32(from.oneof_uint32());
  8819. break;
  8820. }
  8821. case kOneofTestAllTypes: {
  8822. mutable_oneof_test_all_types()->::protobuf_unittest::TestAllTypesLite::MergeFrom(from.oneof_test_all_types());
  8823. break;
  8824. }
  8825. case kOneofString: {
  8826. set_oneof_string(from.oneof_string());
  8827. break;
  8828. }
  8829. case kOneofBytes: {
  8830. set_oneof_bytes(from.oneof_bytes());
  8831. break;
  8832. }
  8833. case ONEOF_FIELD_NOT_SET: {
  8834. break;
  8835. }
  8836. }
  8837. }
  8838. void TestHugeFieldNumbersLite::CopyFrom(const TestHugeFieldNumbersLite& from) {
  8839. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestHugeFieldNumbersLite)
  8840. if (&from == this) return;
  8841. Clear();
  8842. MergeFrom(from);
  8843. }
  8844. bool TestHugeFieldNumbersLite::IsInitialized() const {
  8845. if (!_extensions_.IsInitialized()) {
  8846. return false;
  8847. }
  8848. return true;
  8849. }
  8850. void TestHugeFieldNumbersLite::Swap(TestHugeFieldNumbersLite* other) {
  8851. if (other == this) return;
  8852. InternalSwap(other);
  8853. }
  8854. void TestHugeFieldNumbersLite::InternalSwap(TestHugeFieldNumbersLite* other) {
  8855. using std::swap;
  8856. repeated_int32_.InternalSwap(&other->repeated_int32_);
  8857. packed_int32_.InternalSwap(&other->packed_int32_);
  8858. string_string_map_.Swap(&other->string_string_map_);
  8859. optional_string_.Swap(&other->optional_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  8860. GetArenaNoVirtual());
  8861. optional_bytes_.Swap(&other->optional_bytes_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  8862. GetArenaNoVirtual());
  8863. swap(optional_message_, other->optional_message_);
  8864. swap(optionalgroup_, other->optionalgroup_);
  8865. swap(optional_int32_, other->optional_int32_);
  8866. swap(fixed_32_, other->fixed_32_);
  8867. swap(optional_enum_, other->optional_enum_);
  8868. swap(oneof_field_, other->oneof_field_);
  8869. swap(_oneof_case_[0], other->_oneof_case_[0]);
  8870. swap(_has_bits_[0], other->_has_bits_[0]);
  8871. _internal_metadata_.Swap(&other->_internal_metadata_);
  8872. _extensions_.Swap(&other->_extensions_);
  8873. }
  8874. ::std::string TestHugeFieldNumbersLite::GetTypeName() const {
  8875. return "protobuf_unittest.TestHugeFieldNumbersLite";
  8876. }
  8877. // ===================================================================
  8878. void TestOneofParsingLite::InitAsDefaultInstance() {
  8879. }
  8880. void TestOneofParsingLite::set_allocated_oneof_submessage(::protobuf_unittest::TestAllTypesLite* oneof_submessage) {
  8881. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  8882. clear_oneof_field();
  8883. if (oneof_submessage) {
  8884. ::google::protobuf::Arena* submessage_arena = NULL;
  8885. if (message_arena != submessage_arena) {
  8886. oneof_submessage = ::google::protobuf::internal::GetOwnedMessage(
  8887. message_arena, oneof_submessage, submessage_arena);
  8888. }
  8889. set_has_oneof_submessage();
  8890. oneof_field_.oneof_submessage_ = oneof_submessage;
  8891. }
  8892. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestOneofParsingLite.oneof_submessage)
  8893. }
  8894. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_bytes_;
  8895. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_string_cord_;
  8896. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_bytes_string_piece_;
  8897. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  8898. const int TestOneofParsingLite::kOneofInt32FieldNumber;
  8899. const int TestOneofParsingLite::kOneofSubmessageFieldNumber;
  8900. const int TestOneofParsingLite::kOneofStringFieldNumber;
  8901. const int TestOneofParsingLite::kOneofBytesFieldNumber;
  8902. const int TestOneofParsingLite::kOneofStringCordFieldNumber;
  8903. const int TestOneofParsingLite::kOneofBytesCordFieldNumber;
  8904. const int TestOneofParsingLite::kOneofStringStringPieceFieldNumber;
  8905. const int TestOneofParsingLite::kOneofBytesStringPieceFieldNumber;
  8906. const int TestOneofParsingLite::kOneofEnumFieldNumber;
  8907. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  8908. TestOneofParsingLite::TestOneofParsingLite()
  8909. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  8910. ::google::protobuf::internal::InitSCC(
  8911. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestOneofParsingLite.base);
  8912. SharedCtor();
  8913. // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneofParsingLite)
  8914. }
  8915. TestOneofParsingLite::TestOneofParsingLite(const TestOneofParsingLite& from)
  8916. : ::google::protobuf::MessageLite(),
  8917. _internal_metadata_(NULL),
  8918. _has_bits_(from._has_bits_) {
  8919. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8920. clear_has_oneof_field();
  8921. switch (from.oneof_field_case()) {
  8922. case kOneofInt32: {
  8923. set_oneof_int32(from.oneof_int32());
  8924. break;
  8925. }
  8926. case kOneofSubmessage: {
  8927. mutable_oneof_submessage()->::protobuf_unittest::TestAllTypesLite::MergeFrom(from.oneof_submessage());
  8928. break;
  8929. }
  8930. case kOneofString: {
  8931. set_oneof_string(from.oneof_string());
  8932. break;
  8933. }
  8934. case kOneofBytes: {
  8935. set_oneof_bytes(from.oneof_bytes());
  8936. break;
  8937. }
  8938. case kOneofStringCord: {
  8939. set_oneof_string_cord(from.oneof_string_cord());
  8940. break;
  8941. }
  8942. case kOneofBytesCord: {
  8943. set_oneof_bytes_cord(from.oneof_bytes_cord());
  8944. break;
  8945. }
  8946. case kOneofStringStringPiece: {
  8947. set_oneof_string_string_piece(from.oneof_string_string_piece());
  8948. break;
  8949. }
  8950. case kOneofBytesStringPiece: {
  8951. set_oneof_bytes_string_piece(from.oneof_bytes_string_piece());
  8952. break;
  8953. }
  8954. case kOneofEnum: {
  8955. set_oneof_enum(from.oneof_enum());
  8956. break;
  8957. }
  8958. case ONEOF_FIELD_NOT_SET: {
  8959. break;
  8960. }
  8961. }
  8962. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneofParsingLite)
  8963. }
  8964. void TestOneofParsingLite::SharedCtor() {
  8965. clear_has_oneof_field();
  8966. }
  8967. TestOneofParsingLite::~TestOneofParsingLite() {
  8968. // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneofParsingLite)
  8969. SharedDtor();
  8970. }
  8971. void TestOneofParsingLite::SharedDtor() {
  8972. if (has_oneof_field()) {
  8973. clear_oneof_field();
  8974. }
  8975. }
  8976. void TestOneofParsingLite::SetCachedSize(int size) const {
  8977. _cached_size_.Set(size);
  8978. }
  8979. const TestOneofParsingLite& TestOneofParsingLite::default_instance() {
  8980. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_TestOneofParsingLite.base);
  8981. return *internal_default_instance();
  8982. }
  8983. void TestOneofParsingLite::clear_oneof_field() {
  8984. // @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestOneofParsingLite)
  8985. switch (oneof_field_case()) {
  8986. case kOneofInt32: {
  8987. // No need to clear
  8988. break;
  8989. }
  8990. case kOneofSubmessage: {
  8991. delete oneof_field_.oneof_submessage_;
  8992. break;
  8993. }
  8994. case kOneofString: {
  8995. oneof_field_.oneof_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  8996. break;
  8997. }
  8998. case kOneofBytes: {
  8999. oneof_field_.oneof_bytes_.DestroyNoArena(&::protobuf_unittest::TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_bytes_.get());
  9000. break;
  9001. }
  9002. case kOneofStringCord: {
  9003. oneof_field_.oneof_string_cord_.DestroyNoArena(&::protobuf_unittest::TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_string_cord_.get());
  9004. break;
  9005. }
  9006. case kOneofBytesCord: {
  9007. oneof_field_.oneof_bytes_cord_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9008. break;
  9009. }
  9010. case kOneofStringStringPiece: {
  9011. oneof_field_.oneof_string_string_piece_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9012. break;
  9013. }
  9014. case kOneofBytesStringPiece: {
  9015. oneof_field_.oneof_bytes_string_piece_.DestroyNoArena(&::protobuf_unittest::TestOneofParsingLite::_i_give_permission_to_break_this_code_default_oneof_bytes_string_piece_.get());
  9016. break;
  9017. }
  9018. case kOneofEnum: {
  9019. // No need to clear
  9020. break;
  9021. }
  9022. case ONEOF_FIELD_NOT_SET: {
  9023. break;
  9024. }
  9025. }
  9026. _oneof_case_[0] = ONEOF_FIELD_NOT_SET;
  9027. }
  9028. void TestOneofParsingLite::Clear() {
  9029. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestOneofParsingLite)
  9030. ::google::protobuf::uint32 cached_has_bits = 0;
  9031. // Prevent compiler warnings about cached_has_bits being unused
  9032. (void) cached_has_bits;
  9033. clear_oneof_field();
  9034. _has_bits_.Clear();
  9035. _internal_metadata_.Clear();
  9036. }
  9037. bool TestOneofParsingLite::MergePartialFromCodedStream(
  9038. ::google::protobuf::io::CodedInputStream* input) {
  9039. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9040. ::google::protobuf::uint32 tag;
  9041. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  9042. &_internal_metadata_);
  9043. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  9044. unknown_fields_setter.buffer());
  9045. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  9046. &unknown_fields_output, false);
  9047. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestOneofParsingLite)
  9048. for (;;) {
  9049. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  9050. tag = p.first;
  9051. if (!p.second) goto handle_unusual;
  9052. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9053. // optional int32 oneof_int32 = 1;
  9054. case 1: {
  9055. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9056. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  9057. clear_oneof_field();
  9058. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  9059. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  9060. input, &oneof_field_.oneof_int32_)));
  9061. set_has_oneof_int32();
  9062. } else {
  9063. goto handle_unusual;
  9064. }
  9065. break;
  9066. }
  9067. // optional .protobuf_unittest.TestAllTypesLite oneof_submessage = 2;
  9068. case 2: {
  9069. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9070. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  9071. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  9072. input, mutable_oneof_submessage()));
  9073. } else {
  9074. goto handle_unusual;
  9075. }
  9076. break;
  9077. }
  9078. // optional string oneof_string = 3;
  9079. case 3: {
  9080. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9081. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  9082. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  9083. input, this->mutable_oneof_string()));
  9084. } else {
  9085. goto handle_unusual;
  9086. }
  9087. break;
  9088. }
  9089. // optional bytes oneof_bytes = 4 [default = "default bytes"];
  9090. case 4: {
  9091. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9092. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  9093. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  9094. input, this->mutable_oneof_bytes()));
  9095. } else {
  9096. goto handle_unusual;
  9097. }
  9098. break;
  9099. }
  9100. // optional string oneof_string_cord = 5 [default = "default Cord", ctype = CORD];
  9101. case 5: {
  9102. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9103. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  9104. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  9105. input, this->mutable_oneof_string_cord()));
  9106. } else {
  9107. goto handle_unusual;
  9108. }
  9109. break;
  9110. }
  9111. // optional bytes oneof_bytes_cord = 6 [ctype = CORD];
  9112. case 6: {
  9113. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9114. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  9115. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  9116. input, this->mutable_oneof_bytes_cord()));
  9117. } else {
  9118. goto handle_unusual;
  9119. }
  9120. break;
  9121. }
  9122. // optional string oneof_string_string_piece = 7 [ctype = STRING_PIECE];
  9123. case 7: {
  9124. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9125. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  9126. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  9127. input, this->mutable_oneof_string_string_piece()));
  9128. } else {
  9129. goto handle_unusual;
  9130. }
  9131. break;
  9132. }
  9133. // optional bytes oneof_bytes_string_piece = 8 [default = "default StringPiece", ctype = STRING_PIECE];
  9134. case 8: {
  9135. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9136. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  9137. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  9138. input, this->mutable_oneof_bytes_string_piece()));
  9139. } else {
  9140. goto handle_unusual;
  9141. }
  9142. break;
  9143. }
  9144. // optional .protobuf_unittest.V2EnumLite oneof_enum = 9;
  9145. case 9: {
  9146. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9147. static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
  9148. int value;
  9149. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  9150. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  9151. input, &value)));
  9152. if (::protobuf_unittest::V2EnumLite_IsValid(value)) {
  9153. set_oneof_enum(static_cast< ::protobuf_unittest::V2EnumLite >(value));
  9154. } else {
  9155. unknown_fields_stream.WriteVarint32(72u);
  9156. unknown_fields_stream.WriteVarint32(
  9157. static_cast< ::google::protobuf::uint32>(value));
  9158. }
  9159. } else {
  9160. goto handle_unusual;
  9161. }
  9162. break;
  9163. }
  9164. default: {
  9165. handle_unusual:
  9166. if (tag == 0) {
  9167. goto success;
  9168. }
  9169. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  9170. input, tag, &unknown_fields_stream));
  9171. break;
  9172. }
  9173. }
  9174. }
  9175. success:
  9176. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestOneofParsingLite)
  9177. return true;
  9178. failure:
  9179. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneofParsingLite)
  9180. return false;
  9181. #undef DO_
  9182. }
  9183. void TestOneofParsingLite::SerializeWithCachedSizes(
  9184. ::google::protobuf::io::CodedOutputStream* output) const {
  9185. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestOneofParsingLite)
  9186. ::google::protobuf::uint32 cached_has_bits = 0;
  9187. (void) cached_has_bits;
  9188. switch (oneof_field_case()) {
  9189. case kOneofInt32:
  9190. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->oneof_int32(), output);
  9191. break;
  9192. case kOneofSubmessage:
  9193. ::google::protobuf::internal::WireFormatLite::WriteMessage(
  9194. 2, this->_internal_oneof_submessage(), output);
  9195. break;
  9196. case kOneofString:
  9197. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  9198. 3, this->oneof_string(), output);
  9199. break;
  9200. case kOneofBytes:
  9201. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  9202. 4, this->oneof_bytes(), output);
  9203. break;
  9204. case kOneofStringCord:
  9205. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  9206. 5, this->oneof_string_cord(), output);
  9207. break;
  9208. case kOneofBytesCord:
  9209. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  9210. 6, this->oneof_bytes_cord(), output);
  9211. break;
  9212. case kOneofStringStringPiece:
  9213. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  9214. 7, this->oneof_string_string_piece(), output);
  9215. break;
  9216. case kOneofBytesStringPiece:
  9217. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  9218. 8, this->oneof_bytes_string_piece(), output);
  9219. break;
  9220. case kOneofEnum:
  9221. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  9222. 9, this->oneof_enum(), output);
  9223. break;
  9224. default: ;
  9225. }
  9226. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  9227. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  9228. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneofParsingLite)
  9229. }
  9230. size_t TestOneofParsingLite::ByteSizeLong() const {
  9231. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneofParsingLite)
  9232. size_t total_size = 0;
  9233. total_size += _internal_metadata_.unknown_fields().size();
  9234. switch (oneof_field_case()) {
  9235. // optional int32 oneof_int32 = 1;
  9236. case kOneofInt32: {
  9237. total_size += 1 +
  9238. ::google::protobuf::internal::WireFormatLite::Int32Size(
  9239. this->oneof_int32());
  9240. break;
  9241. }
  9242. // optional .protobuf_unittest.TestAllTypesLite oneof_submessage = 2;
  9243. case kOneofSubmessage: {
  9244. total_size += 1 +
  9245. ::google::protobuf::internal::WireFormatLite::MessageSize(
  9246. *oneof_field_.oneof_submessage_);
  9247. break;
  9248. }
  9249. // optional string oneof_string = 3;
  9250. case kOneofString: {
  9251. total_size += 1 +
  9252. ::google::protobuf::internal::WireFormatLite::StringSize(
  9253. this->oneof_string());
  9254. break;
  9255. }
  9256. // optional bytes oneof_bytes = 4 [default = "default bytes"];
  9257. case kOneofBytes: {
  9258. total_size += 1 +
  9259. ::google::protobuf::internal::WireFormatLite::BytesSize(
  9260. this->oneof_bytes());
  9261. break;
  9262. }
  9263. // optional string oneof_string_cord = 5 [default = "default Cord", ctype = CORD];
  9264. case kOneofStringCord: {
  9265. total_size += 1 +
  9266. ::google::protobuf::internal::WireFormatLite::StringSize(
  9267. this->oneof_string_cord());
  9268. break;
  9269. }
  9270. // optional bytes oneof_bytes_cord = 6 [ctype = CORD];
  9271. case kOneofBytesCord: {
  9272. total_size += 1 +
  9273. ::google::protobuf::internal::WireFormatLite::BytesSize(
  9274. this->oneof_bytes_cord());
  9275. break;
  9276. }
  9277. // optional string oneof_string_string_piece = 7 [ctype = STRING_PIECE];
  9278. case kOneofStringStringPiece: {
  9279. total_size += 1 +
  9280. ::google::protobuf::internal::WireFormatLite::StringSize(
  9281. this->oneof_string_string_piece());
  9282. break;
  9283. }
  9284. // optional bytes oneof_bytes_string_piece = 8 [default = "default StringPiece", ctype = STRING_PIECE];
  9285. case kOneofBytesStringPiece: {
  9286. total_size += 1 +
  9287. ::google::protobuf::internal::WireFormatLite::BytesSize(
  9288. this->oneof_bytes_string_piece());
  9289. break;
  9290. }
  9291. // optional .protobuf_unittest.V2EnumLite oneof_enum = 9;
  9292. case kOneofEnum: {
  9293. total_size += 1 +
  9294. ::google::protobuf::internal::WireFormatLite::EnumSize(this->oneof_enum());
  9295. break;
  9296. }
  9297. case ONEOF_FIELD_NOT_SET: {
  9298. break;
  9299. }
  9300. }
  9301. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  9302. SetCachedSize(cached_size);
  9303. return total_size;
  9304. }
  9305. void TestOneofParsingLite::CheckTypeAndMergeFrom(
  9306. const ::google::protobuf::MessageLite& from) {
  9307. MergeFrom(*::google::protobuf::down_cast<const TestOneofParsingLite*>(&from));
  9308. }
  9309. void TestOneofParsingLite::MergeFrom(const TestOneofParsingLite& from) {
  9310. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestOneofParsingLite)
  9311. GOOGLE_DCHECK_NE(&from, this);
  9312. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9313. ::google::protobuf::uint32 cached_has_bits = 0;
  9314. (void) cached_has_bits;
  9315. switch (from.oneof_field_case()) {
  9316. case kOneofInt32: {
  9317. set_oneof_int32(from.oneof_int32());
  9318. break;
  9319. }
  9320. case kOneofSubmessage: {
  9321. mutable_oneof_submessage()->::protobuf_unittest::TestAllTypesLite::MergeFrom(from.oneof_submessage());
  9322. break;
  9323. }
  9324. case kOneofString: {
  9325. set_oneof_string(from.oneof_string());
  9326. break;
  9327. }
  9328. case kOneofBytes: {
  9329. set_oneof_bytes(from.oneof_bytes());
  9330. break;
  9331. }
  9332. case kOneofStringCord: {
  9333. set_oneof_string_cord(from.oneof_string_cord());
  9334. break;
  9335. }
  9336. case kOneofBytesCord: {
  9337. set_oneof_bytes_cord(from.oneof_bytes_cord());
  9338. break;
  9339. }
  9340. case kOneofStringStringPiece: {
  9341. set_oneof_string_string_piece(from.oneof_string_string_piece());
  9342. break;
  9343. }
  9344. case kOneofBytesStringPiece: {
  9345. set_oneof_bytes_string_piece(from.oneof_bytes_string_piece());
  9346. break;
  9347. }
  9348. case kOneofEnum: {
  9349. set_oneof_enum(from.oneof_enum());
  9350. break;
  9351. }
  9352. case ONEOF_FIELD_NOT_SET: {
  9353. break;
  9354. }
  9355. }
  9356. }
  9357. void TestOneofParsingLite::CopyFrom(const TestOneofParsingLite& from) {
  9358. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneofParsingLite)
  9359. if (&from == this) return;
  9360. Clear();
  9361. MergeFrom(from);
  9362. }
  9363. bool TestOneofParsingLite::IsInitialized() const {
  9364. return true;
  9365. }
  9366. void TestOneofParsingLite::Swap(TestOneofParsingLite* other) {
  9367. if (other == this) return;
  9368. InternalSwap(other);
  9369. }
  9370. void TestOneofParsingLite::InternalSwap(TestOneofParsingLite* other) {
  9371. using std::swap;
  9372. swap(oneof_field_, other->oneof_field_);
  9373. swap(_oneof_case_[0], other->_oneof_case_[0]);
  9374. swap(_has_bits_[0], other->_has_bits_[0]);
  9375. _internal_metadata_.Swap(&other->_internal_metadata_);
  9376. }
  9377. ::std::string TestOneofParsingLite::GetTypeName() const {
  9378. return "protobuf_unittest.TestOneofParsingLite";
  9379. }
  9380. // ===================================================================
  9381. void PackedInt32::InitAsDefaultInstance() {
  9382. }
  9383. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  9384. const int PackedInt32::kRepeatedInt32FieldNumber;
  9385. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9386. PackedInt32::PackedInt32()
  9387. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  9388. ::google::protobuf::internal::InitSCC(
  9389. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_PackedInt32.base);
  9390. SharedCtor();
  9391. // @@protoc_insertion_point(constructor:protobuf_unittest.PackedInt32)
  9392. }
  9393. PackedInt32::PackedInt32(const PackedInt32& from)
  9394. : ::google::protobuf::MessageLite(),
  9395. _internal_metadata_(NULL),
  9396. _has_bits_(from._has_bits_),
  9397. repeated_int32_(from.repeated_int32_) {
  9398. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9399. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.PackedInt32)
  9400. }
  9401. void PackedInt32::SharedCtor() {
  9402. }
  9403. PackedInt32::~PackedInt32() {
  9404. // @@protoc_insertion_point(destructor:protobuf_unittest.PackedInt32)
  9405. SharedDtor();
  9406. }
  9407. void PackedInt32::SharedDtor() {
  9408. }
  9409. void PackedInt32::SetCachedSize(int size) const {
  9410. _cached_size_.Set(size);
  9411. }
  9412. const PackedInt32& PackedInt32::default_instance() {
  9413. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_PackedInt32.base);
  9414. return *internal_default_instance();
  9415. }
  9416. void PackedInt32::Clear() {
  9417. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.PackedInt32)
  9418. ::google::protobuf::uint32 cached_has_bits = 0;
  9419. // Prevent compiler warnings about cached_has_bits being unused
  9420. (void) cached_has_bits;
  9421. repeated_int32_.Clear();
  9422. _has_bits_.Clear();
  9423. _internal_metadata_.Clear();
  9424. }
  9425. bool PackedInt32::MergePartialFromCodedStream(
  9426. ::google::protobuf::io::CodedInputStream* input) {
  9427. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9428. ::google::protobuf::uint32 tag;
  9429. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  9430. &_internal_metadata_);
  9431. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  9432. unknown_fields_setter.buffer());
  9433. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  9434. &unknown_fields_output, false);
  9435. // @@protoc_insertion_point(parse_start:protobuf_unittest.PackedInt32)
  9436. for (;;) {
  9437. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16389u);
  9438. tag = p.first;
  9439. if (!p.second) goto handle_unusual;
  9440. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9441. // repeated int32 repeated_int32 = 2048 [packed = true];
  9442. case 2048: {
  9443. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9444. static_cast< ::google::protobuf::uint8>(2u /* 16386 & 0xFF */)) {
  9445. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  9446. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  9447. input, this->mutable_repeated_int32())));
  9448. } else if (
  9449. static_cast< ::google::protobuf::uint8>(tag) ==
  9450. static_cast< ::google::protobuf::uint8>(0u /* 16384 & 0xFF */)) {
  9451. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  9452. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  9453. 3, 16386u, input, this->mutable_repeated_int32())));
  9454. } else {
  9455. goto handle_unusual;
  9456. }
  9457. break;
  9458. }
  9459. default: {
  9460. handle_unusual:
  9461. if (tag == 0) {
  9462. goto success;
  9463. }
  9464. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  9465. input, tag, &unknown_fields_stream));
  9466. break;
  9467. }
  9468. }
  9469. }
  9470. success:
  9471. // @@protoc_insertion_point(parse_success:protobuf_unittest.PackedInt32)
  9472. return true;
  9473. failure:
  9474. // @@protoc_insertion_point(parse_failure:protobuf_unittest.PackedInt32)
  9475. return false;
  9476. #undef DO_
  9477. }
  9478. void PackedInt32::SerializeWithCachedSizes(
  9479. ::google::protobuf::io::CodedOutputStream* output) const {
  9480. // @@protoc_insertion_point(serialize_start:protobuf_unittest.PackedInt32)
  9481. ::google::protobuf::uint32 cached_has_bits = 0;
  9482. (void) cached_has_bits;
  9483. // repeated int32 repeated_int32 = 2048 [packed = true];
  9484. if (this->repeated_int32_size() > 0) {
  9485. ::google::protobuf::internal::WireFormatLite::WriteTag(2048, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  9486. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  9487. _repeated_int32_cached_byte_size_));
  9488. }
  9489. for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
  9490. ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
  9491. this->repeated_int32(i), output);
  9492. }
  9493. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  9494. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  9495. // @@protoc_insertion_point(serialize_end:protobuf_unittest.PackedInt32)
  9496. }
  9497. size_t PackedInt32::ByteSizeLong() const {
  9498. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.PackedInt32)
  9499. size_t total_size = 0;
  9500. total_size += _internal_metadata_.unknown_fields().size();
  9501. // repeated int32 repeated_int32 = 2048 [packed = true];
  9502. {
  9503. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  9504. Int32Size(this->repeated_int32_);
  9505. if (data_size > 0) {
  9506. total_size += 3 +
  9507. ::google::protobuf::internal::WireFormatLite::Int32Size(
  9508. static_cast< ::google::protobuf::int32>(data_size));
  9509. }
  9510. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  9511. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  9512. _repeated_int32_cached_byte_size_ = cached_size;
  9513. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  9514. total_size += data_size;
  9515. }
  9516. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  9517. SetCachedSize(cached_size);
  9518. return total_size;
  9519. }
  9520. void PackedInt32::CheckTypeAndMergeFrom(
  9521. const ::google::protobuf::MessageLite& from) {
  9522. MergeFrom(*::google::protobuf::down_cast<const PackedInt32*>(&from));
  9523. }
  9524. void PackedInt32::MergeFrom(const PackedInt32& from) {
  9525. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.PackedInt32)
  9526. GOOGLE_DCHECK_NE(&from, this);
  9527. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9528. ::google::protobuf::uint32 cached_has_bits = 0;
  9529. (void) cached_has_bits;
  9530. repeated_int32_.MergeFrom(from.repeated_int32_);
  9531. }
  9532. void PackedInt32::CopyFrom(const PackedInt32& from) {
  9533. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.PackedInt32)
  9534. if (&from == this) return;
  9535. Clear();
  9536. MergeFrom(from);
  9537. }
  9538. bool PackedInt32::IsInitialized() const {
  9539. return true;
  9540. }
  9541. void PackedInt32::Swap(PackedInt32* other) {
  9542. if (other == this) return;
  9543. InternalSwap(other);
  9544. }
  9545. void PackedInt32::InternalSwap(PackedInt32* other) {
  9546. using std::swap;
  9547. repeated_int32_.InternalSwap(&other->repeated_int32_);
  9548. swap(_has_bits_[0], other->_has_bits_[0]);
  9549. _internal_metadata_.Swap(&other->_internal_metadata_);
  9550. }
  9551. ::std::string PackedInt32::GetTypeName() const {
  9552. return "protobuf_unittest.PackedInt32";
  9553. }
  9554. // ===================================================================
  9555. void NonPackedInt32::InitAsDefaultInstance() {
  9556. }
  9557. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  9558. const int NonPackedInt32::kRepeatedInt32FieldNumber;
  9559. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9560. NonPackedInt32::NonPackedInt32()
  9561. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  9562. ::google::protobuf::internal::InitSCC(
  9563. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_NonPackedInt32.base);
  9564. SharedCtor();
  9565. // @@protoc_insertion_point(constructor:protobuf_unittest.NonPackedInt32)
  9566. }
  9567. NonPackedInt32::NonPackedInt32(const NonPackedInt32& from)
  9568. : ::google::protobuf::MessageLite(),
  9569. _internal_metadata_(NULL),
  9570. _has_bits_(from._has_bits_),
  9571. repeated_int32_(from.repeated_int32_) {
  9572. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9573. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.NonPackedInt32)
  9574. }
  9575. void NonPackedInt32::SharedCtor() {
  9576. }
  9577. NonPackedInt32::~NonPackedInt32() {
  9578. // @@protoc_insertion_point(destructor:protobuf_unittest.NonPackedInt32)
  9579. SharedDtor();
  9580. }
  9581. void NonPackedInt32::SharedDtor() {
  9582. }
  9583. void NonPackedInt32::SetCachedSize(int size) const {
  9584. _cached_size_.Set(size);
  9585. }
  9586. const NonPackedInt32& NonPackedInt32::default_instance() {
  9587. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_NonPackedInt32.base);
  9588. return *internal_default_instance();
  9589. }
  9590. void NonPackedInt32::Clear() {
  9591. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.NonPackedInt32)
  9592. ::google::protobuf::uint32 cached_has_bits = 0;
  9593. // Prevent compiler warnings about cached_has_bits being unused
  9594. (void) cached_has_bits;
  9595. repeated_int32_.Clear();
  9596. _has_bits_.Clear();
  9597. _internal_metadata_.Clear();
  9598. }
  9599. bool NonPackedInt32::MergePartialFromCodedStream(
  9600. ::google::protobuf::io::CodedInputStream* input) {
  9601. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9602. ::google::protobuf::uint32 tag;
  9603. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  9604. &_internal_metadata_);
  9605. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  9606. unknown_fields_setter.buffer());
  9607. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  9608. &unknown_fields_output, false);
  9609. // @@protoc_insertion_point(parse_start:protobuf_unittest.NonPackedInt32)
  9610. for (;;) {
  9611. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16389u);
  9612. tag = p.first;
  9613. if (!p.second) goto handle_unusual;
  9614. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9615. // repeated int32 repeated_int32 = 2048;
  9616. case 2048: {
  9617. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9618. static_cast< ::google::protobuf::uint8>(0u /* 16384 & 0xFF */)) {
  9619. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  9620. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  9621. 3, 16384u, input, this->mutable_repeated_int32())));
  9622. } else if (
  9623. static_cast< ::google::protobuf::uint8>(tag) ==
  9624. static_cast< ::google::protobuf::uint8>(2u /* 16386 & 0xFF */)) {
  9625. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  9626. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  9627. input, this->mutable_repeated_int32())));
  9628. } else {
  9629. goto handle_unusual;
  9630. }
  9631. break;
  9632. }
  9633. default: {
  9634. handle_unusual:
  9635. if (tag == 0) {
  9636. goto success;
  9637. }
  9638. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  9639. input, tag, &unknown_fields_stream));
  9640. break;
  9641. }
  9642. }
  9643. }
  9644. success:
  9645. // @@protoc_insertion_point(parse_success:protobuf_unittest.NonPackedInt32)
  9646. return true;
  9647. failure:
  9648. // @@protoc_insertion_point(parse_failure:protobuf_unittest.NonPackedInt32)
  9649. return false;
  9650. #undef DO_
  9651. }
  9652. void NonPackedInt32::SerializeWithCachedSizes(
  9653. ::google::protobuf::io::CodedOutputStream* output) const {
  9654. // @@protoc_insertion_point(serialize_start:protobuf_unittest.NonPackedInt32)
  9655. ::google::protobuf::uint32 cached_has_bits = 0;
  9656. (void) cached_has_bits;
  9657. // repeated int32 repeated_int32 = 2048;
  9658. for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
  9659. ::google::protobuf::internal::WireFormatLite::WriteInt32(
  9660. 2048, this->repeated_int32(i), output);
  9661. }
  9662. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  9663. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  9664. // @@protoc_insertion_point(serialize_end:protobuf_unittest.NonPackedInt32)
  9665. }
  9666. size_t NonPackedInt32::ByteSizeLong() const {
  9667. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.NonPackedInt32)
  9668. size_t total_size = 0;
  9669. total_size += _internal_metadata_.unknown_fields().size();
  9670. // repeated int32 repeated_int32 = 2048;
  9671. {
  9672. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  9673. Int32Size(this->repeated_int32_);
  9674. total_size += 3 *
  9675. ::google::protobuf::internal::FromIntSize(this->repeated_int32_size());
  9676. total_size += data_size;
  9677. }
  9678. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  9679. SetCachedSize(cached_size);
  9680. return total_size;
  9681. }
  9682. void NonPackedInt32::CheckTypeAndMergeFrom(
  9683. const ::google::protobuf::MessageLite& from) {
  9684. MergeFrom(*::google::protobuf::down_cast<const NonPackedInt32*>(&from));
  9685. }
  9686. void NonPackedInt32::MergeFrom(const NonPackedInt32& from) {
  9687. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.NonPackedInt32)
  9688. GOOGLE_DCHECK_NE(&from, this);
  9689. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9690. ::google::protobuf::uint32 cached_has_bits = 0;
  9691. (void) cached_has_bits;
  9692. repeated_int32_.MergeFrom(from.repeated_int32_);
  9693. }
  9694. void NonPackedInt32::CopyFrom(const NonPackedInt32& from) {
  9695. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.NonPackedInt32)
  9696. if (&from == this) return;
  9697. Clear();
  9698. MergeFrom(from);
  9699. }
  9700. bool NonPackedInt32::IsInitialized() const {
  9701. return true;
  9702. }
  9703. void NonPackedInt32::Swap(NonPackedInt32* other) {
  9704. if (other == this) return;
  9705. InternalSwap(other);
  9706. }
  9707. void NonPackedInt32::InternalSwap(NonPackedInt32* other) {
  9708. using std::swap;
  9709. repeated_int32_.InternalSwap(&other->repeated_int32_);
  9710. swap(_has_bits_[0], other->_has_bits_[0]);
  9711. _internal_metadata_.Swap(&other->_internal_metadata_);
  9712. }
  9713. ::std::string NonPackedInt32::GetTypeName() const {
  9714. return "protobuf_unittest.NonPackedInt32";
  9715. }
  9716. // ===================================================================
  9717. void PackedFixed32::InitAsDefaultInstance() {
  9718. }
  9719. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  9720. const int PackedFixed32::kRepeatedFixed32FieldNumber;
  9721. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9722. PackedFixed32::PackedFixed32()
  9723. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  9724. ::google::protobuf::internal::InitSCC(
  9725. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_PackedFixed32.base);
  9726. SharedCtor();
  9727. // @@protoc_insertion_point(constructor:protobuf_unittest.PackedFixed32)
  9728. }
  9729. PackedFixed32::PackedFixed32(const PackedFixed32& from)
  9730. : ::google::protobuf::MessageLite(),
  9731. _internal_metadata_(NULL),
  9732. _has_bits_(from._has_bits_),
  9733. repeated_fixed32_(from.repeated_fixed32_) {
  9734. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9735. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.PackedFixed32)
  9736. }
  9737. void PackedFixed32::SharedCtor() {
  9738. }
  9739. PackedFixed32::~PackedFixed32() {
  9740. // @@protoc_insertion_point(destructor:protobuf_unittest.PackedFixed32)
  9741. SharedDtor();
  9742. }
  9743. void PackedFixed32::SharedDtor() {
  9744. }
  9745. void PackedFixed32::SetCachedSize(int size) const {
  9746. _cached_size_.Set(size);
  9747. }
  9748. const PackedFixed32& PackedFixed32::default_instance() {
  9749. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_PackedFixed32.base);
  9750. return *internal_default_instance();
  9751. }
  9752. void PackedFixed32::Clear() {
  9753. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.PackedFixed32)
  9754. ::google::protobuf::uint32 cached_has_bits = 0;
  9755. // Prevent compiler warnings about cached_has_bits being unused
  9756. (void) cached_has_bits;
  9757. repeated_fixed32_.Clear();
  9758. _has_bits_.Clear();
  9759. _internal_metadata_.Clear();
  9760. }
  9761. bool PackedFixed32::MergePartialFromCodedStream(
  9762. ::google::protobuf::io::CodedInputStream* input) {
  9763. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9764. ::google::protobuf::uint32 tag;
  9765. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  9766. &_internal_metadata_);
  9767. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  9768. unknown_fields_setter.buffer());
  9769. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  9770. &unknown_fields_output, false);
  9771. // @@protoc_insertion_point(parse_start:protobuf_unittest.PackedFixed32)
  9772. for (;;) {
  9773. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16389u);
  9774. tag = p.first;
  9775. if (!p.second) goto handle_unusual;
  9776. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9777. // repeated fixed32 repeated_fixed32 = 2048 [packed = true];
  9778. case 2048: {
  9779. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9780. static_cast< ::google::protobuf::uint8>(2u /* 16386 & 0xFF */)) {
  9781. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  9782. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  9783. input, this->mutable_repeated_fixed32())));
  9784. } else if (
  9785. static_cast< ::google::protobuf::uint8>(tag) ==
  9786. static_cast< ::google::protobuf::uint8>(5u /* 16389 & 0xFF */)) {
  9787. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  9788. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  9789. 3, 16386u, input, this->mutable_repeated_fixed32())));
  9790. } else {
  9791. goto handle_unusual;
  9792. }
  9793. break;
  9794. }
  9795. default: {
  9796. handle_unusual:
  9797. if (tag == 0) {
  9798. goto success;
  9799. }
  9800. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  9801. input, tag, &unknown_fields_stream));
  9802. break;
  9803. }
  9804. }
  9805. }
  9806. success:
  9807. // @@protoc_insertion_point(parse_success:protobuf_unittest.PackedFixed32)
  9808. return true;
  9809. failure:
  9810. // @@protoc_insertion_point(parse_failure:protobuf_unittest.PackedFixed32)
  9811. return false;
  9812. #undef DO_
  9813. }
  9814. void PackedFixed32::SerializeWithCachedSizes(
  9815. ::google::protobuf::io::CodedOutputStream* output) const {
  9816. // @@protoc_insertion_point(serialize_start:protobuf_unittest.PackedFixed32)
  9817. ::google::protobuf::uint32 cached_has_bits = 0;
  9818. (void) cached_has_bits;
  9819. // repeated fixed32 repeated_fixed32 = 2048 [packed = true];
  9820. if (this->repeated_fixed32_size() > 0) {
  9821. ::google::protobuf::internal::WireFormatLite::WriteTag(2048, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  9822. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  9823. _repeated_fixed32_cached_byte_size_));
  9824. ::google::protobuf::internal::WireFormatLite::WriteFixed32Array(
  9825. this->repeated_fixed32().data(), this->repeated_fixed32_size(), output);
  9826. }
  9827. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  9828. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  9829. // @@protoc_insertion_point(serialize_end:protobuf_unittest.PackedFixed32)
  9830. }
  9831. size_t PackedFixed32::ByteSizeLong() const {
  9832. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.PackedFixed32)
  9833. size_t total_size = 0;
  9834. total_size += _internal_metadata_.unknown_fields().size();
  9835. // repeated fixed32 repeated_fixed32 = 2048 [packed = true];
  9836. {
  9837. unsigned int count = static_cast<unsigned int>(this->repeated_fixed32_size());
  9838. size_t data_size = 4UL * count;
  9839. if (data_size > 0) {
  9840. total_size += 3 +
  9841. ::google::protobuf::internal::WireFormatLite::Int32Size(
  9842. static_cast< ::google::protobuf::int32>(data_size));
  9843. }
  9844. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  9845. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  9846. _repeated_fixed32_cached_byte_size_ = cached_size;
  9847. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  9848. total_size += data_size;
  9849. }
  9850. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  9851. SetCachedSize(cached_size);
  9852. return total_size;
  9853. }
  9854. void PackedFixed32::CheckTypeAndMergeFrom(
  9855. const ::google::protobuf::MessageLite& from) {
  9856. MergeFrom(*::google::protobuf::down_cast<const PackedFixed32*>(&from));
  9857. }
  9858. void PackedFixed32::MergeFrom(const PackedFixed32& from) {
  9859. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.PackedFixed32)
  9860. GOOGLE_DCHECK_NE(&from, this);
  9861. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9862. ::google::protobuf::uint32 cached_has_bits = 0;
  9863. (void) cached_has_bits;
  9864. repeated_fixed32_.MergeFrom(from.repeated_fixed32_);
  9865. }
  9866. void PackedFixed32::CopyFrom(const PackedFixed32& from) {
  9867. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.PackedFixed32)
  9868. if (&from == this) return;
  9869. Clear();
  9870. MergeFrom(from);
  9871. }
  9872. bool PackedFixed32::IsInitialized() const {
  9873. return true;
  9874. }
  9875. void PackedFixed32::Swap(PackedFixed32* other) {
  9876. if (other == this) return;
  9877. InternalSwap(other);
  9878. }
  9879. void PackedFixed32::InternalSwap(PackedFixed32* other) {
  9880. using std::swap;
  9881. repeated_fixed32_.InternalSwap(&other->repeated_fixed32_);
  9882. swap(_has_bits_[0], other->_has_bits_[0]);
  9883. _internal_metadata_.Swap(&other->_internal_metadata_);
  9884. }
  9885. ::std::string PackedFixed32::GetTypeName() const {
  9886. return "protobuf_unittest.PackedFixed32";
  9887. }
  9888. // ===================================================================
  9889. void NonPackedFixed32::InitAsDefaultInstance() {
  9890. }
  9891. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  9892. const int NonPackedFixed32::kRepeatedFixed32FieldNumber;
  9893. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9894. NonPackedFixed32::NonPackedFixed32()
  9895. : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  9896. ::google::protobuf::internal::InitSCC(
  9897. &protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_NonPackedFixed32.base);
  9898. SharedCtor();
  9899. // @@protoc_insertion_point(constructor:protobuf_unittest.NonPackedFixed32)
  9900. }
  9901. NonPackedFixed32::NonPackedFixed32(const NonPackedFixed32& from)
  9902. : ::google::protobuf::MessageLite(),
  9903. _internal_metadata_(NULL),
  9904. _has_bits_(from._has_bits_),
  9905. repeated_fixed32_(from.repeated_fixed32_) {
  9906. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9907. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.NonPackedFixed32)
  9908. }
  9909. void NonPackedFixed32::SharedCtor() {
  9910. }
  9911. NonPackedFixed32::~NonPackedFixed32() {
  9912. // @@protoc_insertion_point(destructor:protobuf_unittest.NonPackedFixed32)
  9913. SharedDtor();
  9914. }
  9915. void NonPackedFixed32::SharedDtor() {
  9916. }
  9917. void NonPackedFixed32::SetCachedSize(int size) const {
  9918. _cached_size_.Set(size);
  9919. }
  9920. const NonPackedFixed32& NonPackedFixed32::default_instance() {
  9921. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5flite_2eproto::scc_info_NonPackedFixed32.base);
  9922. return *internal_default_instance();
  9923. }
  9924. void NonPackedFixed32::Clear() {
  9925. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.NonPackedFixed32)
  9926. ::google::protobuf::uint32 cached_has_bits = 0;
  9927. // Prevent compiler warnings about cached_has_bits being unused
  9928. (void) cached_has_bits;
  9929. repeated_fixed32_.Clear();
  9930. _has_bits_.Clear();
  9931. _internal_metadata_.Clear();
  9932. }
  9933. bool NonPackedFixed32::MergePartialFromCodedStream(
  9934. ::google::protobuf::io::CodedInputStream* input) {
  9935. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9936. ::google::protobuf::uint32 tag;
  9937. ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  9938. &_internal_metadata_);
  9939. ::google::protobuf::io::StringOutputStream unknown_fields_output(
  9940. unknown_fields_setter.buffer());
  9941. ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  9942. &unknown_fields_output, false);
  9943. // @@protoc_insertion_point(parse_start:protobuf_unittest.NonPackedFixed32)
  9944. for (;;) {
  9945. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16389u);
  9946. tag = p.first;
  9947. if (!p.second) goto handle_unusual;
  9948. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9949. // repeated fixed32 repeated_fixed32 = 2048;
  9950. case 2048: {
  9951. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9952. static_cast< ::google::protobuf::uint8>(5u /* 16389 & 0xFF */)) {
  9953. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  9954. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  9955. 3, 16389u, input, this->mutable_repeated_fixed32())));
  9956. } else if (
  9957. static_cast< ::google::protobuf::uint8>(tag) ==
  9958. static_cast< ::google::protobuf::uint8>(2u /* 16386 & 0xFF */)) {
  9959. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  9960. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  9961. input, this->mutable_repeated_fixed32())));
  9962. } else {
  9963. goto handle_unusual;
  9964. }
  9965. break;
  9966. }
  9967. default: {
  9968. handle_unusual:
  9969. if (tag == 0) {
  9970. goto success;
  9971. }
  9972. DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  9973. input, tag, &unknown_fields_stream));
  9974. break;
  9975. }
  9976. }
  9977. }
  9978. success:
  9979. // @@protoc_insertion_point(parse_success:protobuf_unittest.NonPackedFixed32)
  9980. return true;
  9981. failure:
  9982. // @@protoc_insertion_point(parse_failure:protobuf_unittest.NonPackedFixed32)
  9983. return false;
  9984. #undef DO_
  9985. }
  9986. void NonPackedFixed32::SerializeWithCachedSizes(
  9987. ::google::protobuf::io::CodedOutputStream* output) const {
  9988. // @@protoc_insertion_point(serialize_start:protobuf_unittest.NonPackedFixed32)
  9989. ::google::protobuf::uint32 cached_has_bits = 0;
  9990. (void) cached_has_bits;
  9991. // repeated fixed32 repeated_fixed32 = 2048;
  9992. for (int i = 0, n = this->repeated_fixed32_size(); i < n; i++) {
  9993. ::google::protobuf::internal::WireFormatLite::WriteFixed32(
  9994. 2048, this->repeated_fixed32(i), output);
  9995. }
  9996. output->WriteRaw(_internal_metadata_.unknown_fields().data(),
  9997. static_cast<int>(_internal_metadata_.unknown_fields().size()));
  9998. // @@protoc_insertion_point(serialize_end:protobuf_unittest.NonPackedFixed32)
  9999. }
  10000. size_t NonPackedFixed32::ByteSizeLong() const {
  10001. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.NonPackedFixed32)
  10002. size_t total_size = 0;
  10003. total_size += _internal_metadata_.unknown_fields().size();
  10004. // repeated fixed32 repeated_fixed32 = 2048;
  10005. {
  10006. unsigned int count = static_cast<unsigned int>(this->repeated_fixed32_size());
  10007. size_t data_size = 4UL * count;
  10008. total_size += 3 *
  10009. ::google::protobuf::internal::FromIntSize(this->repeated_fixed32_size());
  10010. total_size += data_size;
  10011. }
  10012. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  10013. SetCachedSize(cached_size);
  10014. return total_size;
  10015. }
  10016. void NonPackedFixed32::CheckTypeAndMergeFrom(
  10017. const ::google::protobuf::MessageLite& from) {
  10018. MergeFrom(*::google::protobuf::down_cast<const NonPackedFixed32*>(&from));
  10019. }
  10020. void NonPackedFixed32::MergeFrom(const NonPackedFixed32& from) {
  10021. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.NonPackedFixed32)
  10022. GOOGLE_DCHECK_NE(&from, this);
  10023. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10024. ::google::protobuf::uint32 cached_has_bits = 0;
  10025. (void) cached_has_bits;
  10026. repeated_fixed32_.MergeFrom(from.repeated_fixed32_);
  10027. }
  10028. void NonPackedFixed32::CopyFrom(const NonPackedFixed32& from) {
  10029. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.NonPackedFixed32)
  10030. if (&from == this) return;
  10031. Clear();
  10032. MergeFrom(from);
  10033. }
  10034. bool NonPackedFixed32::IsInitialized() const {
  10035. return true;
  10036. }
  10037. void NonPackedFixed32::Swap(NonPackedFixed32* other) {
  10038. if (other == this) return;
  10039. InternalSwap(other);
  10040. }
  10041. void NonPackedFixed32::InternalSwap(NonPackedFixed32* other) {
  10042. using std::swap;
  10043. repeated_fixed32_.InternalSwap(&other->repeated_fixed32_);
  10044. swap(_has_bits_[0], other->_has_bits_[0]);
  10045. _internal_metadata_.Swap(&other->_internal_metadata_);
  10046. }
  10047. ::std::string NonPackedFixed32::GetTypeName() const {
  10048. return "protobuf_unittest.NonPackedFixed32";
  10049. }
  10050. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  10051. const int TestNestedExtensionLite::kNestedExtensionFieldNumber;
  10052. #endif
  10053. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10054. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  10055. TestNestedExtensionLite::nested_extension(kNestedExtensionFieldNumber, 0);
  10056. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  10057. const int TestParsingMergeLite::kOptionalExtFieldNumber;
  10058. #endif
  10059. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestParsingMergeLite,
  10060. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypesLite >, 11, false >
  10061. TestParsingMergeLite::optional_ext(kOptionalExtFieldNumber, *::protobuf_unittest::TestAllTypesLite::internal_default_instance());
  10062. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  10063. const int TestParsingMergeLite::kRepeatedExtFieldNumber;
  10064. #endif
  10065. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestParsingMergeLite,
  10066. ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::TestAllTypesLite >, 11, false >
  10067. TestParsingMergeLite::repeated_ext(kRepeatedExtFieldNumber, *::protobuf_unittest::TestAllTypesLite::internal_default_instance());
  10068. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10069. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  10070. optional_int32_extension_lite(kOptionalInt32ExtensionLiteFieldNumber, 0);
  10071. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10072. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 3, false >
  10073. optional_int64_extension_lite(kOptionalInt64ExtensionLiteFieldNumber, GOOGLE_LONGLONG(0));
  10074. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10075. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  10076. optional_uint32_extension_lite(kOptionalUint32ExtensionLiteFieldNumber, 0u);
  10077. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10078. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  10079. optional_uint64_extension_lite(kOptionalUint64ExtensionLiteFieldNumber, GOOGLE_ULONGLONG(0));
  10080. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10081. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 17, false >
  10082. optional_sint32_extension_lite(kOptionalSint32ExtensionLiteFieldNumber, 0);
  10083. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10084. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  10085. optional_sint64_extension_lite(kOptionalSint64ExtensionLiteFieldNumber, GOOGLE_LONGLONG(0));
  10086. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10087. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, false >
  10088. optional_fixed32_extension_lite(kOptionalFixed32ExtensionLiteFieldNumber, 0u);
  10089. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10090. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  10091. optional_fixed64_extension_lite(kOptionalFixed64ExtensionLiteFieldNumber, GOOGLE_ULONGLONG(0));
  10092. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10093. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  10094. optional_sfixed32_extension_lite(kOptionalSfixed32ExtensionLiteFieldNumber, 0);
  10095. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10096. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 16, false >
  10097. optional_sfixed64_extension_lite(kOptionalSfixed64ExtensionLiteFieldNumber, GOOGLE_LONGLONG(0));
  10098. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10099. ::google::protobuf::internal::PrimitiveTypeTraits< float >, 2, false >
  10100. optional_float_extension_lite(kOptionalFloatExtensionLiteFieldNumber, 0);
  10101. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10102. ::google::protobuf::internal::PrimitiveTypeTraits< double >, 1, false >
  10103. optional_double_extension_lite(kOptionalDoubleExtensionLiteFieldNumber, 0);
  10104. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10105. ::google::protobuf::internal::PrimitiveTypeTraits< bool >, 8, false >
  10106. optional_bool_extension_lite(kOptionalBoolExtensionLiteFieldNumber, false);
  10107. const ::std::string optional_string_extension_lite_default("");
  10108. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10109. ::google::protobuf::internal::StringTypeTraits, 9, false >
  10110. optional_string_extension_lite(kOptionalStringExtensionLiteFieldNumber, optional_string_extension_lite_default);
  10111. const ::std::string optional_bytes_extension_lite_default("");
  10112. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10113. ::google::protobuf::internal::StringTypeTraits, 12, false >
  10114. optional_bytes_extension_lite(kOptionalBytesExtensionLiteFieldNumber, optional_bytes_extension_lite_default);
  10115. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10116. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::OptionalGroup_extension_lite >, 10, false >
  10117. optionalgroup_extension_lite(kOptionalgroupExtensionLiteFieldNumber, *::protobuf_unittest::OptionalGroup_extension_lite::internal_default_instance());
  10118. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10119. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypesLite_NestedMessage >, 11, false >
  10120. optional_nested_message_extension_lite(kOptionalNestedMessageExtensionLiteFieldNumber, *::protobuf_unittest::TestAllTypesLite_NestedMessage::internal_default_instance());
  10121. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10122. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ForeignMessageLite >, 11, false >
  10123. optional_foreign_message_extension_lite(kOptionalForeignMessageExtensionLiteFieldNumber, *::protobuf_unittest::ForeignMessageLite::internal_default_instance());
  10124. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10125. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest_import::ImportMessageLite >, 11, false >
  10126. optional_import_message_extension_lite(kOptionalImportMessageExtensionLiteFieldNumber, *::protobuf_unittest_import::ImportMessageLite::internal_default_instance());
  10127. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10128. ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::TestAllTypesLite_NestedEnum, ::protobuf_unittest::TestAllTypesLite_NestedEnum_IsValid>, 14, false >
  10129. optional_nested_enum_extension_lite(kOptionalNestedEnumExtensionLiteFieldNumber, static_cast< ::protobuf_unittest::TestAllTypesLite_NestedEnum >(1));
  10130. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10131. ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::ForeignEnumLite, ::protobuf_unittest::ForeignEnumLite_IsValid>, 14, false >
  10132. optional_foreign_enum_extension_lite(kOptionalForeignEnumExtensionLiteFieldNumber, static_cast< ::protobuf_unittest::ForeignEnumLite >(4));
  10133. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10134. ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest_import::ImportEnumLite, ::protobuf_unittest_import::ImportEnumLite_IsValid>, 14, false >
  10135. optional_import_enum_extension_lite(kOptionalImportEnumExtensionLiteFieldNumber, static_cast< ::protobuf_unittest_import::ImportEnumLite >(7));
  10136. const ::std::string optional_string_piece_extension_lite_default("");
  10137. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10138. ::google::protobuf::internal::StringTypeTraits, 9, false >
  10139. optional_string_piece_extension_lite(kOptionalStringPieceExtensionLiteFieldNumber, optional_string_piece_extension_lite_default);
  10140. const ::std::string optional_cord_extension_lite_default("");
  10141. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10142. ::google::protobuf::internal::StringTypeTraits, 9, false >
  10143. optional_cord_extension_lite(kOptionalCordExtensionLiteFieldNumber, optional_cord_extension_lite_default);
  10144. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10145. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest_import::PublicImportMessageLite >, 11, false >
  10146. optional_public_import_message_extension_lite(kOptionalPublicImportMessageExtensionLiteFieldNumber, *::protobuf_unittest_import::PublicImportMessageLite::internal_default_instance());
  10147. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10148. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypesLite_NestedMessage >, 11, false >
  10149. optional_lazy_message_extension_lite(kOptionalLazyMessageExtensionLiteFieldNumber, *::protobuf_unittest::TestAllTypesLite_NestedMessage::internal_default_instance());
  10150. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10151. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  10152. repeated_int32_extension_lite(kRepeatedInt32ExtensionLiteFieldNumber, 0);
  10153. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10154. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 3, false >
  10155. repeated_int64_extension_lite(kRepeatedInt64ExtensionLiteFieldNumber, GOOGLE_LONGLONG(0));
  10156. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10157. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  10158. repeated_uint32_extension_lite(kRepeatedUint32ExtensionLiteFieldNumber, 0u);
  10159. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10160. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  10161. repeated_uint64_extension_lite(kRepeatedUint64ExtensionLiteFieldNumber, GOOGLE_ULONGLONG(0));
  10162. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10163. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 17, false >
  10164. repeated_sint32_extension_lite(kRepeatedSint32ExtensionLiteFieldNumber, 0);
  10165. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10166. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  10167. repeated_sint64_extension_lite(kRepeatedSint64ExtensionLiteFieldNumber, GOOGLE_LONGLONG(0));
  10168. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10169. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, false >
  10170. repeated_fixed32_extension_lite(kRepeatedFixed32ExtensionLiteFieldNumber, 0u);
  10171. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10172. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  10173. repeated_fixed64_extension_lite(kRepeatedFixed64ExtensionLiteFieldNumber, GOOGLE_ULONGLONG(0));
  10174. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10175. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  10176. repeated_sfixed32_extension_lite(kRepeatedSfixed32ExtensionLiteFieldNumber, 0);
  10177. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10178. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 16, false >
  10179. repeated_sfixed64_extension_lite(kRepeatedSfixed64ExtensionLiteFieldNumber, GOOGLE_LONGLONG(0));
  10180. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10181. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< float >, 2, false >
  10182. repeated_float_extension_lite(kRepeatedFloatExtensionLiteFieldNumber, 0);
  10183. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10184. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< double >, 1, false >
  10185. repeated_double_extension_lite(kRepeatedDoubleExtensionLiteFieldNumber, 0);
  10186. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10187. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< bool >, 8, false >
  10188. repeated_bool_extension_lite(kRepeatedBoolExtensionLiteFieldNumber, false);
  10189. const ::std::string repeated_string_extension_lite_default("");
  10190. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10191. ::google::protobuf::internal::RepeatedStringTypeTraits, 9, false >
  10192. repeated_string_extension_lite(kRepeatedStringExtensionLiteFieldNumber, repeated_string_extension_lite_default);
  10193. const ::std::string repeated_bytes_extension_lite_default("");
  10194. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10195. ::google::protobuf::internal::RepeatedStringTypeTraits, 12, false >
  10196. repeated_bytes_extension_lite(kRepeatedBytesExtensionLiteFieldNumber, repeated_bytes_extension_lite_default);
  10197. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10198. ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::RepeatedGroup_extension_lite >, 10, false >
  10199. repeatedgroup_extension_lite(kRepeatedgroupExtensionLiteFieldNumber, *::protobuf_unittest::RepeatedGroup_extension_lite::internal_default_instance());
  10200. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10201. ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::TestAllTypesLite_NestedMessage >, 11, false >
  10202. repeated_nested_message_extension_lite(kRepeatedNestedMessageExtensionLiteFieldNumber, *::protobuf_unittest::TestAllTypesLite_NestedMessage::internal_default_instance());
  10203. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10204. ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::ForeignMessageLite >, 11, false >
  10205. repeated_foreign_message_extension_lite(kRepeatedForeignMessageExtensionLiteFieldNumber, *::protobuf_unittest::ForeignMessageLite::internal_default_instance());
  10206. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10207. ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest_import::ImportMessageLite >, 11, false >
  10208. repeated_import_message_extension_lite(kRepeatedImportMessageExtensionLiteFieldNumber, *::protobuf_unittest_import::ImportMessageLite::internal_default_instance());
  10209. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10210. ::google::protobuf::internal::RepeatedEnumTypeTraits< ::protobuf_unittest::TestAllTypesLite_NestedEnum, ::protobuf_unittest::TestAllTypesLite_NestedEnum_IsValid>, 14, false >
  10211. repeated_nested_enum_extension_lite(kRepeatedNestedEnumExtensionLiteFieldNumber, static_cast< ::protobuf_unittest::TestAllTypesLite_NestedEnum >(1));
  10212. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10213. ::google::protobuf::internal::RepeatedEnumTypeTraits< ::protobuf_unittest::ForeignEnumLite, ::protobuf_unittest::ForeignEnumLite_IsValid>, 14, false >
  10214. repeated_foreign_enum_extension_lite(kRepeatedForeignEnumExtensionLiteFieldNumber, static_cast< ::protobuf_unittest::ForeignEnumLite >(4));
  10215. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10216. ::google::protobuf::internal::RepeatedEnumTypeTraits< ::protobuf_unittest_import::ImportEnumLite, ::protobuf_unittest_import::ImportEnumLite_IsValid>, 14, false >
  10217. repeated_import_enum_extension_lite(kRepeatedImportEnumExtensionLiteFieldNumber, static_cast< ::protobuf_unittest_import::ImportEnumLite >(7));
  10218. const ::std::string repeated_string_piece_extension_lite_default("");
  10219. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10220. ::google::protobuf::internal::RepeatedStringTypeTraits, 9, false >
  10221. repeated_string_piece_extension_lite(kRepeatedStringPieceExtensionLiteFieldNumber, repeated_string_piece_extension_lite_default);
  10222. const ::std::string repeated_cord_extension_lite_default("");
  10223. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10224. ::google::protobuf::internal::RepeatedStringTypeTraits, 9, false >
  10225. repeated_cord_extension_lite(kRepeatedCordExtensionLiteFieldNumber, repeated_cord_extension_lite_default);
  10226. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10227. ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::TestAllTypesLite_NestedMessage >, 11, false >
  10228. repeated_lazy_message_extension_lite(kRepeatedLazyMessageExtensionLiteFieldNumber, *::protobuf_unittest::TestAllTypesLite_NestedMessage::internal_default_instance());
  10229. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10230. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  10231. default_int32_extension_lite(kDefaultInt32ExtensionLiteFieldNumber, 41);
  10232. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10233. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 3, false >
  10234. default_int64_extension_lite(kDefaultInt64ExtensionLiteFieldNumber, GOOGLE_LONGLONG(42));
  10235. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10236. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  10237. default_uint32_extension_lite(kDefaultUint32ExtensionLiteFieldNumber, 43u);
  10238. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10239. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  10240. default_uint64_extension_lite(kDefaultUint64ExtensionLiteFieldNumber, GOOGLE_ULONGLONG(44));
  10241. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10242. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 17, false >
  10243. default_sint32_extension_lite(kDefaultSint32ExtensionLiteFieldNumber, -45);
  10244. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10245. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  10246. default_sint64_extension_lite(kDefaultSint64ExtensionLiteFieldNumber, GOOGLE_LONGLONG(46));
  10247. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10248. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, false >
  10249. default_fixed32_extension_lite(kDefaultFixed32ExtensionLiteFieldNumber, 47u);
  10250. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10251. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  10252. default_fixed64_extension_lite(kDefaultFixed64ExtensionLiteFieldNumber, GOOGLE_ULONGLONG(48));
  10253. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10254. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  10255. default_sfixed32_extension_lite(kDefaultSfixed32ExtensionLiteFieldNumber, 49);
  10256. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10257. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 16, false >
  10258. default_sfixed64_extension_lite(kDefaultSfixed64ExtensionLiteFieldNumber, GOOGLE_LONGLONG(-50));
  10259. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10260. ::google::protobuf::internal::PrimitiveTypeTraits< float >, 2, false >
  10261. default_float_extension_lite(kDefaultFloatExtensionLiteFieldNumber, 51.5f);
  10262. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10263. ::google::protobuf::internal::PrimitiveTypeTraits< double >, 1, false >
  10264. default_double_extension_lite(kDefaultDoubleExtensionLiteFieldNumber, 52000);
  10265. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10266. ::google::protobuf::internal::PrimitiveTypeTraits< bool >, 8, false >
  10267. default_bool_extension_lite(kDefaultBoolExtensionLiteFieldNumber, true);
  10268. const ::std::string default_string_extension_lite_default("hello");
  10269. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10270. ::google::protobuf::internal::StringTypeTraits, 9, false >
  10271. default_string_extension_lite(kDefaultStringExtensionLiteFieldNumber, default_string_extension_lite_default);
  10272. const ::std::string default_bytes_extension_lite_default("world");
  10273. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10274. ::google::protobuf::internal::StringTypeTraits, 12, false >
  10275. default_bytes_extension_lite(kDefaultBytesExtensionLiteFieldNumber, default_bytes_extension_lite_default);
  10276. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10277. ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::TestAllTypesLite_NestedEnum, ::protobuf_unittest::TestAllTypesLite_NestedEnum_IsValid>, 14, false >
  10278. default_nested_enum_extension_lite(kDefaultNestedEnumExtensionLiteFieldNumber, static_cast< ::protobuf_unittest::TestAllTypesLite_NestedEnum >(2));
  10279. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10280. ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::ForeignEnumLite, ::protobuf_unittest::ForeignEnumLite_IsValid>, 14, false >
  10281. default_foreign_enum_extension_lite(kDefaultForeignEnumExtensionLiteFieldNumber, static_cast< ::protobuf_unittest::ForeignEnumLite >(5));
  10282. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10283. ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest_import::ImportEnumLite, ::protobuf_unittest_import::ImportEnumLite_IsValid>, 14, false >
  10284. default_import_enum_extension_lite(kDefaultImportEnumExtensionLiteFieldNumber, static_cast< ::protobuf_unittest_import::ImportEnumLite >(8));
  10285. const ::std::string default_string_piece_extension_lite_default("abc");
  10286. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10287. ::google::protobuf::internal::StringTypeTraits, 9, false >
  10288. default_string_piece_extension_lite(kDefaultStringPieceExtensionLiteFieldNumber, default_string_piece_extension_lite_default);
  10289. const ::std::string default_cord_extension_lite_default("123");
  10290. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10291. ::google::protobuf::internal::StringTypeTraits, 9, false >
  10292. default_cord_extension_lite(kDefaultCordExtensionLiteFieldNumber, default_cord_extension_lite_default);
  10293. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10294. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  10295. oneof_uint32_extension_lite(kOneofUint32ExtensionLiteFieldNumber, 0u);
  10296. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10297. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypesLite_NestedMessage >, 11, false >
  10298. oneof_nested_message_extension_lite(kOneofNestedMessageExtensionLiteFieldNumber, *::protobuf_unittest::TestAllTypesLite_NestedMessage::internal_default_instance());
  10299. const ::std::string oneof_string_extension_lite_default("");
  10300. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10301. ::google::protobuf::internal::StringTypeTraits, 9, false >
  10302. oneof_string_extension_lite(kOneofStringExtensionLiteFieldNumber, oneof_string_extension_lite_default);
  10303. const ::std::string oneof_bytes_extension_lite_default("");
  10304. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensionsLite,
  10305. ::google::protobuf::internal::StringTypeTraits, 12, false >
  10306. oneof_bytes_extension_lite(kOneofBytesExtensionLiteFieldNumber, oneof_bytes_extension_lite_default);
  10307. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensionsLite,
  10308. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 5, true >
  10309. packed_int32_extension_lite(kPackedInt32ExtensionLiteFieldNumber, 0);
  10310. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensionsLite,
  10311. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 3, true >
  10312. packed_int64_extension_lite(kPackedInt64ExtensionLiteFieldNumber, GOOGLE_LONGLONG(0));
  10313. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensionsLite,
  10314. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, true >
  10315. packed_uint32_extension_lite(kPackedUint32ExtensionLiteFieldNumber, 0u);
  10316. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensionsLite,
  10317. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, true >
  10318. packed_uint64_extension_lite(kPackedUint64ExtensionLiteFieldNumber, GOOGLE_ULONGLONG(0));
  10319. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensionsLite,
  10320. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 17, true >
  10321. packed_sint32_extension_lite(kPackedSint32ExtensionLiteFieldNumber, 0);
  10322. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensionsLite,
  10323. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 18, true >
  10324. packed_sint64_extension_lite(kPackedSint64ExtensionLiteFieldNumber, GOOGLE_LONGLONG(0));
  10325. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensionsLite,
  10326. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, true >
  10327. packed_fixed32_extension_lite(kPackedFixed32ExtensionLiteFieldNumber, 0u);
  10328. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensionsLite,
  10329. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, true >
  10330. packed_fixed64_extension_lite(kPackedFixed64ExtensionLiteFieldNumber, GOOGLE_ULONGLONG(0));
  10331. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensionsLite,
  10332. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 15, true >
  10333. packed_sfixed32_extension_lite(kPackedSfixed32ExtensionLiteFieldNumber, 0);
  10334. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensionsLite,
  10335. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 16, true >
  10336. packed_sfixed64_extension_lite(kPackedSfixed64ExtensionLiteFieldNumber, GOOGLE_LONGLONG(0));
  10337. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensionsLite,
  10338. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< float >, 2, true >
  10339. packed_float_extension_lite(kPackedFloatExtensionLiteFieldNumber, 0);
  10340. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensionsLite,
  10341. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< double >, 1, true >
  10342. packed_double_extension_lite(kPackedDoubleExtensionLiteFieldNumber, 0);
  10343. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensionsLite,
  10344. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< bool >, 8, true >
  10345. packed_bool_extension_lite(kPackedBoolExtensionLiteFieldNumber, false);
  10346. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensionsLite,
  10347. ::google::protobuf::internal::RepeatedEnumTypeTraits< ::protobuf_unittest::ForeignEnumLite, ::protobuf_unittest::ForeignEnumLite_IsValid>, 14, true >
  10348. packed_enum_extension_lite(kPackedEnumExtensionLiteFieldNumber, static_cast< ::protobuf_unittest::ForeignEnumLite >(4));
  10349. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestHugeFieldNumbersLite,
  10350. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypesLite >, 11, false >
  10351. test_all_types_lite(kTestAllTypesLiteFieldNumber, *::protobuf_unittest::TestAllTypesLite::internal_default_instance());
  10352. // @@protoc_insertion_point(namespace_scope)
  10353. } // namespace protobuf_unittest
  10354. namespace google {
  10355. namespace protobuf {
  10356. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllTypesLite_NestedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllTypesLite_NestedMessage >(Arena* arena) {
  10357. return Arena::CreateInternal< ::protobuf_unittest::TestAllTypesLite_NestedMessage >(arena);
  10358. }
  10359. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllTypesLite_OptionalGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllTypesLite_OptionalGroup >(Arena* arena) {
  10360. return Arena::CreateInternal< ::protobuf_unittest::TestAllTypesLite_OptionalGroup >(arena);
  10361. }
  10362. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllTypesLite_RepeatedGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllTypesLite_RepeatedGroup >(Arena* arena) {
  10363. return Arena::CreateInternal< ::protobuf_unittest::TestAllTypesLite_RepeatedGroup >(arena);
  10364. }
  10365. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllTypesLite* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllTypesLite >(Arena* arena) {
  10366. return Arena::CreateInternal< ::protobuf_unittest::TestAllTypesLite >(arena);
  10367. }
  10368. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::ForeignMessageLite* Arena::CreateMaybeMessage< ::protobuf_unittest::ForeignMessageLite >(Arena* arena) {
  10369. return Arena::CreateInternal< ::protobuf_unittest::ForeignMessageLite >(arena);
  10370. }
  10371. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestPackedTypesLite* Arena::CreateMaybeMessage< ::protobuf_unittest::TestPackedTypesLite >(Arena* arena) {
  10372. return Arena::CreateInternal< ::protobuf_unittest::TestPackedTypesLite >(arena);
  10373. }
  10374. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllExtensionsLite* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllExtensionsLite >(Arena* arena) {
  10375. return Arena::CreateInternal< ::protobuf_unittest::TestAllExtensionsLite >(arena);
  10376. }
  10377. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::OptionalGroup_extension_lite* Arena::CreateMaybeMessage< ::protobuf_unittest::OptionalGroup_extension_lite >(Arena* arena) {
  10378. return Arena::CreateInternal< ::protobuf_unittest::OptionalGroup_extension_lite >(arena);
  10379. }
  10380. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::RepeatedGroup_extension_lite* Arena::CreateMaybeMessage< ::protobuf_unittest::RepeatedGroup_extension_lite >(Arena* arena) {
  10381. return Arena::CreateInternal< ::protobuf_unittest::RepeatedGroup_extension_lite >(arena);
  10382. }
  10383. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestPackedExtensionsLite* Arena::CreateMaybeMessage< ::protobuf_unittest::TestPackedExtensionsLite >(Arena* arena) {
  10384. return Arena::CreateInternal< ::protobuf_unittest::TestPackedExtensionsLite >(arena);
  10385. }
  10386. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestNestedExtensionLite* Arena::CreateMaybeMessage< ::protobuf_unittest::TestNestedExtensionLite >(Arena* arena) {
  10387. return Arena::CreateInternal< ::protobuf_unittest::TestNestedExtensionLite >(arena);
  10388. }
  10389. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDeprecatedLite* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDeprecatedLite >(Arena* arena) {
  10390. return Arena::CreateInternal< ::protobuf_unittest::TestDeprecatedLite >(arena);
  10391. }
  10392. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator_Group1* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator_Group1 >(Arena* arena) {
  10393. return Arena::CreateInternal< ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator_Group1 >(arena);
  10394. }
  10395. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator_Group2* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator_Group2 >(Arena* arena) {
  10396. return Arena::CreateInternal< ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator_Group2 >(arena);
  10397. }
  10398. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator >(Arena* arena) {
  10399. return Arena::CreateInternal< ::protobuf_unittest::TestParsingMergeLite_RepeatedFieldsGenerator >(arena);
  10400. }
  10401. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMergeLite_OptionalGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMergeLite_OptionalGroup >(Arena* arena) {
  10402. return Arena::CreateInternal< ::protobuf_unittest::TestParsingMergeLite_OptionalGroup >(arena);
  10403. }
  10404. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMergeLite_RepeatedGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMergeLite_RepeatedGroup >(Arena* arena) {
  10405. return Arena::CreateInternal< ::protobuf_unittest::TestParsingMergeLite_RepeatedGroup >(arena);
  10406. }
  10407. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMergeLite* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMergeLite >(Arena* arena) {
  10408. return Arena::CreateInternal< ::protobuf_unittest::TestParsingMergeLite >(arena);
  10409. }
  10410. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestEmptyMessageLite* Arena::CreateMaybeMessage< ::protobuf_unittest::TestEmptyMessageLite >(Arena* arena) {
  10411. return Arena::CreateInternal< ::protobuf_unittest::TestEmptyMessageLite >(arena);
  10412. }
  10413. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestEmptyMessageWithExtensionsLite* Arena::CreateMaybeMessage< ::protobuf_unittest::TestEmptyMessageWithExtensionsLite >(Arena* arena) {
  10414. return Arena::CreateInternal< ::protobuf_unittest::TestEmptyMessageWithExtensionsLite >(arena);
  10415. }
  10416. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::V1MessageLite* Arena::CreateMaybeMessage< ::protobuf_unittest::V1MessageLite >(Arena* arena) {
  10417. return Arena::CreateInternal< ::protobuf_unittest::V1MessageLite >(arena);
  10418. }
  10419. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::V2MessageLite* Arena::CreateMaybeMessage< ::protobuf_unittest::V2MessageLite >(Arena* arena) {
  10420. return Arena::CreateInternal< ::protobuf_unittest::V2MessageLite >(arena);
  10421. }
  10422. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestHugeFieldNumbersLite_OptionalGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestHugeFieldNumbersLite_OptionalGroup >(Arena* arena) {
  10423. return Arena::CreateInternal< ::protobuf_unittest::TestHugeFieldNumbersLite_OptionalGroup >(arena);
  10424. }
  10425. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse >(Arena* arena) {
  10426. return Arena::CreateInternal< ::protobuf_unittest::TestHugeFieldNumbersLite_StringStringMapEntry_DoNotUse >(arena);
  10427. }
  10428. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestHugeFieldNumbersLite* Arena::CreateMaybeMessage< ::protobuf_unittest::TestHugeFieldNumbersLite >(Arena* arena) {
  10429. return Arena::CreateInternal< ::protobuf_unittest::TestHugeFieldNumbersLite >(arena);
  10430. }
  10431. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneofParsingLite* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneofParsingLite >(Arena* arena) {
  10432. return Arena::CreateInternal< ::protobuf_unittest::TestOneofParsingLite >(arena);
  10433. }
  10434. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::PackedInt32* Arena::CreateMaybeMessage< ::protobuf_unittest::PackedInt32 >(Arena* arena) {
  10435. return Arena::CreateInternal< ::protobuf_unittest::PackedInt32 >(arena);
  10436. }
  10437. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::NonPackedInt32* Arena::CreateMaybeMessage< ::protobuf_unittest::NonPackedInt32 >(Arena* arena) {
  10438. return Arena::CreateInternal< ::protobuf_unittest::NonPackedInt32 >(arena);
  10439. }
  10440. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::PackedFixed32* Arena::CreateMaybeMessage< ::protobuf_unittest::PackedFixed32 >(Arena* arena) {
  10441. return Arena::CreateInternal< ::protobuf_unittest::PackedFixed32 >(arena);
  10442. }
  10443. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::NonPackedFixed32* Arena::CreateMaybeMessage< ::protobuf_unittest::NonPackedFixed32 >(Arena* arena) {
  10444. return Arena::CreateInternal< ::protobuf_unittest::NonPackedFixed32 >(arena);
  10445. }
  10446. } // namespace protobuf
  10447. } // namespace google
  10448. // @@protoc_insertion_point(global_scope)