unittest.pb.cc 1.6 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/unittest.proto
  3. #include <google/protobuf/unittest.pb.h>
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/io/coded_stream.h>
  8. #include <google/protobuf/wire_format_lite_inl.h>
  9. #include <google/protobuf/descriptor.h>
  10. #include <google/protobuf/generated_message_reflection.h>
  11. #include <google/protobuf/reflection_ops.h>
  12. #include <google/protobuf/wire_format.h>
  13. // This is a temporary google only hack
  14. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  15. #include "third_party/protobuf/version.h"
  16. #endif
  17. // @@protoc_insertion_point(includes)
  18. namespace protobuf_google_2fprotobuf_2funittest_2eproto {
  19. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ForeignMessage;
  20. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_OptionalGroup_extension;
  21. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_RepeatedGroup_extension;
  22. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_NestedMessage;
  23. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_OptionalGroup;
  24. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_RepeatedGroup;
  25. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestDupFieldNumber_Bar;
  26. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestDupFieldNumber_Foo;
  27. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestDynamicExtensions_DynamicMessageType;
  28. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestExtensionOrderings1;
  29. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestExtensionOrderings2;
  30. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestExtensionOrderings2_TestExtensionOrderings3;
  31. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestFieldOrderings_NestedMessage;
  32. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestGroup_OptionalGroup;
  33. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestHugeFieldNumbers_OptionalGroup;
  34. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestHugeFieldNumbers_StringStringMapEntry_DoNotUse;
  35. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestIsInitialized_SubMessage_SubGroup;
  36. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestNestedExtension_OptionalGroup_extension;
  37. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestOneof2_FooGroup;
  38. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestOneof2_NestedMessage;
  39. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestOneofBackwardsCompatible_FooGroup;
  40. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestOneof_FooGroup;
  41. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestRecursiveMessage;
  42. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestRequired;
  43. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestRequiredOneof_NestedMessage;
  44. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_NestedTestAllTypes;
  45. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestIsInitialized_SubMessage;
  46. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestMutualRecursionA;
  47. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestNestedMessageHasBits_NestedMessage;
  48. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_OptionalGroup;
  49. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group1;
  50. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group2;
  51. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_RepeatedGroup;
  52. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_2eproto ::google::protobuf::internal::SCCInfo<6> scc_info_TestAllTypes;
  53. } // namespace protobuf_google_2fprotobuf_2funittest_2eproto
  54. namespace protobuf_google_2fprotobuf_2funittest_5fimport_2eproto {
  55. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fimport_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ImportMessage;
  56. } // namespace protobuf_google_2fprotobuf_2funittest_5fimport_2eproto
  57. namespace protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto {
  58. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PublicImportMessage;
  59. } // namespace protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto
  60. namespace protobuf_unittest {
  61. class TestAllTypes_NestedMessageDefaultTypeInternal {
  62. public:
  63. ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes_NestedMessage>
  64. _instance;
  65. } _TestAllTypes_NestedMessage_default_instance_;
  66. class TestAllTypes_OptionalGroupDefaultTypeInternal {
  67. public:
  68. ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes_OptionalGroup>
  69. _instance;
  70. } _TestAllTypes_OptionalGroup_default_instance_;
  71. class TestAllTypes_RepeatedGroupDefaultTypeInternal {
  72. public:
  73. ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes_RepeatedGroup>
  74. _instance;
  75. } _TestAllTypes_RepeatedGroup_default_instance_;
  76. class TestAllTypesDefaultTypeInternal {
  77. public:
  78. ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes>
  79. _instance;
  80. ::google::protobuf::uint32 oneof_uint32_;
  81. const ::protobuf_unittest::TestAllTypes_NestedMessage* oneof_nested_message_;
  82. ::google::protobuf::internal::ArenaStringPtr oneof_string_;
  83. ::google::protobuf::internal::ArenaStringPtr oneof_bytes_;
  84. } _TestAllTypes_default_instance_;
  85. class NestedTestAllTypesDefaultTypeInternal {
  86. public:
  87. ::google::protobuf::internal::ExplicitlyConstructed<NestedTestAllTypes>
  88. _instance;
  89. } _NestedTestAllTypes_default_instance_;
  90. class TestDeprecatedFieldsDefaultTypeInternal {
  91. public:
  92. ::google::protobuf::internal::ExplicitlyConstructed<TestDeprecatedFields>
  93. _instance;
  94. ::google::protobuf::int32 deprecated_int32_in_oneof_;
  95. } _TestDeprecatedFields_default_instance_;
  96. class TestDeprecatedMessageDefaultTypeInternal {
  97. public:
  98. ::google::protobuf::internal::ExplicitlyConstructed<TestDeprecatedMessage>
  99. _instance;
  100. } _TestDeprecatedMessage_default_instance_;
  101. class ForeignMessageDefaultTypeInternal {
  102. public:
  103. ::google::protobuf::internal::ExplicitlyConstructed<ForeignMessage>
  104. _instance;
  105. } _ForeignMessage_default_instance_;
  106. class TestReservedFieldsDefaultTypeInternal {
  107. public:
  108. ::google::protobuf::internal::ExplicitlyConstructed<TestReservedFields>
  109. _instance;
  110. } _TestReservedFields_default_instance_;
  111. class TestAllExtensionsDefaultTypeInternal {
  112. public:
  113. ::google::protobuf::internal::ExplicitlyConstructed<TestAllExtensions>
  114. _instance;
  115. } _TestAllExtensions_default_instance_;
  116. class OptionalGroup_extensionDefaultTypeInternal {
  117. public:
  118. ::google::protobuf::internal::ExplicitlyConstructed<OptionalGroup_extension>
  119. _instance;
  120. } _OptionalGroup_extension_default_instance_;
  121. class RepeatedGroup_extensionDefaultTypeInternal {
  122. public:
  123. ::google::protobuf::internal::ExplicitlyConstructed<RepeatedGroup_extension>
  124. _instance;
  125. } _RepeatedGroup_extension_default_instance_;
  126. class TestGroup_OptionalGroupDefaultTypeInternal {
  127. public:
  128. ::google::protobuf::internal::ExplicitlyConstructed<TestGroup_OptionalGroup>
  129. _instance;
  130. } _TestGroup_OptionalGroup_default_instance_;
  131. class TestGroupDefaultTypeInternal {
  132. public:
  133. ::google::protobuf::internal::ExplicitlyConstructed<TestGroup>
  134. _instance;
  135. } _TestGroup_default_instance_;
  136. class TestGroupExtensionDefaultTypeInternal {
  137. public:
  138. ::google::protobuf::internal::ExplicitlyConstructed<TestGroupExtension>
  139. _instance;
  140. } _TestGroupExtension_default_instance_;
  141. class TestNestedExtension_OptionalGroup_extensionDefaultTypeInternal {
  142. public:
  143. ::google::protobuf::internal::ExplicitlyConstructed<TestNestedExtension_OptionalGroup_extension>
  144. _instance;
  145. } _TestNestedExtension_OptionalGroup_extension_default_instance_;
  146. class TestNestedExtensionDefaultTypeInternal {
  147. public:
  148. ::google::protobuf::internal::ExplicitlyConstructed<TestNestedExtension>
  149. _instance;
  150. } _TestNestedExtension_default_instance_;
  151. class TestRequiredDefaultTypeInternal {
  152. public:
  153. ::google::protobuf::internal::ExplicitlyConstructed<TestRequired>
  154. _instance;
  155. } _TestRequired_default_instance_;
  156. class TestRequiredForeignDefaultTypeInternal {
  157. public:
  158. ::google::protobuf::internal::ExplicitlyConstructed<TestRequiredForeign>
  159. _instance;
  160. } _TestRequiredForeign_default_instance_;
  161. class TestRequiredMessageDefaultTypeInternal {
  162. public:
  163. ::google::protobuf::internal::ExplicitlyConstructed<TestRequiredMessage>
  164. _instance;
  165. } _TestRequiredMessage_default_instance_;
  166. class TestForeignNestedDefaultTypeInternal {
  167. public:
  168. ::google::protobuf::internal::ExplicitlyConstructed<TestForeignNested>
  169. _instance;
  170. } _TestForeignNested_default_instance_;
  171. class TestEmptyMessageDefaultTypeInternal {
  172. public:
  173. ::google::protobuf::internal::ExplicitlyConstructed<TestEmptyMessage>
  174. _instance;
  175. } _TestEmptyMessage_default_instance_;
  176. class TestEmptyMessageWithExtensionsDefaultTypeInternal {
  177. public:
  178. ::google::protobuf::internal::ExplicitlyConstructed<TestEmptyMessageWithExtensions>
  179. _instance;
  180. } _TestEmptyMessageWithExtensions_default_instance_;
  181. class TestMultipleExtensionRangesDefaultTypeInternal {
  182. public:
  183. ::google::protobuf::internal::ExplicitlyConstructed<TestMultipleExtensionRanges>
  184. _instance;
  185. } _TestMultipleExtensionRanges_default_instance_;
  186. class TestReallyLargeTagNumberDefaultTypeInternal {
  187. public:
  188. ::google::protobuf::internal::ExplicitlyConstructed<TestReallyLargeTagNumber>
  189. _instance;
  190. } _TestReallyLargeTagNumber_default_instance_;
  191. class TestRecursiveMessageDefaultTypeInternal {
  192. public:
  193. ::google::protobuf::internal::ExplicitlyConstructed<TestRecursiveMessage>
  194. _instance;
  195. } _TestRecursiveMessage_default_instance_;
  196. class TestMutualRecursionA_SubMessageDefaultTypeInternal {
  197. public:
  198. ::google::protobuf::internal::ExplicitlyConstructed<TestMutualRecursionA_SubMessage>
  199. _instance;
  200. } _TestMutualRecursionA_SubMessage_default_instance_;
  201. class TestMutualRecursionA_SubGroupDefaultTypeInternal {
  202. public:
  203. ::google::protobuf::internal::ExplicitlyConstructed<TestMutualRecursionA_SubGroup>
  204. _instance;
  205. } _TestMutualRecursionA_SubGroup_default_instance_;
  206. class TestMutualRecursionADefaultTypeInternal {
  207. public:
  208. ::google::protobuf::internal::ExplicitlyConstructed<TestMutualRecursionA>
  209. _instance;
  210. } _TestMutualRecursionA_default_instance_;
  211. class TestMutualRecursionBDefaultTypeInternal {
  212. public:
  213. ::google::protobuf::internal::ExplicitlyConstructed<TestMutualRecursionB>
  214. _instance;
  215. } _TestMutualRecursionB_default_instance_;
  216. class TestIsInitialized_SubMessage_SubGroupDefaultTypeInternal {
  217. public:
  218. ::google::protobuf::internal::ExplicitlyConstructed<TestIsInitialized_SubMessage_SubGroup>
  219. _instance;
  220. } _TestIsInitialized_SubMessage_SubGroup_default_instance_;
  221. class TestIsInitialized_SubMessageDefaultTypeInternal {
  222. public:
  223. ::google::protobuf::internal::ExplicitlyConstructed<TestIsInitialized_SubMessage>
  224. _instance;
  225. } _TestIsInitialized_SubMessage_default_instance_;
  226. class TestIsInitializedDefaultTypeInternal {
  227. public:
  228. ::google::protobuf::internal::ExplicitlyConstructed<TestIsInitialized>
  229. _instance;
  230. } _TestIsInitialized_default_instance_;
  231. class TestDupFieldNumber_FooDefaultTypeInternal {
  232. public:
  233. ::google::protobuf::internal::ExplicitlyConstructed<TestDupFieldNumber_Foo>
  234. _instance;
  235. } _TestDupFieldNumber_Foo_default_instance_;
  236. class TestDupFieldNumber_BarDefaultTypeInternal {
  237. public:
  238. ::google::protobuf::internal::ExplicitlyConstructed<TestDupFieldNumber_Bar>
  239. _instance;
  240. } _TestDupFieldNumber_Bar_default_instance_;
  241. class TestDupFieldNumberDefaultTypeInternal {
  242. public:
  243. ::google::protobuf::internal::ExplicitlyConstructed<TestDupFieldNumber>
  244. _instance;
  245. } _TestDupFieldNumber_default_instance_;
  246. class TestEagerMessageDefaultTypeInternal {
  247. public:
  248. ::google::protobuf::internal::ExplicitlyConstructed<TestEagerMessage>
  249. _instance;
  250. } _TestEagerMessage_default_instance_;
  251. class TestLazyMessageDefaultTypeInternal {
  252. public:
  253. ::google::protobuf::internal::ExplicitlyConstructed<TestLazyMessage>
  254. _instance;
  255. } _TestLazyMessage_default_instance_;
  256. class TestNestedMessageHasBits_NestedMessageDefaultTypeInternal {
  257. public:
  258. ::google::protobuf::internal::ExplicitlyConstructed<TestNestedMessageHasBits_NestedMessage>
  259. _instance;
  260. } _TestNestedMessageHasBits_NestedMessage_default_instance_;
  261. class TestNestedMessageHasBitsDefaultTypeInternal {
  262. public:
  263. ::google::protobuf::internal::ExplicitlyConstructed<TestNestedMessageHasBits>
  264. _instance;
  265. } _TestNestedMessageHasBits_default_instance_;
  266. class TestCamelCaseFieldNamesDefaultTypeInternal {
  267. public:
  268. ::google::protobuf::internal::ExplicitlyConstructed<TestCamelCaseFieldNames>
  269. _instance;
  270. } _TestCamelCaseFieldNames_default_instance_;
  271. class TestFieldOrderings_NestedMessageDefaultTypeInternal {
  272. public:
  273. ::google::protobuf::internal::ExplicitlyConstructed<TestFieldOrderings_NestedMessage>
  274. _instance;
  275. } _TestFieldOrderings_NestedMessage_default_instance_;
  276. class TestFieldOrderingsDefaultTypeInternal {
  277. public:
  278. ::google::protobuf::internal::ExplicitlyConstructed<TestFieldOrderings>
  279. _instance;
  280. } _TestFieldOrderings_default_instance_;
  281. class TestExtensionOrderings1DefaultTypeInternal {
  282. public:
  283. ::google::protobuf::internal::ExplicitlyConstructed<TestExtensionOrderings1>
  284. _instance;
  285. } _TestExtensionOrderings1_default_instance_;
  286. class TestExtensionOrderings2_TestExtensionOrderings3DefaultTypeInternal {
  287. public:
  288. ::google::protobuf::internal::ExplicitlyConstructed<TestExtensionOrderings2_TestExtensionOrderings3>
  289. _instance;
  290. } _TestExtensionOrderings2_TestExtensionOrderings3_default_instance_;
  291. class TestExtensionOrderings2DefaultTypeInternal {
  292. public:
  293. ::google::protobuf::internal::ExplicitlyConstructed<TestExtensionOrderings2>
  294. _instance;
  295. } _TestExtensionOrderings2_default_instance_;
  296. class TestExtremeDefaultValuesDefaultTypeInternal {
  297. public:
  298. ::google::protobuf::internal::ExplicitlyConstructed<TestExtremeDefaultValues>
  299. _instance;
  300. } _TestExtremeDefaultValues_default_instance_;
  301. class SparseEnumMessageDefaultTypeInternal {
  302. public:
  303. ::google::protobuf::internal::ExplicitlyConstructed<SparseEnumMessage>
  304. _instance;
  305. } _SparseEnumMessage_default_instance_;
  306. class OneStringDefaultTypeInternal {
  307. public:
  308. ::google::protobuf::internal::ExplicitlyConstructed<OneString>
  309. _instance;
  310. } _OneString_default_instance_;
  311. class MoreStringDefaultTypeInternal {
  312. public:
  313. ::google::protobuf::internal::ExplicitlyConstructed<MoreString>
  314. _instance;
  315. } _MoreString_default_instance_;
  316. class OneBytesDefaultTypeInternal {
  317. public:
  318. ::google::protobuf::internal::ExplicitlyConstructed<OneBytes>
  319. _instance;
  320. } _OneBytes_default_instance_;
  321. class MoreBytesDefaultTypeInternal {
  322. public:
  323. ::google::protobuf::internal::ExplicitlyConstructed<MoreBytes>
  324. _instance;
  325. } _MoreBytes_default_instance_;
  326. class Int32MessageDefaultTypeInternal {
  327. public:
  328. ::google::protobuf::internal::ExplicitlyConstructed<Int32Message>
  329. _instance;
  330. } _Int32Message_default_instance_;
  331. class Uint32MessageDefaultTypeInternal {
  332. public:
  333. ::google::protobuf::internal::ExplicitlyConstructed<Uint32Message>
  334. _instance;
  335. } _Uint32Message_default_instance_;
  336. class Int64MessageDefaultTypeInternal {
  337. public:
  338. ::google::protobuf::internal::ExplicitlyConstructed<Int64Message>
  339. _instance;
  340. } _Int64Message_default_instance_;
  341. class Uint64MessageDefaultTypeInternal {
  342. public:
  343. ::google::protobuf::internal::ExplicitlyConstructed<Uint64Message>
  344. _instance;
  345. } _Uint64Message_default_instance_;
  346. class BoolMessageDefaultTypeInternal {
  347. public:
  348. ::google::protobuf::internal::ExplicitlyConstructed<BoolMessage>
  349. _instance;
  350. } _BoolMessage_default_instance_;
  351. class TestOneof_FooGroupDefaultTypeInternal {
  352. public:
  353. ::google::protobuf::internal::ExplicitlyConstructed<TestOneof_FooGroup>
  354. _instance;
  355. } _TestOneof_FooGroup_default_instance_;
  356. class TestOneofDefaultTypeInternal {
  357. public:
  358. ::google::protobuf::internal::ExplicitlyConstructed<TestOneof>
  359. _instance;
  360. ::google::protobuf::int32 foo_int_;
  361. ::google::protobuf::internal::ArenaStringPtr foo_string_;
  362. const ::protobuf_unittest::TestAllTypes* foo_message_;
  363. const ::protobuf_unittest::TestOneof_FooGroup* foogroup_;
  364. } _TestOneof_default_instance_;
  365. class TestOneofBackwardsCompatible_FooGroupDefaultTypeInternal {
  366. public:
  367. ::google::protobuf::internal::ExplicitlyConstructed<TestOneofBackwardsCompatible_FooGroup>
  368. _instance;
  369. } _TestOneofBackwardsCompatible_FooGroup_default_instance_;
  370. class TestOneofBackwardsCompatibleDefaultTypeInternal {
  371. public:
  372. ::google::protobuf::internal::ExplicitlyConstructed<TestOneofBackwardsCompatible>
  373. _instance;
  374. } _TestOneofBackwardsCompatible_default_instance_;
  375. class TestOneof2_FooGroupDefaultTypeInternal {
  376. public:
  377. ::google::protobuf::internal::ExplicitlyConstructed<TestOneof2_FooGroup>
  378. _instance;
  379. } _TestOneof2_FooGroup_default_instance_;
  380. class TestOneof2_NestedMessageDefaultTypeInternal {
  381. public:
  382. ::google::protobuf::internal::ExplicitlyConstructed<TestOneof2_NestedMessage>
  383. _instance;
  384. } _TestOneof2_NestedMessage_default_instance_;
  385. class TestOneof2DefaultTypeInternal {
  386. public:
  387. ::google::protobuf::internal::ExplicitlyConstructed<TestOneof2>
  388. _instance;
  389. ::google::protobuf::int32 foo_int_;
  390. ::google::protobuf::internal::ArenaStringPtr foo_string_;
  391. ::google::protobuf::internal::ArenaStringPtr foo_cord_;
  392. ::google::protobuf::internal::ArenaStringPtr foo_string_piece_;
  393. ::google::protobuf::internal::ArenaStringPtr foo_bytes_;
  394. int foo_enum_;
  395. const ::protobuf_unittest::TestOneof2_NestedMessage* foo_message_;
  396. const ::protobuf_unittest::TestOneof2_FooGroup* foogroup_;
  397. const ::protobuf_unittest::TestOneof2_NestedMessage* foo_lazy_message_;
  398. ::google::protobuf::int32 bar_int_;
  399. ::google::protobuf::internal::ArenaStringPtr bar_string_;
  400. ::google::protobuf::internal::ArenaStringPtr bar_cord_;
  401. ::google::protobuf::internal::ArenaStringPtr bar_string_piece_;
  402. ::google::protobuf::internal::ArenaStringPtr bar_bytes_;
  403. int bar_enum_;
  404. } _TestOneof2_default_instance_;
  405. class TestRequiredOneof_NestedMessageDefaultTypeInternal {
  406. public:
  407. ::google::protobuf::internal::ExplicitlyConstructed<TestRequiredOneof_NestedMessage>
  408. _instance;
  409. } _TestRequiredOneof_NestedMessage_default_instance_;
  410. class TestRequiredOneofDefaultTypeInternal {
  411. public:
  412. ::google::protobuf::internal::ExplicitlyConstructed<TestRequiredOneof>
  413. _instance;
  414. ::google::protobuf::int32 foo_int_;
  415. ::google::protobuf::internal::ArenaStringPtr foo_string_;
  416. const ::protobuf_unittest::TestRequiredOneof_NestedMessage* foo_message_;
  417. } _TestRequiredOneof_default_instance_;
  418. class TestPackedTypesDefaultTypeInternal {
  419. public:
  420. ::google::protobuf::internal::ExplicitlyConstructed<TestPackedTypes>
  421. _instance;
  422. } _TestPackedTypes_default_instance_;
  423. class TestUnpackedTypesDefaultTypeInternal {
  424. public:
  425. ::google::protobuf::internal::ExplicitlyConstructed<TestUnpackedTypes>
  426. _instance;
  427. } _TestUnpackedTypes_default_instance_;
  428. class TestPackedExtensionsDefaultTypeInternal {
  429. public:
  430. ::google::protobuf::internal::ExplicitlyConstructed<TestPackedExtensions>
  431. _instance;
  432. } _TestPackedExtensions_default_instance_;
  433. class TestUnpackedExtensionsDefaultTypeInternal {
  434. public:
  435. ::google::protobuf::internal::ExplicitlyConstructed<TestUnpackedExtensions>
  436. _instance;
  437. } _TestUnpackedExtensions_default_instance_;
  438. class TestDynamicExtensions_DynamicMessageTypeDefaultTypeInternal {
  439. public:
  440. ::google::protobuf::internal::ExplicitlyConstructed<TestDynamicExtensions_DynamicMessageType>
  441. _instance;
  442. } _TestDynamicExtensions_DynamicMessageType_default_instance_;
  443. class TestDynamicExtensionsDefaultTypeInternal {
  444. public:
  445. ::google::protobuf::internal::ExplicitlyConstructed<TestDynamicExtensions>
  446. _instance;
  447. } _TestDynamicExtensions_default_instance_;
  448. class TestRepeatedScalarDifferentTagSizesDefaultTypeInternal {
  449. public:
  450. ::google::protobuf::internal::ExplicitlyConstructed<TestRepeatedScalarDifferentTagSizes>
  451. _instance;
  452. } _TestRepeatedScalarDifferentTagSizes_default_instance_;
  453. class TestParsingMerge_RepeatedFieldsGenerator_Group1DefaultTypeInternal {
  454. public:
  455. ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMerge_RepeatedFieldsGenerator_Group1>
  456. _instance;
  457. } _TestParsingMerge_RepeatedFieldsGenerator_Group1_default_instance_;
  458. class TestParsingMerge_RepeatedFieldsGenerator_Group2DefaultTypeInternal {
  459. public:
  460. ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMerge_RepeatedFieldsGenerator_Group2>
  461. _instance;
  462. } _TestParsingMerge_RepeatedFieldsGenerator_Group2_default_instance_;
  463. class TestParsingMerge_RepeatedFieldsGeneratorDefaultTypeInternal {
  464. public:
  465. ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMerge_RepeatedFieldsGenerator>
  466. _instance;
  467. } _TestParsingMerge_RepeatedFieldsGenerator_default_instance_;
  468. class TestParsingMerge_OptionalGroupDefaultTypeInternal {
  469. public:
  470. ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMerge_OptionalGroup>
  471. _instance;
  472. } _TestParsingMerge_OptionalGroup_default_instance_;
  473. class TestParsingMerge_RepeatedGroupDefaultTypeInternal {
  474. public:
  475. ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMerge_RepeatedGroup>
  476. _instance;
  477. } _TestParsingMerge_RepeatedGroup_default_instance_;
  478. class TestParsingMergeDefaultTypeInternal {
  479. public:
  480. ::google::protobuf::internal::ExplicitlyConstructed<TestParsingMerge>
  481. _instance;
  482. } _TestParsingMerge_default_instance_;
  483. class TestCommentInjectionMessageDefaultTypeInternal {
  484. public:
  485. ::google::protobuf::internal::ExplicitlyConstructed<TestCommentInjectionMessage>
  486. _instance;
  487. } _TestCommentInjectionMessage_default_instance_;
  488. class FooRequestDefaultTypeInternal {
  489. public:
  490. ::google::protobuf::internal::ExplicitlyConstructed<FooRequest>
  491. _instance;
  492. } _FooRequest_default_instance_;
  493. class FooResponseDefaultTypeInternal {
  494. public:
  495. ::google::protobuf::internal::ExplicitlyConstructed<FooResponse>
  496. _instance;
  497. } _FooResponse_default_instance_;
  498. class FooClientMessageDefaultTypeInternal {
  499. public:
  500. ::google::protobuf::internal::ExplicitlyConstructed<FooClientMessage>
  501. _instance;
  502. } _FooClientMessage_default_instance_;
  503. class FooServerMessageDefaultTypeInternal {
  504. public:
  505. ::google::protobuf::internal::ExplicitlyConstructed<FooServerMessage>
  506. _instance;
  507. } _FooServerMessage_default_instance_;
  508. class BarRequestDefaultTypeInternal {
  509. public:
  510. ::google::protobuf::internal::ExplicitlyConstructed<BarRequest>
  511. _instance;
  512. } _BarRequest_default_instance_;
  513. class BarResponseDefaultTypeInternal {
  514. public:
  515. ::google::protobuf::internal::ExplicitlyConstructed<BarResponse>
  516. _instance;
  517. } _BarResponse_default_instance_;
  518. class TestJsonNameDefaultTypeInternal {
  519. public:
  520. ::google::protobuf::internal::ExplicitlyConstructed<TestJsonName>
  521. _instance;
  522. } _TestJsonName_default_instance_;
  523. class TestHugeFieldNumbers_OptionalGroupDefaultTypeInternal {
  524. public:
  525. ::google::protobuf::internal::ExplicitlyConstructed<TestHugeFieldNumbers_OptionalGroup>
  526. _instance;
  527. } _TestHugeFieldNumbers_OptionalGroup_default_instance_;
  528. class TestHugeFieldNumbers_StringStringMapEntry_DoNotUseDefaultTypeInternal {
  529. public:
  530. ::google::protobuf::internal::ExplicitlyConstructed<TestHugeFieldNumbers_StringStringMapEntry_DoNotUse>
  531. _instance;
  532. } _TestHugeFieldNumbers_StringStringMapEntry_DoNotUse_default_instance_;
  533. class TestHugeFieldNumbersDefaultTypeInternal {
  534. public:
  535. ::google::protobuf::internal::ExplicitlyConstructed<TestHugeFieldNumbers>
  536. _instance;
  537. ::google::protobuf::uint32 oneof_uint32_;
  538. const ::protobuf_unittest::TestAllTypes* oneof_test_all_types_;
  539. ::google::protobuf::internal::ArenaStringPtr oneof_string_;
  540. ::google::protobuf::internal::ArenaStringPtr oneof_bytes_;
  541. } _TestHugeFieldNumbers_default_instance_;
  542. class TestExtensionInsideTableDefaultTypeInternal {
  543. public:
  544. ::google::protobuf::internal::ExplicitlyConstructed<TestExtensionInsideTable>
  545. _instance;
  546. } _TestExtensionInsideTable_default_instance_;
  547. } // namespace protobuf_unittest
  548. namespace protobuf_google_2fprotobuf_2funittest_2eproto {
  549. static void InitDefaultsTestAllTypes_NestedMessage() {
  550. GOOGLE_PROTOBUF_VERIFY_VERSION;
  551. {
  552. void* ptr = &::protobuf_unittest::_TestAllTypes_NestedMessage_default_instance_;
  553. new (ptr) ::protobuf_unittest::TestAllTypes_NestedMessage();
  554. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  555. }
  556. ::protobuf_unittest::TestAllTypes_NestedMessage::InitAsDefaultInstance();
  557. }
  558. ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_NestedMessage =
  559. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestAllTypes_NestedMessage}, {}};
  560. static void InitDefaultsTestAllTypes_OptionalGroup() {
  561. GOOGLE_PROTOBUF_VERIFY_VERSION;
  562. {
  563. void* ptr = &::protobuf_unittest::_TestAllTypes_OptionalGroup_default_instance_;
  564. new (ptr) ::protobuf_unittest::TestAllTypes_OptionalGroup();
  565. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  566. }
  567. ::protobuf_unittest::TestAllTypes_OptionalGroup::InitAsDefaultInstance();
  568. }
  569. ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_OptionalGroup =
  570. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestAllTypes_OptionalGroup}, {}};
  571. static void InitDefaultsTestAllTypes_RepeatedGroup() {
  572. GOOGLE_PROTOBUF_VERIFY_VERSION;
  573. {
  574. void* ptr = &::protobuf_unittest::_TestAllTypes_RepeatedGroup_default_instance_;
  575. new (ptr) ::protobuf_unittest::TestAllTypes_RepeatedGroup();
  576. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  577. }
  578. ::protobuf_unittest::TestAllTypes_RepeatedGroup::InitAsDefaultInstance();
  579. }
  580. ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_RepeatedGroup =
  581. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestAllTypes_RepeatedGroup}, {}};
  582. static void InitDefaultsTestAllTypes() {
  583. GOOGLE_PROTOBUF_VERIFY_VERSION;
  584. ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.DefaultConstruct();
  585. *::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get_mutable() = ::std::string("hello", 5);
  586. ::google::protobuf::internal::OnShutdownDestroyString(
  587. ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get_mutable());
  588. ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.DefaultConstruct();
  589. *::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get_mutable() = ::std::string("world", 5);
  590. ::google::protobuf::internal::OnShutdownDestroyString(
  591. ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get_mutable());
  592. ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.DefaultConstruct();
  593. *::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get_mutable() = ::std::string("abc", 3);
  594. ::google::protobuf::internal::OnShutdownDestroyString(
  595. ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get_mutable());
  596. ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.DefaultConstruct();
  597. *::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get_mutable() = ::std::string("123", 3);
  598. ::google::protobuf::internal::OnShutdownDestroyString(
  599. ::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get_mutable());
  600. {
  601. void* ptr = &::protobuf_unittest::_TestAllTypes_default_instance_;
  602. new (ptr) ::protobuf_unittest::TestAllTypes();
  603. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  604. }
  605. ::protobuf_unittest::TestAllTypes::InitAsDefaultInstance();
  606. }
  607. ::google::protobuf::internal::SCCInfo<6> scc_info_TestAllTypes =
  608. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 6, InitDefaultsTestAllTypes}, {
  609. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_OptionalGroup.base,
  610. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_NestedMessage.base,
  611. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base,
  612. &protobuf_google_2fprotobuf_2funittest_5fimport_2eproto::scc_info_ImportMessage.base,
  613. &protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto::scc_info_PublicImportMessage.base,
  614. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_RepeatedGroup.base,}};
  615. static void InitDefaultsNestedTestAllTypes() {
  616. GOOGLE_PROTOBUF_VERIFY_VERSION;
  617. {
  618. void* ptr = &::protobuf_unittest::_NestedTestAllTypes_default_instance_;
  619. new (ptr) ::protobuf_unittest::NestedTestAllTypes();
  620. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  621. }
  622. ::protobuf_unittest::NestedTestAllTypes::InitAsDefaultInstance();
  623. }
  624. ::google::protobuf::internal::SCCInfo<1> scc_info_NestedTestAllTypes =
  625. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsNestedTestAllTypes}, {
  626. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};
  627. static void InitDefaultsTestDeprecatedFields() {
  628. GOOGLE_PROTOBUF_VERIFY_VERSION;
  629. {
  630. void* ptr = &::protobuf_unittest::_TestDeprecatedFields_default_instance_;
  631. new (ptr) ::protobuf_unittest::TestDeprecatedFields();
  632. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  633. }
  634. ::protobuf_unittest::TestDeprecatedFields::InitAsDefaultInstance();
  635. }
  636. ::google::protobuf::internal::SCCInfo<0> scc_info_TestDeprecatedFields =
  637. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestDeprecatedFields}, {}};
  638. static void InitDefaultsTestDeprecatedMessage() {
  639. GOOGLE_PROTOBUF_VERIFY_VERSION;
  640. {
  641. void* ptr = &::protobuf_unittest::_TestDeprecatedMessage_default_instance_;
  642. new (ptr) ::protobuf_unittest::TestDeprecatedMessage();
  643. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  644. }
  645. ::protobuf_unittest::TestDeprecatedMessage::InitAsDefaultInstance();
  646. }
  647. ::google::protobuf::internal::SCCInfo<0> scc_info_TestDeprecatedMessage =
  648. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestDeprecatedMessage}, {}};
  649. static void InitDefaultsForeignMessage() {
  650. GOOGLE_PROTOBUF_VERIFY_VERSION;
  651. {
  652. void* ptr = &::protobuf_unittest::_ForeignMessage_default_instance_;
  653. new (ptr) ::protobuf_unittest::ForeignMessage();
  654. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  655. }
  656. ::protobuf_unittest::ForeignMessage::InitAsDefaultInstance();
  657. }
  658. ::google::protobuf::internal::SCCInfo<0> scc_info_ForeignMessage =
  659. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsForeignMessage}, {}};
  660. static void InitDefaultsTestReservedFields() {
  661. GOOGLE_PROTOBUF_VERIFY_VERSION;
  662. {
  663. void* ptr = &::protobuf_unittest::_TestReservedFields_default_instance_;
  664. new (ptr) ::protobuf_unittest::TestReservedFields();
  665. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  666. }
  667. ::protobuf_unittest::TestReservedFields::InitAsDefaultInstance();
  668. }
  669. ::google::protobuf::internal::SCCInfo<0> scc_info_TestReservedFields =
  670. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestReservedFields}, {}};
  671. static void InitDefaultsTestAllExtensions() {
  672. GOOGLE_PROTOBUF_VERIFY_VERSION;
  673. {
  674. void* ptr = &::protobuf_unittest::_TestAllExtensions_default_instance_;
  675. new (ptr) ::protobuf_unittest::TestAllExtensions();
  676. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  677. }
  678. ::protobuf_unittest::TestAllExtensions::InitAsDefaultInstance();
  679. }
  680. ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllExtensions =
  681. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestAllExtensions}, {}};
  682. static void InitDefaultsOptionalGroup_extension() {
  683. GOOGLE_PROTOBUF_VERIFY_VERSION;
  684. {
  685. void* ptr = &::protobuf_unittest::_OptionalGroup_extension_default_instance_;
  686. new (ptr) ::protobuf_unittest::OptionalGroup_extension();
  687. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  688. }
  689. ::protobuf_unittest::OptionalGroup_extension::InitAsDefaultInstance();
  690. }
  691. ::google::protobuf::internal::SCCInfo<0> scc_info_OptionalGroup_extension =
  692. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsOptionalGroup_extension}, {}};
  693. static void InitDefaultsRepeatedGroup_extension() {
  694. GOOGLE_PROTOBUF_VERIFY_VERSION;
  695. {
  696. void* ptr = &::protobuf_unittest::_RepeatedGroup_extension_default_instance_;
  697. new (ptr) ::protobuf_unittest::RepeatedGroup_extension();
  698. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  699. }
  700. ::protobuf_unittest::RepeatedGroup_extension::InitAsDefaultInstance();
  701. }
  702. ::google::protobuf::internal::SCCInfo<0> scc_info_RepeatedGroup_extension =
  703. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRepeatedGroup_extension}, {}};
  704. static void InitDefaultsTestGroup_OptionalGroup() {
  705. GOOGLE_PROTOBUF_VERIFY_VERSION;
  706. {
  707. void* ptr = &::protobuf_unittest::_TestGroup_OptionalGroup_default_instance_;
  708. new (ptr) ::protobuf_unittest::TestGroup_OptionalGroup();
  709. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  710. }
  711. ::protobuf_unittest::TestGroup_OptionalGroup::InitAsDefaultInstance();
  712. }
  713. ::google::protobuf::internal::SCCInfo<0> scc_info_TestGroup_OptionalGroup =
  714. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestGroup_OptionalGroup}, {}};
  715. static void InitDefaultsTestGroup() {
  716. GOOGLE_PROTOBUF_VERIFY_VERSION;
  717. {
  718. void* ptr = &::protobuf_unittest::_TestGroup_default_instance_;
  719. new (ptr) ::protobuf_unittest::TestGroup();
  720. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  721. }
  722. ::protobuf_unittest::TestGroup::InitAsDefaultInstance();
  723. }
  724. ::google::protobuf::internal::SCCInfo<1> scc_info_TestGroup =
  725. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestGroup}, {
  726. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroup_OptionalGroup.base,}};
  727. static void InitDefaultsTestGroupExtension() {
  728. GOOGLE_PROTOBUF_VERIFY_VERSION;
  729. {
  730. void* ptr = &::protobuf_unittest::_TestGroupExtension_default_instance_;
  731. new (ptr) ::protobuf_unittest::TestGroupExtension();
  732. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  733. }
  734. ::protobuf_unittest::TestGroupExtension::InitAsDefaultInstance();
  735. }
  736. ::google::protobuf::internal::SCCInfo<0> scc_info_TestGroupExtension =
  737. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestGroupExtension}, {}};
  738. static void InitDefaultsTestNestedExtension_OptionalGroup_extension() {
  739. GOOGLE_PROTOBUF_VERIFY_VERSION;
  740. {
  741. void* ptr = &::protobuf_unittest::_TestNestedExtension_OptionalGroup_extension_default_instance_;
  742. new (ptr) ::protobuf_unittest::TestNestedExtension_OptionalGroup_extension();
  743. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  744. }
  745. ::protobuf_unittest::TestNestedExtension_OptionalGroup_extension::InitAsDefaultInstance();
  746. }
  747. ::google::protobuf::internal::SCCInfo<0> scc_info_TestNestedExtension_OptionalGroup_extension =
  748. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestNestedExtension_OptionalGroup_extension}, {}};
  749. static void InitDefaultsTestNestedExtension() {
  750. GOOGLE_PROTOBUF_VERIFY_VERSION;
  751. {
  752. void* ptr = &::protobuf_unittest::_TestNestedExtension_default_instance_;
  753. new (ptr) ::protobuf_unittest::TestNestedExtension();
  754. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  755. }
  756. ::protobuf_unittest::TestNestedExtension::InitAsDefaultInstance();
  757. }
  758. ::google::protobuf::internal::SCCInfo<0> scc_info_TestNestedExtension =
  759. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestNestedExtension}, {}};
  760. static void InitDefaultsTestRequired() {
  761. GOOGLE_PROTOBUF_VERIFY_VERSION;
  762. {
  763. void* ptr = &::protobuf_unittest::_TestRequired_default_instance_;
  764. new (ptr) ::protobuf_unittest::TestRequired();
  765. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  766. }
  767. ::protobuf_unittest::TestRequired::InitAsDefaultInstance();
  768. }
  769. ::google::protobuf::internal::SCCInfo<0> scc_info_TestRequired =
  770. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestRequired}, {}};
  771. static void InitDefaultsTestRequiredForeign() {
  772. GOOGLE_PROTOBUF_VERIFY_VERSION;
  773. {
  774. void* ptr = &::protobuf_unittest::_TestRequiredForeign_default_instance_;
  775. new (ptr) ::protobuf_unittest::TestRequiredForeign();
  776. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  777. }
  778. ::protobuf_unittest::TestRequiredForeign::InitAsDefaultInstance();
  779. }
  780. ::google::protobuf::internal::SCCInfo<1> scc_info_TestRequiredForeign =
  781. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestRequiredForeign}, {
  782. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequired.base,}};
  783. static void InitDefaultsTestRequiredMessage() {
  784. GOOGLE_PROTOBUF_VERIFY_VERSION;
  785. {
  786. void* ptr = &::protobuf_unittest::_TestRequiredMessage_default_instance_;
  787. new (ptr) ::protobuf_unittest::TestRequiredMessage();
  788. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  789. }
  790. ::protobuf_unittest::TestRequiredMessage::InitAsDefaultInstance();
  791. }
  792. ::google::protobuf::internal::SCCInfo<1> scc_info_TestRequiredMessage =
  793. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestRequiredMessage}, {
  794. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequired.base,}};
  795. static void InitDefaultsTestForeignNested() {
  796. GOOGLE_PROTOBUF_VERIFY_VERSION;
  797. {
  798. void* ptr = &::protobuf_unittest::_TestForeignNested_default_instance_;
  799. new (ptr) ::protobuf_unittest::TestForeignNested();
  800. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  801. }
  802. ::protobuf_unittest::TestForeignNested::InitAsDefaultInstance();
  803. }
  804. ::google::protobuf::internal::SCCInfo<1> scc_info_TestForeignNested =
  805. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestForeignNested}, {
  806. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_NestedMessage.base,}};
  807. static void InitDefaultsTestEmptyMessage() {
  808. GOOGLE_PROTOBUF_VERIFY_VERSION;
  809. {
  810. void* ptr = &::protobuf_unittest::_TestEmptyMessage_default_instance_;
  811. new (ptr) ::protobuf_unittest::TestEmptyMessage();
  812. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  813. }
  814. ::protobuf_unittest::TestEmptyMessage::InitAsDefaultInstance();
  815. }
  816. ::google::protobuf::internal::SCCInfo<0> scc_info_TestEmptyMessage =
  817. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestEmptyMessage}, {}};
  818. static void InitDefaultsTestEmptyMessageWithExtensions() {
  819. GOOGLE_PROTOBUF_VERIFY_VERSION;
  820. {
  821. void* ptr = &::protobuf_unittest::_TestEmptyMessageWithExtensions_default_instance_;
  822. new (ptr) ::protobuf_unittest::TestEmptyMessageWithExtensions();
  823. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  824. }
  825. ::protobuf_unittest::TestEmptyMessageWithExtensions::InitAsDefaultInstance();
  826. }
  827. ::google::protobuf::internal::SCCInfo<0> scc_info_TestEmptyMessageWithExtensions =
  828. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestEmptyMessageWithExtensions}, {}};
  829. static void InitDefaultsTestMultipleExtensionRanges() {
  830. GOOGLE_PROTOBUF_VERIFY_VERSION;
  831. {
  832. void* ptr = &::protobuf_unittest::_TestMultipleExtensionRanges_default_instance_;
  833. new (ptr) ::protobuf_unittest::TestMultipleExtensionRanges();
  834. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  835. }
  836. ::protobuf_unittest::TestMultipleExtensionRanges::InitAsDefaultInstance();
  837. }
  838. ::google::protobuf::internal::SCCInfo<0> scc_info_TestMultipleExtensionRanges =
  839. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestMultipleExtensionRanges}, {}};
  840. static void InitDefaultsTestReallyLargeTagNumber() {
  841. GOOGLE_PROTOBUF_VERIFY_VERSION;
  842. {
  843. void* ptr = &::protobuf_unittest::_TestReallyLargeTagNumber_default_instance_;
  844. new (ptr) ::protobuf_unittest::TestReallyLargeTagNumber();
  845. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  846. }
  847. ::protobuf_unittest::TestReallyLargeTagNumber::InitAsDefaultInstance();
  848. }
  849. ::google::protobuf::internal::SCCInfo<0> scc_info_TestReallyLargeTagNumber =
  850. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestReallyLargeTagNumber}, {}};
  851. static void InitDefaultsTestRecursiveMessage() {
  852. GOOGLE_PROTOBUF_VERIFY_VERSION;
  853. {
  854. void* ptr = &::protobuf_unittest::_TestRecursiveMessage_default_instance_;
  855. new (ptr) ::protobuf_unittest::TestRecursiveMessage();
  856. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  857. }
  858. ::protobuf_unittest::TestRecursiveMessage::InitAsDefaultInstance();
  859. }
  860. ::google::protobuf::internal::SCCInfo<0> scc_info_TestRecursiveMessage =
  861. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestRecursiveMessage}, {}};
  862. static void InitDefaultsTestMutualRecursionA() {
  863. GOOGLE_PROTOBUF_VERIFY_VERSION;
  864. {
  865. void* ptr = &::protobuf_unittest::_TestMutualRecursionA_SubMessage_default_instance_;
  866. new (ptr) ::protobuf_unittest::TestMutualRecursionA_SubMessage();
  867. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  868. }
  869. {
  870. void* ptr = &::protobuf_unittest::_TestMutualRecursionA_SubGroup_default_instance_;
  871. new (ptr) ::protobuf_unittest::TestMutualRecursionA_SubGroup();
  872. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  873. }
  874. {
  875. void* ptr = &::protobuf_unittest::_TestMutualRecursionA_default_instance_;
  876. new (ptr) ::protobuf_unittest::TestMutualRecursionA();
  877. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  878. }
  879. {
  880. void* ptr = &::protobuf_unittest::_TestMutualRecursionB_default_instance_;
  881. new (ptr) ::protobuf_unittest::TestMutualRecursionB();
  882. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  883. }
  884. ::protobuf_unittest::TestMutualRecursionA_SubMessage::InitAsDefaultInstance();
  885. ::protobuf_unittest::TestMutualRecursionA_SubGroup::InitAsDefaultInstance();
  886. ::protobuf_unittest::TestMutualRecursionA::InitAsDefaultInstance();
  887. ::protobuf_unittest::TestMutualRecursionB::InitAsDefaultInstance();
  888. }
  889. ::google::protobuf::internal::SCCInfo<1> scc_info_TestMutualRecursionA =
  890. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestMutualRecursionA}, {
  891. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};
  892. static void InitDefaultsTestIsInitialized_SubMessage_SubGroup() {
  893. GOOGLE_PROTOBUF_VERIFY_VERSION;
  894. {
  895. void* ptr = &::protobuf_unittest::_TestIsInitialized_SubMessage_SubGroup_default_instance_;
  896. new (ptr) ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup();
  897. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  898. }
  899. ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup::InitAsDefaultInstance();
  900. }
  901. ::google::protobuf::internal::SCCInfo<0> scc_info_TestIsInitialized_SubMessage_SubGroup =
  902. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestIsInitialized_SubMessage_SubGroup}, {}};
  903. static void InitDefaultsTestIsInitialized_SubMessage() {
  904. GOOGLE_PROTOBUF_VERIFY_VERSION;
  905. {
  906. void* ptr = &::protobuf_unittest::_TestIsInitialized_SubMessage_default_instance_;
  907. new (ptr) ::protobuf_unittest::TestIsInitialized_SubMessage();
  908. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  909. }
  910. ::protobuf_unittest::TestIsInitialized_SubMessage::InitAsDefaultInstance();
  911. }
  912. ::google::protobuf::internal::SCCInfo<1> scc_info_TestIsInitialized_SubMessage =
  913. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestIsInitialized_SubMessage}, {
  914. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage_SubGroup.base,}};
  915. static void InitDefaultsTestIsInitialized() {
  916. GOOGLE_PROTOBUF_VERIFY_VERSION;
  917. {
  918. void* ptr = &::protobuf_unittest::_TestIsInitialized_default_instance_;
  919. new (ptr) ::protobuf_unittest::TestIsInitialized();
  920. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  921. }
  922. ::protobuf_unittest::TestIsInitialized::InitAsDefaultInstance();
  923. }
  924. ::google::protobuf::internal::SCCInfo<1> scc_info_TestIsInitialized =
  925. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestIsInitialized}, {
  926. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage.base,}};
  927. static void InitDefaultsTestDupFieldNumber_Foo() {
  928. GOOGLE_PROTOBUF_VERIFY_VERSION;
  929. {
  930. void* ptr = &::protobuf_unittest::_TestDupFieldNumber_Foo_default_instance_;
  931. new (ptr) ::protobuf_unittest::TestDupFieldNumber_Foo();
  932. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  933. }
  934. ::protobuf_unittest::TestDupFieldNumber_Foo::InitAsDefaultInstance();
  935. }
  936. ::google::protobuf::internal::SCCInfo<0> scc_info_TestDupFieldNumber_Foo =
  937. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestDupFieldNumber_Foo}, {}};
  938. static void InitDefaultsTestDupFieldNumber_Bar() {
  939. GOOGLE_PROTOBUF_VERIFY_VERSION;
  940. {
  941. void* ptr = &::protobuf_unittest::_TestDupFieldNumber_Bar_default_instance_;
  942. new (ptr) ::protobuf_unittest::TestDupFieldNumber_Bar();
  943. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  944. }
  945. ::protobuf_unittest::TestDupFieldNumber_Bar::InitAsDefaultInstance();
  946. }
  947. ::google::protobuf::internal::SCCInfo<0> scc_info_TestDupFieldNumber_Bar =
  948. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestDupFieldNumber_Bar}, {}};
  949. static void InitDefaultsTestDupFieldNumber() {
  950. GOOGLE_PROTOBUF_VERIFY_VERSION;
  951. {
  952. void* ptr = &::protobuf_unittest::_TestDupFieldNumber_default_instance_;
  953. new (ptr) ::protobuf_unittest::TestDupFieldNumber();
  954. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  955. }
  956. ::protobuf_unittest::TestDupFieldNumber::InitAsDefaultInstance();
  957. }
  958. ::google::protobuf::internal::SCCInfo<2> scc_info_TestDupFieldNumber =
  959. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTestDupFieldNumber}, {
  960. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Foo.base,
  961. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Bar.base,}};
  962. static void InitDefaultsTestEagerMessage() {
  963. GOOGLE_PROTOBUF_VERIFY_VERSION;
  964. {
  965. void* ptr = &::protobuf_unittest::_TestEagerMessage_default_instance_;
  966. new (ptr) ::protobuf_unittest::TestEagerMessage();
  967. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  968. }
  969. ::protobuf_unittest::TestEagerMessage::InitAsDefaultInstance();
  970. }
  971. ::google::protobuf::internal::SCCInfo<1> scc_info_TestEagerMessage =
  972. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestEagerMessage}, {
  973. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};
  974. static void InitDefaultsTestLazyMessage() {
  975. GOOGLE_PROTOBUF_VERIFY_VERSION;
  976. {
  977. void* ptr = &::protobuf_unittest::_TestLazyMessage_default_instance_;
  978. new (ptr) ::protobuf_unittest::TestLazyMessage();
  979. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  980. }
  981. ::protobuf_unittest::TestLazyMessage::InitAsDefaultInstance();
  982. }
  983. ::google::protobuf::internal::SCCInfo<1> scc_info_TestLazyMessage =
  984. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestLazyMessage}, {
  985. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};
  986. static void InitDefaultsTestNestedMessageHasBits_NestedMessage() {
  987. GOOGLE_PROTOBUF_VERIFY_VERSION;
  988. {
  989. void* ptr = &::protobuf_unittest::_TestNestedMessageHasBits_NestedMessage_default_instance_;
  990. new (ptr) ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage();
  991. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  992. }
  993. ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage::InitAsDefaultInstance();
  994. }
  995. ::google::protobuf::internal::SCCInfo<1> scc_info_TestNestedMessageHasBits_NestedMessage =
  996. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestNestedMessageHasBits_NestedMessage}, {
  997. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base,}};
  998. static void InitDefaultsTestNestedMessageHasBits() {
  999. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1000. {
  1001. void* ptr = &::protobuf_unittest::_TestNestedMessageHasBits_default_instance_;
  1002. new (ptr) ::protobuf_unittest::TestNestedMessageHasBits();
  1003. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1004. }
  1005. ::protobuf_unittest::TestNestedMessageHasBits::InitAsDefaultInstance();
  1006. }
  1007. ::google::protobuf::internal::SCCInfo<1> scc_info_TestNestedMessageHasBits =
  1008. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestNestedMessageHasBits}, {
  1009. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedMessageHasBits_NestedMessage.base,}};
  1010. static void InitDefaultsTestCamelCaseFieldNames() {
  1011. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1012. {
  1013. void* ptr = &::protobuf_unittest::_TestCamelCaseFieldNames_default_instance_;
  1014. new (ptr) ::protobuf_unittest::TestCamelCaseFieldNames();
  1015. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1016. }
  1017. ::protobuf_unittest::TestCamelCaseFieldNames::InitAsDefaultInstance();
  1018. }
  1019. ::google::protobuf::internal::SCCInfo<1> scc_info_TestCamelCaseFieldNames =
  1020. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestCamelCaseFieldNames}, {
  1021. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base,}};
  1022. static void InitDefaultsTestFieldOrderings_NestedMessage() {
  1023. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1024. {
  1025. void* ptr = &::protobuf_unittest::_TestFieldOrderings_NestedMessage_default_instance_;
  1026. new (ptr) ::protobuf_unittest::TestFieldOrderings_NestedMessage();
  1027. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1028. }
  1029. ::protobuf_unittest::TestFieldOrderings_NestedMessage::InitAsDefaultInstance();
  1030. }
  1031. ::google::protobuf::internal::SCCInfo<0> scc_info_TestFieldOrderings_NestedMessage =
  1032. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestFieldOrderings_NestedMessage}, {}};
  1033. static void InitDefaultsTestFieldOrderings() {
  1034. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1035. {
  1036. void* ptr = &::protobuf_unittest::_TestFieldOrderings_default_instance_;
  1037. new (ptr) ::protobuf_unittest::TestFieldOrderings();
  1038. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1039. }
  1040. ::protobuf_unittest::TestFieldOrderings::InitAsDefaultInstance();
  1041. }
  1042. ::google::protobuf::internal::SCCInfo<1> scc_info_TestFieldOrderings =
  1043. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestFieldOrderings}, {
  1044. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestFieldOrderings_NestedMessage.base,}};
  1045. static void InitDefaultsTestExtensionOrderings1() {
  1046. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1047. {
  1048. void* ptr = &::protobuf_unittest::_TestExtensionOrderings1_default_instance_;
  1049. new (ptr) ::protobuf_unittest::TestExtensionOrderings1();
  1050. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1051. }
  1052. ::protobuf_unittest::TestExtensionOrderings1::InitAsDefaultInstance();
  1053. }
  1054. ::google::protobuf::internal::SCCInfo<0> scc_info_TestExtensionOrderings1 =
  1055. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestExtensionOrderings1}, {}};
  1056. static void InitDefaultsTestExtensionOrderings2_TestExtensionOrderings3() {
  1057. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1058. {
  1059. void* ptr = &::protobuf_unittest::_TestExtensionOrderings2_TestExtensionOrderings3_default_instance_;
  1060. new (ptr) ::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3();
  1061. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1062. }
  1063. ::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3::InitAsDefaultInstance();
  1064. }
  1065. ::google::protobuf::internal::SCCInfo<0> scc_info_TestExtensionOrderings2_TestExtensionOrderings3 =
  1066. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestExtensionOrderings2_TestExtensionOrderings3}, {}};
  1067. static void InitDefaultsTestExtensionOrderings2() {
  1068. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1069. {
  1070. void* ptr = &::protobuf_unittest::_TestExtensionOrderings2_default_instance_;
  1071. new (ptr) ::protobuf_unittest::TestExtensionOrderings2();
  1072. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1073. }
  1074. ::protobuf_unittest::TestExtensionOrderings2::InitAsDefaultInstance();
  1075. }
  1076. ::google::protobuf::internal::SCCInfo<0> scc_info_TestExtensionOrderings2 =
  1077. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestExtensionOrderings2}, {}};
  1078. static void InitDefaultsTestExtremeDefaultValues() {
  1079. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1080. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.DefaultConstruct();
  1081. *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get_mutable() = ::std::string("\000\001\007\010\014\n\r\t\013\\\'\"\376", 13);
  1082. ::google::protobuf::internal::OnShutdownDestroyString(
  1083. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get_mutable());
  1084. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.DefaultConstruct();
  1085. *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get_mutable() = ::std::string("\341\210\264", 3);
  1086. ::google::protobuf::internal::OnShutdownDestroyString(
  1087. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get_mutable());
  1088. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.DefaultConstruct();
  1089. *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get_mutable() = ::std::string("\? \? \?\? \?\? \?\?\? \?\?/ \?\?-", 21);
  1090. ::google::protobuf::internal::OnShutdownDestroyString(
  1091. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get_mutable());
  1092. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.DefaultConstruct();
  1093. *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get_mutable() = ::std::string("hel\000lo", 6);
  1094. ::google::protobuf::internal::OnShutdownDestroyString(
  1095. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get_mutable());
  1096. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.DefaultConstruct();
  1097. *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get_mutable() = ::std::string("wor\000ld", 6);
  1098. ::google::protobuf::internal::OnShutdownDestroyString(
  1099. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get_mutable());
  1100. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.DefaultConstruct();
  1101. *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get_mutable() = ::std::string("ab\000c", 4);
  1102. ::google::protobuf::internal::OnShutdownDestroyString(
  1103. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get_mutable());
  1104. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.DefaultConstruct();
  1105. *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get_mutable() = ::std::string("12\0003", 4);
  1106. ::google::protobuf::internal::OnShutdownDestroyString(
  1107. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get_mutable());
  1108. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.DefaultConstruct();
  1109. *::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get_mutable() = ::std::string("${unknown}", 10);
  1110. ::google::protobuf::internal::OnShutdownDestroyString(
  1111. ::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get_mutable());
  1112. {
  1113. void* ptr = &::protobuf_unittest::_TestExtremeDefaultValues_default_instance_;
  1114. new (ptr) ::protobuf_unittest::TestExtremeDefaultValues();
  1115. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1116. }
  1117. ::protobuf_unittest::TestExtremeDefaultValues::InitAsDefaultInstance();
  1118. }
  1119. ::google::protobuf::internal::SCCInfo<0> scc_info_TestExtremeDefaultValues =
  1120. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestExtremeDefaultValues}, {}};
  1121. static void InitDefaultsSparseEnumMessage() {
  1122. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1123. {
  1124. void* ptr = &::protobuf_unittest::_SparseEnumMessage_default_instance_;
  1125. new (ptr) ::protobuf_unittest::SparseEnumMessage();
  1126. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1127. }
  1128. ::protobuf_unittest::SparseEnumMessage::InitAsDefaultInstance();
  1129. }
  1130. ::google::protobuf::internal::SCCInfo<0> scc_info_SparseEnumMessage =
  1131. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSparseEnumMessage}, {}};
  1132. static void InitDefaultsOneString() {
  1133. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1134. {
  1135. void* ptr = &::protobuf_unittest::_OneString_default_instance_;
  1136. new (ptr) ::protobuf_unittest::OneString();
  1137. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1138. }
  1139. ::protobuf_unittest::OneString::InitAsDefaultInstance();
  1140. }
  1141. ::google::protobuf::internal::SCCInfo<0> scc_info_OneString =
  1142. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsOneString}, {}};
  1143. static void InitDefaultsMoreString() {
  1144. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1145. {
  1146. void* ptr = &::protobuf_unittest::_MoreString_default_instance_;
  1147. new (ptr) ::protobuf_unittest::MoreString();
  1148. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1149. }
  1150. ::protobuf_unittest::MoreString::InitAsDefaultInstance();
  1151. }
  1152. ::google::protobuf::internal::SCCInfo<0> scc_info_MoreString =
  1153. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMoreString}, {}};
  1154. static void InitDefaultsOneBytes() {
  1155. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1156. {
  1157. void* ptr = &::protobuf_unittest::_OneBytes_default_instance_;
  1158. new (ptr) ::protobuf_unittest::OneBytes();
  1159. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1160. }
  1161. ::protobuf_unittest::OneBytes::InitAsDefaultInstance();
  1162. }
  1163. ::google::protobuf::internal::SCCInfo<0> scc_info_OneBytes =
  1164. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsOneBytes}, {}};
  1165. static void InitDefaultsMoreBytes() {
  1166. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1167. {
  1168. void* ptr = &::protobuf_unittest::_MoreBytes_default_instance_;
  1169. new (ptr) ::protobuf_unittest::MoreBytes();
  1170. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1171. }
  1172. ::protobuf_unittest::MoreBytes::InitAsDefaultInstance();
  1173. }
  1174. ::google::protobuf::internal::SCCInfo<0> scc_info_MoreBytes =
  1175. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMoreBytes}, {}};
  1176. static void InitDefaultsInt32Message() {
  1177. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1178. {
  1179. void* ptr = &::protobuf_unittest::_Int32Message_default_instance_;
  1180. new (ptr) ::protobuf_unittest::Int32Message();
  1181. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1182. }
  1183. ::protobuf_unittest::Int32Message::InitAsDefaultInstance();
  1184. }
  1185. ::google::protobuf::internal::SCCInfo<0> scc_info_Int32Message =
  1186. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsInt32Message}, {}};
  1187. static void InitDefaultsUint32Message() {
  1188. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1189. {
  1190. void* ptr = &::protobuf_unittest::_Uint32Message_default_instance_;
  1191. new (ptr) ::protobuf_unittest::Uint32Message();
  1192. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1193. }
  1194. ::protobuf_unittest::Uint32Message::InitAsDefaultInstance();
  1195. }
  1196. ::google::protobuf::internal::SCCInfo<0> scc_info_Uint32Message =
  1197. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsUint32Message}, {}};
  1198. static void InitDefaultsInt64Message() {
  1199. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1200. {
  1201. void* ptr = &::protobuf_unittest::_Int64Message_default_instance_;
  1202. new (ptr) ::protobuf_unittest::Int64Message();
  1203. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1204. }
  1205. ::protobuf_unittest::Int64Message::InitAsDefaultInstance();
  1206. }
  1207. ::google::protobuf::internal::SCCInfo<0> scc_info_Int64Message =
  1208. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsInt64Message}, {}};
  1209. static void InitDefaultsUint64Message() {
  1210. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1211. {
  1212. void* ptr = &::protobuf_unittest::_Uint64Message_default_instance_;
  1213. new (ptr) ::protobuf_unittest::Uint64Message();
  1214. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1215. }
  1216. ::protobuf_unittest::Uint64Message::InitAsDefaultInstance();
  1217. }
  1218. ::google::protobuf::internal::SCCInfo<0> scc_info_Uint64Message =
  1219. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsUint64Message}, {}};
  1220. static void InitDefaultsBoolMessage() {
  1221. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1222. {
  1223. void* ptr = &::protobuf_unittest::_BoolMessage_default_instance_;
  1224. new (ptr) ::protobuf_unittest::BoolMessage();
  1225. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1226. }
  1227. ::protobuf_unittest::BoolMessage::InitAsDefaultInstance();
  1228. }
  1229. ::google::protobuf::internal::SCCInfo<0> scc_info_BoolMessage =
  1230. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsBoolMessage}, {}};
  1231. static void InitDefaultsTestOneof_FooGroup() {
  1232. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1233. {
  1234. void* ptr = &::protobuf_unittest::_TestOneof_FooGroup_default_instance_;
  1235. new (ptr) ::protobuf_unittest::TestOneof_FooGroup();
  1236. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1237. }
  1238. ::protobuf_unittest::TestOneof_FooGroup::InitAsDefaultInstance();
  1239. }
  1240. ::google::protobuf::internal::SCCInfo<0> scc_info_TestOneof_FooGroup =
  1241. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestOneof_FooGroup}, {}};
  1242. static void InitDefaultsTestOneof() {
  1243. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1244. {
  1245. void* ptr = &::protobuf_unittest::_TestOneof_default_instance_;
  1246. new (ptr) ::protobuf_unittest::TestOneof();
  1247. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1248. }
  1249. ::protobuf_unittest::TestOneof::InitAsDefaultInstance();
  1250. }
  1251. ::google::protobuf::internal::SCCInfo<2> scc_info_TestOneof =
  1252. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTestOneof}, {
  1253. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,
  1254. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof_FooGroup.base,}};
  1255. static void InitDefaultsTestOneofBackwardsCompatible_FooGroup() {
  1256. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1257. {
  1258. void* ptr = &::protobuf_unittest::_TestOneofBackwardsCompatible_FooGroup_default_instance_;
  1259. new (ptr) ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup();
  1260. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1261. }
  1262. ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup::InitAsDefaultInstance();
  1263. }
  1264. ::google::protobuf::internal::SCCInfo<0> scc_info_TestOneofBackwardsCompatible_FooGroup =
  1265. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestOneofBackwardsCompatible_FooGroup}, {}};
  1266. static void InitDefaultsTestOneofBackwardsCompatible() {
  1267. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1268. {
  1269. void* ptr = &::protobuf_unittest::_TestOneofBackwardsCompatible_default_instance_;
  1270. new (ptr) ::protobuf_unittest::TestOneofBackwardsCompatible();
  1271. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1272. }
  1273. ::protobuf_unittest::TestOneofBackwardsCompatible::InitAsDefaultInstance();
  1274. }
  1275. ::google::protobuf::internal::SCCInfo<2> scc_info_TestOneofBackwardsCompatible =
  1276. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTestOneofBackwardsCompatible}, {
  1277. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,
  1278. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneofBackwardsCompatible_FooGroup.base,}};
  1279. static void InitDefaultsTestOneof2_FooGroup() {
  1280. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1281. {
  1282. void* ptr = &::protobuf_unittest::_TestOneof2_FooGroup_default_instance_;
  1283. new (ptr) ::protobuf_unittest::TestOneof2_FooGroup();
  1284. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1285. }
  1286. ::protobuf_unittest::TestOneof2_FooGroup::InitAsDefaultInstance();
  1287. }
  1288. ::google::protobuf::internal::SCCInfo<0> scc_info_TestOneof2_FooGroup =
  1289. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestOneof2_FooGroup}, {}};
  1290. static void InitDefaultsTestOneof2_NestedMessage() {
  1291. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1292. {
  1293. void* ptr = &::protobuf_unittest::_TestOneof2_NestedMessage_default_instance_;
  1294. new (ptr) ::protobuf_unittest::TestOneof2_NestedMessage();
  1295. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1296. }
  1297. ::protobuf_unittest::TestOneof2_NestedMessage::InitAsDefaultInstance();
  1298. }
  1299. ::google::protobuf::internal::SCCInfo<0> scc_info_TestOneof2_NestedMessage =
  1300. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestOneof2_NestedMessage}, {}};
  1301. static void InitDefaultsTestOneof2() {
  1302. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1303. ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_.DefaultConstruct();
  1304. *::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_.get_mutable() = ::std::string("STRING", 6);
  1305. ::google::protobuf::internal::OnShutdownDestroyString(
  1306. ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_.get_mutable());
  1307. ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_cord_.DefaultConstruct();
  1308. *::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_cord_.get_mutable() = ::std::string("CORD", 4);
  1309. ::google::protobuf::internal::OnShutdownDestroyString(
  1310. ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_cord_.get_mutable());
  1311. ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_piece_.DefaultConstruct();
  1312. *::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_piece_.get_mutable() = ::std::string("SPIECE", 6);
  1313. ::google::protobuf::internal::OnShutdownDestroyString(
  1314. ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_piece_.get_mutable());
  1315. ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_bytes_.DefaultConstruct();
  1316. *::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_bytes_.get_mutable() = ::std::string("BYTES", 5);
  1317. ::google::protobuf::internal::OnShutdownDestroyString(
  1318. ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_bytes_.get_mutable());
  1319. ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.DefaultConstruct();
  1320. *::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get_mutable() = ::std::string("BAZ", 3);
  1321. ::google::protobuf::internal::OnShutdownDestroyString(
  1322. ::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get_mutable());
  1323. {
  1324. void* ptr = &::protobuf_unittest::_TestOneof2_default_instance_;
  1325. new (ptr) ::protobuf_unittest::TestOneof2();
  1326. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1327. }
  1328. ::protobuf_unittest::TestOneof2::InitAsDefaultInstance();
  1329. }
  1330. ::google::protobuf::internal::SCCInfo<2> scc_info_TestOneof2 =
  1331. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTestOneof2}, {
  1332. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_NestedMessage.base,
  1333. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_FooGroup.base,}};
  1334. static void InitDefaultsTestRequiredOneof_NestedMessage() {
  1335. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1336. {
  1337. void* ptr = &::protobuf_unittest::_TestRequiredOneof_NestedMessage_default_instance_;
  1338. new (ptr) ::protobuf_unittest::TestRequiredOneof_NestedMessage();
  1339. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1340. }
  1341. ::protobuf_unittest::TestRequiredOneof_NestedMessage::InitAsDefaultInstance();
  1342. }
  1343. ::google::protobuf::internal::SCCInfo<0> scc_info_TestRequiredOneof_NestedMessage =
  1344. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestRequiredOneof_NestedMessage}, {}};
  1345. static void InitDefaultsTestRequiredOneof() {
  1346. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1347. {
  1348. void* ptr = &::protobuf_unittest::_TestRequiredOneof_default_instance_;
  1349. new (ptr) ::protobuf_unittest::TestRequiredOneof();
  1350. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1351. }
  1352. ::protobuf_unittest::TestRequiredOneof::InitAsDefaultInstance();
  1353. }
  1354. ::google::protobuf::internal::SCCInfo<1> scc_info_TestRequiredOneof =
  1355. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestRequiredOneof}, {
  1356. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredOneof_NestedMessage.base,}};
  1357. static void InitDefaultsTestPackedTypes() {
  1358. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1359. {
  1360. void* ptr = &::protobuf_unittest::_TestPackedTypes_default_instance_;
  1361. new (ptr) ::protobuf_unittest::TestPackedTypes();
  1362. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1363. }
  1364. ::protobuf_unittest::TestPackedTypes::InitAsDefaultInstance();
  1365. }
  1366. ::google::protobuf::internal::SCCInfo<0> scc_info_TestPackedTypes =
  1367. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestPackedTypes}, {}};
  1368. static void InitDefaultsTestUnpackedTypes() {
  1369. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1370. {
  1371. void* ptr = &::protobuf_unittest::_TestUnpackedTypes_default_instance_;
  1372. new (ptr) ::protobuf_unittest::TestUnpackedTypes();
  1373. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1374. }
  1375. ::protobuf_unittest::TestUnpackedTypes::InitAsDefaultInstance();
  1376. }
  1377. ::google::protobuf::internal::SCCInfo<0> scc_info_TestUnpackedTypes =
  1378. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestUnpackedTypes}, {}};
  1379. static void InitDefaultsTestPackedExtensions() {
  1380. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1381. {
  1382. void* ptr = &::protobuf_unittest::_TestPackedExtensions_default_instance_;
  1383. new (ptr) ::protobuf_unittest::TestPackedExtensions();
  1384. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1385. }
  1386. ::protobuf_unittest::TestPackedExtensions::InitAsDefaultInstance();
  1387. }
  1388. ::google::protobuf::internal::SCCInfo<0> scc_info_TestPackedExtensions =
  1389. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestPackedExtensions}, {}};
  1390. static void InitDefaultsTestUnpackedExtensions() {
  1391. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1392. {
  1393. void* ptr = &::protobuf_unittest::_TestUnpackedExtensions_default_instance_;
  1394. new (ptr) ::protobuf_unittest::TestUnpackedExtensions();
  1395. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1396. }
  1397. ::protobuf_unittest::TestUnpackedExtensions::InitAsDefaultInstance();
  1398. }
  1399. ::google::protobuf::internal::SCCInfo<0> scc_info_TestUnpackedExtensions =
  1400. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestUnpackedExtensions}, {}};
  1401. static void InitDefaultsTestDynamicExtensions_DynamicMessageType() {
  1402. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1403. {
  1404. void* ptr = &::protobuf_unittest::_TestDynamicExtensions_DynamicMessageType_default_instance_;
  1405. new (ptr) ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType();
  1406. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1407. }
  1408. ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType::InitAsDefaultInstance();
  1409. }
  1410. ::google::protobuf::internal::SCCInfo<0> scc_info_TestDynamicExtensions_DynamicMessageType =
  1411. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestDynamicExtensions_DynamicMessageType}, {}};
  1412. static void InitDefaultsTestDynamicExtensions() {
  1413. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1414. {
  1415. void* ptr = &::protobuf_unittest::_TestDynamicExtensions_default_instance_;
  1416. new (ptr) ::protobuf_unittest::TestDynamicExtensions();
  1417. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1418. }
  1419. ::protobuf_unittest::TestDynamicExtensions::InitAsDefaultInstance();
  1420. }
  1421. ::google::protobuf::internal::SCCInfo<2> scc_info_TestDynamicExtensions =
  1422. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTestDynamicExtensions}, {
  1423. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base,
  1424. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDynamicExtensions_DynamicMessageType.base,}};
  1425. static void InitDefaultsTestRepeatedScalarDifferentTagSizes() {
  1426. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1427. {
  1428. void* ptr = &::protobuf_unittest::_TestRepeatedScalarDifferentTagSizes_default_instance_;
  1429. new (ptr) ::protobuf_unittest::TestRepeatedScalarDifferentTagSizes();
  1430. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1431. }
  1432. ::protobuf_unittest::TestRepeatedScalarDifferentTagSizes::InitAsDefaultInstance();
  1433. }
  1434. ::google::protobuf::internal::SCCInfo<0> scc_info_TestRepeatedScalarDifferentTagSizes =
  1435. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestRepeatedScalarDifferentTagSizes}, {}};
  1436. static void InitDefaultsTestParsingMerge_RepeatedFieldsGenerator_Group1() {
  1437. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1438. {
  1439. void* ptr = &::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_Group1_default_instance_;
  1440. new (ptr) ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1();
  1441. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1442. }
  1443. ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1::InitAsDefaultInstance();
  1444. }
  1445. ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group1 =
  1446. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestParsingMerge_RepeatedFieldsGenerator_Group1}, {
  1447. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};
  1448. static void InitDefaultsTestParsingMerge_RepeatedFieldsGenerator_Group2() {
  1449. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1450. {
  1451. void* ptr = &::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_Group2_default_instance_;
  1452. new (ptr) ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2();
  1453. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1454. }
  1455. ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2::InitAsDefaultInstance();
  1456. }
  1457. ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group2 =
  1458. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestParsingMerge_RepeatedFieldsGenerator_Group2}, {
  1459. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};
  1460. static void InitDefaultsTestParsingMerge_RepeatedFieldsGenerator() {
  1461. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1462. {
  1463. void* ptr = &::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_default_instance_;
  1464. new (ptr) ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator();
  1465. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1466. }
  1467. ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator::InitAsDefaultInstance();
  1468. }
  1469. ::google::protobuf::internal::SCCInfo<3> scc_info_TestParsingMerge_RepeatedFieldsGenerator =
  1470. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsTestParsingMerge_RepeatedFieldsGenerator}, {
  1471. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,
  1472. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group1.base,
  1473. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group2.base,}};
  1474. static void InitDefaultsTestParsingMerge_OptionalGroup() {
  1475. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1476. {
  1477. void* ptr = &::protobuf_unittest::_TestParsingMerge_OptionalGroup_default_instance_;
  1478. new (ptr) ::protobuf_unittest::TestParsingMerge_OptionalGroup();
  1479. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1480. }
  1481. ::protobuf_unittest::TestParsingMerge_OptionalGroup::InitAsDefaultInstance();
  1482. }
  1483. ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_OptionalGroup =
  1484. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestParsingMerge_OptionalGroup}, {
  1485. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};
  1486. static void InitDefaultsTestParsingMerge_RepeatedGroup() {
  1487. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1488. {
  1489. void* ptr = &::protobuf_unittest::_TestParsingMerge_RepeatedGroup_default_instance_;
  1490. new (ptr) ::protobuf_unittest::TestParsingMerge_RepeatedGroup();
  1491. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1492. }
  1493. ::protobuf_unittest::TestParsingMerge_RepeatedGroup::InitAsDefaultInstance();
  1494. }
  1495. ::google::protobuf::internal::SCCInfo<1> scc_info_TestParsingMerge_RepeatedGroup =
  1496. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestParsingMerge_RepeatedGroup}, {
  1497. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};
  1498. static void InitDefaultsTestParsingMerge() {
  1499. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1500. {
  1501. void* ptr = &::protobuf_unittest::_TestParsingMerge_default_instance_;
  1502. new (ptr) ::protobuf_unittest::TestParsingMerge();
  1503. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1504. }
  1505. ::protobuf_unittest::TestParsingMerge::InitAsDefaultInstance();
  1506. }
  1507. ::google::protobuf::internal::SCCInfo<3> scc_info_TestParsingMerge =
  1508. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsTestParsingMerge}, {
  1509. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,
  1510. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_OptionalGroup.base,
  1511. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedGroup.base,}};
  1512. static void InitDefaultsTestCommentInjectionMessage() {
  1513. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1514. ::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.DefaultConstruct();
  1515. *::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get_mutable() = ::std::string("*/ <- Neither should this.", 26);
  1516. ::google::protobuf::internal::OnShutdownDestroyString(
  1517. ::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get_mutable());
  1518. {
  1519. void* ptr = &::protobuf_unittest::_TestCommentInjectionMessage_default_instance_;
  1520. new (ptr) ::protobuf_unittest::TestCommentInjectionMessage();
  1521. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1522. }
  1523. ::protobuf_unittest::TestCommentInjectionMessage::InitAsDefaultInstance();
  1524. }
  1525. ::google::protobuf::internal::SCCInfo<0> scc_info_TestCommentInjectionMessage =
  1526. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestCommentInjectionMessage}, {}};
  1527. static void InitDefaultsFooRequest() {
  1528. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1529. {
  1530. void* ptr = &::protobuf_unittest::_FooRequest_default_instance_;
  1531. new (ptr) ::protobuf_unittest::FooRequest();
  1532. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1533. }
  1534. ::protobuf_unittest::FooRequest::InitAsDefaultInstance();
  1535. }
  1536. ::google::protobuf::internal::SCCInfo<0> scc_info_FooRequest =
  1537. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsFooRequest}, {}};
  1538. static void InitDefaultsFooResponse() {
  1539. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1540. {
  1541. void* ptr = &::protobuf_unittest::_FooResponse_default_instance_;
  1542. new (ptr) ::protobuf_unittest::FooResponse();
  1543. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1544. }
  1545. ::protobuf_unittest::FooResponse::InitAsDefaultInstance();
  1546. }
  1547. ::google::protobuf::internal::SCCInfo<0> scc_info_FooResponse =
  1548. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsFooResponse}, {}};
  1549. static void InitDefaultsFooClientMessage() {
  1550. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1551. {
  1552. void* ptr = &::protobuf_unittest::_FooClientMessage_default_instance_;
  1553. new (ptr) ::protobuf_unittest::FooClientMessage();
  1554. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1555. }
  1556. ::protobuf_unittest::FooClientMessage::InitAsDefaultInstance();
  1557. }
  1558. ::google::protobuf::internal::SCCInfo<0> scc_info_FooClientMessage =
  1559. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsFooClientMessage}, {}};
  1560. static void InitDefaultsFooServerMessage() {
  1561. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1562. {
  1563. void* ptr = &::protobuf_unittest::_FooServerMessage_default_instance_;
  1564. new (ptr) ::protobuf_unittest::FooServerMessage();
  1565. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1566. }
  1567. ::protobuf_unittest::FooServerMessage::InitAsDefaultInstance();
  1568. }
  1569. ::google::protobuf::internal::SCCInfo<0> scc_info_FooServerMessage =
  1570. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsFooServerMessage}, {}};
  1571. static void InitDefaultsBarRequest() {
  1572. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1573. {
  1574. void* ptr = &::protobuf_unittest::_BarRequest_default_instance_;
  1575. new (ptr) ::protobuf_unittest::BarRequest();
  1576. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1577. }
  1578. ::protobuf_unittest::BarRequest::InitAsDefaultInstance();
  1579. }
  1580. ::google::protobuf::internal::SCCInfo<0> scc_info_BarRequest =
  1581. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsBarRequest}, {}};
  1582. static void InitDefaultsBarResponse() {
  1583. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1584. {
  1585. void* ptr = &::protobuf_unittest::_BarResponse_default_instance_;
  1586. new (ptr) ::protobuf_unittest::BarResponse();
  1587. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1588. }
  1589. ::protobuf_unittest::BarResponse::InitAsDefaultInstance();
  1590. }
  1591. ::google::protobuf::internal::SCCInfo<0> scc_info_BarResponse =
  1592. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsBarResponse}, {}};
  1593. static void InitDefaultsTestJsonName() {
  1594. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1595. {
  1596. void* ptr = &::protobuf_unittest::_TestJsonName_default_instance_;
  1597. new (ptr) ::protobuf_unittest::TestJsonName();
  1598. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1599. }
  1600. ::protobuf_unittest::TestJsonName::InitAsDefaultInstance();
  1601. }
  1602. ::google::protobuf::internal::SCCInfo<0> scc_info_TestJsonName =
  1603. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestJsonName}, {}};
  1604. static void InitDefaultsTestHugeFieldNumbers_OptionalGroup() {
  1605. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1606. {
  1607. void* ptr = &::protobuf_unittest::_TestHugeFieldNumbers_OptionalGroup_default_instance_;
  1608. new (ptr) ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup();
  1609. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1610. }
  1611. ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup::InitAsDefaultInstance();
  1612. }
  1613. ::google::protobuf::internal::SCCInfo<0> scc_info_TestHugeFieldNumbers_OptionalGroup =
  1614. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestHugeFieldNumbers_OptionalGroup}, {}};
  1615. static void InitDefaultsTestHugeFieldNumbers_StringStringMapEntry_DoNotUse() {
  1616. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1617. {
  1618. void* ptr = &::protobuf_unittest::_TestHugeFieldNumbers_StringStringMapEntry_DoNotUse_default_instance_;
  1619. new (ptr) ::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse();
  1620. }
  1621. ::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse::InitAsDefaultInstance();
  1622. }
  1623. ::google::protobuf::internal::SCCInfo<0> scc_info_TestHugeFieldNumbers_StringStringMapEntry_DoNotUse =
  1624. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestHugeFieldNumbers_StringStringMapEntry_DoNotUse}, {}};
  1625. static void InitDefaultsTestHugeFieldNumbers() {
  1626. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1627. {
  1628. void* ptr = &::protobuf_unittest::_TestHugeFieldNumbers_default_instance_;
  1629. new (ptr) ::protobuf_unittest::TestHugeFieldNumbers();
  1630. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1631. }
  1632. ::protobuf_unittest::TestHugeFieldNumbers::InitAsDefaultInstance();
  1633. }
  1634. ::google::protobuf::internal::SCCInfo<4> scc_info_TestHugeFieldNumbers =
  1635. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsTestHugeFieldNumbers}, {
  1636. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base,
  1637. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers_OptionalGroup.base,
  1638. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers_StringStringMapEntry_DoNotUse.base,
  1639. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base,}};
  1640. static void InitDefaultsTestExtensionInsideTable() {
  1641. GOOGLE_PROTOBUF_VERIFY_VERSION;
  1642. {
  1643. void* ptr = &::protobuf_unittest::_TestExtensionInsideTable_default_instance_;
  1644. new (ptr) ::protobuf_unittest::TestExtensionInsideTable();
  1645. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  1646. }
  1647. ::protobuf_unittest::TestExtensionInsideTable::InitAsDefaultInstance();
  1648. }
  1649. ::google::protobuf::internal::SCCInfo<0> scc_info_TestExtensionInsideTable =
  1650. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestExtensionInsideTable}, {}};
  1651. void InitDefaults() {
  1652. ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes_NestedMessage.base);
  1653. ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes_OptionalGroup.base);
  1654. ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes_RepeatedGroup.base);
  1655. ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes.base);
  1656. ::google::protobuf::internal::InitSCC(&scc_info_NestedTestAllTypes.base);
  1657. ::google::protobuf::internal::InitSCC(&scc_info_TestDeprecatedFields.base);
  1658. ::google::protobuf::internal::InitSCC(&scc_info_TestDeprecatedMessage.base);
  1659. ::google::protobuf::internal::InitSCC(&scc_info_ForeignMessage.base);
  1660. ::google::protobuf::internal::InitSCC(&scc_info_TestReservedFields.base);
  1661. ::google::protobuf::internal::InitSCC(&scc_info_TestAllExtensions.base);
  1662. ::google::protobuf::internal::InitSCC(&scc_info_OptionalGroup_extension.base);
  1663. ::google::protobuf::internal::InitSCC(&scc_info_RepeatedGroup_extension.base);
  1664. ::google::protobuf::internal::InitSCC(&scc_info_TestGroup_OptionalGroup.base);
  1665. ::google::protobuf::internal::InitSCC(&scc_info_TestGroup.base);
  1666. ::google::protobuf::internal::InitSCC(&scc_info_TestGroupExtension.base);
  1667. ::google::protobuf::internal::InitSCC(&scc_info_TestNestedExtension_OptionalGroup_extension.base);
  1668. ::google::protobuf::internal::InitSCC(&scc_info_TestNestedExtension.base);
  1669. ::google::protobuf::internal::InitSCC(&scc_info_TestRequired.base);
  1670. ::google::protobuf::internal::InitSCC(&scc_info_TestRequiredForeign.base);
  1671. ::google::protobuf::internal::InitSCC(&scc_info_TestRequiredMessage.base);
  1672. ::google::protobuf::internal::InitSCC(&scc_info_TestForeignNested.base);
  1673. ::google::protobuf::internal::InitSCC(&scc_info_TestEmptyMessage.base);
  1674. ::google::protobuf::internal::InitSCC(&scc_info_TestEmptyMessageWithExtensions.base);
  1675. ::google::protobuf::internal::InitSCC(&scc_info_TestMultipleExtensionRanges.base);
  1676. ::google::protobuf::internal::InitSCC(&scc_info_TestReallyLargeTagNumber.base);
  1677. ::google::protobuf::internal::InitSCC(&scc_info_TestRecursiveMessage.base);
  1678. ::google::protobuf::internal::InitSCC(&scc_info_TestMutualRecursionA.base);
  1679. ::google::protobuf::internal::InitSCC(&scc_info_TestIsInitialized_SubMessage_SubGroup.base);
  1680. ::google::protobuf::internal::InitSCC(&scc_info_TestIsInitialized_SubMessage.base);
  1681. ::google::protobuf::internal::InitSCC(&scc_info_TestIsInitialized.base);
  1682. ::google::protobuf::internal::InitSCC(&scc_info_TestDupFieldNumber_Foo.base);
  1683. ::google::protobuf::internal::InitSCC(&scc_info_TestDupFieldNumber_Bar.base);
  1684. ::google::protobuf::internal::InitSCC(&scc_info_TestDupFieldNumber.base);
  1685. ::google::protobuf::internal::InitSCC(&scc_info_TestEagerMessage.base);
  1686. ::google::protobuf::internal::InitSCC(&scc_info_TestLazyMessage.base);
  1687. ::google::protobuf::internal::InitSCC(&scc_info_TestNestedMessageHasBits_NestedMessage.base);
  1688. ::google::protobuf::internal::InitSCC(&scc_info_TestNestedMessageHasBits.base);
  1689. ::google::protobuf::internal::InitSCC(&scc_info_TestCamelCaseFieldNames.base);
  1690. ::google::protobuf::internal::InitSCC(&scc_info_TestFieldOrderings_NestedMessage.base);
  1691. ::google::protobuf::internal::InitSCC(&scc_info_TestFieldOrderings.base);
  1692. ::google::protobuf::internal::InitSCC(&scc_info_TestExtensionOrderings1.base);
  1693. ::google::protobuf::internal::InitSCC(&scc_info_TestExtensionOrderings2_TestExtensionOrderings3.base);
  1694. ::google::protobuf::internal::InitSCC(&scc_info_TestExtensionOrderings2.base);
  1695. ::google::protobuf::internal::InitSCC(&scc_info_TestExtremeDefaultValues.base);
  1696. ::google::protobuf::internal::InitSCC(&scc_info_SparseEnumMessage.base);
  1697. ::google::protobuf::internal::InitSCC(&scc_info_OneString.base);
  1698. ::google::protobuf::internal::InitSCC(&scc_info_MoreString.base);
  1699. ::google::protobuf::internal::InitSCC(&scc_info_OneBytes.base);
  1700. ::google::protobuf::internal::InitSCC(&scc_info_MoreBytes.base);
  1701. ::google::protobuf::internal::InitSCC(&scc_info_Int32Message.base);
  1702. ::google::protobuf::internal::InitSCC(&scc_info_Uint32Message.base);
  1703. ::google::protobuf::internal::InitSCC(&scc_info_Int64Message.base);
  1704. ::google::protobuf::internal::InitSCC(&scc_info_Uint64Message.base);
  1705. ::google::protobuf::internal::InitSCC(&scc_info_BoolMessage.base);
  1706. ::google::protobuf::internal::InitSCC(&scc_info_TestOneof_FooGroup.base);
  1707. ::google::protobuf::internal::InitSCC(&scc_info_TestOneof.base);
  1708. ::google::protobuf::internal::InitSCC(&scc_info_TestOneofBackwardsCompatible_FooGroup.base);
  1709. ::google::protobuf::internal::InitSCC(&scc_info_TestOneofBackwardsCompatible.base);
  1710. ::google::protobuf::internal::InitSCC(&scc_info_TestOneof2_FooGroup.base);
  1711. ::google::protobuf::internal::InitSCC(&scc_info_TestOneof2_NestedMessage.base);
  1712. ::google::protobuf::internal::InitSCC(&scc_info_TestOneof2.base);
  1713. ::google::protobuf::internal::InitSCC(&scc_info_TestRequiredOneof_NestedMessage.base);
  1714. ::google::protobuf::internal::InitSCC(&scc_info_TestRequiredOneof.base);
  1715. ::google::protobuf::internal::InitSCC(&scc_info_TestPackedTypes.base);
  1716. ::google::protobuf::internal::InitSCC(&scc_info_TestUnpackedTypes.base);
  1717. ::google::protobuf::internal::InitSCC(&scc_info_TestPackedExtensions.base);
  1718. ::google::protobuf::internal::InitSCC(&scc_info_TestUnpackedExtensions.base);
  1719. ::google::protobuf::internal::InitSCC(&scc_info_TestDynamicExtensions_DynamicMessageType.base);
  1720. ::google::protobuf::internal::InitSCC(&scc_info_TestDynamicExtensions.base);
  1721. ::google::protobuf::internal::InitSCC(&scc_info_TestRepeatedScalarDifferentTagSizes.base);
  1722. ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group1.base);
  1723. ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group2.base);
  1724. ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMerge_RepeatedFieldsGenerator.base);
  1725. ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMerge_OptionalGroup.base);
  1726. ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMerge_RepeatedGroup.base);
  1727. ::google::protobuf::internal::InitSCC(&scc_info_TestParsingMerge.base);
  1728. ::google::protobuf::internal::InitSCC(&scc_info_TestCommentInjectionMessage.base);
  1729. ::google::protobuf::internal::InitSCC(&scc_info_FooRequest.base);
  1730. ::google::protobuf::internal::InitSCC(&scc_info_FooResponse.base);
  1731. ::google::protobuf::internal::InitSCC(&scc_info_FooClientMessage.base);
  1732. ::google::protobuf::internal::InitSCC(&scc_info_FooServerMessage.base);
  1733. ::google::protobuf::internal::InitSCC(&scc_info_BarRequest.base);
  1734. ::google::protobuf::internal::InitSCC(&scc_info_BarResponse.base);
  1735. ::google::protobuf::internal::InitSCC(&scc_info_TestJsonName.base);
  1736. ::google::protobuf::internal::InitSCC(&scc_info_TestHugeFieldNumbers_OptionalGroup.base);
  1737. ::google::protobuf::internal::InitSCC(&scc_info_TestHugeFieldNumbers_StringStringMapEntry_DoNotUse.base);
  1738. ::google::protobuf::internal::InitSCC(&scc_info_TestHugeFieldNumbers.base);
  1739. ::google::protobuf::internal::InitSCC(&scc_info_TestExtensionInsideTable.base);
  1740. }
  1741. ::google::protobuf::Metadata file_level_metadata[91];
  1742. const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[6];
  1743. const ::google::protobuf::ServiceDescriptor* file_level_service_descriptors[1];
  1744. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  1745. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_NestedMessage, _has_bits_),
  1746. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_NestedMessage, _internal_metadata_),
  1747. ~0u, // no _extensions_
  1748. ~0u, // no _oneof_case_
  1749. ~0u, // no _weak_field_map_
  1750. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_NestedMessage, bb_),
  1751. 0,
  1752. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_OptionalGroup, _has_bits_),
  1753. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_OptionalGroup, _internal_metadata_),
  1754. ~0u, // no _extensions_
  1755. ~0u, // no _oneof_case_
  1756. ~0u, // no _weak_field_map_
  1757. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_OptionalGroup, a_),
  1758. 0,
  1759. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_RepeatedGroup, _has_bits_),
  1760. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_RepeatedGroup, _internal_metadata_),
  1761. ~0u, // no _extensions_
  1762. ~0u, // no _oneof_case_
  1763. ~0u, // no _weak_field_map_
  1764. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes_RepeatedGroup, a_),
  1765. 0,
  1766. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, _has_bits_),
  1767. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, _internal_metadata_),
  1768. ~0u, // no _extensions_
  1769. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, _oneof_case_[0]),
  1770. ~0u, // no _weak_field_map_
  1771. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_int32_),
  1772. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_int64_),
  1773. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_uint32_),
  1774. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_uint64_),
  1775. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_sint32_),
  1776. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_sint64_),
  1777. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_fixed32_),
  1778. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_fixed64_),
  1779. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_sfixed32_),
  1780. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_sfixed64_),
  1781. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_float_),
  1782. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_double_),
  1783. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_bool_),
  1784. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_string_),
  1785. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_bytes_),
  1786. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optionalgroup_),
  1787. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_nested_message_),
  1788. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_foreign_message_),
  1789. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_import_message_),
  1790. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_nested_enum_),
  1791. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_foreign_enum_),
  1792. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_import_enum_),
  1793. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_string_piece_),
  1794. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_cord_),
  1795. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_public_import_message_),
  1796. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, optional_lazy_message_),
  1797. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_int32_),
  1798. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_int64_),
  1799. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_uint32_),
  1800. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_uint64_),
  1801. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_sint32_),
  1802. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_sint64_),
  1803. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_fixed32_),
  1804. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_fixed64_),
  1805. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_sfixed32_),
  1806. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_sfixed64_),
  1807. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_float_),
  1808. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_double_),
  1809. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_bool_),
  1810. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_string_),
  1811. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_bytes_),
  1812. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeatedgroup_),
  1813. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_nested_message_),
  1814. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_foreign_message_),
  1815. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_import_message_),
  1816. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_nested_enum_),
  1817. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_foreign_enum_),
  1818. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_import_enum_),
  1819. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_string_piece_),
  1820. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_cord_),
  1821. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, repeated_lazy_message_),
  1822. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_int32_),
  1823. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_int64_),
  1824. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_uint32_),
  1825. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_uint64_),
  1826. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_sint32_),
  1827. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_sint64_),
  1828. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_fixed32_),
  1829. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_fixed64_),
  1830. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_sfixed32_),
  1831. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_sfixed64_),
  1832. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_float_),
  1833. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_double_),
  1834. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_bool_),
  1835. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_string_),
  1836. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_bytes_),
  1837. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_nested_enum_),
  1838. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_foreign_enum_),
  1839. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_import_enum_),
  1840. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_string_piece_),
  1841. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, default_cord_),
  1842. offsetof(::protobuf_unittest::TestAllTypesDefaultTypeInternal, oneof_uint32_),
  1843. offsetof(::protobuf_unittest::TestAllTypesDefaultTypeInternal, oneof_nested_message_),
  1844. offsetof(::protobuf_unittest::TestAllTypesDefaultTypeInternal, oneof_string_),
  1845. offsetof(::protobuf_unittest::TestAllTypesDefaultTypeInternal, oneof_bytes_),
  1846. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllTypes, oneof_field_),
  1847. 15,
  1848. 14,
  1849. 16,
  1850. 17,
  1851. 19,
  1852. 18,
  1853. 20,
  1854. 21,
  1855. 23,
  1856. 22,
  1857. 24,
  1858. 25,
  1859. 26,
  1860. 0,
  1861. 1,
  1862. 8,
  1863. 9,
  1864. 10,
  1865. 11,
  1866. 28,
  1867. 29,
  1868. 30,
  1869. 2,
  1870. 3,
  1871. 12,
  1872. 13,
  1873. ~0u,
  1874. ~0u,
  1875. ~0u,
  1876. ~0u,
  1877. ~0u,
  1878. ~0u,
  1879. ~0u,
  1880. ~0u,
  1881. ~0u,
  1882. ~0u,
  1883. ~0u,
  1884. ~0u,
  1885. ~0u,
  1886. ~0u,
  1887. ~0u,
  1888. ~0u,
  1889. ~0u,
  1890. ~0u,
  1891. ~0u,
  1892. ~0u,
  1893. ~0u,
  1894. ~0u,
  1895. ~0u,
  1896. ~0u,
  1897. ~0u,
  1898. 31,
  1899. 32,
  1900. 34,
  1901. 33,
  1902. 35,
  1903. 36,
  1904. 38,
  1905. 37,
  1906. 39,
  1907. 40,
  1908. 42,
  1909. 41,
  1910. 43,
  1911. 4,
  1912. 5,
  1913. 44,
  1914. 45,
  1915. 27,
  1916. 6,
  1917. 7,
  1918. ~0u,
  1919. ~0u,
  1920. ~0u,
  1921. ~0u,
  1922. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedTestAllTypes, _has_bits_),
  1923. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedTestAllTypes, _internal_metadata_),
  1924. ~0u, // no _extensions_
  1925. ~0u, // no _oneof_case_
  1926. ~0u, // no _weak_field_map_
  1927. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedTestAllTypes, child_),
  1928. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedTestAllTypes, payload_),
  1929. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::NestedTestAllTypes, repeated_child_),
  1930. 0,
  1931. 1,
  1932. ~0u,
  1933. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDeprecatedFields, _has_bits_),
  1934. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDeprecatedFields, _internal_metadata_),
  1935. ~0u, // no _extensions_
  1936. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDeprecatedFields, _oneof_case_[0]),
  1937. ~0u, // no _weak_field_map_
  1938. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDeprecatedFields, deprecated_int32_),
  1939. offsetof(::protobuf_unittest::TestDeprecatedFieldsDefaultTypeInternal, deprecated_int32_in_oneof_),
  1940. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDeprecatedFields, oneof_fields_),
  1941. 0,
  1942. ~0u,
  1943. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDeprecatedMessage, _has_bits_),
  1944. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDeprecatedMessage, _internal_metadata_),
  1945. ~0u, // no _extensions_
  1946. ~0u, // no _oneof_case_
  1947. ~0u, // no _weak_field_map_
  1948. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ForeignMessage, _has_bits_),
  1949. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ForeignMessage, _internal_metadata_),
  1950. ~0u, // no _extensions_
  1951. ~0u, // no _oneof_case_
  1952. ~0u, // no _weak_field_map_
  1953. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ForeignMessage, c_),
  1954. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::ForeignMessage, d_),
  1955. 0,
  1956. 1,
  1957. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestReservedFields, _has_bits_),
  1958. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestReservedFields, _internal_metadata_),
  1959. ~0u, // no _extensions_
  1960. ~0u, // no _oneof_case_
  1961. ~0u, // no _weak_field_map_
  1962. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllExtensions, _has_bits_),
  1963. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllExtensions, _internal_metadata_),
  1964. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestAllExtensions, _extensions_),
  1965. ~0u, // no _oneof_case_
  1966. ~0u, // no _weak_field_map_
  1967. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OptionalGroup_extension, _has_bits_),
  1968. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OptionalGroup_extension, _internal_metadata_),
  1969. ~0u, // no _extensions_
  1970. ~0u, // no _oneof_case_
  1971. ~0u, // no _weak_field_map_
  1972. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OptionalGroup_extension, a_),
  1973. 0,
  1974. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::RepeatedGroup_extension, _has_bits_),
  1975. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::RepeatedGroup_extension, _internal_metadata_),
  1976. ~0u, // no _extensions_
  1977. ~0u, // no _oneof_case_
  1978. ~0u, // no _weak_field_map_
  1979. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::RepeatedGroup_extension, a_),
  1980. 0,
  1981. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroup_OptionalGroup, _has_bits_),
  1982. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroup_OptionalGroup, _internal_metadata_),
  1983. ~0u, // no _extensions_
  1984. ~0u, // no _oneof_case_
  1985. ~0u, // no _weak_field_map_
  1986. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroup_OptionalGroup, a_),
  1987. 0,
  1988. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroup, _has_bits_),
  1989. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroup, _internal_metadata_),
  1990. ~0u, // no _extensions_
  1991. ~0u, // no _oneof_case_
  1992. ~0u, // no _weak_field_map_
  1993. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroup, optionalgroup_),
  1994. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroup, optional_foreign_enum_),
  1995. 0,
  1996. 1,
  1997. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroupExtension, _has_bits_),
  1998. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroupExtension, _internal_metadata_),
  1999. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestGroupExtension, _extensions_),
  2000. ~0u, // no _oneof_case_
  2001. ~0u, // no _weak_field_map_
  2002. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedExtension_OptionalGroup_extension, _has_bits_),
  2003. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedExtension_OptionalGroup_extension, _internal_metadata_),
  2004. ~0u, // no _extensions_
  2005. ~0u, // no _oneof_case_
  2006. ~0u, // no _weak_field_map_
  2007. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedExtension_OptionalGroup_extension, a_),
  2008. 0,
  2009. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedExtension, _has_bits_),
  2010. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedExtension, _internal_metadata_),
  2011. ~0u, // no _extensions_
  2012. ~0u, // no _oneof_case_
  2013. ~0u, // no _weak_field_map_
  2014. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, _has_bits_),
  2015. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, _internal_metadata_),
  2016. ~0u, // no _extensions_
  2017. ~0u, // no _oneof_case_
  2018. ~0u, // no _weak_field_map_
  2019. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, a_),
  2020. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy2_),
  2021. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, b_),
  2022. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy4_),
  2023. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy5_),
  2024. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy6_),
  2025. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy7_),
  2026. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy8_),
  2027. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy9_),
  2028. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy10_),
  2029. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy11_),
  2030. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy12_),
  2031. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy13_),
  2032. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy14_),
  2033. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy15_),
  2034. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy16_),
  2035. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy17_),
  2036. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy18_),
  2037. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy19_),
  2038. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy20_),
  2039. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy21_),
  2040. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy22_),
  2041. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy23_),
  2042. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy24_),
  2043. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy25_),
  2044. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy26_),
  2045. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy27_),
  2046. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy28_),
  2047. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy29_),
  2048. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy30_),
  2049. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy31_),
  2050. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, dummy32_),
  2051. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequired, c_),
  2052. 0,
  2053. 1,
  2054. 2,
  2055. 3,
  2056. 4,
  2057. 5,
  2058. 6,
  2059. 7,
  2060. 8,
  2061. 9,
  2062. 10,
  2063. 11,
  2064. 12,
  2065. 13,
  2066. 14,
  2067. 15,
  2068. 16,
  2069. 17,
  2070. 18,
  2071. 19,
  2072. 20,
  2073. 21,
  2074. 22,
  2075. 23,
  2076. 24,
  2077. 25,
  2078. 26,
  2079. 27,
  2080. 28,
  2081. 29,
  2082. 30,
  2083. 31,
  2084. 32,
  2085. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredForeign, _has_bits_),
  2086. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredForeign, _internal_metadata_),
  2087. ~0u, // no _extensions_
  2088. ~0u, // no _oneof_case_
  2089. ~0u, // no _weak_field_map_
  2090. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredForeign, optional_message_),
  2091. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredForeign, repeated_message_),
  2092. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredForeign, dummy_),
  2093. 0,
  2094. ~0u,
  2095. 1,
  2096. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredMessage, _has_bits_),
  2097. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredMessage, _internal_metadata_),
  2098. ~0u, // no _extensions_
  2099. ~0u, // no _oneof_case_
  2100. ~0u, // no _weak_field_map_
  2101. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredMessage, optional_message_),
  2102. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredMessage, repeated_message_),
  2103. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredMessage, required_message_),
  2104. 0,
  2105. ~0u,
  2106. 1,
  2107. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestForeignNested, _has_bits_),
  2108. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestForeignNested, _internal_metadata_),
  2109. ~0u, // no _extensions_
  2110. ~0u, // no _oneof_case_
  2111. ~0u, // no _weak_field_map_
  2112. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestForeignNested, foreign_nested_),
  2113. 0,
  2114. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEmptyMessage, _has_bits_),
  2115. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEmptyMessage, _internal_metadata_),
  2116. ~0u, // no _extensions_
  2117. ~0u, // no _oneof_case_
  2118. ~0u, // no _weak_field_map_
  2119. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEmptyMessageWithExtensions, _has_bits_),
  2120. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEmptyMessageWithExtensions, _internal_metadata_),
  2121. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEmptyMessageWithExtensions, _extensions_),
  2122. ~0u, // no _oneof_case_
  2123. ~0u, // no _weak_field_map_
  2124. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMultipleExtensionRanges, _has_bits_),
  2125. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMultipleExtensionRanges, _internal_metadata_),
  2126. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMultipleExtensionRanges, _extensions_),
  2127. ~0u, // no _oneof_case_
  2128. ~0u, // no _weak_field_map_
  2129. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestReallyLargeTagNumber, _has_bits_),
  2130. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestReallyLargeTagNumber, _internal_metadata_),
  2131. ~0u, // no _extensions_
  2132. ~0u, // no _oneof_case_
  2133. ~0u, // no _weak_field_map_
  2134. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestReallyLargeTagNumber, a_),
  2135. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestReallyLargeTagNumber, bb_),
  2136. 0,
  2137. 1,
  2138. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRecursiveMessage, _has_bits_),
  2139. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRecursiveMessage, _internal_metadata_),
  2140. ~0u, // no _extensions_
  2141. ~0u, // no _oneof_case_
  2142. ~0u, // no _weak_field_map_
  2143. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRecursiveMessage, a_),
  2144. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRecursiveMessage, i_),
  2145. 0,
  2146. 1,
  2147. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA_SubMessage, _has_bits_),
  2148. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA_SubMessage, _internal_metadata_),
  2149. ~0u, // no _extensions_
  2150. ~0u, // no _oneof_case_
  2151. ~0u, // no _weak_field_map_
  2152. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA_SubMessage, b_),
  2153. 0,
  2154. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA_SubGroup, _has_bits_),
  2155. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA_SubGroup, _internal_metadata_),
  2156. ~0u, // no _extensions_
  2157. ~0u, // no _oneof_case_
  2158. ~0u, // no _weak_field_map_
  2159. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA_SubGroup, sub_message_),
  2160. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA_SubGroup, not_in_this_scc_),
  2161. 0,
  2162. 1,
  2163. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA, _has_bits_),
  2164. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA, _internal_metadata_),
  2165. ~0u, // no _extensions_
  2166. ~0u, // no _oneof_case_
  2167. ~0u, // no _weak_field_map_
  2168. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA, bb_),
  2169. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionA, subgroup_),
  2170. 0,
  2171. 1,
  2172. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionB, _has_bits_),
  2173. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionB, _internal_metadata_),
  2174. ~0u, // no _extensions_
  2175. ~0u, // no _oneof_case_
  2176. ~0u, // no _weak_field_map_
  2177. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionB, a_),
  2178. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMutualRecursionB, optional_int32_),
  2179. 0,
  2180. 1,
  2181. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup, _has_bits_),
  2182. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup, _internal_metadata_),
  2183. ~0u, // no _extensions_
  2184. ~0u, // no _oneof_case_
  2185. ~0u, // no _weak_field_map_
  2186. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup, i_),
  2187. 0,
  2188. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized_SubMessage, _has_bits_),
  2189. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized_SubMessage, _internal_metadata_),
  2190. ~0u, // no _extensions_
  2191. ~0u, // no _oneof_case_
  2192. ~0u, // no _weak_field_map_
  2193. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized_SubMessage, subgroup_),
  2194. 0,
  2195. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized, _has_bits_),
  2196. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized, _internal_metadata_),
  2197. ~0u, // no _extensions_
  2198. ~0u, // no _oneof_case_
  2199. ~0u, // no _weak_field_map_
  2200. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIsInitialized, sub_message_),
  2201. 0,
  2202. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber_Foo, _has_bits_),
  2203. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber_Foo, _internal_metadata_),
  2204. ~0u, // no _extensions_
  2205. ~0u, // no _oneof_case_
  2206. ~0u, // no _weak_field_map_
  2207. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber_Foo, a_),
  2208. 0,
  2209. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber_Bar, _has_bits_),
  2210. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber_Bar, _internal_metadata_),
  2211. ~0u, // no _extensions_
  2212. ~0u, // no _oneof_case_
  2213. ~0u, // no _weak_field_map_
  2214. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber_Bar, a_),
  2215. 0,
  2216. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber, _has_bits_),
  2217. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber, _internal_metadata_),
  2218. ~0u, // no _extensions_
  2219. ~0u, // no _oneof_case_
  2220. ~0u, // no _weak_field_map_
  2221. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber, a_),
  2222. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber, foo_),
  2223. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDupFieldNumber, bar_),
  2224. 2,
  2225. 0,
  2226. 1,
  2227. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEagerMessage, _has_bits_),
  2228. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEagerMessage, _internal_metadata_),
  2229. ~0u, // no _extensions_
  2230. ~0u, // no _oneof_case_
  2231. ~0u, // no _weak_field_map_
  2232. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEagerMessage, sub_message_),
  2233. 0,
  2234. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestLazyMessage, _has_bits_),
  2235. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestLazyMessage, _internal_metadata_),
  2236. ~0u, // no _extensions_
  2237. ~0u, // no _oneof_case_
  2238. ~0u, // no _weak_field_map_
  2239. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestLazyMessage, sub_message_),
  2240. 0,
  2241. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedMessageHasBits_NestedMessage, _has_bits_),
  2242. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedMessageHasBits_NestedMessage, _internal_metadata_),
  2243. ~0u, // no _extensions_
  2244. ~0u, // no _oneof_case_
  2245. ~0u, // no _weak_field_map_
  2246. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedMessageHasBits_NestedMessage, nestedmessage_repeated_int32_),
  2247. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedMessageHasBits_NestedMessage, nestedmessage_repeated_foreignmessage_),
  2248. ~0u,
  2249. ~0u,
  2250. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedMessageHasBits, _has_bits_),
  2251. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedMessageHasBits, _internal_metadata_),
  2252. ~0u, // no _extensions_
  2253. ~0u, // no _oneof_case_
  2254. ~0u, // no _weak_field_map_
  2255. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestNestedMessageHasBits, optional_nested_message_),
  2256. 0,
  2257. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, _has_bits_),
  2258. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, _internal_metadata_),
  2259. ~0u, // no _extensions_
  2260. ~0u, // no _oneof_case_
  2261. ~0u, // no _weak_field_map_
  2262. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, primitivefield_),
  2263. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, stringfield_),
  2264. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, enumfield_),
  2265. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, messagefield_),
  2266. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, stringpiecefield_),
  2267. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, cordfield_),
  2268. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, repeatedprimitivefield_),
  2269. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, repeatedstringfield_),
  2270. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, repeatedenumfield_),
  2271. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, repeatedmessagefield_),
  2272. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, repeatedstringpiecefield_),
  2273. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCamelCaseFieldNames, repeatedcordfield_),
  2274. 4,
  2275. 0,
  2276. 5,
  2277. 3,
  2278. 1,
  2279. 2,
  2280. ~0u,
  2281. ~0u,
  2282. ~0u,
  2283. ~0u,
  2284. ~0u,
  2285. ~0u,
  2286. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings_NestedMessage, _has_bits_),
  2287. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings_NestedMessage, _internal_metadata_),
  2288. ~0u, // no _extensions_
  2289. ~0u, // no _oneof_case_
  2290. ~0u, // no _weak_field_map_
  2291. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings_NestedMessage, oo_),
  2292. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings_NestedMessage, bb_),
  2293. 0,
  2294. 1,
  2295. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings, _has_bits_),
  2296. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings, _internal_metadata_),
  2297. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings, _extensions_),
  2298. ~0u, // no _oneof_case_
  2299. ~0u, // no _weak_field_map_
  2300. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings, my_string_),
  2301. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings, my_int_),
  2302. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings, my_float_),
  2303. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestFieldOrderings, optional_nested_message_),
  2304. 0,
  2305. 2,
  2306. 3,
  2307. 1,
  2308. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings1, _has_bits_),
  2309. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings1, _internal_metadata_),
  2310. ~0u, // no _extensions_
  2311. ~0u, // no _oneof_case_
  2312. ~0u, // no _weak_field_map_
  2313. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings1, my_string_),
  2314. 0,
  2315. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3, _has_bits_),
  2316. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3, _internal_metadata_),
  2317. ~0u, // no _extensions_
  2318. ~0u, // no _oneof_case_
  2319. ~0u, // no _weak_field_map_
  2320. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3, my_string_),
  2321. 0,
  2322. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings2, _has_bits_),
  2323. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings2, _internal_metadata_),
  2324. ~0u, // no _extensions_
  2325. ~0u, // no _oneof_case_
  2326. ~0u, // no _weak_field_map_
  2327. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionOrderings2, my_string_),
  2328. 0,
  2329. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, _has_bits_),
  2330. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, _internal_metadata_),
  2331. ~0u, // no _extensions_
  2332. ~0u, // no _oneof_case_
  2333. ~0u, // no _weak_field_map_
  2334. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, escaped_bytes_),
  2335. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, large_uint32_),
  2336. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, large_uint64_),
  2337. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, small_int32_),
  2338. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, small_int64_),
  2339. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, really_small_int32_),
  2340. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, really_small_int64_),
  2341. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, utf8_string_),
  2342. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, zero_float_),
  2343. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, one_float_),
  2344. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, small_float_),
  2345. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, negative_one_float_),
  2346. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, negative_float_),
  2347. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, large_float_),
  2348. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, small_negative_float_),
  2349. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, inf_double_),
  2350. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, neg_inf_double_),
  2351. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, nan_double_),
  2352. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, inf_float_),
  2353. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, neg_inf_float_),
  2354. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, nan_float_),
  2355. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, cpp_trigraph_),
  2356. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, string_with_zero_),
  2357. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, bytes_with_zero_),
  2358. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, string_piece_with_zero_),
  2359. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, cord_with_zero_),
  2360. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtremeDefaultValues, replacement_string_),
  2361. 0,
  2362. 10,
  2363. 9,
  2364. 11,
  2365. 12,
  2366. 25,
  2367. 26,
  2368. 1,
  2369. 8,
  2370. 13,
  2371. 14,
  2372. 15,
  2373. 16,
  2374. 17,
  2375. 18,
  2376. 19,
  2377. 20,
  2378. 21,
  2379. 22,
  2380. 23,
  2381. 24,
  2382. 2,
  2383. 3,
  2384. 4,
  2385. 5,
  2386. 6,
  2387. 7,
  2388. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::SparseEnumMessage, _has_bits_),
  2389. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::SparseEnumMessage, _internal_metadata_),
  2390. ~0u, // no _extensions_
  2391. ~0u, // no _oneof_case_
  2392. ~0u, // no _weak_field_map_
  2393. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::SparseEnumMessage, sparse_enum_),
  2394. 0,
  2395. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OneString, _has_bits_),
  2396. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OneString, _internal_metadata_),
  2397. ~0u, // no _extensions_
  2398. ~0u, // no _oneof_case_
  2399. ~0u, // no _weak_field_map_
  2400. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OneString, data_),
  2401. 0,
  2402. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::MoreString, _has_bits_),
  2403. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::MoreString, _internal_metadata_),
  2404. ~0u, // no _extensions_
  2405. ~0u, // no _oneof_case_
  2406. ~0u, // no _weak_field_map_
  2407. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::MoreString, data_),
  2408. ~0u,
  2409. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OneBytes, _has_bits_),
  2410. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OneBytes, _internal_metadata_),
  2411. ~0u, // no _extensions_
  2412. ~0u, // no _oneof_case_
  2413. ~0u, // no _weak_field_map_
  2414. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::OneBytes, data_),
  2415. 0,
  2416. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::MoreBytes, _has_bits_),
  2417. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::MoreBytes, _internal_metadata_),
  2418. ~0u, // no _extensions_
  2419. ~0u, // no _oneof_case_
  2420. ~0u, // no _weak_field_map_
  2421. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::MoreBytes, data_),
  2422. ~0u,
  2423. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Int32Message, _has_bits_),
  2424. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Int32Message, _internal_metadata_),
  2425. ~0u, // no _extensions_
  2426. ~0u, // no _oneof_case_
  2427. ~0u, // no _weak_field_map_
  2428. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Int32Message, data_),
  2429. 0,
  2430. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Uint32Message, _has_bits_),
  2431. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Uint32Message, _internal_metadata_),
  2432. ~0u, // no _extensions_
  2433. ~0u, // no _oneof_case_
  2434. ~0u, // no _weak_field_map_
  2435. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Uint32Message, data_),
  2436. 0,
  2437. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Int64Message, _has_bits_),
  2438. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Int64Message, _internal_metadata_),
  2439. ~0u, // no _extensions_
  2440. ~0u, // no _oneof_case_
  2441. ~0u, // no _weak_field_map_
  2442. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Int64Message, data_),
  2443. 0,
  2444. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Uint64Message, _has_bits_),
  2445. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Uint64Message, _internal_metadata_),
  2446. ~0u, // no _extensions_
  2447. ~0u, // no _oneof_case_
  2448. ~0u, // no _weak_field_map_
  2449. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::Uint64Message, data_),
  2450. 0,
  2451. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::BoolMessage, _has_bits_),
  2452. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::BoolMessage, _internal_metadata_),
  2453. ~0u, // no _extensions_
  2454. ~0u, // no _oneof_case_
  2455. ~0u, // no _weak_field_map_
  2456. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::BoolMessage, data_),
  2457. 0,
  2458. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof_FooGroup, _has_bits_),
  2459. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof_FooGroup, _internal_metadata_),
  2460. ~0u, // no _extensions_
  2461. ~0u, // no _oneof_case_
  2462. ~0u, // no _weak_field_map_
  2463. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof_FooGroup, a_),
  2464. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof_FooGroup, b_),
  2465. 1,
  2466. 0,
  2467. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof, _has_bits_),
  2468. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof, _internal_metadata_),
  2469. ~0u, // no _extensions_
  2470. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof, _oneof_case_[0]),
  2471. ~0u, // no _weak_field_map_
  2472. offsetof(::protobuf_unittest::TestOneofDefaultTypeInternal, foo_int_),
  2473. offsetof(::protobuf_unittest::TestOneofDefaultTypeInternal, foo_string_),
  2474. offsetof(::protobuf_unittest::TestOneofDefaultTypeInternal, foo_message_),
  2475. offsetof(::protobuf_unittest::TestOneofDefaultTypeInternal, foogroup_),
  2476. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof, foo_),
  2477. ~0u,
  2478. ~0u,
  2479. ~0u,
  2480. ~0u,
  2481. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup, _has_bits_),
  2482. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup, _internal_metadata_),
  2483. ~0u, // no _extensions_
  2484. ~0u, // no _oneof_case_
  2485. ~0u, // no _weak_field_map_
  2486. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup, a_),
  2487. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup, b_),
  2488. 1,
  2489. 0,
  2490. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible, _has_bits_),
  2491. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible, _internal_metadata_),
  2492. ~0u, // no _extensions_
  2493. ~0u, // no _oneof_case_
  2494. ~0u, // no _weak_field_map_
  2495. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible, foo_int_),
  2496. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible, foo_string_),
  2497. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible, foo_message_),
  2498. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneofBackwardsCompatible, foogroup_),
  2499. 3,
  2500. 0,
  2501. 1,
  2502. 2,
  2503. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_FooGroup, _has_bits_),
  2504. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_FooGroup, _internal_metadata_),
  2505. ~0u, // no _extensions_
  2506. ~0u, // no _oneof_case_
  2507. ~0u, // no _weak_field_map_
  2508. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_FooGroup, a_),
  2509. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_FooGroup, b_),
  2510. 1,
  2511. 0,
  2512. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_NestedMessage, _has_bits_),
  2513. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_NestedMessage, _internal_metadata_),
  2514. ~0u, // no _extensions_
  2515. ~0u, // no _oneof_case_
  2516. ~0u, // no _weak_field_map_
  2517. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_NestedMessage, qux_int_),
  2518. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2_NestedMessage, corge_int_),
  2519. 0,
  2520. ~0u,
  2521. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2, _has_bits_),
  2522. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2, _internal_metadata_),
  2523. ~0u, // no _extensions_
  2524. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2, _oneof_case_[0]),
  2525. ~0u, // no _weak_field_map_
  2526. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_int_),
  2527. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_string_),
  2528. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_cord_),
  2529. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_string_piece_),
  2530. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_bytes_),
  2531. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_enum_),
  2532. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_message_),
  2533. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foogroup_),
  2534. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, foo_lazy_message_),
  2535. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, bar_int_),
  2536. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, bar_string_),
  2537. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, bar_cord_),
  2538. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, bar_string_piece_),
  2539. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, bar_bytes_),
  2540. offsetof(::protobuf_unittest::TestOneof2DefaultTypeInternal, bar_enum_),
  2541. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2, baz_int_),
  2542. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2, baz_string_),
  2543. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2, foo_),
  2544. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestOneof2, bar_),
  2545. ~0u,
  2546. ~0u,
  2547. ~0u,
  2548. ~0u,
  2549. ~0u,
  2550. ~0u,
  2551. ~0u,
  2552. ~0u,
  2553. ~0u,
  2554. ~0u,
  2555. ~0u,
  2556. ~0u,
  2557. ~0u,
  2558. ~0u,
  2559. ~0u,
  2560. 1,
  2561. 0,
  2562. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredOneof_NestedMessage, _has_bits_),
  2563. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredOneof_NestedMessage, _internal_metadata_),
  2564. ~0u, // no _extensions_
  2565. ~0u, // no _oneof_case_
  2566. ~0u, // no _weak_field_map_
  2567. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredOneof_NestedMessage, required_double_),
  2568. 0,
  2569. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredOneof, _has_bits_),
  2570. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredOneof, _internal_metadata_),
  2571. ~0u, // no _extensions_
  2572. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredOneof, _oneof_case_[0]),
  2573. ~0u, // no _weak_field_map_
  2574. offsetof(::protobuf_unittest::TestRequiredOneofDefaultTypeInternal, foo_int_),
  2575. offsetof(::protobuf_unittest::TestRequiredOneofDefaultTypeInternal, foo_string_),
  2576. offsetof(::protobuf_unittest::TestRequiredOneofDefaultTypeInternal, foo_message_),
  2577. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRequiredOneof, foo_),
  2578. ~0u,
  2579. ~0u,
  2580. ~0u,
  2581. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, _has_bits_),
  2582. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, _internal_metadata_),
  2583. ~0u, // no _extensions_
  2584. ~0u, // no _oneof_case_
  2585. ~0u, // no _weak_field_map_
  2586. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_int32_),
  2587. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_int64_),
  2588. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_uint32_),
  2589. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_uint64_),
  2590. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_sint32_),
  2591. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_sint64_),
  2592. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_fixed32_),
  2593. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_fixed64_),
  2594. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_sfixed32_),
  2595. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_sfixed64_),
  2596. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_float_),
  2597. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_double_),
  2598. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_bool_),
  2599. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedTypes, packed_enum_),
  2600. ~0u,
  2601. ~0u,
  2602. ~0u,
  2603. ~0u,
  2604. ~0u,
  2605. ~0u,
  2606. ~0u,
  2607. ~0u,
  2608. ~0u,
  2609. ~0u,
  2610. ~0u,
  2611. ~0u,
  2612. ~0u,
  2613. ~0u,
  2614. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, _has_bits_),
  2615. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, _internal_metadata_),
  2616. ~0u, // no _extensions_
  2617. ~0u, // no _oneof_case_
  2618. ~0u, // no _weak_field_map_
  2619. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_int32_),
  2620. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_int64_),
  2621. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_uint32_),
  2622. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_uint64_),
  2623. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_sint32_),
  2624. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_sint64_),
  2625. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_fixed32_),
  2626. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_fixed64_),
  2627. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_sfixed32_),
  2628. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_sfixed64_),
  2629. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_float_),
  2630. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_double_),
  2631. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_bool_),
  2632. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedTypes, unpacked_enum_),
  2633. ~0u,
  2634. ~0u,
  2635. ~0u,
  2636. ~0u,
  2637. ~0u,
  2638. ~0u,
  2639. ~0u,
  2640. ~0u,
  2641. ~0u,
  2642. ~0u,
  2643. ~0u,
  2644. ~0u,
  2645. ~0u,
  2646. ~0u,
  2647. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedExtensions, _has_bits_),
  2648. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedExtensions, _internal_metadata_),
  2649. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestPackedExtensions, _extensions_),
  2650. ~0u, // no _oneof_case_
  2651. ~0u, // no _weak_field_map_
  2652. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedExtensions, _has_bits_),
  2653. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedExtensions, _internal_metadata_),
  2654. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestUnpackedExtensions, _extensions_),
  2655. ~0u, // no _oneof_case_
  2656. ~0u, // no _weak_field_map_
  2657. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions_DynamicMessageType, _has_bits_),
  2658. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions_DynamicMessageType, _internal_metadata_),
  2659. ~0u, // no _extensions_
  2660. ~0u, // no _oneof_case_
  2661. ~0u, // no _weak_field_map_
  2662. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions_DynamicMessageType, dynamic_field_),
  2663. 0,
  2664. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, _has_bits_),
  2665. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, _internal_metadata_),
  2666. ~0u, // no _extensions_
  2667. ~0u, // no _oneof_case_
  2668. ~0u, // no _weak_field_map_
  2669. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, scalar_extension_),
  2670. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, enum_extension_),
  2671. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, dynamic_enum_extension_),
  2672. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, message_extension_),
  2673. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, dynamic_message_extension_),
  2674. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, repeated_extension_),
  2675. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDynamicExtensions, packed_extension_),
  2676. 2,
  2677. 3,
  2678. 4,
  2679. 0,
  2680. 1,
  2681. ~0u,
  2682. ~0u,
  2683. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, _has_bits_),
  2684. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, _internal_metadata_),
  2685. ~0u, // no _extensions_
  2686. ~0u, // no _oneof_case_
  2687. ~0u, // no _weak_field_map_
  2688. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, repeated_fixed32_),
  2689. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, repeated_int32_),
  2690. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, repeated_fixed64_),
  2691. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, repeated_int64_),
  2692. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, repeated_float_),
  2693. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes, repeated_uint64_),
  2694. ~0u,
  2695. ~0u,
  2696. ~0u,
  2697. ~0u,
  2698. ~0u,
  2699. ~0u,
  2700. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1, _has_bits_),
  2701. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1, _internal_metadata_),
  2702. ~0u, // no _extensions_
  2703. ~0u, // no _oneof_case_
  2704. ~0u, // no _weak_field_map_
  2705. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1, field1_),
  2706. 0,
  2707. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2, _has_bits_),
  2708. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2, _internal_metadata_),
  2709. ~0u, // no _extensions_
  2710. ~0u, // no _oneof_case_
  2711. ~0u, // no _weak_field_map_
  2712. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2, field1_),
  2713. 0,
  2714. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, _has_bits_),
  2715. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, _internal_metadata_),
  2716. ~0u, // no _extensions_
  2717. ~0u, // no _oneof_case_
  2718. ~0u, // no _weak_field_map_
  2719. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, field1_),
  2720. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, field2_),
  2721. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, field3_),
  2722. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, group1_),
  2723. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, group2_),
  2724. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, ext1_),
  2725. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator, ext2_),
  2726. ~0u,
  2727. ~0u,
  2728. ~0u,
  2729. ~0u,
  2730. ~0u,
  2731. ~0u,
  2732. ~0u,
  2733. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_OptionalGroup, _has_bits_),
  2734. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_OptionalGroup, _internal_metadata_),
  2735. ~0u, // no _extensions_
  2736. ~0u, // no _oneof_case_
  2737. ~0u, // no _weak_field_map_
  2738. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_OptionalGroup, optional_group_all_types_),
  2739. 0,
  2740. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedGroup, _has_bits_),
  2741. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedGroup, _internal_metadata_),
  2742. ~0u, // no _extensions_
  2743. ~0u, // no _oneof_case_
  2744. ~0u, // no _weak_field_map_
  2745. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge_RepeatedGroup, repeated_group_all_types_),
  2746. 0,
  2747. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, _has_bits_),
  2748. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, _internal_metadata_),
  2749. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, _extensions_),
  2750. ~0u, // no _oneof_case_
  2751. ~0u, // no _weak_field_map_
  2752. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, required_all_types_),
  2753. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, optional_all_types_),
  2754. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, repeated_all_types_),
  2755. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, optionalgroup_),
  2756. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestParsingMerge, repeatedgroup_),
  2757. 0,
  2758. 1,
  2759. ~0u,
  2760. 2,
  2761. ~0u,
  2762. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCommentInjectionMessage, _has_bits_),
  2763. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCommentInjectionMessage, _internal_metadata_),
  2764. ~0u, // no _extensions_
  2765. ~0u, // no _oneof_case_
  2766. ~0u, // no _weak_field_map_
  2767. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestCommentInjectionMessage, a_),
  2768. 0,
  2769. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooRequest, _has_bits_),
  2770. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooRequest, _internal_metadata_),
  2771. ~0u, // no _extensions_
  2772. ~0u, // no _oneof_case_
  2773. ~0u, // no _weak_field_map_
  2774. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooResponse, _has_bits_),
  2775. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooResponse, _internal_metadata_),
  2776. ~0u, // no _extensions_
  2777. ~0u, // no _oneof_case_
  2778. ~0u, // no _weak_field_map_
  2779. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooClientMessage, _has_bits_),
  2780. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooClientMessage, _internal_metadata_),
  2781. ~0u, // no _extensions_
  2782. ~0u, // no _oneof_case_
  2783. ~0u, // no _weak_field_map_
  2784. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooServerMessage, _has_bits_),
  2785. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::FooServerMessage, _internal_metadata_),
  2786. ~0u, // no _extensions_
  2787. ~0u, // no _oneof_case_
  2788. ~0u, // no _weak_field_map_
  2789. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::BarRequest, _has_bits_),
  2790. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::BarRequest, _internal_metadata_),
  2791. ~0u, // no _extensions_
  2792. ~0u, // no _oneof_case_
  2793. ~0u, // no _weak_field_map_
  2794. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::BarResponse, _has_bits_),
  2795. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::BarResponse, _internal_metadata_),
  2796. ~0u, // no _extensions_
  2797. ~0u, // no _oneof_case_
  2798. ~0u, // no _weak_field_map_
  2799. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, _has_bits_),
  2800. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, _internal_metadata_),
  2801. ~0u, // no _extensions_
  2802. ~0u, // no _oneof_case_
  2803. ~0u, // no _weak_field_map_
  2804. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, field_name1_),
  2805. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, fieldname2_),
  2806. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, fieldname3_),
  2807. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, _field_name4_),
  2808. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, field_name5_),
  2809. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestJsonName, field_name6_),
  2810. 0,
  2811. 1,
  2812. 2,
  2813. 3,
  2814. 4,
  2815. 5,
  2816. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup, _has_bits_),
  2817. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup, _internal_metadata_),
  2818. ~0u, // no _extensions_
  2819. ~0u, // no _oneof_case_
  2820. ~0u, // no _weak_field_map_
  2821. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup, group_a_),
  2822. 0,
  2823. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse, _has_bits_),
  2824. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse, _internal_metadata_),
  2825. ~0u, // no _extensions_
  2826. ~0u, // no _oneof_case_
  2827. ~0u, // no _weak_field_map_
  2828. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse, key_),
  2829. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse, value_),
  2830. 0,
  2831. 1,
  2832. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, _has_bits_),
  2833. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, _internal_metadata_),
  2834. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, _extensions_),
  2835. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, _oneof_case_[0]),
  2836. ~0u, // no _weak_field_map_
  2837. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, optional_int32_),
  2838. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, fixed_32_),
  2839. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, repeated_int32_),
  2840. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, packed_int32_),
  2841. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, optional_enum_),
  2842. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, optional_string_),
  2843. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, optional_bytes_),
  2844. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, optional_message_),
  2845. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, optionalgroup_),
  2846. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, string_string_map_),
  2847. offsetof(::protobuf_unittest::TestHugeFieldNumbersDefaultTypeInternal, oneof_uint32_),
  2848. offsetof(::protobuf_unittest::TestHugeFieldNumbersDefaultTypeInternal, oneof_test_all_types_),
  2849. offsetof(::protobuf_unittest::TestHugeFieldNumbersDefaultTypeInternal, oneof_string_),
  2850. offsetof(::protobuf_unittest::TestHugeFieldNumbersDefaultTypeInternal, oneof_bytes_),
  2851. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestHugeFieldNumbers, oneof_field_),
  2852. 4,
  2853. 5,
  2854. ~0u,
  2855. ~0u,
  2856. 6,
  2857. 0,
  2858. 1,
  2859. 2,
  2860. 3,
  2861. ~0u,
  2862. ~0u,
  2863. ~0u,
  2864. ~0u,
  2865. ~0u,
  2866. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, _has_bits_),
  2867. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, _internal_metadata_),
  2868. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, _extensions_),
  2869. ~0u, // no _oneof_case_
  2870. ~0u, // no _weak_field_map_
  2871. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field1_),
  2872. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field2_),
  2873. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field3_),
  2874. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field4_),
  2875. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field6_),
  2876. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field7_),
  2877. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field8_),
  2878. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field9_),
  2879. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestExtensionInsideTable, field10_),
  2880. 0,
  2881. 1,
  2882. 2,
  2883. 3,
  2884. 4,
  2885. 5,
  2886. 6,
  2887. 7,
  2888. 8,
  2889. };
  2890. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  2891. { 0, 6, sizeof(::protobuf_unittest::TestAllTypes_NestedMessage)},
  2892. { 7, 13, sizeof(::protobuf_unittest::TestAllTypes_OptionalGroup)},
  2893. { 14, 20, sizeof(::protobuf_unittest::TestAllTypes_RepeatedGroup)},
  2894. { 21, 102, sizeof(::protobuf_unittest::TestAllTypes)},
  2895. { 177, 185, sizeof(::protobuf_unittest::NestedTestAllTypes)},
  2896. { 188, 196, sizeof(::protobuf_unittest::TestDeprecatedFields)},
  2897. { 198, 203, sizeof(::protobuf_unittest::TestDeprecatedMessage)},
  2898. { 203, 210, sizeof(::protobuf_unittest::ForeignMessage)},
  2899. { 212, 217, sizeof(::protobuf_unittest::TestReservedFields)},
  2900. { 217, 222, sizeof(::protobuf_unittest::TestAllExtensions)},
  2901. { 222, 228, sizeof(::protobuf_unittest::OptionalGroup_extension)},
  2902. { 229, 235, sizeof(::protobuf_unittest::RepeatedGroup_extension)},
  2903. { 236, 242, sizeof(::protobuf_unittest::TestGroup_OptionalGroup)},
  2904. { 243, 250, sizeof(::protobuf_unittest::TestGroup)},
  2905. { 252, 257, sizeof(::protobuf_unittest::TestGroupExtension)},
  2906. { 257, 263, sizeof(::protobuf_unittest::TestNestedExtension_OptionalGroup_extension)},
  2907. { 264, 269, sizeof(::protobuf_unittest::TestNestedExtension)},
  2908. { 269, 307, sizeof(::protobuf_unittest::TestRequired)},
  2909. { 340, 348, sizeof(::protobuf_unittest::TestRequiredForeign)},
  2910. { 351, 359, sizeof(::protobuf_unittest::TestRequiredMessage)},
  2911. { 362, 368, sizeof(::protobuf_unittest::TestForeignNested)},
  2912. { 369, 374, sizeof(::protobuf_unittest::TestEmptyMessage)},
  2913. { 374, 379, sizeof(::protobuf_unittest::TestEmptyMessageWithExtensions)},
  2914. { 379, 384, sizeof(::protobuf_unittest::TestMultipleExtensionRanges)},
  2915. { 384, 391, sizeof(::protobuf_unittest::TestReallyLargeTagNumber)},
  2916. { 393, 400, sizeof(::protobuf_unittest::TestRecursiveMessage)},
  2917. { 402, 408, sizeof(::protobuf_unittest::TestMutualRecursionA_SubMessage)},
  2918. { 409, 416, sizeof(::protobuf_unittest::TestMutualRecursionA_SubGroup)},
  2919. { 418, 425, sizeof(::protobuf_unittest::TestMutualRecursionA)},
  2920. { 427, 434, sizeof(::protobuf_unittest::TestMutualRecursionB)},
  2921. { 436, 442, sizeof(::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup)},
  2922. { 443, 449, sizeof(::protobuf_unittest::TestIsInitialized_SubMessage)},
  2923. { 450, 456, sizeof(::protobuf_unittest::TestIsInitialized)},
  2924. { 457, 463, sizeof(::protobuf_unittest::TestDupFieldNumber_Foo)},
  2925. { 464, 470, sizeof(::protobuf_unittest::TestDupFieldNumber_Bar)},
  2926. { 471, 479, sizeof(::protobuf_unittest::TestDupFieldNumber)},
  2927. { 482, 488, sizeof(::protobuf_unittest::TestEagerMessage)},
  2928. { 489, 495, sizeof(::protobuf_unittest::TestLazyMessage)},
  2929. { 496, 503, sizeof(::protobuf_unittest::TestNestedMessageHasBits_NestedMessage)},
  2930. { 505, 511, sizeof(::protobuf_unittest::TestNestedMessageHasBits)},
  2931. { 512, 529, sizeof(::protobuf_unittest::TestCamelCaseFieldNames)},
  2932. { 541, 548, sizeof(::protobuf_unittest::TestFieldOrderings_NestedMessage)},
  2933. { 550, 559, sizeof(::protobuf_unittest::TestFieldOrderings)},
  2934. { 563, 569, sizeof(::protobuf_unittest::TestExtensionOrderings1)},
  2935. { 570, 576, sizeof(::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3)},
  2936. { 577, 583, sizeof(::protobuf_unittest::TestExtensionOrderings2)},
  2937. { 584, 616, sizeof(::protobuf_unittest::TestExtremeDefaultValues)},
  2938. { 643, 649, sizeof(::protobuf_unittest::SparseEnumMessage)},
  2939. { 650, 656, sizeof(::protobuf_unittest::OneString)},
  2940. { 657, 663, sizeof(::protobuf_unittest::MoreString)},
  2941. { 664, 670, sizeof(::protobuf_unittest::OneBytes)},
  2942. { 671, 677, sizeof(::protobuf_unittest::MoreBytes)},
  2943. { 678, 684, sizeof(::protobuf_unittest::Int32Message)},
  2944. { 685, 691, sizeof(::protobuf_unittest::Uint32Message)},
  2945. { 692, 698, sizeof(::protobuf_unittest::Int64Message)},
  2946. { 699, 705, sizeof(::protobuf_unittest::Uint64Message)},
  2947. { 706, 712, sizeof(::protobuf_unittest::BoolMessage)},
  2948. { 713, 720, sizeof(::protobuf_unittest::TestOneof_FooGroup)},
  2949. { 722, 732, sizeof(::protobuf_unittest::TestOneof)},
  2950. { 736, 743, sizeof(::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup)},
  2951. { 745, 754, sizeof(::protobuf_unittest::TestOneofBackwardsCompatible)},
  2952. { 758, 765, sizeof(::protobuf_unittest::TestOneof2_FooGroup)},
  2953. { 767, 774, sizeof(::protobuf_unittest::TestOneof2_NestedMessage)},
  2954. { 776, 800, sizeof(::protobuf_unittest::TestOneof2)},
  2955. { 817, 823, sizeof(::protobuf_unittest::TestRequiredOneof_NestedMessage)},
  2956. { 824, 833, sizeof(::protobuf_unittest::TestRequiredOneof)},
  2957. { 836, 855, sizeof(::protobuf_unittest::TestPackedTypes)},
  2958. { 869, 888, sizeof(::protobuf_unittest::TestUnpackedTypes)},
  2959. { 902, 907, sizeof(::protobuf_unittest::TestPackedExtensions)},
  2960. { 907, 912, sizeof(::protobuf_unittest::TestUnpackedExtensions)},
  2961. { 912, 918, sizeof(::protobuf_unittest::TestDynamicExtensions_DynamicMessageType)},
  2962. { 919, 931, sizeof(::protobuf_unittest::TestDynamicExtensions)},
  2963. { 938, 949, sizeof(::protobuf_unittest::TestRepeatedScalarDifferentTagSizes)},
  2964. { 955, 961, sizeof(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1)},
  2965. { 962, 968, sizeof(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2)},
  2966. { 969, 981, sizeof(::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator)},
  2967. { 988, 994, sizeof(::protobuf_unittest::TestParsingMerge_OptionalGroup)},
  2968. { 995, 1001, sizeof(::protobuf_unittest::TestParsingMerge_RepeatedGroup)},
  2969. { 1002, 1012, sizeof(::protobuf_unittest::TestParsingMerge)},
  2970. { 1017, 1023, sizeof(::protobuf_unittest::TestCommentInjectionMessage)},
  2971. { 1024, 1029, sizeof(::protobuf_unittest::FooRequest)},
  2972. { 1029, 1034, sizeof(::protobuf_unittest::FooResponse)},
  2973. { 1034, 1039, sizeof(::protobuf_unittest::FooClientMessage)},
  2974. { 1039, 1044, sizeof(::protobuf_unittest::FooServerMessage)},
  2975. { 1044, 1049, sizeof(::protobuf_unittest::BarRequest)},
  2976. { 1049, 1054, sizeof(::protobuf_unittest::BarResponse)},
  2977. { 1054, 1065, sizeof(::protobuf_unittest::TestJsonName)},
  2978. { 1071, 1077, sizeof(::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup)},
  2979. { 1078, 1085, sizeof(::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse)},
  2980. { 1087, 1107, sizeof(::protobuf_unittest::TestHugeFieldNumbers)},
  2981. { 1121, 1135, sizeof(::protobuf_unittest::TestExtensionInsideTable)},
  2982. };
  2983. static ::google::protobuf::Message const * const file_default_instances[] = {
  2984. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestAllTypes_NestedMessage_default_instance_),
  2985. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestAllTypes_OptionalGroup_default_instance_),
  2986. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestAllTypes_RepeatedGroup_default_instance_),
  2987. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestAllTypes_default_instance_),
  2988. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_NestedTestAllTypes_default_instance_),
  2989. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDeprecatedFields_default_instance_),
  2990. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDeprecatedMessage_default_instance_),
  2991. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_ForeignMessage_default_instance_),
  2992. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestReservedFields_default_instance_),
  2993. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestAllExtensions_default_instance_),
  2994. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_OptionalGroup_extension_default_instance_),
  2995. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_RepeatedGroup_extension_default_instance_),
  2996. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestGroup_OptionalGroup_default_instance_),
  2997. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestGroup_default_instance_),
  2998. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestGroupExtension_default_instance_),
  2999. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestNestedExtension_OptionalGroup_extension_default_instance_),
  3000. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestNestedExtension_default_instance_),
  3001. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestRequired_default_instance_),
  3002. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestRequiredForeign_default_instance_),
  3003. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestRequiredMessage_default_instance_),
  3004. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestForeignNested_default_instance_),
  3005. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestEmptyMessage_default_instance_),
  3006. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestEmptyMessageWithExtensions_default_instance_),
  3007. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMultipleExtensionRanges_default_instance_),
  3008. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestReallyLargeTagNumber_default_instance_),
  3009. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestRecursiveMessage_default_instance_),
  3010. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMutualRecursionA_SubMessage_default_instance_),
  3011. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMutualRecursionA_SubGroup_default_instance_),
  3012. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMutualRecursionA_default_instance_),
  3013. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMutualRecursionB_default_instance_),
  3014. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestIsInitialized_SubMessage_SubGroup_default_instance_),
  3015. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestIsInitialized_SubMessage_default_instance_),
  3016. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestIsInitialized_default_instance_),
  3017. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDupFieldNumber_Foo_default_instance_),
  3018. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDupFieldNumber_Bar_default_instance_),
  3019. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDupFieldNumber_default_instance_),
  3020. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestEagerMessage_default_instance_),
  3021. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestLazyMessage_default_instance_),
  3022. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestNestedMessageHasBits_NestedMessage_default_instance_),
  3023. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestNestedMessageHasBits_default_instance_),
  3024. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestCamelCaseFieldNames_default_instance_),
  3025. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestFieldOrderings_NestedMessage_default_instance_),
  3026. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestFieldOrderings_default_instance_),
  3027. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestExtensionOrderings1_default_instance_),
  3028. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestExtensionOrderings2_TestExtensionOrderings3_default_instance_),
  3029. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestExtensionOrderings2_default_instance_),
  3030. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestExtremeDefaultValues_default_instance_),
  3031. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_SparseEnumMessage_default_instance_),
  3032. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_OneString_default_instance_),
  3033. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_MoreString_default_instance_),
  3034. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_OneBytes_default_instance_),
  3035. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_MoreBytes_default_instance_),
  3036. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_Int32Message_default_instance_),
  3037. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_Uint32Message_default_instance_),
  3038. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_Int64Message_default_instance_),
  3039. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_Uint64Message_default_instance_),
  3040. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_BoolMessage_default_instance_),
  3041. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestOneof_FooGroup_default_instance_),
  3042. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestOneof_default_instance_),
  3043. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestOneofBackwardsCompatible_FooGroup_default_instance_),
  3044. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestOneofBackwardsCompatible_default_instance_),
  3045. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestOneof2_FooGroup_default_instance_),
  3046. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestOneof2_NestedMessage_default_instance_),
  3047. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestOneof2_default_instance_),
  3048. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestRequiredOneof_NestedMessage_default_instance_),
  3049. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestRequiredOneof_default_instance_),
  3050. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestPackedTypes_default_instance_),
  3051. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestUnpackedTypes_default_instance_),
  3052. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestPackedExtensions_default_instance_),
  3053. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestUnpackedExtensions_default_instance_),
  3054. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDynamicExtensions_DynamicMessageType_default_instance_),
  3055. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDynamicExtensions_default_instance_),
  3056. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestRepeatedScalarDifferentTagSizes_default_instance_),
  3057. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_Group1_default_instance_),
  3058. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_Group2_default_instance_),
  3059. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_default_instance_),
  3060. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestParsingMerge_OptionalGroup_default_instance_),
  3061. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestParsingMerge_RepeatedGroup_default_instance_),
  3062. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestParsingMerge_default_instance_),
  3063. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestCommentInjectionMessage_default_instance_),
  3064. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_FooRequest_default_instance_),
  3065. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_FooResponse_default_instance_),
  3066. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_FooClientMessage_default_instance_),
  3067. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_FooServerMessage_default_instance_),
  3068. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_BarRequest_default_instance_),
  3069. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_BarResponse_default_instance_),
  3070. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestJsonName_default_instance_),
  3071. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestHugeFieldNumbers_OptionalGroup_default_instance_),
  3072. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestHugeFieldNumbers_StringStringMapEntry_DoNotUse_default_instance_),
  3073. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestHugeFieldNumbers_default_instance_),
  3074. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestExtensionInsideTable_default_instance_),
  3075. };
  3076. void protobuf_AssignDescriptors() {
  3077. AddDescriptors();
  3078. AssignDescriptors(
  3079. "google/protobuf/unittest.proto", schemas, file_default_instances, TableStruct::offsets,
  3080. file_level_metadata, file_level_enum_descriptors, file_level_service_descriptors);
  3081. }
  3082. void protobuf_AssignDescriptorsOnce() {
  3083. static ::google::protobuf::internal::once_flag once;
  3084. ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
  3085. }
  3086. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  3087. void protobuf_RegisterTypes(const ::std::string&) {
  3088. protobuf_AssignDescriptorsOnce();
  3089. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 91);
  3090. }
  3091. void AddDescriptorsImpl() {
  3092. InitDefaults();
  3093. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  3094. "\n\036google/protobuf/unittest.proto\022\021protob"
  3095. "uf_unittest\032%google/protobuf/unittest_im"
  3096. "port.proto\"\355\030\n\014TestAllTypes\022\026\n\016optional_"
  3097. "int32\030\001 \001(\005\022\026\n\016optional_int64\030\002 \001(\003\022\027\n\017o"
  3098. "ptional_uint32\030\003 \001(\r\022\027\n\017optional_uint64\030"
  3099. "\004 \001(\004\022\027\n\017optional_sint32\030\005 \001(\021\022\027\n\017option"
  3100. "al_sint64\030\006 \001(\022\022\030\n\020optional_fixed32\030\007 \001("
  3101. "\007\022\030\n\020optional_fixed64\030\010 \001(\006\022\031\n\021optional_"
  3102. "sfixed32\030\t \001(\017\022\031\n\021optional_sfixed64\030\n \001("
  3103. "\020\022\026\n\016optional_float\030\013 \001(\002\022\027\n\017optional_do"
  3104. "uble\030\014 \001(\001\022\025\n\roptional_bool\030\r \001(\010\022\027\n\017opt"
  3105. "ional_string\030\016 \001(\t\022\026\n\016optional_bytes\030\017 \001"
  3106. "(\014\022D\n\roptionalgroup\030\020 \001(\n2-.protobuf_uni"
  3107. "ttest.TestAllTypes.OptionalGroup\022N\n\027opti"
  3108. "onal_nested_message\030\022 \001(\0132-.protobuf_uni"
  3109. "ttest.TestAllTypes.NestedMessage\022C\n\030opti"
  3110. "onal_foreign_message\030\023 \001(\0132!.protobuf_un"
  3111. "ittest.ForeignMessage\022H\n\027optional_import"
  3112. "_message\030\024 \001(\0132\'.protobuf_unittest_impor"
  3113. "t.ImportMessage\022H\n\024optional_nested_enum\030"
  3114. "\025 \001(\0162*.protobuf_unittest.TestAllTypes.N"
  3115. "estedEnum\022=\n\025optional_foreign_enum\030\026 \001(\016"
  3116. "2\036.protobuf_unittest.ForeignEnum\022B\n\024opti"
  3117. "onal_import_enum\030\027 \001(\0162$.protobuf_unitte"
  3118. "st_import.ImportEnum\022!\n\025optional_string_"
  3119. "piece\030\030 \001(\tB\002\010\002\022\031\n\roptional_cord\030\031 \001(\tB\002"
  3120. "\010\001\022U\n\036optional_public_import_message\030\032 \001"
  3121. "(\0132-.protobuf_unittest_import.PublicImpo"
  3122. "rtMessage\022P\n\025optional_lazy_message\030\033 \001(\013"
  3123. "2-.protobuf_unittest.TestAllTypes.Nested"
  3124. "MessageB\002(\001\022\026\n\016repeated_int32\030\037 \003(\005\022\026\n\016r"
  3125. "epeated_int64\030 \003(\003\022\027\n\017repeated_uint32\030!"
  3126. " \003(\r\022\027\n\017repeated_uint64\030\" \003(\004\022\027\n\017repeate"
  3127. "d_sint32\030# \003(\021\022\027\n\017repeated_sint64\030$ \003(\022\022"
  3128. "\030\n\020repeated_fixed32\030% \003(\007\022\030\n\020repeated_fi"
  3129. "xed64\030& \003(\006\022\031\n\021repeated_sfixed32\030\' \003(\017\022\031"
  3130. "\n\021repeated_sfixed64\030( \003(\020\022\026\n\016repeated_fl"
  3131. "oat\030) \003(\002\022\027\n\017repeated_double\030* \003(\001\022\025\n\rre"
  3132. "peated_bool\030+ \003(\010\022\027\n\017repeated_string\030, \003"
  3133. "(\t\022\026\n\016repeated_bytes\030- \003(\014\022D\n\rrepeatedgr"
  3134. "oup\030. \003(\n2-.protobuf_unittest.TestAllTyp"
  3135. "es.RepeatedGroup\022N\n\027repeated_nested_mess"
  3136. "age\0300 \003(\0132-.protobuf_unittest.TestAllTyp"
  3137. "es.NestedMessage\022C\n\030repeated_foreign_mes"
  3138. "sage\0301 \003(\0132!.protobuf_unittest.ForeignMe"
  3139. "ssage\022H\n\027repeated_import_message\0302 \003(\0132\'"
  3140. ".protobuf_unittest_import.ImportMessage\022"
  3141. "H\n\024repeated_nested_enum\0303 \003(\0162*.protobuf"
  3142. "_unittest.TestAllTypes.NestedEnum\022=\n\025rep"
  3143. "eated_foreign_enum\0304 \003(\0162\036.protobuf_unit"
  3144. "test.ForeignEnum\022B\n\024repeated_import_enum"
  3145. "\0305 \003(\0162$.protobuf_unittest_import.Import"
  3146. "Enum\022!\n\025repeated_string_piece\0306 \003(\tB\002\010\002\022"
  3147. "\031\n\rrepeated_cord\0307 \003(\tB\002\010\001\022P\n\025repeated_l"
  3148. "azy_message\0309 \003(\0132-.protobuf_unittest.Te"
  3149. "stAllTypes.NestedMessageB\002(\001\022\031\n\rdefault_"
  3150. "int32\030= \001(\005:\00241\022\031\n\rdefault_int64\030> \001(\003:\002"
  3151. "42\022\032\n\016default_uint32\030\? \001(\r:\00243\022\032\n\016defaul"
  3152. "t_uint64\030@ \001(\004:\00244\022\033\n\016default_sint32\030A \001"
  3153. "(\021:\003-45\022\032\n\016default_sint64\030B \001(\022:\00246\022\033\n\017d"
  3154. "efault_fixed32\030C \001(\007:\00247\022\033\n\017default_fixe"
  3155. "d64\030D \001(\006:\00248\022\034\n\020default_sfixed32\030E \001(\017:"
  3156. "\00249\022\035\n\020default_sfixed64\030F \001(\020:\003-50\022\033\n\rde"
  3157. "fault_float\030G \001(\002:\00451.5\022\035\n\016default_doubl"
  3158. "e\030H \001(\001:\00552000\022\032\n\014default_bool\030I \001(\010:\004tr"
  3159. "ue\022\035\n\016default_string\030J \001(\t:\005hello\022\034\n\rdef"
  3160. "ault_bytes\030K \001(\014:\005world\022L\n\023default_neste"
  3161. "d_enum\030Q \001(\0162*.protobuf_unittest.TestAll"
  3162. "Types.NestedEnum:\003BAR\022I\n\024default_foreign"
  3163. "_enum\030R \001(\0162\036.protobuf_unittest.ForeignE"
  3164. "num:\013FOREIGN_BAR\022M\n\023default_import_enum\030"
  3165. "S \001(\0162$.protobuf_unittest_import.ImportE"
  3166. "num:\nIMPORT_BAR\022%\n\024default_string_piece\030"
  3167. "T \001(\t:\003abcB\002\010\002\022\035\n\014default_cord\030U \001(\t:\00312"
  3168. "3B\002\010\001\022\026\n\014oneof_uint32\030o \001(\rH\000\022M\n\024oneof_n"
  3169. "ested_message\030p \001(\0132-.protobuf_unittest."
  3170. "TestAllTypes.NestedMessageH\000\022\026\n\014oneof_st"
  3171. "ring\030q \001(\tH\000\022\025\n\013oneof_bytes\030r \001(\014H\000\032\033\n\rN"
  3172. "estedMessage\022\n\n\002bb\030\001 \001(\005\032\032\n\rOptionalGrou"
  3173. "p\022\t\n\001a\030\021 \001(\005\032\032\n\rRepeatedGroup\022\t\n\001a\030/ \001(\005"
  3174. "\"9\n\nNestedEnum\022\007\n\003FOO\020\001\022\007\n\003BAR\020\002\022\007\n\003BAZ\020"
  3175. "\003\022\020\n\003NEG\020\377\377\377\377\377\377\377\377\377\001B\r\n\013oneof_field\"\273\001\n\022N"
  3176. "estedTestAllTypes\0224\n\005child\030\001 \001(\0132%.proto"
  3177. "buf_unittest.NestedTestAllTypes\0220\n\007paylo"
  3178. "ad\030\002 \001(\0132\037.protobuf_unittest.TestAllType"
  3179. "s\022=\n\016repeated_child\030\003 \003(\0132%.protobuf_uni"
  3180. "ttest.NestedTestAllTypes\"m\n\024TestDeprecat"
  3181. "edFields\022\034\n\020deprecated_int32\030\001 \001(\005B\002\030\001\022\'"
  3182. "\n\031deprecated_int32_in_oneof\030\002 \001(\005B\002\030\001H\000B"
  3183. "\016\n\014oneof_fields\"\033\n\025TestDeprecatedMessage"
  3184. ":\002\030\001\"&\n\016ForeignMessage\022\t\n\001c\030\001 \001(\005\022\t\n\001d\030\002"
  3185. " \001(\005\"0\n\022TestReservedFieldsJ\004\010\002\020\003J\004\010\017\020\020J\004"
  3186. "\010\t\020\014R\003barR\003baz\"\035\n\021TestAllExtensions*\010\010\001\020"
  3187. "\200\200\200\200\002\"$\n\027OptionalGroup_extension\022\t\n\001a\030\021 "
  3188. "\001(\005\"$\n\027RepeatedGroup_extension\022\t\n\001a\030/ \001("
  3189. "\005\"\251\001\n\tTestGroup\022A\n\roptionalgroup\030\020 \001(\n2*"
  3190. ".protobuf_unittest.TestGroup.OptionalGro"
  3191. "up\022=\n\025optional_foreign_enum\030\026 \001(\0162\036.prot"
  3192. "obuf_unittest.ForeignEnum\032\032\n\rOptionalGro"
  3193. "up\022\t\n\001a\030\021 \001(\005\"\036\n\022TestGroupExtension*\010\010\001\020"
  3194. "\200\200\200\200\002\"\267\003\n\023TestNestedExtension\032$\n\027Optiona"
  3195. "lGroup_extension\022\t\n\001a\030\021 \001(\00529\n\004test\022$.pr"
  3196. "otobuf_unittest.TestAllExtensions\030\352\007 \001(\t"
  3197. ":\004test2F\n\027nested_string_extension\022$.prot"
  3198. "obuf_unittest.TestAllExtensions\030\353\007 \001(\t2\206"
  3199. "\001\n\027optionalgroup_extension\022%.protobuf_un"
  3200. "ittest.TestGroupExtension\030\020 \001(\n2>.protob"
  3201. "uf_unittest.TestNestedExtension.Optional"
  3202. "Group_extension2n\n\037optional_foreign_enum"
  3203. "_extension\022%.protobuf_unittest.TestGroup"
  3204. "Extension\030\026 \001(\0162\036.protobuf_unittest.Fore"
  3205. "ignEnum\"\325\005\n\014TestRequired\022\t\n\001a\030\001 \002(\005\022\016\n\006d"
  3206. "ummy2\030\002 \001(\005\022\t\n\001b\030\003 \002(\005\022\016\n\006dummy4\030\004 \001(\005\022\016"
  3207. "\n\006dummy5\030\005 \001(\005\022\016\n\006dummy6\030\006 \001(\005\022\016\n\006dummy7"
  3208. "\030\007 \001(\005\022\016\n\006dummy8\030\010 \001(\005\022\016\n\006dummy9\030\t \001(\005\022\017"
  3209. "\n\007dummy10\030\n \001(\005\022\017\n\007dummy11\030\013 \001(\005\022\017\n\007dumm"
  3210. "y12\030\014 \001(\005\022\017\n\007dummy13\030\r \001(\005\022\017\n\007dummy14\030\016 "
  3211. "\001(\005\022\017\n\007dummy15\030\017 \001(\005\022\017\n\007dummy16\030\020 \001(\005\022\017\n"
  3212. "\007dummy17\030\021 \001(\005\022\017\n\007dummy18\030\022 \001(\005\022\017\n\007dummy"
  3213. "19\030\023 \001(\005\022\017\n\007dummy20\030\024 \001(\005\022\017\n\007dummy21\030\025 \001"
  3214. "(\005\022\017\n\007dummy22\030\026 \001(\005\022\017\n\007dummy23\030\027 \001(\005\022\017\n\007"
  3215. "dummy24\030\030 \001(\005\022\017\n\007dummy25\030\031 \001(\005\022\017\n\007dummy2"
  3216. "6\030\032 \001(\005\022\017\n\007dummy27\030\033 \001(\005\022\017\n\007dummy28\030\034 \001("
  3217. "\005\022\017\n\007dummy29\030\035 \001(\005\022\017\n\007dummy30\030\036 \001(\005\022\017\n\007d"
  3218. "ummy31\030\037 \001(\005\022\017\n\007dummy32\030 \001(\005\022\t\n\001c\030! \002(\005"
  3219. "2V\n\006single\022$.protobuf_unittest.TestAllEx"
  3220. "tensions\030\350\007 \001(\0132\037.protobuf_unittest.Test"
  3221. "Required2U\n\005multi\022$.protobuf_unittest.Te"
  3222. "stAllExtensions\030\351\007 \003(\0132\037.protobuf_unitte"
  3223. "st.TestRequired\"\232\001\n\023TestRequiredForeign\022"
  3224. "9\n\020optional_message\030\001 \001(\0132\037.protobuf_uni"
  3225. "ttest.TestRequired\0229\n\020repeated_message\030\002"
  3226. " \003(\0132\037.protobuf_unittest.TestRequired\022\r\n"
  3227. "\005dummy\030\003 \001(\005\"\306\001\n\023TestRequiredMessage\0229\n\020"
  3228. "optional_message\030\001 \001(\0132\037.protobuf_unitte"
  3229. "st.TestRequired\0229\n\020repeated_message\030\002 \003("
  3230. "\0132\037.protobuf_unittest.TestRequired\0229\n\020re"
  3231. "quired_message\030\003 \002(\0132\037.protobuf_unittest"
  3232. ".TestRequired\"Z\n\021TestForeignNested\022E\n\016fo"
  3233. "reign_nested\030\001 \001(\0132-.protobuf_unittest.T"
  3234. "estAllTypes.NestedMessage\"\022\n\020TestEmptyMe"
  3235. "ssage\"*\n\036TestEmptyMessageWithExtensions*"
  3236. "\010\010\001\020\200\200\200\200\002\"7\n\033TestMultipleExtensionRanges"
  3237. "*\004\010*\020+*\006\010\257 \020\224!*\n\010\200\200\004\020\200\200\200\200\002\"4\n\030TestReally"
  3238. "LargeTagNumber\022\t\n\001a\030\001 \001(\005\022\r\n\002bb\030\377\377\377\177 \001(\005"
  3239. "\"U\n\024TestRecursiveMessage\0222\n\001a\030\001 \001(\0132\'.pr"
  3240. "otobuf_unittest.TestRecursiveMessage\022\t\n\001"
  3241. "i\030\002 \001(\005\"\341\002\n\024TestMutualRecursionA\0223\n\002bb\030\001"
  3242. " \001(\0132\'.protobuf_unittest.TestMutualRecur"
  3243. "sionB\022B\n\010subgroup\030\002 \001(\n20.protobuf_unitt"
  3244. "est.TestMutualRecursionA.SubGroup\032@\n\nSub"
  3245. "Message\0222\n\001b\030\001 \001(\0132\'.protobuf_unittest.T"
  3246. "estMutualRecursionB\032\215\001\n\010SubGroup\022G\n\013sub_"
  3247. "message\030\003 \001(\01322.protobuf_unittest.TestMu"
  3248. "tualRecursionA.SubMessage\0228\n\017not_in_this"
  3249. "_scc\030\004 \001(\0132\037.protobuf_unittest.TestAllTy"
  3250. "pes\"b\n\024TestMutualRecursionB\0222\n\001a\030\001 \001(\0132\'"
  3251. ".protobuf_unittest.TestMutualRecursionA\022"
  3252. "\026\n\016optional_int32\030\002 \001(\005\"\312\001\n\021TestIsInitia"
  3253. "lized\022D\n\013sub_message\030\001 \001(\0132/.protobuf_un"
  3254. "ittest.TestIsInitialized.SubMessage\032o\n\nS"
  3255. "ubMessage\022J\n\010subgroup\030\001 \001(\n28.protobuf_u"
  3256. "nittest.TestIsInitialized.SubMessage.Sub"
  3257. "Group\032\025\n\010SubGroup\022\t\n\001i\030\002 \002(\005\"\263\001\n\022TestDup"
  3258. "FieldNumber\022\t\n\001a\030\001 \001(\005\0226\n\003foo\030\002 \001(\n2).pr"
  3259. "otobuf_unittest.TestDupFieldNumber.Foo\0226"
  3260. "\n\003bar\030\003 \001(\n2).protobuf_unittest.TestDupF"
  3261. "ieldNumber.Bar\032\020\n\003Foo\022\t\n\001a\030\001 \001(\005\032\020\n\003Bar\022"
  3262. "\t\n\001a\030\001 \001(\005\"L\n\020TestEagerMessage\0228\n\013sub_me"
  3263. "ssage\030\001 \001(\0132\037.protobuf_unittest.TestAllT"
  3264. "ypesB\002(\000\"K\n\017TestLazyMessage\0228\n\013sub_messa"
  3265. "ge\030\001 \001(\0132\037.protobuf_unittest.TestAllType"
  3266. "sB\002(\001\"\200\002\n\030TestNestedMessageHasBits\022Z\n\027op"
  3267. "tional_nested_message\030\001 \001(\01329.protobuf_u"
  3268. "nittest.TestNestedMessageHasBits.NestedM"
  3269. "essage\032\207\001\n\rNestedMessage\022$\n\034nestedmessag"
  3270. "e_repeated_int32\030\001 \003(\005\022P\n%nestedmessage_"
  3271. "repeated_foreignmessage\030\002 \003(\0132!.protobuf"
  3272. "_unittest.ForeignMessage\"\345\003\n\027TestCamelCa"
  3273. "seFieldNames\022\026\n\016PrimitiveField\030\001 \001(\005\022\023\n\013"
  3274. "StringField\030\002 \001(\t\0221\n\tEnumField\030\003 \001(\0162\036.p"
  3275. "rotobuf_unittest.ForeignEnum\0227\n\014MessageF"
  3276. "ield\030\004 \001(\0132!.protobuf_unittest.ForeignMe"
  3277. "ssage\022\034\n\020StringPieceField\030\005 \001(\tB\002\010\002\022\025\n\tC"
  3278. "ordField\030\006 \001(\tB\002\010\001\022\036\n\026RepeatedPrimitiveF"
  3279. "ield\030\007 \003(\005\022\033\n\023RepeatedStringField\030\010 \003(\t\022"
  3280. "9\n\021RepeatedEnumField\030\t \003(\0162\036.protobuf_un"
  3281. "ittest.ForeignEnum\022\?\n\024RepeatedMessageFie"
  3282. "ld\030\n \003(\0132!.protobuf_unittest.ForeignMess"
  3283. "age\022$\n\030RepeatedStringPieceField\030\013 \003(\tB\002\010"
  3284. "\002\022\035\n\021RepeatedCordField\030\014 \003(\tB\002\010\001\"\325\001\n\022Tes"
  3285. "tFieldOrderings\022\021\n\tmy_string\030\013 \001(\t\022\016\n\006my"
  3286. "_int\030\001 \001(\003\022\020\n\010my_float\030e \001(\002\022U\n\027optional"
  3287. "_nested_message\030\310\001 \001(\01323.protobuf_unitte"
  3288. "st.TestFieldOrderings.NestedMessage\032\'\n\rN"
  3289. "estedMessage\022\n\n\002oo\030\002 \001(\003\022\n\n\002bb\030\001 \001(\005*\004\010\002"
  3290. "\020\013*\004\010\014\020e\"\234\001\n\027TestExtensionOrderings1\022\021\n\t"
  3291. "my_string\030\001 \001(\t2n\n\023test_ext_orderings1\022%"
  3292. ".protobuf_unittest.TestFieldOrderings\030\r "
  3293. "\001(\0132*.protobuf_unittest.TestExtensionOrd"
  3294. "erings1\"\324\002\n\027TestExtensionOrderings2\022\021\n\tm"
  3295. "y_string\030\001 \001(\t\032\265\001\n\027TestExtensionOrdering"
  3296. "s3\022\021\n\tmy_string\030\001 \001(\t2\206\001\n\023test_ext_order"
  3297. "ings3\022%.protobuf_unittest.TestFieldOrder"
  3298. "ings\030\016 \001(\0132B.protobuf_unittest.TestExten"
  3299. "sionOrderings2.TestExtensionOrderings32n"
  3300. "\n\023test_ext_orderings2\022%.protobuf_unittes"
  3301. "t.TestFieldOrderings\030\014 \001(\0132*.protobuf_un"
  3302. "ittest.TestExtensionOrderings2\"\266\007\n\030TestE"
  3303. "xtremeDefaultValues\022\?\n\rescaped_bytes\030\001 \001"
  3304. "(\014:(\\000\\001\\007\\010\\014\\n\\r\\t\\013\\\\\\\'\\\""
  3305. "\\376\022 \n\014large_uint32\030\002 \001(\r:\n4294967295\022*"
  3306. "\n\014large_uint64\030\003 \001(\004:\024184467440737095516"
  3307. "15\022 \n\013small_int32\030\004 \001(\005:\013-2147483647\022)\n\013"
  3308. "small_int64\030\005 \001(\003:\024-9223372036854775807\022"
  3309. "\'\n\022really_small_int32\030\025 \001(\005:\013-2147483648"
  3310. "\0220\n\022really_small_int64\030\026 \001(\003:\024-922337203"
  3311. "6854775808\022\030\n\013utf8_string\030\006 \001(\t:\003\341\210\264\022\025\n\n"
  3312. "zero_float\030\007 \001(\002:\0010\022\024\n\tone_float\030\010 \001(\002:\001"
  3313. "1\022\030\n\013small_float\030\t \001(\002:\0031.5\022\036\n\022negative_"
  3314. "one_float\030\n \001(\002:\002-1\022\034\n\016negative_float\030\013 "
  3315. "\001(\002:\004-1.5\022\032\n\013large_float\030\014 \001(\002:\0052e+08\022$\n"
  3316. "\024small_negative_float\030\r \001(\002:\006-8e-28\022\027\n\ni"
  3317. "nf_double\030\016 \001(\001:\003inf\022\034\n\016neg_inf_double\030\017"
  3318. " \001(\001:\004-inf\022\027\n\nnan_double\030\020 \001(\001:\003nan\022\026\n\ti"
  3319. "nf_float\030\021 \001(\002:\003inf\022\033\n\rneg_inf_float\030\022 \001"
  3320. "(\002:\004-inf\022\026\n\tnan_float\030\023 \001(\002:\003nan\022+\n\014cpp_"
  3321. "trigraph\030\024 \001(\t:\025\? \? \?\? \?\? \?\?\? \?\?/ \?\?-\022 \n"
  3322. "\020string_with_zero\030\027 \001(\t:\006hel\000lo\022\"\n\017bytes"
  3323. "_with_zero\030\030 \001(\014:\twor\\000ld\022(\n\026string_pi"
  3324. "ece_with_zero\030\031 \001(\t:\004ab\000cB\002\010\002\022 \n\016cord_wi"
  3325. "th_zero\030\032 \001(\t:\00412\0003B\002\010\001\022&\n\022replacement_s"
  3326. "tring\030\033 \001(\t:\n${unknown}\"K\n\021SparseEnumMes"
  3327. "sage\0226\n\013sparse_enum\030\001 \001(\0162!.protobuf_uni"
  3328. "ttest.TestSparseEnum\"\031\n\tOneString\022\014\n\004dat"
  3329. "a\030\001 \001(\t\"\032\n\nMoreString\022\014\n\004data\030\001 \003(\t\"\030\n\010O"
  3330. "neBytes\022\014\n\004data\030\001 \001(\014\"\031\n\tMoreBytes\022\014\n\004da"
  3331. "ta\030\001 \003(\014\"\034\n\014Int32Message\022\014\n\004data\030\001 \001(\005\"\035"
  3332. "\n\rUint32Message\022\014\n\004data\030\001 \001(\r\"\034\n\014Int64Me"
  3333. "ssage\022\014\n\004data\030\001 \001(\003\"\035\n\rUint64Message\022\014\n\004"
  3334. "data\030\001 \001(\004\"\033\n\013BoolMessage\022\014\n\004data\030\001 \001(\010\""
  3335. "\320\001\n\tTestOneof\022\021\n\007foo_int\030\001 \001(\005H\000\022\024\n\nfoo_"
  3336. "string\030\002 \001(\tH\000\0226\n\013foo_message\030\003 \001(\0132\037.pr"
  3337. "otobuf_unittest.TestAllTypesH\000\0229\n\010foogro"
  3338. "up\030\004 \001(\n2%.protobuf_unittest.TestOneof.F"
  3339. "ooGroupH\000\032 \n\010FooGroup\022\t\n\001a\030\005 \001(\005\022\t\n\001b\030\006 "
  3340. "\001(\tB\005\n\003foo\"\347\001\n\034TestOneofBackwardsCompati"
  3341. "ble\022\017\n\007foo_int\030\001 \001(\005\022\022\n\nfoo_string\030\002 \001(\t"
  3342. "\0224\n\013foo_message\030\003 \001(\0132\037.protobuf_unittes"
  3343. "t.TestAllTypes\022J\n\010foogroup\030\004 \001(\n28.proto"
  3344. "buf_unittest.TestOneofBackwardsCompatibl"
  3345. "e.FooGroup\032 \n\010FooGroup\022\t\n\001a\030\005 \001(\005\022\t\n\001b\030\006"
  3346. " \001(\t\"\236\006\n\nTestOneof2\022\021\n\007foo_int\030\001 \001(\005H\000\022\024"
  3347. "\n\nfoo_string\030\002 \001(\tH\000\022\026\n\010foo_cord\030\003 \001(\tB\002"
  3348. "\010\001H\000\022\036\n\020foo_string_piece\030\004 \001(\tB\002\010\002H\000\022\023\n\t"
  3349. "foo_bytes\030\005 \001(\014H\000\022<\n\010foo_enum\030\006 \001(\0162(.pr"
  3350. "otobuf_unittest.TestOneof2.NestedEnumH\000\022"
  3351. "B\n\013foo_message\030\007 \001(\0132+.protobuf_unittest"
  3352. ".TestOneof2.NestedMessageH\000\022:\n\010foogroup\030"
  3353. "\010 \001(\n2&.protobuf_unittest.TestOneof2.Foo"
  3354. "GroupH\000\022K\n\020foo_lazy_message\030\013 \001(\0132+.prot"
  3355. "obuf_unittest.TestOneof2.NestedMessageB\002"
  3356. "(\001H\000\022\024\n\007bar_int\030\014 \001(\005:\0015H\001\022\034\n\nbar_string"
  3357. "\030\r \001(\t:\006STRINGH\001\022\034\n\010bar_cord\030\016 \001(\t:\004CORD"
  3358. "B\002\010\001H\001\022&\n\020bar_string_piece\030\017 \001(\t:\006SPIECE"
  3359. "B\002\010\002H\001\022\032\n\tbar_bytes\030\020 \001(\014:\005BYTESH\001\022A\n\010ba"
  3360. "r_enum\030\021 \001(\0162(.protobuf_unittest.TestOne"
  3361. "of2.NestedEnum:\003BARH\001\022\017\n\007baz_int\030\022 \001(\005\022\027"
  3362. "\n\nbaz_string\030\023 \001(\t:\003BAZ\032 \n\010FooGroup\022\t\n\001a"
  3363. "\030\t \001(\005\022\t\n\001b\030\n \001(\t\0323\n\rNestedMessage\022\017\n\007qu"
  3364. "x_int\030\001 \001(\003\022\021\n\tcorge_int\030\002 \003(\005\"\'\n\nNested"
  3365. "Enum\022\007\n\003FOO\020\001\022\007\n\003BAR\020\002\022\007\n\003BAZ\020\003B\005\n\003fooB\005"
  3366. "\n\003bar\"\270\001\n\021TestRequiredOneof\022\021\n\007foo_int\030\001"
  3367. " \001(\005H\000\022\024\n\nfoo_string\030\002 \001(\tH\000\022I\n\013foo_mess"
  3368. "age\030\003 \001(\01322.protobuf_unittest.TestRequir"
  3369. "edOneof.NestedMessageH\000\032(\n\rNestedMessage"
  3370. "\022\027\n\017required_double\030\001 \002(\001B\005\n\003foo\"\252\003\n\017Tes"
  3371. "tPackedTypes\022\030\n\014packed_int32\030Z \003(\005B\002\020\001\022\030"
  3372. "\n\014packed_int64\030[ \003(\003B\002\020\001\022\031\n\rpacked_uint3"
  3373. "2\030\\ \003(\rB\002\020\001\022\031\n\rpacked_uint64\030] \003(\004B\002\020\001\022\031"
  3374. "\n\rpacked_sint32\030^ \003(\021B\002\020\001\022\031\n\rpacked_sint"
  3375. "64\030_ \003(\022B\002\020\001\022\032\n\016packed_fixed32\030` \003(\007B\002\020\001"
  3376. "\022\032\n\016packed_fixed64\030a \003(\006B\002\020\001\022\033\n\017packed_s"
  3377. "fixed32\030b \003(\017B\002\020\001\022\033\n\017packed_sfixed64\030c \003"
  3378. "(\020B\002\020\001\022\030\n\014packed_float\030d \003(\002B\002\020\001\022\031\n\rpack"
  3379. "ed_double\030e \003(\001B\002\020\001\022\027\n\013packed_bool\030f \003(\010"
  3380. "B\002\020\001\0227\n\013packed_enum\030g \003(\0162\036.protobuf_uni"
  3381. "ttest.ForeignEnumB\002\020\001\"\310\003\n\021TestUnpackedTy"
  3382. "pes\022\032\n\016unpacked_int32\030Z \003(\005B\002\020\000\022\032\n\016unpac"
  3383. "ked_int64\030[ \003(\003B\002\020\000\022\033\n\017unpacked_uint32\030\\"
  3384. " \003(\rB\002\020\000\022\033\n\017unpacked_uint64\030] \003(\004B\002\020\000\022\033\n"
  3385. "\017unpacked_sint32\030^ \003(\021B\002\020\000\022\033\n\017unpacked_s"
  3386. "int64\030_ \003(\022B\002\020\000\022\034\n\020unpacked_fixed32\030` \003("
  3387. "\007B\002\020\000\022\034\n\020unpacked_fixed64\030a \003(\006B\002\020\000\022\035\n\021u"
  3388. "npacked_sfixed32\030b \003(\017B\002\020\000\022\035\n\021unpacked_s"
  3389. "fixed64\030c \003(\020B\002\020\000\022\032\n\016unpacked_float\030d \003("
  3390. "\002B\002\020\000\022\033\n\017unpacked_double\030e \003(\001B\002\020\000\022\031\n\run"
  3391. "packed_bool\030f \003(\010B\002\020\000\0229\n\runpacked_enum\030g"
  3392. " \003(\0162\036.protobuf_unittest.ForeignEnumB\002\020\000"
  3393. "\" \n\024TestPackedExtensions*\010\010\001\020\200\200\200\200\002\"\"\n\026Te"
  3394. "stUnpackedExtensions*\010\010\001\020\200\200\200\200\002\"\231\004\n\025TestD"
  3395. "ynamicExtensions\022\031\n\020scalar_extension\030\320\017 "
  3396. "\001(\007\0227\n\016enum_extension\030\321\017 \001(\0162\036.protobuf_"
  3397. "unittest.ForeignEnum\022Y\n\026dynamic_enum_ext"
  3398. "ension\030\322\017 \001(\01628.protobuf_unittest.TestDy"
  3399. "namicExtensions.DynamicEnumType\022=\n\021messa"
  3400. "ge_extension\030\323\017 \001(\0132!.protobuf_unittest."
  3401. "ForeignMessage\022_\n\031dynamic_message_extens"
  3402. "ion\030\324\017 \001(\0132;.protobuf_unittest.TestDynam"
  3403. "icExtensions.DynamicMessageType\022\033\n\022repea"
  3404. "ted_extension\030\325\017 \003(\t\022\035\n\020packed_extension"
  3405. "\030\326\017 \003(\021B\002\020\001\032,\n\022DynamicMessageType\022\026\n\rdyn"
  3406. "amic_field\030\264\020 \001(\005\"G\n\017DynamicEnumType\022\020\n\013"
  3407. "DYNAMIC_FOO\020\230\021\022\020\n\013DYNAMIC_BAR\020\231\021\022\020\n\013DYNA"
  3408. "MIC_BAZ\020\232\021\"\300\001\n#TestRepeatedScalarDiffere"
  3409. "ntTagSizes\022\030\n\020repeated_fixed32\030\014 \003(\007\022\026\n\016"
  3410. "repeated_int32\030\r \003(\005\022\031\n\020repeated_fixed64"
  3411. "\030\376\017 \003(\006\022\027\n\016repeated_int64\030\377\017 \003(\003\022\030\n\016repe"
  3412. "ated_float\030\376\377\017 \003(\002\022\031\n\017repeated_uint64\030\377\377"
  3413. "\017 \003(\004\"\367\t\n\020TestParsingMerge\022;\n\022required_a"
  3414. "ll_types\030\001 \002(\0132\037.protobuf_unittest.TestA"
  3415. "llTypes\022;\n\022optional_all_types\030\002 \001(\0132\037.pr"
  3416. "otobuf_unittest.TestAllTypes\022;\n\022repeated"
  3417. "_all_types\030\003 \003(\0132\037.protobuf_unittest.Tes"
  3418. "tAllTypes\022H\n\roptionalgroup\030\n \001(\n21.proto"
  3419. "buf_unittest.TestParsingMerge.OptionalGr"
  3420. "oup\022H\n\rrepeatedgroup\030\024 \003(\n21.protobuf_un"
  3421. "ittest.TestParsingMerge.RepeatedGroup\032\252\004"
  3422. "\n\027RepeatedFieldsGenerator\022/\n\006field1\030\001 \003("
  3423. "\0132\037.protobuf_unittest.TestAllTypes\022/\n\006fi"
  3424. "eld2\030\002 \003(\0132\037.protobuf_unittest.TestAllTy"
  3425. "pes\022/\n\006field3\030\003 \003(\0132\037.protobuf_unittest."
  3426. "TestAllTypes\022R\n\006group1\030\n \003(\n2B.protobuf_"
  3427. "unittest.TestParsingMerge.RepeatedFields"
  3428. "Generator.Group1\022R\n\006group2\030\024 \003(\n2B.proto"
  3429. "buf_unittest.TestParsingMerge.RepeatedFi"
  3430. "eldsGenerator.Group2\022.\n\004ext1\030\350\007 \003(\0132\037.pr"
  3431. "otobuf_unittest.TestAllTypes\022.\n\004ext2\030\351\007 "
  3432. "\003(\0132\037.protobuf_unittest.TestAllTypes\0329\n\006"
  3433. "Group1\022/\n\006field1\030\013 \001(\0132\037.protobuf_unitte"
  3434. "st.TestAllTypes\0329\n\006Group2\022/\n\006field1\030\025 \001("
  3435. "\0132\037.protobuf_unittest.TestAllTypes\032R\n\rOp"
  3436. "tionalGroup\022A\n\030optional_group_all_types\030"
  3437. "\013 \001(\0132\037.protobuf_unittest.TestAllTypes\032R"
  3438. "\n\rRepeatedGroup\022A\n\030repeated_group_all_ty"
  3439. "pes\030\025 \001(\0132\037.protobuf_unittest.TestAllTyp"
  3440. "es*\t\010\350\007\020\200\200\200\200\0022[\n\014optional_ext\022#.protobuf"
  3441. "_unittest.TestParsingMerge\030\350\007 \001(\0132\037.prot"
  3442. "obuf_unittest.TestAllTypes2[\n\014repeated_e"
  3443. "xt\022#.protobuf_unittest.TestParsingMerge\030"
  3444. "\351\007 \003(\0132\037.protobuf_unittest.TestAllTypes\""
  3445. "D\n\033TestCommentInjectionMessage\022%\n\001a\030\001 \001("
  3446. "\t:\032*/ <- Neither should this.\"\014\n\nFooRequ"
  3447. "est\"\r\n\013FooResponse\"\022\n\020FooClientMessage\"\022"
  3448. "\n\020FooServerMessage\"\014\n\nBarRequest\"\r\n\013BarR"
  3449. "esponse\"\222\001\n\014TestJsonName\022\023\n\013field_name1\030"
  3450. "\001 \001(\005\022\022\n\nfieldName2\030\002 \001(\005\022\022\n\nFieldName3\030"
  3451. "\003 \001(\005\022\024\n\014_field_name4\030\004 \001(\005\022\023\n\013FIELD_NAM"
  3452. "E5\030\005 \001(\005\022\032\n\013field_name6\030\006 \001(\005R\005@type\"\375\005\n"
  3453. "\024TestHugeFieldNumbers\022\032\n\016optional_int32\030"
  3454. "\360\370\377\377\001 \001(\005\022\024\n\010fixed_32\030\361\370\377\377\001 \001(\005\022\036\n\016repea"
  3455. "ted_int32\030\362\370\377\377\001 \003(\005B\002\020\000\022\034\n\014packed_int32\030"
  3456. "\363\370\377\377\001 \003(\005B\002\020\001\0229\n\roptional_enum\030\364\370\377\377\001 \001(\016"
  3457. "2\036.protobuf_unittest.ForeignEnum\022\033\n\017opti"
  3458. "onal_string\030\365\370\377\377\001 \001(\t\022\032\n\016optional_bytes\030"
  3459. "\366\370\377\377\001 \001(\014\022\?\n\020optional_message\030\367\370\377\377\001 \001(\0132"
  3460. "!.protobuf_unittest.ForeignMessage\022P\n\rop"
  3461. "tionalgroup\030\370\370\377\377\001 \001(\n25.protobuf_unittes"
  3462. "t.TestHugeFieldNumbers.OptionalGroup\022[\n\021"
  3463. "string_string_map\030\372\370\377\377\001 \003(\0132<.protobuf_u"
  3464. "nittest.TestHugeFieldNumbers.StringStrin"
  3465. "gMapEntry\022\032\n\014oneof_uint32\030\373\370\377\377\001 \001(\rH\000\022C\n"
  3466. "\024oneof_test_all_types\030\374\370\377\377\001 \001(\0132\037.protob"
  3467. "uf_unittest.TestAllTypesH\000\022\032\n\014oneof_stri"
  3468. "ng\030\375\370\377\377\001 \001(\tH\000\022\031\n\013oneof_bytes\030\376\370\377\377\001 \001(\014H"
  3469. "\000\032$\n\rOptionalGroup\022\023\n\007group_a\030\371\370\377\377\001 \001(\005\032"
  3470. "6\n\024StringStringMapEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005"
  3471. "value\030\002 \001(\t:\0028\001*\014\010\340\252\377\377\001\020\360\370\377\377\001B\r\n\013oneof_f"
  3472. "ield\"\261\001\n\030TestExtensionInsideTable\022\016\n\006fie"
  3473. "ld1\030\001 \001(\005\022\016\n\006field2\030\002 \001(\005\022\016\n\006field3\030\003 \001("
  3474. "\005\022\016\n\006field4\030\004 \001(\005\022\016\n\006field6\030\006 \001(\005\022\016\n\006fie"
  3475. "ld7\030\007 \001(\005\022\016\n\006field8\030\010 \001(\005\022\016\n\006field9\030\t \001("
  3476. "\005\022\017\n\007field10\030\n \001(\005*\004\010\005\020\006*@\n\013ForeignEnum\022"
  3477. "\017\n\013FOREIGN_FOO\020\004\022\017\n\013FOREIGN_BAR\020\005\022\017\n\013FOR"
  3478. "EIGN_BAZ\020\006*K\n\024TestEnumWithDupValue\022\010\n\004FO"
  3479. "O1\020\001\022\010\n\004BAR1\020\002\022\007\n\003BAZ\020\003\022\010\n\004FOO2\020\001\022\010\n\004BAR"
  3480. "2\020\002\032\002\020\001*\211\001\n\016TestSparseEnum\022\014\n\010SPARSE_A\020{"
  3481. "\022\016\n\010SPARSE_B\020\246\347\003\022\017\n\010SPARSE_C\020\262\261\200\006\022\025\n\010SPA"
  3482. "RSE_D\020\361\377\377\377\377\377\377\377\377\001\022\025\n\010SPARSE_E\020\264\336\374\377\377\377\377\377\377\001\022"
  3483. "\014\n\010SPARSE_F\020\000\022\014\n\010SPARSE_G\020\0022\231\001\n\013TestServ"
  3484. "ice\022D\n\003Foo\022\035.protobuf_unittest.FooReques"
  3485. "t\032\036.protobuf_unittest.FooResponse\022D\n\003Bar"
  3486. "\022\035.protobuf_unittest.BarRequest\032\036.protob"
  3487. "uf_unittest.BarResponse:F\n\030optional_int3"
  3488. "2_extension\022$.protobuf_unittest.TestAllE"
  3489. "xtensions\030\001 \001(\005:F\n\030optional_int64_extens"
  3490. "ion\022$.protobuf_unittest.TestAllExtension"
  3491. "s\030\002 \001(\003:G\n\031optional_uint32_extension\022$.p"
  3492. "rotobuf_unittest.TestAllExtensions\030\003 \001(\r"
  3493. ":G\n\031optional_uint64_extension\022$.protobuf"
  3494. "_unittest.TestAllExtensions\030\004 \001(\004:G\n\031opt"
  3495. "ional_sint32_extension\022$.protobuf_unitte"
  3496. "st.TestAllExtensions\030\005 \001(\021:G\n\031optional_s"
  3497. "int64_extension\022$.protobuf_unittest.Test"
  3498. "AllExtensions\030\006 \001(\022:H\n\032optional_fixed32_"
  3499. "extension\022$.protobuf_unittest.TestAllExt"
  3500. "ensions\030\007 \001(\007:H\n\032optional_fixed64_extens"
  3501. "ion\022$.protobuf_unittest.TestAllExtension"
  3502. "s\030\010 \001(\006:I\n\033optional_sfixed32_extension\022$"
  3503. ".protobuf_unittest.TestAllExtensions\030\t \001"
  3504. "(\017:I\n\033optional_sfixed64_extension\022$.prot"
  3505. "obuf_unittest.TestAllExtensions\030\n \001(\020:F\n"
  3506. "\030optional_float_extension\022$.protobuf_uni"
  3507. "ttest.TestAllExtensions\030\013 \001(\002:G\n\031optiona"
  3508. "l_double_extension\022$.protobuf_unittest.T"
  3509. "estAllExtensions\030\014 \001(\001:E\n\027optional_bool_"
  3510. "extension\022$.protobuf_unittest.TestAllExt"
  3511. "ensions\030\r \001(\010:G\n\031optional_string_extensi"
  3512. "on\022$.protobuf_unittest.TestAllExtensions"
  3513. "\030\016 \001(\t:F\n\030optional_bytes_extension\022$.pro"
  3514. "tobuf_unittest.TestAllExtensions\030\017 \001(\014:q"
  3515. "\n\027optionalgroup_extension\022$.protobuf_uni"
  3516. "ttest.TestAllExtensions\030\020 \001(\n2*.protobuf"
  3517. "_unittest.OptionalGroup_extension:~\n!opt"
  3518. "ional_nested_message_extension\022$.protobu"
  3519. "f_unittest.TestAllExtensions\030\022 \001(\0132-.pro"
  3520. "tobuf_unittest.TestAllTypes.NestedMessag"
  3521. "e:s\n\"optional_foreign_message_extension\022"
  3522. "$.protobuf_unittest.TestAllExtensions\030\023 "
  3523. "\001(\0132!.protobuf_unittest.ForeignMessage:x"
  3524. "\n!optional_import_message_extension\022$.pr"
  3525. "otobuf_unittest.TestAllExtensions\030\024 \001(\0132"
  3526. "\'.protobuf_unittest_import.ImportMessage"
  3527. ":x\n\036optional_nested_enum_extension\022$.pro"
  3528. "tobuf_unittest.TestAllExtensions\030\025 \001(\0162*"
  3529. ".protobuf_unittest.TestAllTypes.NestedEn"
  3530. "um:m\n\037optional_foreign_enum_extension\022$."
  3531. "protobuf_unittest.TestAllExtensions\030\026 \001("
  3532. "\0162\036.protobuf_unittest.ForeignEnum:r\n\036opt"
  3533. "ional_import_enum_extension\022$.protobuf_u"
  3534. "nittest.TestAllExtensions\030\027 \001(\0162$.protob"
  3535. "uf_unittest_import.ImportEnum:Q\n\037optiona"
  3536. "l_string_piece_extension\022$.protobuf_unit"
  3537. "test.TestAllExtensions\030\030 \001(\tB\002\010\002:I\n\027opti"
  3538. "onal_cord_extension\022$.protobuf_unittest."
  3539. "TestAllExtensions\030\031 \001(\tB\002\010\001:\205\001\n(optional"
  3540. "_public_import_message_extension\022$.proto"
  3541. "buf_unittest.TestAllExtensions\030\032 \001(\0132-.p"
  3542. "rotobuf_unittest_import.PublicImportMess"
  3543. "age:\200\001\n\037optional_lazy_message_extension\022"
  3544. "$.protobuf_unittest.TestAllExtensions\030\033 "
  3545. "\001(\0132-.protobuf_unittest.TestAllTypes.Nes"
  3546. "tedMessageB\002(\001:F\n\030repeated_int32_extensi"
  3547. "on\022$.protobuf_unittest.TestAllExtensions"
  3548. "\030\037 \003(\005:F\n\030repeated_int64_extension\022$.pro"
  3549. "tobuf_unittest.TestAllExtensions\030 \003(\003:G"
  3550. "\n\031repeated_uint32_extension\022$.protobuf_u"
  3551. "nittest.TestAllExtensions\030! \003(\r:G\n\031repea"
  3552. "ted_uint64_extension\022$.protobuf_unittest"
  3553. ".TestAllExtensions\030\" \003(\004:G\n\031repeated_sin"
  3554. "t32_extension\022$.protobuf_unittest.TestAl"
  3555. "lExtensions\030# \003(\021:G\n\031repeated_sint64_ext"
  3556. "ension\022$.protobuf_unittest.TestAllExtens"
  3557. "ions\030$ \003(\022:H\n\032repeated_fixed32_extension"
  3558. "\022$.protobuf_unittest.TestAllExtensions\030%"
  3559. " \003(\007:H\n\032repeated_fixed64_extension\022$.pro"
  3560. "tobuf_unittest.TestAllExtensions\030& \003(\006:I"
  3561. "\n\033repeated_sfixed32_extension\022$.protobuf"
  3562. "_unittest.TestAllExtensions\030\' \003(\017:I\n\033rep"
  3563. "eated_sfixed64_extension\022$.protobuf_unit"
  3564. "test.TestAllExtensions\030( \003(\020:F\n\030repeated"
  3565. "_float_extension\022$.protobuf_unittest.Tes"
  3566. "tAllExtensions\030) \003(\002:G\n\031repeated_double_"
  3567. "extension\022$.protobuf_unittest.TestAllExt"
  3568. "ensions\030* \003(\001:E\n\027repeated_bool_extension"
  3569. "\022$.protobuf_unittest.TestAllExtensions\030+"
  3570. " \003(\010:G\n\031repeated_string_extension\022$.prot"
  3571. "obuf_unittest.TestAllExtensions\030, \003(\t:F\n"
  3572. "\030repeated_bytes_extension\022$.protobuf_uni"
  3573. "ttest.TestAllExtensions\030- \003(\014:q\n\027repeate"
  3574. "dgroup_extension\022$.protobuf_unittest.Tes"
  3575. "tAllExtensions\030. \003(\n2*.protobuf_unittest"
  3576. ".RepeatedGroup_extension:~\n!repeated_nes"
  3577. "ted_message_extension\022$.protobuf_unittes"
  3578. "t.TestAllExtensions\0300 \003(\0132-.protobuf_uni"
  3579. "ttest.TestAllTypes.NestedMessage:s\n\"repe"
  3580. "ated_foreign_message_extension\022$.protobu"
  3581. "f_unittest.TestAllExtensions\0301 \003(\0132!.pro"
  3582. "tobuf_unittest.ForeignMessage:x\n!repeate"
  3583. "d_import_message_extension\022$.protobuf_un"
  3584. "ittest.TestAllExtensions\0302 \003(\0132\'.protobu"
  3585. "f_unittest_import.ImportMessage:x\n\036repea"
  3586. "ted_nested_enum_extension\022$.protobuf_uni"
  3587. "ttest.TestAllExtensions\0303 \003(\0162*.protobuf"
  3588. "_unittest.TestAllTypes.NestedEnum:m\n\037rep"
  3589. "eated_foreign_enum_extension\022$.protobuf_"
  3590. "unittest.TestAllExtensions\0304 \003(\0162\036.proto"
  3591. "buf_unittest.ForeignEnum:r\n\036repeated_imp"
  3592. "ort_enum_extension\022$.protobuf_unittest.T"
  3593. "estAllExtensions\0305 \003(\0162$.protobuf_unitte"
  3594. "st_import.ImportEnum:Q\n\037repeated_string_"
  3595. "piece_extension\022$.protobuf_unittest.Test"
  3596. "AllExtensions\0306 \003(\tB\002\010\002:I\n\027repeated_cord"
  3597. "_extension\022$.protobuf_unittest.TestAllEx"
  3598. "tensions\0307 \003(\tB\002\010\001:\200\001\n\037repeated_lazy_mes"
  3599. "sage_extension\022$.protobuf_unittest.TestA"
  3600. "llExtensions\0309 \003(\0132-.protobuf_unittest.T"
  3601. "estAllTypes.NestedMessageB\002(\001:I\n\027default"
  3602. "_int32_extension\022$.protobuf_unittest.Tes"
  3603. "tAllExtensions\030= \001(\005:\00241:I\n\027default_int6"
  3604. "4_extension\022$.protobuf_unittest.TestAllE"
  3605. "xtensions\030> \001(\003:\00242:J\n\030default_uint32_ex"
  3606. "tension\022$.protobuf_unittest.TestAllExten"
  3607. "sions\030\? \001(\r:\00243:J\n\030default_uint64_extens"
  3608. "ion\022$.protobuf_unittest.TestAllExtension"
  3609. "s\030@ \001(\004:\00244:K\n\030default_sint32_extension\022"
  3610. "$.protobuf_unittest.TestAllExtensions\030A "
  3611. "\001(\021:\003-45:J\n\030default_sint64_extension\022$.p"
  3612. "rotobuf_unittest.TestAllExtensions\030B \001(\022"
  3613. ":\00246:K\n\031default_fixed32_extension\022$.prot"
  3614. "obuf_unittest.TestAllExtensions\030C \001(\007:\0024"
  3615. "7:K\n\031default_fixed64_extension\022$.protobu"
  3616. "f_unittest.TestAllExtensions\030D \001(\006:\00248:L"
  3617. "\n\032default_sfixed32_extension\022$.protobuf_"
  3618. "unittest.TestAllExtensions\030E \001(\017:\00249:M\n\032"
  3619. "default_sfixed64_extension\022$.protobuf_un"
  3620. "ittest.TestAllExtensions\030F \001(\020:\003-50:K\n\027d"
  3621. "efault_float_extension\022$.protobuf_unitte"
  3622. "st.TestAllExtensions\030G \001(\002:\00451.5:M\n\030defa"
  3623. "ult_double_extension\022$.protobuf_unittest"
  3624. ".TestAllExtensions\030H \001(\001:\00552000:J\n\026defau"
  3625. "lt_bool_extension\022$.protobuf_unittest.Te"
  3626. "stAllExtensions\030I \001(\010:\004true:M\n\030default_s"
  3627. "tring_extension\022$.protobuf_unittest.Test"
  3628. "AllExtensions\030J \001(\t:\005hello:L\n\027default_by"
  3629. "tes_extension\022$.protobuf_unittest.TestAl"
  3630. "lExtensions\030K \001(\014:\005world:|\n\035default_nest"
  3631. "ed_enum_extension\022$.protobuf_unittest.Te"
  3632. "stAllExtensions\030Q \001(\0162*.protobuf_unittes"
  3633. "t.TestAllTypes.NestedEnum:\003BAR:y\n\036defaul"
  3634. "t_foreign_enum_extension\022$.protobuf_unit"
  3635. "test.TestAllExtensions\030R \001(\0162\036.protobuf_"
  3636. "unittest.ForeignEnum:\013FOREIGN_BAR:}\n\035def"
  3637. "ault_import_enum_extension\022$.protobuf_un"
  3638. "ittest.TestAllExtensions\030S \001(\0162$.protobu"
  3639. "f_unittest_import.ImportEnum:\nIMPORT_BAR"
  3640. ":U\n\036default_string_piece_extension\022$.pro"
  3641. "tobuf_unittest.TestAllExtensions\030T \001(\t:\003"
  3642. "abcB\002\010\002:M\n\026default_cord_extension\022$.prot"
  3643. "obuf_unittest.TestAllExtensions\030U \001(\t:\0031"
  3644. "23B\002\010\001:D\n\026oneof_uint32_extension\022$.proto"
  3645. "buf_unittest.TestAllExtensions\030o \001(\r:{\n\036"
  3646. "oneof_nested_message_extension\022$.protobu"
  3647. "f_unittest.TestAllExtensions\030p \001(\0132-.pro"
  3648. "tobuf_unittest.TestAllTypes.NestedMessag"
  3649. "e:D\n\026oneof_string_extension\022$.protobuf_u"
  3650. "nittest.TestAllExtensions\030q \001(\t:C\n\025oneof"
  3651. "_bytes_extension\022$.protobuf_unittest.Tes"
  3652. "tAllExtensions\030r \001(\014:B\n\023my_extension_str"
  3653. "ing\022%.protobuf_unittest.TestFieldOrderin"
  3654. "gs\0302 \001(\t:\?\n\020my_extension_int\022%.protobuf_"
  3655. "unittest.TestFieldOrderings\030\005 \001(\005:K\n\026pac"
  3656. "ked_int32_extension\022\'.protobuf_unittest."
  3657. "TestPackedExtensions\030Z \003(\005B\002\020\001:K\n\026packed"
  3658. "_int64_extension\022\'.protobuf_unittest.Tes"
  3659. "tPackedExtensions\030[ \003(\003B\002\020\001:L\n\027packed_ui"
  3660. "nt32_extension\022\'.protobuf_unittest.TestP"
  3661. "ackedExtensions\030\\ \003(\rB\002\020\001:L\n\027packed_uint"
  3662. "64_extension\022\'.protobuf_unittest.TestPac"
  3663. "kedExtensions\030] \003(\004B\002\020\001:L\n\027packed_sint32"
  3664. "_extension\022\'.protobuf_unittest.TestPacke"
  3665. "dExtensions\030^ \003(\021B\002\020\001:L\n\027packed_sint64_e"
  3666. "xtension\022\'.protobuf_unittest.TestPackedE"
  3667. "xtensions\030_ \003(\022B\002\020\001:M\n\030packed_fixed32_ex"
  3668. "tension\022\'.protobuf_unittest.TestPackedEx"
  3669. "tensions\030` \003(\007B\002\020\001:M\n\030packed_fixed64_ext"
  3670. "ension\022\'.protobuf_unittest.TestPackedExt"
  3671. "ensions\030a \003(\006B\002\020\001:N\n\031packed_sfixed32_ext"
  3672. "ension\022\'.protobuf_unittest.TestPackedExt"
  3673. "ensions\030b \003(\017B\002\020\001:N\n\031packed_sfixed64_ext"
  3674. "ension\022\'.protobuf_unittest.TestPackedExt"
  3675. "ensions\030c \003(\020B\002\020\001:K\n\026packed_float_extens"
  3676. "ion\022\'.protobuf_unittest.TestPackedExtens"
  3677. "ions\030d \003(\002B\002\020\001:L\n\027packed_double_extensio"
  3678. "n\022\'.protobuf_unittest.TestPackedExtensio"
  3679. "ns\030e \003(\001B\002\020\001:J\n\025packed_bool_extension\022\'."
  3680. "protobuf_unittest.TestPackedExtensions\030f"
  3681. " \003(\010B\002\020\001:j\n\025packed_enum_extension\022\'.prot"
  3682. "obuf_unittest.TestPackedExtensions\030g \003(\016"
  3683. "2\036.protobuf_unittest.ForeignEnumB\002\020\001:O\n\030"
  3684. "unpacked_int32_extension\022).protobuf_unit"
  3685. "test.TestUnpackedExtensions\030Z \003(\005B\002\020\000:O\n"
  3686. "\030unpacked_int64_extension\022).protobuf_uni"
  3687. "ttest.TestUnpackedExtensions\030[ \003(\003B\002\020\000:P"
  3688. "\n\031unpacked_uint32_extension\022).protobuf_u"
  3689. "nittest.TestUnpackedExtensions\030\\ \003(\rB\002\020\000"
  3690. ":P\n\031unpacked_uint64_extension\022).protobuf"
  3691. "_unittest.TestUnpackedExtensions\030] \003(\004B\002"
  3692. "\020\000:P\n\031unpacked_sint32_extension\022).protob"
  3693. "uf_unittest.TestUnpackedExtensions\030^ \003(\021"
  3694. "B\002\020\000:P\n\031unpacked_sint64_extension\022).prot"
  3695. "obuf_unittest.TestUnpackedExtensions\030_ \003"
  3696. "(\022B\002\020\000:Q\n\032unpacked_fixed32_extension\022).p"
  3697. "rotobuf_unittest.TestUnpackedExtensions\030"
  3698. "` \003(\007B\002\020\000:Q\n\032unpacked_fixed64_extension\022"
  3699. ").protobuf_unittest.TestUnpackedExtensio"
  3700. "ns\030a \003(\006B\002\020\000:R\n\033unpacked_sfixed32_extens"
  3701. "ion\022).protobuf_unittest.TestUnpackedExte"
  3702. "nsions\030b \003(\017B\002\020\000:R\n\033unpacked_sfixed64_ex"
  3703. "tension\022).protobuf_unittest.TestUnpacked"
  3704. "Extensions\030c \003(\020B\002\020\000:O\n\030unpacked_float_e"
  3705. "xtension\022).protobuf_unittest.TestUnpacke"
  3706. "dExtensions\030d \003(\002B\002\020\000:P\n\031unpacked_double"
  3707. "_extension\022).protobuf_unittest.TestUnpac"
  3708. "kedExtensions\030e \003(\001B\002\020\000:N\n\027unpacked_bool"
  3709. "_extension\022).protobuf_unittest.TestUnpac"
  3710. "kedExtensions\030f \003(\010B\002\020\000:n\n\027unpacked_enum"
  3711. "_extension\022).protobuf_unittest.TestUnpac"
  3712. "kedExtensions\030g \003(\0162\036.protobuf_unittest."
  3713. "ForeignEnumB\002\020\000:d\n\016test_all_types\022\'.prot"
  3714. "obuf_unittest.TestHugeFieldNumbers\030\340\252\377\377\001"
  3715. " \001(\0132\037.protobuf_unittest.TestAllTypes:Z\n"
  3716. "%test_extension_inside_table_extension\022+"
  3717. ".protobuf_unittest.TestExtensionInsideTa"
  3718. "ble\030\005 \001(\005B\035B\rUnittestProtoH\001\200\001\001\210\001\001\220\001\001\370\001\001"
  3719. };
  3720. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  3721. descriptor, 25000);
  3722. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  3723. "google/protobuf/unittest.proto", &protobuf_RegisterTypes);
  3724. ::protobuf_google_2fprotobuf_2funittest_5fimport_2eproto::AddDescriptors();
  3725. }
  3726. void AddDescriptors() {
  3727. static ::google::protobuf::internal::once_flag once;
  3728. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  3729. }
  3730. // Force AddDescriptors() to be called at dynamic initialization time.
  3731. struct StaticDescriptorInitializer {
  3732. StaticDescriptorInitializer() {
  3733. AddDescriptors();
  3734. }
  3735. } static_descriptor_initializer;
  3736. } // namespace protobuf_google_2fprotobuf_2funittest_2eproto
  3737. namespace protobuf_unittest {
  3738. const ::google::protobuf::EnumDescriptor* TestAllTypes_NestedEnum_descriptor() {
  3739. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  3740. return protobuf_google_2fprotobuf_2funittest_2eproto::file_level_enum_descriptors[0];
  3741. }
  3742. bool TestAllTypes_NestedEnum_IsValid(int value) {
  3743. switch (value) {
  3744. case -1:
  3745. case 1:
  3746. case 2:
  3747. case 3:
  3748. return true;
  3749. default:
  3750. return false;
  3751. }
  3752. }
  3753. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3754. const TestAllTypes_NestedEnum TestAllTypes::FOO;
  3755. const TestAllTypes_NestedEnum TestAllTypes::BAR;
  3756. const TestAllTypes_NestedEnum TestAllTypes::BAZ;
  3757. const TestAllTypes_NestedEnum TestAllTypes::NEG;
  3758. const TestAllTypes_NestedEnum TestAllTypes::NestedEnum_MIN;
  3759. const TestAllTypes_NestedEnum TestAllTypes::NestedEnum_MAX;
  3760. const int TestAllTypes::NestedEnum_ARRAYSIZE;
  3761. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3762. const ::google::protobuf::EnumDescriptor* TestOneof2_NestedEnum_descriptor() {
  3763. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  3764. return protobuf_google_2fprotobuf_2funittest_2eproto::file_level_enum_descriptors[1];
  3765. }
  3766. bool TestOneof2_NestedEnum_IsValid(int value) {
  3767. switch (value) {
  3768. case 1:
  3769. case 2:
  3770. case 3:
  3771. return true;
  3772. default:
  3773. return false;
  3774. }
  3775. }
  3776. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3777. const TestOneof2_NestedEnum TestOneof2::FOO;
  3778. const TestOneof2_NestedEnum TestOneof2::BAR;
  3779. const TestOneof2_NestedEnum TestOneof2::BAZ;
  3780. const TestOneof2_NestedEnum TestOneof2::NestedEnum_MIN;
  3781. const TestOneof2_NestedEnum TestOneof2::NestedEnum_MAX;
  3782. const int TestOneof2::NestedEnum_ARRAYSIZE;
  3783. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3784. const ::google::protobuf::EnumDescriptor* TestDynamicExtensions_DynamicEnumType_descriptor() {
  3785. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  3786. return protobuf_google_2fprotobuf_2funittest_2eproto::file_level_enum_descriptors[2];
  3787. }
  3788. bool TestDynamicExtensions_DynamicEnumType_IsValid(int value) {
  3789. switch (value) {
  3790. case 2200:
  3791. case 2201:
  3792. case 2202:
  3793. return true;
  3794. default:
  3795. return false;
  3796. }
  3797. }
  3798. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3799. const TestDynamicExtensions_DynamicEnumType TestDynamicExtensions::DYNAMIC_FOO;
  3800. const TestDynamicExtensions_DynamicEnumType TestDynamicExtensions::DYNAMIC_BAR;
  3801. const TestDynamicExtensions_DynamicEnumType TestDynamicExtensions::DYNAMIC_BAZ;
  3802. const TestDynamicExtensions_DynamicEnumType TestDynamicExtensions::DynamicEnumType_MIN;
  3803. const TestDynamicExtensions_DynamicEnumType TestDynamicExtensions::DynamicEnumType_MAX;
  3804. const int TestDynamicExtensions::DynamicEnumType_ARRAYSIZE;
  3805. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3806. const ::google::protobuf::EnumDescriptor* ForeignEnum_descriptor() {
  3807. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  3808. return protobuf_google_2fprotobuf_2funittest_2eproto::file_level_enum_descriptors[3];
  3809. }
  3810. bool ForeignEnum_IsValid(int value) {
  3811. switch (value) {
  3812. case 4:
  3813. case 5:
  3814. case 6:
  3815. return true;
  3816. default:
  3817. return false;
  3818. }
  3819. }
  3820. const ::google::protobuf::EnumDescriptor* TestEnumWithDupValue_descriptor() {
  3821. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  3822. return protobuf_google_2fprotobuf_2funittest_2eproto::file_level_enum_descriptors[4];
  3823. }
  3824. bool TestEnumWithDupValue_IsValid(int value) {
  3825. switch (value) {
  3826. case 1:
  3827. case 2:
  3828. case 3:
  3829. return true;
  3830. default:
  3831. return false;
  3832. }
  3833. }
  3834. const ::google::protobuf::EnumDescriptor* TestSparseEnum_descriptor() {
  3835. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  3836. return protobuf_google_2fprotobuf_2funittest_2eproto::file_level_enum_descriptors[5];
  3837. }
  3838. bool TestSparseEnum_IsValid(int value) {
  3839. switch (value) {
  3840. case -53452:
  3841. case -15:
  3842. case 0:
  3843. case 2:
  3844. case 123:
  3845. case 62374:
  3846. case 12589234:
  3847. return true;
  3848. default:
  3849. return false;
  3850. }
  3851. }
  3852. // ===================================================================
  3853. void TestAllTypes_NestedMessage::InitAsDefaultInstance() {
  3854. }
  3855. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3856. const int TestAllTypes_NestedMessage::kBbFieldNumber;
  3857. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3858. TestAllTypes_NestedMessage::TestAllTypes_NestedMessage()
  3859. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3860. ::google::protobuf::internal::InitSCC(
  3861. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_NestedMessage.base);
  3862. SharedCtor();
  3863. // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllTypes.NestedMessage)
  3864. }
  3865. TestAllTypes_NestedMessage::TestAllTypes_NestedMessage(::google::protobuf::Arena* arena)
  3866. : ::google::protobuf::Message(),
  3867. _internal_metadata_(arena) {
  3868. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_NestedMessage.base);
  3869. SharedCtor();
  3870. RegisterArenaDtor(arena);
  3871. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestAllTypes.NestedMessage)
  3872. }
  3873. TestAllTypes_NestedMessage::TestAllTypes_NestedMessage(const TestAllTypes_NestedMessage& from)
  3874. : ::google::protobuf::Message(),
  3875. _internal_metadata_(NULL),
  3876. _has_bits_(from._has_bits_) {
  3877. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3878. bb_ = from.bb_;
  3879. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllTypes.NestedMessage)
  3880. }
  3881. void TestAllTypes_NestedMessage::SharedCtor() {
  3882. bb_ = 0;
  3883. }
  3884. TestAllTypes_NestedMessage::~TestAllTypes_NestedMessage() {
  3885. // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllTypes.NestedMessage)
  3886. SharedDtor();
  3887. }
  3888. void TestAllTypes_NestedMessage::SharedDtor() {
  3889. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  3890. }
  3891. void TestAllTypes_NestedMessage::ArenaDtor(void* object) {
  3892. TestAllTypes_NestedMessage* _this = reinterpret_cast< TestAllTypes_NestedMessage* >(object);
  3893. (void)_this;
  3894. }
  3895. void TestAllTypes_NestedMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  3896. }
  3897. void TestAllTypes_NestedMessage::SetCachedSize(int size) const {
  3898. _cached_size_.Set(size);
  3899. }
  3900. const ::google::protobuf::Descriptor* TestAllTypes_NestedMessage::descriptor() {
  3901. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  3902. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3903. }
  3904. const TestAllTypes_NestedMessage& TestAllTypes_NestedMessage::default_instance() {
  3905. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_NestedMessage.base);
  3906. return *internal_default_instance();
  3907. }
  3908. void TestAllTypes_NestedMessage::Clear() {
  3909. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestAllTypes.NestedMessage)
  3910. ::google::protobuf::uint32 cached_has_bits = 0;
  3911. // Prevent compiler warnings about cached_has_bits being unused
  3912. (void) cached_has_bits;
  3913. bb_ = 0;
  3914. _has_bits_.Clear();
  3915. _internal_metadata_.Clear();
  3916. }
  3917. bool TestAllTypes_NestedMessage::MergePartialFromCodedStream(
  3918. ::google::protobuf::io::CodedInputStream* input) {
  3919. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3920. ::google::protobuf::uint32 tag;
  3921. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestAllTypes.NestedMessage)
  3922. for (;;) {
  3923. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3924. tag = p.first;
  3925. if (!p.second) goto handle_unusual;
  3926. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3927. // optional int32 bb = 1;
  3928. case 1: {
  3929. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3930. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  3931. set_has_bb();
  3932. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  3933. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  3934. input, &bb_)));
  3935. } else {
  3936. goto handle_unusual;
  3937. }
  3938. break;
  3939. }
  3940. default: {
  3941. handle_unusual:
  3942. if (tag == 0) {
  3943. goto success;
  3944. }
  3945. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3946. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3947. break;
  3948. }
  3949. }
  3950. }
  3951. success:
  3952. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestAllTypes.NestedMessage)
  3953. return true;
  3954. failure:
  3955. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllTypes.NestedMessage)
  3956. return false;
  3957. #undef DO_
  3958. }
  3959. void TestAllTypes_NestedMessage::SerializeWithCachedSizes(
  3960. ::google::protobuf::io::CodedOutputStream* output) const {
  3961. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestAllTypes.NestedMessage)
  3962. ::google::protobuf::uint32 cached_has_bits = 0;
  3963. (void) cached_has_bits;
  3964. cached_has_bits = _has_bits_[0];
  3965. // optional int32 bb = 1;
  3966. if (cached_has_bits & 0x00000001u) {
  3967. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->bb(), output);
  3968. }
  3969. if (_internal_metadata_.have_unknown_fields()) {
  3970. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3971. _internal_metadata_.unknown_fields(), output);
  3972. }
  3973. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllTypes.NestedMessage)
  3974. }
  3975. ::google::protobuf::uint8* TestAllTypes_NestedMessage::InternalSerializeWithCachedSizesToArray(
  3976. bool deterministic, ::google::protobuf::uint8* target) const {
  3977. (void)deterministic; // Unused
  3978. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestAllTypes.NestedMessage)
  3979. ::google::protobuf::uint32 cached_has_bits = 0;
  3980. (void) cached_has_bits;
  3981. cached_has_bits = _has_bits_[0];
  3982. // optional int32 bb = 1;
  3983. if (cached_has_bits & 0x00000001u) {
  3984. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->bb(), target);
  3985. }
  3986. if (_internal_metadata_.have_unknown_fields()) {
  3987. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3988. _internal_metadata_.unknown_fields(), target);
  3989. }
  3990. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestAllTypes.NestedMessage)
  3991. return target;
  3992. }
  3993. size_t TestAllTypes_NestedMessage::ByteSizeLong() const {
  3994. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllTypes.NestedMessage)
  3995. size_t total_size = 0;
  3996. if (_internal_metadata_.have_unknown_fields()) {
  3997. total_size +=
  3998. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3999. _internal_metadata_.unknown_fields());
  4000. }
  4001. // optional int32 bb = 1;
  4002. if (has_bb()) {
  4003. total_size += 1 +
  4004. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4005. this->bb());
  4006. }
  4007. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4008. SetCachedSize(cached_size);
  4009. return total_size;
  4010. }
  4011. void TestAllTypes_NestedMessage::MergeFrom(const ::google::protobuf::Message& from) {
  4012. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestAllTypes.NestedMessage)
  4013. GOOGLE_DCHECK_NE(&from, this);
  4014. const TestAllTypes_NestedMessage* source =
  4015. ::google::protobuf::internal::DynamicCastToGenerated<const TestAllTypes_NestedMessage>(
  4016. &from);
  4017. if (source == NULL) {
  4018. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestAllTypes.NestedMessage)
  4019. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4020. } else {
  4021. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestAllTypes.NestedMessage)
  4022. MergeFrom(*source);
  4023. }
  4024. }
  4025. void TestAllTypes_NestedMessage::MergeFrom(const TestAllTypes_NestedMessage& from) {
  4026. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestAllTypes.NestedMessage)
  4027. GOOGLE_DCHECK_NE(&from, this);
  4028. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4029. ::google::protobuf::uint32 cached_has_bits = 0;
  4030. (void) cached_has_bits;
  4031. if (from.has_bb()) {
  4032. set_bb(from.bb());
  4033. }
  4034. }
  4035. void TestAllTypes_NestedMessage::CopyFrom(const ::google::protobuf::Message& from) {
  4036. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestAllTypes.NestedMessage)
  4037. if (&from == this) return;
  4038. Clear();
  4039. MergeFrom(from);
  4040. }
  4041. void TestAllTypes_NestedMessage::CopyFrom(const TestAllTypes_NestedMessage& from) {
  4042. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllTypes.NestedMessage)
  4043. if (&from == this) return;
  4044. Clear();
  4045. MergeFrom(from);
  4046. }
  4047. bool TestAllTypes_NestedMessage::IsInitialized() const {
  4048. return true;
  4049. }
  4050. void TestAllTypes_NestedMessage::Swap(TestAllTypes_NestedMessage* other) {
  4051. if (other == this) return;
  4052. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  4053. InternalSwap(other);
  4054. } else {
  4055. TestAllTypes_NestedMessage* temp = New(GetArenaNoVirtual());
  4056. temp->MergeFrom(*other);
  4057. other->CopyFrom(*this);
  4058. InternalSwap(temp);
  4059. if (GetArenaNoVirtual() == NULL) {
  4060. delete temp;
  4061. }
  4062. }
  4063. }
  4064. void TestAllTypes_NestedMessage::UnsafeArenaSwap(TestAllTypes_NestedMessage* other) {
  4065. if (other == this) return;
  4066. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  4067. InternalSwap(other);
  4068. }
  4069. void TestAllTypes_NestedMessage::InternalSwap(TestAllTypes_NestedMessage* other) {
  4070. using std::swap;
  4071. swap(bb_, other->bb_);
  4072. swap(_has_bits_[0], other->_has_bits_[0]);
  4073. _internal_metadata_.Swap(&other->_internal_metadata_);
  4074. }
  4075. ::google::protobuf::Metadata TestAllTypes_NestedMessage::GetMetadata() const {
  4076. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  4077. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  4078. }
  4079. // ===================================================================
  4080. void TestAllTypes_OptionalGroup::InitAsDefaultInstance() {
  4081. }
  4082. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4083. const int TestAllTypes_OptionalGroup::kAFieldNumber;
  4084. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4085. TestAllTypes_OptionalGroup::TestAllTypes_OptionalGroup()
  4086. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4087. ::google::protobuf::internal::InitSCC(
  4088. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_OptionalGroup.base);
  4089. SharedCtor();
  4090. // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllTypes.OptionalGroup)
  4091. }
  4092. TestAllTypes_OptionalGroup::TestAllTypes_OptionalGroup(::google::protobuf::Arena* arena)
  4093. : ::google::protobuf::Message(),
  4094. _internal_metadata_(arena) {
  4095. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_OptionalGroup.base);
  4096. SharedCtor();
  4097. RegisterArenaDtor(arena);
  4098. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestAllTypes.OptionalGroup)
  4099. }
  4100. TestAllTypes_OptionalGroup::TestAllTypes_OptionalGroup(const TestAllTypes_OptionalGroup& from)
  4101. : ::google::protobuf::Message(),
  4102. _internal_metadata_(NULL),
  4103. _has_bits_(from._has_bits_) {
  4104. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4105. a_ = from.a_;
  4106. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllTypes.OptionalGroup)
  4107. }
  4108. void TestAllTypes_OptionalGroup::SharedCtor() {
  4109. a_ = 0;
  4110. }
  4111. TestAllTypes_OptionalGroup::~TestAllTypes_OptionalGroup() {
  4112. // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllTypes.OptionalGroup)
  4113. SharedDtor();
  4114. }
  4115. void TestAllTypes_OptionalGroup::SharedDtor() {
  4116. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  4117. }
  4118. void TestAllTypes_OptionalGroup::ArenaDtor(void* object) {
  4119. TestAllTypes_OptionalGroup* _this = reinterpret_cast< TestAllTypes_OptionalGroup* >(object);
  4120. (void)_this;
  4121. }
  4122. void TestAllTypes_OptionalGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  4123. }
  4124. void TestAllTypes_OptionalGroup::SetCachedSize(int size) const {
  4125. _cached_size_.Set(size);
  4126. }
  4127. const ::google::protobuf::Descriptor* TestAllTypes_OptionalGroup::descriptor() {
  4128. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  4129. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4130. }
  4131. const TestAllTypes_OptionalGroup& TestAllTypes_OptionalGroup::default_instance() {
  4132. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_OptionalGroup.base);
  4133. return *internal_default_instance();
  4134. }
  4135. void TestAllTypes_OptionalGroup::Clear() {
  4136. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestAllTypes.OptionalGroup)
  4137. ::google::protobuf::uint32 cached_has_bits = 0;
  4138. // Prevent compiler warnings about cached_has_bits being unused
  4139. (void) cached_has_bits;
  4140. a_ = 0;
  4141. _has_bits_.Clear();
  4142. _internal_metadata_.Clear();
  4143. }
  4144. bool TestAllTypes_OptionalGroup::MergePartialFromCodedStream(
  4145. ::google::protobuf::io::CodedInputStream* input) {
  4146. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4147. ::google::protobuf::uint32 tag;
  4148. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestAllTypes.OptionalGroup)
  4149. for (;;) {
  4150. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  4151. tag = p.first;
  4152. if (!p.second) goto handle_unusual;
  4153. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4154. // optional int32 a = 17;
  4155. case 17: {
  4156. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4157. static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
  4158. set_has_a();
  4159. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  4160. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  4161. input, &a_)));
  4162. } else {
  4163. goto handle_unusual;
  4164. }
  4165. break;
  4166. }
  4167. default: {
  4168. handle_unusual:
  4169. if (tag == 0 ||
  4170. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  4171. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  4172. input->SetLastTag(tag);
  4173. goto success;
  4174. }
  4175. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4176. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4177. break;
  4178. }
  4179. }
  4180. }
  4181. success:
  4182. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestAllTypes.OptionalGroup)
  4183. return true;
  4184. failure:
  4185. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllTypes.OptionalGroup)
  4186. return false;
  4187. #undef DO_
  4188. }
  4189. void TestAllTypes_OptionalGroup::SerializeWithCachedSizes(
  4190. ::google::protobuf::io::CodedOutputStream* output) const {
  4191. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestAllTypes.OptionalGroup)
  4192. ::google::protobuf::uint32 cached_has_bits = 0;
  4193. (void) cached_has_bits;
  4194. cached_has_bits = _has_bits_[0];
  4195. // optional int32 a = 17;
  4196. if (cached_has_bits & 0x00000001u) {
  4197. ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->a(), output);
  4198. }
  4199. if (_internal_metadata_.have_unknown_fields()) {
  4200. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4201. _internal_metadata_.unknown_fields(), output);
  4202. }
  4203. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllTypes.OptionalGroup)
  4204. }
  4205. ::google::protobuf::uint8* TestAllTypes_OptionalGroup::InternalSerializeWithCachedSizesToArray(
  4206. bool deterministic, ::google::protobuf::uint8* target) const {
  4207. (void)deterministic; // Unused
  4208. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestAllTypes.OptionalGroup)
  4209. ::google::protobuf::uint32 cached_has_bits = 0;
  4210. (void) cached_has_bits;
  4211. cached_has_bits = _has_bits_[0];
  4212. // optional int32 a = 17;
  4213. if (cached_has_bits & 0x00000001u) {
  4214. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(17, this->a(), target);
  4215. }
  4216. if (_internal_metadata_.have_unknown_fields()) {
  4217. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4218. _internal_metadata_.unknown_fields(), target);
  4219. }
  4220. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestAllTypes.OptionalGroup)
  4221. return target;
  4222. }
  4223. size_t TestAllTypes_OptionalGroup::ByteSizeLong() const {
  4224. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllTypes.OptionalGroup)
  4225. size_t total_size = 0;
  4226. if (_internal_metadata_.have_unknown_fields()) {
  4227. total_size +=
  4228. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4229. _internal_metadata_.unknown_fields());
  4230. }
  4231. // optional int32 a = 17;
  4232. if (has_a()) {
  4233. total_size += 2 +
  4234. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4235. this->a());
  4236. }
  4237. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4238. SetCachedSize(cached_size);
  4239. return total_size;
  4240. }
  4241. void TestAllTypes_OptionalGroup::MergeFrom(const ::google::protobuf::Message& from) {
  4242. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestAllTypes.OptionalGroup)
  4243. GOOGLE_DCHECK_NE(&from, this);
  4244. const TestAllTypes_OptionalGroup* source =
  4245. ::google::protobuf::internal::DynamicCastToGenerated<const TestAllTypes_OptionalGroup>(
  4246. &from);
  4247. if (source == NULL) {
  4248. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestAllTypes.OptionalGroup)
  4249. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4250. } else {
  4251. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestAllTypes.OptionalGroup)
  4252. MergeFrom(*source);
  4253. }
  4254. }
  4255. void TestAllTypes_OptionalGroup::MergeFrom(const TestAllTypes_OptionalGroup& from) {
  4256. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestAllTypes.OptionalGroup)
  4257. GOOGLE_DCHECK_NE(&from, this);
  4258. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4259. ::google::protobuf::uint32 cached_has_bits = 0;
  4260. (void) cached_has_bits;
  4261. if (from.has_a()) {
  4262. set_a(from.a());
  4263. }
  4264. }
  4265. void TestAllTypes_OptionalGroup::CopyFrom(const ::google::protobuf::Message& from) {
  4266. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestAllTypes.OptionalGroup)
  4267. if (&from == this) return;
  4268. Clear();
  4269. MergeFrom(from);
  4270. }
  4271. void TestAllTypes_OptionalGroup::CopyFrom(const TestAllTypes_OptionalGroup& from) {
  4272. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllTypes.OptionalGroup)
  4273. if (&from == this) return;
  4274. Clear();
  4275. MergeFrom(from);
  4276. }
  4277. bool TestAllTypes_OptionalGroup::IsInitialized() const {
  4278. return true;
  4279. }
  4280. void TestAllTypes_OptionalGroup::Swap(TestAllTypes_OptionalGroup* other) {
  4281. if (other == this) return;
  4282. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  4283. InternalSwap(other);
  4284. } else {
  4285. TestAllTypes_OptionalGroup* temp = New(GetArenaNoVirtual());
  4286. temp->MergeFrom(*other);
  4287. other->CopyFrom(*this);
  4288. InternalSwap(temp);
  4289. if (GetArenaNoVirtual() == NULL) {
  4290. delete temp;
  4291. }
  4292. }
  4293. }
  4294. void TestAllTypes_OptionalGroup::UnsafeArenaSwap(TestAllTypes_OptionalGroup* other) {
  4295. if (other == this) return;
  4296. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  4297. InternalSwap(other);
  4298. }
  4299. void TestAllTypes_OptionalGroup::InternalSwap(TestAllTypes_OptionalGroup* other) {
  4300. using std::swap;
  4301. swap(a_, other->a_);
  4302. swap(_has_bits_[0], other->_has_bits_[0]);
  4303. _internal_metadata_.Swap(&other->_internal_metadata_);
  4304. }
  4305. ::google::protobuf::Metadata TestAllTypes_OptionalGroup::GetMetadata() const {
  4306. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  4307. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  4308. }
  4309. // ===================================================================
  4310. void TestAllTypes_RepeatedGroup::InitAsDefaultInstance() {
  4311. }
  4312. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4313. const int TestAllTypes_RepeatedGroup::kAFieldNumber;
  4314. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4315. TestAllTypes_RepeatedGroup::TestAllTypes_RepeatedGroup()
  4316. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4317. ::google::protobuf::internal::InitSCC(
  4318. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_RepeatedGroup.base);
  4319. SharedCtor();
  4320. // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4321. }
  4322. TestAllTypes_RepeatedGroup::TestAllTypes_RepeatedGroup(::google::protobuf::Arena* arena)
  4323. : ::google::protobuf::Message(),
  4324. _internal_metadata_(arena) {
  4325. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_RepeatedGroup.base);
  4326. SharedCtor();
  4327. RegisterArenaDtor(arena);
  4328. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4329. }
  4330. TestAllTypes_RepeatedGroup::TestAllTypes_RepeatedGroup(const TestAllTypes_RepeatedGroup& from)
  4331. : ::google::protobuf::Message(),
  4332. _internal_metadata_(NULL),
  4333. _has_bits_(from._has_bits_) {
  4334. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4335. a_ = from.a_;
  4336. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4337. }
  4338. void TestAllTypes_RepeatedGroup::SharedCtor() {
  4339. a_ = 0;
  4340. }
  4341. TestAllTypes_RepeatedGroup::~TestAllTypes_RepeatedGroup() {
  4342. // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4343. SharedDtor();
  4344. }
  4345. void TestAllTypes_RepeatedGroup::SharedDtor() {
  4346. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  4347. }
  4348. void TestAllTypes_RepeatedGroup::ArenaDtor(void* object) {
  4349. TestAllTypes_RepeatedGroup* _this = reinterpret_cast< TestAllTypes_RepeatedGroup* >(object);
  4350. (void)_this;
  4351. }
  4352. void TestAllTypes_RepeatedGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  4353. }
  4354. void TestAllTypes_RepeatedGroup::SetCachedSize(int size) const {
  4355. _cached_size_.Set(size);
  4356. }
  4357. const ::google::protobuf::Descriptor* TestAllTypes_RepeatedGroup::descriptor() {
  4358. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  4359. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4360. }
  4361. const TestAllTypes_RepeatedGroup& TestAllTypes_RepeatedGroup::default_instance() {
  4362. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes_RepeatedGroup.base);
  4363. return *internal_default_instance();
  4364. }
  4365. void TestAllTypes_RepeatedGroup::Clear() {
  4366. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4367. ::google::protobuf::uint32 cached_has_bits = 0;
  4368. // Prevent compiler warnings about cached_has_bits being unused
  4369. (void) cached_has_bits;
  4370. a_ = 0;
  4371. _has_bits_.Clear();
  4372. _internal_metadata_.Clear();
  4373. }
  4374. bool TestAllTypes_RepeatedGroup::MergePartialFromCodedStream(
  4375. ::google::protobuf::io::CodedInputStream* input) {
  4376. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4377. ::google::protobuf::uint32 tag;
  4378. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4379. for (;;) {
  4380. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  4381. tag = p.first;
  4382. if (!p.second) goto handle_unusual;
  4383. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4384. // optional int32 a = 47;
  4385. case 47: {
  4386. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4387. static_cast< ::google::protobuf::uint8>(120u /* 376 & 0xFF */)) {
  4388. set_has_a();
  4389. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  4390. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  4391. input, &a_)));
  4392. } else {
  4393. goto handle_unusual;
  4394. }
  4395. break;
  4396. }
  4397. default: {
  4398. handle_unusual:
  4399. if (tag == 0 ||
  4400. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  4401. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  4402. input->SetLastTag(tag);
  4403. goto success;
  4404. }
  4405. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4406. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4407. break;
  4408. }
  4409. }
  4410. }
  4411. success:
  4412. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4413. return true;
  4414. failure:
  4415. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4416. return false;
  4417. #undef DO_
  4418. }
  4419. void TestAllTypes_RepeatedGroup::SerializeWithCachedSizes(
  4420. ::google::protobuf::io::CodedOutputStream* output) const {
  4421. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4422. ::google::protobuf::uint32 cached_has_bits = 0;
  4423. (void) cached_has_bits;
  4424. cached_has_bits = _has_bits_[0];
  4425. // optional int32 a = 47;
  4426. if (cached_has_bits & 0x00000001u) {
  4427. ::google::protobuf::internal::WireFormatLite::WriteInt32(47, this->a(), output);
  4428. }
  4429. if (_internal_metadata_.have_unknown_fields()) {
  4430. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4431. _internal_metadata_.unknown_fields(), output);
  4432. }
  4433. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4434. }
  4435. ::google::protobuf::uint8* TestAllTypes_RepeatedGroup::InternalSerializeWithCachedSizesToArray(
  4436. bool deterministic, ::google::protobuf::uint8* target) const {
  4437. (void)deterministic; // Unused
  4438. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4439. ::google::protobuf::uint32 cached_has_bits = 0;
  4440. (void) cached_has_bits;
  4441. cached_has_bits = _has_bits_[0];
  4442. // optional int32 a = 47;
  4443. if (cached_has_bits & 0x00000001u) {
  4444. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(47, this->a(), target);
  4445. }
  4446. if (_internal_metadata_.have_unknown_fields()) {
  4447. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4448. _internal_metadata_.unknown_fields(), target);
  4449. }
  4450. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4451. return target;
  4452. }
  4453. size_t TestAllTypes_RepeatedGroup::ByteSizeLong() const {
  4454. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4455. size_t total_size = 0;
  4456. if (_internal_metadata_.have_unknown_fields()) {
  4457. total_size +=
  4458. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4459. _internal_metadata_.unknown_fields());
  4460. }
  4461. // optional int32 a = 47;
  4462. if (has_a()) {
  4463. total_size += 2 +
  4464. ::google::protobuf::internal::WireFormatLite::Int32Size(
  4465. this->a());
  4466. }
  4467. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4468. SetCachedSize(cached_size);
  4469. return total_size;
  4470. }
  4471. void TestAllTypes_RepeatedGroup::MergeFrom(const ::google::protobuf::Message& from) {
  4472. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4473. GOOGLE_DCHECK_NE(&from, this);
  4474. const TestAllTypes_RepeatedGroup* source =
  4475. ::google::protobuf::internal::DynamicCastToGenerated<const TestAllTypes_RepeatedGroup>(
  4476. &from);
  4477. if (source == NULL) {
  4478. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4479. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4480. } else {
  4481. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4482. MergeFrom(*source);
  4483. }
  4484. }
  4485. void TestAllTypes_RepeatedGroup::MergeFrom(const TestAllTypes_RepeatedGroup& from) {
  4486. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4487. GOOGLE_DCHECK_NE(&from, this);
  4488. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4489. ::google::protobuf::uint32 cached_has_bits = 0;
  4490. (void) cached_has_bits;
  4491. if (from.has_a()) {
  4492. set_a(from.a());
  4493. }
  4494. }
  4495. void TestAllTypes_RepeatedGroup::CopyFrom(const ::google::protobuf::Message& from) {
  4496. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4497. if (&from == this) return;
  4498. Clear();
  4499. MergeFrom(from);
  4500. }
  4501. void TestAllTypes_RepeatedGroup::CopyFrom(const TestAllTypes_RepeatedGroup& from) {
  4502. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllTypes.RepeatedGroup)
  4503. if (&from == this) return;
  4504. Clear();
  4505. MergeFrom(from);
  4506. }
  4507. bool TestAllTypes_RepeatedGroup::IsInitialized() const {
  4508. return true;
  4509. }
  4510. void TestAllTypes_RepeatedGroup::Swap(TestAllTypes_RepeatedGroup* other) {
  4511. if (other == this) return;
  4512. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  4513. InternalSwap(other);
  4514. } else {
  4515. TestAllTypes_RepeatedGroup* temp = New(GetArenaNoVirtual());
  4516. temp->MergeFrom(*other);
  4517. other->CopyFrom(*this);
  4518. InternalSwap(temp);
  4519. if (GetArenaNoVirtual() == NULL) {
  4520. delete temp;
  4521. }
  4522. }
  4523. }
  4524. void TestAllTypes_RepeatedGroup::UnsafeArenaSwap(TestAllTypes_RepeatedGroup* other) {
  4525. if (other == this) return;
  4526. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  4527. InternalSwap(other);
  4528. }
  4529. void TestAllTypes_RepeatedGroup::InternalSwap(TestAllTypes_RepeatedGroup* other) {
  4530. using std::swap;
  4531. swap(a_, other->a_);
  4532. swap(_has_bits_[0], other->_has_bits_[0]);
  4533. _internal_metadata_.Swap(&other->_internal_metadata_);
  4534. }
  4535. ::google::protobuf::Metadata TestAllTypes_RepeatedGroup::GetMetadata() const {
  4536. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  4537. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  4538. }
  4539. // ===================================================================
  4540. void TestAllTypes::InitAsDefaultInstance() {
  4541. ::protobuf_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optionalgroup_ = const_cast< ::protobuf_unittest::TestAllTypes_OptionalGroup*>(
  4542. ::protobuf_unittest::TestAllTypes_OptionalGroup::internal_default_instance());
  4543. ::protobuf_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_nested_message_ = const_cast< ::protobuf_unittest::TestAllTypes_NestedMessage*>(
  4544. ::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
  4545. ::protobuf_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_foreign_message_ = const_cast< ::protobuf_unittest::ForeignMessage*>(
  4546. ::protobuf_unittest::ForeignMessage::internal_default_instance());
  4547. ::protobuf_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_import_message_ = const_cast< ::protobuf_unittest_import::ImportMessage*>(
  4548. ::protobuf_unittest_import::ImportMessage::internal_default_instance());
  4549. ::protobuf_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_public_import_message_ = const_cast< ::protobuf_unittest_import::PublicImportMessage*>(
  4550. ::protobuf_unittest_import::PublicImportMessage::internal_default_instance());
  4551. ::protobuf_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_lazy_message_ = const_cast< ::protobuf_unittest::TestAllTypes_NestedMessage*>(
  4552. ::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
  4553. ::protobuf_unittest::_TestAllTypes_default_instance_.oneof_uint32_ = 0u;
  4554. ::protobuf_unittest::_TestAllTypes_default_instance_.oneof_nested_message_ = const_cast< ::protobuf_unittest::TestAllTypes_NestedMessage*>(
  4555. ::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
  4556. ::protobuf_unittest::_TestAllTypes_default_instance_.oneof_string_.UnsafeSetDefault(
  4557. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4558. ::protobuf_unittest::_TestAllTypes_default_instance_.oneof_bytes_.UnsafeSetDefault(
  4559. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4560. }
  4561. void TestAllTypes::unsafe_arena_set_allocated_optionalgroup(
  4562. ::protobuf_unittest::TestAllTypes_OptionalGroup* optionalgroup) {
  4563. if (GetArenaNoVirtual() == NULL) {
  4564. delete optionalgroup_;
  4565. }
  4566. optionalgroup_ = optionalgroup;
  4567. if (optionalgroup) {
  4568. set_has_optionalgroup();
  4569. } else {
  4570. clear_has_optionalgroup();
  4571. }
  4572. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestAllTypes.optionalgroup)
  4573. }
  4574. void TestAllTypes::unsafe_arena_set_allocated_optional_nested_message(
  4575. ::protobuf_unittest::TestAllTypes_NestedMessage* optional_nested_message) {
  4576. if (GetArenaNoVirtual() == NULL) {
  4577. delete optional_nested_message_;
  4578. }
  4579. optional_nested_message_ = optional_nested_message;
  4580. if (optional_nested_message) {
  4581. set_has_optional_nested_message();
  4582. } else {
  4583. clear_has_optional_nested_message();
  4584. }
  4585. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestAllTypes.optional_nested_message)
  4586. }
  4587. void TestAllTypes::unsafe_arena_set_allocated_optional_foreign_message(
  4588. ::protobuf_unittest::ForeignMessage* optional_foreign_message) {
  4589. if (GetArenaNoVirtual() == NULL) {
  4590. delete optional_foreign_message_;
  4591. }
  4592. optional_foreign_message_ = optional_foreign_message;
  4593. if (optional_foreign_message) {
  4594. set_has_optional_foreign_message();
  4595. } else {
  4596. clear_has_optional_foreign_message();
  4597. }
  4598. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestAllTypes.optional_foreign_message)
  4599. }
  4600. void TestAllTypes::unsafe_arena_set_allocated_optional_import_message(
  4601. ::protobuf_unittest_import::ImportMessage* optional_import_message) {
  4602. if (GetArenaNoVirtual() == NULL) {
  4603. delete optional_import_message_;
  4604. }
  4605. optional_import_message_ = optional_import_message;
  4606. if (optional_import_message) {
  4607. set_has_optional_import_message();
  4608. } else {
  4609. clear_has_optional_import_message();
  4610. }
  4611. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestAllTypes.optional_import_message)
  4612. }
  4613. void TestAllTypes::clear_optional_import_message() {
  4614. if (optional_import_message_ != NULL) optional_import_message_->Clear();
  4615. clear_has_optional_import_message();
  4616. }
  4617. void TestAllTypes::unsafe_arena_set_allocated_optional_public_import_message(
  4618. ::protobuf_unittest_import::PublicImportMessage* optional_public_import_message) {
  4619. if (GetArenaNoVirtual() == NULL) {
  4620. delete optional_public_import_message_;
  4621. }
  4622. optional_public_import_message_ = optional_public_import_message;
  4623. if (optional_public_import_message) {
  4624. set_has_optional_public_import_message();
  4625. } else {
  4626. clear_has_optional_public_import_message();
  4627. }
  4628. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestAllTypes.optional_public_import_message)
  4629. }
  4630. void TestAllTypes::clear_optional_public_import_message() {
  4631. if (optional_public_import_message_ != NULL) optional_public_import_message_->Clear();
  4632. clear_has_optional_public_import_message();
  4633. }
  4634. void TestAllTypes::unsafe_arena_set_allocated_optional_lazy_message(
  4635. ::protobuf_unittest::TestAllTypes_NestedMessage* optional_lazy_message) {
  4636. if (GetArenaNoVirtual() == NULL) {
  4637. delete optional_lazy_message_;
  4638. }
  4639. optional_lazy_message_ = optional_lazy_message;
  4640. if (optional_lazy_message) {
  4641. set_has_optional_lazy_message();
  4642. } else {
  4643. clear_has_optional_lazy_message();
  4644. }
  4645. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestAllTypes.optional_lazy_message)
  4646. }
  4647. void TestAllTypes::clear_repeated_import_message() {
  4648. repeated_import_message_.Clear();
  4649. }
  4650. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_;
  4651. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_;
  4652. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_;
  4653. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_;
  4654. void TestAllTypes::set_allocated_oneof_nested_message(::protobuf_unittest::TestAllTypes_NestedMessage* oneof_nested_message) {
  4655. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  4656. clear_oneof_field();
  4657. if (oneof_nested_message) {
  4658. ::google::protobuf::Arena* submessage_arena =
  4659. ::google::protobuf::Arena::GetArena(oneof_nested_message);
  4660. if (message_arena != submessage_arena) {
  4661. oneof_nested_message = ::google::protobuf::internal::GetOwnedMessage(
  4662. message_arena, oneof_nested_message, submessage_arena);
  4663. }
  4664. set_has_oneof_nested_message();
  4665. oneof_field_.oneof_nested_message_ = oneof_nested_message;
  4666. }
  4667. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestAllTypes.oneof_nested_message)
  4668. }
  4669. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4670. const int TestAllTypes::kOptionalInt32FieldNumber;
  4671. const int TestAllTypes::kOptionalInt64FieldNumber;
  4672. const int TestAllTypes::kOptionalUint32FieldNumber;
  4673. const int TestAllTypes::kOptionalUint64FieldNumber;
  4674. const int TestAllTypes::kOptionalSint32FieldNumber;
  4675. const int TestAllTypes::kOptionalSint64FieldNumber;
  4676. const int TestAllTypes::kOptionalFixed32FieldNumber;
  4677. const int TestAllTypes::kOptionalFixed64FieldNumber;
  4678. const int TestAllTypes::kOptionalSfixed32FieldNumber;
  4679. const int TestAllTypes::kOptionalSfixed64FieldNumber;
  4680. const int TestAllTypes::kOptionalFloatFieldNumber;
  4681. const int TestAllTypes::kOptionalDoubleFieldNumber;
  4682. const int TestAllTypes::kOptionalBoolFieldNumber;
  4683. const int TestAllTypes::kOptionalStringFieldNumber;
  4684. const int TestAllTypes::kOptionalBytesFieldNumber;
  4685. const int TestAllTypes::kOptionalgroupFieldNumber;
  4686. const int TestAllTypes::kOptionalNestedMessageFieldNumber;
  4687. const int TestAllTypes::kOptionalForeignMessageFieldNumber;
  4688. const int TestAllTypes::kOptionalImportMessageFieldNumber;
  4689. const int TestAllTypes::kOptionalNestedEnumFieldNumber;
  4690. const int TestAllTypes::kOptionalForeignEnumFieldNumber;
  4691. const int TestAllTypes::kOptionalImportEnumFieldNumber;
  4692. const int TestAllTypes::kOptionalStringPieceFieldNumber;
  4693. const int TestAllTypes::kOptionalCordFieldNumber;
  4694. const int TestAllTypes::kOptionalPublicImportMessageFieldNumber;
  4695. const int TestAllTypes::kOptionalLazyMessageFieldNumber;
  4696. const int TestAllTypes::kRepeatedInt32FieldNumber;
  4697. const int TestAllTypes::kRepeatedInt64FieldNumber;
  4698. const int TestAllTypes::kRepeatedUint32FieldNumber;
  4699. const int TestAllTypes::kRepeatedUint64FieldNumber;
  4700. const int TestAllTypes::kRepeatedSint32FieldNumber;
  4701. const int TestAllTypes::kRepeatedSint64FieldNumber;
  4702. const int TestAllTypes::kRepeatedFixed32FieldNumber;
  4703. const int TestAllTypes::kRepeatedFixed64FieldNumber;
  4704. const int TestAllTypes::kRepeatedSfixed32FieldNumber;
  4705. const int TestAllTypes::kRepeatedSfixed64FieldNumber;
  4706. const int TestAllTypes::kRepeatedFloatFieldNumber;
  4707. const int TestAllTypes::kRepeatedDoubleFieldNumber;
  4708. const int TestAllTypes::kRepeatedBoolFieldNumber;
  4709. const int TestAllTypes::kRepeatedStringFieldNumber;
  4710. const int TestAllTypes::kRepeatedBytesFieldNumber;
  4711. const int TestAllTypes::kRepeatedgroupFieldNumber;
  4712. const int TestAllTypes::kRepeatedNestedMessageFieldNumber;
  4713. const int TestAllTypes::kRepeatedForeignMessageFieldNumber;
  4714. const int TestAllTypes::kRepeatedImportMessageFieldNumber;
  4715. const int TestAllTypes::kRepeatedNestedEnumFieldNumber;
  4716. const int TestAllTypes::kRepeatedForeignEnumFieldNumber;
  4717. const int TestAllTypes::kRepeatedImportEnumFieldNumber;
  4718. const int TestAllTypes::kRepeatedStringPieceFieldNumber;
  4719. const int TestAllTypes::kRepeatedCordFieldNumber;
  4720. const int TestAllTypes::kRepeatedLazyMessageFieldNumber;
  4721. const int TestAllTypes::kDefaultInt32FieldNumber;
  4722. const int TestAllTypes::kDefaultInt64FieldNumber;
  4723. const int TestAllTypes::kDefaultUint32FieldNumber;
  4724. const int TestAllTypes::kDefaultUint64FieldNumber;
  4725. const int TestAllTypes::kDefaultSint32FieldNumber;
  4726. const int TestAllTypes::kDefaultSint64FieldNumber;
  4727. const int TestAllTypes::kDefaultFixed32FieldNumber;
  4728. const int TestAllTypes::kDefaultFixed64FieldNumber;
  4729. const int TestAllTypes::kDefaultSfixed32FieldNumber;
  4730. const int TestAllTypes::kDefaultSfixed64FieldNumber;
  4731. const int TestAllTypes::kDefaultFloatFieldNumber;
  4732. const int TestAllTypes::kDefaultDoubleFieldNumber;
  4733. const int TestAllTypes::kDefaultBoolFieldNumber;
  4734. const int TestAllTypes::kDefaultStringFieldNumber;
  4735. const int TestAllTypes::kDefaultBytesFieldNumber;
  4736. const int TestAllTypes::kDefaultNestedEnumFieldNumber;
  4737. const int TestAllTypes::kDefaultForeignEnumFieldNumber;
  4738. const int TestAllTypes::kDefaultImportEnumFieldNumber;
  4739. const int TestAllTypes::kDefaultStringPieceFieldNumber;
  4740. const int TestAllTypes::kDefaultCordFieldNumber;
  4741. const int TestAllTypes::kOneofUint32FieldNumber;
  4742. const int TestAllTypes::kOneofNestedMessageFieldNumber;
  4743. const int TestAllTypes::kOneofStringFieldNumber;
  4744. const int TestAllTypes::kOneofBytesFieldNumber;
  4745. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4746. TestAllTypes::TestAllTypes()
  4747. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4748. ::google::protobuf::internal::InitSCC(
  4749. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base);
  4750. SharedCtor();
  4751. // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllTypes)
  4752. }
  4753. TestAllTypes::TestAllTypes(::google::protobuf::Arena* arena)
  4754. : ::google::protobuf::Message(),
  4755. _internal_metadata_(arena),
  4756. repeated_int32_(arena),
  4757. repeated_int64_(arena),
  4758. repeated_uint32_(arena),
  4759. repeated_uint64_(arena),
  4760. repeated_sint32_(arena),
  4761. repeated_sint64_(arena),
  4762. repeated_fixed32_(arena),
  4763. repeated_fixed64_(arena),
  4764. repeated_sfixed32_(arena),
  4765. repeated_sfixed64_(arena),
  4766. repeated_float_(arena),
  4767. repeated_double_(arena),
  4768. repeated_bool_(arena),
  4769. repeated_string_(arena),
  4770. repeated_bytes_(arena),
  4771. repeatedgroup_(arena),
  4772. repeated_nested_message_(arena),
  4773. repeated_foreign_message_(arena),
  4774. repeated_import_message_(arena),
  4775. repeated_nested_enum_(arena),
  4776. repeated_foreign_enum_(arena),
  4777. repeated_import_enum_(arena),
  4778. repeated_string_piece_(arena),
  4779. repeated_cord_(arena),
  4780. repeated_lazy_message_(arena) {
  4781. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base);
  4782. SharedCtor();
  4783. RegisterArenaDtor(arena);
  4784. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestAllTypes)
  4785. }
  4786. TestAllTypes::TestAllTypes(const TestAllTypes& from)
  4787. : ::google::protobuf::Message(),
  4788. _internal_metadata_(NULL),
  4789. _has_bits_(from._has_bits_),
  4790. repeated_int32_(from.repeated_int32_),
  4791. repeated_int64_(from.repeated_int64_),
  4792. repeated_uint32_(from.repeated_uint32_),
  4793. repeated_uint64_(from.repeated_uint64_),
  4794. repeated_sint32_(from.repeated_sint32_),
  4795. repeated_sint64_(from.repeated_sint64_),
  4796. repeated_fixed32_(from.repeated_fixed32_),
  4797. repeated_fixed64_(from.repeated_fixed64_),
  4798. repeated_sfixed32_(from.repeated_sfixed32_),
  4799. repeated_sfixed64_(from.repeated_sfixed64_),
  4800. repeated_float_(from.repeated_float_),
  4801. repeated_double_(from.repeated_double_),
  4802. repeated_bool_(from.repeated_bool_),
  4803. repeated_string_(from.repeated_string_),
  4804. repeated_bytes_(from.repeated_bytes_),
  4805. repeatedgroup_(from.repeatedgroup_),
  4806. repeated_nested_message_(from.repeated_nested_message_),
  4807. repeated_foreign_message_(from.repeated_foreign_message_),
  4808. repeated_import_message_(from.repeated_import_message_),
  4809. repeated_nested_enum_(from.repeated_nested_enum_),
  4810. repeated_foreign_enum_(from.repeated_foreign_enum_),
  4811. repeated_import_enum_(from.repeated_import_enum_),
  4812. repeated_string_piece_(from.repeated_string_piece_),
  4813. repeated_cord_(from.repeated_cord_),
  4814. repeated_lazy_message_(from.repeated_lazy_message_) {
  4815. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4816. optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4817. if (from.has_optional_string()) {
  4818. optional_string_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string(),
  4819. GetArenaNoVirtual());
  4820. }
  4821. optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4822. if (from.has_optional_bytes()) {
  4823. optional_bytes_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes(),
  4824. GetArenaNoVirtual());
  4825. }
  4826. optional_string_piece_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4827. if (from.has_optional_string_piece()) {
  4828. optional_string_piece_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_piece(),
  4829. GetArenaNoVirtual());
  4830. }
  4831. optional_cord_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4832. if (from.has_optional_cord()) {
  4833. optional_cord_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_cord(),
  4834. GetArenaNoVirtual());
  4835. }
  4836. default_string_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get());
  4837. if (from.has_default_string()) {
  4838. default_string_.Set(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get(), from.default_string(),
  4839. GetArenaNoVirtual());
  4840. }
  4841. default_bytes_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get());
  4842. if (from.has_default_bytes()) {
  4843. default_bytes_.Set(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get(), from.default_bytes(),
  4844. GetArenaNoVirtual());
  4845. }
  4846. default_string_piece_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
  4847. if (from.has_default_string_piece()) {
  4848. default_string_piece_.Set(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get(), from.default_string_piece(),
  4849. GetArenaNoVirtual());
  4850. }
  4851. default_cord_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get());
  4852. if (from.has_default_cord()) {
  4853. default_cord_.Set(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get(), from.default_cord(),
  4854. GetArenaNoVirtual());
  4855. }
  4856. if (from.has_optionalgroup()) {
  4857. optionalgroup_ = new ::protobuf_unittest::TestAllTypes_OptionalGroup(*from.optionalgroup_);
  4858. } else {
  4859. optionalgroup_ = NULL;
  4860. }
  4861. if (from.has_optional_nested_message()) {
  4862. optional_nested_message_ = new ::protobuf_unittest::TestAllTypes_NestedMessage(*from.optional_nested_message_);
  4863. } else {
  4864. optional_nested_message_ = NULL;
  4865. }
  4866. if (from.has_optional_foreign_message()) {
  4867. optional_foreign_message_ = new ::protobuf_unittest::ForeignMessage(*from.optional_foreign_message_);
  4868. } else {
  4869. optional_foreign_message_ = NULL;
  4870. }
  4871. if (from.has_optional_import_message()) {
  4872. optional_import_message_ = new ::protobuf_unittest_import::ImportMessage(*from.optional_import_message_);
  4873. } else {
  4874. optional_import_message_ = NULL;
  4875. }
  4876. if (from.has_optional_public_import_message()) {
  4877. optional_public_import_message_ = new ::protobuf_unittest_import::PublicImportMessage(*from.optional_public_import_message_);
  4878. } else {
  4879. optional_public_import_message_ = NULL;
  4880. }
  4881. if (from.has_optional_lazy_message()) {
  4882. optional_lazy_message_ = new ::protobuf_unittest::TestAllTypes_NestedMessage(*from.optional_lazy_message_);
  4883. } else {
  4884. optional_lazy_message_ = NULL;
  4885. }
  4886. ::memcpy(&optional_int64_, &from.optional_int64_,
  4887. static_cast<size_t>(reinterpret_cast<char*>(&default_foreign_enum_) -
  4888. reinterpret_cast<char*>(&optional_int64_)) + sizeof(default_foreign_enum_));
  4889. clear_has_oneof_field();
  4890. switch (from.oneof_field_case()) {
  4891. case kOneofUint32: {
  4892. set_oneof_uint32(from.oneof_uint32());
  4893. break;
  4894. }
  4895. case kOneofNestedMessage: {
  4896. mutable_oneof_nested_message()->::protobuf_unittest::TestAllTypes_NestedMessage::MergeFrom(from.oneof_nested_message());
  4897. break;
  4898. }
  4899. case kOneofString: {
  4900. set_oneof_string(from.oneof_string());
  4901. break;
  4902. }
  4903. case kOneofBytes: {
  4904. set_oneof_bytes(from.oneof_bytes());
  4905. break;
  4906. }
  4907. case ONEOF_FIELD_NOT_SET: {
  4908. break;
  4909. }
  4910. }
  4911. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllTypes)
  4912. }
  4913. void TestAllTypes::SharedCtor() {
  4914. optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4915. optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4916. optional_string_piece_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4917. optional_cord_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4918. default_string_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get());
  4919. default_bytes_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get());
  4920. default_string_piece_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
  4921. default_cord_.UnsafeSetDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get());
  4922. ::memset(&optionalgroup_, 0, static_cast<size_t>(
  4923. reinterpret_cast<char*>(&optional_bool_) -
  4924. reinterpret_cast<char*>(&optionalgroup_)) + sizeof(optional_bool_));
  4925. default_import_enum_ = 8;
  4926. optional_nested_enum_ = 1;
  4927. optional_foreign_enum_ = 4;
  4928. optional_import_enum_ = 7;
  4929. default_int32_ = 41;
  4930. default_int64_ = GOOGLE_LONGLONG(42);
  4931. default_uint64_ = GOOGLE_ULONGLONG(44);
  4932. default_uint32_ = 43u;
  4933. default_sint32_ = -45;
  4934. default_sint64_ = GOOGLE_LONGLONG(46);
  4935. default_fixed64_ = GOOGLE_ULONGLONG(48);
  4936. default_fixed32_ = 47u;
  4937. default_sfixed32_ = 49;
  4938. default_sfixed64_ = GOOGLE_LONGLONG(-50);
  4939. default_double_ = 52000;
  4940. default_float_ = 51.5f;
  4941. default_bool_ = true;
  4942. default_nested_enum_ = 2;
  4943. default_foreign_enum_ = 5;
  4944. clear_has_oneof_field();
  4945. }
  4946. TestAllTypes::~TestAllTypes() {
  4947. // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllTypes)
  4948. SharedDtor();
  4949. }
  4950. void TestAllTypes::SharedDtor() {
  4951. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  4952. optional_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4953. optional_bytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4954. optional_string_piece_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4955. optional_cord_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4956. default_string_.DestroyNoArena(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get());
  4957. default_bytes_.DestroyNoArena(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get());
  4958. default_string_piece_.DestroyNoArena(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
  4959. default_cord_.DestroyNoArena(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get());
  4960. if (this != internal_default_instance()) delete optionalgroup_;
  4961. if (this != internal_default_instance()) delete optional_nested_message_;
  4962. if (this != internal_default_instance()) delete optional_foreign_message_;
  4963. if (this != internal_default_instance()) delete optional_import_message_;
  4964. if (this != internal_default_instance()) delete optional_public_import_message_;
  4965. if (this != internal_default_instance()) delete optional_lazy_message_;
  4966. if (has_oneof_field()) {
  4967. clear_oneof_field();
  4968. }
  4969. }
  4970. void TestAllTypes::ArenaDtor(void* object) {
  4971. TestAllTypes* _this = reinterpret_cast< TestAllTypes* >(object);
  4972. (void)_this;
  4973. }
  4974. void TestAllTypes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  4975. }
  4976. void TestAllTypes::SetCachedSize(int size) const {
  4977. _cached_size_.Set(size);
  4978. }
  4979. const ::google::protobuf::Descriptor* TestAllTypes::descriptor() {
  4980. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  4981. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4982. }
  4983. const TestAllTypes& TestAllTypes::default_instance() {
  4984. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllTypes.base);
  4985. return *internal_default_instance();
  4986. }
  4987. void TestAllTypes::clear_oneof_field() {
  4988. // @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestAllTypes)
  4989. switch (oneof_field_case()) {
  4990. case kOneofUint32: {
  4991. // No need to clear
  4992. break;
  4993. }
  4994. case kOneofNestedMessage: {
  4995. if (GetArenaNoVirtual() == NULL) {
  4996. delete oneof_field_.oneof_nested_message_;
  4997. }
  4998. break;
  4999. }
  5000. case kOneofString: {
  5001. oneof_field_.oneof_string_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  5002. GetArenaNoVirtual());
  5003. break;
  5004. }
  5005. case kOneofBytes: {
  5006. oneof_field_.oneof_bytes_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  5007. GetArenaNoVirtual());
  5008. break;
  5009. }
  5010. case ONEOF_FIELD_NOT_SET: {
  5011. break;
  5012. }
  5013. }
  5014. _oneof_case_[0] = ONEOF_FIELD_NOT_SET;
  5015. }
  5016. void TestAllTypes::Clear() {
  5017. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestAllTypes)
  5018. ::google::protobuf::uint32 cached_has_bits = 0;
  5019. // Prevent compiler warnings about cached_has_bits being unused
  5020. (void) cached_has_bits;
  5021. repeated_int32_.Clear();
  5022. repeated_int64_.Clear();
  5023. repeated_uint32_.Clear();
  5024. repeated_uint64_.Clear();
  5025. repeated_sint32_.Clear();
  5026. repeated_sint64_.Clear();
  5027. repeated_fixed32_.Clear();
  5028. repeated_fixed64_.Clear();
  5029. repeated_sfixed32_.Clear();
  5030. repeated_sfixed64_.Clear();
  5031. repeated_float_.Clear();
  5032. repeated_double_.Clear();
  5033. repeated_bool_.Clear();
  5034. repeated_string_.Clear();
  5035. repeated_bytes_.Clear();
  5036. repeatedgroup_.Clear();
  5037. repeated_nested_message_.Clear();
  5038. repeated_foreign_message_.Clear();
  5039. repeated_import_message_.Clear();
  5040. repeated_nested_enum_.Clear();
  5041. repeated_foreign_enum_.Clear();
  5042. repeated_import_enum_.Clear();
  5043. repeated_string_piece_.Clear();
  5044. repeated_cord_.Clear();
  5045. repeated_lazy_message_.Clear();
  5046. cached_has_bits = _has_bits_[0];
  5047. if (cached_has_bits & 255u) {
  5048. if (cached_has_bits & 0x00000001u) {
  5049. optional_string_.ClearNonDefaultToEmpty();
  5050. }
  5051. if (cached_has_bits & 0x00000002u) {
  5052. optional_bytes_.ClearNonDefaultToEmpty();
  5053. }
  5054. if (cached_has_bits & 0x00000004u) {
  5055. optional_string_piece_.ClearNonDefaultToEmpty();
  5056. }
  5057. if (cached_has_bits & 0x00000008u) {
  5058. optional_cord_.ClearNonDefaultToEmpty();
  5059. }
  5060. if (cached_has_bits & 0x00000010u) {
  5061. default_string_.ClearToDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get(), GetArenaNoVirtual());
  5062. }
  5063. if (cached_has_bits & 0x00000020u) {
  5064. default_bytes_.ClearToDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get(), GetArenaNoVirtual());
  5065. }
  5066. if (cached_has_bits & 0x00000040u) {
  5067. default_string_piece_.ClearToDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get(), GetArenaNoVirtual());
  5068. }
  5069. if (cached_has_bits & 0x00000080u) {
  5070. default_cord_.ClearToDefault(&::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get(), GetArenaNoVirtual());
  5071. }
  5072. }
  5073. if (cached_has_bits & 16128u) {
  5074. if (cached_has_bits & 0x00000100u) {
  5075. GOOGLE_DCHECK(optionalgroup_ != NULL);
  5076. optionalgroup_->Clear();
  5077. }
  5078. if (cached_has_bits & 0x00000200u) {
  5079. GOOGLE_DCHECK(optional_nested_message_ != NULL);
  5080. optional_nested_message_->Clear();
  5081. }
  5082. if (cached_has_bits & 0x00000400u) {
  5083. GOOGLE_DCHECK(optional_foreign_message_ != NULL);
  5084. optional_foreign_message_->Clear();
  5085. }
  5086. if (cached_has_bits & 0x00000800u) {
  5087. GOOGLE_DCHECK(optional_import_message_ != NULL);
  5088. optional_import_message_->Clear();
  5089. }
  5090. if (cached_has_bits & 0x00001000u) {
  5091. GOOGLE_DCHECK(optional_public_import_message_ != NULL);
  5092. optional_public_import_message_->Clear();
  5093. }
  5094. if (cached_has_bits & 0x00002000u) {
  5095. GOOGLE_DCHECK(optional_lazy_message_ != NULL);
  5096. optional_lazy_message_->Clear();
  5097. }
  5098. }
  5099. if (cached_has_bits & 49152u) {
  5100. ::memset(&optional_int64_, 0, static_cast<size_t>(
  5101. reinterpret_cast<char*>(&optional_int32_) -
  5102. reinterpret_cast<char*>(&optional_int64_)) + sizeof(optional_int32_));
  5103. }
  5104. if (cached_has_bits & 16711680u) {
  5105. ::memset(&optional_uint32_, 0, static_cast<size_t>(
  5106. reinterpret_cast<char*>(&optional_sfixed32_) -
  5107. reinterpret_cast<char*>(&optional_uint32_)) + sizeof(optional_sfixed32_));
  5108. }
  5109. if (cached_has_bits & 4278190080u) {
  5110. ::memset(&optional_float_, 0, static_cast<size_t>(
  5111. reinterpret_cast<char*>(&optional_bool_) -
  5112. reinterpret_cast<char*>(&optional_float_)) + sizeof(optional_bool_));
  5113. default_import_enum_ = 8;
  5114. optional_nested_enum_ = 1;
  5115. optional_foreign_enum_ = 4;
  5116. optional_import_enum_ = 7;
  5117. default_int32_ = 41;
  5118. }
  5119. cached_has_bits = _has_bits_[1];
  5120. if (cached_has_bits & 255u) {
  5121. default_int64_ = GOOGLE_LONGLONG(42);
  5122. default_uint64_ = GOOGLE_ULONGLONG(44);
  5123. default_uint32_ = 43u;
  5124. default_sint32_ = -45;
  5125. default_sint64_ = GOOGLE_LONGLONG(46);
  5126. default_fixed64_ = GOOGLE_ULONGLONG(48);
  5127. default_fixed32_ = 47u;
  5128. default_sfixed32_ = 49;
  5129. }
  5130. if (cached_has_bits & 16128u) {
  5131. default_sfixed64_ = GOOGLE_LONGLONG(-50);
  5132. default_double_ = 52000;
  5133. default_float_ = 51.5f;
  5134. default_bool_ = true;
  5135. default_nested_enum_ = 2;
  5136. default_foreign_enum_ = 5;
  5137. }
  5138. clear_oneof_field();
  5139. _has_bits_.Clear();
  5140. _internal_metadata_.Clear();
  5141. }
  5142. bool TestAllTypes::MergePartialFromCodedStream(
  5143. ::google::protobuf::io::CodedInputStream* input) {
  5144. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5145. ::google::protobuf::uint32 tag;
  5146. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestAllTypes)
  5147. for (;;) {
  5148. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  5149. tag = p.first;
  5150. if (!p.second) goto handle_unusual;
  5151. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5152. // optional int32 optional_int32 = 1;
  5153. case 1: {
  5154. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5155. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  5156. set_has_optional_int32();
  5157. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5158. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  5159. input, &optional_int32_)));
  5160. } else {
  5161. goto handle_unusual;
  5162. }
  5163. break;
  5164. }
  5165. // optional int64 optional_int64 = 2;
  5166. case 2: {
  5167. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5168. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  5169. set_has_optional_int64();
  5170. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5171. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  5172. input, &optional_int64_)));
  5173. } else {
  5174. goto handle_unusual;
  5175. }
  5176. break;
  5177. }
  5178. // optional uint32 optional_uint32 = 3;
  5179. case 3: {
  5180. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5181. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  5182. set_has_optional_uint32();
  5183. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5184. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  5185. input, &optional_uint32_)));
  5186. } else {
  5187. goto handle_unusual;
  5188. }
  5189. break;
  5190. }
  5191. // optional uint64 optional_uint64 = 4;
  5192. case 4: {
  5193. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5194. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  5195. set_has_optional_uint64();
  5196. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5197. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  5198. input, &optional_uint64_)));
  5199. } else {
  5200. goto handle_unusual;
  5201. }
  5202. break;
  5203. }
  5204. // optional sint32 optional_sint32 = 5;
  5205. case 5: {
  5206. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5207. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  5208. set_has_optional_sint32();
  5209. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5210. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  5211. input, &optional_sint32_)));
  5212. } else {
  5213. goto handle_unusual;
  5214. }
  5215. break;
  5216. }
  5217. // optional sint64 optional_sint64 = 6;
  5218. case 6: {
  5219. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5220. static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
  5221. set_has_optional_sint64();
  5222. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5223. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  5224. input, &optional_sint64_)));
  5225. } else {
  5226. goto handle_unusual;
  5227. }
  5228. break;
  5229. }
  5230. // optional fixed32 optional_fixed32 = 7;
  5231. case 7: {
  5232. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5233. static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
  5234. set_has_optional_fixed32();
  5235. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5236. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  5237. input, &optional_fixed32_)));
  5238. } else {
  5239. goto handle_unusual;
  5240. }
  5241. break;
  5242. }
  5243. // optional fixed64 optional_fixed64 = 8;
  5244. case 8: {
  5245. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5246. static_cast< ::google::protobuf::uint8>(65u /* 65 & 0xFF */)) {
  5247. set_has_optional_fixed64();
  5248. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5249. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  5250. input, &optional_fixed64_)));
  5251. } else {
  5252. goto handle_unusual;
  5253. }
  5254. break;
  5255. }
  5256. // optional sfixed32 optional_sfixed32 = 9;
  5257. case 9: {
  5258. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5259. static_cast< ::google::protobuf::uint8>(77u /* 77 & 0xFF */)) {
  5260. set_has_optional_sfixed32();
  5261. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5262. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  5263. input, &optional_sfixed32_)));
  5264. } else {
  5265. goto handle_unusual;
  5266. }
  5267. break;
  5268. }
  5269. // optional sfixed64 optional_sfixed64 = 10;
  5270. case 10: {
  5271. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5272. static_cast< ::google::protobuf::uint8>(81u /* 81 & 0xFF */)) {
  5273. set_has_optional_sfixed64();
  5274. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5275. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  5276. input, &optional_sfixed64_)));
  5277. } else {
  5278. goto handle_unusual;
  5279. }
  5280. break;
  5281. }
  5282. // optional float optional_float = 11;
  5283. case 11: {
  5284. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5285. static_cast< ::google::protobuf::uint8>(93u /* 93 & 0xFF */)) {
  5286. set_has_optional_float();
  5287. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5288. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  5289. input, &optional_float_)));
  5290. } else {
  5291. goto handle_unusual;
  5292. }
  5293. break;
  5294. }
  5295. // optional double optional_double = 12;
  5296. case 12: {
  5297. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5298. static_cast< ::google::protobuf::uint8>(97u /* 97 & 0xFF */)) {
  5299. set_has_optional_double();
  5300. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5301. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  5302. input, &optional_double_)));
  5303. } else {
  5304. goto handle_unusual;
  5305. }
  5306. break;
  5307. }
  5308. // optional bool optional_bool = 13;
  5309. case 13: {
  5310. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5311. static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
  5312. set_has_optional_bool();
  5313. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5314. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  5315. input, &optional_bool_)));
  5316. } else {
  5317. goto handle_unusual;
  5318. }
  5319. break;
  5320. }
  5321. // optional string optional_string = 14;
  5322. case 14: {
  5323. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5324. static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
  5325. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  5326. input, this->mutable_optional_string()));
  5327. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  5328. this->optional_string().data(), static_cast<int>(this->optional_string().length()),
  5329. ::google::protobuf::internal::WireFormat::PARSE,
  5330. "protobuf_unittest.TestAllTypes.optional_string");
  5331. } else {
  5332. goto handle_unusual;
  5333. }
  5334. break;
  5335. }
  5336. // optional bytes optional_bytes = 15;
  5337. case 15: {
  5338. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5339. static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
  5340. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  5341. input, this->mutable_optional_bytes()));
  5342. } else {
  5343. goto handle_unusual;
  5344. }
  5345. break;
  5346. }
  5347. // optional group OptionalGroup = 16 { ... };
  5348. case 16: {
  5349. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5350. static_cast< ::google::protobuf::uint8>(131u /* 131 & 0xFF */)) {
  5351. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
  5352. 16, input, mutable_optionalgroup()));
  5353. } else {
  5354. goto handle_unusual;
  5355. }
  5356. break;
  5357. }
  5358. // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
  5359. case 18: {
  5360. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5361. static_cast< ::google::protobuf::uint8>(146u /* 146 & 0xFF */)) {
  5362. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5363. input, mutable_optional_nested_message()));
  5364. } else {
  5365. goto handle_unusual;
  5366. }
  5367. break;
  5368. }
  5369. // optional .protobuf_unittest.ForeignMessage optional_foreign_message = 19;
  5370. case 19: {
  5371. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5372. static_cast< ::google::protobuf::uint8>(154u /* 154 & 0xFF */)) {
  5373. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5374. input, mutable_optional_foreign_message()));
  5375. } else {
  5376. goto handle_unusual;
  5377. }
  5378. break;
  5379. }
  5380. // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
  5381. case 20: {
  5382. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5383. static_cast< ::google::protobuf::uint8>(162u /* 162 & 0xFF */)) {
  5384. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5385. input, mutable_optional_import_message()));
  5386. } else {
  5387. goto handle_unusual;
  5388. }
  5389. break;
  5390. }
  5391. // optional .protobuf_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
  5392. case 21: {
  5393. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5394. static_cast< ::google::protobuf::uint8>(168u /* 168 & 0xFF */)) {
  5395. int value;
  5396. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5397. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  5398. input, &value)));
  5399. if (::protobuf_unittest::TestAllTypes_NestedEnum_IsValid(value)) {
  5400. set_optional_nested_enum(static_cast< ::protobuf_unittest::TestAllTypes_NestedEnum >(value));
  5401. } else {
  5402. mutable_unknown_fields()->AddVarint(
  5403. 21, static_cast< ::google::protobuf::uint64>(value));
  5404. }
  5405. } else {
  5406. goto handle_unusual;
  5407. }
  5408. break;
  5409. }
  5410. // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
  5411. case 22: {
  5412. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5413. static_cast< ::google::protobuf::uint8>(176u /* 176 & 0xFF */)) {
  5414. int value;
  5415. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5416. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  5417. input, &value)));
  5418. if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
  5419. set_optional_foreign_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
  5420. } else {
  5421. mutable_unknown_fields()->AddVarint(
  5422. 22, static_cast< ::google::protobuf::uint64>(value));
  5423. }
  5424. } else {
  5425. goto handle_unusual;
  5426. }
  5427. break;
  5428. }
  5429. // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
  5430. case 23: {
  5431. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5432. static_cast< ::google::protobuf::uint8>(184u /* 184 & 0xFF */)) {
  5433. int value;
  5434. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5435. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  5436. input, &value)));
  5437. if (::protobuf_unittest_import::ImportEnum_IsValid(value)) {
  5438. set_optional_import_enum(static_cast< ::protobuf_unittest_import::ImportEnum >(value));
  5439. } else {
  5440. mutable_unknown_fields()->AddVarint(
  5441. 23, static_cast< ::google::protobuf::uint64>(value));
  5442. }
  5443. } else {
  5444. goto handle_unusual;
  5445. }
  5446. break;
  5447. }
  5448. // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
  5449. case 24: {
  5450. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5451. static_cast< ::google::protobuf::uint8>(194u /* 194 & 0xFF */)) {
  5452. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  5453. input, this->mutable_optional_string_piece()));
  5454. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  5455. this->optional_string_piece().data(), static_cast<int>(this->optional_string_piece().length()),
  5456. ::google::protobuf::internal::WireFormat::PARSE,
  5457. "protobuf_unittest.TestAllTypes.optional_string_piece");
  5458. } else {
  5459. goto handle_unusual;
  5460. }
  5461. break;
  5462. }
  5463. // optional string optional_cord = 25 [ctype = CORD];
  5464. case 25: {
  5465. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5466. static_cast< ::google::protobuf::uint8>(202u /* 202 & 0xFF */)) {
  5467. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  5468. input, this->mutable_optional_cord()));
  5469. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  5470. this->optional_cord().data(), static_cast<int>(this->optional_cord().length()),
  5471. ::google::protobuf::internal::WireFormat::PARSE,
  5472. "protobuf_unittest.TestAllTypes.optional_cord");
  5473. } else {
  5474. goto handle_unusual;
  5475. }
  5476. break;
  5477. }
  5478. // optional .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
  5479. case 26: {
  5480. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5481. static_cast< ::google::protobuf::uint8>(210u /* 210 & 0xFF */)) {
  5482. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5483. input, mutable_optional_public_import_message()));
  5484. } else {
  5485. goto handle_unusual;
  5486. }
  5487. break;
  5488. }
  5489. // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_lazy_message = 27 [lazy = true];
  5490. case 27: {
  5491. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5492. static_cast< ::google::protobuf::uint8>(218u /* 218 & 0xFF */)) {
  5493. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5494. input, mutable_optional_lazy_message()));
  5495. } else {
  5496. goto handle_unusual;
  5497. }
  5498. break;
  5499. }
  5500. // repeated int32 repeated_int32 = 31;
  5501. case 31: {
  5502. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5503. static_cast< ::google::protobuf::uint8>(248u /* 248 & 0xFF */)) {
  5504. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  5505. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  5506. 2, 248u, input, this->mutable_repeated_int32())));
  5507. } else if (
  5508. static_cast< ::google::protobuf::uint8>(tag) ==
  5509. static_cast< ::google::protobuf::uint8>(250u /* 250 & 0xFF */)) {
  5510. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  5511. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  5512. input, this->mutable_repeated_int32())));
  5513. } else {
  5514. goto handle_unusual;
  5515. }
  5516. break;
  5517. }
  5518. // repeated int64 repeated_int64 = 32;
  5519. case 32: {
  5520. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5521. static_cast< ::google::protobuf::uint8>(0u /* 256 & 0xFF */)) {
  5522. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  5523. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  5524. 2, 256u, input, this->mutable_repeated_int64())));
  5525. } else if (
  5526. static_cast< ::google::protobuf::uint8>(tag) ==
  5527. static_cast< ::google::protobuf::uint8>(2u /* 258 & 0xFF */)) {
  5528. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  5529. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  5530. input, this->mutable_repeated_int64())));
  5531. } else {
  5532. goto handle_unusual;
  5533. }
  5534. break;
  5535. }
  5536. // repeated uint32 repeated_uint32 = 33;
  5537. case 33: {
  5538. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5539. static_cast< ::google::protobuf::uint8>(8u /* 264 & 0xFF */)) {
  5540. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  5541. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  5542. 2, 264u, input, this->mutable_repeated_uint32())));
  5543. } else if (
  5544. static_cast< ::google::protobuf::uint8>(tag) ==
  5545. static_cast< ::google::protobuf::uint8>(10u /* 266 & 0xFF */)) {
  5546. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  5547. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  5548. input, this->mutable_repeated_uint32())));
  5549. } else {
  5550. goto handle_unusual;
  5551. }
  5552. break;
  5553. }
  5554. // repeated uint64 repeated_uint64 = 34;
  5555. case 34: {
  5556. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5557. static_cast< ::google::protobuf::uint8>(16u /* 272 & 0xFF */)) {
  5558. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  5559. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  5560. 2, 272u, input, this->mutable_repeated_uint64())));
  5561. } else if (
  5562. static_cast< ::google::protobuf::uint8>(tag) ==
  5563. static_cast< ::google::protobuf::uint8>(18u /* 274 & 0xFF */)) {
  5564. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  5565. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  5566. input, this->mutable_repeated_uint64())));
  5567. } else {
  5568. goto handle_unusual;
  5569. }
  5570. break;
  5571. }
  5572. // repeated sint32 repeated_sint32 = 35;
  5573. case 35: {
  5574. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5575. static_cast< ::google::protobuf::uint8>(24u /* 280 & 0xFF */)) {
  5576. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  5577. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  5578. 2, 280u, input, this->mutable_repeated_sint32())));
  5579. } else if (
  5580. static_cast< ::google::protobuf::uint8>(tag) ==
  5581. static_cast< ::google::protobuf::uint8>(26u /* 282 & 0xFF */)) {
  5582. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  5583. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  5584. input, this->mutable_repeated_sint32())));
  5585. } else {
  5586. goto handle_unusual;
  5587. }
  5588. break;
  5589. }
  5590. // repeated sint64 repeated_sint64 = 36;
  5591. case 36: {
  5592. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5593. static_cast< ::google::protobuf::uint8>(32u /* 288 & 0xFF */)) {
  5594. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  5595. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  5596. 2, 288u, input, this->mutable_repeated_sint64())));
  5597. } else if (
  5598. static_cast< ::google::protobuf::uint8>(tag) ==
  5599. static_cast< ::google::protobuf::uint8>(34u /* 290 & 0xFF */)) {
  5600. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  5601. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  5602. input, this->mutable_repeated_sint64())));
  5603. } else {
  5604. goto handle_unusual;
  5605. }
  5606. break;
  5607. }
  5608. // repeated fixed32 repeated_fixed32 = 37;
  5609. case 37: {
  5610. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5611. static_cast< ::google::protobuf::uint8>(45u /* 301 & 0xFF */)) {
  5612. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  5613. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  5614. 2, 301u, input, this->mutable_repeated_fixed32())));
  5615. } else if (
  5616. static_cast< ::google::protobuf::uint8>(tag) ==
  5617. static_cast< ::google::protobuf::uint8>(42u /* 298 & 0xFF */)) {
  5618. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  5619. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  5620. input, this->mutable_repeated_fixed32())));
  5621. } else {
  5622. goto handle_unusual;
  5623. }
  5624. break;
  5625. }
  5626. // repeated fixed64 repeated_fixed64 = 38;
  5627. case 38: {
  5628. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5629. static_cast< ::google::protobuf::uint8>(49u /* 305 & 0xFF */)) {
  5630. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  5631. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  5632. 2, 305u, input, this->mutable_repeated_fixed64())));
  5633. } else if (
  5634. static_cast< ::google::protobuf::uint8>(tag) ==
  5635. static_cast< ::google::protobuf::uint8>(50u /* 306 & 0xFF */)) {
  5636. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  5637. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  5638. input, this->mutable_repeated_fixed64())));
  5639. } else {
  5640. goto handle_unusual;
  5641. }
  5642. break;
  5643. }
  5644. // repeated sfixed32 repeated_sfixed32 = 39;
  5645. case 39: {
  5646. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5647. static_cast< ::google::protobuf::uint8>(61u /* 317 & 0xFF */)) {
  5648. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  5649. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  5650. 2, 317u, input, this->mutable_repeated_sfixed32())));
  5651. } else if (
  5652. static_cast< ::google::protobuf::uint8>(tag) ==
  5653. static_cast< ::google::protobuf::uint8>(58u /* 314 & 0xFF */)) {
  5654. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  5655. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  5656. input, this->mutable_repeated_sfixed32())));
  5657. } else {
  5658. goto handle_unusual;
  5659. }
  5660. break;
  5661. }
  5662. // repeated sfixed64 repeated_sfixed64 = 40;
  5663. case 40: {
  5664. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5665. static_cast< ::google::protobuf::uint8>(65u /* 321 & 0xFF */)) {
  5666. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  5667. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  5668. 2, 321u, input, this->mutable_repeated_sfixed64())));
  5669. } else if (
  5670. static_cast< ::google::protobuf::uint8>(tag) ==
  5671. static_cast< ::google::protobuf::uint8>(66u /* 322 & 0xFF */)) {
  5672. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  5673. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  5674. input, this->mutable_repeated_sfixed64())));
  5675. } else {
  5676. goto handle_unusual;
  5677. }
  5678. break;
  5679. }
  5680. // repeated float repeated_float = 41;
  5681. case 41: {
  5682. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5683. static_cast< ::google::protobuf::uint8>(77u /* 333 & 0xFF */)) {
  5684. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  5685. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  5686. 2, 333u, input, this->mutable_repeated_float())));
  5687. } else if (
  5688. static_cast< ::google::protobuf::uint8>(tag) ==
  5689. static_cast< ::google::protobuf::uint8>(74u /* 330 & 0xFF */)) {
  5690. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  5691. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  5692. input, this->mutable_repeated_float())));
  5693. } else {
  5694. goto handle_unusual;
  5695. }
  5696. break;
  5697. }
  5698. // repeated double repeated_double = 42;
  5699. case 42: {
  5700. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5701. static_cast< ::google::protobuf::uint8>(81u /* 337 & 0xFF */)) {
  5702. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  5703. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  5704. 2, 337u, input, this->mutable_repeated_double())));
  5705. } else if (
  5706. static_cast< ::google::protobuf::uint8>(tag) ==
  5707. static_cast< ::google::protobuf::uint8>(82u /* 338 & 0xFF */)) {
  5708. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  5709. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  5710. input, this->mutable_repeated_double())));
  5711. } else {
  5712. goto handle_unusual;
  5713. }
  5714. break;
  5715. }
  5716. // repeated bool repeated_bool = 43;
  5717. case 43: {
  5718. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5719. static_cast< ::google::protobuf::uint8>(88u /* 344 & 0xFF */)) {
  5720. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  5721. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  5722. 2, 344u, input, this->mutable_repeated_bool())));
  5723. } else if (
  5724. static_cast< ::google::protobuf::uint8>(tag) ==
  5725. static_cast< ::google::protobuf::uint8>(90u /* 346 & 0xFF */)) {
  5726. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  5727. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  5728. input, this->mutable_repeated_bool())));
  5729. } else {
  5730. goto handle_unusual;
  5731. }
  5732. break;
  5733. }
  5734. // repeated string repeated_string = 44;
  5735. case 44: {
  5736. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5737. static_cast< ::google::protobuf::uint8>(98u /* 354 & 0xFF */)) {
  5738. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  5739. input, this->add_repeated_string()));
  5740. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  5741. this->repeated_string(this->repeated_string_size() - 1).data(),
  5742. static_cast<int>(this->repeated_string(this->repeated_string_size() - 1).length()),
  5743. ::google::protobuf::internal::WireFormat::PARSE,
  5744. "protobuf_unittest.TestAllTypes.repeated_string");
  5745. } else {
  5746. goto handle_unusual;
  5747. }
  5748. break;
  5749. }
  5750. // repeated bytes repeated_bytes = 45;
  5751. case 45: {
  5752. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5753. static_cast< ::google::protobuf::uint8>(106u /* 362 & 0xFF */)) {
  5754. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  5755. input, this->add_repeated_bytes()));
  5756. } else {
  5757. goto handle_unusual;
  5758. }
  5759. break;
  5760. }
  5761. // repeated group RepeatedGroup = 46 { ... };
  5762. case 46: {
  5763. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5764. static_cast< ::google::protobuf::uint8>(115u /* 371 & 0xFF */)) {
  5765. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(46, input, add_repeatedgroup()));
  5766. } else {
  5767. goto handle_unusual;
  5768. }
  5769. break;
  5770. }
  5771. // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
  5772. case 48: {
  5773. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5774. static_cast< ::google::protobuf::uint8>(130u /* 386 & 0xFF */)) {
  5775. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5776. input, add_repeated_nested_message()));
  5777. } else {
  5778. goto handle_unusual;
  5779. }
  5780. break;
  5781. }
  5782. // repeated .protobuf_unittest.ForeignMessage repeated_foreign_message = 49;
  5783. case 49: {
  5784. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5785. static_cast< ::google::protobuf::uint8>(138u /* 394 & 0xFF */)) {
  5786. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5787. input, add_repeated_foreign_message()));
  5788. } else {
  5789. goto handle_unusual;
  5790. }
  5791. break;
  5792. }
  5793. // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
  5794. case 50: {
  5795. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5796. static_cast< ::google::protobuf::uint8>(146u /* 402 & 0xFF */)) {
  5797. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5798. input, add_repeated_import_message()));
  5799. } else {
  5800. goto handle_unusual;
  5801. }
  5802. break;
  5803. }
  5804. // repeated .protobuf_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
  5805. case 51: {
  5806. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5807. static_cast< ::google::protobuf::uint8>(152u /* 408 & 0xFF */)) {
  5808. int value;
  5809. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5810. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  5811. input, &value)));
  5812. if (::protobuf_unittest::TestAllTypes_NestedEnum_IsValid(value)) {
  5813. add_repeated_nested_enum(static_cast< ::protobuf_unittest::TestAllTypes_NestedEnum >(value));
  5814. } else {
  5815. mutable_unknown_fields()->AddVarint(
  5816. 51, static_cast< ::google::protobuf::uint64>(value));
  5817. }
  5818. } else if (
  5819. static_cast< ::google::protobuf::uint8>(tag) ==
  5820. static_cast< ::google::protobuf::uint8>(154u /* 410 & 0xFF */)) {
  5821. DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
  5822. input,
  5823. 51,
  5824. ::protobuf_unittest::TestAllTypes_NestedEnum_IsValid,
  5825. mutable_unknown_fields(),
  5826. this->mutable_repeated_nested_enum())));
  5827. } else {
  5828. goto handle_unusual;
  5829. }
  5830. break;
  5831. }
  5832. // repeated .protobuf_unittest.ForeignEnum repeated_foreign_enum = 52;
  5833. case 52: {
  5834. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5835. static_cast< ::google::protobuf::uint8>(160u /* 416 & 0xFF */)) {
  5836. int value;
  5837. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5838. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  5839. input, &value)));
  5840. if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
  5841. add_repeated_foreign_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
  5842. } else {
  5843. mutable_unknown_fields()->AddVarint(
  5844. 52, static_cast< ::google::protobuf::uint64>(value));
  5845. }
  5846. } else if (
  5847. static_cast< ::google::protobuf::uint8>(tag) ==
  5848. static_cast< ::google::protobuf::uint8>(162u /* 418 & 0xFF */)) {
  5849. DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
  5850. input,
  5851. 52,
  5852. ::protobuf_unittest::ForeignEnum_IsValid,
  5853. mutable_unknown_fields(),
  5854. this->mutable_repeated_foreign_enum())));
  5855. } else {
  5856. goto handle_unusual;
  5857. }
  5858. break;
  5859. }
  5860. // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
  5861. case 53: {
  5862. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5863. static_cast< ::google::protobuf::uint8>(168u /* 424 & 0xFF */)) {
  5864. int value;
  5865. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5866. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  5867. input, &value)));
  5868. if (::protobuf_unittest_import::ImportEnum_IsValid(value)) {
  5869. add_repeated_import_enum(static_cast< ::protobuf_unittest_import::ImportEnum >(value));
  5870. } else {
  5871. mutable_unknown_fields()->AddVarint(
  5872. 53, static_cast< ::google::protobuf::uint64>(value));
  5873. }
  5874. } else if (
  5875. static_cast< ::google::protobuf::uint8>(tag) ==
  5876. static_cast< ::google::protobuf::uint8>(170u /* 426 & 0xFF */)) {
  5877. DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
  5878. input,
  5879. 53,
  5880. ::protobuf_unittest_import::ImportEnum_IsValid,
  5881. mutable_unknown_fields(),
  5882. this->mutable_repeated_import_enum())));
  5883. } else {
  5884. goto handle_unusual;
  5885. }
  5886. break;
  5887. }
  5888. // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
  5889. case 54: {
  5890. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5891. static_cast< ::google::protobuf::uint8>(178u /* 434 & 0xFF */)) {
  5892. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  5893. input, this->add_repeated_string_piece()));
  5894. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  5895. this->repeated_string_piece(this->repeated_string_piece_size() - 1).data(),
  5896. static_cast<int>(this->repeated_string_piece(this->repeated_string_piece_size() - 1).length()),
  5897. ::google::protobuf::internal::WireFormat::PARSE,
  5898. "protobuf_unittest.TestAllTypes.repeated_string_piece");
  5899. } else {
  5900. goto handle_unusual;
  5901. }
  5902. break;
  5903. }
  5904. // repeated string repeated_cord = 55 [ctype = CORD];
  5905. case 55: {
  5906. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5907. static_cast< ::google::protobuf::uint8>(186u /* 442 & 0xFF */)) {
  5908. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  5909. input, this->add_repeated_cord()));
  5910. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  5911. this->repeated_cord(this->repeated_cord_size() - 1).data(),
  5912. static_cast<int>(this->repeated_cord(this->repeated_cord_size() - 1).length()),
  5913. ::google::protobuf::internal::WireFormat::PARSE,
  5914. "protobuf_unittest.TestAllTypes.repeated_cord");
  5915. } else {
  5916. goto handle_unusual;
  5917. }
  5918. break;
  5919. }
  5920. // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
  5921. case 57: {
  5922. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5923. static_cast< ::google::protobuf::uint8>(202u /* 458 & 0xFF */)) {
  5924. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5925. input, add_repeated_lazy_message()));
  5926. } else {
  5927. goto handle_unusual;
  5928. }
  5929. break;
  5930. }
  5931. // optional int32 default_int32 = 61 [default = 41];
  5932. case 61: {
  5933. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5934. static_cast< ::google::protobuf::uint8>(232u /* 488 & 0xFF */)) {
  5935. set_has_default_int32();
  5936. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5937. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  5938. input, &default_int32_)));
  5939. } else {
  5940. goto handle_unusual;
  5941. }
  5942. break;
  5943. }
  5944. // optional int64 default_int64 = 62 [default = 42];
  5945. case 62: {
  5946. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5947. static_cast< ::google::protobuf::uint8>(240u /* 496 & 0xFF */)) {
  5948. set_has_default_int64();
  5949. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5950. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  5951. input, &default_int64_)));
  5952. } else {
  5953. goto handle_unusual;
  5954. }
  5955. break;
  5956. }
  5957. // optional uint32 default_uint32 = 63 [default = 43];
  5958. case 63: {
  5959. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5960. static_cast< ::google::protobuf::uint8>(248u /* 504 & 0xFF */)) {
  5961. set_has_default_uint32();
  5962. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5963. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  5964. input, &default_uint32_)));
  5965. } else {
  5966. goto handle_unusual;
  5967. }
  5968. break;
  5969. }
  5970. // optional uint64 default_uint64 = 64 [default = 44];
  5971. case 64: {
  5972. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5973. static_cast< ::google::protobuf::uint8>(0u /* 512 & 0xFF */)) {
  5974. set_has_default_uint64();
  5975. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5976. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  5977. input, &default_uint64_)));
  5978. } else {
  5979. goto handle_unusual;
  5980. }
  5981. break;
  5982. }
  5983. // optional sint32 default_sint32 = 65 [default = -45];
  5984. case 65: {
  5985. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5986. static_cast< ::google::protobuf::uint8>(8u /* 520 & 0xFF */)) {
  5987. set_has_default_sint32();
  5988. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  5989. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  5990. input, &default_sint32_)));
  5991. } else {
  5992. goto handle_unusual;
  5993. }
  5994. break;
  5995. }
  5996. // optional sint64 default_sint64 = 66 [default = 46];
  5997. case 66: {
  5998. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5999. static_cast< ::google::protobuf::uint8>(16u /* 528 & 0xFF */)) {
  6000. set_has_default_sint64();
  6001. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6002. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  6003. input, &default_sint64_)));
  6004. } else {
  6005. goto handle_unusual;
  6006. }
  6007. break;
  6008. }
  6009. // optional fixed32 default_fixed32 = 67 [default = 47];
  6010. case 67: {
  6011. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6012. static_cast< ::google::protobuf::uint8>(29u /* 541 & 0xFF */)) {
  6013. set_has_default_fixed32();
  6014. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6015. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  6016. input, &default_fixed32_)));
  6017. } else {
  6018. goto handle_unusual;
  6019. }
  6020. break;
  6021. }
  6022. // optional fixed64 default_fixed64 = 68 [default = 48];
  6023. case 68: {
  6024. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6025. static_cast< ::google::protobuf::uint8>(33u /* 545 & 0xFF */)) {
  6026. set_has_default_fixed64();
  6027. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6028. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  6029. input, &default_fixed64_)));
  6030. } else {
  6031. goto handle_unusual;
  6032. }
  6033. break;
  6034. }
  6035. // optional sfixed32 default_sfixed32 = 69 [default = 49];
  6036. case 69: {
  6037. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6038. static_cast< ::google::protobuf::uint8>(45u /* 557 & 0xFF */)) {
  6039. set_has_default_sfixed32();
  6040. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6041. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  6042. input, &default_sfixed32_)));
  6043. } else {
  6044. goto handle_unusual;
  6045. }
  6046. break;
  6047. }
  6048. // optional sfixed64 default_sfixed64 = 70 [default = -50];
  6049. case 70: {
  6050. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6051. static_cast< ::google::protobuf::uint8>(49u /* 561 & 0xFF */)) {
  6052. set_has_default_sfixed64();
  6053. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6054. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  6055. input, &default_sfixed64_)));
  6056. } else {
  6057. goto handle_unusual;
  6058. }
  6059. break;
  6060. }
  6061. // optional float default_float = 71 [default = 51.5];
  6062. case 71: {
  6063. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6064. static_cast< ::google::protobuf::uint8>(61u /* 573 & 0xFF */)) {
  6065. set_has_default_float();
  6066. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6067. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  6068. input, &default_float_)));
  6069. } else {
  6070. goto handle_unusual;
  6071. }
  6072. break;
  6073. }
  6074. // optional double default_double = 72 [default = 52000];
  6075. case 72: {
  6076. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6077. static_cast< ::google::protobuf::uint8>(65u /* 577 & 0xFF */)) {
  6078. set_has_default_double();
  6079. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6080. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  6081. input, &default_double_)));
  6082. } else {
  6083. goto handle_unusual;
  6084. }
  6085. break;
  6086. }
  6087. // optional bool default_bool = 73 [default = true];
  6088. case 73: {
  6089. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6090. static_cast< ::google::protobuf::uint8>(72u /* 584 & 0xFF */)) {
  6091. set_has_default_bool();
  6092. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6093. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  6094. input, &default_bool_)));
  6095. } else {
  6096. goto handle_unusual;
  6097. }
  6098. break;
  6099. }
  6100. // optional string default_string = 74 [default = "hello"];
  6101. case 74: {
  6102. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6103. static_cast< ::google::protobuf::uint8>(82u /* 594 & 0xFF */)) {
  6104. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6105. input, this->mutable_default_string()));
  6106. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6107. this->default_string().data(), static_cast<int>(this->default_string().length()),
  6108. ::google::protobuf::internal::WireFormat::PARSE,
  6109. "protobuf_unittest.TestAllTypes.default_string");
  6110. } else {
  6111. goto handle_unusual;
  6112. }
  6113. break;
  6114. }
  6115. // optional bytes default_bytes = 75 [default = "world"];
  6116. case 75: {
  6117. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6118. static_cast< ::google::protobuf::uint8>(90u /* 602 & 0xFF */)) {
  6119. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  6120. input, this->mutable_default_bytes()));
  6121. } else {
  6122. goto handle_unusual;
  6123. }
  6124. break;
  6125. }
  6126. // optional .protobuf_unittest.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
  6127. case 81: {
  6128. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6129. static_cast< ::google::protobuf::uint8>(136u /* 648 & 0xFF */)) {
  6130. int value;
  6131. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6132. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  6133. input, &value)));
  6134. if (::protobuf_unittest::TestAllTypes_NestedEnum_IsValid(value)) {
  6135. set_default_nested_enum(static_cast< ::protobuf_unittest::TestAllTypes_NestedEnum >(value));
  6136. } else {
  6137. mutable_unknown_fields()->AddVarint(
  6138. 81, static_cast< ::google::protobuf::uint64>(value));
  6139. }
  6140. } else {
  6141. goto handle_unusual;
  6142. }
  6143. break;
  6144. }
  6145. // optional .protobuf_unittest.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
  6146. case 82: {
  6147. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6148. static_cast< ::google::protobuf::uint8>(144u /* 656 & 0xFF */)) {
  6149. int value;
  6150. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6151. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  6152. input, &value)));
  6153. if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
  6154. set_default_foreign_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
  6155. } else {
  6156. mutable_unknown_fields()->AddVarint(
  6157. 82, static_cast< ::google::protobuf::uint64>(value));
  6158. }
  6159. } else {
  6160. goto handle_unusual;
  6161. }
  6162. break;
  6163. }
  6164. // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
  6165. case 83: {
  6166. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6167. static_cast< ::google::protobuf::uint8>(152u /* 664 & 0xFF */)) {
  6168. int value;
  6169. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6170. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  6171. input, &value)));
  6172. if (::protobuf_unittest_import::ImportEnum_IsValid(value)) {
  6173. set_default_import_enum(static_cast< ::protobuf_unittest_import::ImportEnum >(value));
  6174. } else {
  6175. mutable_unknown_fields()->AddVarint(
  6176. 83, static_cast< ::google::protobuf::uint64>(value));
  6177. }
  6178. } else {
  6179. goto handle_unusual;
  6180. }
  6181. break;
  6182. }
  6183. // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
  6184. case 84: {
  6185. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6186. static_cast< ::google::protobuf::uint8>(162u /* 674 & 0xFF */)) {
  6187. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6188. input, this->mutable_default_string_piece()));
  6189. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6190. this->default_string_piece().data(), static_cast<int>(this->default_string_piece().length()),
  6191. ::google::protobuf::internal::WireFormat::PARSE,
  6192. "protobuf_unittest.TestAllTypes.default_string_piece");
  6193. } else {
  6194. goto handle_unusual;
  6195. }
  6196. break;
  6197. }
  6198. // optional string default_cord = 85 [default = "123", ctype = CORD];
  6199. case 85: {
  6200. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6201. static_cast< ::google::protobuf::uint8>(170u /* 682 & 0xFF */)) {
  6202. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6203. input, this->mutable_default_cord()));
  6204. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6205. this->default_cord().data(), static_cast<int>(this->default_cord().length()),
  6206. ::google::protobuf::internal::WireFormat::PARSE,
  6207. "protobuf_unittest.TestAllTypes.default_cord");
  6208. } else {
  6209. goto handle_unusual;
  6210. }
  6211. break;
  6212. }
  6213. // optional uint32 oneof_uint32 = 111;
  6214. case 111: {
  6215. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6216. static_cast< ::google::protobuf::uint8>(120u /* 888 & 0xFF */)) {
  6217. clear_oneof_field();
  6218. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6219. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  6220. input, &oneof_field_.oneof_uint32_)));
  6221. set_has_oneof_uint32();
  6222. } else {
  6223. goto handle_unusual;
  6224. }
  6225. break;
  6226. }
  6227. // optional .protobuf_unittest.TestAllTypes.NestedMessage oneof_nested_message = 112;
  6228. case 112: {
  6229. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6230. static_cast< ::google::protobuf::uint8>(130u /* 898 & 0xFF */)) {
  6231. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6232. input, mutable_oneof_nested_message()));
  6233. } else {
  6234. goto handle_unusual;
  6235. }
  6236. break;
  6237. }
  6238. // optional string oneof_string = 113;
  6239. case 113: {
  6240. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6241. static_cast< ::google::protobuf::uint8>(138u /* 906 & 0xFF */)) {
  6242. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6243. input, this->mutable_oneof_string()));
  6244. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6245. this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
  6246. ::google::protobuf::internal::WireFormat::PARSE,
  6247. "protobuf_unittest.TestAllTypes.oneof_string");
  6248. } else {
  6249. goto handle_unusual;
  6250. }
  6251. break;
  6252. }
  6253. // optional bytes oneof_bytes = 114;
  6254. case 114: {
  6255. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6256. static_cast< ::google::protobuf::uint8>(146u /* 914 & 0xFF */)) {
  6257. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  6258. input, this->mutable_oneof_bytes()));
  6259. } else {
  6260. goto handle_unusual;
  6261. }
  6262. break;
  6263. }
  6264. default: {
  6265. handle_unusual:
  6266. if (tag == 0) {
  6267. goto success;
  6268. }
  6269. DO_(::google::protobuf::internal::WireFormat::SkipField(
  6270. input, tag, _internal_metadata_.mutable_unknown_fields()));
  6271. break;
  6272. }
  6273. }
  6274. }
  6275. success:
  6276. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestAllTypes)
  6277. return true;
  6278. failure:
  6279. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllTypes)
  6280. return false;
  6281. #undef DO_
  6282. }
  6283. void TestAllTypes::SerializeWithCachedSizes(
  6284. ::google::protobuf::io::CodedOutputStream* output) const {
  6285. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestAllTypes)
  6286. ::google::protobuf::uint32 cached_has_bits = 0;
  6287. (void) cached_has_bits;
  6288. cached_has_bits = _has_bits_[0];
  6289. // optional int32 optional_int32 = 1;
  6290. if (cached_has_bits & 0x00008000u) {
  6291. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->optional_int32(), output);
  6292. }
  6293. // optional int64 optional_int64 = 2;
  6294. if (cached_has_bits & 0x00004000u) {
  6295. ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->optional_int64(), output);
  6296. }
  6297. // optional uint32 optional_uint32 = 3;
  6298. if (cached_has_bits & 0x00010000u) {
  6299. ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->optional_uint32(), output);
  6300. }
  6301. // optional uint64 optional_uint64 = 4;
  6302. if (cached_has_bits & 0x00020000u) {
  6303. ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->optional_uint64(), output);
  6304. }
  6305. // optional sint32 optional_sint32 = 5;
  6306. if (cached_has_bits & 0x00080000u) {
  6307. ::google::protobuf::internal::WireFormatLite::WriteSInt32(5, this->optional_sint32(), output);
  6308. }
  6309. // optional sint64 optional_sint64 = 6;
  6310. if (cached_has_bits & 0x00040000u) {
  6311. ::google::protobuf::internal::WireFormatLite::WriteSInt64(6, this->optional_sint64(), output);
  6312. }
  6313. // optional fixed32 optional_fixed32 = 7;
  6314. if (cached_has_bits & 0x00100000u) {
  6315. ::google::protobuf::internal::WireFormatLite::WriteFixed32(7, this->optional_fixed32(), output);
  6316. }
  6317. // optional fixed64 optional_fixed64 = 8;
  6318. if (cached_has_bits & 0x00200000u) {
  6319. ::google::protobuf::internal::WireFormatLite::WriteFixed64(8, this->optional_fixed64(), output);
  6320. }
  6321. // optional sfixed32 optional_sfixed32 = 9;
  6322. if (cached_has_bits & 0x00800000u) {
  6323. ::google::protobuf::internal::WireFormatLite::WriteSFixed32(9, this->optional_sfixed32(), output);
  6324. }
  6325. // optional sfixed64 optional_sfixed64 = 10;
  6326. if (cached_has_bits & 0x00400000u) {
  6327. ::google::protobuf::internal::WireFormatLite::WriteSFixed64(10, this->optional_sfixed64(), output);
  6328. }
  6329. // optional float optional_float = 11;
  6330. if (cached_has_bits & 0x01000000u) {
  6331. ::google::protobuf::internal::WireFormatLite::WriteFloat(11, this->optional_float(), output);
  6332. }
  6333. // optional double optional_double = 12;
  6334. if (cached_has_bits & 0x02000000u) {
  6335. ::google::protobuf::internal::WireFormatLite::WriteDouble(12, this->optional_double(), output);
  6336. }
  6337. // optional bool optional_bool = 13;
  6338. if (cached_has_bits & 0x04000000u) {
  6339. ::google::protobuf::internal::WireFormatLite::WriteBool(13, this->optional_bool(), output);
  6340. }
  6341. // optional string optional_string = 14;
  6342. if (cached_has_bits & 0x00000001u) {
  6343. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6344. this->optional_string().data(), static_cast<int>(this->optional_string().length()),
  6345. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6346. "protobuf_unittest.TestAllTypes.optional_string");
  6347. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6348. 14, this->optional_string(), output);
  6349. }
  6350. // optional bytes optional_bytes = 15;
  6351. if (cached_has_bits & 0x00000002u) {
  6352. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  6353. 15, this->optional_bytes(), output);
  6354. }
  6355. // optional group OptionalGroup = 16 { ... };
  6356. if (cached_has_bits & 0x00000100u) {
  6357. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  6358. 16, this->_internal_optionalgroup(), output);
  6359. }
  6360. // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
  6361. if (cached_has_bits & 0x00000200u) {
  6362. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6363. 18, this->_internal_optional_nested_message(), output);
  6364. }
  6365. // optional .protobuf_unittest.ForeignMessage optional_foreign_message = 19;
  6366. if (cached_has_bits & 0x00000400u) {
  6367. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6368. 19, this->_internal_optional_foreign_message(), output);
  6369. }
  6370. // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
  6371. if (cached_has_bits & 0x00000800u) {
  6372. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6373. 20, this->_internal_optional_import_message(), output);
  6374. }
  6375. // optional .protobuf_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
  6376. if (cached_has_bits & 0x10000000u) {
  6377. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  6378. 21, this->optional_nested_enum(), output);
  6379. }
  6380. // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
  6381. if (cached_has_bits & 0x20000000u) {
  6382. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  6383. 22, this->optional_foreign_enum(), output);
  6384. }
  6385. // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
  6386. if (cached_has_bits & 0x40000000u) {
  6387. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  6388. 23, this->optional_import_enum(), output);
  6389. }
  6390. // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
  6391. if (cached_has_bits & 0x00000004u) {
  6392. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6393. this->optional_string_piece().data(), static_cast<int>(this->optional_string_piece().length()),
  6394. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6395. "protobuf_unittest.TestAllTypes.optional_string_piece");
  6396. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6397. 24, this->optional_string_piece(), output);
  6398. }
  6399. // optional string optional_cord = 25 [ctype = CORD];
  6400. if (cached_has_bits & 0x00000008u) {
  6401. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6402. this->optional_cord().data(), static_cast<int>(this->optional_cord().length()),
  6403. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6404. "protobuf_unittest.TestAllTypes.optional_cord");
  6405. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6406. 25, this->optional_cord(), output);
  6407. }
  6408. // optional .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
  6409. if (cached_has_bits & 0x00001000u) {
  6410. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6411. 26, this->_internal_optional_public_import_message(), output);
  6412. }
  6413. // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_lazy_message = 27 [lazy = true];
  6414. if (cached_has_bits & 0x00002000u) {
  6415. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6416. 27, this->_internal_optional_lazy_message(), output);
  6417. }
  6418. // repeated int32 repeated_int32 = 31;
  6419. for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
  6420. ::google::protobuf::internal::WireFormatLite::WriteInt32(
  6421. 31, this->repeated_int32(i), output);
  6422. }
  6423. // repeated int64 repeated_int64 = 32;
  6424. for (int i = 0, n = this->repeated_int64_size(); i < n; i++) {
  6425. ::google::protobuf::internal::WireFormatLite::WriteInt64(
  6426. 32, this->repeated_int64(i), output);
  6427. }
  6428. // repeated uint32 repeated_uint32 = 33;
  6429. for (int i = 0, n = this->repeated_uint32_size(); i < n; i++) {
  6430. ::google::protobuf::internal::WireFormatLite::WriteUInt32(
  6431. 33, this->repeated_uint32(i), output);
  6432. }
  6433. // repeated uint64 repeated_uint64 = 34;
  6434. for (int i = 0, n = this->repeated_uint64_size(); i < n; i++) {
  6435. ::google::protobuf::internal::WireFormatLite::WriteUInt64(
  6436. 34, this->repeated_uint64(i), output);
  6437. }
  6438. // repeated sint32 repeated_sint32 = 35;
  6439. for (int i = 0, n = this->repeated_sint32_size(); i < n; i++) {
  6440. ::google::protobuf::internal::WireFormatLite::WriteSInt32(
  6441. 35, this->repeated_sint32(i), output);
  6442. }
  6443. // repeated sint64 repeated_sint64 = 36;
  6444. for (int i = 0, n = this->repeated_sint64_size(); i < n; i++) {
  6445. ::google::protobuf::internal::WireFormatLite::WriteSInt64(
  6446. 36, this->repeated_sint64(i), output);
  6447. }
  6448. // repeated fixed32 repeated_fixed32 = 37;
  6449. for (int i = 0, n = this->repeated_fixed32_size(); i < n; i++) {
  6450. ::google::protobuf::internal::WireFormatLite::WriteFixed32(
  6451. 37, this->repeated_fixed32(i), output);
  6452. }
  6453. // repeated fixed64 repeated_fixed64 = 38;
  6454. for (int i = 0, n = this->repeated_fixed64_size(); i < n; i++) {
  6455. ::google::protobuf::internal::WireFormatLite::WriteFixed64(
  6456. 38, this->repeated_fixed64(i), output);
  6457. }
  6458. // repeated sfixed32 repeated_sfixed32 = 39;
  6459. for (int i = 0, n = this->repeated_sfixed32_size(); i < n; i++) {
  6460. ::google::protobuf::internal::WireFormatLite::WriteSFixed32(
  6461. 39, this->repeated_sfixed32(i), output);
  6462. }
  6463. // repeated sfixed64 repeated_sfixed64 = 40;
  6464. for (int i = 0, n = this->repeated_sfixed64_size(); i < n; i++) {
  6465. ::google::protobuf::internal::WireFormatLite::WriteSFixed64(
  6466. 40, this->repeated_sfixed64(i), output);
  6467. }
  6468. // repeated float repeated_float = 41;
  6469. for (int i = 0, n = this->repeated_float_size(); i < n; i++) {
  6470. ::google::protobuf::internal::WireFormatLite::WriteFloat(
  6471. 41, this->repeated_float(i), output);
  6472. }
  6473. // repeated double repeated_double = 42;
  6474. for (int i = 0, n = this->repeated_double_size(); i < n; i++) {
  6475. ::google::protobuf::internal::WireFormatLite::WriteDouble(
  6476. 42, this->repeated_double(i), output);
  6477. }
  6478. // repeated bool repeated_bool = 43;
  6479. for (int i = 0, n = this->repeated_bool_size(); i < n; i++) {
  6480. ::google::protobuf::internal::WireFormatLite::WriteBool(
  6481. 43, this->repeated_bool(i), output);
  6482. }
  6483. // repeated string repeated_string = 44;
  6484. for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
  6485. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6486. this->repeated_string(i).data(), static_cast<int>(this->repeated_string(i).length()),
  6487. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6488. "protobuf_unittest.TestAllTypes.repeated_string");
  6489. ::google::protobuf::internal::WireFormatLite::WriteString(
  6490. 44, this->repeated_string(i), output);
  6491. }
  6492. // repeated bytes repeated_bytes = 45;
  6493. for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
  6494. ::google::protobuf::internal::WireFormatLite::WriteBytes(
  6495. 45, this->repeated_bytes(i), output);
  6496. }
  6497. // repeated group RepeatedGroup = 46 { ... };
  6498. for (unsigned int i = 0,
  6499. n = static_cast<unsigned int>(this->repeatedgroup_size()); i < n; i++) {
  6500. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  6501. 46,
  6502. this->repeatedgroup(static_cast<int>(i)),
  6503. output);
  6504. }
  6505. // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
  6506. for (unsigned int i = 0,
  6507. n = static_cast<unsigned int>(this->repeated_nested_message_size()); i < n; i++) {
  6508. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6509. 48,
  6510. this->repeated_nested_message(static_cast<int>(i)),
  6511. output);
  6512. }
  6513. // repeated .protobuf_unittest.ForeignMessage repeated_foreign_message = 49;
  6514. for (unsigned int i = 0,
  6515. n = static_cast<unsigned int>(this->repeated_foreign_message_size()); i < n; i++) {
  6516. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6517. 49,
  6518. this->repeated_foreign_message(static_cast<int>(i)),
  6519. output);
  6520. }
  6521. // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
  6522. for (unsigned int i = 0,
  6523. n = static_cast<unsigned int>(this->repeated_import_message_size()); i < n; i++) {
  6524. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6525. 50,
  6526. this->repeated_import_message(static_cast<int>(i)),
  6527. output);
  6528. }
  6529. // repeated .protobuf_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
  6530. for (int i = 0, n = this->repeated_nested_enum_size(); i < n; i++) {
  6531. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  6532. 51, this->repeated_nested_enum(i), output);
  6533. }
  6534. // repeated .protobuf_unittest.ForeignEnum repeated_foreign_enum = 52;
  6535. for (int i = 0, n = this->repeated_foreign_enum_size(); i < n; i++) {
  6536. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  6537. 52, this->repeated_foreign_enum(i), output);
  6538. }
  6539. // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
  6540. for (int i = 0, n = this->repeated_import_enum_size(); i < n; i++) {
  6541. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  6542. 53, this->repeated_import_enum(i), output);
  6543. }
  6544. // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
  6545. for (int i = 0, n = this->repeated_string_piece_size(); i < n; i++) {
  6546. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6547. this->repeated_string_piece(i).data(), static_cast<int>(this->repeated_string_piece(i).length()),
  6548. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6549. "protobuf_unittest.TestAllTypes.repeated_string_piece");
  6550. ::google::protobuf::internal::WireFormatLite::WriteString(
  6551. 54, this->repeated_string_piece(i), output);
  6552. }
  6553. // repeated string repeated_cord = 55 [ctype = CORD];
  6554. for (int i = 0, n = this->repeated_cord_size(); i < n; i++) {
  6555. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6556. this->repeated_cord(i).data(), static_cast<int>(this->repeated_cord(i).length()),
  6557. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6558. "protobuf_unittest.TestAllTypes.repeated_cord");
  6559. ::google::protobuf::internal::WireFormatLite::WriteString(
  6560. 55, this->repeated_cord(i), output);
  6561. }
  6562. // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
  6563. for (unsigned int i = 0,
  6564. n = static_cast<unsigned int>(this->repeated_lazy_message_size()); i < n; i++) {
  6565. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6566. 57,
  6567. this->repeated_lazy_message(static_cast<int>(i)),
  6568. output);
  6569. }
  6570. // optional int32 default_int32 = 61 [default = 41];
  6571. if (cached_has_bits & 0x80000000u) {
  6572. ::google::protobuf::internal::WireFormatLite::WriteInt32(61, this->default_int32(), output);
  6573. }
  6574. cached_has_bits = _has_bits_[1];
  6575. // optional int64 default_int64 = 62 [default = 42];
  6576. if (cached_has_bits & 0x00000001u) {
  6577. ::google::protobuf::internal::WireFormatLite::WriteInt64(62, this->default_int64(), output);
  6578. }
  6579. // optional uint32 default_uint32 = 63 [default = 43];
  6580. if (cached_has_bits & 0x00000004u) {
  6581. ::google::protobuf::internal::WireFormatLite::WriteUInt32(63, this->default_uint32(), output);
  6582. }
  6583. // optional uint64 default_uint64 = 64 [default = 44];
  6584. if (cached_has_bits & 0x00000002u) {
  6585. ::google::protobuf::internal::WireFormatLite::WriteUInt64(64, this->default_uint64(), output);
  6586. }
  6587. // optional sint32 default_sint32 = 65 [default = -45];
  6588. if (cached_has_bits & 0x00000008u) {
  6589. ::google::protobuf::internal::WireFormatLite::WriteSInt32(65, this->default_sint32(), output);
  6590. }
  6591. // optional sint64 default_sint64 = 66 [default = 46];
  6592. if (cached_has_bits & 0x00000010u) {
  6593. ::google::protobuf::internal::WireFormatLite::WriteSInt64(66, this->default_sint64(), output);
  6594. }
  6595. // optional fixed32 default_fixed32 = 67 [default = 47];
  6596. if (cached_has_bits & 0x00000040u) {
  6597. ::google::protobuf::internal::WireFormatLite::WriteFixed32(67, this->default_fixed32(), output);
  6598. }
  6599. // optional fixed64 default_fixed64 = 68 [default = 48];
  6600. if (cached_has_bits & 0x00000020u) {
  6601. ::google::protobuf::internal::WireFormatLite::WriteFixed64(68, this->default_fixed64(), output);
  6602. }
  6603. // optional sfixed32 default_sfixed32 = 69 [default = 49];
  6604. if (cached_has_bits & 0x00000080u) {
  6605. ::google::protobuf::internal::WireFormatLite::WriteSFixed32(69, this->default_sfixed32(), output);
  6606. }
  6607. // optional sfixed64 default_sfixed64 = 70 [default = -50];
  6608. if (cached_has_bits & 0x00000100u) {
  6609. ::google::protobuf::internal::WireFormatLite::WriteSFixed64(70, this->default_sfixed64(), output);
  6610. }
  6611. // optional float default_float = 71 [default = 51.5];
  6612. if (cached_has_bits & 0x00000400u) {
  6613. ::google::protobuf::internal::WireFormatLite::WriteFloat(71, this->default_float(), output);
  6614. }
  6615. // optional double default_double = 72 [default = 52000];
  6616. if (cached_has_bits & 0x00000200u) {
  6617. ::google::protobuf::internal::WireFormatLite::WriteDouble(72, this->default_double(), output);
  6618. }
  6619. // optional bool default_bool = 73 [default = true];
  6620. if (cached_has_bits & 0x00000800u) {
  6621. ::google::protobuf::internal::WireFormatLite::WriteBool(73, this->default_bool(), output);
  6622. }
  6623. cached_has_bits = _has_bits_[0];
  6624. // optional string default_string = 74 [default = "hello"];
  6625. if (cached_has_bits & 0x00000010u) {
  6626. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6627. this->default_string().data(), static_cast<int>(this->default_string().length()),
  6628. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6629. "protobuf_unittest.TestAllTypes.default_string");
  6630. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6631. 74, this->default_string(), output);
  6632. }
  6633. // optional bytes default_bytes = 75 [default = "world"];
  6634. if (cached_has_bits & 0x00000020u) {
  6635. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  6636. 75, this->default_bytes(), output);
  6637. }
  6638. cached_has_bits = _has_bits_[1];
  6639. // optional .protobuf_unittest.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
  6640. if (cached_has_bits & 0x00001000u) {
  6641. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  6642. 81, this->default_nested_enum(), output);
  6643. }
  6644. // optional .protobuf_unittest.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
  6645. if (cached_has_bits & 0x00002000u) {
  6646. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  6647. 82, this->default_foreign_enum(), output);
  6648. }
  6649. cached_has_bits = _has_bits_[0];
  6650. // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
  6651. if (cached_has_bits & 0x08000000u) {
  6652. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  6653. 83, this->default_import_enum(), output);
  6654. }
  6655. // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
  6656. if (cached_has_bits & 0x00000040u) {
  6657. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6658. this->default_string_piece().data(), static_cast<int>(this->default_string_piece().length()),
  6659. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6660. "protobuf_unittest.TestAllTypes.default_string_piece");
  6661. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6662. 84, this->default_string_piece(), output);
  6663. }
  6664. // optional string default_cord = 85 [default = "123", ctype = CORD];
  6665. if (cached_has_bits & 0x00000080u) {
  6666. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6667. this->default_cord().data(), static_cast<int>(this->default_cord().length()),
  6668. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6669. "protobuf_unittest.TestAllTypes.default_cord");
  6670. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6671. 85, this->default_cord(), output);
  6672. }
  6673. switch (oneof_field_case()) {
  6674. case kOneofUint32:
  6675. ::google::protobuf::internal::WireFormatLite::WriteUInt32(111, this->oneof_uint32(), output);
  6676. break;
  6677. case kOneofNestedMessage:
  6678. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6679. 112, this->_internal_oneof_nested_message(), output);
  6680. break;
  6681. case kOneofString:
  6682. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6683. this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
  6684. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6685. "protobuf_unittest.TestAllTypes.oneof_string");
  6686. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6687. 113, this->oneof_string(), output);
  6688. break;
  6689. case kOneofBytes:
  6690. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  6691. 114, this->oneof_bytes(), output);
  6692. break;
  6693. default: ;
  6694. }
  6695. if (_internal_metadata_.have_unknown_fields()) {
  6696. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  6697. _internal_metadata_.unknown_fields(), output);
  6698. }
  6699. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllTypes)
  6700. }
  6701. ::google::protobuf::uint8* TestAllTypes::InternalSerializeWithCachedSizesToArray(
  6702. bool deterministic, ::google::protobuf::uint8* target) const {
  6703. (void)deterministic; // Unused
  6704. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestAllTypes)
  6705. ::google::protobuf::uint32 cached_has_bits = 0;
  6706. (void) cached_has_bits;
  6707. cached_has_bits = _has_bits_[0];
  6708. // optional int32 optional_int32 = 1;
  6709. if (cached_has_bits & 0x00008000u) {
  6710. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->optional_int32(), target);
  6711. }
  6712. // optional int64 optional_int64 = 2;
  6713. if (cached_has_bits & 0x00004000u) {
  6714. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->optional_int64(), target);
  6715. }
  6716. // optional uint32 optional_uint32 = 3;
  6717. if (cached_has_bits & 0x00010000u) {
  6718. target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->optional_uint32(), target);
  6719. }
  6720. // optional uint64 optional_uint64 = 4;
  6721. if (cached_has_bits & 0x00020000u) {
  6722. target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->optional_uint64(), target);
  6723. }
  6724. // optional sint32 optional_sint32 = 5;
  6725. if (cached_has_bits & 0x00080000u) {
  6726. target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(5, this->optional_sint32(), target);
  6727. }
  6728. // optional sint64 optional_sint64 = 6;
  6729. if (cached_has_bits & 0x00040000u) {
  6730. target = ::google::protobuf::internal::WireFormatLite::WriteSInt64ToArray(6, this->optional_sint64(), target);
  6731. }
  6732. // optional fixed32 optional_fixed32 = 7;
  6733. if (cached_has_bits & 0x00100000u) {
  6734. target = ::google::protobuf::internal::WireFormatLite::WriteFixed32ToArray(7, this->optional_fixed32(), target);
  6735. }
  6736. // optional fixed64 optional_fixed64 = 8;
  6737. if (cached_has_bits & 0x00200000u) {
  6738. target = ::google::protobuf::internal::WireFormatLite::WriteFixed64ToArray(8, this->optional_fixed64(), target);
  6739. }
  6740. // optional sfixed32 optional_sfixed32 = 9;
  6741. if (cached_has_bits & 0x00800000u) {
  6742. target = ::google::protobuf::internal::WireFormatLite::WriteSFixed32ToArray(9, this->optional_sfixed32(), target);
  6743. }
  6744. // optional sfixed64 optional_sfixed64 = 10;
  6745. if (cached_has_bits & 0x00400000u) {
  6746. target = ::google::protobuf::internal::WireFormatLite::WriteSFixed64ToArray(10, this->optional_sfixed64(), target);
  6747. }
  6748. // optional float optional_float = 11;
  6749. if (cached_has_bits & 0x01000000u) {
  6750. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(11, this->optional_float(), target);
  6751. }
  6752. // optional double optional_double = 12;
  6753. if (cached_has_bits & 0x02000000u) {
  6754. target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(12, this->optional_double(), target);
  6755. }
  6756. // optional bool optional_bool = 13;
  6757. if (cached_has_bits & 0x04000000u) {
  6758. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(13, this->optional_bool(), target);
  6759. }
  6760. // optional string optional_string = 14;
  6761. if (cached_has_bits & 0x00000001u) {
  6762. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6763. this->optional_string().data(), static_cast<int>(this->optional_string().length()),
  6764. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6765. "protobuf_unittest.TestAllTypes.optional_string");
  6766. target =
  6767. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  6768. 14, this->optional_string(), target);
  6769. }
  6770. // optional bytes optional_bytes = 15;
  6771. if (cached_has_bits & 0x00000002u) {
  6772. target =
  6773. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  6774. 15, this->optional_bytes(), target);
  6775. }
  6776. // optional group OptionalGroup = 16 { ... };
  6777. if (cached_has_bits & 0x00000100u) {
  6778. target = ::google::protobuf::internal::WireFormatLite::
  6779. InternalWriteGroupToArray(
  6780. 16, this->_internal_optionalgroup(), deterministic, target);
  6781. }
  6782. // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
  6783. if (cached_has_bits & 0x00000200u) {
  6784. target = ::google::protobuf::internal::WireFormatLite::
  6785. InternalWriteMessageToArray(
  6786. 18, this->_internal_optional_nested_message(), deterministic, target);
  6787. }
  6788. // optional .protobuf_unittest.ForeignMessage optional_foreign_message = 19;
  6789. if (cached_has_bits & 0x00000400u) {
  6790. target = ::google::protobuf::internal::WireFormatLite::
  6791. InternalWriteMessageToArray(
  6792. 19, this->_internal_optional_foreign_message(), deterministic, target);
  6793. }
  6794. // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
  6795. if (cached_has_bits & 0x00000800u) {
  6796. target = ::google::protobuf::internal::WireFormatLite::
  6797. InternalWriteMessageToArray(
  6798. 20, this->_internal_optional_import_message(), deterministic, target);
  6799. }
  6800. // optional .protobuf_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
  6801. if (cached_has_bits & 0x10000000u) {
  6802. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  6803. 21, this->optional_nested_enum(), target);
  6804. }
  6805. // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
  6806. if (cached_has_bits & 0x20000000u) {
  6807. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  6808. 22, this->optional_foreign_enum(), target);
  6809. }
  6810. // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
  6811. if (cached_has_bits & 0x40000000u) {
  6812. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  6813. 23, this->optional_import_enum(), target);
  6814. }
  6815. // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
  6816. if (cached_has_bits & 0x00000004u) {
  6817. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6818. this->optional_string_piece().data(), static_cast<int>(this->optional_string_piece().length()),
  6819. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6820. "protobuf_unittest.TestAllTypes.optional_string_piece");
  6821. target =
  6822. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  6823. 24, this->optional_string_piece(), target);
  6824. }
  6825. // optional string optional_cord = 25 [ctype = CORD];
  6826. if (cached_has_bits & 0x00000008u) {
  6827. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6828. this->optional_cord().data(), static_cast<int>(this->optional_cord().length()),
  6829. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6830. "protobuf_unittest.TestAllTypes.optional_cord");
  6831. target =
  6832. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  6833. 25, this->optional_cord(), target);
  6834. }
  6835. // optional .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
  6836. if (cached_has_bits & 0x00001000u) {
  6837. target = ::google::protobuf::internal::WireFormatLite::
  6838. InternalWriteMessageToArray(
  6839. 26, this->_internal_optional_public_import_message(), deterministic, target);
  6840. }
  6841. // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_lazy_message = 27 [lazy = true];
  6842. if (cached_has_bits & 0x00002000u) {
  6843. target = ::google::protobuf::internal::WireFormatLite::
  6844. InternalWriteMessageToArray(
  6845. 27, this->_internal_optional_lazy_message(), deterministic, target);
  6846. }
  6847. // repeated int32 repeated_int32 = 31;
  6848. target = ::google::protobuf::internal::WireFormatLite::
  6849. WriteInt32ToArray(31, this->repeated_int32_, target);
  6850. // repeated int64 repeated_int64 = 32;
  6851. target = ::google::protobuf::internal::WireFormatLite::
  6852. WriteInt64ToArray(32, this->repeated_int64_, target);
  6853. // repeated uint32 repeated_uint32 = 33;
  6854. target = ::google::protobuf::internal::WireFormatLite::
  6855. WriteUInt32ToArray(33, this->repeated_uint32_, target);
  6856. // repeated uint64 repeated_uint64 = 34;
  6857. target = ::google::protobuf::internal::WireFormatLite::
  6858. WriteUInt64ToArray(34, this->repeated_uint64_, target);
  6859. // repeated sint32 repeated_sint32 = 35;
  6860. target = ::google::protobuf::internal::WireFormatLite::
  6861. WriteSInt32ToArray(35, this->repeated_sint32_, target);
  6862. // repeated sint64 repeated_sint64 = 36;
  6863. target = ::google::protobuf::internal::WireFormatLite::
  6864. WriteSInt64ToArray(36, this->repeated_sint64_, target);
  6865. // repeated fixed32 repeated_fixed32 = 37;
  6866. target = ::google::protobuf::internal::WireFormatLite::
  6867. WriteFixed32ToArray(37, this->repeated_fixed32_, target);
  6868. // repeated fixed64 repeated_fixed64 = 38;
  6869. target = ::google::protobuf::internal::WireFormatLite::
  6870. WriteFixed64ToArray(38, this->repeated_fixed64_, target);
  6871. // repeated sfixed32 repeated_sfixed32 = 39;
  6872. target = ::google::protobuf::internal::WireFormatLite::
  6873. WriteSFixed32ToArray(39, this->repeated_sfixed32_, target);
  6874. // repeated sfixed64 repeated_sfixed64 = 40;
  6875. target = ::google::protobuf::internal::WireFormatLite::
  6876. WriteSFixed64ToArray(40, this->repeated_sfixed64_, target);
  6877. // repeated float repeated_float = 41;
  6878. target = ::google::protobuf::internal::WireFormatLite::
  6879. WriteFloatToArray(41, this->repeated_float_, target);
  6880. // repeated double repeated_double = 42;
  6881. target = ::google::protobuf::internal::WireFormatLite::
  6882. WriteDoubleToArray(42, this->repeated_double_, target);
  6883. // repeated bool repeated_bool = 43;
  6884. target = ::google::protobuf::internal::WireFormatLite::
  6885. WriteBoolToArray(43, this->repeated_bool_, target);
  6886. // repeated string repeated_string = 44;
  6887. for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
  6888. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6889. this->repeated_string(i).data(), static_cast<int>(this->repeated_string(i).length()),
  6890. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6891. "protobuf_unittest.TestAllTypes.repeated_string");
  6892. target = ::google::protobuf::internal::WireFormatLite::
  6893. WriteStringToArray(44, this->repeated_string(i), target);
  6894. }
  6895. // repeated bytes repeated_bytes = 45;
  6896. for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
  6897. target = ::google::protobuf::internal::WireFormatLite::
  6898. WriteBytesToArray(45, this->repeated_bytes(i), target);
  6899. }
  6900. // repeated group RepeatedGroup = 46 { ... };
  6901. for (unsigned int i = 0,
  6902. n = static_cast<unsigned int>(this->repeatedgroup_size()); i < n; i++) {
  6903. target = ::google::protobuf::internal::WireFormatLite::
  6904. InternalWriteGroupToArray(
  6905. 46, this->repeatedgroup(static_cast<int>(i)), deterministic, target);
  6906. }
  6907. // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
  6908. for (unsigned int i = 0,
  6909. n = static_cast<unsigned int>(this->repeated_nested_message_size()); i < n; i++) {
  6910. target = ::google::protobuf::internal::WireFormatLite::
  6911. InternalWriteMessageToArray(
  6912. 48, this->repeated_nested_message(static_cast<int>(i)), deterministic, target);
  6913. }
  6914. // repeated .protobuf_unittest.ForeignMessage repeated_foreign_message = 49;
  6915. for (unsigned int i = 0,
  6916. n = static_cast<unsigned int>(this->repeated_foreign_message_size()); i < n; i++) {
  6917. target = ::google::protobuf::internal::WireFormatLite::
  6918. InternalWriteMessageToArray(
  6919. 49, this->repeated_foreign_message(static_cast<int>(i)), deterministic, target);
  6920. }
  6921. // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
  6922. for (unsigned int i = 0,
  6923. n = static_cast<unsigned int>(this->repeated_import_message_size()); i < n; i++) {
  6924. target = ::google::protobuf::internal::WireFormatLite::
  6925. InternalWriteMessageToArray(
  6926. 50, this->repeated_import_message(static_cast<int>(i)), deterministic, target);
  6927. }
  6928. // repeated .protobuf_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
  6929. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  6930. 51, this->repeated_nested_enum_, target);
  6931. // repeated .protobuf_unittest.ForeignEnum repeated_foreign_enum = 52;
  6932. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  6933. 52, this->repeated_foreign_enum_, target);
  6934. // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
  6935. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  6936. 53, this->repeated_import_enum_, target);
  6937. // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
  6938. for (int i = 0, n = this->repeated_string_piece_size(); i < n; i++) {
  6939. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6940. this->repeated_string_piece(i).data(), static_cast<int>(this->repeated_string_piece(i).length()),
  6941. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6942. "protobuf_unittest.TestAllTypes.repeated_string_piece");
  6943. target = ::google::protobuf::internal::WireFormatLite::
  6944. WriteStringToArray(54, this->repeated_string_piece(i), target);
  6945. }
  6946. // repeated string repeated_cord = 55 [ctype = CORD];
  6947. for (int i = 0, n = this->repeated_cord_size(); i < n; i++) {
  6948. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  6949. this->repeated_cord(i).data(), static_cast<int>(this->repeated_cord(i).length()),
  6950. ::google::protobuf::internal::WireFormat::SERIALIZE,
  6951. "protobuf_unittest.TestAllTypes.repeated_cord");
  6952. target = ::google::protobuf::internal::WireFormatLite::
  6953. WriteStringToArray(55, this->repeated_cord(i), target);
  6954. }
  6955. // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
  6956. for (unsigned int i = 0,
  6957. n = static_cast<unsigned int>(this->repeated_lazy_message_size()); i < n; i++) {
  6958. target = ::google::protobuf::internal::WireFormatLite::
  6959. InternalWriteMessageToArray(
  6960. 57, this->repeated_lazy_message(static_cast<int>(i)), deterministic, target);
  6961. }
  6962. // optional int32 default_int32 = 61 [default = 41];
  6963. if (cached_has_bits & 0x80000000u) {
  6964. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(61, this->default_int32(), target);
  6965. }
  6966. cached_has_bits = _has_bits_[1];
  6967. // optional int64 default_int64 = 62 [default = 42];
  6968. if (cached_has_bits & 0x00000001u) {
  6969. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(62, this->default_int64(), target);
  6970. }
  6971. // optional uint32 default_uint32 = 63 [default = 43];
  6972. if (cached_has_bits & 0x00000004u) {
  6973. target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(63, this->default_uint32(), target);
  6974. }
  6975. // optional uint64 default_uint64 = 64 [default = 44];
  6976. if (cached_has_bits & 0x00000002u) {
  6977. target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(64, this->default_uint64(), target);
  6978. }
  6979. // optional sint32 default_sint32 = 65 [default = -45];
  6980. if (cached_has_bits & 0x00000008u) {
  6981. target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(65, this->default_sint32(), target);
  6982. }
  6983. // optional sint64 default_sint64 = 66 [default = 46];
  6984. if (cached_has_bits & 0x00000010u) {
  6985. target = ::google::protobuf::internal::WireFormatLite::WriteSInt64ToArray(66, this->default_sint64(), target);
  6986. }
  6987. // optional fixed32 default_fixed32 = 67 [default = 47];
  6988. if (cached_has_bits & 0x00000040u) {
  6989. target = ::google::protobuf::internal::WireFormatLite::WriteFixed32ToArray(67, this->default_fixed32(), target);
  6990. }
  6991. // optional fixed64 default_fixed64 = 68 [default = 48];
  6992. if (cached_has_bits & 0x00000020u) {
  6993. target = ::google::protobuf::internal::WireFormatLite::WriteFixed64ToArray(68, this->default_fixed64(), target);
  6994. }
  6995. // optional sfixed32 default_sfixed32 = 69 [default = 49];
  6996. if (cached_has_bits & 0x00000080u) {
  6997. target = ::google::protobuf::internal::WireFormatLite::WriteSFixed32ToArray(69, this->default_sfixed32(), target);
  6998. }
  6999. // optional sfixed64 default_sfixed64 = 70 [default = -50];
  7000. if (cached_has_bits & 0x00000100u) {
  7001. target = ::google::protobuf::internal::WireFormatLite::WriteSFixed64ToArray(70, this->default_sfixed64(), target);
  7002. }
  7003. // optional float default_float = 71 [default = 51.5];
  7004. if (cached_has_bits & 0x00000400u) {
  7005. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(71, this->default_float(), target);
  7006. }
  7007. // optional double default_double = 72 [default = 52000];
  7008. if (cached_has_bits & 0x00000200u) {
  7009. target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(72, this->default_double(), target);
  7010. }
  7011. // optional bool default_bool = 73 [default = true];
  7012. if (cached_has_bits & 0x00000800u) {
  7013. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(73, this->default_bool(), target);
  7014. }
  7015. cached_has_bits = _has_bits_[0];
  7016. // optional string default_string = 74 [default = "hello"];
  7017. if (cached_has_bits & 0x00000010u) {
  7018. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  7019. this->default_string().data(), static_cast<int>(this->default_string().length()),
  7020. ::google::protobuf::internal::WireFormat::SERIALIZE,
  7021. "protobuf_unittest.TestAllTypes.default_string");
  7022. target =
  7023. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  7024. 74, this->default_string(), target);
  7025. }
  7026. // optional bytes default_bytes = 75 [default = "world"];
  7027. if (cached_has_bits & 0x00000020u) {
  7028. target =
  7029. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  7030. 75, this->default_bytes(), target);
  7031. }
  7032. cached_has_bits = _has_bits_[1];
  7033. // optional .protobuf_unittest.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
  7034. if (cached_has_bits & 0x00001000u) {
  7035. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  7036. 81, this->default_nested_enum(), target);
  7037. }
  7038. // optional .protobuf_unittest.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
  7039. if (cached_has_bits & 0x00002000u) {
  7040. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  7041. 82, this->default_foreign_enum(), target);
  7042. }
  7043. cached_has_bits = _has_bits_[0];
  7044. // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
  7045. if (cached_has_bits & 0x08000000u) {
  7046. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  7047. 83, this->default_import_enum(), target);
  7048. }
  7049. // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
  7050. if (cached_has_bits & 0x00000040u) {
  7051. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  7052. this->default_string_piece().data(), static_cast<int>(this->default_string_piece().length()),
  7053. ::google::protobuf::internal::WireFormat::SERIALIZE,
  7054. "protobuf_unittest.TestAllTypes.default_string_piece");
  7055. target =
  7056. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  7057. 84, this->default_string_piece(), target);
  7058. }
  7059. // optional string default_cord = 85 [default = "123", ctype = CORD];
  7060. if (cached_has_bits & 0x00000080u) {
  7061. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  7062. this->default_cord().data(), static_cast<int>(this->default_cord().length()),
  7063. ::google::protobuf::internal::WireFormat::SERIALIZE,
  7064. "protobuf_unittest.TestAllTypes.default_cord");
  7065. target =
  7066. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  7067. 85, this->default_cord(), target);
  7068. }
  7069. switch (oneof_field_case()) {
  7070. case kOneofUint32:
  7071. target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(111, this->oneof_uint32(), target);
  7072. break;
  7073. case kOneofNestedMessage:
  7074. target = ::google::protobuf::internal::WireFormatLite::
  7075. InternalWriteMessageToArray(
  7076. 112, this->_internal_oneof_nested_message(), deterministic, target);
  7077. break;
  7078. case kOneofString:
  7079. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  7080. this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
  7081. ::google::protobuf::internal::WireFormat::SERIALIZE,
  7082. "protobuf_unittest.TestAllTypes.oneof_string");
  7083. target =
  7084. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  7085. 113, this->oneof_string(), target);
  7086. break;
  7087. case kOneofBytes:
  7088. target =
  7089. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  7090. 114, this->oneof_bytes(), target);
  7091. break;
  7092. default: ;
  7093. }
  7094. if (_internal_metadata_.have_unknown_fields()) {
  7095. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  7096. _internal_metadata_.unknown_fields(), target);
  7097. }
  7098. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestAllTypes)
  7099. return target;
  7100. }
  7101. size_t TestAllTypes::ByteSizeLong() const {
  7102. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllTypes)
  7103. size_t total_size = 0;
  7104. if (_internal_metadata_.have_unknown_fields()) {
  7105. total_size +=
  7106. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  7107. _internal_metadata_.unknown_fields());
  7108. }
  7109. // repeated int32 repeated_int32 = 31;
  7110. {
  7111. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  7112. Int32Size(this->repeated_int32_);
  7113. total_size += 2 *
  7114. ::google::protobuf::internal::FromIntSize(this->repeated_int32_size());
  7115. total_size += data_size;
  7116. }
  7117. // repeated int64 repeated_int64 = 32;
  7118. {
  7119. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  7120. Int64Size(this->repeated_int64_);
  7121. total_size += 2 *
  7122. ::google::protobuf::internal::FromIntSize(this->repeated_int64_size());
  7123. total_size += data_size;
  7124. }
  7125. // repeated uint32 repeated_uint32 = 33;
  7126. {
  7127. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  7128. UInt32Size(this->repeated_uint32_);
  7129. total_size += 2 *
  7130. ::google::protobuf::internal::FromIntSize(this->repeated_uint32_size());
  7131. total_size += data_size;
  7132. }
  7133. // repeated uint64 repeated_uint64 = 34;
  7134. {
  7135. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  7136. UInt64Size(this->repeated_uint64_);
  7137. total_size += 2 *
  7138. ::google::protobuf::internal::FromIntSize(this->repeated_uint64_size());
  7139. total_size += data_size;
  7140. }
  7141. // repeated sint32 repeated_sint32 = 35;
  7142. {
  7143. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  7144. SInt32Size(this->repeated_sint32_);
  7145. total_size += 2 *
  7146. ::google::protobuf::internal::FromIntSize(this->repeated_sint32_size());
  7147. total_size += data_size;
  7148. }
  7149. // repeated sint64 repeated_sint64 = 36;
  7150. {
  7151. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  7152. SInt64Size(this->repeated_sint64_);
  7153. total_size += 2 *
  7154. ::google::protobuf::internal::FromIntSize(this->repeated_sint64_size());
  7155. total_size += data_size;
  7156. }
  7157. // repeated fixed32 repeated_fixed32 = 37;
  7158. {
  7159. unsigned int count = static_cast<unsigned int>(this->repeated_fixed32_size());
  7160. size_t data_size = 4UL * count;
  7161. total_size += 2 *
  7162. ::google::protobuf::internal::FromIntSize(this->repeated_fixed32_size());
  7163. total_size += data_size;
  7164. }
  7165. // repeated fixed64 repeated_fixed64 = 38;
  7166. {
  7167. unsigned int count = static_cast<unsigned int>(this->repeated_fixed64_size());
  7168. size_t data_size = 8UL * count;
  7169. total_size += 2 *
  7170. ::google::protobuf::internal::FromIntSize(this->repeated_fixed64_size());
  7171. total_size += data_size;
  7172. }
  7173. // repeated sfixed32 repeated_sfixed32 = 39;
  7174. {
  7175. unsigned int count = static_cast<unsigned int>(this->repeated_sfixed32_size());
  7176. size_t data_size = 4UL * count;
  7177. total_size += 2 *
  7178. ::google::protobuf::internal::FromIntSize(this->repeated_sfixed32_size());
  7179. total_size += data_size;
  7180. }
  7181. // repeated sfixed64 repeated_sfixed64 = 40;
  7182. {
  7183. unsigned int count = static_cast<unsigned int>(this->repeated_sfixed64_size());
  7184. size_t data_size = 8UL * count;
  7185. total_size += 2 *
  7186. ::google::protobuf::internal::FromIntSize(this->repeated_sfixed64_size());
  7187. total_size += data_size;
  7188. }
  7189. // repeated float repeated_float = 41;
  7190. {
  7191. unsigned int count = static_cast<unsigned int>(this->repeated_float_size());
  7192. size_t data_size = 4UL * count;
  7193. total_size += 2 *
  7194. ::google::protobuf::internal::FromIntSize(this->repeated_float_size());
  7195. total_size += data_size;
  7196. }
  7197. // repeated double repeated_double = 42;
  7198. {
  7199. unsigned int count = static_cast<unsigned int>(this->repeated_double_size());
  7200. size_t data_size = 8UL * count;
  7201. total_size += 2 *
  7202. ::google::protobuf::internal::FromIntSize(this->repeated_double_size());
  7203. total_size += data_size;
  7204. }
  7205. // repeated bool repeated_bool = 43;
  7206. {
  7207. unsigned int count = static_cast<unsigned int>(this->repeated_bool_size());
  7208. size_t data_size = 1UL * count;
  7209. total_size += 2 *
  7210. ::google::protobuf::internal::FromIntSize(this->repeated_bool_size());
  7211. total_size += data_size;
  7212. }
  7213. // repeated string repeated_string = 44;
  7214. total_size += 2 *
  7215. ::google::protobuf::internal::FromIntSize(this->repeated_string_size());
  7216. for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
  7217. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  7218. this->repeated_string(i));
  7219. }
  7220. // repeated bytes repeated_bytes = 45;
  7221. total_size += 2 *
  7222. ::google::protobuf::internal::FromIntSize(this->repeated_bytes_size());
  7223. for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
  7224. total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
  7225. this->repeated_bytes(i));
  7226. }
  7227. // repeated group RepeatedGroup = 46 { ... };
  7228. {
  7229. unsigned int count = static_cast<unsigned int>(this->repeatedgroup_size());
  7230. total_size += 4UL * count;
  7231. for (unsigned int i = 0; i < count; i++) {
  7232. total_size +=
  7233. ::google::protobuf::internal::WireFormatLite::GroupSize(
  7234. this->repeatedgroup(static_cast<int>(i)));
  7235. }
  7236. }
  7237. // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
  7238. {
  7239. unsigned int count = static_cast<unsigned int>(this->repeated_nested_message_size());
  7240. total_size += 2UL * count;
  7241. for (unsigned int i = 0; i < count; i++) {
  7242. total_size +=
  7243. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7244. this->repeated_nested_message(static_cast<int>(i)));
  7245. }
  7246. }
  7247. // repeated .protobuf_unittest.ForeignMessage repeated_foreign_message = 49;
  7248. {
  7249. unsigned int count = static_cast<unsigned int>(this->repeated_foreign_message_size());
  7250. total_size += 2UL * count;
  7251. for (unsigned int i = 0; i < count; i++) {
  7252. total_size +=
  7253. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7254. this->repeated_foreign_message(static_cast<int>(i)));
  7255. }
  7256. }
  7257. // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
  7258. {
  7259. unsigned int count = static_cast<unsigned int>(this->repeated_import_message_size());
  7260. total_size += 2UL * count;
  7261. for (unsigned int i = 0; i < count; i++) {
  7262. total_size +=
  7263. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7264. this->repeated_import_message(static_cast<int>(i)));
  7265. }
  7266. }
  7267. // repeated .protobuf_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
  7268. {
  7269. size_t data_size = 0;
  7270. unsigned int count = static_cast<unsigned int>(this->repeated_nested_enum_size());for (unsigned int i = 0; i < count; i++) {
  7271. data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
  7272. this->repeated_nested_enum(static_cast<int>(i)));
  7273. }
  7274. total_size += (2UL * count) + data_size;
  7275. }
  7276. // repeated .protobuf_unittest.ForeignEnum repeated_foreign_enum = 52;
  7277. {
  7278. size_t data_size = 0;
  7279. unsigned int count = static_cast<unsigned int>(this->repeated_foreign_enum_size());for (unsigned int i = 0; i < count; i++) {
  7280. data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
  7281. this->repeated_foreign_enum(static_cast<int>(i)));
  7282. }
  7283. total_size += (2UL * count) + data_size;
  7284. }
  7285. // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
  7286. {
  7287. size_t data_size = 0;
  7288. unsigned int count = static_cast<unsigned int>(this->repeated_import_enum_size());for (unsigned int i = 0; i < count; i++) {
  7289. data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
  7290. this->repeated_import_enum(static_cast<int>(i)));
  7291. }
  7292. total_size += (2UL * count) + data_size;
  7293. }
  7294. // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
  7295. total_size += 2 *
  7296. ::google::protobuf::internal::FromIntSize(this->repeated_string_piece_size());
  7297. for (int i = 0, n = this->repeated_string_piece_size(); i < n; i++) {
  7298. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  7299. this->repeated_string_piece(i));
  7300. }
  7301. // repeated string repeated_cord = 55 [ctype = CORD];
  7302. total_size += 2 *
  7303. ::google::protobuf::internal::FromIntSize(this->repeated_cord_size());
  7304. for (int i = 0, n = this->repeated_cord_size(); i < n; i++) {
  7305. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  7306. this->repeated_cord(i));
  7307. }
  7308. // repeated .protobuf_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
  7309. {
  7310. unsigned int count = static_cast<unsigned int>(this->repeated_lazy_message_size());
  7311. total_size += 2UL * count;
  7312. for (unsigned int i = 0; i < count; i++) {
  7313. total_size +=
  7314. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7315. this->repeated_lazy_message(static_cast<int>(i)));
  7316. }
  7317. }
  7318. if (_has_bits_[0 / 32] & 255u) {
  7319. // optional string optional_string = 14;
  7320. if (has_optional_string()) {
  7321. total_size += 1 +
  7322. ::google::protobuf::internal::WireFormatLite::StringSize(
  7323. this->optional_string());
  7324. }
  7325. // optional bytes optional_bytes = 15;
  7326. if (has_optional_bytes()) {
  7327. total_size += 1 +
  7328. ::google::protobuf::internal::WireFormatLite::BytesSize(
  7329. this->optional_bytes());
  7330. }
  7331. // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
  7332. if (has_optional_string_piece()) {
  7333. total_size += 2 +
  7334. ::google::protobuf::internal::WireFormatLite::StringSize(
  7335. this->optional_string_piece());
  7336. }
  7337. // optional string optional_cord = 25 [ctype = CORD];
  7338. if (has_optional_cord()) {
  7339. total_size += 2 +
  7340. ::google::protobuf::internal::WireFormatLite::StringSize(
  7341. this->optional_cord());
  7342. }
  7343. // optional string default_string = 74 [default = "hello"];
  7344. if (has_default_string()) {
  7345. total_size += 2 +
  7346. ::google::protobuf::internal::WireFormatLite::StringSize(
  7347. this->default_string());
  7348. }
  7349. // optional bytes default_bytes = 75 [default = "world"];
  7350. if (has_default_bytes()) {
  7351. total_size += 2 +
  7352. ::google::protobuf::internal::WireFormatLite::BytesSize(
  7353. this->default_bytes());
  7354. }
  7355. // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
  7356. if (has_default_string_piece()) {
  7357. total_size += 2 +
  7358. ::google::protobuf::internal::WireFormatLite::StringSize(
  7359. this->default_string_piece());
  7360. }
  7361. // optional string default_cord = 85 [default = "123", ctype = CORD];
  7362. if (has_default_cord()) {
  7363. total_size += 2 +
  7364. ::google::protobuf::internal::WireFormatLite::StringSize(
  7365. this->default_cord());
  7366. }
  7367. }
  7368. if (_has_bits_[8 / 32] & 65280u) {
  7369. // optional group OptionalGroup = 16 { ... };
  7370. if (has_optionalgroup()) {
  7371. total_size += 4 +
  7372. ::google::protobuf::internal::WireFormatLite::GroupSize(
  7373. *optionalgroup_);
  7374. }
  7375. // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
  7376. if (has_optional_nested_message()) {
  7377. total_size += 2 +
  7378. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7379. *optional_nested_message_);
  7380. }
  7381. // optional .protobuf_unittest.ForeignMessage optional_foreign_message = 19;
  7382. if (has_optional_foreign_message()) {
  7383. total_size += 2 +
  7384. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7385. *optional_foreign_message_);
  7386. }
  7387. // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
  7388. if (has_optional_import_message()) {
  7389. total_size += 2 +
  7390. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7391. *optional_import_message_);
  7392. }
  7393. // optional .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
  7394. if (has_optional_public_import_message()) {
  7395. total_size += 2 +
  7396. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7397. *optional_public_import_message_);
  7398. }
  7399. // optional .protobuf_unittest.TestAllTypes.NestedMessage optional_lazy_message = 27 [lazy = true];
  7400. if (has_optional_lazy_message()) {
  7401. total_size += 2 +
  7402. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7403. *optional_lazy_message_);
  7404. }
  7405. // optional int64 optional_int64 = 2;
  7406. if (has_optional_int64()) {
  7407. total_size += 1 +
  7408. ::google::protobuf::internal::WireFormatLite::Int64Size(
  7409. this->optional_int64());
  7410. }
  7411. // optional int32 optional_int32 = 1;
  7412. if (has_optional_int32()) {
  7413. total_size += 1 +
  7414. ::google::protobuf::internal::WireFormatLite::Int32Size(
  7415. this->optional_int32());
  7416. }
  7417. }
  7418. if (_has_bits_[16 / 32] & 16711680u) {
  7419. // optional uint32 optional_uint32 = 3;
  7420. if (has_optional_uint32()) {
  7421. total_size += 1 +
  7422. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  7423. this->optional_uint32());
  7424. }
  7425. // optional uint64 optional_uint64 = 4;
  7426. if (has_optional_uint64()) {
  7427. total_size += 1 +
  7428. ::google::protobuf::internal::WireFormatLite::UInt64Size(
  7429. this->optional_uint64());
  7430. }
  7431. // optional sint64 optional_sint64 = 6;
  7432. if (has_optional_sint64()) {
  7433. total_size += 1 +
  7434. ::google::protobuf::internal::WireFormatLite::SInt64Size(
  7435. this->optional_sint64());
  7436. }
  7437. // optional sint32 optional_sint32 = 5;
  7438. if (has_optional_sint32()) {
  7439. total_size += 1 +
  7440. ::google::protobuf::internal::WireFormatLite::SInt32Size(
  7441. this->optional_sint32());
  7442. }
  7443. // optional fixed32 optional_fixed32 = 7;
  7444. if (has_optional_fixed32()) {
  7445. total_size += 1 + 4;
  7446. }
  7447. // optional fixed64 optional_fixed64 = 8;
  7448. if (has_optional_fixed64()) {
  7449. total_size += 1 + 8;
  7450. }
  7451. // optional sfixed64 optional_sfixed64 = 10;
  7452. if (has_optional_sfixed64()) {
  7453. total_size += 1 + 8;
  7454. }
  7455. // optional sfixed32 optional_sfixed32 = 9;
  7456. if (has_optional_sfixed32()) {
  7457. total_size += 1 + 4;
  7458. }
  7459. }
  7460. if (_has_bits_[24 / 32] & 4278190080u) {
  7461. // optional float optional_float = 11;
  7462. if (has_optional_float()) {
  7463. total_size += 1 + 4;
  7464. }
  7465. // optional double optional_double = 12;
  7466. if (has_optional_double()) {
  7467. total_size += 1 + 8;
  7468. }
  7469. // optional bool optional_bool = 13;
  7470. if (has_optional_bool()) {
  7471. total_size += 1 + 1;
  7472. }
  7473. // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
  7474. if (has_default_import_enum()) {
  7475. total_size += 2 +
  7476. ::google::protobuf::internal::WireFormatLite::EnumSize(this->default_import_enum());
  7477. }
  7478. // optional .protobuf_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
  7479. if (has_optional_nested_enum()) {
  7480. total_size += 2 +
  7481. ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_nested_enum());
  7482. }
  7483. // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
  7484. if (has_optional_foreign_enum()) {
  7485. total_size += 2 +
  7486. ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_foreign_enum());
  7487. }
  7488. // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
  7489. if (has_optional_import_enum()) {
  7490. total_size += 2 +
  7491. ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_import_enum());
  7492. }
  7493. // optional int32 default_int32 = 61 [default = 41];
  7494. if (has_default_int32()) {
  7495. total_size += 2 +
  7496. ::google::protobuf::internal::WireFormatLite::Int32Size(
  7497. this->default_int32());
  7498. }
  7499. }
  7500. if (_has_bits_[32 / 32] & 255u) {
  7501. // optional int64 default_int64 = 62 [default = 42];
  7502. if (has_default_int64()) {
  7503. total_size += 2 +
  7504. ::google::protobuf::internal::WireFormatLite::Int64Size(
  7505. this->default_int64());
  7506. }
  7507. // optional uint64 default_uint64 = 64 [default = 44];
  7508. if (has_default_uint64()) {
  7509. total_size += 2 +
  7510. ::google::protobuf::internal::WireFormatLite::UInt64Size(
  7511. this->default_uint64());
  7512. }
  7513. // optional uint32 default_uint32 = 63 [default = 43];
  7514. if (has_default_uint32()) {
  7515. total_size += 2 +
  7516. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  7517. this->default_uint32());
  7518. }
  7519. // optional sint32 default_sint32 = 65 [default = -45];
  7520. if (has_default_sint32()) {
  7521. total_size += 2 +
  7522. ::google::protobuf::internal::WireFormatLite::SInt32Size(
  7523. this->default_sint32());
  7524. }
  7525. // optional sint64 default_sint64 = 66 [default = 46];
  7526. if (has_default_sint64()) {
  7527. total_size += 2 +
  7528. ::google::protobuf::internal::WireFormatLite::SInt64Size(
  7529. this->default_sint64());
  7530. }
  7531. // optional fixed64 default_fixed64 = 68 [default = 48];
  7532. if (has_default_fixed64()) {
  7533. total_size += 2 + 8;
  7534. }
  7535. // optional fixed32 default_fixed32 = 67 [default = 47];
  7536. if (has_default_fixed32()) {
  7537. total_size += 2 + 4;
  7538. }
  7539. // optional sfixed32 default_sfixed32 = 69 [default = 49];
  7540. if (has_default_sfixed32()) {
  7541. total_size += 2 + 4;
  7542. }
  7543. }
  7544. if (_has_bits_[40 / 32] & 16128u) {
  7545. // optional sfixed64 default_sfixed64 = 70 [default = -50];
  7546. if (has_default_sfixed64()) {
  7547. total_size += 2 + 8;
  7548. }
  7549. // optional double default_double = 72 [default = 52000];
  7550. if (has_default_double()) {
  7551. total_size += 2 + 8;
  7552. }
  7553. // optional float default_float = 71 [default = 51.5];
  7554. if (has_default_float()) {
  7555. total_size += 2 + 4;
  7556. }
  7557. // optional bool default_bool = 73 [default = true];
  7558. if (has_default_bool()) {
  7559. total_size += 2 + 1;
  7560. }
  7561. // optional .protobuf_unittest.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
  7562. if (has_default_nested_enum()) {
  7563. total_size += 2 +
  7564. ::google::protobuf::internal::WireFormatLite::EnumSize(this->default_nested_enum());
  7565. }
  7566. // optional .protobuf_unittest.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
  7567. if (has_default_foreign_enum()) {
  7568. total_size += 2 +
  7569. ::google::protobuf::internal::WireFormatLite::EnumSize(this->default_foreign_enum());
  7570. }
  7571. }
  7572. switch (oneof_field_case()) {
  7573. // optional uint32 oneof_uint32 = 111;
  7574. case kOneofUint32: {
  7575. total_size += 2 +
  7576. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  7577. this->oneof_uint32());
  7578. break;
  7579. }
  7580. // optional .protobuf_unittest.TestAllTypes.NestedMessage oneof_nested_message = 112;
  7581. case kOneofNestedMessage: {
  7582. total_size += 2 +
  7583. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7584. *oneof_field_.oneof_nested_message_);
  7585. break;
  7586. }
  7587. // optional string oneof_string = 113;
  7588. case kOneofString: {
  7589. total_size += 2 +
  7590. ::google::protobuf::internal::WireFormatLite::StringSize(
  7591. this->oneof_string());
  7592. break;
  7593. }
  7594. // optional bytes oneof_bytes = 114;
  7595. case kOneofBytes: {
  7596. total_size += 2 +
  7597. ::google::protobuf::internal::WireFormatLite::BytesSize(
  7598. this->oneof_bytes());
  7599. break;
  7600. }
  7601. case ONEOF_FIELD_NOT_SET: {
  7602. break;
  7603. }
  7604. }
  7605. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  7606. SetCachedSize(cached_size);
  7607. return total_size;
  7608. }
  7609. void TestAllTypes::MergeFrom(const ::google::protobuf::Message& from) {
  7610. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestAllTypes)
  7611. GOOGLE_DCHECK_NE(&from, this);
  7612. const TestAllTypes* source =
  7613. ::google::protobuf::internal::DynamicCastToGenerated<const TestAllTypes>(
  7614. &from);
  7615. if (source == NULL) {
  7616. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestAllTypes)
  7617. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  7618. } else {
  7619. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestAllTypes)
  7620. MergeFrom(*source);
  7621. }
  7622. }
  7623. void TestAllTypes::MergeFrom(const TestAllTypes& from) {
  7624. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestAllTypes)
  7625. GOOGLE_DCHECK_NE(&from, this);
  7626. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7627. ::google::protobuf::uint32 cached_has_bits = 0;
  7628. (void) cached_has_bits;
  7629. repeated_int32_.MergeFrom(from.repeated_int32_);
  7630. repeated_int64_.MergeFrom(from.repeated_int64_);
  7631. repeated_uint32_.MergeFrom(from.repeated_uint32_);
  7632. repeated_uint64_.MergeFrom(from.repeated_uint64_);
  7633. repeated_sint32_.MergeFrom(from.repeated_sint32_);
  7634. repeated_sint64_.MergeFrom(from.repeated_sint64_);
  7635. repeated_fixed32_.MergeFrom(from.repeated_fixed32_);
  7636. repeated_fixed64_.MergeFrom(from.repeated_fixed64_);
  7637. repeated_sfixed32_.MergeFrom(from.repeated_sfixed32_);
  7638. repeated_sfixed64_.MergeFrom(from.repeated_sfixed64_);
  7639. repeated_float_.MergeFrom(from.repeated_float_);
  7640. repeated_double_.MergeFrom(from.repeated_double_);
  7641. repeated_bool_.MergeFrom(from.repeated_bool_);
  7642. repeated_string_.MergeFrom(from.repeated_string_);
  7643. repeated_bytes_.MergeFrom(from.repeated_bytes_);
  7644. repeatedgroup_.MergeFrom(from.repeatedgroup_);
  7645. repeated_nested_message_.MergeFrom(from.repeated_nested_message_);
  7646. repeated_foreign_message_.MergeFrom(from.repeated_foreign_message_);
  7647. repeated_import_message_.MergeFrom(from.repeated_import_message_);
  7648. repeated_nested_enum_.MergeFrom(from.repeated_nested_enum_);
  7649. repeated_foreign_enum_.MergeFrom(from.repeated_foreign_enum_);
  7650. repeated_import_enum_.MergeFrom(from.repeated_import_enum_);
  7651. repeated_string_piece_.MergeFrom(from.repeated_string_piece_);
  7652. repeated_cord_.MergeFrom(from.repeated_cord_);
  7653. repeated_lazy_message_.MergeFrom(from.repeated_lazy_message_);
  7654. cached_has_bits = from._has_bits_[0];
  7655. if (cached_has_bits & 255u) {
  7656. if (cached_has_bits & 0x00000001u) {
  7657. set_optional_string(from.optional_string());
  7658. }
  7659. if (cached_has_bits & 0x00000002u) {
  7660. set_optional_bytes(from.optional_bytes());
  7661. }
  7662. if (cached_has_bits & 0x00000004u) {
  7663. set_optional_string_piece(from.optional_string_piece());
  7664. }
  7665. if (cached_has_bits & 0x00000008u) {
  7666. set_optional_cord(from.optional_cord());
  7667. }
  7668. if (cached_has_bits & 0x00000010u) {
  7669. set_default_string(from.default_string());
  7670. }
  7671. if (cached_has_bits & 0x00000020u) {
  7672. set_default_bytes(from.default_bytes());
  7673. }
  7674. if (cached_has_bits & 0x00000040u) {
  7675. set_default_string_piece(from.default_string_piece());
  7676. }
  7677. if (cached_has_bits & 0x00000080u) {
  7678. set_default_cord(from.default_cord());
  7679. }
  7680. }
  7681. if (cached_has_bits & 65280u) {
  7682. if (cached_has_bits & 0x00000100u) {
  7683. mutable_optionalgroup()->::protobuf_unittest::TestAllTypes_OptionalGroup::MergeFrom(from.optionalgroup());
  7684. }
  7685. if (cached_has_bits & 0x00000200u) {
  7686. mutable_optional_nested_message()->::protobuf_unittest::TestAllTypes_NestedMessage::MergeFrom(from.optional_nested_message());
  7687. }
  7688. if (cached_has_bits & 0x00000400u) {
  7689. mutable_optional_foreign_message()->::protobuf_unittest::ForeignMessage::MergeFrom(from.optional_foreign_message());
  7690. }
  7691. if (cached_has_bits & 0x00000800u) {
  7692. mutable_optional_import_message()->::protobuf_unittest_import::ImportMessage::MergeFrom(from.optional_import_message());
  7693. }
  7694. if (cached_has_bits & 0x00001000u) {
  7695. mutable_optional_public_import_message()->::protobuf_unittest_import::PublicImportMessage::MergeFrom(from.optional_public_import_message());
  7696. }
  7697. if (cached_has_bits & 0x00002000u) {
  7698. mutable_optional_lazy_message()->::protobuf_unittest::TestAllTypes_NestedMessage::MergeFrom(from.optional_lazy_message());
  7699. }
  7700. if (cached_has_bits & 0x00004000u) {
  7701. optional_int64_ = from.optional_int64_;
  7702. }
  7703. if (cached_has_bits & 0x00008000u) {
  7704. optional_int32_ = from.optional_int32_;
  7705. }
  7706. _has_bits_[0] |= cached_has_bits;
  7707. }
  7708. if (cached_has_bits & 16711680u) {
  7709. if (cached_has_bits & 0x00010000u) {
  7710. optional_uint32_ = from.optional_uint32_;
  7711. }
  7712. if (cached_has_bits & 0x00020000u) {
  7713. optional_uint64_ = from.optional_uint64_;
  7714. }
  7715. if (cached_has_bits & 0x00040000u) {
  7716. optional_sint64_ = from.optional_sint64_;
  7717. }
  7718. if (cached_has_bits & 0x00080000u) {
  7719. optional_sint32_ = from.optional_sint32_;
  7720. }
  7721. if (cached_has_bits & 0x00100000u) {
  7722. optional_fixed32_ = from.optional_fixed32_;
  7723. }
  7724. if (cached_has_bits & 0x00200000u) {
  7725. optional_fixed64_ = from.optional_fixed64_;
  7726. }
  7727. if (cached_has_bits & 0x00400000u) {
  7728. optional_sfixed64_ = from.optional_sfixed64_;
  7729. }
  7730. if (cached_has_bits & 0x00800000u) {
  7731. optional_sfixed32_ = from.optional_sfixed32_;
  7732. }
  7733. _has_bits_[0] |= cached_has_bits;
  7734. }
  7735. if (cached_has_bits & 4278190080u) {
  7736. if (cached_has_bits & 0x01000000u) {
  7737. optional_float_ = from.optional_float_;
  7738. }
  7739. if (cached_has_bits & 0x02000000u) {
  7740. optional_double_ = from.optional_double_;
  7741. }
  7742. if (cached_has_bits & 0x04000000u) {
  7743. optional_bool_ = from.optional_bool_;
  7744. }
  7745. if (cached_has_bits & 0x08000000u) {
  7746. default_import_enum_ = from.default_import_enum_;
  7747. }
  7748. if (cached_has_bits & 0x10000000u) {
  7749. optional_nested_enum_ = from.optional_nested_enum_;
  7750. }
  7751. if (cached_has_bits & 0x20000000u) {
  7752. optional_foreign_enum_ = from.optional_foreign_enum_;
  7753. }
  7754. if (cached_has_bits & 0x40000000u) {
  7755. optional_import_enum_ = from.optional_import_enum_;
  7756. }
  7757. if (cached_has_bits & 0x80000000u) {
  7758. default_int32_ = from.default_int32_;
  7759. }
  7760. _has_bits_[0] |= cached_has_bits;
  7761. }
  7762. cached_has_bits = from._has_bits_[1];
  7763. if (cached_has_bits & 255u) {
  7764. if (cached_has_bits & 0x00000001u) {
  7765. default_int64_ = from.default_int64_;
  7766. }
  7767. if (cached_has_bits & 0x00000002u) {
  7768. default_uint64_ = from.default_uint64_;
  7769. }
  7770. if (cached_has_bits & 0x00000004u) {
  7771. default_uint32_ = from.default_uint32_;
  7772. }
  7773. if (cached_has_bits & 0x00000008u) {
  7774. default_sint32_ = from.default_sint32_;
  7775. }
  7776. if (cached_has_bits & 0x00000010u) {
  7777. default_sint64_ = from.default_sint64_;
  7778. }
  7779. if (cached_has_bits & 0x00000020u) {
  7780. default_fixed64_ = from.default_fixed64_;
  7781. }
  7782. if (cached_has_bits & 0x00000040u) {
  7783. default_fixed32_ = from.default_fixed32_;
  7784. }
  7785. if (cached_has_bits & 0x00000080u) {
  7786. default_sfixed32_ = from.default_sfixed32_;
  7787. }
  7788. _has_bits_[1] |= cached_has_bits;
  7789. }
  7790. if (cached_has_bits & 16128u) {
  7791. if (cached_has_bits & 0x00000100u) {
  7792. default_sfixed64_ = from.default_sfixed64_;
  7793. }
  7794. if (cached_has_bits & 0x00000200u) {
  7795. default_double_ = from.default_double_;
  7796. }
  7797. if (cached_has_bits & 0x00000400u) {
  7798. default_float_ = from.default_float_;
  7799. }
  7800. if (cached_has_bits & 0x00000800u) {
  7801. default_bool_ = from.default_bool_;
  7802. }
  7803. if (cached_has_bits & 0x00001000u) {
  7804. default_nested_enum_ = from.default_nested_enum_;
  7805. }
  7806. if (cached_has_bits & 0x00002000u) {
  7807. default_foreign_enum_ = from.default_foreign_enum_;
  7808. }
  7809. _has_bits_[1] |= cached_has_bits;
  7810. }
  7811. switch (from.oneof_field_case()) {
  7812. case kOneofUint32: {
  7813. set_oneof_uint32(from.oneof_uint32());
  7814. break;
  7815. }
  7816. case kOneofNestedMessage: {
  7817. mutable_oneof_nested_message()->::protobuf_unittest::TestAllTypes_NestedMessage::MergeFrom(from.oneof_nested_message());
  7818. break;
  7819. }
  7820. case kOneofString: {
  7821. set_oneof_string(from.oneof_string());
  7822. break;
  7823. }
  7824. case kOneofBytes: {
  7825. set_oneof_bytes(from.oneof_bytes());
  7826. break;
  7827. }
  7828. case ONEOF_FIELD_NOT_SET: {
  7829. break;
  7830. }
  7831. }
  7832. }
  7833. void TestAllTypes::CopyFrom(const ::google::protobuf::Message& from) {
  7834. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestAllTypes)
  7835. if (&from == this) return;
  7836. Clear();
  7837. MergeFrom(from);
  7838. }
  7839. void TestAllTypes::CopyFrom(const TestAllTypes& from) {
  7840. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllTypes)
  7841. if (&from == this) return;
  7842. Clear();
  7843. MergeFrom(from);
  7844. }
  7845. bool TestAllTypes::IsInitialized() const {
  7846. return true;
  7847. }
  7848. void TestAllTypes::Swap(TestAllTypes* other) {
  7849. if (other == this) return;
  7850. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  7851. InternalSwap(other);
  7852. } else {
  7853. TestAllTypes* temp = New(GetArenaNoVirtual());
  7854. temp->MergeFrom(*other);
  7855. other->CopyFrom(*this);
  7856. InternalSwap(temp);
  7857. if (GetArenaNoVirtual() == NULL) {
  7858. delete temp;
  7859. }
  7860. }
  7861. }
  7862. void TestAllTypes::UnsafeArenaSwap(TestAllTypes* other) {
  7863. if (other == this) return;
  7864. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  7865. InternalSwap(other);
  7866. }
  7867. void TestAllTypes::InternalSwap(TestAllTypes* other) {
  7868. using std::swap;
  7869. repeated_int32_.InternalSwap(&other->repeated_int32_);
  7870. repeated_int64_.InternalSwap(&other->repeated_int64_);
  7871. repeated_uint32_.InternalSwap(&other->repeated_uint32_);
  7872. repeated_uint64_.InternalSwap(&other->repeated_uint64_);
  7873. repeated_sint32_.InternalSwap(&other->repeated_sint32_);
  7874. repeated_sint64_.InternalSwap(&other->repeated_sint64_);
  7875. repeated_fixed32_.InternalSwap(&other->repeated_fixed32_);
  7876. repeated_fixed64_.InternalSwap(&other->repeated_fixed64_);
  7877. repeated_sfixed32_.InternalSwap(&other->repeated_sfixed32_);
  7878. repeated_sfixed64_.InternalSwap(&other->repeated_sfixed64_);
  7879. repeated_float_.InternalSwap(&other->repeated_float_);
  7880. repeated_double_.InternalSwap(&other->repeated_double_);
  7881. repeated_bool_.InternalSwap(&other->repeated_bool_);
  7882. repeated_string_.InternalSwap(CastToBase(&other->repeated_string_));
  7883. repeated_bytes_.InternalSwap(CastToBase(&other->repeated_bytes_));
  7884. CastToBase(&repeatedgroup_)->InternalSwap(CastToBase(&other->repeatedgroup_));
  7885. CastToBase(&repeated_nested_message_)->InternalSwap(CastToBase(&other->repeated_nested_message_));
  7886. CastToBase(&repeated_foreign_message_)->InternalSwap(CastToBase(&other->repeated_foreign_message_));
  7887. CastToBase(&repeated_import_message_)->InternalSwap(CastToBase(&other->repeated_import_message_));
  7888. repeated_nested_enum_.InternalSwap(&other->repeated_nested_enum_);
  7889. repeated_foreign_enum_.InternalSwap(&other->repeated_foreign_enum_);
  7890. repeated_import_enum_.InternalSwap(&other->repeated_import_enum_);
  7891. repeated_string_piece_.InternalSwap(CastToBase(&other->repeated_string_piece_));
  7892. repeated_cord_.InternalSwap(CastToBase(&other->repeated_cord_));
  7893. CastToBase(&repeated_lazy_message_)->InternalSwap(CastToBase(&other->repeated_lazy_message_));
  7894. optional_string_.Swap(&other->optional_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  7895. GetArenaNoVirtual());
  7896. optional_bytes_.Swap(&other->optional_bytes_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  7897. GetArenaNoVirtual());
  7898. optional_string_piece_.Swap(&other->optional_string_piece_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  7899. GetArenaNoVirtual());
  7900. optional_cord_.Swap(&other->optional_cord_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  7901. GetArenaNoVirtual());
  7902. default_string_.Swap(&other->default_string_, &::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get(),
  7903. GetArenaNoVirtual());
  7904. default_bytes_.Swap(&other->default_bytes_, &::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get(),
  7905. GetArenaNoVirtual());
  7906. default_string_piece_.Swap(&other->default_string_piece_, &::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get(),
  7907. GetArenaNoVirtual());
  7908. default_cord_.Swap(&other->default_cord_, &::protobuf_unittest::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get(),
  7909. GetArenaNoVirtual());
  7910. swap(optionalgroup_, other->optionalgroup_);
  7911. swap(optional_nested_message_, other->optional_nested_message_);
  7912. swap(optional_foreign_message_, other->optional_foreign_message_);
  7913. swap(optional_import_message_, other->optional_import_message_);
  7914. swap(optional_public_import_message_, other->optional_public_import_message_);
  7915. swap(optional_lazy_message_, other->optional_lazy_message_);
  7916. swap(optional_int64_, other->optional_int64_);
  7917. swap(optional_int32_, other->optional_int32_);
  7918. swap(optional_uint32_, other->optional_uint32_);
  7919. swap(optional_uint64_, other->optional_uint64_);
  7920. swap(optional_sint64_, other->optional_sint64_);
  7921. swap(optional_sint32_, other->optional_sint32_);
  7922. swap(optional_fixed32_, other->optional_fixed32_);
  7923. swap(optional_fixed64_, other->optional_fixed64_);
  7924. swap(optional_sfixed64_, other->optional_sfixed64_);
  7925. swap(optional_sfixed32_, other->optional_sfixed32_);
  7926. swap(optional_float_, other->optional_float_);
  7927. swap(optional_double_, other->optional_double_);
  7928. swap(optional_bool_, other->optional_bool_);
  7929. swap(default_import_enum_, other->default_import_enum_);
  7930. swap(optional_nested_enum_, other->optional_nested_enum_);
  7931. swap(optional_foreign_enum_, other->optional_foreign_enum_);
  7932. swap(optional_import_enum_, other->optional_import_enum_);
  7933. swap(default_int32_, other->default_int32_);
  7934. swap(default_int64_, other->default_int64_);
  7935. swap(default_uint64_, other->default_uint64_);
  7936. swap(default_uint32_, other->default_uint32_);
  7937. swap(default_sint32_, other->default_sint32_);
  7938. swap(default_sint64_, other->default_sint64_);
  7939. swap(default_fixed64_, other->default_fixed64_);
  7940. swap(default_fixed32_, other->default_fixed32_);
  7941. swap(default_sfixed32_, other->default_sfixed32_);
  7942. swap(default_sfixed64_, other->default_sfixed64_);
  7943. swap(default_double_, other->default_double_);
  7944. swap(default_float_, other->default_float_);
  7945. swap(default_bool_, other->default_bool_);
  7946. swap(default_nested_enum_, other->default_nested_enum_);
  7947. swap(default_foreign_enum_, other->default_foreign_enum_);
  7948. swap(oneof_field_, other->oneof_field_);
  7949. swap(_oneof_case_[0], other->_oneof_case_[0]);
  7950. swap(_has_bits_[0], other->_has_bits_[0]);
  7951. swap(_has_bits_[1], other->_has_bits_[1]);
  7952. _internal_metadata_.Swap(&other->_internal_metadata_);
  7953. }
  7954. ::google::protobuf::Metadata TestAllTypes::GetMetadata() const {
  7955. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  7956. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  7957. }
  7958. // ===================================================================
  7959. void NestedTestAllTypes::InitAsDefaultInstance() {
  7960. ::protobuf_unittest::_NestedTestAllTypes_default_instance_._instance.get_mutable()->child_ = const_cast< ::protobuf_unittest::NestedTestAllTypes*>(
  7961. ::protobuf_unittest::NestedTestAllTypes::internal_default_instance());
  7962. ::protobuf_unittest::_NestedTestAllTypes_default_instance_._instance.get_mutable()->payload_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
  7963. ::protobuf_unittest::TestAllTypes::internal_default_instance());
  7964. }
  7965. void NestedTestAllTypes::unsafe_arena_set_allocated_child(
  7966. ::protobuf_unittest::NestedTestAllTypes* child) {
  7967. if (GetArenaNoVirtual() == NULL) {
  7968. delete child_;
  7969. }
  7970. child_ = child;
  7971. if (child) {
  7972. set_has_child();
  7973. } else {
  7974. clear_has_child();
  7975. }
  7976. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.NestedTestAllTypes.child)
  7977. }
  7978. void NestedTestAllTypes::unsafe_arena_set_allocated_payload(
  7979. ::protobuf_unittest::TestAllTypes* payload) {
  7980. if (GetArenaNoVirtual() == NULL) {
  7981. delete payload_;
  7982. }
  7983. payload_ = payload;
  7984. if (payload) {
  7985. set_has_payload();
  7986. } else {
  7987. clear_has_payload();
  7988. }
  7989. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.NestedTestAllTypes.payload)
  7990. }
  7991. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  7992. const int NestedTestAllTypes::kChildFieldNumber;
  7993. const int NestedTestAllTypes::kPayloadFieldNumber;
  7994. const int NestedTestAllTypes::kRepeatedChildFieldNumber;
  7995. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  7996. NestedTestAllTypes::NestedTestAllTypes()
  7997. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  7998. ::google::protobuf::internal::InitSCC(
  7999. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_NestedTestAllTypes.base);
  8000. SharedCtor();
  8001. // @@protoc_insertion_point(constructor:protobuf_unittest.NestedTestAllTypes)
  8002. }
  8003. NestedTestAllTypes::NestedTestAllTypes(::google::protobuf::Arena* arena)
  8004. : ::google::protobuf::Message(),
  8005. _internal_metadata_(arena),
  8006. repeated_child_(arena) {
  8007. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_NestedTestAllTypes.base);
  8008. SharedCtor();
  8009. RegisterArenaDtor(arena);
  8010. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.NestedTestAllTypes)
  8011. }
  8012. NestedTestAllTypes::NestedTestAllTypes(const NestedTestAllTypes& from)
  8013. : ::google::protobuf::Message(),
  8014. _internal_metadata_(NULL),
  8015. _has_bits_(from._has_bits_),
  8016. repeated_child_(from.repeated_child_) {
  8017. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8018. if (from.has_child()) {
  8019. child_ = new ::protobuf_unittest::NestedTestAllTypes(*from.child_);
  8020. } else {
  8021. child_ = NULL;
  8022. }
  8023. if (from.has_payload()) {
  8024. payload_ = new ::protobuf_unittest::TestAllTypes(*from.payload_);
  8025. } else {
  8026. payload_ = NULL;
  8027. }
  8028. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.NestedTestAllTypes)
  8029. }
  8030. void NestedTestAllTypes::SharedCtor() {
  8031. ::memset(&child_, 0, static_cast<size_t>(
  8032. reinterpret_cast<char*>(&payload_) -
  8033. reinterpret_cast<char*>(&child_)) + sizeof(payload_));
  8034. }
  8035. NestedTestAllTypes::~NestedTestAllTypes() {
  8036. // @@protoc_insertion_point(destructor:protobuf_unittest.NestedTestAllTypes)
  8037. SharedDtor();
  8038. }
  8039. void NestedTestAllTypes::SharedDtor() {
  8040. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  8041. if (this != internal_default_instance()) delete child_;
  8042. if (this != internal_default_instance()) delete payload_;
  8043. }
  8044. void NestedTestAllTypes::ArenaDtor(void* object) {
  8045. NestedTestAllTypes* _this = reinterpret_cast< NestedTestAllTypes* >(object);
  8046. (void)_this;
  8047. }
  8048. void NestedTestAllTypes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  8049. }
  8050. void NestedTestAllTypes::SetCachedSize(int size) const {
  8051. _cached_size_.Set(size);
  8052. }
  8053. const ::google::protobuf::Descriptor* NestedTestAllTypes::descriptor() {
  8054. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  8055. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  8056. }
  8057. const NestedTestAllTypes& NestedTestAllTypes::default_instance() {
  8058. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_NestedTestAllTypes.base);
  8059. return *internal_default_instance();
  8060. }
  8061. void NestedTestAllTypes::Clear() {
  8062. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.NestedTestAllTypes)
  8063. ::google::protobuf::uint32 cached_has_bits = 0;
  8064. // Prevent compiler warnings about cached_has_bits being unused
  8065. (void) cached_has_bits;
  8066. repeated_child_.Clear();
  8067. cached_has_bits = _has_bits_[0];
  8068. if (cached_has_bits & 3u) {
  8069. if (cached_has_bits & 0x00000001u) {
  8070. GOOGLE_DCHECK(child_ != NULL);
  8071. child_->Clear();
  8072. }
  8073. if (cached_has_bits & 0x00000002u) {
  8074. GOOGLE_DCHECK(payload_ != NULL);
  8075. payload_->Clear();
  8076. }
  8077. }
  8078. _has_bits_.Clear();
  8079. _internal_metadata_.Clear();
  8080. }
  8081. bool NestedTestAllTypes::MergePartialFromCodedStream(
  8082. ::google::protobuf::io::CodedInputStream* input) {
  8083. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  8084. ::google::protobuf::uint32 tag;
  8085. // @@protoc_insertion_point(parse_start:protobuf_unittest.NestedTestAllTypes)
  8086. for (;;) {
  8087. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  8088. tag = p.first;
  8089. if (!p.second) goto handle_unusual;
  8090. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  8091. // optional .protobuf_unittest.NestedTestAllTypes child = 1;
  8092. case 1: {
  8093. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8094. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  8095. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8096. input, mutable_child()));
  8097. } else {
  8098. goto handle_unusual;
  8099. }
  8100. break;
  8101. }
  8102. // optional .protobuf_unittest.TestAllTypes payload = 2;
  8103. case 2: {
  8104. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8105. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  8106. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8107. input, mutable_payload()));
  8108. } else {
  8109. goto handle_unusual;
  8110. }
  8111. break;
  8112. }
  8113. // repeated .protobuf_unittest.NestedTestAllTypes repeated_child = 3;
  8114. case 3: {
  8115. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8116. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  8117. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8118. input, add_repeated_child()));
  8119. } else {
  8120. goto handle_unusual;
  8121. }
  8122. break;
  8123. }
  8124. default: {
  8125. handle_unusual:
  8126. if (tag == 0) {
  8127. goto success;
  8128. }
  8129. DO_(::google::protobuf::internal::WireFormat::SkipField(
  8130. input, tag, _internal_metadata_.mutable_unknown_fields()));
  8131. break;
  8132. }
  8133. }
  8134. }
  8135. success:
  8136. // @@protoc_insertion_point(parse_success:protobuf_unittest.NestedTestAllTypes)
  8137. return true;
  8138. failure:
  8139. // @@protoc_insertion_point(parse_failure:protobuf_unittest.NestedTestAllTypes)
  8140. return false;
  8141. #undef DO_
  8142. }
  8143. void NestedTestAllTypes::SerializeWithCachedSizes(
  8144. ::google::protobuf::io::CodedOutputStream* output) const {
  8145. // @@protoc_insertion_point(serialize_start:protobuf_unittest.NestedTestAllTypes)
  8146. ::google::protobuf::uint32 cached_has_bits = 0;
  8147. (void) cached_has_bits;
  8148. cached_has_bits = _has_bits_[0];
  8149. // optional .protobuf_unittest.NestedTestAllTypes child = 1;
  8150. if (cached_has_bits & 0x00000001u) {
  8151. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8152. 1, this->_internal_child(), output);
  8153. }
  8154. // optional .protobuf_unittest.TestAllTypes payload = 2;
  8155. if (cached_has_bits & 0x00000002u) {
  8156. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8157. 2, this->_internal_payload(), output);
  8158. }
  8159. // repeated .protobuf_unittest.NestedTestAllTypes repeated_child = 3;
  8160. for (unsigned int i = 0,
  8161. n = static_cast<unsigned int>(this->repeated_child_size()); i < n; i++) {
  8162. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8163. 3,
  8164. this->repeated_child(static_cast<int>(i)),
  8165. output);
  8166. }
  8167. if (_internal_metadata_.have_unknown_fields()) {
  8168. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  8169. _internal_metadata_.unknown_fields(), output);
  8170. }
  8171. // @@protoc_insertion_point(serialize_end:protobuf_unittest.NestedTestAllTypes)
  8172. }
  8173. ::google::protobuf::uint8* NestedTestAllTypes::InternalSerializeWithCachedSizesToArray(
  8174. bool deterministic, ::google::protobuf::uint8* target) const {
  8175. (void)deterministic; // Unused
  8176. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.NestedTestAllTypes)
  8177. ::google::protobuf::uint32 cached_has_bits = 0;
  8178. (void) cached_has_bits;
  8179. cached_has_bits = _has_bits_[0];
  8180. // optional .protobuf_unittest.NestedTestAllTypes child = 1;
  8181. if (cached_has_bits & 0x00000001u) {
  8182. target = ::google::protobuf::internal::WireFormatLite::
  8183. InternalWriteMessageToArray(
  8184. 1, this->_internal_child(), deterministic, target);
  8185. }
  8186. // optional .protobuf_unittest.TestAllTypes payload = 2;
  8187. if (cached_has_bits & 0x00000002u) {
  8188. target = ::google::protobuf::internal::WireFormatLite::
  8189. InternalWriteMessageToArray(
  8190. 2, this->_internal_payload(), deterministic, target);
  8191. }
  8192. // repeated .protobuf_unittest.NestedTestAllTypes repeated_child = 3;
  8193. for (unsigned int i = 0,
  8194. n = static_cast<unsigned int>(this->repeated_child_size()); i < n; i++) {
  8195. target = ::google::protobuf::internal::WireFormatLite::
  8196. InternalWriteMessageToArray(
  8197. 3, this->repeated_child(static_cast<int>(i)), deterministic, target);
  8198. }
  8199. if (_internal_metadata_.have_unknown_fields()) {
  8200. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  8201. _internal_metadata_.unknown_fields(), target);
  8202. }
  8203. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.NestedTestAllTypes)
  8204. return target;
  8205. }
  8206. size_t NestedTestAllTypes::ByteSizeLong() const {
  8207. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.NestedTestAllTypes)
  8208. size_t total_size = 0;
  8209. if (_internal_metadata_.have_unknown_fields()) {
  8210. total_size +=
  8211. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  8212. _internal_metadata_.unknown_fields());
  8213. }
  8214. // repeated .protobuf_unittest.NestedTestAllTypes repeated_child = 3;
  8215. {
  8216. unsigned int count = static_cast<unsigned int>(this->repeated_child_size());
  8217. total_size += 1UL * count;
  8218. for (unsigned int i = 0; i < count; i++) {
  8219. total_size +=
  8220. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8221. this->repeated_child(static_cast<int>(i)));
  8222. }
  8223. }
  8224. if (_has_bits_[0 / 32] & 3u) {
  8225. // optional .protobuf_unittest.NestedTestAllTypes child = 1;
  8226. if (has_child()) {
  8227. total_size += 1 +
  8228. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8229. *child_);
  8230. }
  8231. // optional .protobuf_unittest.TestAllTypes payload = 2;
  8232. if (has_payload()) {
  8233. total_size += 1 +
  8234. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8235. *payload_);
  8236. }
  8237. }
  8238. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  8239. SetCachedSize(cached_size);
  8240. return total_size;
  8241. }
  8242. void NestedTestAllTypes::MergeFrom(const ::google::protobuf::Message& from) {
  8243. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.NestedTestAllTypes)
  8244. GOOGLE_DCHECK_NE(&from, this);
  8245. const NestedTestAllTypes* source =
  8246. ::google::protobuf::internal::DynamicCastToGenerated<const NestedTestAllTypes>(
  8247. &from);
  8248. if (source == NULL) {
  8249. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.NestedTestAllTypes)
  8250. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  8251. } else {
  8252. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.NestedTestAllTypes)
  8253. MergeFrom(*source);
  8254. }
  8255. }
  8256. void NestedTestAllTypes::MergeFrom(const NestedTestAllTypes& from) {
  8257. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.NestedTestAllTypes)
  8258. GOOGLE_DCHECK_NE(&from, this);
  8259. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8260. ::google::protobuf::uint32 cached_has_bits = 0;
  8261. (void) cached_has_bits;
  8262. repeated_child_.MergeFrom(from.repeated_child_);
  8263. cached_has_bits = from._has_bits_[0];
  8264. if (cached_has_bits & 3u) {
  8265. if (cached_has_bits & 0x00000001u) {
  8266. mutable_child()->::protobuf_unittest::NestedTestAllTypes::MergeFrom(from.child());
  8267. }
  8268. if (cached_has_bits & 0x00000002u) {
  8269. mutable_payload()->::protobuf_unittest::TestAllTypes::MergeFrom(from.payload());
  8270. }
  8271. }
  8272. }
  8273. void NestedTestAllTypes::CopyFrom(const ::google::protobuf::Message& from) {
  8274. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.NestedTestAllTypes)
  8275. if (&from == this) return;
  8276. Clear();
  8277. MergeFrom(from);
  8278. }
  8279. void NestedTestAllTypes::CopyFrom(const NestedTestAllTypes& from) {
  8280. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.NestedTestAllTypes)
  8281. if (&from == this) return;
  8282. Clear();
  8283. MergeFrom(from);
  8284. }
  8285. bool NestedTestAllTypes::IsInitialized() const {
  8286. return true;
  8287. }
  8288. void NestedTestAllTypes::Swap(NestedTestAllTypes* other) {
  8289. if (other == this) return;
  8290. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  8291. InternalSwap(other);
  8292. } else {
  8293. NestedTestAllTypes* temp = New(GetArenaNoVirtual());
  8294. temp->MergeFrom(*other);
  8295. other->CopyFrom(*this);
  8296. InternalSwap(temp);
  8297. if (GetArenaNoVirtual() == NULL) {
  8298. delete temp;
  8299. }
  8300. }
  8301. }
  8302. void NestedTestAllTypes::UnsafeArenaSwap(NestedTestAllTypes* other) {
  8303. if (other == this) return;
  8304. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  8305. InternalSwap(other);
  8306. }
  8307. void NestedTestAllTypes::InternalSwap(NestedTestAllTypes* other) {
  8308. using std::swap;
  8309. CastToBase(&repeated_child_)->InternalSwap(CastToBase(&other->repeated_child_));
  8310. swap(child_, other->child_);
  8311. swap(payload_, other->payload_);
  8312. swap(_has_bits_[0], other->_has_bits_[0]);
  8313. _internal_metadata_.Swap(&other->_internal_metadata_);
  8314. }
  8315. ::google::protobuf::Metadata NestedTestAllTypes::GetMetadata() const {
  8316. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  8317. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  8318. }
  8319. // ===================================================================
  8320. void TestDeprecatedFields::InitAsDefaultInstance() {
  8321. ::protobuf_unittest::_TestDeprecatedFields_default_instance_.deprecated_int32_in_oneof_ = 0;
  8322. }
  8323. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  8324. const int TestDeprecatedFields::kDeprecatedInt32FieldNumber;
  8325. const int TestDeprecatedFields::kDeprecatedInt32InOneofFieldNumber;
  8326. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  8327. TestDeprecatedFields::TestDeprecatedFields()
  8328. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  8329. ::google::protobuf::internal::InitSCC(
  8330. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDeprecatedFields.base);
  8331. SharedCtor();
  8332. // @@protoc_insertion_point(constructor:protobuf_unittest.TestDeprecatedFields)
  8333. }
  8334. TestDeprecatedFields::TestDeprecatedFields(::google::protobuf::Arena* arena)
  8335. : ::google::protobuf::Message(),
  8336. _internal_metadata_(arena) {
  8337. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDeprecatedFields.base);
  8338. SharedCtor();
  8339. RegisterArenaDtor(arena);
  8340. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestDeprecatedFields)
  8341. }
  8342. TestDeprecatedFields::TestDeprecatedFields(const TestDeprecatedFields& from)
  8343. : ::google::protobuf::Message(),
  8344. _internal_metadata_(NULL),
  8345. _has_bits_(from._has_bits_) {
  8346. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8347. deprecated_int32_ = from.deprecated_int32_;
  8348. clear_has_oneof_fields();
  8349. switch (from.oneof_fields_case()) {
  8350. case kDeprecatedInt32InOneof: {
  8351. set_deprecated_int32_in_oneof(from.deprecated_int32_in_oneof());
  8352. break;
  8353. }
  8354. case ONEOF_FIELDS_NOT_SET: {
  8355. break;
  8356. }
  8357. }
  8358. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDeprecatedFields)
  8359. }
  8360. void TestDeprecatedFields::SharedCtor() {
  8361. deprecated_int32_ = 0;
  8362. clear_has_oneof_fields();
  8363. }
  8364. TestDeprecatedFields::~TestDeprecatedFields() {
  8365. // @@protoc_insertion_point(destructor:protobuf_unittest.TestDeprecatedFields)
  8366. SharedDtor();
  8367. }
  8368. void TestDeprecatedFields::SharedDtor() {
  8369. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  8370. if (has_oneof_fields()) {
  8371. clear_oneof_fields();
  8372. }
  8373. }
  8374. void TestDeprecatedFields::ArenaDtor(void* object) {
  8375. TestDeprecatedFields* _this = reinterpret_cast< TestDeprecatedFields* >(object);
  8376. (void)_this;
  8377. }
  8378. void TestDeprecatedFields::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  8379. }
  8380. void TestDeprecatedFields::SetCachedSize(int size) const {
  8381. _cached_size_.Set(size);
  8382. }
  8383. const ::google::protobuf::Descriptor* TestDeprecatedFields::descriptor() {
  8384. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  8385. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  8386. }
  8387. const TestDeprecatedFields& TestDeprecatedFields::default_instance() {
  8388. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDeprecatedFields.base);
  8389. return *internal_default_instance();
  8390. }
  8391. void TestDeprecatedFields::clear_oneof_fields() {
  8392. // @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestDeprecatedFields)
  8393. switch (oneof_fields_case()) {
  8394. case kDeprecatedInt32InOneof: {
  8395. // No need to clear
  8396. break;
  8397. }
  8398. case ONEOF_FIELDS_NOT_SET: {
  8399. break;
  8400. }
  8401. }
  8402. _oneof_case_[0] = ONEOF_FIELDS_NOT_SET;
  8403. }
  8404. void TestDeprecatedFields::Clear() {
  8405. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestDeprecatedFields)
  8406. ::google::protobuf::uint32 cached_has_bits = 0;
  8407. // Prevent compiler warnings about cached_has_bits being unused
  8408. (void) cached_has_bits;
  8409. deprecated_int32_ = 0;
  8410. clear_oneof_fields();
  8411. _has_bits_.Clear();
  8412. _internal_metadata_.Clear();
  8413. }
  8414. bool TestDeprecatedFields::MergePartialFromCodedStream(
  8415. ::google::protobuf::io::CodedInputStream* input) {
  8416. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  8417. ::google::protobuf::uint32 tag;
  8418. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestDeprecatedFields)
  8419. for (;;) {
  8420. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  8421. tag = p.first;
  8422. if (!p.second) goto handle_unusual;
  8423. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  8424. // optional int32 deprecated_int32 = 1 [deprecated = true];
  8425. case 1: {
  8426. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8427. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  8428. set_has_deprecated_int32();
  8429. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  8430. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  8431. input, &deprecated_int32_)));
  8432. } else {
  8433. goto handle_unusual;
  8434. }
  8435. break;
  8436. }
  8437. // optional int32 deprecated_int32_in_oneof = 2 [deprecated = true];
  8438. case 2: {
  8439. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8440. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  8441. clear_oneof_fields();
  8442. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  8443. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  8444. input, &oneof_fields_.deprecated_int32_in_oneof_)));
  8445. set_has_deprecated_int32_in_oneof();
  8446. } else {
  8447. goto handle_unusual;
  8448. }
  8449. break;
  8450. }
  8451. default: {
  8452. handle_unusual:
  8453. if (tag == 0) {
  8454. goto success;
  8455. }
  8456. DO_(::google::protobuf::internal::WireFormat::SkipField(
  8457. input, tag, _internal_metadata_.mutable_unknown_fields()));
  8458. break;
  8459. }
  8460. }
  8461. }
  8462. success:
  8463. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestDeprecatedFields)
  8464. return true;
  8465. failure:
  8466. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDeprecatedFields)
  8467. return false;
  8468. #undef DO_
  8469. }
  8470. void TestDeprecatedFields::SerializeWithCachedSizes(
  8471. ::google::protobuf::io::CodedOutputStream* output) const {
  8472. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestDeprecatedFields)
  8473. ::google::protobuf::uint32 cached_has_bits = 0;
  8474. (void) cached_has_bits;
  8475. cached_has_bits = _has_bits_[0];
  8476. // optional int32 deprecated_int32 = 1 [deprecated = true];
  8477. if (cached_has_bits & 0x00000001u) {
  8478. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->deprecated_int32(), output);
  8479. }
  8480. // optional int32 deprecated_int32_in_oneof = 2 [deprecated = true];
  8481. if (has_deprecated_int32_in_oneof()) {
  8482. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->deprecated_int32_in_oneof(), output);
  8483. }
  8484. if (_internal_metadata_.have_unknown_fields()) {
  8485. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  8486. _internal_metadata_.unknown_fields(), output);
  8487. }
  8488. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDeprecatedFields)
  8489. }
  8490. ::google::protobuf::uint8* TestDeprecatedFields::InternalSerializeWithCachedSizesToArray(
  8491. bool deterministic, ::google::protobuf::uint8* target) const {
  8492. (void)deterministic; // Unused
  8493. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestDeprecatedFields)
  8494. ::google::protobuf::uint32 cached_has_bits = 0;
  8495. (void) cached_has_bits;
  8496. cached_has_bits = _has_bits_[0];
  8497. // optional int32 deprecated_int32 = 1 [deprecated = true];
  8498. if (cached_has_bits & 0x00000001u) {
  8499. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->deprecated_int32(), target);
  8500. }
  8501. // optional int32 deprecated_int32_in_oneof = 2 [deprecated = true];
  8502. if (has_deprecated_int32_in_oneof()) {
  8503. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->deprecated_int32_in_oneof(), target);
  8504. }
  8505. if (_internal_metadata_.have_unknown_fields()) {
  8506. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  8507. _internal_metadata_.unknown_fields(), target);
  8508. }
  8509. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDeprecatedFields)
  8510. return target;
  8511. }
  8512. size_t TestDeprecatedFields::ByteSizeLong() const {
  8513. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDeprecatedFields)
  8514. size_t total_size = 0;
  8515. if (_internal_metadata_.have_unknown_fields()) {
  8516. total_size +=
  8517. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  8518. _internal_metadata_.unknown_fields());
  8519. }
  8520. // optional int32 deprecated_int32 = 1 [deprecated = true];
  8521. if (has_deprecated_int32()) {
  8522. total_size += 1 +
  8523. ::google::protobuf::internal::WireFormatLite::Int32Size(
  8524. this->deprecated_int32());
  8525. }
  8526. switch (oneof_fields_case()) {
  8527. // optional int32 deprecated_int32_in_oneof = 2 [deprecated = true];
  8528. case kDeprecatedInt32InOneof: {
  8529. total_size += 1 +
  8530. ::google::protobuf::internal::WireFormatLite::Int32Size(
  8531. this->deprecated_int32_in_oneof());
  8532. break;
  8533. }
  8534. case ONEOF_FIELDS_NOT_SET: {
  8535. break;
  8536. }
  8537. }
  8538. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  8539. SetCachedSize(cached_size);
  8540. return total_size;
  8541. }
  8542. void TestDeprecatedFields::MergeFrom(const ::google::protobuf::Message& from) {
  8543. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestDeprecatedFields)
  8544. GOOGLE_DCHECK_NE(&from, this);
  8545. const TestDeprecatedFields* source =
  8546. ::google::protobuf::internal::DynamicCastToGenerated<const TestDeprecatedFields>(
  8547. &from);
  8548. if (source == NULL) {
  8549. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestDeprecatedFields)
  8550. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  8551. } else {
  8552. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestDeprecatedFields)
  8553. MergeFrom(*source);
  8554. }
  8555. }
  8556. void TestDeprecatedFields::MergeFrom(const TestDeprecatedFields& from) {
  8557. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestDeprecatedFields)
  8558. GOOGLE_DCHECK_NE(&from, this);
  8559. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8560. ::google::protobuf::uint32 cached_has_bits = 0;
  8561. (void) cached_has_bits;
  8562. if (from.has_deprecated_int32()) {
  8563. set_deprecated_int32(from.deprecated_int32());
  8564. }
  8565. switch (from.oneof_fields_case()) {
  8566. case kDeprecatedInt32InOneof: {
  8567. set_deprecated_int32_in_oneof(from.deprecated_int32_in_oneof());
  8568. break;
  8569. }
  8570. case ONEOF_FIELDS_NOT_SET: {
  8571. break;
  8572. }
  8573. }
  8574. }
  8575. void TestDeprecatedFields::CopyFrom(const ::google::protobuf::Message& from) {
  8576. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestDeprecatedFields)
  8577. if (&from == this) return;
  8578. Clear();
  8579. MergeFrom(from);
  8580. }
  8581. void TestDeprecatedFields::CopyFrom(const TestDeprecatedFields& from) {
  8582. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDeprecatedFields)
  8583. if (&from == this) return;
  8584. Clear();
  8585. MergeFrom(from);
  8586. }
  8587. bool TestDeprecatedFields::IsInitialized() const {
  8588. return true;
  8589. }
  8590. void TestDeprecatedFields::Swap(TestDeprecatedFields* other) {
  8591. if (other == this) return;
  8592. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  8593. InternalSwap(other);
  8594. } else {
  8595. TestDeprecatedFields* temp = New(GetArenaNoVirtual());
  8596. temp->MergeFrom(*other);
  8597. other->CopyFrom(*this);
  8598. InternalSwap(temp);
  8599. if (GetArenaNoVirtual() == NULL) {
  8600. delete temp;
  8601. }
  8602. }
  8603. }
  8604. void TestDeprecatedFields::UnsafeArenaSwap(TestDeprecatedFields* other) {
  8605. if (other == this) return;
  8606. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  8607. InternalSwap(other);
  8608. }
  8609. void TestDeprecatedFields::InternalSwap(TestDeprecatedFields* other) {
  8610. using std::swap;
  8611. swap(deprecated_int32_, other->deprecated_int32_);
  8612. swap(oneof_fields_, other->oneof_fields_);
  8613. swap(_oneof_case_[0], other->_oneof_case_[0]);
  8614. swap(_has_bits_[0], other->_has_bits_[0]);
  8615. _internal_metadata_.Swap(&other->_internal_metadata_);
  8616. }
  8617. ::google::protobuf::Metadata TestDeprecatedFields::GetMetadata() const {
  8618. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  8619. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  8620. }
  8621. // ===================================================================
  8622. void TestDeprecatedMessage::InitAsDefaultInstance() {
  8623. }
  8624. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  8625. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  8626. TestDeprecatedMessage::TestDeprecatedMessage()
  8627. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  8628. ::google::protobuf::internal::InitSCC(
  8629. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDeprecatedMessage.base);
  8630. SharedCtor();
  8631. // @@protoc_insertion_point(constructor:protobuf_unittest.TestDeprecatedMessage)
  8632. }
  8633. TestDeprecatedMessage::TestDeprecatedMessage(::google::protobuf::Arena* arena)
  8634. : ::google::protobuf::Message(),
  8635. _internal_metadata_(arena) {
  8636. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDeprecatedMessage.base);
  8637. SharedCtor();
  8638. RegisterArenaDtor(arena);
  8639. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestDeprecatedMessage)
  8640. }
  8641. TestDeprecatedMessage::TestDeprecatedMessage(const TestDeprecatedMessage& from)
  8642. : ::google::protobuf::Message(),
  8643. _internal_metadata_(NULL),
  8644. _has_bits_(from._has_bits_) {
  8645. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8646. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDeprecatedMessage)
  8647. }
  8648. void TestDeprecatedMessage::SharedCtor() {
  8649. }
  8650. TestDeprecatedMessage::~TestDeprecatedMessage() {
  8651. // @@protoc_insertion_point(destructor:protobuf_unittest.TestDeprecatedMessage)
  8652. SharedDtor();
  8653. }
  8654. void TestDeprecatedMessage::SharedDtor() {
  8655. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  8656. }
  8657. void TestDeprecatedMessage::ArenaDtor(void* object) {
  8658. TestDeprecatedMessage* _this = reinterpret_cast< TestDeprecatedMessage* >(object);
  8659. (void)_this;
  8660. }
  8661. void TestDeprecatedMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  8662. }
  8663. void TestDeprecatedMessage::SetCachedSize(int size) const {
  8664. _cached_size_.Set(size);
  8665. }
  8666. const ::google::protobuf::Descriptor* TestDeprecatedMessage::descriptor() {
  8667. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  8668. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  8669. }
  8670. const TestDeprecatedMessage& TestDeprecatedMessage::default_instance() {
  8671. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDeprecatedMessage.base);
  8672. return *internal_default_instance();
  8673. }
  8674. void TestDeprecatedMessage::Clear() {
  8675. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestDeprecatedMessage)
  8676. ::google::protobuf::uint32 cached_has_bits = 0;
  8677. // Prevent compiler warnings about cached_has_bits being unused
  8678. (void) cached_has_bits;
  8679. _has_bits_.Clear();
  8680. _internal_metadata_.Clear();
  8681. }
  8682. bool TestDeprecatedMessage::MergePartialFromCodedStream(
  8683. ::google::protobuf::io::CodedInputStream* input) {
  8684. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  8685. ::google::protobuf::uint32 tag;
  8686. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestDeprecatedMessage)
  8687. for (;;) {
  8688. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  8689. tag = p.first;
  8690. if (!p.second) goto handle_unusual;
  8691. handle_unusual:
  8692. if (tag == 0) {
  8693. goto success;
  8694. }
  8695. DO_(::google::protobuf::internal::WireFormat::SkipField(
  8696. input, tag, _internal_metadata_.mutable_unknown_fields()));
  8697. }
  8698. success:
  8699. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestDeprecatedMessage)
  8700. return true;
  8701. failure:
  8702. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDeprecatedMessage)
  8703. return false;
  8704. #undef DO_
  8705. }
  8706. void TestDeprecatedMessage::SerializeWithCachedSizes(
  8707. ::google::protobuf::io::CodedOutputStream* output) const {
  8708. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestDeprecatedMessage)
  8709. ::google::protobuf::uint32 cached_has_bits = 0;
  8710. (void) cached_has_bits;
  8711. if (_internal_metadata_.have_unknown_fields()) {
  8712. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  8713. _internal_metadata_.unknown_fields(), output);
  8714. }
  8715. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDeprecatedMessage)
  8716. }
  8717. ::google::protobuf::uint8* TestDeprecatedMessage::InternalSerializeWithCachedSizesToArray(
  8718. bool deterministic, ::google::protobuf::uint8* target) const {
  8719. (void)deterministic; // Unused
  8720. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestDeprecatedMessage)
  8721. ::google::protobuf::uint32 cached_has_bits = 0;
  8722. (void) cached_has_bits;
  8723. if (_internal_metadata_.have_unknown_fields()) {
  8724. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  8725. _internal_metadata_.unknown_fields(), target);
  8726. }
  8727. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDeprecatedMessage)
  8728. return target;
  8729. }
  8730. size_t TestDeprecatedMessage::ByteSizeLong() const {
  8731. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDeprecatedMessage)
  8732. size_t total_size = 0;
  8733. if (_internal_metadata_.have_unknown_fields()) {
  8734. total_size +=
  8735. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  8736. _internal_metadata_.unknown_fields());
  8737. }
  8738. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  8739. SetCachedSize(cached_size);
  8740. return total_size;
  8741. }
  8742. void TestDeprecatedMessage::MergeFrom(const ::google::protobuf::Message& from) {
  8743. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestDeprecatedMessage)
  8744. GOOGLE_DCHECK_NE(&from, this);
  8745. const TestDeprecatedMessage* source =
  8746. ::google::protobuf::internal::DynamicCastToGenerated<const TestDeprecatedMessage>(
  8747. &from);
  8748. if (source == NULL) {
  8749. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestDeprecatedMessage)
  8750. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  8751. } else {
  8752. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestDeprecatedMessage)
  8753. MergeFrom(*source);
  8754. }
  8755. }
  8756. void TestDeprecatedMessage::MergeFrom(const TestDeprecatedMessage& from) {
  8757. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestDeprecatedMessage)
  8758. GOOGLE_DCHECK_NE(&from, this);
  8759. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8760. ::google::protobuf::uint32 cached_has_bits = 0;
  8761. (void) cached_has_bits;
  8762. }
  8763. void TestDeprecatedMessage::CopyFrom(const ::google::protobuf::Message& from) {
  8764. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestDeprecatedMessage)
  8765. if (&from == this) return;
  8766. Clear();
  8767. MergeFrom(from);
  8768. }
  8769. void TestDeprecatedMessage::CopyFrom(const TestDeprecatedMessage& from) {
  8770. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDeprecatedMessage)
  8771. if (&from == this) return;
  8772. Clear();
  8773. MergeFrom(from);
  8774. }
  8775. bool TestDeprecatedMessage::IsInitialized() const {
  8776. return true;
  8777. }
  8778. void TestDeprecatedMessage::Swap(TestDeprecatedMessage* other) {
  8779. if (other == this) return;
  8780. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  8781. InternalSwap(other);
  8782. } else {
  8783. TestDeprecatedMessage* temp = New(GetArenaNoVirtual());
  8784. temp->MergeFrom(*other);
  8785. other->CopyFrom(*this);
  8786. InternalSwap(temp);
  8787. if (GetArenaNoVirtual() == NULL) {
  8788. delete temp;
  8789. }
  8790. }
  8791. }
  8792. void TestDeprecatedMessage::UnsafeArenaSwap(TestDeprecatedMessage* other) {
  8793. if (other == this) return;
  8794. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  8795. InternalSwap(other);
  8796. }
  8797. void TestDeprecatedMessage::InternalSwap(TestDeprecatedMessage* other) {
  8798. using std::swap;
  8799. swap(_has_bits_[0], other->_has_bits_[0]);
  8800. _internal_metadata_.Swap(&other->_internal_metadata_);
  8801. }
  8802. ::google::protobuf::Metadata TestDeprecatedMessage::GetMetadata() const {
  8803. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  8804. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  8805. }
  8806. // ===================================================================
  8807. void ForeignMessage::InitAsDefaultInstance() {
  8808. }
  8809. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  8810. const int ForeignMessage::kCFieldNumber;
  8811. const int ForeignMessage::kDFieldNumber;
  8812. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  8813. ForeignMessage::ForeignMessage()
  8814. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  8815. ::google::protobuf::internal::InitSCC(
  8816. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base);
  8817. SharedCtor();
  8818. // @@protoc_insertion_point(constructor:protobuf_unittest.ForeignMessage)
  8819. }
  8820. ForeignMessage::ForeignMessage(::google::protobuf::Arena* arena)
  8821. : ::google::protobuf::Message(),
  8822. _internal_metadata_(arena) {
  8823. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base);
  8824. SharedCtor();
  8825. RegisterArenaDtor(arena);
  8826. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.ForeignMessage)
  8827. }
  8828. ForeignMessage::ForeignMessage(const ForeignMessage& from)
  8829. : ::google::protobuf::Message(),
  8830. _internal_metadata_(NULL),
  8831. _has_bits_(from._has_bits_) {
  8832. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8833. ::memcpy(&c_, &from.c_,
  8834. static_cast<size_t>(reinterpret_cast<char*>(&d_) -
  8835. reinterpret_cast<char*>(&c_)) + sizeof(d_));
  8836. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.ForeignMessage)
  8837. }
  8838. void ForeignMessage::SharedCtor() {
  8839. ::memset(&c_, 0, static_cast<size_t>(
  8840. reinterpret_cast<char*>(&d_) -
  8841. reinterpret_cast<char*>(&c_)) + sizeof(d_));
  8842. }
  8843. ForeignMessage::~ForeignMessage() {
  8844. // @@protoc_insertion_point(destructor:protobuf_unittest.ForeignMessage)
  8845. SharedDtor();
  8846. }
  8847. void ForeignMessage::SharedDtor() {
  8848. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  8849. }
  8850. void ForeignMessage::ArenaDtor(void* object) {
  8851. ForeignMessage* _this = reinterpret_cast< ForeignMessage* >(object);
  8852. (void)_this;
  8853. }
  8854. void ForeignMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  8855. }
  8856. void ForeignMessage::SetCachedSize(int size) const {
  8857. _cached_size_.Set(size);
  8858. }
  8859. const ::google::protobuf::Descriptor* ForeignMessage::descriptor() {
  8860. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  8861. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  8862. }
  8863. const ForeignMessage& ForeignMessage::default_instance() {
  8864. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_ForeignMessage.base);
  8865. return *internal_default_instance();
  8866. }
  8867. void ForeignMessage::Clear() {
  8868. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.ForeignMessage)
  8869. ::google::protobuf::uint32 cached_has_bits = 0;
  8870. // Prevent compiler warnings about cached_has_bits being unused
  8871. (void) cached_has_bits;
  8872. cached_has_bits = _has_bits_[0];
  8873. if (cached_has_bits & 3u) {
  8874. ::memset(&c_, 0, static_cast<size_t>(
  8875. reinterpret_cast<char*>(&d_) -
  8876. reinterpret_cast<char*>(&c_)) + sizeof(d_));
  8877. }
  8878. _has_bits_.Clear();
  8879. _internal_metadata_.Clear();
  8880. }
  8881. bool ForeignMessage::MergePartialFromCodedStream(
  8882. ::google::protobuf::io::CodedInputStream* input) {
  8883. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  8884. ::google::protobuf::uint32 tag;
  8885. // @@protoc_insertion_point(parse_start:protobuf_unittest.ForeignMessage)
  8886. for (;;) {
  8887. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  8888. tag = p.first;
  8889. if (!p.second) goto handle_unusual;
  8890. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  8891. // optional int32 c = 1;
  8892. case 1: {
  8893. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8894. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  8895. set_has_c();
  8896. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  8897. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  8898. input, &c_)));
  8899. } else {
  8900. goto handle_unusual;
  8901. }
  8902. break;
  8903. }
  8904. // optional int32 d = 2;
  8905. case 2: {
  8906. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8907. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  8908. set_has_d();
  8909. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  8910. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  8911. input, &d_)));
  8912. } else {
  8913. goto handle_unusual;
  8914. }
  8915. break;
  8916. }
  8917. default: {
  8918. handle_unusual:
  8919. if (tag == 0) {
  8920. goto success;
  8921. }
  8922. DO_(::google::protobuf::internal::WireFormat::SkipField(
  8923. input, tag, _internal_metadata_.mutable_unknown_fields()));
  8924. break;
  8925. }
  8926. }
  8927. }
  8928. success:
  8929. // @@protoc_insertion_point(parse_success:protobuf_unittest.ForeignMessage)
  8930. return true;
  8931. failure:
  8932. // @@protoc_insertion_point(parse_failure:protobuf_unittest.ForeignMessage)
  8933. return false;
  8934. #undef DO_
  8935. }
  8936. void ForeignMessage::SerializeWithCachedSizes(
  8937. ::google::protobuf::io::CodedOutputStream* output) const {
  8938. // @@protoc_insertion_point(serialize_start:protobuf_unittest.ForeignMessage)
  8939. ::google::protobuf::uint32 cached_has_bits = 0;
  8940. (void) cached_has_bits;
  8941. cached_has_bits = _has_bits_[0];
  8942. // optional int32 c = 1;
  8943. if (cached_has_bits & 0x00000001u) {
  8944. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->c(), output);
  8945. }
  8946. // optional int32 d = 2;
  8947. if (cached_has_bits & 0x00000002u) {
  8948. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->d(), output);
  8949. }
  8950. if (_internal_metadata_.have_unknown_fields()) {
  8951. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  8952. _internal_metadata_.unknown_fields(), output);
  8953. }
  8954. // @@protoc_insertion_point(serialize_end:protobuf_unittest.ForeignMessage)
  8955. }
  8956. ::google::protobuf::uint8* ForeignMessage::InternalSerializeWithCachedSizesToArray(
  8957. bool deterministic, ::google::protobuf::uint8* target) const {
  8958. (void)deterministic; // Unused
  8959. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.ForeignMessage)
  8960. ::google::protobuf::uint32 cached_has_bits = 0;
  8961. (void) cached_has_bits;
  8962. cached_has_bits = _has_bits_[0];
  8963. // optional int32 c = 1;
  8964. if (cached_has_bits & 0x00000001u) {
  8965. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->c(), target);
  8966. }
  8967. // optional int32 d = 2;
  8968. if (cached_has_bits & 0x00000002u) {
  8969. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->d(), target);
  8970. }
  8971. if (_internal_metadata_.have_unknown_fields()) {
  8972. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  8973. _internal_metadata_.unknown_fields(), target);
  8974. }
  8975. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.ForeignMessage)
  8976. return target;
  8977. }
  8978. size_t ForeignMessage::ByteSizeLong() const {
  8979. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.ForeignMessage)
  8980. size_t total_size = 0;
  8981. if (_internal_metadata_.have_unknown_fields()) {
  8982. total_size +=
  8983. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  8984. _internal_metadata_.unknown_fields());
  8985. }
  8986. if (_has_bits_[0 / 32] & 3u) {
  8987. // optional int32 c = 1;
  8988. if (has_c()) {
  8989. total_size += 1 +
  8990. ::google::protobuf::internal::WireFormatLite::Int32Size(
  8991. this->c());
  8992. }
  8993. // optional int32 d = 2;
  8994. if (has_d()) {
  8995. total_size += 1 +
  8996. ::google::protobuf::internal::WireFormatLite::Int32Size(
  8997. this->d());
  8998. }
  8999. }
  9000. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  9001. SetCachedSize(cached_size);
  9002. return total_size;
  9003. }
  9004. void ForeignMessage::MergeFrom(const ::google::protobuf::Message& from) {
  9005. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.ForeignMessage)
  9006. GOOGLE_DCHECK_NE(&from, this);
  9007. const ForeignMessage* source =
  9008. ::google::protobuf::internal::DynamicCastToGenerated<const ForeignMessage>(
  9009. &from);
  9010. if (source == NULL) {
  9011. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.ForeignMessage)
  9012. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  9013. } else {
  9014. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.ForeignMessage)
  9015. MergeFrom(*source);
  9016. }
  9017. }
  9018. void ForeignMessage::MergeFrom(const ForeignMessage& from) {
  9019. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.ForeignMessage)
  9020. GOOGLE_DCHECK_NE(&from, this);
  9021. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9022. ::google::protobuf::uint32 cached_has_bits = 0;
  9023. (void) cached_has_bits;
  9024. cached_has_bits = from._has_bits_[0];
  9025. if (cached_has_bits & 3u) {
  9026. if (cached_has_bits & 0x00000001u) {
  9027. c_ = from.c_;
  9028. }
  9029. if (cached_has_bits & 0x00000002u) {
  9030. d_ = from.d_;
  9031. }
  9032. _has_bits_[0] |= cached_has_bits;
  9033. }
  9034. }
  9035. void ForeignMessage::CopyFrom(const ::google::protobuf::Message& from) {
  9036. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.ForeignMessage)
  9037. if (&from == this) return;
  9038. Clear();
  9039. MergeFrom(from);
  9040. }
  9041. void ForeignMessage::CopyFrom(const ForeignMessage& from) {
  9042. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.ForeignMessage)
  9043. if (&from == this) return;
  9044. Clear();
  9045. MergeFrom(from);
  9046. }
  9047. bool ForeignMessage::IsInitialized() const {
  9048. return true;
  9049. }
  9050. void ForeignMessage::Swap(ForeignMessage* other) {
  9051. if (other == this) return;
  9052. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  9053. InternalSwap(other);
  9054. } else {
  9055. ForeignMessage* temp = New(GetArenaNoVirtual());
  9056. temp->MergeFrom(*other);
  9057. other->CopyFrom(*this);
  9058. InternalSwap(temp);
  9059. if (GetArenaNoVirtual() == NULL) {
  9060. delete temp;
  9061. }
  9062. }
  9063. }
  9064. void ForeignMessage::UnsafeArenaSwap(ForeignMessage* other) {
  9065. if (other == this) return;
  9066. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  9067. InternalSwap(other);
  9068. }
  9069. void ForeignMessage::InternalSwap(ForeignMessage* other) {
  9070. using std::swap;
  9071. swap(c_, other->c_);
  9072. swap(d_, other->d_);
  9073. swap(_has_bits_[0], other->_has_bits_[0]);
  9074. _internal_metadata_.Swap(&other->_internal_metadata_);
  9075. }
  9076. ::google::protobuf::Metadata ForeignMessage::GetMetadata() const {
  9077. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  9078. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  9079. }
  9080. // ===================================================================
  9081. void TestReservedFields::InitAsDefaultInstance() {
  9082. }
  9083. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  9084. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9085. TestReservedFields::TestReservedFields()
  9086. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  9087. ::google::protobuf::internal::InitSCC(
  9088. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestReservedFields.base);
  9089. SharedCtor();
  9090. // @@protoc_insertion_point(constructor:protobuf_unittest.TestReservedFields)
  9091. }
  9092. TestReservedFields::TestReservedFields(::google::protobuf::Arena* arena)
  9093. : ::google::protobuf::Message(),
  9094. _internal_metadata_(arena) {
  9095. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestReservedFields.base);
  9096. SharedCtor();
  9097. RegisterArenaDtor(arena);
  9098. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestReservedFields)
  9099. }
  9100. TestReservedFields::TestReservedFields(const TestReservedFields& from)
  9101. : ::google::protobuf::Message(),
  9102. _internal_metadata_(NULL),
  9103. _has_bits_(from._has_bits_) {
  9104. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9105. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestReservedFields)
  9106. }
  9107. void TestReservedFields::SharedCtor() {
  9108. }
  9109. TestReservedFields::~TestReservedFields() {
  9110. // @@protoc_insertion_point(destructor:protobuf_unittest.TestReservedFields)
  9111. SharedDtor();
  9112. }
  9113. void TestReservedFields::SharedDtor() {
  9114. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  9115. }
  9116. void TestReservedFields::ArenaDtor(void* object) {
  9117. TestReservedFields* _this = reinterpret_cast< TestReservedFields* >(object);
  9118. (void)_this;
  9119. }
  9120. void TestReservedFields::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  9121. }
  9122. void TestReservedFields::SetCachedSize(int size) const {
  9123. _cached_size_.Set(size);
  9124. }
  9125. const ::google::protobuf::Descriptor* TestReservedFields::descriptor() {
  9126. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  9127. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  9128. }
  9129. const TestReservedFields& TestReservedFields::default_instance() {
  9130. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestReservedFields.base);
  9131. return *internal_default_instance();
  9132. }
  9133. void TestReservedFields::Clear() {
  9134. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestReservedFields)
  9135. ::google::protobuf::uint32 cached_has_bits = 0;
  9136. // Prevent compiler warnings about cached_has_bits being unused
  9137. (void) cached_has_bits;
  9138. _has_bits_.Clear();
  9139. _internal_metadata_.Clear();
  9140. }
  9141. bool TestReservedFields::MergePartialFromCodedStream(
  9142. ::google::protobuf::io::CodedInputStream* input) {
  9143. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9144. ::google::protobuf::uint32 tag;
  9145. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestReservedFields)
  9146. for (;;) {
  9147. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  9148. tag = p.first;
  9149. if (!p.second) goto handle_unusual;
  9150. handle_unusual:
  9151. if (tag == 0) {
  9152. goto success;
  9153. }
  9154. DO_(::google::protobuf::internal::WireFormat::SkipField(
  9155. input, tag, _internal_metadata_.mutable_unknown_fields()));
  9156. }
  9157. success:
  9158. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestReservedFields)
  9159. return true;
  9160. failure:
  9161. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestReservedFields)
  9162. return false;
  9163. #undef DO_
  9164. }
  9165. void TestReservedFields::SerializeWithCachedSizes(
  9166. ::google::protobuf::io::CodedOutputStream* output) const {
  9167. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestReservedFields)
  9168. ::google::protobuf::uint32 cached_has_bits = 0;
  9169. (void) cached_has_bits;
  9170. if (_internal_metadata_.have_unknown_fields()) {
  9171. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  9172. _internal_metadata_.unknown_fields(), output);
  9173. }
  9174. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestReservedFields)
  9175. }
  9176. ::google::protobuf::uint8* TestReservedFields::InternalSerializeWithCachedSizesToArray(
  9177. bool deterministic, ::google::protobuf::uint8* target) const {
  9178. (void)deterministic; // Unused
  9179. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestReservedFields)
  9180. ::google::protobuf::uint32 cached_has_bits = 0;
  9181. (void) cached_has_bits;
  9182. if (_internal_metadata_.have_unknown_fields()) {
  9183. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  9184. _internal_metadata_.unknown_fields(), target);
  9185. }
  9186. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestReservedFields)
  9187. return target;
  9188. }
  9189. size_t TestReservedFields::ByteSizeLong() const {
  9190. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestReservedFields)
  9191. size_t total_size = 0;
  9192. if (_internal_metadata_.have_unknown_fields()) {
  9193. total_size +=
  9194. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  9195. _internal_metadata_.unknown_fields());
  9196. }
  9197. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  9198. SetCachedSize(cached_size);
  9199. return total_size;
  9200. }
  9201. void TestReservedFields::MergeFrom(const ::google::protobuf::Message& from) {
  9202. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestReservedFields)
  9203. GOOGLE_DCHECK_NE(&from, this);
  9204. const TestReservedFields* source =
  9205. ::google::protobuf::internal::DynamicCastToGenerated<const TestReservedFields>(
  9206. &from);
  9207. if (source == NULL) {
  9208. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestReservedFields)
  9209. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  9210. } else {
  9211. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestReservedFields)
  9212. MergeFrom(*source);
  9213. }
  9214. }
  9215. void TestReservedFields::MergeFrom(const TestReservedFields& from) {
  9216. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestReservedFields)
  9217. GOOGLE_DCHECK_NE(&from, this);
  9218. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9219. ::google::protobuf::uint32 cached_has_bits = 0;
  9220. (void) cached_has_bits;
  9221. }
  9222. void TestReservedFields::CopyFrom(const ::google::protobuf::Message& from) {
  9223. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestReservedFields)
  9224. if (&from == this) return;
  9225. Clear();
  9226. MergeFrom(from);
  9227. }
  9228. void TestReservedFields::CopyFrom(const TestReservedFields& from) {
  9229. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestReservedFields)
  9230. if (&from == this) return;
  9231. Clear();
  9232. MergeFrom(from);
  9233. }
  9234. bool TestReservedFields::IsInitialized() const {
  9235. return true;
  9236. }
  9237. void TestReservedFields::Swap(TestReservedFields* other) {
  9238. if (other == this) return;
  9239. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  9240. InternalSwap(other);
  9241. } else {
  9242. TestReservedFields* temp = New(GetArenaNoVirtual());
  9243. temp->MergeFrom(*other);
  9244. other->CopyFrom(*this);
  9245. InternalSwap(temp);
  9246. if (GetArenaNoVirtual() == NULL) {
  9247. delete temp;
  9248. }
  9249. }
  9250. }
  9251. void TestReservedFields::UnsafeArenaSwap(TestReservedFields* other) {
  9252. if (other == this) return;
  9253. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  9254. InternalSwap(other);
  9255. }
  9256. void TestReservedFields::InternalSwap(TestReservedFields* other) {
  9257. using std::swap;
  9258. swap(_has_bits_[0], other->_has_bits_[0]);
  9259. _internal_metadata_.Swap(&other->_internal_metadata_);
  9260. }
  9261. ::google::protobuf::Metadata TestReservedFields::GetMetadata() const {
  9262. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  9263. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  9264. }
  9265. // ===================================================================
  9266. void TestAllExtensions::InitAsDefaultInstance() {
  9267. }
  9268. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  9269. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9270. TestAllExtensions::TestAllExtensions()
  9271. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  9272. ::google::protobuf::internal::InitSCC(
  9273. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllExtensions.base);
  9274. SharedCtor();
  9275. // @@protoc_insertion_point(constructor:protobuf_unittest.TestAllExtensions)
  9276. }
  9277. TestAllExtensions::TestAllExtensions(::google::protobuf::Arena* arena)
  9278. : ::google::protobuf::Message(),
  9279. _extensions_(arena),
  9280. _internal_metadata_(arena) {
  9281. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllExtensions.base);
  9282. SharedCtor();
  9283. RegisterArenaDtor(arena);
  9284. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestAllExtensions)
  9285. }
  9286. TestAllExtensions::TestAllExtensions(const TestAllExtensions& from)
  9287. : ::google::protobuf::Message(),
  9288. _internal_metadata_(NULL),
  9289. _has_bits_(from._has_bits_) {
  9290. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9291. _extensions_.MergeFrom(from._extensions_);
  9292. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestAllExtensions)
  9293. }
  9294. void TestAllExtensions::SharedCtor() {
  9295. }
  9296. TestAllExtensions::~TestAllExtensions() {
  9297. // @@protoc_insertion_point(destructor:protobuf_unittest.TestAllExtensions)
  9298. SharedDtor();
  9299. }
  9300. void TestAllExtensions::SharedDtor() {
  9301. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  9302. }
  9303. void TestAllExtensions::ArenaDtor(void* object) {
  9304. TestAllExtensions* _this = reinterpret_cast< TestAllExtensions* >(object);
  9305. (void)_this;
  9306. }
  9307. void TestAllExtensions::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  9308. }
  9309. void TestAllExtensions::SetCachedSize(int size) const {
  9310. _cached_size_.Set(size);
  9311. }
  9312. const ::google::protobuf::Descriptor* TestAllExtensions::descriptor() {
  9313. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  9314. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  9315. }
  9316. const TestAllExtensions& TestAllExtensions::default_instance() {
  9317. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestAllExtensions.base);
  9318. return *internal_default_instance();
  9319. }
  9320. void TestAllExtensions::Clear() {
  9321. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestAllExtensions)
  9322. ::google::protobuf::uint32 cached_has_bits = 0;
  9323. // Prevent compiler warnings about cached_has_bits being unused
  9324. (void) cached_has_bits;
  9325. _extensions_.Clear();
  9326. _has_bits_.Clear();
  9327. _internal_metadata_.Clear();
  9328. }
  9329. bool TestAllExtensions::MergePartialFromCodedStream(
  9330. ::google::protobuf::io::CodedInputStream* input) {
  9331. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9332. ::google::protobuf::uint32 tag;
  9333. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestAllExtensions)
  9334. for (;;) {
  9335. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  9336. tag = p.first;
  9337. if (!p.second) goto handle_unusual;
  9338. handle_unusual:
  9339. if (tag == 0) {
  9340. goto success;
  9341. }
  9342. if ((8u <= tag)) {
  9343. DO_(_extensions_.ParseField(tag, input,
  9344. internal_default_instance(),
  9345. _internal_metadata_.mutable_unknown_fields()));
  9346. continue;
  9347. }
  9348. DO_(::google::protobuf::internal::WireFormat::SkipField(
  9349. input, tag, _internal_metadata_.mutable_unknown_fields()));
  9350. }
  9351. success:
  9352. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestAllExtensions)
  9353. return true;
  9354. failure:
  9355. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestAllExtensions)
  9356. return false;
  9357. #undef DO_
  9358. }
  9359. void TestAllExtensions::SerializeWithCachedSizes(
  9360. ::google::protobuf::io::CodedOutputStream* output) const {
  9361. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestAllExtensions)
  9362. ::google::protobuf::uint32 cached_has_bits = 0;
  9363. (void) cached_has_bits;
  9364. // Extension range [1, 536870912)
  9365. _extensions_.SerializeWithCachedSizes(
  9366. 1, 536870912, output);
  9367. if (_internal_metadata_.have_unknown_fields()) {
  9368. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  9369. _internal_metadata_.unknown_fields(), output);
  9370. }
  9371. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestAllExtensions)
  9372. }
  9373. ::google::protobuf::uint8* TestAllExtensions::InternalSerializeWithCachedSizesToArray(
  9374. bool deterministic, ::google::protobuf::uint8* target) const {
  9375. (void)deterministic; // Unused
  9376. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestAllExtensions)
  9377. ::google::protobuf::uint32 cached_has_bits = 0;
  9378. (void) cached_has_bits;
  9379. // Extension range [1, 536870912)
  9380. target = _extensions_.InternalSerializeWithCachedSizesToArray(
  9381. 1, 536870912, deterministic, target);
  9382. if (_internal_metadata_.have_unknown_fields()) {
  9383. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  9384. _internal_metadata_.unknown_fields(), target);
  9385. }
  9386. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestAllExtensions)
  9387. return target;
  9388. }
  9389. size_t TestAllExtensions::ByteSizeLong() const {
  9390. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestAllExtensions)
  9391. size_t total_size = 0;
  9392. total_size += _extensions_.ByteSize();
  9393. if (_internal_metadata_.have_unknown_fields()) {
  9394. total_size +=
  9395. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  9396. _internal_metadata_.unknown_fields());
  9397. }
  9398. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  9399. SetCachedSize(cached_size);
  9400. return total_size;
  9401. }
  9402. void TestAllExtensions::MergeFrom(const ::google::protobuf::Message& from) {
  9403. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestAllExtensions)
  9404. GOOGLE_DCHECK_NE(&from, this);
  9405. const TestAllExtensions* source =
  9406. ::google::protobuf::internal::DynamicCastToGenerated<const TestAllExtensions>(
  9407. &from);
  9408. if (source == NULL) {
  9409. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestAllExtensions)
  9410. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  9411. } else {
  9412. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestAllExtensions)
  9413. MergeFrom(*source);
  9414. }
  9415. }
  9416. void TestAllExtensions::MergeFrom(const TestAllExtensions& from) {
  9417. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestAllExtensions)
  9418. GOOGLE_DCHECK_NE(&from, this);
  9419. _extensions_.MergeFrom(from._extensions_);
  9420. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9421. ::google::protobuf::uint32 cached_has_bits = 0;
  9422. (void) cached_has_bits;
  9423. }
  9424. void TestAllExtensions::CopyFrom(const ::google::protobuf::Message& from) {
  9425. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestAllExtensions)
  9426. if (&from == this) return;
  9427. Clear();
  9428. MergeFrom(from);
  9429. }
  9430. void TestAllExtensions::CopyFrom(const TestAllExtensions& from) {
  9431. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestAllExtensions)
  9432. if (&from == this) return;
  9433. Clear();
  9434. MergeFrom(from);
  9435. }
  9436. bool TestAllExtensions::IsInitialized() const {
  9437. if (!_extensions_.IsInitialized()) {
  9438. return false;
  9439. }
  9440. return true;
  9441. }
  9442. void TestAllExtensions::Swap(TestAllExtensions* other) {
  9443. if (other == this) return;
  9444. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  9445. InternalSwap(other);
  9446. } else {
  9447. TestAllExtensions* temp = New(GetArenaNoVirtual());
  9448. temp->MergeFrom(*other);
  9449. other->CopyFrom(*this);
  9450. InternalSwap(temp);
  9451. if (GetArenaNoVirtual() == NULL) {
  9452. delete temp;
  9453. }
  9454. }
  9455. }
  9456. void TestAllExtensions::UnsafeArenaSwap(TestAllExtensions* other) {
  9457. if (other == this) return;
  9458. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  9459. InternalSwap(other);
  9460. }
  9461. void TestAllExtensions::InternalSwap(TestAllExtensions* other) {
  9462. using std::swap;
  9463. swap(_has_bits_[0], other->_has_bits_[0]);
  9464. _internal_metadata_.Swap(&other->_internal_metadata_);
  9465. _extensions_.Swap(&other->_extensions_);
  9466. }
  9467. ::google::protobuf::Metadata TestAllExtensions::GetMetadata() const {
  9468. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  9469. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  9470. }
  9471. // ===================================================================
  9472. void OptionalGroup_extension::InitAsDefaultInstance() {
  9473. }
  9474. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  9475. const int OptionalGroup_extension::kAFieldNumber;
  9476. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9477. OptionalGroup_extension::OptionalGroup_extension()
  9478. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  9479. ::google::protobuf::internal::InitSCC(
  9480. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OptionalGroup_extension.base);
  9481. SharedCtor();
  9482. // @@protoc_insertion_point(constructor:protobuf_unittest.OptionalGroup_extension)
  9483. }
  9484. OptionalGroup_extension::OptionalGroup_extension(::google::protobuf::Arena* arena)
  9485. : ::google::protobuf::Message(),
  9486. _internal_metadata_(arena) {
  9487. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OptionalGroup_extension.base);
  9488. SharedCtor();
  9489. RegisterArenaDtor(arena);
  9490. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.OptionalGroup_extension)
  9491. }
  9492. OptionalGroup_extension::OptionalGroup_extension(const OptionalGroup_extension& from)
  9493. : ::google::protobuf::Message(),
  9494. _internal_metadata_(NULL),
  9495. _has_bits_(from._has_bits_) {
  9496. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9497. a_ = from.a_;
  9498. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.OptionalGroup_extension)
  9499. }
  9500. void OptionalGroup_extension::SharedCtor() {
  9501. a_ = 0;
  9502. }
  9503. OptionalGroup_extension::~OptionalGroup_extension() {
  9504. // @@protoc_insertion_point(destructor:protobuf_unittest.OptionalGroup_extension)
  9505. SharedDtor();
  9506. }
  9507. void OptionalGroup_extension::SharedDtor() {
  9508. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  9509. }
  9510. void OptionalGroup_extension::ArenaDtor(void* object) {
  9511. OptionalGroup_extension* _this = reinterpret_cast< OptionalGroup_extension* >(object);
  9512. (void)_this;
  9513. }
  9514. void OptionalGroup_extension::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  9515. }
  9516. void OptionalGroup_extension::SetCachedSize(int size) const {
  9517. _cached_size_.Set(size);
  9518. }
  9519. const ::google::protobuf::Descriptor* OptionalGroup_extension::descriptor() {
  9520. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  9521. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  9522. }
  9523. const OptionalGroup_extension& OptionalGroup_extension::default_instance() {
  9524. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OptionalGroup_extension.base);
  9525. return *internal_default_instance();
  9526. }
  9527. void OptionalGroup_extension::Clear() {
  9528. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.OptionalGroup_extension)
  9529. ::google::protobuf::uint32 cached_has_bits = 0;
  9530. // Prevent compiler warnings about cached_has_bits being unused
  9531. (void) cached_has_bits;
  9532. a_ = 0;
  9533. _has_bits_.Clear();
  9534. _internal_metadata_.Clear();
  9535. }
  9536. bool OptionalGroup_extension::MergePartialFromCodedStream(
  9537. ::google::protobuf::io::CodedInputStream* input) {
  9538. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9539. ::google::protobuf::uint32 tag;
  9540. // @@protoc_insertion_point(parse_start:protobuf_unittest.OptionalGroup_extension)
  9541. for (;;) {
  9542. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  9543. tag = p.first;
  9544. if (!p.second) goto handle_unusual;
  9545. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9546. // optional int32 a = 17;
  9547. case 17: {
  9548. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9549. static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
  9550. set_has_a();
  9551. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  9552. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  9553. input, &a_)));
  9554. } else {
  9555. goto handle_unusual;
  9556. }
  9557. break;
  9558. }
  9559. default: {
  9560. handle_unusual:
  9561. if (tag == 0 ||
  9562. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  9563. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  9564. input->SetLastTag(tag);
  9565. goto success;
  9566. }
  9567. DO_(::google::protobuf::internal::WireFormat::SkipField(
  9568. input, tag, _internal_metadata_.mutable_unknown_fields()));
  9569. break;
  9570. }
  9571. }
  9572. }
  9573. success:
  9574. // @@protoc_insertion_point(parse_success:protobuf_unittest.OptionalGroup_extension)
  9575. return true;
  9576. failure:
  9577. // @@protoc_insertion_point(parse_failure:protobuf_unittest.OptionalGroup_extension)
  9578. return false;
  9579. #undef DO_
  9580. }
  9581. void OptionalGroup_extension::SerializeWithCachedSizes(
  9582. ::google::protobuf::io::CodedOutputStream* output) const {
  9583. // @@protoc_insertion_point(serialize_start:protobuf_unittest.OptionalGroup_extension)
  9584. ::google::protobuf::uint32 cached_has_bits = 0;
  9585. (void) cached_has_bits;
  9586. cached_has_bits = _has_bits_[0];
  9587. // optional int32 a = 17;
  9588. if (cached_has_bits & 0x00000001u) {
  9589. ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->a(), output);
  9590. }
  9591. if (_internal_metadata_.have_unknown_fields()) {
  9592. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  9593. _internal_metadata_.unknown_fields(), output);
  9594. }
  9595. // @@protoc_insertion_point(serialize_end:protobuf_unittest.OptionalGroup_extension)
  9596. }
  9597. ::google::protobuf::uint8* OptionalGroup_extension::InternalSerializeWithCachedSizesToArray(
  9598. bool deterministic, ::google::protobuf::uint8* target) const {
  9599. (void)deterministic; // Unused
  9600. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.OptionalGroup_extension)
  9601. ::google::protobuf::uint32 cached_has_bits = 0;
  9602. (void) cached_has_bits;
  9603. cached_has_bits = _has_bits_[0];
  9604. // optional int32 a = 17;
  9605. if (cached_has_bits & 0x00000001u) {
  9606. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(17, this->a(), target);
  9607. }
  9608. if (_internal_metadata_.have_unknown_fields()) {
  9609. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  9610. _internal_metadata_.unknown_fields(), target);
  9611. }
  9612. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.OptionalGroup_extension)
  9613. return target;
  9614. }
  9615. size_t OptionalGroup_extension::ByteSizeLong() const {
  9616. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.OptionalGroup_extension)
  9617. size_t total_size = 0;
  9618. if (_internal_metadata_.have_unknown_fields()) {
  9619. total_size +=
  9620. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  9621. _internal_metadata_.unknown_fields());
  9622. }
  9623. // optional int32 a = 17;
  9624. if (has_a()) {
  9625. total_size += 2 +
  9626. ::google::protobuf::internal::WireFormatLite::Int32Size(
  9627. this->a());
  9628. }
  9629. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  9630. SetCachedSize(cached_size);
  9631. return total_size;
  9632. }
  9633. void OptionalGroup_extension::MergeFrom(const ::google::protobuf::Message& from) {
  9634. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.OptionalGroup_extension)
  9635. GOOGLE_DCHECK_NE(&from, this);
  9636. const OptionalGroup_extension* source =
  9637. ::google::protobuf::internal::DynamicCastToGenerated<const OptionalGroup_extension>(
  9638. &from);
  9639. if (source == NULL) {
  9640. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.OptionalGroup_extension)
  9641. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  9642. } else {
  9643. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.OptionalGroup_extension)
  9644. MergeFrom(*source);
  9645. }
  9646. }
  9647. void OptionalGroup_extension::MergeFrom(const OptionalGroup_extension& from) {
  9648. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.OptionalGroup_extension)
  9649. GOOGLE_DCHECK_NE(&from, this);
  9650. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9651. ::google::protobuf::uint32 cached_has_bits = 0;
  9652. (void) cached_has_bits;
  9653. if (from.has_a()) {
  9654. set_a(from.a());
  9655. }
  9656. }
  9657. void OptionalGroup_extension::CopyFrom(const ::google::protobuf::Message& from) {
  9658. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.OptionalGroup_extension)
  9659. if (&from == this) return;
  9660. Clear();
  9661. MergeFrom(from);
  9662. }
  9663. void OptionalGroup_extension::CopyFrom(const OptionalGroup_extension& from) {
  9664. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.OptionalGroup_extension)
  9665. if (&from == this) return;
  9666. Clear();
  9667. MergeFrom(from);
  9668. }
  9669. bool OptionalGroup_extension::IsInitialized() const {
  9670. return true;
  9671. }
  9672. void OptionalGroup_extension::Swap(OptionalGroup_extension* other) {
  9673. if (other == this) return;
  9674. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  9675. InternalSwap(other);
  9676. } else {
  9677. OptionalGroup_extension* temp = New(GetArenaNoVirtual());
  9678. temp->MergeFrom(*other);
  9679. other->CopyFrom(*this);
  9680. InternalSwap(temp);
  9681. if (GetArenaNoVirtual() == NULL) {
  9682. delete temp;
  9683. }
  9684. }
  9685. }
  9686. void OptionalGroup_extension::UnsafeArenaSwap(OptionalGroup_extension* other) {
  9687. if (other == this) return;
  9688. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  9689. InternalSwap(other);
  9690. }
  9691. void OptionalGroup_extension::InternalSwap(OptionalGroup_extension* other) {
  9692. using std::swap;
  9693. swap(a_, other->a_);
  9694. swap(_has_bits_[0], other->_has_bits_[0]);
  9695. _internal_metadata_.Swap(&other->_internal_metadata_);
  9696. }
  9697. ::google::protobuf::Metadata OptionalGroup_extension::GetMetadata() const {
  9698. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  9699. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  9700. }
  9701. // ===================================================================
  9702. void RepeatedGroup_extension::InitAsDefaultInstance() {
  9703. }
  9704. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  9705. const int RepeatedGroup_extension::kAFieldNumber;
  9706. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9707. RepeatedGroup_extension::RepeatedGroup_extension()
  9708. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  9709. ::google::protobuf::internal::InitSCC(
  9710. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_RepeatedGroup_extension.base);
  9711. SharedCtor();
  9712. // @@protoc_insertion_point(constructor:protobuf_unittest.RepeatedGroup_extension)
  9713. }
  9714. RepeatedGroup_extension::RepeatedGroup_extension(::google::protobuf::Arena* arena)
  9715. : ::google::protobuf::Message(),
  9716. _internal_metadata_(arena) {
  9717. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_RepeatedGroup_extension.base);
  9718. SharedCtor();
  9719. RegisterArenaDtor(arena);
  9720. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.RepeatedGroup_extension)
  9721. }
  9722. RepeatedGroup_extension::RepeatedGroup_extension(const RepeatedGroup_extension& from)
  9723. : ::google::protobuf::Message(),
  9724. _internal_metadata_(NULL),
  9725. _has_bits_(from._has_bits_) {
  9726. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9727. a_ = from.a_;
  9728. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.RepeatedGroup_extension)
  9729. }
  9730. void RepeatedGroup_extension::SharedCtor() {
  9731. a_ = 0;
  9732. }
  9733. RepeatedGroup_extension::~RepeatedGroup_extension() {
  9734. // @@protoc_insertion_point(destructor:protobuf_unittest.RepeatedGroup_extension)
  9735. SharedDtor();
  9736. }
  9737. void RepeatedGroup_extension::SharedDtor() {
  9738. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  9739. }
  9740. void RepeatedGroup_extension::ArenaDtor(void* object) {
  9741. RepeatedGroup_extension* _this = reinterpret_cast< RepeatedGroup_extension* >(object);
  9742. (void)_this;
  9743. }
  9744. void RepeatedGroup_extension::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  9745. }
  9746. void RepeatedGroup_extension::SetCachedSize(int size) const {
  9747. _cached_size_.Set(size);
  9748. }
  9749. const ::google::protobuf::Descriptor* RepeatedGroup_extension::descriptor() {
  9750. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  9751. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  9752. }
  9753. const RepeatedGroup_extension& RepeatedGroup_extension::default_instance() {
  9754. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_RepeatedGroup_extension.base);
  9755. return *internal_default_instance();
  9756. }
  9757. void RepeatedGroup_extension::Clear() {
  9758. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.RepeatedGroup_extension)
  9759. ::google::protobuf::uint32 cached_has_bits = 0;
  9760. // Prevent compiler warnings about cached_has_bits being unused
  9761. (void) cached_has_bits;
  9762. a_ = 0;
  9763. _has_bits_.Clear();
  9764. _internal_metadata_.Clear();
  9765. }
  9766. bool RepeatedGroup_extension::MergePartialFromCodedStream(
  9767. ::google::protobuf::io::CodedInputStream* input) {
  9768. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9769. ::google::protobuf::uint32 tag;
  9770. // @@protoc_insertion_point(parse_start:protobuf_unittest.RepeatedGroup_extension)
  9771. for (;;) {
  9772. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  9773. tag = p.first;
  9774. if (!p.second) goto handle_unusual;
  9775. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9776. // optional int32 a = 47;
  9777. case 47: {
  9778. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9779. static_cast< ::google::protobuf::uint8>(120u /* 376 & 0xFF */)) {
  9780. set_has_a();
  9781. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  9782. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  9783. input, &a_)));
  9784. } else {
  9785. goto handle_unusual;
  9786. }
  9787. break;
  9788. }
  9789. default: {
  9790. handle_unusual:
  9791. if (tag == 0 ||
  9792. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  9793. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  9794. input->SetLastTag(tag);
  9795. goto success;
  9796. }
  9797. DO_(::google::protobuf::internal::WireFormat::SkipField(
  9798. input, tag, _internal_metadata_.mutable_unknown_fields()));
  9799. break;
  9800. }
  9801. }
  9802. }
  9803. success:
  9804. // @@protoc_insertion_point(parse_success:protobuf_unittest.RepeatedGroup_extension)
  9805. return true;
  9806. failure:
  9807. // @@protoc_insertion_point(parse_failure:protobuf_unittest.RepeatedGroup_extension)
  9808. return false;
  9809. #undef DO_
  9810. }
  9811. void RepeatedGroup_extension::SerializeWithCachedSizes(
  9812. ::google::protobuf::io::CodedOutputStream* output) const {
  9813. // @@protoc_insertion_point(serialize_start:protobuf_unittest.RepeatedGroup_extension)
  9814. ::google::protobuf::uint32 cached_has_bits = 0;
  9815. (void) cached_has_bits;
  9816. cached_has_bits = _has_bits_[0];
  9817. // optional int32 a = 47;
  9818. if (cached_has_bits & 0x00000001u) {
  9819. ::google::protobuf::internal::WireFormatLite::WriteInt32(47, this->a(), output);
  9820. }
  9821. if (_internal_metadata_.have_unknown_fields()) {
  9822. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  9823. _internal_metadata_.unknown_fields(), output);
  9824. }
  9825. // @@protoc_insertion_point(serialize_end:protobuf_unittest.RepeatedGroup_extension)
  9826. }
  9827. ::google::protobuf::uint8* RepeatedGroup_extension::InternalSerializeWithCachedSizesToArray(
  9828. bool deterministic, ::google::protobuf::uint8* target) const {
  9829. (void)deterministic; // Unused
  9830. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.RepeatedGroup_extension)
  9831. ::google::protobuf::uint32 cached_has_bits = 0;
  9832. (void) cached_has_bits;
  9833. cached_has_bits = _has_bits_[0];
  9834. // optional int32 a = 47;
  9835. if (cached_has_bits & 0x00000001u) {
  9836. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(47, this->a(), target);
  9837. }
  9838. if (_internal_metadata_.have_unknown_fields()) {
  9839. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  9840. _internal_metadata_.unknown_fields(), target);
  9841. }
  9842. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.RepeatedGroup_extension)
  9843. return target;
  9844. }
  9845. size_t RepeatedGroup_extension::ByteSizeLong() const {
  9846. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.RepeatedGroup_extension)
  9847. size_t total_size = 0;
  9848. if (_internal_metadata_.have_unknown_fields()) {
  9849. total_size +=
  9850. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  9851. _internal_metadata_.unknown_fields());
  9852. }
  9853. // optional int32 a = 47;
  9854. if (has_a()) {
  9855. total_size += 2 +
  9856. ::google::protobuf::internal::WireFormatLite::Int32Size(
  9857. this->a());
  9858. }
  9859. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  9860. SetCachedSize(cached_size);
  9861. return total_size;
  9862. }
  9863. void RepeatedGroup_extension::MergeFrom(const ::google::protobuf::Message& from) {
  9864. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.RepeatedGroup_extension)
  9865. GOOGLE_DCHECK_NE(&from, this);
  9866. const RepeatedGroup_extension* source =
  9867. ::google::protobuf::internal::DynamicCastToGenerated<const RepeatedGroup_extension>(
  9868. &from);
  9869. if (source == NULL) {
  9870. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.RepeatedGroup_extension)
  9871. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  9872. } else {
  9873. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.RepeatedGroup_extension)
  9874. MergeFrom(*source);
  9875. }
  9876. }
  9877. void RepeatedGroup_extension::MergeFrom(const RepeatedGroup_extension& from) {
  9878. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.RepeatedGroup_extension)
  9879. GOOGLE_DCHECK_NE(&from, this);
  9880. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9881. ::google::protobuf::uint32 cached_has_bits = 0;
  9882. (void) cached_has_bits;
  9883. if (from.has_a()) {
  9884. set_a(from.a());
  9885. }
  9886. }
  9887. void RepeatedGroup_extension::CopyFrom(const ::google::protobuf::Message& from) {
  9888. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.RepeatedGroup_extension)
  9889. if (&from == this) return;
  9890. Clear();
  9891. MergeFrom(from);
  9892. }
  9893. void RepeatedGroup_extension::CopyFrom(const RepeatedGroup_extension& from) {
  9894. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.RepeatedGroup_extension)
  9895. if (&from == this) return;
  9896. Clear();
  9897. MergeFrom(from);
  9898. }
  9899. bool RepeatedGroup_extension::IsInitialized() const {
  9900. return true;
  9901. }
  9902. void RepeatedGroup_extension::Swap(RepeatedGroup_extension* other) {
  9903. if (other == this) return;
  9904. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  9905. InternalSwap(other);
  9906. } else {
  9907. RepeatedGroup_extension* temp = New(GetArenaNoVirtual());
  9908. temp->MergeFrom(*other);
  9909. other->CopyFrom(*this);
  9910. InternalSwap(temp);
  9911. if (GetArenaNoVirtual() == NULL) {
  9912. delete temp;
  9913. }
  9914. }
  9915. }
  9916. void RepeatedGroup_extension::UnsafeArenaSwap(RepeatedGroup_extension* other) {
  9917. if (other == this) return;
  9918. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  9919. InternalSwap(other);
  9920. }
  9921. void RepeatedGroup_extension::InternalSwap(RepeatedGroup_extension* other) {
  9922. using std::swap;
  9923. swap(a_, other->a_);
  9924. swap(_has_bits_[0], other->_has_bits_[0]);
  9925. _internal_metadata_.Swap(&other->_internal_metadata_);
  9926. }
  9927. ::google::protobuf::Metadata RepeatedGroup_extension::GetMetadata() const {
  9928. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  9929. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  9930. }
  9931. // ===================================================================
  9932. void TestGroup_OptionalGroup::InitAsDefaultInstance() {
  9933. }
  9934. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  9935. const int TestGroup_OptionalGroup::kAFieldNumber;
  9936. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9937. TestGroup_OptionalGroup::TestGroup_OptionalGroup()
  9938. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  9939. ::google::protobuf::internal::InitSCC(
  9940. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroup_OptionalGroup.base);
  9941. SharedCtor();
  9942. // @@protoc_insertion_point(constructor:protobuf_unittest.TestGroup.OptionalGroup)
  9943. }
  9944. TestGroup_OptionalGroup::TestGroup_OptionalGroup(::google::protobuf::Arena* arena)
  9945. : ::google::protobuf::Message(),
  9946. _internal_metadata_(arena) {
  9947. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroup_OptionalGroup.base);
  9948. SharedCtor();
  9949. RegisterArenaDtor(arena);
  9950. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestGroup.OptionalGroup)
  9951. }
  9952. TestGroup_OptionalGroup::TestGroup_OptionalGroup(const TestGroup_OptionalGroup& from)
  9953. : ::google::protobuf::Message(),
  9954. _internal_metadata_(NULL),
  9955. _has_bits_(from._has_bits_) {
  9956. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9957. a_ = from.a_;
  9958. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestGroup.OptionalGroup)
  9959. }
  9960. void TestGroup_OptionalGroup::SharedCtor() {
  9961. a_ = 0;
  9962. }
  9963. TestGroup_OptionalGroup::~TestGroup_OptionalGroup() {
  9964. // @@protoc_insertion_point(destructor:protobuf_unittest.TestGroup.OptionalGroup)
  9965. SharedDtor();
  9966. }
  9967. void TestGroup_OptionalGroup::SharedDtor() {
  9968. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  9969. }
  9970. void TestGroup_OptionalGroup::ArenaDtor(void* object) {
  9971. TestGroup_OptionalGroup* _this = reinterpret_cast< TestGroup_OptionalGroup* >(object);
  9972. (void)_this;
  9973. }
  9974. void TestGroup_OptionalGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  9975. }
  9976. void TestGroup_OptionalGroup::SetCachedSize(int size) const {
  9977. _cached_size_.Set(size);
  9978. }
  9979. const ::google::protobuf::Descriptor* TestGroup_OptionalGroup::descriptor() {
  9980. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  9981. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  9982. }
  9983. const TestGroup_OptionalGroup& TestGroup_OptionalGroup::default_instance() {
  9984. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroup_OptionalGroup.base);
  9985. return *internal_default_instance();
  9986. }
  9987. void TestGroup_OptionalGroup::Clear() {
  9988. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestGroup.OptionalGroup)
  9989. ::google::protobuf::uint32 cached_has_bits = 0;
  9990. // Prevent compiler warnings about cached_has_bits being unused
  9991. (void) cached_has_bits;
  9992. a_ = 0;
  9993. _has_bits_.Clear();
  9994. _internal_metadata_.Clear();
  9995. }
  9996. bool TestGroup_OptionalGroup::MergePartialFromCodedStream(
  9997. ::google::protobuf::io::CodedInputStream* input) {
  9998. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9999. ::google::protobuf::uint32 tag;
  10000. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestGroup.OptionalGroup)
  10001. for (;;) {
  10002. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  10003. tag = p.first;
  10004. if (!p.second) goto handle_unusual;
  10005. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  10006. // optional int32 a = 17;
  10007. case 17: {
  10008. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10009. static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
  10010. set_has_a();
  10011. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  10012. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  10013. input, &a_)));
  10014. } else {
  10015. goto handle_unusual;
  10016. }
  10017. break;
  10018. }
  10019. default: {
  10020. handle_unusual:
  10021. if (tag == 0 ||
  10022. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  10023. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  10024. input->SetLastTag(tag);
  10025. goto success;
  10026. }
  10027. DO_(::google::protobuf::internal::WireFormat::SkipField(
  10028. input, tag, _internal_metadata_.mutable_unknown_fields()));
  10029. break;
  10030. }
  10031. }
  10032. }
  10033. success:
  10034. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestGroup.OptionalGroup)
  10035. return true;
  10036. failure:
  10037. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestGroup.OptionalGroup)
  10038. return false;
  10039. #undef DO_
  10040. }
  10041. void TestGroup_OptionalGroup::SerializeWithCachedSizes(
  10042. ::google::protobuf::io::CodedOutputStream* output) const {
  10043. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestGroup.OptionalGroup)
  10044. ::google::protobuf::uint32 cached_has_bits = 0;
  10045. (void) cached_has_bits;
  10046. cached_has_bits = _has_bits_[0];
  10047. // optional int32 a = 17;
  10048. if (cached_has_bits & 0x00000001u) {
  10049. ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->a(), output);
  10050. }
  10051. if (_internal_metadata_.have_unknown_fields()) {
  10052. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  10053. _internal_metadata_.unknown_fields(), output);
  10054. }
  10055. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestGroup.OptionalGroup)
  10056. }
  10057. ::google::protobuf::uint8* TestGroup_OptionalGroup::InternalSerializeWithCachedSizesToArray(
  10058. bool deterministic, ::google::protobuf::uint8* target) const {
  10059. (void)deterministic; // Unused
  10060. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestGroup.OptionalGroup)
  10061. ::google::protobuf::uint32 cached_has_bits = 0;
  10062. (void) cached_has_bits;
  10063. cached_has_bits = _has_bits_[0];
  10064. // optional int32 a = 17;
  10065. if (cached_has_bits & 0x00000001u) {
  10066. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(17, this->a(), target);
  10067. }
  10068. if (_internal_metadata_.have_unknown_fields()) {
  10069. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  10070. _internal_metadata_.unknown_fields(), target);
  10071. }
  10072. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestGroup.OptionalGroup)
  10073. return target;
  10074. }
  10075. size_t TestGroup_OptionalGroup::ByteSizeLong() const {
  10076. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestGroup.OptionalGroup)
  10077. size_t total_size = 0;
  10078. if (_internal_metadata_.have_unknown_fields()) {
  10079. total_size +=
  10080. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  10081. _internal_metadata_.unknown_fields());
  10082. }
  10083. // optional int32 a = 17;
  10084. if (has_a()) {
  10085. total_size += 2 +
  10086. ::google::protobuf::internal::WireFormatLite::Int32Size(
  10087. this->a());
  10088. }
  10089. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  10090. SetCachedSize(cached_size);
  10091. return total_size;
  10092. }
  10093. void TestGroup_OptionalGroup::MergeFrom(const ::google::protobuf::Message& from) {
  10094. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestGroup.OptionalGroup)
  10095. GOOGLE_DCHECK_NE(&from, this);
  10096. const TestGroup_OptionalGroup* source =
  10097. ::google::protobuf::internal::DynamicCastToGenerated<const TestGroup_OptionalGroup>(
  10098. &from);
  10099. if (source == NULL) {
  10100. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestGroup.OptionalGroup)
  10101. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  10102. } else {
  10103. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestGroup.OptionalGroup)
  10104. MergeFrom(*source);
  10105. }
  10106. }
  10107. void TestGroup_OptionalGroup::MergeFrom(const TestGroup_OptionalGroup& from) {
  10108. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestGroup.OptionalGroup)
  10109. GOOGLE_DCHECK_NE(&from, this);
  10110. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10111. ::google::protobuf::uint32 cached_has_bits = 0;
  10112. (void) cached_has_bits;
  10113. if (from.has_a()) {
  10114. set_a(from.a());
  10115. }
  10116. }
  10117. void TestGroup_OptionalGroup::CopyFrom(const ::google::protobuf::Message& from) {
  10118. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestGroup.OptionalGroup)
  10119. if (&from == this) return;
  10120. Clear();
  10121. MergeFrom(from);
  10122. }
  10123. void TestGroup_OptionalGroup::CopyFrom(const TestGroup_OptionalGroup& from) {
  10124. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestGroup.OptionalGroup)
  10125. if (&from == this) return;
  10126. Clear();
  10127. MergeFrom(from);
  10128. }
  10129. bool TestGroup_OptionalGroup::IsInitialized() const {
  10130. return true;
  10131. }
  10132. void TestGroup_OptionalGroup::Swap(TestGroup_OptionalGroup* other) {
  10133. if (other == this) return;
  10134. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  10135. InternalSwap(other);
  10136. } else {
  10137. TestGroup_OptionalGroup* temp = New(GetArenaNoVirtual());
  10138. temp->MergeFrom(*other);
  10139. other->CopyFrom(*this);
  10140. InternalSwap(temp);
  10141. if (GetArenaNoVirtual() == NULL) {
  10142. delete temp;
  10143. }
  10144. }
  10145. }
  10146. void TestGroup_OptionalGroup::UnsafeArenaSwap(TestGroup_OptionalGroup* other) {
  10147. if (other == this) return;
  10148. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  10149. InternalSwap(other);
  10150. }
  10151. void TestGroup_OptionalGroup::InternalSwap(TestGroup_OptionalGroup* other) {
  10152. using std::swap;
  10153. swap(a_, other->a_);
  10154. swap(_has_bits_[0], other->_has_bits_[0]);
  10155. _internal_metadata_.Swap(&other->_internal_metadata_);
  10156. }
  10157. ::google::protobuf::Metadata TestGroup_OptionalGroup::GetMetadata() const {
  10158. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  10159. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  10160. }
  10161. // ===================================================================
  10162. void TestGroup::InitAsDefaultInstance() {
  10163. ::protobuf_unittest::_TestGroup_default_instance_._instance.get_mutable()->optionalgroup_ = const_cast< ::protobuf_unittest::TestGroup_OptionalGroup*>(
  10164. ::protobuf_unittest::TestGroup_OptionalGroup::internal_default_instance());
  10165. }
  10166. void TestGroup::unsafe_arena_set_allocated_optionalgroup(
  10167. ::protobuf_unittest::TestGroup_OptionalGroup* optionalgroup) {
  10168. if (GetArenaNoVirtual() == NULL) {
  10169. delete optionalgroup_;
  10170. }
  10171. optionalgroup_ = optionalgroup;
  10172. if (optionalgroup) {
  10173. set_has_optionalgroup();
  10174. } else {
  10175. clear_has_optionalgroup();
  10176. }
  10177. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestGroup.optionalgroup)
  10178. }
  10179. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  10180. const int TestGroup::kOptionalgroupFieldNumber;
  10181. const int TestGroup::kOptionalForeignEnumFieldNumber;
  10182. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  10183. TestGroup::TestGroup()
  10184. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  10185. ::google::protobuf::internal::InitSCC(
  10186. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroup.base);
  10187. SharedCtor();
  10188. // @@protoc_insertion_point(constructor:protobuf_unittest.TestGroup)
  10189. }
  10190. TestGroup::TestGroup(::google::protobuf::Arena* arena)
  10191. : ::google::protobuf::Message(),
  10192. _internal_metadata_(arena) {
  10193. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroup.base);
  10194. SharedCtor();
  10195. RegisterArenaDtor(arena);
  10196. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestGroup)
  10197. }
  10198. TestGroup::TestGroup(const TestGroup& from)
  10199. : ::google::protobuf::Message(),
  10200. _internal_metadata_(NULL),
  10201. _has_bits_(from._has_bits_) {
  10202. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10203. if (from.has_optionalgroup()) {
  10204. optionalgroup_ = new ::protobuf_unittest::TestGroup_OptionalGroup(*from.optionalgroup_);
  10205. } else {
  10206. optionalgroup_ = NULL;
  10207. }
  10208. optional_foreign_enum_ = from.optional_foreign_enum_;
  10209. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestGroup)
  10210. }
  10211. void TestGroup::SharedCtor() {
  10212. optionalgroup_ = NULL;
  10213. optional_foreign_enum_ = 4;
  10214. }
  10215. TestGroup::~TestGroup() {
  10216. // @@protoc_insertion_point(destructor:protobuf_unittest.TestGroup)
  10217. SharedDtor();
  10218. }
  10219. void TestGroup::SharedDtor() {
  10220. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  10221. if (this != internal_default_instance()) delete optionalgroup_;
  10222. }
  10223. void TestGroup::ArenaDtor(void* object) {
  10224. TestGroup* _this = reinterpret_cast< TestGroup* >(object);
  10225. (void)_this;
  10226. }
  10227. void TestGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  10228. }
  10229. void TestGroup::SetCachedSize(int size) const {
  10230. _cached_size_.Set(size);
  10231. }
  10232. const ::google::protobuf::Descriptor* TestGroup::descriptor() {
  10233. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  10234. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  10235. }
  10236. const TestGroup& TestGroup::default_instance() {
  10237. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroup.base);
  10238. return *internal_default_instance();
  10239. }
  10240. void TestGroup::Clear() {
  10241. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestGroup)
  10242. ::google::protobuf::uint32 cached_has_bits = 0;
  10243. // Prevent compiler warnings about cached_has_bits being unused
  10244. (void) cached_has_bits;
  10245. cached_has_bits = _has_bits_[0];
  10246. if (cached_has_bits & 3u) {
  10247. if (cached_has_bits & 0x00000001u) {
  10248. GOOGLE_DCHECK(optionalgroup_ != NULL);
  10249. optionalgroup_->Clear();
  10250. }
  10251. optional_foreign_enum_ = 4;
  10252. }
  10253. _has_bits_.Clear();
  10254. _internal_metadata_.Clear();
  10255. }
  10256. bool TestGroup::MergePartialFromCodedStream(
  10257. ::google::protobuf::io::CodedInputStream* input) {
  10258. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  10259. ::google::protobuf::uint32 tag;
  10260. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestGroup)
  10261. for (;;) {
  10262. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  10263. tag = p.first;
  10264. if (!p.second) goto handle_unusual;
  10265. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  10266. // optional group OptionalGroup = 16 { ... };
  10267. case 16: {
  10268. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10269. static_cast< ::google::protobuf::uint8>(131u /* 131 & 0xFF */)) {
  10270. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
  10271. 16, input, mutable_optionalgroup()));
  10272. } else {
  10273. goto handle_unusual;
  10274. }
  10275. break;
  10276. }
  10277. // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
  10278. case 22: {
  10279. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10280. static_cast< ::google::protobuf::uint8>(176u /* 176 & 0xFF */)) {
  10281. int value;
  10282. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  10283. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  10284. input, &value)));
  10285. if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
  10286. set_optional_foreign_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
  10287. } else {
  10288. mutable_unknown_fields()->AddVarint(
  10289. 22, static_cast< ::google::protobuf::uint64>(value));
  10290. }
  10291. } else {
  10292. goto handle_unusual;
  10293. }
  10294. break;
  10295. }
  10296. default: {
  10297. handle_unusual:
  10298. if (tag == 0) {
  10299. goto success;
  10300. }
  10301. DO_(::google::protobuf::internal::WireFormat::SkipField(
  10302. input, tag, _internal_metadata_.mutable_unknown_fields()));
  10303. break;
  10304. }
  10305. }
  10306. }
  10307. success:
  10308. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestGroup)
  10309. return true;
  10310. failure:
  10311. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestGroup)
  10312. return false;
  10313. #undef DO_
  10314. }
  10315. void TestGroup::SerializeWithCachedSizes(
  10316. ::google::protobuf::io::CodedOutputStream* output) const {
  10317. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestGroup)
  10318. ::google::protobuf::uint32 cached_has_bits = 0;
  10319. (void) cached_has_bits;
  10320. cached_has_bits = _has_bits_[0];
  10321. // optional group OptionalGroup = 16 { ... };
  10322. if (cached_has_bits & 0x00000001u) {
  10323. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  10324. 16, this->_internal_optionalgroup(), output);
  10325. }
  10326. // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
  10327. if (cached_has_bits & 0x00000002u) {
  10328. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  10329. 22, this->optional_foreign_enum(), output);
  10330. }
  10331. if (_internal_metadata_.have_unknown_fields()) {
  10332. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  10333. _internal_metadata_.unknown_fields(), output);
  10334. }
  10335. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestGroup)
  10336. }
  10337. ::google::protobuf::uint8* TestGroup::InternalSerializeWithCachedSizesToArray(
  10338. bool deterministic, ::google::protobuf::uint8* target) const {
  10339. (void)deterministic; // Unused
  10340. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestGroup)
  10341. ::google::protobuf::uint32 cached_has_bits = 0;
  10342. (void) cached_has_bits;
  10343. cached_has_bits = _has_bits_[0];
  10344. // optional group OptionalGroup = 16 { ... };
  10345. if (cached_has_bits & 0x00000001u) {
  10346. target = ::google::protobuf::internal::WireFormatLite::
  10347. InternalWriteGroupToArray(
  10348. 16, this->_internal_optionalgroup(), deterministic, target);
  10349. }
  10350. // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
  10351. if (cached_has_bits & 0x00000002u) {
  10352. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  10353. 22, this->optional_foreign_enum(), target);
  10354. }
  10355. if (_internal_metadata_.have_unknown_fields()) {
  10356. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  10357. _internal_metadata_.unknown_fields(), target);
  10358. }
  10359. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestGroup)
  10360. return target;
  10361. }
  10362. size_t TestGroup::ByteSizeLong() const {
  10363. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestGroup)
  10364. size_t total_size = 0;
  10365. if (_internal_metadata_.have_unknown_fields()) {
  10366. total_size +=
  10367. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  10368. _internal_metadata_.unknown_fields());
  10369. }
  10370. if (_has_bits_[0 / 32] & 3u) {
  10371. // optional group OptionalGroup = 16 { ... };
  10372. if (has_optionalgroup()) {
  10373. total_size += 4 +
  10374. ::google::protobuf::internal::WireFormatLite::GroupSize(
  10375. *optionalgroup_);
  10376. }
  10377. // optional .protobuf_unittest.ForeignEnum optional_foreign_enum = 22;
  10378. if (has_optional_foreign_enum()) {
  10379. total_size += 2 +
  10380. ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_foreign_enum());
  10381. }
  10382. }
  10383. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  10384. SetCachedSize(cached_size);
  10385. return total_size;
  10386. }
  10387. void TestGroup::MergeFrom(const ::google::protobuf::Message& from) {
  10388. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestGroup)
  10389. GOOGLE_DCHECK_NE(&from, this);
  10390. const TestGroup* source =
  10391. ::google::protobuf::internal::DynamicCastToGenerated<const TestGroup>(
  10392. &from);
  10393. if (source == NULL) {
  10394. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestGroup)
  10395. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  10396. } else {
  10397. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestGroup)
  10398. MergeFrom(*source);
  10399. }
  10400. }
  10401. void TestGroup::MergeFrom(const TestGroup& from) {
  10402. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestGroup)
  10403. GOOGLE_DCHECK_NE(&from, this);
  10404. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10405. ::google::protobuf::uint32 cached_has_bits = 0;
  10406. (void) cached_has_bits;
  10407. cached_has_bits = from._has_bits_[0];
  10408. if (cached_has_bits & 3u) {
  10409. if (cached_has_bits & 0x00000001u) {
  10410. mutable_optionalgroup()->::protobuf_unittest::TestGroup_OptionalGroup::MergeFrom(from.optionalgroup());
  10411. }
  10412. if (cached_has_bits & 0x00000002u) {
  10413. optional_foreign_enum_ = from.optional_foreign_enum_;
  10414. }
  10415. _has_bits_[0] |= cached_has_bits;
  10416. }
  10417. }
  10418. void TestGroup::CopyFrom(const ::google::protobuf::Message& from) {
  10419. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestGroup)
  10420. if (&from == this) return;
  10421. Clear();
  10422. MergeFrom(from);
  10423. }
  10424. void TestGroup::CopyFrom(const TestGroup& from) {
  10425. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestGroup)
  10426. if (&from == this) return;
  10427. Clear();
  10428. MergeFrom(from);
  10429. }
  10430. bool TestGroup::IsInitialized() const {
  10431. return true;
  10432. }
  10433. void TestGroup::Swap(TestGroup* other) {
  10434. if (other == this) return;
  10435. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  10436. InternalSwap(other);
  10437. } else {
  10438. TestGroup* temp = New(GetArenaNoVirtual());
  10439. temp->MergeFrom(*other);
  10440. other->CopyFrom(*this);
  10441. InternalSwap(temp);
  10442. if (GetArenaNoVirtual() == NULL) {
  10443. delete temp;
  10444. }
  10445. }
  10446. }
  10447. void TestGroup::UnsafeArenaSwap(TestGroup* other) {
  10448. if (other == this) return;
  10449. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  10450. InternalSwap(other);
  10451. }
  10452. void TestGroup::InternalSwap(TestGroup* other) {
  10453. using std::swap;
  10454. swap(optionalgroup_, other->optionalgroup_);
  10455. swap(optional_foreign_enum_, other->optional_foreign_enum_);
  10456. swap(_has_bits_[0], other->_has_bits_[0]);
  10457. _internal_metadata_.Swap(&other->_internal_metadata_);
  10458. }
  10459. ::google::protobuf::Metadata TestGroup::GetMetadata() const {
  10460. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  10461. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  10462. }
  10463. // ===================================================================
  10464. void TestGroupExtension::InitAsDefaultInstance() {
  10465. }
  10466. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  10467. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  10468. TestGroupExtension::TestGroupExtension()
  10469. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  10470. ::google::protobuf::internal::InitSCC(
  10471. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroupExtension.base);
  10472. SharedCtor();
  10473. // @@protoc_insertion_point(constructor:protobuf_unittest.TestGroupExtension)
  10474. }
  10475. TestGroupExtension::TestGroupExtension(::google::protobuf::Arena* arena)
  10476. : ::google::protobuf::Message(),
  10477. _extensions_(arena),
  10478. _internal_metadata_(arena) {
  10479. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroupExtension.base);
  10480. SharedCtor();
  10481. RegisterArenaDtor(arena);
  10482. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestGroupExtension)
  10483. }
  10484. TestGroupExtension::TestGroupExtension(const TestGroupExtension& from)
  10485. : ::google::protobuf::Message(),
  10486. _internal_metadata_(NULL),
  10487. _has_bits_(from._has_bits_) {
  10488. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10489. _extensions_.MergeFrom(from._extensions_);
  10490. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestGroupExtension)
  10491. }
  10492. void TestGroupExtension::SharedCtor() {
  10493. }
  10494. TestGroupExtension::~TestGroupExtension() {
  10495. // @@protoc_insertion_point(destructor:protobuf_unittest.TestGroupExtension)
  10496. SharedDtor();
  10497. }
  10498. void TestGroupExtension::SharedDtor() {
  10499. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  10500. }
  10501. void TestGroupExtension::ArenaDtor(void* object) {
  10502. TestGroupExtension* _this = reinterpret_cast< TestGroupExtension* >(object);
  10503. (void)_this;
  10504. }
  10505. void TestGroupExtension::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  10506. }
  10507. void TestGroupExtension::SetCachedSize(int size) const {
  10508. _cached_size_.Set(size);
  10509. }
  10510. const ::google::protobuf::Descriptor* TestGroupExtension::descriptor() {
  10511. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  10512. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  10513. }
  10514. const TestGroupExtension& TestGroupExtension::default_instance() {
  10515. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestGroupExtension.base);
  10516. return *internal_default_instance();
  10517. }
  10518. void TestGroupExtension::Clear() {
  10519. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestGroupExtension)
  10520. ::google::protobuf::uint32 cached_has_bits = 0;
  10521. // Prevent compiler warnings about cached_has_bits being unused
  10522. (void) cached_has_bits;
  10523. _extensions_.Clear();
  10524. _has_bits_.Clear();
  10525. _internal_metadata_.Clear();
  10526. }
  10527. bool TestGroupExtension::MergePartialFromCodedStream(
  10528. ::google::protobuf::io::CodedInputStream* input) {
  10529. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  10530. ::google::protobuf::uint32 tag;
  10531. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestGroupExtension)
  10532. for (;;) {
  10533. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  10534. tag = p.first;
  10535. if (!p.second) goto handle_unusual;
  10536. handle_unusual:
  10537. if (tag == 0) {
  10538. goto success;
  10539. }
  10540. if ((8u <= tag)) {
  10541. DO_(_extensions_.ParseField(tag, input,
  10542. internal_default_instance(),
  10543. _internal_metadata_.mutable_unknown_fields()));
  10544. continue;
  10545. }
  10546. DO_(::google::protobuf::internal::WireFormat::SkipField(
  10547. input, tag, _internal_metadata_.mutable_unknown_fields()));
  10548. }
  10549. success:
  10550. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestGroupExtension)
  10551. return true;
  10552. failure:
  10553. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestGroupExtension)
  10554. return false;
  10555. #undef DO_
  10556. }
  10557. void TestGroupExtension::SerializeWithCachedSizes(
  10558. ::google::protobuf::io::CodedOutputStream* output) const {
  10559. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestGroupExtension)
  10560. ::google::protobuf::uint32 cached_has_bits = 0;
  10561. (void) cached_has_bits;
  10562. // Extension range [1, 536870912)
  10563. _extensions_.SerializeWithCachedSizes(
  10564. 1, 536870912, output);
  10565. if (_internal_metadata_.have_unknown_fields()) {
  10566. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  10567. _internal_metadata_.unknown_fields(), output);
  10568. }
  10569. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestGroupExtension)
  10570. }
  10571. ::google::protobuf::uint8* TestGroupExtension::InternalSerializeWithCachedSizesToArray(
  10572. bool deterministic, ::google::protobuf::uint8* target) const {
  10573. (void)deterministic; // Unused
  10574. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestGroupExtension)
  10575. ::google::protobuf::uint32 cached_has_bits = 0;
  10576. (void) cached_has_bits;
  10577. // Extension range [1, 536870912)
  10578. target = _extensions_.InternalSerializeWithCachedSizesToArray(
  10579. 1, 536870912, deterministic, target);
  10580. if (_internal_metadata_.have_unknown_fields()) {
  10581. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  10582. _internal_metadata_.unknown_fields(), target);
  10583. }
  10584. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestGroupExtension)
  10585. return target;
  10586. }
  10587. size_t TestGroupExtension::ByteSizeLong() const {
  10588. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestGroupExtension)
  10589. size_t total_size = 0;
  10590. total_size += _extensions_.ByteSize();
  10591. if (_internal_metadata_.have_unknown_fields()) {
  10592. total_size +=
  10593. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  10594. _internal_metadata_.unknown_fields());
  10595. }
  10596. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  10597. SetCachedSize(cached_size);
  10598. return total_size;
  10599. }
  10600. void TestGroupExtension::MergeFrom(const ::google::protobuf::Message& from) {
  10601. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestGroupExtension)
  10602. GOOGLE_DCHECK_NE(&from, this);
  10603. const TestGroupExtension* source =
  10604. ::google::protobuf::internal::DynamicCastToGenerated<const TestGroupExtension>(
  10605. &from);
  10606. if (source == NULL) {
  10607. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestGroupExtension)
  10608. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  10609. } else {
  10610. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestGroupExtension)
  10611. MergeFrom(*source);
  10612. }
  10613. }
  10614. void TestGroupExtension::MergeFrom(const TestGroupExtension& from) {
  10615. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestGroupExtension)
  10616. GOOGLE_DCHECK_NE(&from, this);
  10617. _extensions_.MergeFrom(from._extensions_);
  10618. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10619. ::google::protobuf::uint32 cached_has_bits = 0;
  10620. (void) cached_has_bits;
  10621. }
  10622. void TestGroupExtension::CopyFrom(const ::google::protobuf::Message& from) {
  10623. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestGroupExtension)
  10624. if (&from == this) return;
  10625. Clear();
  10626. MergeFrom(from);
  10627. }
  10628. void TestGroupExtension::CopyFrom(const TestGroupExtension& from) {
  10629. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestGroupExtension)
  10630. if (&from == this) return;
  10631. Clear();
  10632. MergeFrom(from);
  10633. }
  10634. bool TestGroupExtension::IsInitialized() const {
  10635. if (!_extensions_.IsInitialized()) {
  10636. return false;
  10637. }
  10638. return true;
  10639. }
  10640. void TestGroupExtension::Swap(TestGroupExtension* other) {
  10641. if (other == this) return;
  10642. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  10643. InternalSwap(other);
  10644. } else {
  10645. TestGroupExtension* temp = New(GetArenaNoVirtual());
  10646. temp->MergeFrom(*other);
  10647. other->CopyFrom(*this);
  10648. InternalSwap(temp);
  10649. if (GetArenaNoVirtual() == NULL) {
  10650. delete temp;
  10651. }
  10652. }
  10653. }
  10654. void TestGroupExtension::UnsafeArenaSwap(TestGroupExtension* other) {
  10655. if (other == this) return;
  10656. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  10657. InternalSwap(other);
  10658. }
  10659. void TestGroupExtension::InternalSwap(TestGroupExtension* other) {
  10660. using std::swap;
  10661. swap(_has_bits_[0], other->_has_bits_[0]);
  10662. _internal_metadata_.Swap(&other->_internal_metadata_);
  10663. _extensions_.Swap(&other->_extensions_);
  10664. }
  10665. ::google::protobuf::Metadata TestGroupExtension::GetMetadata() const {
  10666. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  10667. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  10668. }
  10669. // ===================================================================
  10670. void TestNestedExtension_OptionalGroup_extension::InitAsDefaultInstance() {
  10671. }
  10672. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  10673. const int TestNestedExtension_OptionalGroup_extension::kAFieldNumber;
  10674. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  10675. TestNestedExtension_OptionalGroup_extension::TestNestedExtension_OptionalGroup_extension()
  10676. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  10677. ::google::protobuf::internal::InitSCC(
  10678. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedExtension_OptionalGroup_extension.base);
  10679. SharedCtor();
  10680. // @@protoc_insertion_point(constructor:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10681. }
  10682. TestNestedExtension_OptionalGroup_extension::TestNestedExtension_OptionalGroup_extension(::google::protobuf::Arena* arena)
  10683. : ::google::protobuf::Message(),
  10684. _internal_metadata_(arena) {
  10685. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedExtension_OptionalGroup_extension.base);
  10686. SharedCtor();
  10687. RegisterArenaDtor(arena);
  10688. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10689. }
  10690. TestNestedExtension_OptionalGroup_extension::TestNestedExtension_OptionalGroup_extension(const TestNestedExtension_OptionalGroup_extension& from)
  10691. : ::google::protobuf::Message(),
  10692. _internal_metadata_(NULL),
  10693. _has_bits_(from._has_bits_) {
  10694. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10695. a_ = from.a_;
  10696. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10697. }
  10698. void TestNestedExtension_OptionalGroup_extension::SharedCtor() {
  10699. a_ = 0;
  10700. }
  10701. TestNestedExtension_OptionalGroup_extension::~TestNestedExtension_OptionalGroup_extension() {
  10702. // @@protoc_insertion_point(destructor:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10703. SharedDtor();
  10704. }
  10705. void TestNestedExtension_OptionalGroup_extension::SharedDtor() {
  10706. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  10707. }
  10708. void TestNestedExtension_OptionalGroup_extension::ArenaDtor(void* object) {
  10709. TestNestedExtension_OptionalGroup_extension* _this = reinterpret_cast< TestNestedExtension_OptionalGroup_extension* >(object);
  10710. (void)_this;
  10711. }
  10712. void TestNestedExtension_OptionalGroup_extension::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  10713. }
  10714. void TestNestedExtension_OptionalGroup_extension::SetCachedSize(int size) const {
  10715. _cached_size_.Set(size);
  10716. }
  10717. const ::google::protobuf::Descriptor* TestNestedExtension_OptionalGroup_extension::descriptor() {
  10718. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  10719. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  10720. }
  10721. const TestNestedExtension_OptionalGroup_extension& TestNestedExtension_OptionalGroup_extension::default_instance() {
  10722. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedExtension_OptionalGroup_extension.base);
  10723. return *internal_default_instance();
  10724. }
  10725. void TestNestedExtension_OptionalGroup_extension::Clear() {
  10726. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10727. ::google::protobuf::uint32 cached_has_bits = 0;
  10728. // Prevent compiler warnings about cached_has_bits being unused
  10729. (void) cached_has_bits;
  10730. a_ = 0;
  10731. _has_bits_.Clear();
  10732. _internal_metadata_.Clear();
  10733. }
  10734. bool TestNestedExtension_OptionalGroup_extension::MergePartialFromCodedStream(
  10735. ::google::protobuf::io::CodedInputStream* input) {
  10736. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  10737. ::google::protobuf::uint32 tag;
  10738. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10739. for (;;) {
  10740. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  10741. tag = p.first;
  10742. if (!p.second) goto handle_unusual;
  10743. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  10744. // optional int32 a = 17;
  10745. case 17: {
  10746. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10747. static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
  10748. set_has_a();
  10749. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  10750. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  10751. input, &a_)));
  10752. } else {
  10753. goto handle_unusual;
  10754. }
  10755. break;
  10756. }
  10757. default: {
  10758. handle_unusual:
  10759. if (tag == 0 ||
  10760. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  10761. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  10762. input->SetLastTag(tag);
  10763. goto success;
  10764. }
  10765. DO_(::google::protobuf::internal::WireFormat::SkipField(
  10766. input, tag, _internal_metadata_.mutable_unknown_fields()));
  10767. break;
  10768. }
  10769. }
  10770. }
  10771. success:
  10772. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10773. return true;
  10774. failure:
  10775. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10776. return false;
  10777. #undef DO_
  10778. }
  10779. void TestNestedExtension_OptionalGroup_extension::SerializeWithCachedSizes(
  10780. ::google::protobuf::io::CodedOutputStream* output) const {
  10781. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10782. ::google::protobuf::uint32 cached_has_bits = 0;
  10783. (void) cached_has_bits;
  10784. cached_has_bits = _has_bits_[0];
  10785. // optional int32 a = 17;
  10786. if (cached_has_bits & 0x00000001u) {
  10787. ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->a(), output);
  10788. }
  10789. if (_internal_metadata_.have_unknown_fields()) {
  10790. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  10791. _internal_metadata_.unknown_fields(), output);
  10792. }
  10793. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10794. }
  10795. ::google::protobuf::uint8* TestNestedExtension_OptionalGroup_extension::InternalSerializeWithCachedSizesToArray(
  10796. bool deterministic, ::google::protobuf::uint8* target) const {
  10797. (void)deterministic; // Unused
  10798. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10799. ::google::protobuf::uint32 cached_has_bits = 0;
  10800. (void) cached_has_bits;
  10801. cached_has_bits = _has_bits_[0];
  10802. // optional int32 a = 17;
  10803. if (cached_has_bits & 0x00000001u) {
  10804. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(17, this->a(), target);
  10805. }
  10806. if (_internal_metadata_.have_unknown_fields()) {
  10807. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  10808. _internal_metadata_.unknown_fields(), target);
  10809. }
  10810. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10811. return target;
  10812. }
  10813. size_t TestNestedExtension_OptionalGroup_extension::ByteSizeLong() const {
  10814. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10815. size_t total_size = 0;
  10816. if (_internal_metadata_.have_unknown_fields()) {
  10817. total_size +=
  10818. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  10819. _internal_metadata_.unknown_fields());
  10820. }
  10821. // optional int32 a = 17;
  10822. if (has_a()) {
  10823. total_size += 2 +
  10824. ::google::protobuf::internal::WireFormatLite::Int32Size(
  10825. this->a());
  10826. }
  10827. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  10828. SetCachedSize(cached_size);
  10829. return total_size;
  10830. }
  10831. void TestNestedExtension_OptionalGroup_extension::MergeFrom(const ::google::protobuf::Message& from) {
  10832. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10833. GOOGLE_DCHECK_NE(&from, this);
  10834. const TestNestedExtension_OptionalGroup_extension* source =
  10835. ::google::protobuf::internal::DynamicCastToGenerated<const TestNestedExtension_OptionalGroup_extension>(
  10836. &from);
  10837. if (source == NULL) {
  10838. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10839. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  10840. } else {
  10841. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10842. MergeFrom(*source);
  10843. }
  10844. }
  10845. void TestNestedExtension_OptionalGroup_extension::MergeFrom(const TestNestedExtension_OptionalGroup_extension& from) {
  10846. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10847. GOOGLE_DCHECK_NE(&from, this);
  10848. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10849. ::google::protobuf::uint32 cached_has_bits = 0;
  10850. (void) cached_has_bits;
  10851. if (from.has_a()) {
  10852. set_a(from.a());
  10853. }
  10854. }
  10855. void TestNestedExtension_OptionalGroup_extension::CopyFrom(const ::google::protobuf::Message& from) {
  10856. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10857. if (&from == this) return;
  10858. Clear();
  10859. MergeFrom(from);
  10860. }
  10861. void TestNestedExtension_OptionalGroup_extension::CopyFrom(const TestNestedExtension_OptionalGroup_extension& from) {
  10862. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestNestedExtension.OptionalGroup_extension)
  10863. if (&from == this) return;
  10864. Clear();
  10865. MergeFrom(from);
  10866. }
  10867. bool TestNestedExtension_OptionalGroup_extension::IsInitialized() const {
  10868. return true;
  10869. }
  10870. void TestNestedExtension_OptionalGroup_extension::Swap(TestNestedExtension_OptionalGroup_extension* other) {
  10871. if (other == this) return;
  10872. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  10873. InternalSwap(other);
  10874. } else {
  10875. TestNestedExtension_OptionalGroup_extension* temp = New(GetArenaNoVirtual());
  10876. temp->MergeFrom(*other);
  10877. other->CopyFrom(*this);
  10878. InternalSwap(temp);
  10879. if (GetArenaNoVirtual() == NULL) {
  10880. delete temp;
  10881. }
  10882. }
  10883. }
  10884. void TestNestedExtension_OptionalGroup_extension::UnsafeArenaSwap(TestNestedExtension_OptionalGroup_extension* other) {
  10885. if (other == this) return;
  10886. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  10887. InternalSwap(other);
  10888. }
  10889. void TestNestedExtension_OptionalGroup_extension::InternalSwap(TestNestedExtension_OptionalGroup_extension* other) {
  10890. using std::swap;
  10891. swap(a_, other->a_);
  10892. swap(_has_bits_[0], other->_has_bits_[0]);
  10893. _internal_metadata_.Swap(&other->_internal_metadata_);
  10894. }
  10895. ::google::protobuf::Metadata TestNestedExtension_OptionalGroup_extension::GetMetadata() const {
  10896. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  10897. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  10898. }
  10899. // ===================================================================
  10900. void TestNestedExtension::InitAsDefaultInstance() {
  10901. }
  10902. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  10903. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  10904. TestNestedExtension::TestNestedExtension()
  10905. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  10906. ::google::protobuf::internal::InitSCC(
  10907. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedExtension.base);
  10908. SharedCtor();
  10909. // @@protoc_insertion_point(constructor:protobuf_unittest.TestNestedExtension)
  10910. }
  10911. TestNestedExtension::TestNestedExtension(::google::protobuf::Arena* arena)
  10912. : ::google::protobuf::Message(),
  10913. _internal_metadata_(arena) {
  10914. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedExtension.base);
  10915. SharedCtor();
  10916. RegisterArenaDtor(arena);
  10917. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestNestedExtension)
  10918. }
  10919. TestNestedExtension::TestNestedExtension(const TestNestedExtension& from)
  10920. : ::google::protobuf::Message(),
  10921. _internal_metadata_(NULL),
  10922. _has_bits_(from._has_bits_) {
  10923. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10924. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestNestedExtension)
  10925. }
  10926. void TestNestedExtension::SharedCtor() {
  10927. }
  10928. TestNestedExtension::~TestNestedExtension() {
  10929. // @@protoc_insertion_point(destructor:protobuf_unittest.TestNestedExtension)
  10930. SharedDtor();
  10931. }
  10932. void TestNestedExtension::SharedDtor() {
  10933. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  10934. }
  10935. void TestNestedExtension::ArenaDtor(void* object) {
  10936. TestNestedExtension* _this = reinterpret_cast< TestNestedExtension* >(object);
  10937. (void)_this;
  10938. }
  10939. void TestNestedExtension::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  10940. }
  10941. void TestNestedExtension::SetCachedSize(int size) const {
  10942. _cached_size_.Set(size);
  10943. }
  10944. const ::google::protobuf::Descriptor* TestNestedExtension::descriptor() {
  10945. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  10946. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  10947. }
  10948. const TestNestedExtension& TestNestedExtension::default_instance() {
  10949. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedExtension.base);
  10950. return *internal_default_instance();
  10951. }
  10952. void TestNestedExtension::Clear() {
  10953. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestNestedExtension)
  10954. ::google::protobuf::uint32 cached_has_bits = 0;
  10955. // Prevent compiler warnings about cached_has_bits being unused
  10956. (void) cached_has_bits;
  10957. _has_bits_.Clear();
  10958. _internal_metadata_.Clear();
  10959. }
  10960. bool TestNestedExtension::MergePartialFromCodedStream(
  10961. ::google::protobuf::io::CodedInputStream* input) {
  10962. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  10963. ::google::protobuf::uint32 tag;
  10964. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestNestedExtension)
  10965. for (;;) {
  10966. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  10967. tag = p.first;
  10968. if (!p.second) goto handle_unusual;
  10969. handle_unusual:
  10970. if (tag == 0) {
  10971. goto success;
  10972. }
  10973. DO_(::google::protobuf::internal::WireFormat::SkipField(
  10974. input, tag, _internal_metadata_.mutable_unknown_fields()));
  10975. }
  10976. success:
  10977. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestNestedExtension)
  10978. return true;
  10979. failure:
  10980. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestNestedExtension)
  10981. return false;
  10982. #undef DO_
  10983. }
  10984. void TestNestedExtension::SerializeWithCachedSizes(
  10985. ::google::protobuf::io::CodedOutputStream* output) const {
  10986. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestNestedExtension)
  10987. ::google::protobuf::uint32 cached_has_bits = 0;
  10988. (void) cached_has_bits;
  10989. if (_internal_metadata_.have_unknown_fields()) {
  10990. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  10991. _internal_metadata_.unknown_fields(), output);
  10992. }
  10993. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestNestedExtension)
  10994. }
  10995. ::google::protobuf::uint8* TestNestedExtension::InternalSerializeWithCachedSizesToArray(
  10996. bool deterministic, ::google::protobuf::uint8* target) const {
  10997. (void)deterministic; // Unused
  10998. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestNestedExtension)
  10999. ::google::protobuf::uint32 cached_has_bits = 0;
  11000. (void) cached_has_bits;
  11001. if (_internal_metadata_.have_unknown_fields()) {
  11002. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  11003. _internal_metadata_.unknown_fields(), target);
  11004. }
  11005. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestNestedExtension)
  11006. return target;
  11007. }
  11008. size_t TestNestedExtension::ByteSizeLong() const {
  11009. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestNestedExtension)
  11010. size_t total_size = 0;
  11011. if (_internal_metadata_.have_unknown_fields()) {
  11012. total_size +=
  11013. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  11014. _internal_metadata_.unknown_fields());
  11015. }
  11016. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  11017. SetCachedSize(cached_size);
  11018. return total_size;
  11019. }
  11020. void TestNestedExtension::MergeFrom(const ::google::protobuf::Message& from) {
  11021. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestNestedExtension)
  11022. GOOGLE_DCHECK_NE(&from, this);
  11023. const TestNestedExtension* source =
  11024. ::google::protobuf::internal::DynamicCastToGenerated<const TestNestedExtension>(
  11025. &from);
  11026. if (source == NULL) {
  11027. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestNestedExtension)
  11028. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  11029. } else {
  11030. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestNestedExtension)
  11031. MergeFrom(*source);
  11032. }
  11033. }
  11034. void TestNestedExtension::MergeFrom(const TestNestedExtension& from) {
  11035. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestNestedExtension)
  11036. GOOGLE_DCHECK_NE(&from, this);
  11037. _internal_metadata_.MergeFrom(from._internal_metadata_);
  11038. ::google::protobuf::uint32 cached_has_bits = 0;
  11039. (void) cached_has_bits;
  11040. }
  11041. void TestNestedExtension::CopyFrom(const ::google::protobuf::Message& from) {
  11042. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestNestedExtension)
  11043. if (&from == this) return;
  11044. Clear();
  11045. MergeFrom(from);
  11046. }
  11047. void TestNestedExtension::CopyFrom(const TestNestedExtension& from) {
  11048. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestNestedExtension)
  11049. if (&from == this) return;
  11050. Clear();
  11051. MergeFrom(from);
  11052. }
  11053. bool TestNestedExtension::IsInitialized() const {
  11054. return true;
  11055. }
  11056. void TestNestedExtension::Swap(TestNestedExtension* other) {
  11057. if (other == this) return;
  11058. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  11059. InternalSwap(other);
  11060. } else {
  11061. TestNestedExtension* temp = New(GetArenaNoVirtual());
  11062. temp->MergeFrom(*other);
  11063. other->CopyFrom(*this);
  11064. InternalSwap(temp);
  11065. if (GetArenaNoVirtual() == NULL) {
  11066. delete temp;
  11067. }
  11068. }
  11069. }
  11070. void TestNestedExtension::UnsafeArenaSwap(TestNestedExtension* other) {
  11071. if (other == this) return;
  11072. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  11073. InternalSwap(other);
  11074. }
  11075. void TestNestedExtension::InternalSwap(TestNestedExtension* other) {
  11076. using std::swap;
  11077. swap(_has_bits_[0], other->_has_bits_[0]);
  11078. _internal_metadata_.Swap(&other->_internal_metadata_);
  11079. }
  11080. ::google::protobuf::Metadata TestNestedExtension::GetMetadata() const {
  11081. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  11082. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  11083. }
  11084. // ===================================================================
  11085. void TestRequired::InitAsDefaultInstance() {
  11086. }
  11087. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  11088. const int TestRequired::kAFieldNumber;
  11089. const int TestRequired::kDummy2FieldNumber;
  11090. const int TestRequired::kBFieldNumber;
  11091. const int TestRequired::kDummy4FieldNumber;
  11092. const int TestRequired::kDummy5FieldNumber;
  11093. const int TestRequired::kDummy6FieldNumber;
  11094. const int TestRequired::kDummy7FieldNumber;
  11095. const int TestRequired::kDummy8FieldNumber;
  11096. const int TestRequired::kDummy9FieldNumber;
  11097. const int TestRequired::kDummy10FieldNumber;
  11098. const int TestRequired::kDummy11FieldNumber;
  11099. const int TestRequired::kDummy12FieldNumber;
  11100. const int TestRequired::kDummy13FieldNumber;
  11101. const int TestRequired::kDummy14FieldNumber;
  11102. const int TestRequired::kDummy15FieldNumber;
  11103. const int TestRequired::kDummy16FieldNumber;
  11104. const int TestRequired::kDummy17FieldNumber;
  11105. const int TestRequired::kDummy18FieldNumber;
  11106. const int TestRequired::kDummy19FieldNumber;
  11107. const int TestRequired::kDummy20FieldNumber;
  11108. const int TestRequired::kDummy21FieldNumber;
  11109. const int TestRequired::kDummy22FieldNumber;
  11110. const int TestRequired::kDummy23FieldNumber;
  11111. const int TestRequired::kDummy24FieldNumber;
  11112. const int TestRequired::kDummy25FieldNumber;
  11113. const int TestRequired::kDummy26FieldNumber;
  11114. const int TestRequired::kDummy27FieldNumber;
  11115. const int TestRequired::kDummy28FieldNumber;
  11116. const int TestRequired::kDummy29FieldNumber;
  11117. const int TestRequired::kDummy30FieldNumber;
  11118. const int TestRequired::kDummy31FieldNumber;
  11119. const int TestRequired::kDummy32FieldNumber;
  11120. const int TestRequired::kCFieldNumber;
  11121. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  11122. TestRequired::TestRequired()
  11123. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  11124. ::google::protobuf::internal::InitSCC(
  11125. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequired.base);
  11126. SharedCtor();
  11127. // @@protoc_insertion_point(constructor:protobuf_unittest.TestRequired)
  11128. }
  11129. TestRequired::TestRequired(::google::protobuf::Arena* arena)
  11130. : ::google::protobuf::Message(),
  11131. _internal_metadata_(arena) {
  11132. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequired.base);
  11133. SharedCtor();
  11134. RegisterArenaDtor(arena);
  11135. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestRequired)
  11136. }
  11137. TestRequired::TestRequired(const TestRequired& from)
  11138. : ::google::protobuf::Message(),
  11139. _internal_metadata_(NULL),
  11140. _has_bits_(from._has_bits_) {
  11141. _internal_metadata_.MergeFrom(from._internal_metadata_);
  11142. ::memcpy(&a_, &from.a_,
  11143. static_cast<size_t>(reinterpret_cast<char*>(&c_) -
  11144. reinterpret_cast<char*>(&a_)) + sizeof(c_));
  11145. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestRequired)
  11146. }
  11147. void TestRequired::SharedCtor() {
  11148. ::memset(&a_, 0, static_cast<size_t>(
  11149. reinterpret_cast<char*>(&c_) -
  11150. reinterpret_cast<char*>(&a_)) + sizeof(c_));
  11151. }
  11152. TestRequired::~TestRequired() {
  11153. // @@protoc_insertion_point(destructor:protobuf_unittest.TestRequired)
  11154. SharedDtor();
  11155. }
  11156. void TestRequired::SharedDtor() {
  11157. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  11158. }
  11159. void TestRequired::ArenaDtor(void* object) {
  11160. TestRequired* _this = reinterpret_cast< TestRequired* >(object);
  11161. (void)_this;
  11162. }
  11163. void TestRequired::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  11164. }
  11165. void TestRequired::SetCachedSize(int size) const {
  11166. _cached_size_.Set(size);
  11167. }
  11168. const ::google::protobuf::Descriptor* TestRequired::descriptor() {
  11169. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  11170. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  11171. }
  11172. const TestRequired& TestRequired::default_instance() {
  11173. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequired.base);
  11174. return *internal_default_instance();
  11175. }
  11176. void TestRequired::Clear() {
  11177. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestRequired)
  11178. ::google::protobuf::uint32 cached_has_bits = 0;
  11179. // Prevent compiler warnings about cached_has_bits being unused
  11180. (void) cached_has_bits;
  11181. cached_has_bits = _has_bits_[0];
  11182. if (cached_has_bits & 255u) {
  11183. ::memset(&a_, 0, static_cast<size_t>(
  11184. reinterpret_cast<char*>(&dummy8_) -
  11185. reinterpret_cast<char*>(&a_)) + sizeof(dummy8_));
  11186. }
  11187. if (cached_has_bits & 65280u) {
  11188. ::memset(&dummy9_, 0, static_cast<size_t>(
  11189. reinterpret_cast<char*>(&dummy16_) -
  11190. reinterpret_cast<char*>(&dummy9_)) + sizeof(dummy16_));
  11191. }
  11192. if (cached_has_bits & 16711680u) {
  11193. ::memset(&dummy17_, 0, static_cast<size_t>(
  11194. reinterpret_cast<char*>(&dummy24_) -
  11195. reinterpret_cast<char*>(&dummy17_)) + sizeof(dummy24_));
  11196. }
  11197. if (cached_has_bits & 4278190080u) {
  11198. ::memset(&dummy25_, 0, static_cast<size_t>(
  11199. reinterpret_cast<char*>(&dummy32_) -
  11200. reinterpret_cast<char*>(&dummy25_)) + sizeof(dummy32_));
  11201. }
  11202. c_ = 0;
  11203. _has_bits_.Clear();
  11204. _internal_metadata_.Clear();
  11205. }
  11206. bool TestRequired::MergePartialFromCodedStream(
  11207. ::google::protobuf::io::CodedInputStream* input) {
  11208. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  11209. ::google::protobuf::uint32 tag;
  11210. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestRequired)
  11211. for (;;) {
  11212. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  11213. tag = p.first;
  11214. if (!p.second) goto handle_unusual;
  11215. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  11216. // required int32 a = 1;
  11217. case 1: {
  11218. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11219. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  11220. set_has_a();
  11221. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11222. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11223. input, &a_)));
  11224. } else {
  11225. goto handle_unusual;
  11226. }
  11227. break;
  11228. }
  11229. // optional int32 dummy2 = 2;
  11230. case 2: {
  11231. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11232. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  11233. set_has_dummy2();
  11234. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11235. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11236. input, &dummy2_)));
  11237. } else {
  11238. goto handle_unusual;
  11239. }
  11240. break;
  11241. }
  11242. // required int32 b = 3;
  11243. case 3: {
  11244. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11245. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  11246. set_has_b();
  11247. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11248. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11249. input, &b_)));
  11250. } else {
  11251. goto handle_unusual;
  11252. }
  11253. break;
  11254. }
  11255. // optional int32 dummy4 = 4;
  11256. case 4: {
  11257. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11258. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  11259. set_has_dummy4();
  11260. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11261. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11262. input, &dummy4_)));
  11263. } else {
  11264. goto handle_unusual;
  11265. }
  11266. break;
  11267. }
  11268. // optional int32 dummy5 = 5;
  11269. case 5: {
  11270. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11271. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  11272. set_has_dummy5();
  11273. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11274. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11275. input, &dummy5_)));
  11276. } else {
  11277. goto handle_unusual;
  11278. }
  11279. break;
  11280. }
  11281. // optional int32 dummy6 = 6;
  11282. case 6: {
  11283. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11284. static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
  11285. set_has_dummy6();
  11286. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11287. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11288. input, &dummy6_)));
  11289. } else {
  11290. goto handle_unusual;
  11291. }
  11292. break;
  11293. }
  11294. // optional int32 dummy7 = 7;
  11295. case 7: {
  11296. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11297. static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
  11298. set_has_dummy7();
  11299. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11300. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11301. input, &dummy7_)));
  11302. } else {
  11303. goto handle_unusual;
  11304. }
  11305. break;
  11306. }
  11307. // optional int32 dummy8 = 8;
  11308. case 8: {
  11309. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11310. static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) {
  11311. set_has_dummy8();
  11312. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11313. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11314. input, &dummy8_)));
  11315. } else {
  11316. goto handle_unusual;
  11317. }
  11318. break;
  11319. }
  11320. // optional int32 dummy9 = 9;
  11321. case 9: {
  11322. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11323. static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
  11324. set_has_dummy9();
  11325. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11326. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11327. input, &dummy9_)));
  11328. } else {
  11329. goto handle_unusual;
  11330. }
  11331. break;
  11332. }
  11333. // optional int32 dummy10 = 10;
  11334. case 10: {
  11335. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11336. static_cast< ::google::protobuf::uint8>(80u /* 80 & 0xFF */)) {
  11337. set_has_dummy10();
  11338. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11339. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11340. input, &dummy10_)));
  11341. } else {
  11342. goto handle_unusual;
  11343. }
  11344. break;
  11345. }
  11346. // optional int32 dummy11 = 11;
  11347. case 11: {
  11348. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11349. static_cast< ::google::protobuf::uint8>(88u /* 88 & 0xFF */)) {
  11350. set_has_dummy11();
  11351. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11352. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11353. input, &dummy11_)));
  11354. } else {
  11355. goto handle_unusual;
  11356. }
  11357. break;
  11358. }
  11359. // optional int32 dummy12 = 12;
  11360. case 12: {
  11361. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11362. static_cast< ::google::protobuf::uint8>(96u /* 96 & 0xFF */)) {
  11363. set_has_dummy12();
  11364. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11365. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11366. input, &dummy12_)));
  11367. } else {
  11368. goto handle_unusual;
  11369. }
  11370. break;
  11371. }
  11372. // optional int32 dummy13 = 13;
  11373. case 13: {
  11374. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11375. static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
  11376. set_has_dummy13();
  11377. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11378. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11379. input, &dummy13_)));
  11380. } else {
  11381. goto handle_unusual;
  11382. }
  11383. break;
  11384. }
  11385. // optional int32 dummy14 = 14;
  11386. case 14: {
  11387. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11388. static_cast< ::google::protobuf::uint8>(112u /* 112 & 0xFF */)) {
  11389. set_has_dummy14();
  11390. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11391. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11392. input, &dummy14_)));
  11393. } else {
  11394. goto handle_unusual;
  11395. }
  11396. break;
  11397. }
  11398. // optional int32 dummy15 = 15;
  11399. case 15: {
  11400. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11401. static_cast< ::google::protobuf::uint8>(120u /* 120 & 0xFF */)) {
  11402. set_has_dummy15();
  11403. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11404. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11405. input, &dummy15_)));
  11406. } else {
  11407. goto handle_unusual;
  11408. }
  11409. break;
  11410. }
  11411. // optional int32 dummy16 = 16;
  11412. case 16: {
  11413. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11414. static_cast< ::google::protobuf::uint8>(128u /* 128 & 0xFF */)) {
  11415. set_has_dummy16();
  11416. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11417. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11418. input, &dummy16_)));
  11419. } else {
  11420. goto handle_unusual;
  11421. }
  11422. break;
  11423. }
  11424. // optional int32 dummy17 = 17;
  11425. case 17: {
  11426. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11427. static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
  11428. set_has_dummy17();
  11429. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11430. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11431. input, &dummy17_)));
  11432. } else {
  11433. goto handle_unusual;
  11434. }
  11435. break;
  11436. }
  11437. // optional int32 dummy18 = 18;
  11438. case 18: {
  11439. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11440. static_cast< ::google::protobuf::uint8>(144u /* 144 & 0xFF */)) {
  11441. set_has_dummy18();
  11442. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11443. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11444. input, &dummy18_)));
  11445. } else {
  11446. goto handle_unusual;
  11447. }
  11448. break;
  11449. }
  11450. // optional int32 dummy19 = 19;
  11451. case 19: {
  11452. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11453. static_cast< ::google::protobuf::uint8>(152u /* 152 & 0xFF */)) {
  11454. set_has_dummy19();
  11455. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11456. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11457. input, &dummy19_)));
  11458. } else {
  11459. goto handle_unusual;
  11460. }
  11461. break;
  11462. }
  11463. // optional int32 dummy20 = 20;
  11464. case 20: {
  11465. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11466. static_cast< ::google::protobuf::uint8>(160u /* 160 & 0xFF */)) {
  11467. set_has_dummy20();
  11468. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11469. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11470. input, &dummy20_)));
  11471. } else {
  11472. goto handle_unusual;
  11473. }
  11474. break;
  11475. }
  11476. // optional int32 dummy21 = 21;
  11477. case 21: {
  11478. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11479. static_cast< ::google::protobuf::uint8>(168u /* 168 & 0xFF */)) {
  11480. set_has_dummy21();
  11481. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11482. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11483. input, &dummy21_)));
  11484. } else {
  11485. goto handle_unusual;
  11486. }
  11487. break;
  11488. }
  11489. // optional int32 dummy22 = 22;
  11490. case 22: {
  11491. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11492. static_cast< ::google::protobuf::uint8>(176u /* 176 & 0xFF */)) {
  11493. set_has_dummy22();
  11494. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11495. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11496. input, &dummy22_)));
  11497. } else {
  11498. goto handle_unusual;
  11499. }
  11500. break;
  11501. }
  11502. // optional int32 dummy23 = 23;
  11503. case 23: {
  11504. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11505. static_cast< ::google::protobuf::uint8>(184u /* 184 & 0xFF */)) {
  11506. set_has_dummy23();
  11507. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11508. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11509. input, &dummy23_)));
  11510. } else {
  11511. goto handle_unusual;
  11512. }
  11513. break;
  11514. }
  11515. // optional int32 dummy24 = 24;
  11516. case 24: {
  11517. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11518. static_cast< ::google::protobuf::uint8>(192u /* 192 & 0xFF */)) {
  11519. set_has_dummy24();
  11520. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11521. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11522. input, &dummy24_)));
  11523. } else {
  11524. goto handle_unusual;
  11525. }
  11526. break;
  11527. }
  11528. // optional int32 dummy25 = 25;
  11529. case 25: {
  11530. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11531. static_cast< ::google::protobuf::uint8>(200u /* 200 & 0xFF */)) {
  11532. set_has_dummy25();
  11533. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11534. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11535. input, &dummy25_)));
  11536. } else {
  11537. goto handle_unusual;
  11538. }
  11539. break;
  11540. }
  11541. // optional int32 dummy26 = 26;
  11542. case 26: {
  11543. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11544. static_cast< ::google::protobuf::uint8>(208u /* 208 & 0xFF */)) {
  11545. set_has_dummy26();
  11546. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11547. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11548. input, &dummy26_)));
  11549. } else {
  11550. goto handle_unusual;
  11551. }
  11552. break;
  11553. }
  11554. // optional int32 dummy27 = 27;
  11555. case 27: {
  11556. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11557. static_cast< ::google::protobuf::uint8>(216u /* 216 & 0xFF */)) {
  11558. set_has_dummy27();
  11559. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11560. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11561. input, &dummy27_)));
  11562. } else {
  11563. goto handle_unusual;
  11564. }
  11565. break;
  11566. }
  11567. // optional int32 dummy28 = 28;
  11568. case 28: {
  11569. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11570. static_cast< ::google::protobuf::uint8>(224u /* 224 & 0xFF */)) {
  11571. set_has_dummy28();
  11572. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11573. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11574. input, &dummy28_)));
  11575. } else {
  11576. goto handle_unusual;
  11577. }
  11578. break;
  11579. }
  11580. // optional int32 dummy29 = 29;
  11581. case 29: {
  11582. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11583. static_cast< ::google::protobuf::uint8>(232u /* 232 & 0xFF */)) {
  11584. set_has_dummy29();
  11585. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11586. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11587. input, &dummy29_)));
  11588. } else {
  11589. goto handle_unusual;
  11590. }
  11591. break;
  11592. }
  11593. // optional int32 dummy30 = 30;
  11594. case 30: {
  11595. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11596. static_cast< ::google::protobuf::uint8>(240u /* 240 & 0xFF */)) {
  11597. set_has_dummy30();
  11598. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11599. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11600. input, &dummy30_)));
  11601. } else {
  11602. goto handle_unusual;
  11603. }
  11604. break;
  11605. }
  11606. // optional int32 dummy31 = 31;
  11607. case 31: {
  11608. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11609. static_cast< ::google::protobuf::uint8>(248u /* 248 & 0xFF */)) {
  11610. set_has_dummy31();
  11611. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11612. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11613. input, &dummy31_)));
  11614. } else {
  11615. goto handle_unusual;
  11616. }
  11617. break;
  11618. }
  11619. // optional int32 dummy32 = 32;
  11620. case 32: {
  11621. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11622. static_cast< ::google::protobuf::uint8>(0u /* 256 & 0xFF */)) {
  11623. set_has_dummy32();
  11624. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11625. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11626. input, &dummy32_)));
  11627. } else {
  11628. goto handle_unusual;
  11629. }
  11630. break;
  11631. }
  11632. // required int32 c = 33;
  11633. case 33: {
  11634. if (static_cast< ::google::protobuf::uint8>(tag) ==
  11635. static_cast< ::google::protobuf::uint8>(8u /* 264 & 0xFF */)) {
  11636. set_has_c();
  11637. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  11638. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  11639. input, &c_)));
  11640. } else {
  11641. goto handle_unusual;
  11642. }
  11643. break;
  11644. }
  11645. default: {
  11646. handle_unusual:
  11647. if (tag == 0) {
  11648. goto success;
  11649. }
  11650. DO_(::google::protobuf::internal::WireFormat::SkipField(
  11651. input, tag, _internal_metadata_.mutable_unknown_fields()));
  11652. break;
  11653. }
  11654. }
  11655. }
  11656. success:
  11657. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestRequired)
  11658. return true;
  11659. failure:
  11660. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestRequired)
  11661. return false;
  11662. #undef DO_
  11663. }
  11664. void TestRequired::SerializeWithCachedSizes(
  11665. ::google::protobuf::io::CodedOutputStream* output) const {
  11666. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestRequired)
  11667. ::google::protobuf::uint32 cached_has_bits = 0;
  11668. (void) cached_has_bits;
  11669. cached_has_bits = _has_bits_[0];
  11670. // required int32 a = 1;
  11671. if (cached_has_bits & 0x00000001u) {
  11672. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->a(), output);
  11673. }
  11674. // optional int32 dummy2 = 2;
  11675. if (cached_has_bits & 0x00000002u) {
  11676. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->dummy2(), output);
  11677. }
  11678. // required int32 b = 3;
  11679. if (cached_has_bits & 0x00000004u) {
  11680. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->b(), output);
  11681. }
  11682. // optional int32 dummy4 = 4;
  11683. if (cached_has_bits & 0x00000008u) {
  11684. ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->dummy4(), output);
  11685. }
  11686. // optional int32 dummy5 = 5;
  11687. if (cached_has_bits & 0x00000010u) {
  11688. ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->dummy5(), output);
  11689. }
  11690. // optional int32 dummy6 = 6;
  11691. if (cached_has_bits & 0x00000020u) {
  11692. ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->dummy6(), output);
  11693. }
  11694. // optional int32 dummy7 = 7;
  11695. if (cached_has_bits & 0x00000040u) {
  11696. ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->dummy7(), output);
  11697. }
  11698. // optional int32 dummy8 = 8;
  11699. if (cached_has_bits & 0x00000080u) {
  11700. ::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->dummy8(), output);
  11701. }
  11702. // optional int32 dummy9 = 9;
  11703. if (cached_has_bits & 0x00000100u) {
  11704. ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->dummy9(), output);
  11705. }
  11706. // optional int32 dummy10 = 10;
  11707. if (cached_has_bits & 0x00000200u) {
  11708. ::google::protobuf::internal::WireFormatLite::WriteInt32(10, this->dummy10(), output);
  11709. }
  11710. // optional int32 dummy11 = 11;
  11711. if (cached_has_bits & 0x00000400u) {
  11712. ::google::protobuf::internal::WireFormatLite::WriteInt32(11, this->dummy11(), output);
  11713. }
  11714. // optional int32 dummy12 = 12;
  11715. if (cached_has_bits & 0x00000800u) {
  11716. ::google::protobuf::internal::WireFormatLite::WriteInt32(12, this->dummy12(), output);
  11717. }
  11718. // optional int32 dummy13 = 13;
  11719. if (cached_has_bits & 0x00001000u) {
  11720. ::google::protobuf::internal::WireFormatLite::WriteInt32(13, this->dummy13(), output);
  11721. }
  11722. // optional int32 dummy14 = 14;
  11723. if (cached_has_bits & 0x00002000u) {
  11724. ::google::protobuf::internal::WireFormatLite::WriteInt32(14, this->dummy14(), output);
  11725. }
  11726. // optional int32 dummy15 = 15;
  11727. if (cached_has_bits & 0x00004000u) {
  11728. ::google::protobuf::internal::WireFormatLite::WriteInt32(15, this->dummy15(), output);
  11729. }
  11730. // optional int32 dummy16 = 16;
  11731. if (cached_has_bits & 0x00008000u) {
  11732. ::google::protobuf::internal::WireFormatLite::WriteInt32(16, this->dummy16(), output);
  11733. }
  11734. // optional int32 dummy17 = 17;
  11735. if (cached_has_bits & 0x00010000u) {
  11736. ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->dummy17(), output);
  11737. }
  11738. // optional int32 dummy18 = 18;
  11739. if (cached_has_bits & 0x00020000u) {
  11740. ::google::protobuf::internal::WireFormatLite::WriteInt32(18, this->dummy18(), output);
  11741. }
  11742. // optional int32 dummy19 = 19;
  11743. if (cached_has_bits & 0x00040000u) {
  11744. ::google::protobuf::internal::WireFormatLite::WriteInt32(19, this->dummy19(), output);
  11745. }
  11746. // optional int32 dummy20 = 20;
  11747. if (cached_has_bits & 0x00080000u) {
  11748. ::google::protobuf::internal::WireFormatLite::WriteInt32(20, this->dummy20(), output);
  11749. }
  11750. // optional int32 dummy21 = 21;
  11751. if (cached_has_bits & 0x00100000u) {
  11752. ::google::protobuf::internal::WireFormatLite::WriteInt32(21, this->dummy21(), output);
  11753. }
  11754. // optional int32 dummy22 = 22;
  11755. if (cached_has_bits & 0x00200000u) {
  11756. ::google::protobuf::internal::WireFormatLite::WriteInt32(22, this->dummy22(), output);
  11757. }
  11758. // optional int32 dummy23 = 23;
  11759. if (cached_has_bits & 0x00400000u) {
  11760. ::google::protobuf::internal::WireFormatLite::WriteInt32(23, this->dummy23(), output);
  11761. }
  11762. // optional int32 dummy24 = 24;
  11763. if (cached_has_bits & 0x00800000u) {
  11764. ::google::protobuf::internal::WireFormatLite::WriteInt32(24, this->dummy24(), output);
  11765. }
  11766. // optional int32 dummy25 = 25;
  11767. if (cached_has_bits & 0x01000000u) {
  11768. ::google::protobuf::internal::WireFormatLite::WriteInt32(25, this->dummy25(), output);
  11769. }
  11770. // optional int32 dummy26 = 26;
  11771. if (cached_has_bits & 0x02000000u) {
  11772. ::google::protobuf::internal::WireFormatLite::WriteInt32(26, this->dummy26(), output);
  11773. }
  11774. // optional int32 dummy27 = 27;
  11775. if (cached_has_bits & 0x04000000u) {
  11776. ::google::protobuf::internal::WireFormatLite::WriteInt32(27, this->dummy27(), output);
  11777. }
  11778. // optional int32 dummy28 = 28;
  11779. if (cached_has_bits & 0x08000000u) {
  11780. ::google::protobuf::internal::WireFormatLite::WriteInt32(28, this->dummy28(), output);
  11781. }
  11782. // optional int32 dummy29 = 29;
  11783. if (cached_has_bits & 0x10000000u) {
  11784. ::google::protobuf::internal::WireFormatLite::WriteInt32(29, this->dummy29(), output);
  11785. }
  11786. // optional int32 dummy30 = 30;
  11787. if (cached_has_bits & 0x20000000u) {
  11788. ::google::protobuf::internal::WireFormatLite::WriteInt32(30, this->dummy30(), output);
  11789. }
  11790. // optional int32 dummy31 = 31;
  11791. if (cached_has_bits & 0x40000000u) {
  11792. ::google::protobuf::internal::WireFormatLite::WriteInt32(31, this->dummy31(), output);
  11793. }
  11794. // optional int32 dummy32 = 32;
  11795. if (cached_has_bits & 0x80000000u) {
  11796. ::google::protobuf::internal::WireFormatLite::WriteInt32(32, this->dummy32(), output);
  11797. }
  11798. cached_has_bits = _has_bits_[1];
  11799. // required int32 c = 33;
  11800. if (cached_has_bits & 0x00000001u) {
  11801. ::google::protobuf::internal::WireFormatLite::WriteInt32(33, this->c(), output);
  11802. }
  11803. if (_internal_metadata_.have_unknown_fields()) {
  11804. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  11805. _internal_metadata_.unknown_fields(), output);
  11806. }
  11807. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestRequired)
  11808. }
  11809. ::google::protobuf::uint8* TestRequired::InternalSerializeWithCachedSizesToArray(
  11810. bool deterministic, ::google::protobuf::uint8* target) const {
  11811. (void)deterministic; // Unused
  11812. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestRequired)
  11813. ::google::protobuf::uint32 cached_has_bits = 0;
  11814. (void) cached_has_bits;
  11815. cached_has_bits = _has_bits_[0];
  11816. // required int32 a = 1;
  11817. if (cached_has_bits & 0x00000001u) {
  11818. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->a(), target);
  11819. }
  11820. // optional int32 dummy2 = 2;
  11821. if (cached_has_bits & 0x00000002u) {
  11822. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->dummy2(), target);
  11823. }
  11824. // required int32 b = 3;
  11825. if (cached_has_bits & 0x00000004u) {
  11826. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->b(), target);
  11827. }
  11828. // optional int32 dummy4 = 4;
  11829. if (cached_has_bits & 0x00000008u) {
  11830. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->dummy4(), target);
  11831. }
  11832. // optional int32 dummy5 = 5;
  11833. if (cached_has_bits & 0x00000010u) {
  11834. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->dummy5(), target);
  11835. }
  11836. // optional int32 dummy6 = 6;
  11837. if (cached_has_bits & 0x00000020u) {
  11838. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->dummy6(), target);
  11839. }
  11840. // optional int32 dummy7 = 7;
  11841. if (cached_has_bits & 0x00000040u) {
  11842. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->dummy7(), target);
  11843. }
  11844. // optional int32 dummy8 = 8;
  11845. if (cached_has_bits & 0x00000080u) {
  11846. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->dummy8(), target);
  11847. }
  11848. // optional int32 dummy9 = 9;
  11849. if (cached_has_bits & 0x00000100u) {
  11850. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->dummy9(), target);
  11851. }
  11852. // optional int32 dummy10 = 10;
  11853. if (cached_has_bits & 0x00000200u) {
  11854. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(10, this->dummy10(), target);
  11855. }
  11856. // optional int32 dummy11 = 11;
  11857. if (cached_has_bits & 0x00000400u) {
  11858. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(11, this->dummy11(), target);
  11859. }
  11860. // optional int32 dummy12 = 12;
  11861. if (cached_has_bits & 0x00000800u) {
  11862. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(12, this->dummy12(), target);
  11863. }
  11864. // optional int32 dummy13 = 13;
  11865. if (cached_has_bits & 0x00001000u) {
  11866. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(13, this->dummy13(), target);
  11867. }
  11868. // optional int32 dummy14 = 14;
  11869. if (cached_has_bits & 0x00002000u) {
  11870. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(14, this->dummy14(), target);
  11871. }
  11872. // optional int32 dummy15 = 15;
  11873. if (cached_has_bits & 0x00004000u) {
  11874. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(15, this->dummy15(), target);
  11875. }
  11876. // optional int32 dummy16 = 16;
  11877. if (cached_has_bits & 0x00008000u) {
  11878. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(16, this->dummy16(), target);
  11879. }
  11880. // optional int32 dummy17 = 17;
  11881. if (cached_has_bits & 0x00010000u) {
  11882. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(17, this->dummy17(), target);
  11883. }
  11884. // optional int32 dummy18 = 18;
  11885. if (cached_has_bits & 0x00020000u) {
  11886. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(18, this->dummy18(), target);
  11887. }
  11888. // optional int32 dummy19 = 19;
  11889. if (cached_has_bits & 0x00040000u) {
  11890. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(19, this->dummy19(), target);
  11891. }
  11892. // optional int32 dummy20 = 20;
  11893. if (cached_has_bits & 0x00080000u) {
  11894. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(20, this->dummy20(), target);
  11895. }
  11896. // optional int32 dummy21 = 21;
  11897. if (cached_has_bits & 0x00100000u) {
  11898. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(21, this->dummy21(), target);
  11899. }
  11900. // optional int32 dummy22 = 22;
  11901. if (cached_has_bits & 0x00200000u) {
  11902. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(22, this->dummy22(), target);
  11903. }
  11904. // optional int32 dummy23 = 23;
  11905. if (cached_has_bits & 0x00400000u) {
  11906. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(23, this->dummy23(), target);
  11907. }
  11908. // optional int32 dummy24 = 24;
  11909. if (cached_has_bits & 0x00800000u) {
  11910. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(24, this->dummy24(), target);
  11911. }
  11912. // optional int32 dummy25 = 25;
  11913. if (cached_has_bits & 0x01000000u) {
  11914. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(25, this->dummy25(), target);
  11915. }
  11916. // optional int32 dummy26 = 26;
  11917. if (cached_has_bits & 0x02000000u) {
  11918. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(26, this->dummy26(), target);
  11919. }
  11920. // optional int32 dummy27 = 27;
  11921. if (cached_has_bits & 0x04000000u) {
  11922. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(27, this->dummy27(), target);
  11923. }
  11924. // optional int32 dummy28 = 28;
  11925. if (cached_has_bits & 0x08000000u) {
  11926. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(28, this->dummy28(), target);
  11927. }
  11928. // optional int32 dummy29 = 29;
  11929. if (cached_has_bits & 0x10000000u) {
  11930. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(29, this->dummy29(), target);
  11931. }
  11932. // optional int32 dummy30 = 30;
  11933. if (cached_has_bits & 0x20000000u) {
  11934. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(30, this->dummy30(), target);
  11935. }
  11936. // optional int32 dummy31 = 31;
  11937. if (cached_has_bits & 0x40000000u) {
  11938. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(31, this->dummy31(), target);
  11939. }
  11940. // optional int32 dummy32 = 32;
  11941. if (cached_has_bits & 0x80000000u) {
  11942. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(32, this->dummy32(), target);
  11943. }
  11944. cached_has_bits = _has_bits_[1];
  11945. // required int32 c = 33;
  11946. if (cached_has_bits & 0x00000001u) {
  11947. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(33, this->c(), target);
  11948. }
  11949. if (_internal_metadata_.have_unknown_fields()) {
  11950. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  11951. _internal_metadata_.unknown_fields(), target);
  11952. }
  11953. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestRequired)
  11954. return target;
  11955. }
  11956. size_t TestRequired::RequiredFieldsByteSizeFallback() const {
  11957. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:protobuf_unittest.TestRequired)
  11958. size_t total_size = 0;
  11959. if (has_a()) {
  11960. // required int32 a = 1;
  11961. total_size += 1 +
  11962. ::google::protobuf::internal::WireFormatLite::Int32Size(
  11963. this->a());
  11964. }
  11965. if (has_b()) {
  11966. // required int32 b = 3;
  11967. total_size += 1 +
  11968. ::google::protobuf::internal::WireFormatLite::Int32Size(
  11969. this->b());
  11970. }
  11971. if (has_c()) {
  11972. // required int32 c = 33;
  11973. total_size += 2 +
  11974. ::google::protobuf::internal::WireFormatLite::Int32Size(
  11975. this->c());
  11976. }
  11977. return total_size;
  11978. }
  11979. size_t TestRequired::ByteSizeLong() const {
  11980. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestRequired)
  11981. size_t total_size = 0;
  11982. if (_internal_metadata_.have_unknown_fields()) {
  11983. total_size +=
  11984. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  11985. _internal_metadata_.unknown_fields());
  11986. }
  11987. if ((((_has_bits_[0] & 0x00000005) ^ 0x00000005)
  11988. | ((_has_bits_[1] & 0x00000001) ^ 0x00000001)) == 0) { // All required fields are present.
  11989. // required int32 a = 1;
  11990. total_size += 1 +
  11991. ::google::protobuf::internal::WireFormatLite::Int32Size(
  11992. this->a());
  11993. // required int32 b = 3;
  11994. total_size += 1 +
  11995. ::google::protobuf::internal::WireFormatLite::Int32Size(
  11996. this->b());
  11997. // required int32 c = 33;
  11998. total_size += 2 +
  11999. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12000. this->c());
  12001. } else {
  12002. total_size += RequiredFieldsByteSizeFallback();
  12003. }
  12004. // optional int32 dummy2 = 2;
  12005. if (has_dummy2()) {
  12006. total_size += 1 +
  12007. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12008. this->dummy2());
  12009. }
  12010. if (_has_bits_[0 / 32] & 248u) {
  12011. // optional int32 dummy4 = 4;
  12012. if (has_dummy4()) {
  12013. total_size += 1 +
  12014. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12015. this->dummy4());
  12016. }
  12017. // optional int32 dummy5 = 5;
  12018. if (has_dummy5()) {
  12019. total_size += 1 +
  12020. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12021. this->dummy5());
  12022. }
  12023. // optional int32 dummy6 = 6;
  12024. if (has_dummy6()) {
  12025. total_size += 1 +
  12026. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12027. this->dummy6());
  12028. }
  12029. // optional int32 dummy7 = 7;
  12030. if (has_dummy7()) {
  12031. total_size += 1 +
  12032. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12033. this->dummy7());
  12034. }
  12035. // optional int32 dummy8 = 8;
  12036. if (has_dummy8()) {
  12037. total_size += 1 +
  12038. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12039. this->dummy8());
  12040. }
  12041. }
  12042. if (_has_bits_[8 / 32] & 65280u) {
  12043. // optional int32 dummy9 = 9;
  12044. if (has_dummy9()) {
  12045. total_size += 1 +
  12046. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12047. this->dummy9());
  12048. }
  12049. // optional int32 dummy10 = 10;
  12050. if (has_dummy10()) {
  12051. total_size += 1 +
  12052. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12053. this->dummy10());
  12054. }
  12055. // optional int32 dummy11 = 11;
  12056. if (has_dummy11()) {
  12057. total_size += 1 +
  12058. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12059. this->dummy11());
  12060. }
  12061. // optional int32 dummy12 = 12;
  12062. if (has_dummy12()) {
  12063. total_size += 1 +
  12064. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12065. this->dummy12());
  12066. }
  12067. // optional int32 dummy13 = 13;
  12068. if (has_dummy13()) {
  12069. total_size += 1 +
  12070. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12071. this->dummy13());
  12072. }
  12073. // optional int32 dummy14 = 14;
  12074. if (has_dummy14()) {
  12075. total_size += 1 +
  12076. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12077. this->dummy14());
  12078. }
  12079. // optional int32 dummy15 = 15;
  12080. if (has_dummy15()) {
  12081. total_size += 1 +
  12082. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12083. this->dummy15());
  12084. }
  12085. // optional int32 dummy16 = 16;
  12086. if (has_dummy16()) {
  12087. total_size += 2 +
  12088. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12089. this->dummy16());
  12090. }
  12091. }
  12092. if (_has_bits_[16 / 32] & 16711680u) {
  12093. // optional int32 dummy17 = 17;
  12094. if (has_dummy17()) {
  12095. total_size += 2 +
  12096. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12097. this->dummy17());
  12098. }
  12099. // optional int32 dummy18 = 18;
  12100. if (has_dummy18()) {
  12101. total_size += 2 +
  12102. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12103. this->dummy18());
  12104. }
  12105. // optional int32 dummy19 = 19;
  12106. if (has_dummy19()) {
  12107. total_size += 2 +
  12108. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12109. this->dummy19());
  12110. }
  12111. // optional int32 dummy20 = 20;
  12112. if (has_dummy20()) {
  12113. total_size += 2 +
  12114. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12115. this->dummy20());
  12116. }
  12117. // optional int32 dummy21 = 21;
  12118. if (has_dummy21()) {
  12119. total_size += 2 +
  12120. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12121. this->dummy21());
  12122. }
  12123. // optional int32 dummy22 = 22;
  12124. if (has_dummy22()) {
  12125. total_size += 2 +
  12126. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12127. this->dummy22());
  12128. }
  12129. // optional int32 dummy23 = 23;
  12130. if (has_dummy23()) {
  12131. total_size += 2 +
  12132. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12133. this->dummy23());
  12134. }
  12135. // optional int32 dummy24 = 24;
  12136. if (has_dummy24()) {
  12137. total_size += 2 +
  12138. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12139. this->dummy24());
  12140. }
  12141. }
  12142. if (_has_bits_[24 / 32] & 4278190080u) {
  12143. // optional int32 dummy25 = 25;
  12144. if (has_dummy25()) {
  12145. total_size += 2 +
  12146. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12147. this->dummy25());
  12148. }
  12149. // optional int32 dummy26 = 26;
  12150. if (has_dummy26()) {
  12151. total_size += 2 +
  12152. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12153. this->dummy26());
  12154. }
  12155. // optional int32 dummy27 = 27;
  12156. if (has_dummy27()) {
  12157. total_size += 2 +
  12158. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12159. this->dummy27());
  12160. }
  12161. // optional int32 dummy28 = 28;
  12162. if (has_dummy28()) {
  12163. total_size += 2 +
  12164. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12165. this->dummy28());
  12166. }
  12167. // optional int32 dummy29 = 29;
  12168. if (has_dummy29()) {
  12169. total_size += 2 +
  12170. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12171. this->dummy29());
  12172. }
  12173. // optional int32 dummy30 = 30;
  12174. if (has_dummy30()) {
  12175. total_size += 2 +
  12176. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12177. this->dummy30());
  12178. }
  12179. // optional int32 dummy31 = 31;
  12180. if (has_dummy31()) {
  12181. total_size += 2 +
  12182. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12183. this->dummy31());
  12184. }
  12185. // optional int32 dummy32 = 32;
  12186. if (has_dummy32()) {
  12187. total_size += 2 +
  12188. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12189. this->dummy32());
  12190. }
  12191. }
  12192. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  12193. SetCachedSize(cached_size);
  12194. return total_size;
  12195. }
  12196. void TestRequired::MergeFrom(const ::google::protobuf::Message& from) {
  12197. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestRequired)
  12198. GOOGLE_DCHECK_NE(&from, this);
  12199. const TestRequired* source =
  12200. ::google::protobuf::internal::DynamicCastToGenerated<const TestRequired>(
  12201. &from);
  12202. if (source == NULL) {
  12203. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestRequired)
  12204. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  12205. } else {
  12206. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestRequired)
  12207. MergeFrom(*source);
  12208. }
  12209. }
  12210. void TestRequired::MergeFrom(const TestRequired& from) {
  12211. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestRequired)
  12212. GOOGLE_DCHECK_NE(&from, this);
  12213. _internal_metadata_.MergeFrom(from._internal_metadata_);
  12214. ::google::protobuf::uint32 cached_has_bits = 0;
  12215. (void) cached_has_bits;
  12216. cached_has_bits = from._has_bits_[0];
  12217. if (cached_has_bits & 255u) {
  12218. if (cached_has_bits & 0x00000001u) {
  12219. a_ = from.a_;
  12220. }
  12221. if (cached_has_bits & 0x00000002u) {
  12222. dummy2_ = from.dummy2_;
  12223. }
  12224. if (cached_has_bits & 0x00000004u) {
  12225. b_ = from.b_;
  12226. }
  12227. if (cached_has_bits & 0x00000008u) {
  12228. dummy4_ = from.dummy4_;
  12229. }
  12230. if (cached_has_bits & 0x00000010u) {
  12231. dummy5_ = from.dummy5_;
  12232. }
  12233. if (cached_has_bits & 0x00000020u) {
  12234. dummy6_ = from.dummy6_;
  12235. }
  12236. if (cached_has_bits & 0x00000040u) {
  12237. dummy7_ = from.dummy7_;
  12238. }
  12239. if (cached_has_bits & 0x00000080u) {
  12240. dummy8_ = from.dummy8_;
  12241. }
  12242. _has_bits_[0] |= cached_has_bits;
  12243. }
  12244. if (cached_has_bits & 65280u) {
  12245. if (cached_has_bits & 0x00000100u) {
  12246. dummy9_ = from.dummy9_;
  12247. }
  12248. if (cached_has_bits & 0x00000200u) {
  12249. dummy10_ = from.dummy10_;
  12250. }
  12251. if (cached_has_bits & 0x00000400u) {
  12252. dummy11_ = from.dummy11_;
  12253. }
  12254. if (cached_has_bits & 0x00000800u) {
  12255. dummy12_ = from.dummy12_;
  12256. }
  12257. if (cached_has_bits & 0x00001000u) {
  12258. dummy13_ = from.dummy13_;
  12259. }
  12260. if (cached_has_bits & 0x00002000u) {
  12261. dummy14_ = from.dummy14_;
  12262. }
  12263. if (cached_has_bits & 0x00004000u) {
  12264. dummy15_ = from.dummy15_;
  12265. }
  12266. if (cached_has_bits & 0x00008000u) {
  12267. dummy16_ = from.dummy16_;
  12268. }
  12269. _has_bits_[0] |= cached_has_bits;
  12270. }
  12271. if (cached_has_bits & 16711680u) {
  12272. if (cached_has_bits & 0x00010000u) {
  12273. dummy17_ = from.dummy17_;
  12274. }
  12275. if (cached_has_bits & 0x00020000u) {
  12276. dummy18_ = from.dummy18_;
  12277. }
  12278. if (cached_has_bits & 0x00040000u) {
  12279. dummy19_ = from.dummy19_;
  12280. }
  12281. if (cached_has_bits & 0x00080000u) {
  12282. dummy20_ = from.dummy20_;
  12283. }
  12284. if (cached_has_bits & 0x00100000u) {
  12285. dummy21_ = from.dummy21_;
  12286. }
  12287. if (cached_has_bits & 0x00200000u) {
  12288. dummy22_ = from.dummy22_;
  12289. }
  12290. if (cached_has_bits & 0x00400000u) {
  12291. dummy23_ = from.dummy23_;
  12292. }
  12293. if (cached_has_bits & 0x00800000u) {
  12294. dummy24_ = from.dummy24_;
  12295. }
  12296. _has_bits_[0] |= cached_has_bits;
  12297. }
  12298. if (cached_has_bits & 4278190080u) {
  12299. if (cached_has_bits & 0x01000000u) {
  12300. dummy25_ = from.dummy25_;
  12301. }
  12302. if (cached_has_bits & 0x02000000u) {
  12303. dummy26_ = from.dummy26_;
  12304. }
  12305. if (cached_has_bits & 0x04000000u) {
  12306. dummy27_ = from.dummy27_;
  12307. }
  12308. if (cached_has_bits & 0x08000000u) {
  12309. dummy28_ = from.dummy28_;
  12310. }
  12311. if (cached_has_bits & 0x10000000u) {
  12312. dummy29_ = from.dummy29_;
  12313. }
  12314. if (cached_has_bits & 0x20000000u) {
  12315. dummy30_ = from.dummy30_;
  12316. }
  12317. if (cached_has_bits & 0x40000000u) {
  12318. dummy31_ = from.dummy31_;
  12319. }
  12320. if (cached_has_bits & 0x80000000u) {
  12321. dummy32_ = from.dummy32_;
  12322. }
  12323. _has_bits_[0] |= cached_has_bits;
  12324. }
  12325. if (from.has_c()) {
  12326. set_c(from.c());
  12327. }
  12328. }
  12329. void TestRequired::CopyFrom(const ::google::protobuf::Message& from) {
  12330. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestRequired)
  12331. if (&from == this) return;
  12332. Clear();
  12333. MergeFrom(from);
  12334. }
  12335. void TestRequired::CopyFrom(const TestRequired& from) {
  12336. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestRequired)
  12337. if (&from == this) return;
  12338. Clear();
  12339. MergeFrom(from);
  12340. }
  12341. bool TestRequired::IsInitialized() const {
  12342. if ((_has_bits_[0] & 0x00000005) != 0x00000005) return false;
  12343. if ((_has_bits_[1] & 0x00000001) != 0x00000001) return false;
  12344. return true;
  12345. }
  12346. void TestRequired::Swap(TestRequired* other) {
  12347. if (other == this) return;
  12348. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  12349. InternalSwap(other);
  12350. } else {
  12351. TestRequired* temp = New(GetArenaNoVirtual());
  12352. temp->MergeFrom(*other);
  12353. other->CopyFrom(*this);
  12354. InternalSwap(temp);
  12355. if (GetArenaNoVirtual() == NULL) {
  12356. delete temp;
  12357. }
  12358. }
  12359. }
  12360. void TestRequired::UnsafeArenaSwap(TestRequired* other) {
  12361. if (other == this) return;
  12362. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  12363. InternalSwap(other);
  12364. }
  12365. void TestRequired::InternalSwap(TestRequired* other) {
  12366. using std::swap;
  12367. swap(a_, other->a_);
  12368. swap(dummy2_, other->dummy2_);
  12369. swap(b_, other->b_);
  12370. swap(dummy4_, other->dummy4_);
  12371. swap(dummy5_, other->dummy5_);
  12372. swap(dummy6_, other->dummy6_);
  12373. swap(dummy7_, other->dummy7_);
  12374. swap(dummy8_, other->dummy8_);
  12375. swap(dummy9_, other->dummy9_);
  12376. swap(dummy10_, other->dummy10_);
  12377. swap(dummy11_, other->dummy11_);
  12378. swap(dummy12_, other->dummy12_);
  12379. swap(dummy13_, other->dummy13_);
  12380. swap(dummy14_, other->dummy14_);
  12381. swap(dummy15_, other->dummy15_);
  12382. swap(dummy16_, other->dummy16_);
  12383. swap(dummy17_, other->dummy17_);
  12384. swap(dummy18_, other->dummy18_);
  12385. swap(dummy19_, other->dummy19_);
  12386. swap(dummy20_, other->dummy20_);
  12387. swap(dummy21_, other->dummy21_);
  12388. swap(dummy22_, other->dummy22_);
  12389. swap(dummy23_, other->dummy23_);
  12390. swap(dummy24_, other->dummy24_);
  12391. swap(dummy25_, other->dummy25_);
  12392. swap(dummy26_, other->dummy26_);
  12393. swap(dummy27_, other->dummy27_);
  12394. swap(dummy28_, other->dummy28_);
  12395. swap(dummy29_, other->dummy29_);
  12396. swap(dummy30_, other->dummy30_);
  12397. swap(dummy31_, other->dummy31_);
  12398. swap(dummy32_, other->dummy32_);
  12399. swap(c_, other->c_);
  12400. swap(_has_bits_[0], other->_has_bits_[0]);
  12401. swap(_has_bits_[1], other->_has_bits_[1]);
  12402. _internal_metadata_.Swap(&other->_internal_metadata_);
  12403. }
  12404. ::google::protobuf::Metadata TestRequired::GetMetadata() const {
  12405. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  12406. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  12407. }
  12408. // ===================================================================
  12409. void TestRequiredForeign::InitAsDefaultInstance() {
  12410. ::protobuf_unittest::_TestRequiredForeign_default_instance_._instance.get_mutable()->optional_message_ = const_cast< ::protobuf_unittest::TestRequired*>(
  12411. ::protobuf_unittest::TestRequired::internal_default_instance());
  12412. }
  12413. void TestRequiredForeign::unsafe_arena_set_allocated_optional_message(
  12414. ::protobuf_unittest::TestRequired* optional_message) {
  12415. if (GetArenaNoVirtual() == NULL) {
  12416. delete optional_message_;
  12417. }
  12418. optional_message_ = optional_message;
  12419. if (optional_message) {
  12420. set_has_optional_message();
  12421. } else {
  12422. clear_has_optional_message();
  12423. }
  12424. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestRequiredForeign.optional_message)
  12425. }
  12426. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  12427. const int TestRequiredForeign::kOptionalMessageFieldNumber;
  12428. const int TestRequiredForeign::kRepeatedMessageFieldNumber;
  12429. const int TestRequiredForeign::kDummyFieldNumber;
  12430. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  12431. TestRequiredForeign::TestRequiredForeign()
  12432. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  12433. ::google::protobuf::internal::InitSCC(
  12434. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredForeign.base);
  12435. SharedCtor();
  12436. // @@protoc_insertion_point(constructor:protobuf_unittest.TestRequiredForeign)
  12437. }
  12438. TestRequiredForeign::TestRequiredForeign(::google::protobuf::Arena* arena)
  12439. : ::google::protobuf::Message(),
  12440. _internal_metadata_(arena),
  12441. repeated_message_(arena) {
  12442. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredForeign.base);
  12443. SharedCtor();
  12444. RegisterArenaDtor(arena);
  12445. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestRequiredForeign)
  12446. }
  12447. TestRequiredForeign::TestRequiredForeign(const TestRequiredForeign& from)
  12448. : ::google::protobuf::Message(),
  12449. _internal_metadata_(NULL),
  12450. _has_bits_(from._has_bits_),
  12451. repeated_message_(from.repeated_message_) {
  12452. _internal_metadata_.MergeFrom(from._internal_metadata_);
  12453. if (from.has_optional_message()) {
  12454. optional_message_ = new ::protobuf_unittest::TestRequired(*from.optional_message_);
  12455. } else {
  12456. optional_message_ = NULL;
  12457. }
  12458. dummy_ = from.dummy_;
  12459. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestRequiredForeign)
  12460. }
  12461. void TestRequiredForeign::SharedCtor() {
  12462. ::memset(&optional_message_, 0, static_cast<size_t>(
  12463. reinterpret_cast<char*>(&dummy_) -
  12464. reinterpret_cast<char*>(&optional_message_)) + sizeof(dummy_));
  12465. }
  12466. TestRequiredForeign::~TestRequiredForeign() {
  12467. // @@protoc_insertion_point(destructor:protobuf_unittest.TestRequiredForeign)
  12468. SharedDtor();
  12469. }
  12470. void TestRequiredForeign::SharedDtor() {
  12471. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  12472. if (this != internal_default_instance()) delete optional_message_;
  12473. }
  12474. void TestRequiredForeign::ArenaDtor(void* object) {
  12475. TestRequiredForeign* _this = reinterpret_cast< TestRequiredForeign* >(object);
  12476. (void)_this;
  12477. }
  12478. void TestRequiredForeign::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  12479. }
  12480. void TestRequiredForeign::SetCachedSize(int size) const {
  12481. _cached_size_.Set(size);
  12482. }
  12483. const ::google::protobuf::Descriptor* TestRequiredForeign::descriptor() {
  12484. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  12485. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  12486. }
  12487. const TestRequiredForeign& TestRequiredForeign::default_instance() {
  12488. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredForeign.base);
  12489. return *internal_default_instance();
  12490. }
  12491. void TestRequiredForeign::Clear() {
  12492. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestRequiredForeign)
  12493. ::google::protobuf::uint32 cached_has_bits = 0;
  12494. // Prevent compiler warnings about cached_has_bits being unused
  12495. (void) cached_has_bits;
  12496. repeated_message_.Clear();
  12497. cached_has_bits = _has_bits_[0];
  12498. if (cached_has_bits & 0x00000001u) {
  12499. GOOGLE_DCHECK(optional_message_ != NULL);
  12500. optional_message_->Clear();
  12501. }
  12502. dummy_ = 0;
  12503. _has_bits_.Clear();
  12504. _internal_metadata_.Clear();
  12505. }
  12506. bool TestRequiredForeign::MergePartialFromCodedStream(
  12507. ::google::protobuf::io::CodedInputStream* input) {
  12508. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  12509. ::google::protobuf::uint32 tag;
  12510. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestRequiredForeign)
  12511. for (;;) {
  12512. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  12513. tag = p.first;
  12514. if (!p.second) goto handle_unusual;
  12515. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  12516. // optional .protobuf_unittest.TestRequired optional_message = 1;
  12517. case 1: {
  12518. if (static_cast< ::google::protobuf::uint8>(tag) ==
  12519. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  12520. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  12521. input, mutable_optional_message()));
  12522. } else {
  12523. goto handle_unusual;
  12524. }
  12525. break;
  12526. }
  12527. // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  12528. case 2: {
  12529. if (static_cast< ::google::protobuf::uint8>(tag) ==
  12530. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  12531. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  12532. input, add_repeated_message()));
  12533. } else {
  12534. goto handle_unusual;
  12535. }
  12536. break;
  12537. }
  12538. // optional int32 dummy = 3;
  12539. case 3: {
  12540. if (static_cast< ::google::protobuf::uint8>(tag) ==
  12541. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  12542. set_has_dummy();
  12543. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  12544. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  12545. input, &dummy_)));
  12546. } else {
  12547. goto handle_unusual;
  12548. }
  12549. break;
  12550. }
  12551. default: {
  12552. handle_unusual:
  12553. if (tag == 0) {
  12554. goto success;
  12555. }
  12556. DO_(::google::protobuf::internal::WireFormat::SkipField(
  12557. input, tag, _internal_metadata_.mutable_unknown_fields()));
  12558. break;
  12559. }
  12560. }
  12561. }
  12562. success:
  12563. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestRequiredForeign)
  12564. return true;
  12565. failure:
  12566. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestRequiredForeign)
  12567. return false;
  12568. #undef DO_
  12569. }
  12570. void TestRequiredForeign::SerializeWithCachedSizes(
  12571. ::google::protobuf::io::CodedOutputStream* output) const {
  12572. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestRequiredForeign)
  12573. ::google::protobuf::uint32 cached_has_bits = 0;
  12574. (void) cached_has_bits;
  12575. cached_has_bits = _has_bits_[0];
  12576. // optional .protobuf_unittest.TestRequired optional_message = 1;
  12577. if (cached_has_bits & 0x00000001u) {
  12578. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  12579. 1, this->_internal_optional_message(), output);
  12580. }
  12581. // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  12582. for (unsigned int i = 0,
  12583. n = static_cast<unsigned int>(this->repeated_message_size()); i < n; i++) {
  12584. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  12585. 2,
  12586. this->repeated_message(static_cast<int>(i)),
  12587. output);
  12588. }
  12589. // optional int32 dummy = 3;
  12590. if (cached_has_bits & 0x00000002u) {
  12591. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->dummy(), output);
  12592. }
  12593. if (_internal_metadata_.have_unknown_fields()) {
  12594. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  12595. _internal_metadata_.unknown_fields(), output);
  12596. }
  12597. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestRequiredForeign)
  12598. }
  12599. ::google::protobuf::uint8* TestRequiredForeign::InternalSerializeWithCachedSizesToArray(
  12600. bool deterministic, ::google::protobuf::uint8* target) const {
  12601. (void)deterministic; // Unused
  12602. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestRequiredForeign)
  12603. ::google::protobuf::uint32 cached_has_bits = 0;
  12604. (void) cached_has_bits;
  12605. cached_has_bits = _has_bits_[0];
  12606. // optional .protobuf_unittest.TestRequired optional_message = 1;
  12607. if (cached_has_bits & 0x00000001u) {
  12608. target = ::google::protobuf::internal::WireFormatLite::
  12609. InternalWriteMessageToArray(
  12610. 1, this->_internal_optional_message(), deterministic, target);
  12611. }
  12612. // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  12613. for (unsigned int i = 0,
  12614. n = static_cast<unsigned int>(this->repeated_message_size()); i < n; i++) {
  12615. target = ::google::protobuf::internal::WireFormatLite::
  12616. InternalWriteMessageToArray(
  12617. 2, this->repeated_message(static_cast<int>(i)), deterministic, target);
  12618. }
  12619. // optional int32 dummy = 3;
  12620. if (cached_has_bits & 0x00000002u) {
  12621. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->dummy(), target);
  12622. }
  12623. if (_internal_metadata_.have_unknown_fields()) {
  12624. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  12625. _internal_metadata_.unknown_fields(), target);
  12626. }
  12627. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestRequiredForeign)
  12628. return target;
  12629. }
  12630. size_t TestRequiredForeign::ByteSizeLong() const {
  12631. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestRequiredForeign)
  12632. size_t total_size = 0;
  12633. if (_internal_metadata_.have_unknown_fields()) {
  12634. total_size +=
  12635. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  12636. _internal_metadata_.unknown_fields());
  12637. }
  12638. // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  12639. {
  12640. unsigned int count = static_cast<unsigned int>(this->repeated_message_size());
  12641. total_size += 1UL * count;
  12642. for (unsigned int i = 0; i < count; i++) {
  12643. total_size +=
  12644. ::google::protobuf::internal::WireFormatLite::MessageSize(
  12645. this->repeated_message(static_cast<int>(i)));
  12646. }
  12647. }
  12648. if (_has_bits_[0 / 32] & 3u) {
  12649. // optional .protobuf_unittest.TestRequired optional_message = 1;
  12650. if (has_optional_message()) {
  12651. total_size += 1 +
  12652. ::google::protobuf::internal::WireFormatLite::MessageSize(
  12653. *optional_message_);
  12654. }
  12655. // optional int32 dummy = 3;
  12656. if (has_dummy()) {
  12657. total_size += 1 +
  12658. ::google::protobuf::internal::WireFormatLite::Int32Size(
  12659. this->dummy());
  12660. }
  12661. }
  12662. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  12663. SetCachedSize(cached_size);
  12664. return total_size;
  12665. }
  12666. void TestRequiredForeign::MergeFrom(const ::google::protobuf::Message& from) {
  12667. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestRequiredForeign)
  12668. GOOGLE_DCHECK_NE(&from, this);
  12669. const TestRequiredForeign* source =
  12670. ::google::protobuf::internal::DynamicCastToGenerated<const TestRequiredForeign>(
  12671. &from);
  12672. if (source == NULL) {
  12673. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestRequiredForeign)
  12674. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  12675. } else {
  12676. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestRequiredForeign)
  12677. MergeFrom(*source);
  12678. }
  12679. }
  12680. void TestRequiredForeign::MergeFrom(const TestRequiredForeign& from) {
  12681. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestRequiredForeign)
  12682. GOOGLE_DCHECK_NE(&from, this);
  12683. _internal_metadata_.MergeFrom(from._internal_metadata_);
  12684. ::google::protobuf::uint32 cached_has_bits = 0;
  12685. (void) cached_has_bits;
  12686. repeated_message_.MergeFrom(from.repeated_message_);
  12687. cached_has_bits = from._has_bits_[0];
  12688. if (cached_has_bits & 3u) {
  12689. if (cached_has_bits & 0x00000001u) {
  12690. mutable_optional_message()->::protobuf_unittest::TestRequired::MergeFrom(from.optional_message());
  12691. }
  12692. if (cached_has_bits & 0x00000002u) {
  12693. dummy_ = from.dummy_;
  12694. }
  12695. _has_bits_[0] |= cached_has_bits;
  12696. }
  12697. }
  12698. void TestRequiredForeign::CopyFrom(const ::google::protobuf::Message& from) {
  12699. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestRequiredForeign)
  12700. if (&from == this) return;
  12701. Clear();
  12702. MergeFrom(from);
  12703. }
  12704. void TestRequiredForeign::CopyFrom(const TestRequiredForeign& from) {
  12705. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestRequiredForeign)
  12706. if (&from == this) return;
  12707. Clear();
  12708. MergeFrom(from);
  12709. }
  12710. bool TestRequiredForeign::IsInitialized() const {
  12711. if (!::google::protobuf::internal::AllAreInitialized(this->repeated_message())) return false;
  12712. if (has_optional_message()) {
  12713. if (!this->optional_message_->IsInitialized()) return false;
  12714. }
  12715. return true;
  12716. }
  12717. void TestRequiredForeign::Swap(TestRequiredForeign* other) {
  12718. if (other == this) return;
  12719. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  12720. InternalSwap(other);
  12721. } else {
  12722. TestRequiredForeign* temp = New(GetArenaNoVirtual());
  12723. temp->MergeFrom(*other);
  12724. other->CopyFrom(*this);
  12725. InternalSwap(temp);
  12726. if (GetArenaNoVirtual() == NULL) {
  12727. delete temp;
  12728. }
  12729. }
  12730. }
  12731. void TestRequiredForeign::UnsafeArenaSwap(TestRequiredForeign* other) {
  12732. if (other == this) return;
  12733. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  12734. InternalSwap(other);
  12735. }
  12736. void TestRequiredForeign::InternalSwap(TestRequiredForeign* other) {
  12737. using std::swap;
  12738. CastToBase(&repeated_message_)->InternalSwap(CastToBase(&other->repeated_message_));
  12739. swap(optional_message_, other->optional_message_);
  12740. swap(dummy_, other->dummy_);
  12741. swap(_has_bits_[0], other->_has_bits_[0]);
  12742. _internal_metadata_.Swap(&other->_internal_metadata_);
  12743. }
  12744. ::google::protobuf::Metadata TestRequiredForeign::GetMetadata() const {
  12745. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  12746. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  12747. }
  12748. // ===================================================================
  12749. void TestRequiredMessage::InitAsDefaultInstance() {
  12750. ::protobuf_unittest::_TestRequiredMessage_default_instance_._instance.get_mutable()->optional_message_ = const_cast< ::protobuf_unittest::TestRequired*>(
  12751. ::protobuf_unittest::TestRequired::internal_default_instance());
  12752. ::protobuf_unittest::_TestRequiredMessage_default_instance_._instance.get_mutable()->required_message_ = const_cast< ::protobuf_unittest::TestRequired*>(
  12753. ::protobuf_unittest::TestRequired::internal_default_instance());
  12754. }
  12755. void TestRequiredMessage::unsafe_arena_set_allocated_optional_message(
  12756. ::protobuf_unittest::TestRequired* optional_message) {
  12757. if (GetArenaNoVirtual() == NULL) {
  12758. delete optional_message_;
  12759. }
  12760. optional_message_ = optional_message;
  12761. if (optional_message) {
  12762. set_has_optional_message();
  12763. } else {
  12764. clear_has_optional_message();
  12765. }
  12766. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestRequiredMessage.optional_message)
  12767. }
  12768. void TestRequiredMessage::unsafe_arena_set_allocated_required_message(
  12769. ::protobuf_unittest::TestRequired* required_message) {
  12770. if (GetArenaNoVirtual() == NULL) {
  12771. delete required_message_;
  12772. }
  12773. required_message_ = required_message;
  12774. if (required_message) {
  12775. set_has_required_message();
  12776. } else {
  12777. clear_has_required_message();
  12778. }
  12779. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestRequiredMessage.required_message)
  12780. }
  12781. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  12782. const int TestRequiredMessage::kOptionalMessageFieldNumber;
  12783. const int TestRequiredMessage::kRepeatedMessageFieldNumber;
  12784. const int TestRequiredMessage::kRequiredMessageFieldNumber;
  12785. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  12786. TestRequiredMessage::TestRequiredMessage()
  12787. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  12788. ::google::protobuf::internal::InitSCC(
  12789. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredMessage.base);
  12790. SharedCtor();
  12791. // @@protoc_insertion_point(constructor:protobuf_unittest.TestRequiredMessage)
  12792. }
  12793. TestRequiredMessage::TestRequiredMessage(::google::protobuf::Arena* arena)
  12794. : ::google::protobuf::Message(),
  12795. _internal_metadata_(arena),
  12796. repeated_message_(arena) {
  12797. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredMessage.base);
  12798. SharedCtor();
  12799. RegisterArenaDtor(arena);
  12800. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestRequiredMessage)
  12801. }
  12802. TestRequiredMessage::TestRequiredMessage(const TestRequiredMessage& from)
  12803. : ::google::protobuf::Message(),
  12804. _internal_metadata_(NULL),
  12805. _has_bits_(from._has_bits_),
  12806. repeated_message_(from.repeated_message_) {
  12807. _internal_metadata_.MergeFrom(from._internal_metadata_);
  12808. if (from.has_optional_message()) {
  12809. optional_message_ = new ::protobuf_unittest::TestRequired(*from.optional_message_);
  12810. } else {
  12811. optional_message_ = NULL;
  12812. }
  12813. if (from.has_required_message()) {
  12814. required_message_ = new ::protobuf_unittest::TestRequired(*from.required_message_);
  12815. } else {
  12816. required_message_ = NULL;
  12817. }
  12818. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestRequiredMessage)
  12819. }
  12820. void TestRequiredMessage::SharedCtor() {
  12821. ::memset(&optional_message_, 0, static_cast<size_t>(
  12822. reinterpret_cast<char*>(&required_message_) -
  12823. reinterpret_cast<char*>(&optional_message_)) + sizeof(required_message_));
  12824. }
  12825. TestRequiredMessage::~TestRequiredMessage() {
  12826. // @@protoc_insertion_point(destructor:protobuf_unittest.TestRequiredMessage)
  12827. SharedDtor();
  12828. }
  12829. void TestRequiredMessage::SharedDtor() {
  12830. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  12831. if (this != internal_default_instance()) delete optional_message_;
  12832. if (this != internal_default_instance()) delete required_message_;
  12833. }
  12834. void TestRequiredMessage::ArenaDtor(void* object) {
  12835. TestRequiredMessage* _this = reinterpret_cast< TestRequiredMessage* >(object);
  12836. (void)_this;
  12837. }
  12838. void TestRequiredMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  12839. }
  12840. void TestRequiredMessage::SetCachedSize(int size) const {
  12841. _cached_size_.Set(size);
  12842. }
  12843. const ::google::protobuf::Descriptor* TestRequiredMessage::descriptor() {
  12844. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  12845. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  12846. }
  12847. const TestRequiredMessage& TestRequiredMessage::default_instance() {
  12848. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredMessage.base);
  12849. return *internal_default_instance();
  12850. }
  12851. void TestRequiredMessage::Clear() {
  12852. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestRequiredMessage)
  12853. ::google::protobuf::uint32 cached_has_bits = 0;
  12854. // Prevent compiler warnings about cached_has_bits being unused
  12855. (void) cached_has_bits;
  12856. repeated_message_.Clear();
  12857. cached_has_bits = _has_bits_[0];
  12858. if (cached_has_bits & 3u) {
  12859. if (cached_has_bits & 0x00000001u) {
  12860. GOOGLE_DCHECK(optional_message_ != NULL);
  12861. optional_message_->Clear();
  12862. }
  12863. if (cached_has_bits & 0x00000002u) {
  12864. GOOGLE_DCHECK(required_message_ != NULL);
  12865. required_message_->Clear();
  12866. }
  12867. }
  12868. _has_bits_.Clear();
  12869. _internal_metadata_.Clear();
  12870. }
  12871. bool TestRequiredMessage::MergePartialFromCodedStream(
  12872. ::google::protobuf::io::CodedInputStream* input) {
  12873. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  12874. ::google::protobuf::uint32 tag;
  12875. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestRequiredMessage)
  12876. for (;;) {
  12877. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  12878. tag = p.first;
  12879. if (!p.second) goto handle_unusual;
  12880. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  12881. // optional .protobuf_unittest.TestRequired optional_message = 1;
  12882. case 1: {
  12883. if (static_cast< ::google::protobuf::uint8>(tag) ==
  12884. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  12885. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  12886. input, mutable_optional_message()));
  12887. } else {
  12888. goto handle_unusual;
  12889. }
  12890. break;
  12891. }
  12892. // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  12893. case 2: {
  12894. if (static_cast< ::google::protobuf::uint8>(tag) ==
  12895. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  12896. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  12897. input, add_repeated_message()));
  12898. } else {
  12899. goto handle_unusual;
  12900. }
  12901. break;
  12902. }
  12903. // required .protobuf_unittest.TestRequired required_message = 3;
  12904. case 3: {
  12905. if (static_cast< ::google::protobuf::uint8>(tag) ==
  12906. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  12907. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  12908. input, mutable_required_message()));
  12909. } else {
  12910. goto handle_unusual;
  12911. }
  12912. break;
  12913. }
  12914. default: {
  12915. handle_unusual:
  12916. if (tag == 0) {
  12917. goto success;
  12918. }
  12919. DO_(::google::protobuf::internal::WireFormat::SkipField(
  12920. input, tag, _internal_metadata_.mutable_unknown_fields()));
  12921. break;
  12922. }
  12923. }
  12924. }
  12925. success:
  12926. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestRequiredMessage)
  12927. return true;
  12928. failure:
  12929. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestRequiredMessage)
  12930. return false;
  12931. #undef DO_
  12932. }
  12933. void TestRequiredMessage::SerializeWithCachedSizes(
  12934. ::google::protobuf::io::CodedOutputStream* output) const {
  12935. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestRequiredMessage)
  12936. ::google::protobuf::uint32 cached_has_bits = 0;
  12937. (void) cached_has_bits;
  12938. cached_has_bits = _has_bits_[0];
  12939. // optional .protobuf_unittest.TestRequired optional_message = 1;
  12940. if (cached_has_bits & 0x00000001u) {
  12941. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  12942. 1, this->_internal_optional_message(), output);
  12943. }
  12944. // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  12945. for (unsigned int i = 0,
  12946. n = static_cast<unsigned int>(this->repeated_message_size()); i < n; i++) {
  12947. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  12948. 2,
  12949. this->repeated_message(static_cast<int>(i)),
  12950. output);
  12951. }
  12952. // required .protobuf_unittest.TestRequired required_message = 3;
  12953. if (cached_has_bits & 0x00000002u) {
  12954. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  12955. 3, this->_internal_required_message(), output);
  12956. }
  12957. if (_internal_metadata_.have_unknown_fields()) {
  12958. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  12959. _internal_metadata_.unknown_fields(), output);
  12960. }
  12961. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestRequiredMessage)
  12962. }
  12963. ::google::protobuf::uint8* TestRequiredMessage::InternalSerializeWithCachedSizesToArray(
  12964. bool deterministic, ::google::protobuf::uint8* target) const {
  12965. (void)deterministic; // Unused
  12966. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestRequiredMessage)
  12967. ::google::protobuf::uint32 cached_has_bits = 0;
  12968. (void) cached_has_bits;
  12969. cached_has_bits = _has_bits_[0];
  12970. // optional .protobuf_unittest.TestRequired optional_message = 1;
  12971. if (cached_has_bits & 0x00000001u) {
  12972. target = ::google::protobuf::internal::WireFormatLite::
  12973. InternalWriteMessageToArray(
  12974. 1, this->_internal_optional_message(), deterministic, target);
  12975. }
  12976. // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  12977. for (unsigned int i = 0,
  12978. n = static_cast<unsigned int>(this->repeated_message_size()); i < n; i++) {
  12979. target = ::google::protobuf::internal::WireFormatLite::
  12980. InternalWriteMessageToArray(
  12981. 2, this->repeated_message(static_cast<int>(i)), deterministic, target);
  12982. }
  12983. // required .protobuf_unittest.TestRequired required_message = 3;
  12984. if (cached_has_bits & 0x00000002u) {
  12985. target = ::google::protobuf::internal::WireFormatLite::
  12986. InternalWriteMessageToArray(
  12987. 3, this->_internal_required_message(), deterministic, target);
  12988. }
  12989. if (_internal_metadata_.have_unknown_fields()) {
  12990. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  12991. _internal_metadata_.unknown_fields(), target);
  12992. }
  12993. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestRequiredMessage)
  12994. return target;
  12995. }
  12996. size_t TestRequiredMessage::ByteSizeLong() const {
  12997. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestRequiredMessage)
  12998. size_t total_size = 0;
  12999. if (_internal_metadata_.have_unknown_fields()) {
  13000. total_size +=
  13001. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  13002. _internal_metadata_.unknown_fields());
  13003. }
  13004. // required .protobuf_unittest.TestRequired required_message = 3;
  13005. if (has_required_message()) {
  13006. total_size += 1 +
  13007. ::google::protobuf::internal::WireFormatLite::MessageSize(
  13008. *required_message_);
  13009. }
  13010. // repeated .protobuf_unittest.TestRequired repeated_message = 2;
  13011. {
  13012. unsigned int count = static_cast<unsigned int>(this->repeated_message_size());
  13013. total_size += 1UL * count;
  13014. for (unsigned int i = 0; i < count; i++) {
  13015. total_size +=
  13016. ::google::protobuf::internal::WireFormatLite::MessageSize(
  13017. this->repeated_message(static_cast<int>(i)));
  13018. }
  13019. }
  13020. // optional .protobuf_unittest.TestRequired optional_message = 1;
  13021. if (has_optional_message()) {
  13022. total_size += 1 +
  13023. ::google::protobuf::internal::WireFormatLite::MessageSize(
  13024. *optional_message_);
  13025. }
  13026. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  13027. SetCachedSize(cached_size);
  13028. return total_size;
  13029. }
  13030. void TestRequiredMessage::MergeFrom(const ::google::protobuf::Message& from) {
  13031. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestRequiredMessage)
  13032. GOOGLE_DCHECK_NE(&from, this);
  13033. const TestRequiredMessage* source =
  13034. ::google::protobuf::internal::DynamicCastToGenerated<const TestRequiredMessage>(
  13035. &from);
  13036. if (source == NULL) {
  13037. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestRequiredMessage)
  13038. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  13039. } else {
  13040. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestRequiredMessage)
  13041. MergeFrom(*source);
  13042. }
  13043. }
  13044. void TestRequiredMessage::MergeFrom(const TestRequiredMessage& from) {
  13045. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestRequiredMessage)
  13046. GOOGLE_DCHECK_NE(&from, this);
  13047. _internal_metadata_.MergeFrom(from._internal_metadata_);
  13048. ::google::protobuf::uint32 cached_has_bits = 0;
  13049. (void) cached_has_bits;
  13050. repeated_message_.MergeFrom(from.repeated_message_);
  13051. cached_has_bits = from._has_bits_[0];
  13052. if (cached_has_bits & 3u) {
  13053. if (cached_has_bits & 0x00000001u) {
  13054. mutable_optional_message()->::protobuf_unittest::TestRequired::MergeFrom(from.optional_message());
  13055. }
  13056. if (cached_has_bits & 0x00000002u) {
  13057. mutable_required_message()->::protobuf_unittest::TestRequired::MergeFrom(from.required_message());
  13058. }
  13059. }
  13060. }
  13061. void TestRequiredMessage::CopyFrom(const ::google::protobuf::Message& from) {
  13062. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestRequiredMessage)
  13063. if (&from == this) return;
  13064. Clear();
  13065. MergeFrom(from);
  13066. }
  13067. void TestRequiredMessage::CopyFrom(const TestRequiredMessage& from) {
  13068. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestRequiredMessage)
  13069. if (&from == this) return;
  13070. Clear();
  13071. MergeFrom(from);
  13072. }
  13073. bool TestRequiredMessage::IsInitialized() const {
  13074. if ((_has_bits_[0] & 0x00000002) != 0x00000002) return false;
  13075. if (!::google::protobuf::internal::AllAreInitialized(this->repeated_message())) return false;
  13076. if (has_optional_message()) {
  13077. if (!this->optional_message_->IsInitialized()) return false;
  13078. }
  13079. if (has_required_message()) {
  13080. if (!this->required_message_->IsInitialized()) return false;
  13081. }
  13082. return true;
  13083. }
  13084. void TestRequiredMessage::Swap(TestRequiredMessage* other) {
  13085. if (other == this) return;
  13086. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  13087. InternalSwap(other);
  13088. } else {
  13089. TestRequiredMessage* temp = New(GetArenaNoVirtual());
  13090. temp->MergeFrom(*other);
  13091. other->CopyFrom(*this);
  13092. InternalSwap(temp);
  13093. if (GetArenaNoVirtual() == NULL) {
  13094. delete temp;
  13095. }
  13096. }
  13097. }
  13098. void TestRequiredMessage::UnsafeArenaSwap(TestRequiredMessage* other) {
  13099. if (other == this) return;
  13100. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  13101. InternalSwap(other);
  13102. }
  13103. void TestRequiredMessage::InternalSwap(TestRequiredMessage* other) {
  13104. using std::swap;
  13105. CastToBase(&repeated_message_)->InternalSwap(CastToBase(&other->repeated_message_));
  13106. swap(optional_message_, other->optional_message_);
  13107. swap(required_message_, other->required_message_);
  13108. swap(_has_bits_[0], other->_has_bits_[0]);
  13109. _internal_metadata_.Swap(&other->_internal_metadata_);
  13110. }
  13111. ::google::protobuf::Metadata TestRequiredMessage::GetMetadata() const {
  13112. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  13113. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  13114. }
  13115. // ===================================================================
  13116. void TestForeignNested::InitAsDefaultInstance() {
  13117. ::protobuf_unittest::_TestForeignNested_default_instance_._instance.get_mutable()->foreign_nested_ = const_cast< ::protobuf_unittest::TestAllTypes_NestedMessage*>(
  13118. ::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
  13119. }
  13120. void TestForeignNested::unsafe_arena_set_allocated_foreign_nested(
  13121. ::protobuf_unittest::TestAllTypes_NestedMessage* foreign_nested) {
  13122. if (GetArenaNoVirtual() == NULL) {
  13123. delete foreign_nested_;
  13124. }
  13125. foreign_nested_ = foreign_nested;
  13126. if (foreign_nested) {
  13127. set_has_foreign_nested();
  13128. } else {
  13129. clear_has_foreign_nested();
  13130. }
  13131. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestForeignNested.foreign_nested)
  13132. }
  13133. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  13134. const int TestForeignNested::kForeignNestedFieldNumber;
  13135. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  13136. TestForeignNested::TestForeignNested()
  13137. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  13138. ::google::protobuf::internal::InitSCC(
  13139. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestForeignNested.base);
  13140. SharedCtor();
  13141. // @@protoc_insertion_point(constructor:protobuf_unittest.TestForeignNested)
  13142. }
  13143. TestForeignNested::TestForeignNested(::google::protobuf::Arena* arena)
  13144. : ::google::protobuf::Message(),
  13145. _internal_metadata_(arena) {
  13146. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestForeignNested.base);
  13147. SharedCtor();
  13148. RegisterArenaDtor(arena);
  13149. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestForeignNested)
  13150. }
  13151. TestForeignNested::TestForeignNested(const TestForeignNested& from)
  13152. : ::google::protobuf::Message(),
  13153. _internal_metadata_(NULL),
  13154. _has_bits_(from._has_bits_) {
  13155. _internal_metadata_.MergeFrom(from._internal_metadata_);
  13156. if (from.has_foreign_nested()) {
  13157. foreign_nested_ = new ::protobuf_unittest::TestAllTypes_NestedMessage(*from.foreign_nested_);
  13158. } else {
  13159. foreign_nested_ = NULL;
  13160. }
  13161. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestForeignNested)
  13162. }
  13163. void TestForeignNested::SharedCtor() {
  13164. foreign_nested_ = NULL;
  13165. }
  13166. TestForeignNested::~TestForeignNested() {
  13167. // @@protoc_insertion_point(destructor:protobuf_unittest.TestForeignNested)
  13168. SharedDtor();
  13169. }
  13170. void TestForeignNested::SharedDtor() {
  13171. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  13172. if (this != internal_default_instance()) delete foreign_nested_;
  13173. }
  13174. void TestForeignNested::ArenaDtor(void* object) {
  13175. TestForeignNested* _this = reinterpret_cast< TestForeignNested* >(object);
  13176. (void)_this;
  13177. }
  13178. void TestForeignNested::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  13179. }
  13180. void TestForeignNested::SetCachedSize(int size) const {
  13181. _cached_size_.Set(size);
  13182. }
  13183. const ::google::protobuf::Descriptor* TestForeignNested::descriptor() {
  13184. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  13185. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  13186. }
  13187. const TestForeignNested& TestForeignNested::default_instance() {
  13188. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestForeignNested.base);
  13189. return *internal_default_instance();
  13190. }
  13191. void TestForeignNested::Clear() {
  13192. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestForeignNested)
  13193. ::google::protobuf::uint32 cached_has_bits = 0;
  13194. // Prevent compiler warnings about cached_has_bits being unused
  13195. (void) cached_has_bits;
  13196. cached_has_bits = _has_bits_[0];
  13197. if (cached_has_bits & 0x00000001u) {
  13198. GOOGLE_DCHECK(foreign_nested_ != NULL);
  13199. foreign_nested_->Clear();
  13200. }
  13201. _has_bits_.Clear();
  13202. _internal_metadata_.Clear();
  13203. }
  13204. bool TestForeignNested::MergePartialFromCodedStream(
  13205. ::google::protobuf::io::CodedInputStream* input) {
  13206. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  13207. ::google::protobuf::uint32 tag;
  13208. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestForeignNested)
  13209. for (;;) {
  13210. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  13211. tag = p.first;
  13212. if (!p.second) goto handle_unusual;
  13213. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  13214. // optional .protobuf_unittest.TestAllTypes.NestedMessage foreign_nested = 1;
  13215. case 1: {
  13216. if (static_cast< ::google::protobuf::uint8>(tag) ==
  13217. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  13218. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  13219. input, mutable_foreign_nested()));
  13220. } else {
  13221. goto handle_unusual;
  13222. }
  13223. break;
  13224. }
  13225. default: {
  13226. handle_unusual:
  13227. if (tag == 0) {
  13228. goto success;
  13229. }
  13230. DO_(::google::protobuf::internal::WireFormat::SkipField(
  13231. input, tag, _internal_metadata_.mutable_unknown_fields()));
  13232. break;
  13233. }
  13234. }
  13235. }
  13236. success:
  13237. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestForeignNested)
  13238. return true;
  13239. failure:
  13240. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestForeignNested)
  13241. return false;
  13242. #undef DO_
  13243. }
  13244. void TestForeignNested::SerializeWithCachedSizes(
  13245. ::google::protobuf::io::CodedOutputStream* output) const {
  13246. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestForeignNested)
  13247. ::google::protobuf::uint32 cached_has_bits = 0;
  13248. (void) cached_has_bits;
  13249. cached_has_bits = _has_bits_[0];
  13250. // optional .protobuf_unittest.TestAllTypes.NestedMessage foreign_nested = 1;
  13251. if (cached_has_bits & 0x00000001u) {
  13252. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  13253. 1, this->_internal_foreign_nested(), output);
  13254. }
  13255. if (_internal_metadata_.have_unknown_fields()) {
  13256. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  13257. _internal_metadata_.unknown_fields(), output);
  13258. }
  13259. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestForeignNested)
  13260. }
  13261. ::google::protobuf::uint8* TestForeignNested::InternalSerializeWithCachedSizesToArray(
  13262. bool deterministic, ::google::protobuf::uint8* target) const {
  13263. (void)deterministic; // Unused
  13264. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestForeignNested)
  13265. ::google::protobuf::uint32 cached_has_bits = 0;
  13266. (void) cached_has_bits;
  13267. cached_has_bits = _has_bits_[0];
  13268. // optional .protobuf_unittest.TestAllTypes.NestedMessage foreign_nested = 1;
  13269. if (cached_has_bits & 0x00000001u) {
  13270. target = ::google::protobuf::internal::WireFormatLite::
  13271. InternalWriteMessageToArray(
  13272. 1, this->_internal_foreign_nested(), deterministic, target);
  13273. }
  13274. if (_internal_metadata_.have_unknown_fields()) {
  13275. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  13276. _internal_metadata_.unknown_fields(), target);
  13277. }
  13278. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestForeignNested)
  13279. return target;
  13280. }
  13281. size_t TestForeignNested::ByteSizeLong() const {
  13282. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestForeignNested)
  13283. size_t total_size = 0;
  13284. if (_internal_metadata_.have_unknown_fields()) {
  13285. total_size +=
  13286. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  13287. _internal_metadata_.unknown_fields());
  13288. }
  13289. // optional .protobuf_unittest.TestAllTypes.NestedMessage foreign_nested = 1;
  13290. if (has_foreign_nested()) {
  13291. total_size += 1 +
  13292. ::google::protobuf::internal::WireFormatLite::MessageSize(
  13293. *foreign_nested_);
  13294. }
  13295. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  13296. SetCachedSize(cached_size);
  13297. return total_size;
  13298. }
  13299. void TestForeignNested::MergeFrom(const ::google::protobuf::Message& from) {
  13300. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestForeignNested)
  13301. GOOGLE_DCHECK_NE(&from, this);
  13302. const TestForeignNested* source =
  13303. ::google::protobuf::internal::DynamicCastToGenerated<const TestForeignNested>(
  13304. &from);
  13305. if (source == NULL) {
  13306. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestForeignNested)
  13307. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  13308. } else {
  13309. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestForeignNested)
  13310. MergeFrom(*source);
  13311. }
  13312. }
  13313. void TestForeignNested::MergeFrom(const TestForeignNested& from) {
  13314. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestForeignNested)
  13315. GOOGLE_DCHECK_NE(&from, this);
  13316. _internal_metadata_.MergeFrom(from._internal_metadata_);
  13317. ::google::protobuf::uint32 cached_has_bits = 0;
  13318. (void) cached_has_bits;
  13319. if (from.has_foreign_nested()) {
  13320. mutable_foreign_nested()->::protobuf_unittest::TestAllTypes_NestedMessage::MergeFrom(from.foreign_nested());
  13321. }
  13322. }
  13323. void TestForeignNested::CopyFrom(const ::google::protobuf::Message& from) {
  13324. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestForeignNested)
  13325. if (&from == this) return;
  13326. Clear();
  13327. MergeFrom(from);
  13328. }
  13329. void TestForeignNested::CopyFrom(const TestForeignNested& from) {
  13330. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestForeignNested)
  13331. if (&from == this) return;
  13332. Clear();
  13333. MergeFrom(from);
  13334. }
  13335. bool TestForeignNested::IsInitialized() const {
  13336. return true;
  13337. }
  13338. void TestForeignNested::Swap(TestForeignNested* other) {
  13339. if (other == this) return;
  13340. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  13341. InternalSwap(other);
  13342. } else {
  13343. TestForeignNested* temp = New(GetArenaNoVirtual());
  13344. temp->MergeFrom(*other);
  13345. other->CopyFrom(*this);
  13346. InternalSwap(temp);
  13347. if (GetArenaNoVirtual() == NULL) {
  13348. delete temp;
  13349. }
  13350. }
  13351. }
  13352. void TestForeignNested::UnsafeArenaSwap(TestForeignNested* other) {
  13353. if (other == this) return;
  13354. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  13355. InternalSwap(other);
  13356. }
  13357. void TestForeignNested::InternalSwap(TestForeignNested* other) {
  13358. using std::swap;
  13359. swap(foreign_nested_, other->foreign_nested_);
  13360. swap(_has_bits_[0], other->_has_bits_[0]);
  13361. _internal_metadata_.Swap(&other->_internal_metadata_);
  13362. }
  13363. ::google::protobuf::Metadata TestForeignNested::GetMetadata() const {
  13364. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  13365. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  13366. }
  13367. // ===================================================================
  13368. void TestEmptyMessage::InitAsDefaultInstance() {
  13369. }
  13370. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  13371. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  13372. TestEmptyMessage::TestEmptyMessage()
  13373. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  13374. ::google::protobuf::internal::InitSCC(
  13375. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEmptyMessage.base);
  13376. SharedCtor();
  13377. // @@protoc_insertion_point(constructor:protobuf_unittest.TestEmptyMessage)
  13378. }
  13379. TestEmptyMessage::TestEmptyMessage(::google::protobuf::Arena* arena)
  13380. : ::google::protobuf::Message(),
  13381. _internal_metadata_(arena) {
  13382. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEmptyMessage.base);
  13383. SharedCtor();
  13384. RegisterArenaDtor(arena);
  13385. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestEmptyMessage)
  13386. }
  13387. TestEmptyMessage::TestEmptyMessage(const TestEmptyMessage& from)
  13388. : ::google::protobuf::Message(),
  13389. _internal_metadata_(NULL),
  13390. _has_bits_(from._has_bits_) {
  13391. _internal_metadata_.MergeFrom(from._internal_metadata_);
  13392. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestEmptyMessage)
  13393. }
  13394. void TestEmptyMessage::SharedCtor() {
  13395. }
  13396. TestEmptyMessage::~TestEmptyMessage() {
  13397. // @@protoc_insertion_point(destructor:protobuf_unittest.TestEmptyMessage)
  13398. SharedDtor();
  13399. }
  13400. void TestEmptyMessage::SharedDtor() {
  13401. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  13402. }
  13403. void TestEmptyMessage::ArenaDtor(void* object) {
  13404. TestEmptyMessage* _this = reinterpret_cast< TestEmptyMessage* >(object);
  13405. (void)_this;
  13406. }
  13407. void TestEmptyMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  13408. }
  13409. void TestEmptyMessage::SetCachedSize(int size) const {
  13410. _cached_size_.Set(size);
  13411. }
  13412. const ::google::protobuf::Descriptor* TestEmptyMessage::descriptor() {
  13413. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  13414. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  13415. }
  13416. const TestEmptyMessage& TestEmptyMessage::default_instance() {
  13417. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEmptyMessage.base);
  13418. return *internal_default_instance();
  13419. }
  13420. void TestEmptyMessage::Clear() {
  13421. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestEmptyMessage)
  13422. ::google::protobuf::uint32 cached_has_bits = 0;
  13423. // Prevent compiler warnings about cached_has_bits being unused
  13424. (void) cached_has_bits;
  13425. _has_bits_.Clear();
  13426. _internal_metadata_.Clear();
  13427. }
  13428. bool TestEmptyMessage::MergePartialFromCodedStream(
  13429. ::google::protobuf::io::CodedInputStream* input) {
  13430. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  13431. ::google::protobuf::uint32 tag;
  13432. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestEmptyMessage)
  13433. for (;;) {
  13434. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  13435. tag = p.first;
  13436. if (!p.second) goto handle_unusual;
  13437. handle_unusual:
  13438. if (tag == 0) {
  13439. goto success;
  13440. }
  13441. DO_(::google::protobuf::internal::WireFormat::SkipField(
  13442. input, tag, _internal_metadata_.mutable_unknown_fields()));
  13443. }
  13444. success:
  13445. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestEmptyMessage)
  13446. return true;
  13447. failure:
  13448. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestEmptyMessage)
  13449. return false;
  13450. #undef DO_
  13451. }
  13452. void TestEmptyMessage::SerializeWithCachedSizes(
  13453. ::google::protobuf::io::CodedOutputStream* output) const {
  13454. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestEmptyMessage)
  13455. ::google::protobuf::uint32 cached_has_bits = 0;
  13456. (void) cached_has_bits;
  13457. if (_internal_metadata_.have_unknown_fields()) {
  13458. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  13459. _internal_metadata_.unknown_fields(), output);
  13460. }
  13461. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestEmptyMessage)
  13462. }
  13463. ::google::protobuf::uint8* TestEmptyMessage::InternalSerializeWithCachedSizesToArray(
  13464. bool deterministic, ::google::protobuf::uint8* target) const {
  13465. (void)deterministic; // Unused
  13466. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestEmptyMessage)
  13467. ::google::protobuf::uint32 cached_has_bits = 0;
  13468. (void) cached_has_bits;
  13469. if (_internal_metadata_.have_unknown_fields()) {
  13470. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  13471. _internal_metadata_.unknown_fields(), target);
  13472. }
  13473. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestEmptyMessage)
  13474. return target;
  13475. }
  13476. size_t TestEmptyMessage::ByteSizeLong() const {
  13477. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestEmptyMessage)
  13478. size_t total_size = 0;
  13479. if (_internal_metadata_.have_unknown_fields()) {
  13480. total_size +=
  13481. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  13482. _internal_metadata_.unknown_fields());
  13483. }
  13484. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  13485. SetCachedSize(cached_size);
  13486. return total_size;
  13487. }
  13488. void TestEmptyMessage::MergeFrom(const ::google::protobuf::Message& from) {
  13489. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestEmptyMessage)
  13490. GOOGLE_DCHECK_NE(&from, this);
  13491. const TestEmptyMessage* source =
  13492. ::google::protobuf::internal::DynamicCastToGenerated<const TestEmptyMessage>(
  13493. &from);
  13494. if (source == NULL) {
  13495. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestEmptyMessage)
  13496. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  13497. } else {
  13498. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestEmptyMessage)
  13499. MergeFrom(*source);
  13500. }
  13501. }
  13502. void TestEmptyMessage::MergeFrom(const TestEmptyMessage& from) {
  13503. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestEmptyMessage)
  13504. GOOGLE_DCHECK_NE(&from, this);
  13505. _internal_metadata_.MergeFrom(from._internal_metadata_);
  13506. ::google::protobuf::uint32 cached_has_bits = 0;
  13507. (void) cached_has_bits;
  13508. }
  13509. void TestEmptyMessage::CopyFrom(const ::google::protobuf::Message& from) {
  13510. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestEmptyMessage)
  13511. if (&from == this) return;
  13512. Clear();
  13513. MergeFrom(from);
  13514. }
  13515. void TestEmptyMessage::CopyFrom(const TestEmptyMessage& from) {
  13516. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestEmptyMessage)
  13517. if (&from == this) return;
  13518. Clear();
  13519. MergeFrom(from);
  13520. }
  13521. bool TestEmptyMessage::IsInitialized() const {
  13522. return true;
  13523. }
  13524. void TestEmptyMessage::Swap(TestEmptyMessage* other) {
  13525. if (other == this) return;
  13526. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  13527. InternalSwap(other);
  13528. } else {
  13529. TestEmptyMessage* temp = New(GetArenaNoVirtual());
  13530. temp->MergeFrom(*other);
  13531. other->CopyFrom(*this);
  13532. InternalSwap(temp);
  13533. if (GetArenaNoVirtual() == NULL) {
  13534. delete temp;
  13535. }
  13536. }
  13537. }
  13538. void TestEmptyMessage::UnsafeArenaSwap(TestEmptyMessage* other) {
  13539. if (other == this) return;
  13540. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  13541. InternalSwap(other);
  13542. }
  13543. void TestEmptyMessage::InternalSwap(TestEmptyMessage* other) {
  13544. using std::swap;
  13545. swap(_has_bits_[0], other->_has_bits_[0]);
  13546. _internal_metadata_.Swap(&other->_internal_metadata_);
  13547. }
  13548. ::google::protobuf::Metadata TestEmptyMessage::GetMetadata() const {
  13549. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  13550. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  13551. }
  13552. // ===================================================================
  13553. void TestEmptyMessageWithExtensions::InitAsDefaultInstance() {
  13554. }
  13555. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  13556. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  13557. TestEmptyMessageWithExtensions::TestEmptyMessageWithExtensions()
  13558. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  13559. ::google::protobuf::internal::InitSCC(
  13560. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEmptyMessageWithExtensions.base);
  13561. SharedCtor();
  13562. // @@protoc_insertion_point(constructor:protobuf_unittest.TestEmptyMessageWithExtensions)
  13563. }
  13564. TestEmptyMessageWithExtensions::TestEmptyMessageWithExtensions(::google::protobuf::Arena* arena)
  13565. : ::google::protobuf::Message(),
  13566. _extensions_(arena),
  13567. _internal_metadata_(arena) {
  13568. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEmptyMessageWithExtensions.base);
  13569. SharedCtor();
  13570. RegisterArenaDtor(arena);
  13571. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestEmptyMessageWithExtensions)
  13572. }
  13573. TestEmptyMessageWithExtensions::TestEmptyMessageWithExtensions(const TestEmptyMessageWithExtensions& from)
  13574. : ::google::protobuf::Message(),
  13575. _internal_metadata_(NULL),
  13576. _has_bits_(from._has_bits_) {
  13577. _internal_metadata_.MergeFrom(from._internal_metadata_);
  13578. _extensions_.MergeFrom(from._extensions_);
  13579. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestEmptyMessageWithExtensions)
  13580. }
  13581. void TestEmptyMessageWithExtensions::SharedCtor() {
  13582. }
  13583. TestEmptyMessageWithExtensions::~TestEmptyMessageWithExtensions() {
  13584. // @@protoc_insertion_point(destructor:protobuf_unittest.TestEmptyMessageWithExtensions)
  13585. SharedDtor();
  13586. }
  13587. void TestEmptyMessageWithExtensions::SharedDtor() {
  13588. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  13589. }
  13590. void TestEmptyMessageWithExtensions::ArenaDtor(void* object) {
  13591. TestEmptyMessageWithExtensions* _this = reinterpret_cast< TestEmptyMessageWithExtensions* >(object);
  13592. (void)_this;
  13593. }
  13594. void TestEmptyMessageWithExtensions::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  13595. }
  13596. void TestEmptyMessageWithExtensions::SetCachedSize(int size) const {
  13597. _cached_size_.Set(size);
  13598. }
  13599. const ::google::protobuf::Descriptor* TestEmptyMessageWithExtensions::descriptor() {
  13600. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  13601. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  13602. }
  13603. const TestEmptyMessageWithExtensions& TestEmptyMessageWithExtensions::default_instance() {
  13604. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEmptyMessageWithExtensions.base);
  13605. return *internal_default_instance();
  13606. }
  13607. void TestEmptyMessageWithExtensions::Clear() {
  13608. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestEmptyMessageWithExtensions)
  13609. ::google::protobuf::uint32 cached_has_bits = 0;
  13610. // Prevent compiler warnings about cached_has_bits being unused
  13611. (void) cached_has_bits;
  13612. _extensions_.Clear();
  13613. _has_bits_.Clear();
  13614. _internal_metadata_.Clear();
  13615. }
  13616. bool TestEmptyMessageWithExtensions::MergePartialFromCodedStream(
  13617. ::google::protobuf::io::CodedInputStream* input) {
  13618. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  13619. ::google::protobuf::uint32 tag;
  13620. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestEmptyMessageWithExtensions)
  13621. for (;;) {
  13622. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  13623. tag = p.first;
  13624. if (!p.second) goto handle_unusual;
  13625. handle_unusual:
  13626. if (tag == 0) {
  13627. goto success;
  13628. }
  13629. if ((8u <= tag)) {
  13630. DO_(_extensions_.ParseField(tag, input,
  13631. internal_default_instance(),
  13632. _internal_metadata_.mutable_unknown_fields()));
  13633. continue;
  13634. }
  13635. DO_(::google::protobuf::internal::WireFormat::SkipField(
  13636. input, tag, _internal_metadata_.mutable_unknown_fields()));
  13637. }
  13638. success:
  13639. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestEmptyMessageWithExtensions)
  13640. return true;
  13641. failure:
  13642. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestEmptyMessageWithExtensions)
  13643. return false;
  13644. #undef DO_
  13645. }
  13646. void TestEmptyMessageWithExtensions::SerializeWithCachedSizes(
  13647. ::google::protobuf::io::CodedOutputStream* output) const {
  13648. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestEmptyMessageWithExtensions)
  13649. ::google::protobuf::uint32 cached_has_bits = 0;
  13650. (void) cached_has_bits;
  13651. // Extension range [1, 536870912)
  13652. _extensions_.SerializeWithCachedSizes(
  13653. 1, 536870912, output);
  13654. if (_internal_metadata_.have_unknown_fields()) {
  13655. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  13656. _internal_metadata_.unknown_fields(), output);
  13657. }
  13658. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestEmptyMessageWithExtensions)
  13659. }
  13660. ::google::protobuf::uint8* TestEmptyMessageWithExtensions::InternalSerializeWithCachedSizesToArray(
  13661. bool deterministic, ::google::protobuf::uint8* target) const {
  13662. (void)deterministic; // Unused
  13663. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestEmptyMessageWithExtensions)
  13664. ::google::protobuf::uint32 cached_has_bits = 0;
  13665. (void) cached_has_bits;
  13666. // Extension range [1, 536870912)
  13667. target = _extensions_.InternalSerializeWithCachedSizesToArray(
  13668. 1, 536870912, deterministic, target);
  13669. if (_internal_metadata_.have_unknown_fields()) {
  13670. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  13671. _internal_metadata_.unknown_fields(), target);
  13672. }
  13673. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestEmptyMessageWithExtensions)
  13674. return target;
  13675. }
  13676. size_t TestEmptyMessageWithExtensions::ByteSizeLong() const {
  13677. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestEmptyMessageWithExtensions)
  13678. size_t total_size = 0;
  13679. total_size += _extensions_.ByteSize();
  13680. if (_internal_metadata_.have_unknown_fields()) {
  13681. total_size +=
  13682. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  13683. _internal_metadata_.unknown_fields());
  13684. }
  13685. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  13686. SetCachedSize(cached_size);
  13687. return total_size;
  13688. }
  13689. void TestEmptyMessageWithExtensions::MergeFrom(const ::google::protobuf::Message& from) {
  13690. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestEmptyMessageWithExtensions)
  13691. GOOGLE_DCHECK_NE(&from, this);
  13692. const TestEmptyMessageWithExtensions* source =
  13693. ::google::protobuf::internal::DynamicCastToGenerated<const TestEmptyMessageWithExtensions>(
  13694. &from);
  13695. if (source == NULL) {
  13696. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestEmptyMessageWithExtensions)
  13697. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  13698. } else {
  13699. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestEmptyMessageWithExtensions)
  13700. MergeFrom(*source);
  13701. }
  13702. }
  13703. void TestEmptyMessageWithExtensions::MergeFrom(const TestEmptyMessageWithExtensions& from) {
  13704. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestEmptyMessageWithExtensions)
  13705. GOOGLE_DCHECK_NE(&from, this);
  13706. _extensions_.MergeFrom(from._extensions_);
  13707. _internal_metadata_.MergeFrom(from._internal_metadata_);
  13708. ::google::protobuf::uint32 cached_has_bits = 0;
  13709. (void) cached_has_bits;
  13710. }
  13711. void TestEmptyMessageWithExtensions::CopyFrom(const ::google::protobuf::Message& from) {
  13712. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestEmptyMessageWithExtensions)
  13713. if (&from == this) return;
  13714. Clear();
  13715. MergeFrom(from);
  13716. }
  13717. void TestEmptyMessageWithExtensions::CopyFrom(const TestEmptyMessageWithExtensions& from) {
  13718. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestEmptyMessageWithExtensions)
  13719. if (&from == this) return;
  13720. Clear();
  13721. MergeFrom(from);
  13722. }
  13723. bool TestEmptyMessageWithExtensions::IsInitialized() const {
  13724. if (!_extensions_.IsInitialized()) {
  13725. return false;
  13726. }
  13727. return true;
  13728. }
  13729. void TestEmptyMessageWithExtensions::Swap(TestEmptyMessageWithExtensions* other) {
  13730. if (other == this) return;
  13731. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  13732. InternalSwap(other);
  13733. } else {
  13734. TestEmptyMessageWithExtensions* temp = New(GetArenaNoVirtual());
  13735. temp->MergeFrom(*other);
  13736. other->CopyFrom(*this);
  13737. InternalSwap(temp);
  13738. if (GetArenaNoVirtual() == NULL) {
  13739. delete temp;
  13740. }
  13741. }
  13742. }
  13743. void TestEmptyMessageWithExtensions::UnsafeArenaSwap(TestEmptyMessageWithExtensions* other) {
  13744. if (other == this) return;
  13745. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  13746. InternalSwap(other);
  13747. }
  13748. void TestEmptyMessageWithExtensions::InternalSwap(TestEmptyMessageWithExtensions* other) {
  13749. using std::swap;
  13750. swap(_has_bits_[0], other->_has_bits_[0]);
  13751. _internal_metadata_.Swap(&other->_internal_metadata_);
  13752. _extensions_.Swap(&other->_extensions_);
  13753. }
  13754. ::google::protobuf::Metadata TestEmptyMessageWithExtensions::GetMetadata() const {
  13755. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  13756. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  13757. }
  13758. // ===================================================================
  13759. void TestMultipleExtensionRanges::InitAsDefaultInstance() {
  13760. }
  13761. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  13762. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  13763. TestMultipleExtensionRanges::TestMultipleExtensionRanges()
  13764. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  13765. ::google::protobuf::internal::InitSCC(
  13766. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMultipleExtensionRanges.base);
  13767. SharedCtor();
  13768. // @@protoc_insertion_point(constructor:protobuf_unittest.TestMultipleExtensionRanges)
  13769. }
  13770. TestMultipleExtensionRanges::TestMultipleExtensionRanges(::google::protobuf::Arena* arena)
  13771. : ::google::protobuf::Message(),
  13772. _extensions_(arena),
  13773. _internal_metadata_(arena) {
  13774. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMultipleExtensionRanges.base);
  13775. SharedCtor();
  13776. RegisterArenaDtor(arena);
  13777. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestMultipleExtensionRanges)
  13778. }
  13779. TestMultipleExtensionRanges::TestMultipleExtensionRanges(const TestMultipleExtensionRanges& from)
  13780. : ::google::protobuf::Message(),
  13781. _internal_metadata_(NULL),
  13782. _has_bits_(from._has_bits_) {
  13783. _internal_metadata_.MergeFrom(from._internal_metadata_);
  13784. _extensions_.MergeFrom(from._extensions_);
  13785. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestMultipleExtensionRanges)
  13786. }
  13787. void TestMultipleExtensionRanges::SharedCtor() {
  13788. }
  13789. TestMultipleExtensionRanges::~TestMultipleExtensionRanges() {
  13790. // @@protoc_insertion_point(destructor:protobuf_unittest.TestMultipleExtensionRanges)
  13791. SharedDtor();
  13792. }
  13793. void TestMultipleExtensionRanges::SharedDtor() {
  13794. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  13795. }
  13796. void TestMultipleExtensionRanges::ArenaDtor(void* object) {
  13797. TestMultipleExtensionRanges* _this = reinterpret_cast< TestMultipleExtensionRanges* >(object);
  13798. (void)_this;
  13799. }
  13800. void TestMultipleExtensionRanges::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  13801. }
  13802. void TestMultipleExtensionRanges::SetCachedSize(int size) const {
  13803. _cached_size_.Set(size);
  13804. }
  13805. const ::google::protobuf::Descriptor* TestMultipleExtensionRanges::descriptor() {
  13806. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  13807. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  13808. }
  13809. const TestMultipleExtensionRanges& TestMultipleExtensionRanges::default_instance() {
  13810. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMultipleExtensionRanges.base);
  13811. return *internal_default_instance();
  13812. }
  13813. void TestMultipleExtensionRanges::Clear() {
  13814. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestMultipleExtensionRanges)
  13815. ::google::protobuf::uint32 cached_has_bits = 0;
  13816. // Prevent compiler warnings about cached_has_bits being unused
  13817. (void) cached_has_bits;
  13818. _extensions_.Clear();
  13819. _has_bits_.Clear();
  13820. _internal_metadata_.Clear();
  13821. }
  13822. bool TestMultipleExtensionRanges::MergePartialFromCodedStream(
  13823. ::google::protobuf::io::CodedInputStream* input) {
  13824. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  13825. ::google::protobuf::uint32 tag;
  13826. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestMultipleExtensionRanges)
  13827. for (;;) {
  13828. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  13829. tag = p.first;
  13830. if (!p.second) goto handle_unusual;
  13831. handle_unusual:
  13832. if (tag == 0) {
  13833. goto success;
  13834. }
  13835. if ((336u <= tag && tag < 344u) ||
  13836. (33144u <= tag && tag < 33952u) ||
  13837. (524288u <= tag)) {
  13838. DO_(_extensions_.ParseField(tag, input,
  13839. internal_default_instance(),
  13840. _internal_metadata_.mutable_unknown_fields()));
  13841. continue;
  13842. }
  13843. DO_(::google::protobuf::internal::WireFormat::SkipField(
  13844. input, tag, _internal_metadata_.mutable_unknown_fields()));
  13845. }
  13846. success:
  13847. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestMultipleExtensionRanges)
  13848. return true;
  13849. failure:
  13850. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestMultipleExtensionRanges)
  13851. return false;
  13852. #undef DO_
  13853. }
  13854. void TestMultipleExtensionRanges::SerializeWithCachedSizes(
  13855. ::google::protobuf::io::CodedOutputStream* output) const {
  13856. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestMultipleExtensionRanges)
  13857. ::google::protobuf::uint32 cached_has_bits = 0;
  13858. (void) cached_has_bits;
  13859. // Extension range [42, 43)
  13860. _extensions_.SerializeWithCachedSizes(
  13861. 42, 43, output);
  13862. // Extension range [4143, 4244)
  13863. _extensions_.SerializeWithCachedSizes(
  13864. 4143, 4244, output);
  13865. // Extension range [65536, 536870912)
  13866. _extensions_.SerializeWithCachedSizes(
  13867. 65536, 536870912, output);
  13868. if (_internal_metadata_.have_unknown_fields()) {
  13869. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  13870. _internal_metadata_.unknown_fields(), output);
  13871. }
  13872. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestMultipleExtensionRanges)
  13873. }
  13874. ::google::protobuf::uint8* TestMultipleExtensionRanges::InternalSerializeWithCachedSizesToArray(
  13875. bool deterministic, ::google::protobuf::uint8* target) const {
  13876. (void)deterministic; // Unused
  13877. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestMultipleExtensionRanges)
  13878. ::google::protobuf::uint32 cached_has_bits = 0;
  13879. (void) cached_has_bits;
  13880. // Extension range [42, 43)
  13881. target = _extensions_.InternalSerializeWithCachedSizesToArray(
  13882. 42, 43, deterministic, target);
  13883. // Extension range [4143, 4244)
  13884. target = _extensions_.InternalSerializeWithCachedSizesToArray(
  13885. 4143, 4244, deterministic, target);
  13886. // Extension range [65536, 536870912)
  13887. target = _extensions_.InternalSerializeWithCachedSizesToArray(
  13888. 65536, 536870912, deterministic, target);
  13889. if (_internal_metadata_.have_unknown_fields()) {
  13890. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  13891. _internal_metadata_.unknown_fields(), target);
  13892. }
  13893. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestMultipleExtensionRanges)
  13894. return target;
  13895. }
  13896. size_t TestMultipleExtensionRanges::ByteSizeLong() const {
  13897. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestMultipleExtensionRanges)
  13898. size_t total_size = 0;
  13899. total_size += _extensions_.ByteSize();
  13900. if (_internal_metadata_.have_unknown_fields()) {
  13901. total_size +=
  13902. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  13903. _internal_metadata_.unknown_fields());
  13904. }
  13905. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  13906. SetCachedSize(cached_size);
  13907. return total_size;
  13908. }
  13909. void TestMultipleExtensionRanges::MergeFrom(const ::google::protobuf::Message& from) {
  13910. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestMultipleExtensionRanges)
  13911. GOOGLE_DCHECK_NE(&from, this);
  13912. const TestMultipleExtensionRanges* source =
  13913. ::google::protobuf::internal::DynamicCastToGenerated<const TestMultipleExtensionRanges>(
  13914. &from);
  13915. if (source == NULL) {
  13916. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestMultipleExtensionRanges)
  13917. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  13918. } else {
  13919. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestMultipleExtensionRanges)
  13920. MergeFrom(*source);
  13921. }
  13922. }
  13923. void TestMultipleExtensionRanges::MergeFrom(const TestMultipleExtensionRanges& from) {
  13924. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestMultipleExtensionRanges)
  13925. GOOGLE_DCHECK_NE(&from, this);
  13926. _extensions_.MergeFrom(from._extensions_);
  13927. _internal_metadata_.MergeFrom(from._internal_metadata_);
  13928. ::google::protobuf::uint32 cached_has_bits = 0;
  13929. (void) cached_has_bits;
  13930. }
  13931. void TestMultipleExtensionRanges::CopyFrom(const ::google::protobuf::Message& from) {
  13932. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestMultipleExtensionRanges)
  13933. if (&from == this) return;
  13934. Clear();
  13935. MergeFrom(from);
  13936. }
  13937. void TestMultipleExtensionRanges::CopyFrom(const TestMultipleExtensionRanges& from) {
  13938. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestMultipleExtensionRanges)
  13939. if (&from == this) return;
  13940. Clear();
  13941. MergeFrom(from);
  13942. }
  13943. bool TestMultipleExtensionRanges::IsInitialized() const {
  13944. if (!_extensions_.IsInitialized()) {
  13945. return false;
  13946. }
  13947. return true;
  13948. }
  13949. void TestMultipleExtensionRanges::Swap(TestMultipleExtensionRanges* other) {
  13950. if (other == this) return;
  13951. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  13952. InternalSwap(other);
  13953. } else {
  13954. TestMultipleExtensionRanges* temp = New(GetArenaNoVirtual());
  13955. temp->MergeFrom(*other);
  13956. other->CopyFrom(*this);
  13957. InternalSwap(temp);
  13958. if (GetArenaNoVirtual() == NULL) {
  13959. delete temp;
  13960. }
  13961. }
  13962. }
  13963. void TestMultipleExtensionRanges::UnsafeArenaSwap(TestMultipleExtensionRanges* other) {
  13964. if (other == this) return;
  13965. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  13966. InternalSwap(other);
  13967. }
  13968. void TestMultipleExtensionRanges::InternalSwap(TestMultipleExtensionRanges* other) {
  13969. using std::swap;
  13970. swap(_has_bits_[0], other->_has_bits_[0]);
  13971. _internal_metadata_.Swap(&other->_internal_metadata_);
  13972. _extensions_.Swap(&other->_extensions_);
  13973. }
  13974. ::google::protobuf::Metadata TestMultipleExtensionRanges::GetMetadata() const {
  13975. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  13976. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  13977. }
  13978. // ===================================================================
  13979. void TestReallyLargeTagNumber::InitAsDefaultInstance() {
  13980. }
  13981. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  13982. const int TestReallyLargeTagNumber::kAFieldNumber;
  13983. const int TestReallyLargeTagNumber::kBbFieldNumber;
  13984. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  13985. TestReallyLargeTagNumber::TestReallyLargeTagNumber()
  13986. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  13987. ::google::protobuf::internal::InitSCC(
  13988. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestReallyLargeTagNumber.base);
  13989. SharedCtor();
  13990. // @@protoc_insertion_point(constructor:protobuf_unittest.TestReallyLargeTagNumber)
  13991. }
  13992. TestReallyLargeTagNumber::TestReallyLargeTagNumber(::google::protobuf::Arena* arena)
  13993. : ::google::protobuf::Message(),
  13994. _internal_metadata_(arena) {
  13995. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestReallyLargeTagNumber.base);
  13996. SharedCtor();
  13997. RegisterArenaDtor(arena);
  13998. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestReallyLargeTagNumber)
  13999. }
  14000. TestReallyLargeTagNumber::TestReallyLargeTagNumber(const TestReallyLargeTagNumber& from)
  14001. : ::google::protobuf::Message(),
  14002. _internal_metadata_(NULL),
  14003. _has_bits_(from._has_bits_) {
  14004. _internal_metadata_.MergeFrom(from._internal_metadata_);
  14005. ::memcpy(&a_, &from.a_,
  14006. static_cast<size_t>(reinterpret_cast<char*>(&bb_) -
  14007. reinterpret_cast<char*>(&a_)) + sizeof(bb_));
  14008. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestReallyLargeTagNumber)
  14009. }
  14010. void TestReallyLargeTagNumber::SharedCtor() {
  14011. ::memset(&a_, 0, static_cast<size_t>(
  14012. reinterpret_cast<char*>(&bb_) -
  14013. reinterpret_cast<char*>(&a_)) + sizeof(bb_));
  14014. }
  14015. TestReallyLargeTagNumber::~TestReallyLargeTagNumber() {
  14016. // @@protoc_insertion_point(destructor:protobuf_unittest.TestReallyLargeTagNumber)
  14017. SharedDtor();
  14018. }
  14019. void TestReallyLargeTagNumber::SharedDtor() {
  14020. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  14021. }
  14022. void TestReallyLargeTagNumber::ArenaDtor(void* object) {
  14023. TestReallyLargeTagNumber* _this = reinterpret_cast< TestReallyLargeTagNumber* >(object);
  14024. (void)_this;
  14025. }
  14026. void TestReallyLargeTagNumber::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  14027. }
  14028. void TestReallyLargeTagNumber::SetCachedSize(int size) const {
  14029. _cached_size_.Set(size);
  14030. }
  14031. const ::google::protobuf::Descriptor* TestReallyLargeTagNumber::descriptor() {
  14032. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  14033. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  14034. }
  14035. const TestReallyLargeTagNumber& TestReallyLargeTagNumber::default_instance() {
  14036. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestReallyLargeTagNumber.base);
  14037. return *internal_default_instance();
  14038. }
  14039. void TestReallyLargeTagNumber::Clear() {
  14040. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestReallyLargeTagNumber)
  14041. ::google::protobuf::uint32 cached_has_bits = 0;
  14042. // Prevent compiler warnings about cached_has_bits being unused
  14043. (void) cached_has_bits;
  14044. cached_has_bits = _has_bits_[0];
  14045. if (cached_has_bits & 3u) {
  14046. ::memset(&a_, 0, static_cast<size_t>(
  14047. reinterpret_cast<char*>(&bb_) -
  14048. reinterpret_cast<char*>(&a_)) + sizeof(bb_));
  14049. }
  14050. _has_bits_.Clear();
  14051. _internal_metadata_.Clear();
  14052. }
  14053. bool TestReallyLargeTagNumber::MergePartialFromCodedStream(
  14054. ::google::protobuf::io::CodedInputStream* input) {
  14055. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  14056. ::google::protobuf::uint32 tag;
  14057. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestReallyLargeTagNumber)
  14058. for (;;) {
  14059. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(2147483645u);
  14060. tag = p.first;
  14061. if (!p.second) goto handle_unusual;
  14062. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  14063. // optional int32 a = 1;
  14064. case 1: {
  14065. if (static_cast< ::google::protobuf::uint8>(tag) ==
  14066. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  14067. set_has_a();
  14068. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  14069. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  14070. input, &a_)));
  14071. } else {
  14072. goto handle_unusual;
  14073. }
  14074. break;
  14075. }
  14076. // optional int32 bb = 268435455;
  14077. case 268435455: {
  14078. if (static_cast< ::google::protobuf::uint8>(tag) ==
  14079. static_cast< ::google::protobuf::uint8>(248u /* 2147483640 & 0xFF */)) {
  14080. set_has_bb();
  14081. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  14082. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  14083. input, &bb_)));
  14084. } else {
  14085. goto handle_unusual;
  14086. }
  14087. break;
  14088. }
  14089. default: {
  14090. handle_unusual:
  14091. if (tag == 0) {
  14092. goto success;
  14093. }
  14094. DO_(::google::protobuf::internal::WireFormat::SkipField(
  14095. input, tag, _internal_metadata_.mutable_unknown_fields()));
  14096. break;
  14097. }
  14098. }
  14099. }
  14100. success:
  14101. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestReallyLargeTagNumber)
  14102. return true;
  14103. failure:
  14104. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestReallyLargeTagNumber)
  14105. return false;
  14106. #undef DO_
  14107. }
  14108. void TestReallyLargeTagNumber::SerializeWithCachedSizes(
  14109. ::google::protobuf::io::CodedOutputStream* output) const {
  14110. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestReallyLargeTagNumber)
  14111. ::google::protobuf::uint32 cached_has_bits = 0;
  14112. (void) cached_has_bits;
  14113. cached_has_bits = _has_bits_[0];
  14114. // optional int32 a = 1;
  14115. if (cached_has_bits & 0x00000001u) {
  14116. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->a(), output);
  14117. }
  14118. // optional int32 bb = 268435455;
  14119. if (cached_has_bits & 0x00000002u) {
  14120. ::google::protobuf::internal::WireFormatLite::WriteInt32(268435455, this->bb(), output);
  14121. }
  14122. if (_internal_metadata_.have_unknown_fields()) {
  14123. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  14124. _internal_metadata_.unknown_fields(), output);
  14125. }
  14126. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestReallyLargeTagNumber)
  14127. }
  14128. ::google::protobuf::uint8* TestReallyLargeTagNumber::InternalSerializeWithCachedSizesToArray(
  14129. bool deterministic, ::google::protobuf::uint8* target) const {
  14130. (void)deterministic; // Unused
  14131. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestReallyLargeTagNumber)
  14132. ::google::protobuf::uint32 cached_has_bits = 0;
  14133. (void) cached_has_bits;
  14134. cached_has_bits = _has_bits_[0];
  14135. // optional int32 a = 1;
  14136. if (cached_has_bits & 0x00000001u) {
  14137. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->a(), target);
  14138. }
  14139. // optional int32 bb = 268435455;
  14140. if (cached_has_bits & 0x00000002u) {
  14141. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(268435455, this->bb(), target);
  14142. }
  14143. if (_internal_metadata_.have_unknown_fields()) {
  14144. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  14145. _internal_metadata_.unknown_fields(), target);
  14146. }
  14147. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestReallyLargeTagNumber)
  14148. return target;
  14149. }
  14150. size_t TestReallyLargeTagNumber::ByteSizeLong() const {
  14151. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestReallyLargeTagNumber)
  14152. size_t total_size = 0;
  14153. if (_internal_metadata_.have_unknown_fields()) {
  14154. total_size +=
  14155. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  14156. _internal_metadata_.unknown_fields());
  14157. }
  14158. if (_has_bits_[0 / 32] & 3u) {
  14159. // optional int32 a = 1;
  14160. if (has_a()) {
  14161. total_size += 1 +
  14162. ::google::protobuf::internal::WireFormatLite::Int32Size(
  14163. this->a());
  14164. }
  14165. // optional int32 bb = 268435455;
  14166. if (has_bb()) {
  14167. total_size += 5 +
  14168. ::google::protobuf::internal::WireFormatLite::Int32Size(
  14169. this->bb());
  14170. }
  14171. }
  14172. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  14173. SetCachedSize(cached_size);
  14174. return total_size;
  14175. }
  14176. void TestReallyLargeTagNumber::MergeFrom(const ::google::protobuf::Message& from) {
  14177. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestReallyLargeTagNumber)
  14178. GOOGLE_DCHECK_NE(&from, this);
  14179. const TestReallyLargeTagNumber* source =
  14180. ::google::protobuf::internal::DynamicCastToGenerated<const TestReallyLargeTagNumber>(
  14181. &from);
  14182. if (source == NULL) {
  14183. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestReallyLargeTagNumber)
  14184. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  14185. } else {
  14186. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestReallyLargeTagNumber)
  14187. MergeFrom(*source);
  14188. }
  14189. }
  14190. void TestReallyLargeTagNumber::MergeFrom(const TestReallyLargeTagNumber& from) {
  14191. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestReallyLargeTagNumber)
  14192. GOOGLE_DCHECK_NE(&from, this);
  14193. _internal_metadata_.MergeFrom(from._internal_metadata_);
  14194. ::google::protobuf::uint32 cached_has_bits = 0;
  14195. (void) cached_has_bits;
  14196. cached_has_bits = from._has_bits_[0];
  14197. if (cached_has_bits & 3u) {
  14198. if (cached_has_bits & 0x00000001u) {
  14199. a_ = from.a_;
  14200. }
  14201. if (cached_has_bits & 0x00000002u) {
  14202. bb_ = from.bb_;
  14203. }
  14204. _has_bits_[0] |= cached_has_bits;
  14205. }
  14206. }
  14207. void TestReallyLargeTagNumber::CopyFrom(const ::google::protobuf::Message& from) {
  14208. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestReallyLargeTagNumber)
  14209. if (&from == this) return;
  14210. Clear();
  14211. MergeFrom(from);
  14212. }
  14213. void TestReallyLargeTagNumber::CopyFrom(const TestReallyLargeTagNumber& from) {
  14214. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestReallyLargeTagNumber)
  14215. if (&from == this) return;
  14216. Clear();
  14217. MergeFrom(from);
  14218. }
  14219. bool TestReallyLargeTagNumber::IsInitialized() const {
  14220. return true;
  14221. }
  14222. void TestReallyLargeTagNumber::Swap(TestReallyLargeTagNumber* other) {
  14223. if (other == this) return;
  14224. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  14225. InternalSwap(other);
  14226. } else {
  14227. TestReallyLargeTagNumber* temp = New(GetArenaNoVirtual());
  14228. temp->MergeFrom(*other);
  14229. other->CopyFrom(*this);
  14230. InternalSwap(temp);
  14231. if (GetArenaNoVirtual() == NULL) {
  14232. delete temp;
  14233. }
  14234. }
  14235. }
  14236. void TestReallyLargeTagNumber::UnsafeArenaSwap(TestReallyLargeTagNumber* other) {
  14237. if (other == this) return;
  14238. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  14239. InternalSwap(other);
  14240. }
  14241. void TestReallyLargeTagNumber::InternalSwap(TestReallyLargeTagNumber* other) {
  14242. using std::swap;
  14243. swap(a_, other->a_);
  14244. swap(bb_, other->bb_);
  14245. swap(_has_bits_[0], other->_has_bits_[0]);
  14246. _internal_metadata_.Swap(&other->_internal_metadata_);
  14247. }
  14248. ::google::protobuf::Metadata TestReallyLargeTagNumber::GetMetadata() const {
  14249. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  14250. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  14251. }
  14252. // ===================================================================
  14253. void TestRecursiveMessage::InitAsDefaultInstance() {
  14254. ::protobuf_unittest::_TestRecursiveMessage_default_instance_._instance.get_mutable()->a_ = const_cast< ::protobuf_unittest::TestRecursiveMessage*>(
  14255. ::protobuf_unittest::TestRecursiveMessage::internal_default_instance());
  14256. }
  14257. void TestRecursiveMessage::unsafe_arena_set_allocated_a(
  14258. ::protobuf_unittest::TestRecursiveMessage* a) {
  14259. if (GetArenaNoVirtual() == NULL) {
  14260. delete a_;
  14261. }
  14262. a_ = a;
  14263. if (a) {
  14264. set_has_a();
  14265. } else {
  14266. clear_has_a();
  14267. }
  14268. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestRecursiveMessage.a)
  14269. }
  14270. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  14271. const int TestRecursiveMessage::kAFieldNumber;
  14272. const int TestRecursiveMessage::kIFieldNumber;
  14273. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  14274. TestRecursiveMessage::TestRecursiveMessage()
  14275. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  14276. ::google::protobuf::internal::InitSCC(
  14277. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRecursiveMessage.base);
  14278. SharedCtor();
  14279. // @@protoc_insertion_point(constructor:protobuf_unittest.TestRecursiveMessage)
  14280. }
  14281. TestRecursiveMessage::TestRecursiveMessage(::google::protobuf::Arena* arena)
  14282. : ::google::protobuf::Message(),
  14283. _internal_metadata_(arena) {
  14284. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRecursiveMessage.base);
  14285. SharedCtor();
  14286. RegisterArenaDtor(arena);
  14287. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestRecursiveMessage)
  14288. }
  14289. TestRecursiveMessage::TestRecursiveMessage(const TestRecursiveMessage& from)
  14290. : ::google::protobuf::Message(),
  14291. _internal_metadata_(NULL),
  14292. _has_bits_(from._has_bits_) {
  14293. _internal_metadata_.MergeFrom(from._internal_metadata_);
  14294. if (from.has_a()) {
  14295. a_ = new ::protobuf_unittest::TestRecursiveMessage(*from.a_);
  14296. } else {
  14297. a_ = NULL;
  14298. }
  14299. i_ = from.i_;
  14300. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestRecursiveMessage)
  14301. }
  14302. void TestRecursiveMessage::SharedCtor() {
  14303. ::memset(&a_, 0, static_cast<size_t>(
  14304. reinterpret_cast<char*>(&i_) -
  14305. reinterpret_cast<char*>(&a_)) + sizeof(i_));
  14306. }
  14307. TestRecursiveMessage::~TestRecursiveMessage() {
  14308. // @@protoc_insertion_point(destructor:protobuf_unittest.TestRecursiveMessage)
  14309. SharedDtor();
  14310. }
  14311. void TestRecursiveMessage::SharedDtor() {
  14312. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  14313. if (this != internal_default_instance()) delete a_;
  14314. }
  14315. void TestRecursiveMessage::ArenaDtor(void* object) {
  14316. TestRecursiveMessage* _this = reinterpret_cast< TestRecursiveMessage* >(object);
  14317. (void)_this;
  14318. }
  14319. void TestRecursiveMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  14320. }
  14321. void TestRecursiveMessage::SetCachedSize(int size) const {
  14322. _cached_size_.Set(size);
  14323. }
  14324. const ::google::protobuf::Descriptor* TestRecursiveMessage::descriptor() {
  14325. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  14326. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  14327. }
  14328. const TestRecursiveMessage& TestRecursiveMessage::default_instance() {
  14329. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRecursiveMessage.base);
  14330. return *internal_default_instance();
  14331. }
  14332. void TestRecursiveMessage::Clear() {
  14333. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestRecursiveMessage)
  14334. ::google::protobuf::uint32 cached_has_bits = 0;
  14335. // Prevent compiler warnings about cached_has_bits being unused
  14336. (void) cached_has_bits;
  14337. cached_has_bits = _has_bits_[0];
  14338. if (cached_has_bits & 0x00000001u) {
  14339. GOOGLE_DCHECK(a_ != NULL);
  14340. a_->Clear();
  14341. }
  14342. i_ = 0;
  14343. _has_bits_.Clear();
  14344. _internal_metadata_.Clear();
  14345. }
  14346. bool TestRecursiveMessage::MergePartialFromCodedStream(
  14347. ::google::protobuf::io::CodedInputStream* input) {
  14348. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  14349. ::google::protobuf::uint32 tag;
  14350. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestRecursiveMessage)
  14351. for (;;) {
  14352. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  14353. tag = p.first;
  14354. if (!p.second) goto handle_unusual;
  14355. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  14356. // optional .protobuf_unittest.TestRecursiveMessage a = 1;
  14357. case 1: {
  14358. if (static_cast< ::google::protobuf::uint8>(tag) ==
  14359. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  14360. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  14361. input, mutable_a()));
  14362. } else {
  14363. goto handle_unusual;
  14364. }
  14365. break;
  14366. }
  14367. // optional int32 i = 2;
  14368. case 2: {
  14369. if (static_cast< ::google::protobuf::uint8>(tag) ==
  14370. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  14371. set_has_i();
  14372. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  14373. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  14374. input, &i_)));
  14375. } else {
  14376. goto handle_unusual;
  14377. }
  14378. break;
  14379. }
  14380. default: {
  14381. handle_unusual:
  14382. if (tag == 0) {
  14383. goto success;
  14384. }
  14385. DO_(::google::protobuf::internal::WireFormat::SkipField(
  14386. input, tag, _internal_metadata_.mutable_unknown_fields()));
  14387. break;
  14388. }
  14389. }
  14390. }
  14391. success:
  14392. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestRecursiveMessage)
  14393. return true;
  14394. failure:
  14395. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestRecursiveMessage)
  14396. return false;
  14397. #undef DO_
  14398. }
  14399. void TestRecursiveMessage::SerializeWithCachedSizes(
  14400. ::google::protobuf::io::CodedOutputStream* output) const {
  14401. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestRecursiveMessage)
  14402. ::google::protobuf::uint32 cached_has_bits = 0;
  14403. (void) cached_has_bits;
  14404. cached_has_bits = _has_bits_[0];
  14405. // optional .protobuf_unittest.TestRecursiveMessage a = 1;
  14406. if (cached_has_bits & 0x00000001u) {
  14407. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  14408. 1, this->_internal_a(), output);
  14409. }
  14410. // optional int32 i = 2;
  14411. if (cached_has_bits & 0x00000002u) {
  14412. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->i(), output);
  14413. }
  14414. if (_internal_metadata_.have_unknown_fields()) {
  14415. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  14416. _internal_metadata_.unknown_fields(), output);
  14417. }
  14418. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestRecursiveMessage)
  14419. }
  14420. ::google::protobuf::uint8* TestRecursiveMessage::InternalSerializeWithCachedSizesToArray(
  14421. bool deterministic, ::google::protobuf::uint8* target) const {
  14422. (void)deterministic; // Unused
  14423. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestRecursiveMessage)
  14424. ::google::protobuf::uint32 cached_has_bits = 0;
  14425. (void) cached_has_bits;
  14426. cached_has_bits = _has_bits_[0];
  14427. // optional .protobuf_unittest.TestRecursiveMessage a = 1;
  14428. if (cached_has_bits & 0x00000001u) {
  14429. target = ::google::protobuf::internal::WireFormatLite::
  14430. InternalWriteMessageToArray(
  14431. 1, this->_internal_a(), deterministic, target);
  14432. }
  14433. // optional int32 i = 2;
  14434. if (cached_has_bits & 0x00000002u) {
  14435. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->i(), target);
  14436. }
  14437. if (_internal_metadata_.have_unknown_fields()) {
  14438. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  14439. _internal_metadata_.unknown_fields(), target);
  14440. }
  14441. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestRecursiveMessage)
  14442. return target;
  14443. }
  14444. size_t TestRecursiveMessage::ByteSizeLong() const {
  14445. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestRecursiveMessage)
  14446. size_t total_size = 0;
  14447. if (_internal_metadata_.have_unknown_fields()) {
  14448. total_size +=
  14449. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  14450. _internal_metadata_.unknown_fields());
  14451. }
  14452. if (_has_bits_[0 / 32] & 3u) {
  14453. // optional .protobuf_unittest.TestRecursiveMessage a = 1;
  14454. if (has_a()) {
  14455. total_size += 1 +
  14456. ::google::protobuf::internal::WireFormatLite::MessageSize(
  14457. *a_);
  14458. }
  14459. // optional int32 i = 2;
  14460. if (has_i()) {
  14461. total_size += 1 +
  14462. ::google::protobuf::internal::WireFormatLite::Int32Size(
  14463. this->i());
  14464. }
  14465. }
  14466. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  14467. SetCachedSize(cached_size);
  14468. return total_size;
  14469. }
  14470. void TestRecursiveMessage::MergeFrom(const ::google::protobuf::Message& from) {
  14471. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestRecursiveMessage)
  14472. GOOGLE_DCHECK_NE(&from, this);
  14473. const TestRecursiveMessage* source =
  14474. ::google::protobuf::internal::DynamicCastToGenerated<const TestRecursiveMessage>(
  14475. &from);
  14476. if (source == NULL) {
  14477. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestRecursiveMessage)
  14478. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  14479. } else {
  14480. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestRecursiveMessage)
  14481. MergeFrom(*source);
  14482. }
  14483. }
  14484. void TestRecursiveMessage::MergeFrom(const TestRecursiveMessage& from) {
  14485. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestRecursiveMessage)
  14486. GOOGLE_DCHECK_NE(&from, this);
  14487. _internal_metadata_.MergeFrom(from._internal_metadata_);
  14488. ::google::protobuf::uint32 cached_has_bits = 0;
  14489. (void) cached_has_bits;
  14490. cached_has_bits = from._has_bits_[0];
  14491. if (cached_has_bits & 3u) {
  14492. if (cached_has_bits & 0x00000001u) {
  14493. mutable_a()->::protobuf_unittest::TestRecursiveMessage::MergeFrom(from.a());
  14494. }
  14495. if (cached_has_bits & 0x00000002u) {
  14496. i_ = from.i_;
  14497. }
  14498. _has_bits_[0] |= cached_has_bits;
  14499. }
  14500. }
  14501. void TestRecursiveMessage::CopyFrom(const ::google::protobuf::Message& from) {
  14502. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestRecursiveMessage)
  14503. if (&from == this) return;
  14504. Clear();
  14505. MergeFrom(from);
  14506. }
  14507. void TestRecursiveMessage::CopyFrom(const TestRecursiveMessage& from) {
  14508. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestRecursiveMessage)
  14509. if (&from == this) return;
  14510. Clear();
  14511. MergeFrom(from);
  14512. }
  14513. bool TestRecursiveMessage::IsInitialized() const {
  14514. return true;
  14515. }
  14516. void TestRecursiveMessage::Swap(TestRecursiveMessage* other) {
  14517. if (other == this) return;
  14518. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  14519. InternalSwap(other);
  14520. } else {
  14521. TestRecursiveMessage* temp = New(GetArenaNoVirtual());
  14522. temp->MergeFrom(*other);
  14523. other->CopyFrom(*this);
  14524. InternalSwap(temp);
  14525. if (GetArenaNoVirtual() == NULL) {
  14526. delete temp;
  14527. }
  14528. }
  14529. }
  14530. void TestRecursiveMessage::UnsafeArenaSwap(TestRecursiveMessage* other) {
  14531. if (other == this) return;
  14532. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  14533. InternalSwap(other);
  14534. }
  14535. void TestRecursiveMessage::InternalSwap(TestRecursiveMessage* other) {
  14536. using std::swap;
  14537. swap(a_, other->a_);
  14538. swap(i_, other->i_);
  14539. swap(_has_bits_[0], other->_has_bits_[0]);
  14540. _internal_metadata_.Swap(&other->_internal_metadata_);
  14541. }
  14542. ::google::protobuf::Metadata TestRecursiveMessage::GetMetadata() const {
  14543. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  14544. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  14545. }
  14546. // ===================================================================
  14547. void TestMutualRecursionA_SubMessage::InitAsDefaultInstance() {
  14548. ::protobuf_unittest::_TestMutualRecursionA_SubMessage_default_instance_._instance.get_mutable()->b_ = const_cast< ::protobuf_unittest::TestMutualRecursionB*>(
  14549. ::protobuf_unittest::TestMutualRecursionB::internal_default_instance());
  14550. }
  14551. void TestMutualRecursionA_SubMessage::unsafe_arena_set_allocated_b(
  14552. ::protobuf_unittest::TestMutualRecursionB* b) {
  14553. if (GetArenaNoVirtual() == NULL) {
  14554. delete b_;
  14555. }
  14556. b_ = b;
  14557. if (b) {
  14558. set_has_b();
  14559. } else {
  14560. clear_has_b();
  14561. }
  14562. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestMutualRecursionA.SubMessage.b)
  14563. }
  14564. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  14565. const int TestMutualRecursionA_SubMessage::kBFieldNumber;
  14566. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  14567. TestMutualRecursionA_SubMessage::TestMutualRecursionA_SubMessage()
  14568. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  14569. ::google::protobuf::internal::InitSCC(
  14570. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  14571. SharedCtor();
  14572. // @@protoc_insertion_point(constructor:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14573. }
  14574. TestMutualRecursionA_SubMessage::TestMutualRecursionA_SubMessage(::google::protobuf::Arena* arena)
  14575. : ::google::protobuf::Message(),
  14576. _internal_metadata_(arena) {
  14577. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  14578. SharedCtor();
  14579. RegisterArenaDtor(arena);
  14580. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14581. }
  14582. TestMutualRecursionA_SubMessage::TestMutualRecursionA_SubMessage(const TestMutualRecursionA_SubMessage& from)
  14583. : ::google::protobuf::Message(),
  14584. _internal_metadata_(NULL),
  14585. _has_bits_(from._has_bits_) {
  14586. _internal_metadata_.MergeFrom(from._internal_metadata_);
  14587. if (from.has_b()) {
  14588. b_ = new ::protobuf_unittest::TestMutualRecursionB(*from.b_);
  14589. } else {
  14590. b_ = NULL;
  14591. }
  14592. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14593. }
  14594. void TestMutualRecursionA_SubMessage::SharedCtor() {
  14595. b_ = NULL;
  14596. }
  14597. TestMutualRecursionA_SubMessage::~TestMutualRecursionA_SubMessage() {
  14598. // @@protoc_insertion_point(destructor:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14599. SharedDtor();
  14600. }
  14601. void TestMutualRecursionA_SubMessage::SharedDtor() {
  14602. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  14603. if (this != internal_default_instance()) delete b_;
  14604. }
  14605. void TestMutualRecursionA_SubMessage::ArenaDtor(void* object) {
  14606. TestMutualRecursionA_SubMessage* _this = reinterpret_cast< TestMutualRecursionA_SubMessage* >(object);
  14607. (void)_this;
  14608. }
  14609. void TestMutualRecursionA_SubMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  14610. }
  14611. void TestMutualRecursionA_SubMessage::SetCachedSize(int size) const {
  14612. _cached_size_.Set(size);
  14613. }
  14614. const ::google::protobuf::Descriptor* TestMutualRecursionA_SubMessage::descriptor() {
  14615. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  14616. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  14617. }
  14618. const TestMutualRecursionA_SubMessage& TestMutualRecursionA_SubMessage::default_instance() {
  14619. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  14620. return *internal_default_instance();
  14621. }
  14622. void TestMutualRecursionA_SubMessage::Clear() {
  14623. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14624. ::google::protobuf::uint32 cached_has_bits = 0;
  14625. // Prevent compiler warnings about cached_has_bits being unused
  14626. (void) cached_has_bits;
  14627. cached_has_bits = _has_bits_[0];
  14628. if (cached_has_bits & 0x00000001u) {
  14629. GOOGLE_DCHECK(b_ != NULL);
  14630. b_->Clear();
  14631. }
  14632. _has_bits_.Clear();
  14633. _internal_metadata_.Clear();
  14634. }
  14635. bool TestMutualRecursionA_SubMessage::MergePartialFromCodedStream(
  14636. ::google::protobuf::io::CodedInputStream* input) {
  14637. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  14638. ::google::protobuf::uint32 tag;
  14639. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14640. for (;;) {
  14641. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  14642. tag = p.first;
  14643. if (!p.second) goto handle_unusual;
  14644. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  14645. // optional .protobuf_unittest.TestMutualRecursionB b = 1;
  14646. case 1: {
  14647. if (static_cast< ::google::protobuf::uint8>(tag) ==
  14648. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  14649. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  14650. input, mutable_b()));
  14651. } else {
  14652. goto handle_unusual;
  14653. }
  14654. break;
  14655. }
  14656. default: {
  14657. handle_unusual:
  14658. if (tag == 0) {
  14659. goto success;
  14660. }
  14661. DO_(::google::protobuf::internal::WireFormat::SkipField(
  14662. input, tag, _internal_metadata_.mutable_unknown_fields()));
  14663. break;
  14664. }
  14665. }
  14666. }
  14667. success:
  14668. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14669. return true;
  14670. failure:
  14671. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14672. return false;
  14673. #undef DO_
  14674. }
  14675. void TestMutualRecursionA_SubMessage::SerializeWithCachedSizes(
  14676. ::google::protobuf::io::CodedOutputStream* output) const {
  14677. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14678. ::google::protobuf::uint32 cached_has_bits = 0;
  14679. (void) cached_has_bits;
  14680. cached_has_bits = _has_bits_[0];
  14681. // optional .protobuf_unittest.TestMutualRecursionB b = 1;
  14682. if (cached_has_bits & 0x00000001u) {
  14683. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  14684. 1, this->_internal_b(), output);
  14685. }
  14686. if (_internal_metadata_.have_unknown_fields()) {
  14687. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  14688. _internal_metadata_.unknown_fields(), output);
  14689. }
  14690. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14691. }
  14692. ::google::protobuf::uint8* TestMutualRecursionA_SubMessage::InternalSerializeWithCachedSizesToArray(
  14693. bool deterministic, ::google::protobuf::uint8* target) const {
  14694. (void)deterministic; // Unused
  14695. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14696. ::google::protobuf::uint32 cached_has_bits = 0;
  14697. (void) cached_has_bits;
  14698. cached_has_bits = _has_bits_[0];
  14699. // optional .protobuf_unittest.TestMutualRecursionB b = 1;
  14700. if (cached_has_bits & 0x00000001u) {
  14701. target = ::google::protobuf::internal::WireFormatLite::
  14702. InternalWriteMessageToArray(
  14703. 1, this->_internal_b(), deterministic, target);
  14704. }
  14705. if (_internal_metadata_.have_unknown_fields()) {
  14706. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  14707. _internal_metadata_.unknown_fields(), target);
  14708. }
  14709. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14710. return target;
  14711. }
  14712. size_t TestMutualRecursionA_SubMessage::ByteSizeLong() const {
  14713. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14714. size_t total_size = 0;
  14715. if (_internal_metadata_.have_unknown_fields()) {
  14716. total_size +=
  14717. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  14718. _internal_metadata_.unknown_fields());
  14719. }
  14720. // optional .protobuf_unittest.TestMutualRecursionB b = 1;
  14721. if (has_b()) {
  14722. total_size += 1 +
  14723. ::google::protobuf::internal::WireFormatLite::MessageSize(
  14724. *b_);
  14725. }
  14726. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  14727. SetCachedSize(cached_size);
  14728. return total_size;
  14729. }
  14730. void TestMutualRecursionA_SubMessage::MergeFrom(const ::google::protobuf::Message& from) {
  14731. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14732. GOOGLE_DCHECK_NE(&from, this);
  14733. const TestMutualRecursionA_SubMessage* source =
  14734. ::google::protobuf::internal::DynamicCastToGenerated<const TestMutualRecursionA_SubMessage>(
  14735. &from);
  14736. if (source == NULL) {
  14737. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14738. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  14739. } else {
  14740. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14741. MergeFrom(*source);
  14742. }
  14743. }
  14744. void TestMutualRecursionA_SubMessage::MergeFrom(const TestMutualRecursionA_SubMessage& from) {
  14745. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14746. GOOGLE_DCHECK_NE(&from, this);
  14747. _internal_metadata_.MergeFrom(from._internal_metadata_);
  14748. ::google::protobuf::uint32 cached_has_bits = 0;
  14749. (void) cached_has_bits;
  14750. if (from.has_b()) {
  14751. mutable_b()->::protobuf_unittest::TestMutualRecursionB::MergeFrom(from.b());
  14752. }
  14753. }
  14754. void TestMutualRecursionA_SubMessage::CopyFrom(const ::google::protobuf::Message& from) {
  14755. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14756. if (&from == this) return;
  14757. Clear();
  14758. MergeFrom(from);
  14759. }
  14760. void TestMutualRecursionA_SubMessage::CopyFrom(const TestMutualRecursionA_SubMessage& from) {
  14761. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestMutualRecursionA.SubMessage)
  14762. if (&from == this) return;
  14763. Clear();
  14764. MergeFrom(from);
  14765. }
  14766. bool TestMutualRecursionA_SubMessage::IsInitialized() const {
  14767. return true;
  14768. }
  14769. void TestMutualRecursionA_SubMessage::Swap(TestMutualRecursionA_SubMessage* other) {
  14770. if (other == this) return;
  14771. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  14772. InternalSwap(other);
  14773. } else {
  14774. TestMutualRecursionA_SubMessage* temp = New(GetArenaNoVirtual());
  14775. temp->MergeFrom(*other);
  14776. other->CopyFrom(*this);
  14777. InternalSwap(temp);
  14778. if (GetArenaNoVirtual() == NULL) {
  14779. delete temp;
  14780. }
  14781. }
  14782. }
  14783. void TestMutualRecursionA_SubMessage::UnsafeArenaSwap(TestMutualRecursionA_SubMessage* other) {
  14784. if (other == this) return;
  14785. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  14786. InternalSwap(other);
  14787. }
  14788. void TestMutualRecursionA_SubMessage::InternalSwap(TestMutualRecursionA_SubMessage* other) {
  14789. using std::swap;
  14790. swap(b_, other->b_);
  14791. swap(_has_bits_[0], other->_has_bits_[0]);
  14792. _internal_metadata_.Swap(&other->_internal_metadata_);
  14793. }
  14794. ::google::protobuf::Metadata TestMutualRecursionA_SubMessage::GetMetadata() const {
  14795. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  14796. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  14797. }
  14798. // ===================================================================
  14799. void TestMutualRecursionA_SubGroup::InitAsDefaultInstance() {
  14800. ::protobuf_unittest::_TestMutualRecursionA_SubGroup_default_instance_._instance.get_mutable()->sub_message_ = const_cast< ::protobuf_unittest::TestMutualRecursionA_SubMessage*>(
  14801. ::protobuf_unittest::TestMutualRecursionA_SubMessage::internal_default_instance());
  14802. ::protobuf_unittest::_TestMutualRecursionA_SubGroup_default_instance_._instance.get_mutable()->not_in_this_scc_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
  14803. ::protobuf_unittest::TestAllTypes::internal_default_instance());
  14804. }
  14805. void TestMutualRecursionA_SubGroup::unsafe_arena_set_allocated_sub_message(
  14806. ::protobuf_unittest::TestMutualRecursionA_SubMessage* sub_message) {
  14807. if (GetArenaNoVirtual() == NULL) {
  14808. delete sub_message_;
  14809. }
  14810. sub_message_ = sub_message;
  14811. if (sub_message) {
  14812. set_has_sub_message();
  14813. } else {
  14814. clear_has_sub_message();
  14815. }
  14816. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestMutualRecursionA.SubGroup.sub_message)
  14817. }
  14818. void TestMutualRecursionA_SubGroup::unsafe_arena_set_allocated_not_in_this_scc(
  14819. ::protobuf_unittest::TestAllTypes* not_in_this_scc) {
  14820. if (GetArenaNoVirtual() == NULL) {
  14821. delete not_in_this_scc_;
  14822. }
  14823. not_in_this_scc_ = not_in_this_scc;
  14824. if (not_in_this_scc) {
  14825. set_has_not_in_this_scc();
  14826. } else {
  14827. clear_has_not_in_this_scc();
  14828. }
  14829. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestMutualRecursionA.SubGroup.not_in_this_scc)
  14830. }
  14831. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  14832. const int TestMutualRecursionA_SubGroup::kSubMessageFieldNumber;
  14833. const int TestMutualRecursionA_SubGroup::kNotInThisSccFieldNumber;
  14834. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  14835. TestMutualRecursionA_SubGroup::TestMutualRecursionA_SubGroup()
  14836. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  14837. ::google::protobuf::internal::InitSCC(
  14838. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  14839. SharedCtor();
  14840. // @@protoc_insertion_point(constructor:protobuf_unittest.TestMutualRecursionA.SubGroup)
  14841. }
  14842. TestMutualRecursionA_SubGroup::TestMutualRecursionA_SubGroup(::google::protobuf::Arena* arena)
  14843. : ::google::protobuf::Message(),
  14844. _internal_metadata_(arena) {
  14845. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  14846. SharedCtor();
  14847. RegisterArenaDtor(arena);
  14848. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestMutualRecursionA.SubGroup)
  14849. }
  14850. TestMutualRecursionA_SubGroup::TestMutualRecursionA_SubGroup(const TestMutualRecursionA_SubGroup& from)
  14851. : ::google::protobuf::Message(),
  14852. _internal_metadata_(NULL),
  14853. _has_bits_(from._has_bits_) {
  14854. _internal_metadata_.MergeFrom(from._internal_metadata_);
  14855. if (from.has_sub_message()) {
  14856. sub_message_ = new ::protobuf_unittest::TestMutualRecursionA_SubMessage(*from.sub_message_);
  14857. } else {
  14858. sub_message_ = NULL;
  14859. }
  14860. if (from.has_not_in_this_scc()) {
  14861. not_in_this_scc_ = new ::protobuf_unittest::TestAllTypes(*from.not_in_this_scc_);
  14862. } else {
  14863. not_in_this_scc_ = NULL;
  14864. }
  14865. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestMutualRecursionA.SubGroup)
  14866. }
  14867. void TestMutualRecursionA_SubGroup::SharedCtor() {
  14868. ::memset(&sub_message_, 0, static_cast<size_t>(
  14869. reinterpret_cast<char*>(&not_in_this_scc_) -
  14870. reinterpret_cast<char*>(&sub_message_)) + sizeof(not_in_this_scc_));
  14871. }
  14872. TestMutualRecursionA_SubGroup::~TestMutualRecursionA_SubGroup() {
  14873. // @@protoc_insertion_point(destructor:protobuf_unittest.TestMutualRecursionA.SubGroup)
  14874. SharedDtor();
  14875. }
  14876. void TestMutualRecursionA_SubGroup::SharedDtor() {
  14877. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  14878. if (this != internal_default_instance()) delete sub_message_;
  14879. if (this != internal_default_instance()) delete not_in_this_scc_;
  14880. }
  14881. void TestMutualRecursionA_SubGroup::ArenaDtor(void* object) {
  14882. TestMutualRecursionA_SubGroup* _this = reinterpret_cast< TestMutualRecursionA_SubGroup* >(object);
  14883. (void)_this;
  14884. }
  14885. void TestMutualRecursionA_SubGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  14886. }
  14887. void TestMutualRecursionA_SubGroup::SetCachedSize(int size) const {
  14888. _cached_size_.Set(size);
  14889. }
  14890. const ::google::protobuf::Descriptor* TestMutualRecursionA_SubGroup::descriptor() {
  14891. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  14892. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  14893. }
  14894. const TestMutualRecursionA_SubGroup& TestMutualRecursionA_SubGroup::default_instance() {
  14895. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  14896. return *internal_default_instance();
  14897. }
  14898. void TestMutualRecursionA_SubGroup::Clear() {
  14899. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestMutualRecursionA.SubGroup)
  14900. ::google::protobuf::uint32 cached_has_bits = 0;
  14901. // Prevent compiler warnings about cached_has_bits being unused
  14902. (void) cached_has_bits;
  14903. cached_has_bits = _has_bits_[0];
  14904. if (cached_has_bits & 3u) {
  14905. if (cached_has_bits & 0x00000001u) {
  14906. GOOGLE_DCHECK(sub_message_ != NULL);
  14907. sub_message_->Clear();
  14908. }
  14909. if (cached_has_bits & 0x00000002u) {
  14910. GOOGLE_DCHECK(not_in_this_scc_ != NULL);
  14911. not_in_this_scc_->Clear();
  14912. }
  14913. }
  14914. _has_bits_.Clear();
  14915. _internal_metadata_.Clear();
  14916. }
  14917. bool TestMutualRecursionA_SubGroup::MergePartialFromCodedStream(
  14918. ::google::protobuf::io::CodedInputStream* input) {
  14919. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  14920. ::google::protobuf::uint32 tag;
  14921. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestMutualRecursionA.SubGroup)
  14922. for (;;) {
  14923. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  14924. tag = p.first;
  14925. if (!p.second) goto handle_unusual;
  14926. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  14927. // optional .protobuf_unittest.TestMutualRecursionA.SubMessage sub_message = 3;
  14928. case 3: {
  14929. if (static_cast< ::google::protobuf::uint8>(tag) ==
  14930. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  14931. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  14932. input, mutable_sub_message()));
  14933. } else {
  14934. goto handle_unusual;
  14935. }
  14936. break;
  14937. }
  14938. // optional .protobuf_unittest.TestAllTypes not_in_this_scc = 4;
  14939. case 4: {
  14940. if (static_cast< ::google::protobuf::uint8>(tag) ==
  14941. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  14942. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  14943. input, mutable_not_in_this_scc()));
  14944. } else {
  14945. goto handle_unusual;
  14946. }
  14947. break;
  14948. }
  14949. default: {
  14950. handle_unusual:
  14951. if (tag == 0 ||
  14952. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  14953. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  14954. input->SetLastTag(tag);
  14955. goto success;
  14956. }
  14957. DO_(::google::protobuf::internal::WireFormat::SkipField(
  14958. input, tag, _internal_metadata_.mutable_unknown_fields()));
  14959. break;
  14960. }
  14961. }
  14962. }
  14963. success:
  14964. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestMutualRecursionA.SubGroup)
  14965. return true;
  14966. failure:
  14967. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestMutualRecursionA.SubGroup)
  14968. return false;
  14969. #undef DO_
  14970. }
  14971. void TestMutualRecursionA_SubGroup::SerializeWithCachedSizes(
  14972. ::google::protobuf::io::CodedOutputStream* output) const {
  14973. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestMutualRecursionA.SubGroup)
  14974. ::google::protobuf::uint32 cached_has_bits = 0;
  14975. (void) cached_has_bits;
  14976. cached_has_bits = _has_bits_[0];
  14977. // optional .protobuf_unittest.TestMutualRecursionA.SubMessage sub_message = 3;
  14978. if (cached_has_bits & 0x00000001u) {
  14979. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  14980. 3, this->_internal_sub_message(), output);
  14981. }
  14982. // optional .protobuf_unittest.TestAllTypes not_in_this_scc = 4;
  14983. if (cached_has_bits & 0x00000002u) {
  14984. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  14985. 4, this->_internal_not_in_this_scc(), output);
  14986. }
  14987. if (_internal_metadata_.have_unknown_fields()) {
  14988. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  14989. _internal_metadata_.unknown_fields(), output);
  14990. }
  14991. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestMutualRecursionA.SubGroup)
  14992. }
  14993. ::google::protobuf::uint8* TestMutualRecursionA_SubGroup::InternalSerializeWithCachedSizesToArray(
  14994. bool deterministic, ::google::protobuf::uint8* target) const {
  14995. (void)deterministic; // Unused
  14996. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestMutualRecursionA.SubGroup)
  14997. ::google::protobuf::uint32 cached_has_bits = 0;
  14998. (void) cached_has_bits;
  14999. cached_has_bits = _has_bits_[0];
  15000. // optional .protobuf_unittest.TestMutualRecursionA.SubMessage sub_message = 3;
  15001. if (cached_has_bits & 0x00000001u) {
  15002. target = ::google::protobuf::internal::WireFormatLite::
  15003. InternalWriteMessageToArray(
  15004. 3, this->_internal_sub_message(), deterministic, target);
  15005. }
  15006. // optional .protobuf_unittest.TestAllTypes not_in_this_scc = 4;
  15007. if (cached_has_bits & 0x00000002u) {
  15008. target = ::google::protobuf::internal::WireFormatLite::
  15009. InternalWriteMessageToArray(
  15010. 4, this->_internal_not_in_this_scc(), deterministic, target);
  15011. }
  15012. if (_internal_metadata_.have_unknown_fields()) {
  15013. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  15014. _internal_metadata_.unknown_fields(), target);
  15015. }
  15016. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestMutualRecursionA.SubGroup)
  15017. return target;
  15018. }
  15019. size_t TestMutualRecursionA_SubGroup::ByteSizeLong() const {
  15020. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestMutualRecursionA.SubGroup)
  15021. size_t total_size = 0;
  15022. if (_internal_metadata_.have_unknown_fields()) {
  15023. total_size +=
  15024. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  15025. _internal_metadata_.unknown_fields());
  15026. }
  15027. if (_has_bits_[0 / 32] & 3u) {
  15028. // optional .protobuf_unittest.TestMutualRecursionA.SubMessage sub_message = 3;
  15029. if (has_sub_message()) {
  15030. total_size += 1 +
  15031. ::google::protobuf::internal::WireFormatLite::MessageSize(
  15032. *sub_message_);
  15033. }
  15034. // optional .protobuf_unittest.TestAllTypes not_in_this_scc = 4;
  15035. if (has_not_in_this_scc()) {
  15036. total_size += 1 +
  15037. ::google::protobuf::internal::WireFormatLite::MessageSize(
  15038. *not_in_this_scc_);
  15039. }
  15040. }
  15041. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  15042. SetCachedSize(cached_size);
  15043. return total_size;
  15044. }
  15045. void TestMutualRecursionA_SubGroup::MergeFrom(const ::google::protobuf::Message& from) {
  15046. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestMutualRecursionA.SubGroup)
  15047. GOOGLE_DCHECK_NE(&from, this);
  15048. const TestMutualRecursionA_SubGroup* source =
  15049. ::google::protobuf::internal::DynamicCastToGenerated<const TestMutualRecursionA_SubGroup>(
  15050. &from);
  15051. if (source == NULL) {
  15052. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestMutualRecursionA.SubGroup)
  15053. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  15054. } else {
  15055. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestMutualRecursionA.SubGroup)
  15056. MergeFrom(*source);
  15057. }
  15058. }
  15059. void TestMutualRecursionA_SubGroup::MergeFrom(const TestMutualRecursionA_SubGroup& from) {
  15060. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestMutualRecursionA.SubGroup)
  15061. GOOGLE_DCHECK_NE(&from, this);
  15062. _internal_metadata_.MergeFrom(from._internal_metadata_);
  15063. ::google::protobuf::uint32 cached_has_bits = 0;
  15064. (void) cached_has_bits;
  15065. cached_has_bits = from._has_bits_[0];
  15066. if (cached_has_bits & 3u) {
  15067. if (cached_has_bits & 0x00000001u) {
  15068. mutable_sub_message()->::protobuf_unittest::TestMutualRecursionA_SubMessage::MergeFrom(from.sub_message());
  15069. }
  15070. if (cached_has_bits & 0x00000002u) {
  15071. mutable_not_in_this_scc()->::protobuf_unittest::TestAllTypes::MergeFrom(from.not_in_this_scc());
  15072. }
  15073. }
  15074. }
  15075. void TestMutualRecursionA_SubGroup::CopyFrom(const ::google::protobuf::Message& from) {
  15076. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestMutualRecursionA.SubGroup)
  15077. if (&from == this) return;
  15078. Clear();
  15079. MergeFrom(from);
  15080. }
  15081. void TestMutualRecursionA_SubGroup::CopyFrom(const TestMutualRecursionA_SubGroup& from) {
  15082. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestMutualRecursionA.SubGroup)
  15083. if (&from == this) return;
  15084. Clear();
  15085. MergeFrom(from);
  15086. }
  15087. bool TestMutualRecursionA_SubGroup::IsInitialized() const {
  15088. return true;
  15089. }
  15090. void TestMutualRecursionA_SubGroup::Swap(TestMutualRecursionA_SubGroup* other) {
  15091. if (other == this) return;
  15092. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  15093. InternalSwap(other);
  15094. } else {
  15095. TestMutualRecursionA_SubGroup* temp = New(GetArenaNoVirtual());
  15096. temp->MergeFrom(*other);
  15097. other->CopyFrom(*this);
  15098. InternalSwap(temp);
  15099. if (GetArenaNoVirtual() == NULL) {
  15100. delete temp;
  15101. }
  15102. }
  15103. }
  15104. void TestMutualRecursionA_SubGroup::UnsafeArenaSwap(TestMutualRecursionA_SubGroup* other) {
  15105. if (other == this) return;
  15106. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  15107. InternalSwap(other);
  15108. }
  15109. void TestMutualRecursionA_SubGroup::InternalSwap(TestMutualRecursionA_SubGroup* other) {
  15110. using std::swap;
  15111. swap(sub_message_, other->sub_message_);
  15112. swap(not_in_this_scc_, other->not_in_this_scc_);
  15113. swap(_has_bits_[0], other->_has_bits_[0]);
  15114. _internal_metadata_.Swap(&other->_internal_metadata_);
  15115. }
  15116. ::google::protobuf::Metadata TestMutualRecursionA_SubGroup::GetMetadata() const {
  15117. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  15118. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  15119. }
  15120. // ===================================================================
  15121. void TestMutualRecursionA::InitAsDefaultInstance() {
  15122. ::protobuf_unittest::_TestMutualRecursionA_default_instance_._instance.get_mutable()->bb_ = const_cast< ::protobuf_unittest::TestMutualRecursionB*>(
  15123. ::protobuf_unittest::TestMutualRecursionB::internal_default_instance());
  15124. ::protobuf_unittest::_TestMutualRecursionA_default_instance_._instance.get_mutable()->subgroup_ = const_cast< ::protobuf_unittest::TestMutualRecursionA_SubGroup*>(
  15125. ::protobuf_unittest::TestMutualRecursionA_SubGroup::internal_default_instance());
  15126. }
  15127. void TestMutualRecursionA::unsafe_arena_set_allocated_bb(
  15128. ::protobuf_unittest::TestMutualRecursionB* bb) {
  15129. if (GetArenaNoVirtual() == NULL) {
  15130. delete bb_;
  15131. }
  15132. bb_ = bb;
  15133. if (bb) {
  15134. set_has_bb();
  15135. } else {
  15136. clear_has_bb();
  15137. }
  15138. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestMutualRecursionA.bb)
  15139. }
  15140. void TestMutualRecursionA::unsafe_arena_set_allocated_subgroup(
  15141. ::protobuf_unittest::TestMutualRecursionA_SubGroup* subgroup) {
  15142. if (GetArenaNoVirtual() == NULL) {
  15143. delete subgroup_;
  15144. }
  15145. subgroup_ = subgroup;
  15146. if (subgroup) {
  15147. set_has_subgroup();
  15148. } else {
  15149. clear_has_subgroup();
  15150. }
  15151. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestMutualRecursionA.subgroup)
  15152. }
  15153. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  15154. const int TestMutualRecursionA::kBbFieldNumber;
  15155. const int TestMutualRecursionA::kSubgroupFieldNumber;
  15156. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  15157. TestMutualRecursionA::TestMutualRecursionA()
  15158. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  15159. ::google::protobuf::internal::InitSCC(
  15160. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  15161. SharedCtor();
  15162. // @@protoc_insertion_point(constructor:protobuf_unittest.TestMutualRecursionA)
  15163. }
  15164. TestMutualRecursionA::TestMutualRecursionA(::google::protobuf::Arena* arena)
  15165. : ::google::protobuf::Message(),
  15166. _internal_metadata_(arena) {
  15167. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  15168. SharedCtor();
  15169. RegisterArenaDtor(arena);
  15170. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestMutualRecursionA)
  15171. }
  15172. TestMutualRecursionA::TestMutualRecursionA(const TestMutualRecursionA& from)
  15173. : ::google::protobuf::Message(),
  15174. _internal_metadata_(NULL),
  15175. _has_bits_(from._has_bits_) {
  15176. _internal_metadata_.MergeFrom(from._internal_metadata_);
  15177. if (from.has_bb()) {
  15178. bb_ = new ::protobuf_unittest::TestMutualRecursionB(*from.bb_);
  15179. } else {
  15180. bb_ = NULL;
  15181. }
  15182. if (from.has_subgroup()) {
  15183. subgroup_ = new ::protobuf_unittest::TestMutualRecursionA_SubGroup(*from.subgroup_);
  15184. } else {
  15185. subgroup_ = NULL;
  15186. }
  15187. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestMutualRecursionA)
  15188. }
  15189. void TestMutualRecursionA::SharedCtor() {
  15190. ::memset(&bb_, 0, static_cast<size_t>(
  15191. reinterpret_cast<char*>(&subgroup_) -
  15192. reinterpret_cast<char*>(&bb_)) + sizeof(subgroup_));
  15193. }
  15194. TestMutualRecursionA::~TestMutualRecursionA() {
  15195. // @@protoc_insertion_point(destructor:protobuf_unittest.TestMutualRecursionA)
  15196. SharedDtor();
  15197. }
  15198. void TestMutualRecursionA::SharedDtor() {
  15199. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  15200. if (this != internal_default_instance()) delete bb_;
  15201. if (this != internal_default_instance()) delete subgroup_;
  15202. }
  15203. void TestMutualRecursionA::ArenaDtor(void* object) {
  15204. TestMutualRecursionA* _this = reinterpret_cast< TestMutualRecursionA* >(object);
  15205. (void)_this;
  15206. }
  15207. void TestMutualRecursionA::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  15208. }
  15209. void TestMutualRecursionA::SetCachedSize(int size) const {
  15210. _cached_size_.Set(size);
  15211. }
  15212. const ::google::protobuf::Descriptor* TestMutualRecursionA::descriptor() {
  15213. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  15214. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  15215. }
  15216. const TestMutualRecursionA& TestMutualRecursionA::default_instance() {
  15217. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  15218. return *internal_default_instance();
  15219. }
  15220. void TestMutualRecursionA::Clear() {
  15221. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestMutualRecursionA)
  15222. ::google::protobuf::uint32 cached_has_bits = 0;
  15223. // Prevent compiler warnings about cached_has_bits being unused
  15224. (void) cached_has_bits;
  15225. cached_has_bits = _has_bits_[0];
  15226. if (cached_has_bits & 3u) {
  15227. if (cached_has_bits & 0x00000001u) {
  15228. GOOGLE_DCHECK(bb_ != NULL);
  15229. bb_->Clear();
  15230. }
  15231. if (cached_has_bits & 0x00000002u) {
  15232. GOOGLE_DCHECK(subgroup_ != NULL);
  15233. subgroup_->Clear();
  15234. }
  15235. }
  15236. _has_bits_.Clear();
  15237. _internal_metadata_.Clear();
  15238. }
  15239. bool TestMutualRecursionA::MergePartialFromCodedStream(
  15240. ::google::protobuf::io::CodedInputStream* input) {
  15241. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  15242. ::google::protobuf::uint32 tag;
  15243. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestMutualRecursionA)
  15244. for (;;) {
  15245. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  15246. tag = p.first;
  15247. if (!p.second) goto handle_unusual;
  15248. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  15249. // optional .protobuf_unittest.TestMutualRecursionB bb = 1;
  15250. case 1: {
  15251. if (static_cast< ::google::protobuf::uint8>(tag) ==
  15252. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  15253. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  15254. input, mutable_bb()));
  15255. } else {
  15256. goto handle_unusual;
  15257. }
  15258. break;
  15259. }
  15260. // optional group SubGroup = 2 { ... };
  15261. case 2: {
  15262. if (static_cast< ::google::protobuf::uint8>(tag) ==
  15263. static_cast< ::google::protobuf::uint8>(19u /* 19 & 0xFF */)) {
  15264. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
  15265. 2, input, mutable_subgroup()));
  15266. } else {
  15267. goto handle_unusual;
  15268. }
  15269. break;
  15270. }
  15271. default: {
  15272. handle_unusual:
  15273. if (tag == 0) {
  15274. goto success;
  15275. }
  15276. DO_(::google::protobuf::internal::WireFormat::SkipField(
  15277. input, tag, _internal_metadata_.mutable_unknown_fields()));
  15278. break;
  15279. }
  15280. }
  15281. }
  15282. success:
  15283. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestMutualRecursionA)
  15284. return true;
  15285. failure:
  15286. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestMutualRecursionA)
  15287. return false;
  15288. #undef DO_
  15289. }
  15290. void TestMutualRecursionA::SerializeWithCachedSizes(
  15291. ::google::protobuf::io::CodedOutputStream* output) const {
  15292. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestMutualRecursionA)
  15293. ::google::protobuf::uint32 cached_has_bits = 0;
  15294. (void) cached_has_bits;
  15295. cached_has_bits = _has_bits_[0];
  15296. // optional .protobuf_unittest.TestMutualRecursionB bb = 1;
  15297. if (cached_has_bits & 0x00000001u) {
  15298. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  15299. 1, this->_internal_bb(), output);
  15300. }
  15301. // optional group SubGroup = 2 { ... };
  15302. if (cached_has_bits & 0x00000002u) {
  15303. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  15304. 2, this->_internal_subgroup(), output);
  15305. }
  15306. if (_internal_metadata_.have_unknown_fields()) {
  15307. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  15308. _internal_metadata_.unknown_fields(), output);
  15309. }
  15310. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestMutualRecursionA)
  15311. }
  15312. ::google::protobuf::uint8* TestMutualRecursionA::InternalSerializeWithCachedSizesToArray(
  15313. bool deterministic, ::google::protobuf::uint8* target) const {
  15314. (void)deterministic; // Unused
  15315. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestMutualRecursionA)
  15316. ::google::protobuf::uint32 cached_has_bits = 0;
  15317. (void) cached_has_bits;
  15318. cached_has_bits = _has_bits_[0];
  15319. // optional .protobuf_unittest.TestMutualRecursionB bb = 1;
  15320. if (cached_has_bits & 0x00000001u) {
  15321. target = ::google::protobuf::internal::WireFormatLite::
  15322. InternalWriteMessageToArray(
  15323. 1, this->_internal_bb(), deterministic, target);
  15324. }
  15325. // optional group SubGroup = 2 { ... };
  15326. if (cached_has_bits & 0x00000002u) {
  15327. target = ::google::protobuf::internal::WireFormatLite::
  15328. InternalWriteGroupToArray(
  15329. 2, this->_internal_subgroup(), deterministic, target);
  15330. }
  15331. if (_internal_metadata_.have_unknown_fields()) {
  15332. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  15333. _internal_metadata_.unknown_fields(), target);
  15334. }
  15335. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestMutualRecursionA)
  15336. return target;
  15337. }
  15338. size_t TestMutualRecursionA::ByteSizeLong() const {
  15339. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestMutualRecursionA)
  15340. size_t total_size = 0;
  15341. if (_internal_metadata_.have_unknown_fields()) {
  15342. total_size +=
  15343. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  15344. _internal_metadata_.unknown_fields());
  15345. }
  15346. if (_has_bits_[0 / 32] & 3u) {
  15347. // optional .protobuf_unittest.TestMutualRecursionB bb = 1;
  15348. if (has_bb()) {
  15349. total_size += 1 +
  15350. ::google::protobuf::internal::WireFormatLite::MessageSize(
  15351. *bb_);
  15352. }
  15353. // optional group SubGroup = 2 { ... };
  15354. if (has_subgroup()) {
  15355. total_size += 2 +
  15356. ::google::protobuf::internal::WireFormatLite::GroupSize(
  15357. *subgroup_);
  15358. }
  15359. }
  15360. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  15361. SetCachedSize(cached_size);
  15362. return total_size;
  15363. }
  15364. void TestMutualRecursionA::MergeFrom(const ::google::protobuf::Message& from) {
  15365. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestMutualRecursionA)
  15366. GOOGLE_DCHECK_NE(&from, this);
  15367. const TestMutualRecursionA* source =
  15368. ::google::protobuf::internal::DynamicCastToGenerated<const TestMutualRecursionA>(
  15369. &from);
  15370. if (source == NULL) {
  15371. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestMutualRecursionA)
  15372. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  15373. } else {
  15374. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestMutualRecursionA)
  15375. MergeFrom(*source);
  15376. }
  15377. }
  15378. void TestMutualRecursionA::MergeFrom(const TestMutualRecursionA& from) {
  15379. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestMutualRecursionA)
  15380. GOOGLE_DCHECK_NE(&from, this);
  15381. _internal_metadata_.MergeFrom(from._internal_metadata_);
  15382. ::google::protobuf::uint32 cached_has_bits = 0;
  15383. (void) cached_has_bits;
  15384. cached_has_bits = from._has_bits_[0];
  15385. if (cached_has_bits & 3u) {
  15386. if (cached_has_bits & 0x00000001u) {
  15387. mutable_bb()->::protobuf_unittest::TestMutualRecursionB::MergeFrom(from.bb());
  15388. }
  15389. if (cached_has_bits & 0x00000002u) {
  15390. mutable_subgroup()->::protobuf_unittest::TestMutualRecursionA_SubGroup::MergeFrom(from.subgroup());
  15391. }
  15392. }
  15393. }
  15394. void TestMutualRecursionA::CopyFrom(const ::google::protobuf::Message& from) {
  15395. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestMutualRecursionA)
  15396. if (&from == this) return;
  15397. Clear();
  15398. MergeFrom(from);
  15399. }
  15400. void TestMutualRecursionA::CopyFrom(const TestMutualRecursionA& from) {
  15401. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestMutualRecursionA)
  15402. if (&from == this) return;
  15403. Clear();
  15404. MergeFrom(from);
  15405. }
  15406. bool TestMutualRecursionA::IsInitialized() const {
  15407. return true;
  15408. }
  15409. void TestMutualRecursionA::Swap(TestMutualRecursionA* other) {
  15410. if (other == this) return;
  15411. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  15412. InternalSwap(other);
  15413. } else {
  15414. TestMutualRecursionA* temp = New(GetArenaNoVirtual());
  15415. temp->MergeFrom(*other);
  15416. other->CopyFrom(*this);
  15417. InternalSwap(temp);
  15418. if (GetArenaNoVirtual() == NULL) {
  15419. delete temp;
  15420. }
  15421. }
  15422. }
  15423. void TestMutualRecursionA::UnsafeArenaSwap(TestMutualRecursionA* other) {
  15424. if (other == this) return;
  15425. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  15426. InternalSwap(other);
  15427. }
  15428. void TestMutualRecursionA::InternalSwap(TestMutualRecursionA* other) {
  15429. using std::swap;
  15430. swap(bb_, other->bb_);
  15431. swap(subgroup_, other->subgroup_);
  15432. swap(_has_bits_[0], other->_has_bits_[0]);
  15433. _internal_metadata_.Swap(&other->_internal_metadata_);
  15434. }
  15435. ::google::protobuf::Metadata TestMutualRecursionA::GetMetadata() const {
  15436. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  15437. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  15438. }
  15439. // ===================================================================
  15440. void TestMutualRecursionB::InitAsDefaultInstance() {
  15441. ::protobuf_unittest::_TestMutualRecursionB_default_instance_._instance.get_mutable()->a_ = const_cast< ::protobuf_unittest::TestMutualRecursionA*>(
  15442. ::protobuf_unittest::TestMutualRecursionA::internal_default_instance());
  15443. }
  15444. void TestMutualRecursionB::unsafe_arena_set_allocated_a(
  15445. ::protobuf_unittest::TestMutualRecursionA* a) {
  15446. if (GetArenaNoVirtual() == NULL) {
  15447. delete a_;
  15448. }
  15449. a_ = a;
  15450. if (a) {
  15451. set_has_a();
  15452. } else {
  15453. clear_has_a();
  15454. }
  15455. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestMutualRecursionB.a)
  15456. }
  15457. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  15458. const int TestMutualRecursionB::kAFieldNumber;
  15459. const int TestMutualRecursionB::kOptionalInt32FieldNumber;
  15460. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  15461. TestMutualRecursionB::TestMutualRecursionB()
  15462. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  15463. ::google::protobuf::internal::InitSCC(
  15464. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  15465. SharedCtor();
  15466. // @@protoc_insertion_point(constructor:protobuf_unittest.TestMutualRecursionB)
  15467. }
  15468. TestMutualRecursionB::TestMutualRecursionB(::google::protobuf::Arena* arena)
  15469. : ::google::protobuf::Message(),
  15470. _internal_metadata_(arena) {
  15471. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  15472. SharedCtor();
  15473. RegisterArenaDtor(arena);
  15474. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestMutualRecursionB)
  15475. }
  15476. TestMutualRecursionB::TestMutualRecursionB(const TestMutualRecursionB& from)
  15477. : ::google::protobuf::Message(),
  15478. _internal_metadata_(NULL),
  15479. _has_bits_(from._has_bits_) {
  15480. _internal_metadata_.MergeFrom(from._internal_metadata_);
  15481. if (from.has_a()) {
  15482. a_ = new ::protobuf_unittest::TestMutualRecursionA(*from.a_);
  15483. } else {
  15484. a_ = NULL;
  15485. }
  15486. optional_int32_ = from.optional_int32_;
  15487. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestMutualRecursionB)
  15488. }
  15489. void TestMutualRecursionB::SharedCtor() {
  15490. ::memset(&a_, 0, static_cast<size_t>(
  15491. reinterpret_cast<char*>(&optional_int32_) -
  15492. reinterpret_cast<char*>(&a_)) + sizeof(optional_int32_));
  15493. }
  15494. TestMutualRecursionB::~TestMutualRecursionB() {
  15495. // @@protoc_insertion_point(destructor:protobuf_unittest.TestMutualRecursionB)
  15496. SharedDtor();
  15497. }
  15498. void TestMutualRecursionB::SharedDtor() {
  15499. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  15500. if (this != internal_default_instance()) delete a_;
  15501. }
  15502. void TestMutualRecursionB::ArenaDtor(void* object) {
  15503. TestMutualRecursionB* _this = reinterpret_cast< TestMutualRecursionB* >(object);
  15504. (void)_this;
  15505. }
  15506. void TestMutualRecursionB::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  15507. }
  15508. void TestMutualRecursionB::SetCachedSize(int size) const {
  15509. _cached_size_.Set(size);
  15510. }
  15511. const ::google::protobuf::Descriptor* TestMutualRecursionB::descriptor() {
  15512. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  15513. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  15514. }
  15515. const TestMutualRecursionB& TestMutualRecursionB::default_instance() {
  15516. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestMutualRecursionA.base);
  15517. return *internal_default_instance();
  15518. }
  15519. void TestMutualRecursionB::Clear() {
  15520. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestMutualRecursionB)
  15521. ::google::protobuf::uint32 cached_has_bits = 0;
  15522. // Prevent compiler warnings about cached_has_bits being unused
  15523. (void) cached_has_bits;
  15524. cached_has_bits = _has_bits_[0];
  15525. if (cached_has_bits & 0x00000001u) {
  15526. GOOGLE_DCHECK(a_ != NULL);
  15527. a_->Clear();
  15528. }
  15529. optional_int32_ = 0;
  15530. _has_bits_.Clear();
  15531. _internal_metadata_.Clear();
  15532. }
  15533. bool TestMutualRecursionB::MergePartialFromCodedStream(
  15534. ::google::protobuf::io::CodedInputStream* input) {
  15535. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  15536. ::google::protobuf::uint32 tag;
  15537. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestMutualRecursionB)
  15538. for (;;) {
  15539. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  15540. tag = p.first;
  15541. if (!p.second) goto handle_unusual;
  15542. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  15543. // optional .protobuf_unittest.TestMutualRecursionA a = 1;
  15544. case 1: {
  15545. if (static_cast< ::google::protobuf::uint8>(tag) ==
  15546. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  15547. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  15548. input, mutable_a()));
  15549. } else {
  15550. goto handle_unusual;
  15551. }
  15552. break;
  15553. }
  15554. // optional int32 optional_int32 = 2;
  15555. case 2: {
  15556. if (static_cast< ::google::protobuf::uint8>(tag) ==
  15557. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  15558. set_has_optional_int32();
  15559. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  15560. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  15561. input, &optional_int32_)));
  15562. } else {
  15563. goto handle_unusual;
  15564. }
  15565. break;
  15566. }
  15567. default: {
  15568. handle_unusual:
  15569. if (tag == 0) {
  15570. goto success;
  15571. }
  15572. DO_(::google::protobuf::internal::WireFormat::SkipField(
  15573. input, tag, _internal_metadata_.mutable_unknown_fields()));
  15574. break;
  15575. }
  15576. }
  15577. }
  15578. success:
  15579. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestMutualRecursionB)
  15580. return true;
  15581. failure:
  15582. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestMutualRecursionB)
  15583. return false;
  15584. #undef DO_
  15585. }
  15586. void TestMutualRecursionB::SerializeWithCachedSizes(
  15587. ::google::protobuf::io::CodedOutputStream* output) const {
  15588. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestMutualRecursionB)
  15589. ::google::protobuf::uint32 cached_has_bits = 0;
  15590. (void) cached_has_bits;
  15591. cached_has_bits = _has_bits_[0];
  15592. // optional .protobuf_unittest.TestMutualRecursionA a = 1;
  15593. if (cached_has_bits & 0x00000001u) {
  15594. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  15595. 1, this->_internal_a(), output);
  15596. }
  15597. // optional int32 optional_int32 = 2;
  15598. if (cached_has_bits & 0x00000002u) {
  15599. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->optional_int32(), output);
  15600. }
  15601. if (_internal_metadata_.have_unknown_fields()) {
  15602. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  15603. _internal_metadata_.unknown_fields(), output);
  15604. }
  15605. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestMutualRecursionB)
  15606. }
  15607. ::google::protobuf::uint8* TestMutualRecursionB::InternalSerializeWithCachedSizesToArray(
  15608. bool deterministic, ::google::protobuf::uint8* target) const {
  15609. (void)deterministic; // Unused
  15610. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestMutualRecursionB)
  15611. ::google::protobuf::uint32 cached_has_bits = 0;
  15612. (void) cached_has_bits;
  15613. cached_has_bits = _has_bits_[0];
  15614. // optional .protobuf_unittest.TestMutualRecursionA a = 1;
  15615. if (cached_has_bits & 0x00000001u) {
  15616. target = ::google::protobuf::internal::WireFormatLite::
  15617. InternalWriteMessageToArray(
  15618. 1, this->_internal_a(), deterministic, target);
  15619. }
  15620. // optional int32 optional_int32 = 2;
  15621. if (cached_has_bits & 0x00000002u) {
  15622. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->optional_int32(), target);
  15623. }
  15624. if (_internal_metadata_.have_unknown_fields()) {
  15625. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  15626. _internal_metadata_.unknown_fields(), target);
  15627. }
  15628. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestMutualRecursionB)
  15629. return target;
  15630. }
  15631. size_t TestMutualRecursionB::ByteSizeLong() const {
  15632. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestMutualRecursionB)
  15633. size_t total_size = 0;
  15634. if (_internal_metadata_.have_unknown_fields()) {
  15635. total_size +=
  15636. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  15637. _internal_metadata_.unknown_fields());
  15638. }
  15639. if (_has_bits_[0 / 32] & 3u) {
  15640. // optional .protobuf_unittest.TestMutualRecursionA a = 1;
  15641. if (has_a()) {
  15642. total_size += 1 +
  15643. ::google::protobuf::internal::WireFormatLite::MessageSize(
  15644. *a_);
  15645. }
  15646. // optional int32 optional_int32 = 2;
  15647. if (has_optional_int32()) {
  15648. total_size += 1 +
  15649. ::google::protobuf::internal::WireFormatLite::Int32Size(
  15650. this->optional_int32());
  15651. }
  15652. }
  15653. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  15654. SetCachedSize(cached_size);
  15655. return total_size;
  15656. }
  15657. void TestMutualRecursionB::MergeFrom(const ::google::protobuf::Message& from) {
  15658. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestMutualRecursionB)
  15659. GOOGLE_DCHECK_NE(&from, this);
  15660. const TestMutualRecursionB* source =
  15661. ::google::protobuf::internal::DynamicCastToGenerated<const TestMutualRecursionB>(
  15662. &from);
  15663. if (source == NULL) {
  15664. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestMutualRecursionB)
  15665. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  15666. } else {
  15667. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestMutualRecursionB)
  15668. MergeFrom(*source);
  15669. }
  15670. }
  15671. void TestMutualRecursionB::MergeFrom(const TestMutualRecursionB& from) {
  15672. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestMutualRecursionB)
  15673. GOOGLE_DCHECK_NE(&from, this);
  15674. _internal_metadata_.MergeFrom(from._internal_metadata_);
  15675. ::google::protobuf::uint32 cached_has_bits = 0;
  15676. (void) cached_has_bits;
  15677. cached_has_bits = from._has_bits_[0];
  15678. if (cached_has_bits & 3u) {
  15679. if (cached_has_bits & 0x00000001u) {
  15680. mutable_a()->::protobuf_unittest::TestMutualRecursionA::MergeFrom(from.a());
  15681. }
  15682. if (cached_has_bits & 0x00000002u) {
  15683. optional_int32_ = from.optional_int32_;
  15684. }
  15685. _has_bits_[0] |= cached_has_bits;
  15686. }
  15687. }
  15688. void TestMutualRecursionB::CopyFrom(const ::google::protobuf::Message& from) {
  15689. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestMutualRecursionB)
  15690. if (&from == this) return;
  15691. Clear();
  15692. MergeFrom(from);
  15693. }
  15694. void TestMutualRecursionB::CopyFrom(const TestMutualRecursionB& from) {
  15695. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestMutualRecursionB)
  15696. if (&from == this) return;
  15697. Clear();
  15698. MergeFrom(from);
  15699. }
  15700. bool TestMutualRecursionB::IsInitialized() const {
  15701. return true;
  15702. }
  15703. void TestMutualRecursionB::Swap(TestMutualRecursionB* other) {
  15704. if (other == this) return;
  15705. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  15706. InternalSwap(other);
  15707. } else {
  15708. TestMutualRecursionB* temp = New(GetArenaNoVirtual());
  15709. temp->MergeFrom(*other);
  15710. other->CopyFrom(*this);
  15711. InternalSwap(temp);
  15712. if (GetArenaNoVirtual() == NULL) {
  15713. delete temp;
  15714. }
  15715. }
  15716. }
  15717. void TestMutualRecursionB::UnsafeArenaSwap(TestMutualRecursionB* other) {
  15718. if (other == this) return;
  15719. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  15720. InternalSwap(other);
  15721. }
  15722. void TestMutualRecursionB::InternalSwap(TestMutualRecursionB* other) {
  15723. using std::swap;
  15724. swap(a_, other->a_);
  15725. swap(optional_int32_, other->optional_int32_);
  15726. swap(_has_bits_[0], other->_has_bits_[0]);
  15727. _internal_metadata_.Swap(&other->_internal_metadata_);
  15728. }
  15729. ::google::protobuf::Metadata TestMutualRecursionB::GetMetadata() const {
  15730. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  15731. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  15732. }
  15733. // ===================================================================
  15734. void TestIsInitialized_SubMessage_SubGroup::InitAsDefaultInstance() {
  15735. }
  15736. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  15737. const int TestIsInitialized_SubMessage_SubGroup::kIFieldNumber;
  15738. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  15739. TestIsInitialized_SubMessage_SubGroup::TestIsInitialized_SubMessage_SubGroup()
  15740. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  15741. ::google::protobuf::internal::InitSCC(
  15742. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage_SubGroup.base);
  15743. SharedCtor();
  15744. // @@protoc_insertion_point(constructor:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15745. }
  15746. TestIsInitialized_SubMessage_SubGroup::TestIsInitialized_SubMessage_SubGroup(::google::protobuf::Arena* arena)
  15747. : ::google::protobuf::Message(),
  15748. _internal_metadata_(arena) {
  15749. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage_SubGroup.base);
  15750. SharedCtor();
  15751. RegisterArenaDtor(arena);
  15752. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15753. }
  15754. TestIsInitialized_SubMessage_SubGroup::TestIsInitialized_SubMessage_SubGroup(const TestIsInitialized_SubMessage_SubGroup& from)
  15755. : ::google::protobuf::Message(),
  15756. _internal_metadata_(NULL),
  15757. _has_bits_(from._has_bits_) {
  15758. _internal_metadata_.MergeFrom(from._internal_metadata_);
  15759. i_ = from.i_;
  15760. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15761. }
  15762. void TestIsInitialized_SubMessage_SubGroup::SharedCtor() {
  15763. i_ = 0;
  15764. }
  15765. TestIsInitialized_SubMessage_SubGroup::~TestIsInitialized_SubMessage_SubGroup() {
  15766. // @@protoc_insertion_point(destructor:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15767. SharedDtor();
  15768. }
  15769. void TestIsInitialized_SubMessage_SubGroup::SharedDtor() {
  15770. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  15771. }
  15772. void TestIsInitialized_SubMessage_SubGroup::ArenaDtor(void* object) {
  15773. TestIsInitialized_SubMessage_SubGroup* _this = reinterpret_cast< TestIsInitialized_SubMessage_SubGroup* >(object);
  15774. (void)_this;
  15775. }
  15776. void TestIsInitialized_SubMessage_SubGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  15777. }
  15778. void TestIsInitialized_SubMessage_SubGroup::SetCachedSize(int size) const {
  15779. _cached_size_.Set(size);
  15780. }
  15781. const ::google::protobuf::Descriptor* TestIsInitialized_SubMessage_SubGroup::descriptor() {
  15782. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  15783. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  15784. }
  15785. const TestIsInitialized_SubMessage_SubGroup& TestIsInitialized_SubMessage_SubGroup::default_instance() {
  15786. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage_SubGroup.base);
  15787. return *internal_default_instance();
  15788. }
  15789. void TestIsInitialized_SubMessage_SubGroup::Clear() {
  15790. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15791. ::google::protobuf::uint32 cached_has_bits = 0;
  15792. // Prevent compiler warnings about cached_has_bits being unused
  15793. (void) cached_has_bits;
  15794. i_ = 0;
  15795. _has_bits_.Clear();
  15796. _internal_metadata_.Clear();
  15797. }
  15798. bool TestIsInitialized_SubMessage_SubGroup::MergePartialFromCodedStream(
  15799. ::google::protobuf::io::CodedInputStream* input) {
  15800. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  15801. ::google::protobuf::uint32 tag;
  15802. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15803. for (;;) {
  15804. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  15805. tag = p.first;
  15806. if (!p.second) goto handle_unusual;
  15807. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  15808. // required int32 i = 2;
  15809. case 2: {
  15810. if (static_cast< ::google::protobuf::uint8>(tag) ==
  15811. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  15812. set_has_i();
  15813. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  15814. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  15815. input, &i_)));
  15816. } else {
  15817. goto handle_unusual;
  15818. }
  15819. break;
  15820. }
  15821. default: {
  15822. handle_unusual:
  15823. if (tag == 0 ||
  15824. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  15825. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  15826. input->SetLastTag(tag);
  15827. goto success;
  15828. }
  15829. DO_(::google::protobuf::internal::WireFormat::SkipField(
  15830. input, tag, _internal_metadata_.mutable_unknown_fields()));
  15831. break;
  15832. }
  15833. }
  15834. }
  15835. success:
  15836. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15837. return true;
  15838. failure:
  15839. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15840. return false;
  15841. #undef DO_
  15842. }
  15843. void TestIsInitialized_SubMessage_SubGroup::SerializeWithCachedSizes(
  15844. ::google::protobuf::io::CodedOutputStream* output) const {
  15845. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15846. ::google::protobuf::uint32 cached_has_bits = 0;
  15847. (void) cached_has_bits;
  15848. cached_has_bits = _has_bits_[0];
  15849. // required int32 i = 2;
  15850. if (cached_has_bits & 0x00000001u) {
  15851. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->i(), output);
  15852. }
  15853. if (_internal_metadata_.have_unknown_fields()) {
  15854. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  15855. _internal_metadata_.unknown_fields(), output);
  15856. }
  15857. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15858. }
  15859. ::google::protobuf::uint8* TestIsInitialized_SubMessage_SubGroup::InternalSerializeWithCachedSizesToArray(
  15860. bool deterministic, ::google::protobuf::uint8* target) const {
  15861. (void)deterministic; // Unused
  15862. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15863. ::google::protobuf::uint32 cached_has_bits = 0;
  15864. (void) cached_has_bits;
  15865. cached_has_bits = _has_bits_[0];
  15866. // required int32 i = 2;
  15867. if (cached_has_bits & 0x00000001u) {
  15868. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->i(), target);
  15869. }
  15870. if (_internal_metadata_.have_unknown_fields()) {
  15871. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  15872. _internal_metadata_.unknown_fields(), target);
  15873. }
  15874. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15875. return target;
  15876. }
  15877. size_t TestIsInitialized_SubMessage_SubGroup::ByteSizeLong() const {
  15878. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15879. size_t total_size = 0;
  15880. if (_internal_metadata_.have_unknown_fields()) {
  15881. total_size +=
  15882. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  15883. _internal_metadata_.unknown_fields());
  15884. }
  15885. // required int32 i = 2;
  15886. if (has_i()) {
  15887. total_size += 1 +
  15888. ::google::protobuf::internal::WireFormatLite::Int32Size(
  15889. this->i());
  15890. }
  15891. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  15892. SetCachedSize(cached_size);
  15893. return total_size;
  15894. }
  15895. void TestIsInitialized_SubMessage_SubGroup::MergeFrom(const ::google::protobuf::Message& from) {
  15896. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15897. GOOGLE_DCHECK_NE(&from, this);
  15898. const TestIsInitialized_SubMessage_SubGroup* source =
  15899. ::google::protobuf::internal::DynamicCastToGenerated<const TestIsInitialized_SubMessage_SubGroup>(
  15900. &from);
  15901. if (source == NULL) {
  15902. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15903. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  15904. } else {
  15905. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15906. MergeFrom(*source);
  15907. }
  15908. }
  15909. void TestIsInitialized_SubMessage_SubGroup::MergeFrom(const TestIsInitialized_SubMessage_SubGroup& from) {
  15910. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15911. GOOGLE_DCHECK_NE(&from, this);
  15912. _internal_metadata_.MergeFrom(from._internal_metadata_);
  15913. ::google::protobuf::uint32 cached_has_bits = 0;
  15914. (void) cached_has_bits;
  15915. if (from.has_i()) {
  15916. set_i(from.i());
  15917. }
  15918. }
  15919. void TestIsInitialized_SubMessage_SubGroup::CopyFrom(const ::google::protobuf::Message& from) {
  15920. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15921. if (&from == this) return;
  15922. Clear();
  15923. MergeFrom(from);
  15924. }
  15925. void TestIsInitialized_SubMessage_SubGroup::CopyFrom(const TestIsInitialized_SubMessage_SubGroup& from) {
  15926. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestIsInitialized.SubMessage.SubGroup)
  15927. if (&from == this) return;
  15928. Clear();
  15929. MergeFrom(from);
  15930. }
  15931. bool TestIsInitialized_SubMessage_SubGroup::IsInitialized() const {
  15932. if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
  15933. return true;
  15934. }
  15935. void TestIsInitialized_SubMessage_SubGroup::Swap(TestIsInitialized_SubMessage_SubGroup* other) {
  15936. if (other == this) return;
  15937. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  15938. InternalSwap(other);
  15939. } else {
  15940. TestIsInitialized_SubMessage_SubGroup* temp = New(GetArenaNoVirtual());
  15941. temp->MergeFrom(*other);
  15942. other->CopyFrom(*this);
  15943. InternalSwap(temp);
  15944. if (GetArenaNoVirtual() == NULL) {
  15945. delete temp;
  15946. }
  15947. }
  15948. }
  15949. void TestIsInitialized_SubMessage_SubGroup::UnsafeArenaSwap(TestIsInitialized_SubMessage_SubGroup* other) {
  15950. if (other == this) return;
  15951. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  15952. InternalSwap(other);
  15953. }
  15954. void TestIsInitialized_SubMessage_SubGroup::InternalSwap(TestIsInitialized_SubMessage_SubGroup* other) {
  15955. using std::swap;
  15956. swap(i_, other->i_);
  15957. swap(_has_bits_[0], other->_has_bits_[0]);
  15958. _internal_metadata_.Swap(&other->_internal_metadata_);
  15959. }
  15960. ::google::protobuf::Metadata TestIsInitialized_SubMessage_SubGroup::GetMetadata() const {
  15961. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  15962. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  15963. }
  15964. // ===================================================================
  15965. void TestIsInitialized_SubMessage::InitAsDefaultInstance() {
  15966. ::protobuf_unittest::_TestIsInitialized_SubMessage_default_instance_._instance.get_mutable()->subgroup_ = const_cast< ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup*>(
  15967. ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup::internal_default_instance());
  15968. }
  15969. void TestIsInitialized_SubMessage::unsafe_arena_set_allocated_subgroup(
  15970. ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup* subgroup) {
  15971. if (GetArenaNoVirtual() == NULL) {
  15972. delete subgroup_;
  15973. }
  15974. subgroup_ = subgroup;
  15975. if (subgroup) {
  15976. set_has_subgroup();
  15977. } else {
  15978. clear_has_subgroup();
  15979. }
  15980. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestIsInitialized.SubMessage.subgroup)
  15981. }
  15982. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  15983. const int TestIsInitialized_SubMessage::kSubgroupFieldNumber;
  15984. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  15985. TestIsInitialized_SubMessage::TestIsInitialized_SubMessage()
  15986. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  15987. ::google::protobuf::internal::InitSCC(
  15988. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage.base);
  15989. SharedCtor();
  15990. // @@protoc_insertion_point(constructor:protobuf_unittest.TestIsInitialized.SubMessage)
  15991. }
  15992. TestIsInitialized_SubMessage::TestIsInitialized_SubMessage(::google::protobuf::Arena* arena)
  15993. : ::google::protobuf::Message(),
  15994. _internal_metadata_(arena) {
  15995. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage.base);
  15996. SharedCtor();
  15997. RegisterArenaDtor(arena);
  15998. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestIsInitialized.SubMessage)
  15999. }
  16000. TestIsInitialized_SubMessage::TestIsInitialized_SubMessage(const TestIsInitialized_SubMessage& from)
  16001. : ::google::protobuf::Message(),
  16002. _internal_metadata_(NULL),
  16003. _has_bits_(from._has_bits_) {
  16004. _internal_metadata_.MergeFrom(from._internal_metadata_);
  16005. if (from.has_subgroup()) {
  16006. subgroup_ = new ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup(*from.subgroup_);
  16007. } else {
  16008. subgroup_ = NULL;
  16009. }
  16010. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestIsInitialized.SubMessage)
  16011. }
  16012. void TestIsInitialized_SubMessage::SharedCtor() {
  16013. subgroup_ = NULL;
  16014. }
  16015. TestIsInitialized_SubMessage::~TestIsInitialized_SubMessage() {
  16016. // @@protoc_insertion_point(destructor:protobuf_unittest.TestIsInitialized.SubMessage)
  16017. SharedDtor();
  16018. }
  16019. void TestIsInitialized_SubMessage::SharedDtor() {
  16020. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  16021. if (this != internal_default_instance()) delete subgroup_;
  16022. }
  16023. void TestIsInitialized_SubMessage::ArenaDtor(void* object) {
  16024. TestIsInitialized_SubMessage* _this = reinterpret_cast< TestIsInitialized_SubMessage* >(object);
  16025. (void)_this;
  16026. }
  16027. void TestIsInitialized_SubMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  16028. }
  16029. void TestIsInitialized_SubMessage::SetCachedSize(int size) const {
  16030. _cached_size_.Set(size);
  16031. }
  16032. const ::google::protobuf::Descriptor* TestIsInitialized_SubMessage::descriptor() {
  16033. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  16034. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  16035. }
  16036. const TestIsInitialized_SubMessage& TestIsInitialized_SubMessage::default_instance() {
  16037. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized_SubMessage.base);
  16038. return *internal_default_instance();
  16039. }
  16040. void TestIsInitialized_SubMessage::Clear() {
  16041. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestIsInitialized.SubMessage)
  16042. ::google::protobuf::uint32 cached_has_bits = 0;
  16043. // Prevent compiler warnings about cached_has_bits being unused
  16044. (void) cached_has_bits;
  16045. cached_has_bits = _has_bits_[0];
  16046. if (cached_has_bits & 0x00000001u) {
  16047. GOOGLE_DCHECK(subgroup_ != NULL);
  16048. subgroup_->Clear();
  16049. }
  16050. _has_bits_.Clear();
  16051. _internal_metadata_.Clear();
  16052. }
  16053. bool TestIsInitialized_SubMessage::MergePartialFromCodedStream(
  16054. ::google::protobuf::io::CodedInputStream* input) {
  16055. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  16056. ::google::protobuf::uint32 tag;
  16057. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestIsInitialized.SubMessage)
  16058. for (;;) {
  16059. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  16060. tag = p.first;
  16061. if (!p.second) goto handle_unusual;
  16062. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  16063. // optional group SubGroup = 1 { ... };
  16064. case 1: {
  16065. if (static_cast< ::google::protobuf::uint8>(tag) ==
  16066. static_cast< ::google::protobuf::uint8>(11u /* 11 & 0xFF */)) {
  16067. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
  16068. 1, input, mutable_subgroup()));
  16069. } else {
  16070. goto handle_unusual;
  16071. }
  16072. break;
  16073. }
  16074. default: {
  16075. handle_unusual:
  16076. if (tag == 0) {
  16077. goto success;
  16078. }
  16079. DO_(::google::protobuf::internal::WireFormat::SkipField(
  16080. input, tag, _internal_metadata_.mutable_unknown_fields()));
  16081. break;
  16082. }
  16083. }
  16084. }
  16085. success:
  16086. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestIsInitialized.SubMessage)
  16087. return true;
  16088. failure:
  16089. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestIsInitialized.SubMessage)
  16090. return false;
  16091. #undef DO_
  16092. }
  16093. void TestIsInitialized_SubMessage::SerializeWithCachedSizes(
  16094. ::google::protobuf::io::CodedOutputStream* output) const {
  16095. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestIsInitialized.SubMessage)
  16096. ::google::protobuf::uint32 cached_has_bits = 0;
  16097. (void) cached_has_bits;
  16098. cached_has_bits = _has_bits_[0];
  16099. // optional group SubGroup = 1 { ... };
  16100. if (cached_has_bits & 0x00000001u) {
  16101. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  16102. 1, this->_internal_subgroup(), output);
  16103. }
  16104. if (_internal_metadata_.have_unknown_fields()) {
  16105. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  16106. _internal_metadata_.unknown_fields(), output);
  16107. }
  16108. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestIsInitialized.SubMessage)
  16109. }
  16110. ::google::protobuf::uint8* TestIsInitialized_SubMessage::InternalSerializeWithCachedSizesToArray(
  16111. bool deterministic, ::google::protobuf::uint8* target) const {
  16112. (void)deterministic; // Unused
  16113. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestIsInitialized.SubMessage)
  16114. ::google::protobuf::uint32 cached_has_bits = 0;
  16115. (void) cached_has_bits;
  16116. cached_has_bits = _has_bits_[0];
  16117. // optional group SubGroup = 1 { ... };
  16118. if (cached_has_bits & 0x00000001u) {
  16119. target = ::google::protobuf::internal::WireFormatLite::
  16120. InternalWriteGroupToArray(
  16121. 1, this->_internal_subgroup(), deterministic, target);
  16122. }
  16123. if (_internal_metadata_.have_unknown_fields()) {
  16124. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  16125. _internal_metadata_.unknown_fields(), target);
  16126. }
  16127. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestIsInitialized.SubMessage)
  16128. return target;
  16129. }
  16130. size_t TestIsInitialized_SubMessage::ByteSizeLong() const {
  16131. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestIsInitialized.SubMessage)
  16132. size_t total_size = 0;
  16133. if (_internal_metadata_.have_unknown_fields()) {
  16134. total_size +=
  16135. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  16136. _internal_metadata_.unknown_fields());
  16137. }
  16138. // optional group SubGroup = 1 { ... };
  16139. if (has_subgroup()) {
  16140. total_size += 2 +
  16141. ::google::protobuf::internal::WireFormatLite::GroupSize(
  16142. *subgroup_);
  16143. }
  16144. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  16145. SetCachedSize(cached_size);
  16146. return total_size;
  16147. }
  16148. void TestIsInitialized_SubMessage::MergeFrom(const ::google::protobuf::Message& from) {
  16149. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestIsInitialized.SubMessage)
  16150. GOOGLE_DCHECK_NE(&from, this);
  16151. const TestIsInitialized_SubMessage* source =
  16152. ::google::protobuf::internal::DynamicCastToGenerated<const TestIsInitialized_SubMessage>(
  16153. &from);
  16154. if (source == NULL) {
  16155. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestIsInitialized.SubMessage)
  16156. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  16157. } else {
  16158. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestIsInitialized.SubMessage)
  16159. MergeFrom(*source);
  16160. }
  16161. }
  16162. void TestIsInitialized_SubMessage::MergeFrom(const TestIsInitialized_SubMessage& from) {
  16163. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestIsInitialized.SubMessage)
  16164. GOOGLE_DCHECK_NE(&from, this);
  16165. _internal_metadata_.MergeFrom(from._internal_metadata_);
  16166. ::google::protobuf::uint32 cached_has_bits = 0;
  16167. (void) cached_has_bits;
  16168. if (from.has_subgroup()) {
  16169. mutable_subgroup()->::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup::MergeFrom(from.subgroup());
  16170. }
  16171. }
  16172. void TestIsInitialized_SubMessage::CopyFrom(const ::google::protobuf::Message& from) {
  16173. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestIsInitialized.SubMessage)
  16174. if (&from == this) return;
  16175. Clear();
  16176. MergeFrom(from);
  16177. }
  16178. void TestIsInitialized_SubMessage::CopyFrom(const TestIsInitialized_SubMessage& from) {
  16179. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestIsInitialized.SubMessage)
  16180. if (&from == this) return;
  16181. Clear();
  16182. MergeFrom(from);
  16183. }
  16184. bool TestIsInitialized_SubMessage::IsInitialized() const {
  16185. if (has_subgroup()) {
  16186. if (!this->subgroup_->IsInitialized()) return false;
  16187. }
  16188. return true;
  16189. }
  16190. void TestIsInitialized_SubMessage::Swap(TestIsInitialized_SubMessage* other) {
  16191. if (other == this) return;
  16192. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  16193. InternalSwap(other);
  16194. } else {
  16195. TestIsInitialized_SubMessage* temp = New(GetArenaNoVirtual());
  16196. temp->MergeFrom(*other);
  16197. other->CopyFrom(*this);
  16198. InternalSwap(temp);
  16199. if (GetArenaNoVirtual() == NULL) {
  16200. delete temp;
  16201. }
  16202. }
  16203. }
  16204. void TestIsInitialized_SubMessage::UnsafeArenaSwap(TestIsInitialized_SubMessage* other) {
  16205. if (other == this) return;
  16206. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  16207. InternalSwap(other);
  16208. }
  16209. void TestIsInitialized_SubMessage::InternalSwap(TestIsInitialized_SubMessage* other) {
  16210. using std::swap;
  16211. swap(subgroup_, other->subgroup_);
  16212. swap(_has_bits_[0], other->_has_bits_[0]);
  16213. _internal_metadata_.Swap(&other->_internal_metadata_);
  16214. }
  16215. ::google::protobuf::Metadata TestIsInitialized_SubMessage::GetMetadata() const {
  16216. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  16217. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  16218. }
  16219. // ===================================================================
  16220. void TestIsInitialized::InitAsDefaultInstance() {
  16221. ::protobuf_unittest::_TestIsInitialized_default_instance_._instance.get_mutable()->sub_message_ = const_cast< ::protobuf_unittest::TestIsInitialized_SubMessage*>(
  16222. ::protobuf_unittest::TestIsInitialized_SubMessage::internal_default_instance());
  16223. }
  16224. void TestIsInitialized::unsafe_arena_set_allocated_sub_message(
  16225. ::protobuf_unittest::TestIsInitialized_SubMessage* sub_message) {
  16226. if (GetArenaNoVirtual() == NULL) {
  16227. delete sub_message_;
  16228. }
  16229. sub_message_ = sub_message;
  16230. if (sub_message) {
  16231. set_has_sub_message();
  16232. } else {
  16233. clear_has_sub_message();
  16234. }
  16235. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestIsInitialized.sub_message)
  16236. }
  16237. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  16238. const int TestIsInitialized::kSubMessageFieldNumber;
  16239. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  16240. TestIsInitialized::TestIsInitialized()
  16241. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  16242. ::google::protobuf::internal::InitSCC(
  16243. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized.base);
  16244. SharedCtor();
  16245. // @@protoc_insertion_point(constructor:protobuf_unittest.TestIsInitialized)
  16246. }
  16247. TestIsInitialized::TestIsInitialized(::google::protobuf::Arena* arena)
  16248. : ::google::protobuf::Message(),
  16249. _internal_metadata_(arena) {
  16250. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized.base);
  16251. SharedCtor();
  16252. RegisterArenaDtor(arena);
  16253. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestIsInitialized)
  16254. }
  16255. TestIsInitialized::TestIsInitialized(const TestIsInitialized& from)
  16256. : ::google::protobuf::Message(),
  16257. _internal_metadata_(NULL),
  16258. _has_bits_(from._has_bits_) {
  16259. _internal_metadata_.MergeFrom(from._internal_metadata_);
  16260. if (from.has_sub_message()) {
  16261. sub_message_ = new ::protobuf_unittest::TestIsInitialized_SubMessage(*from.sub_message_);
  16262. } else {
  16263. sub_message_ = NULL;
  16264. }
  16265. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestIsInitialized)
  16266. }
  16267. void TestIsInitialized::SharedCtor() {
  16268. sub_message_ = NULL;
  16269. }
  16270. TestIsInitialized::~TestIsInitialized() {
  16271. // @@protoc_insertion_point(destructor:protobuf_unittest.TestIsInitialized)
  16272. SharedDtor();
  16273. }
  16274. void TestIsInitialized::SharedDtor() {
  16275. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  16276. if (this != internal_default_instance()) delete sub_message_;
  16277. }
  16278. void TestIsInitialized::ArenaDtor(void* object) {
  16279. TestIsInitialized* _this = reinterpret_cast< TestIsInitialized* >(object);
  16280. (void)_this;
  16281. }
  16282. void TestIsInitialized::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  16283. }
  16284. void TestIsInitialized::SetCachedSize(int size) const {
  16285. _cached_size_.Set(size);
  16286. }
  16287. const ::google::protobuf::Descriptor* TestIsInitialized::descriptor() {
  16288. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  16289. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  16290. }
  16291. const TestIsInitialized& TestIsInitialized::default_instance() {
  16292. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestIsInitialized.base);
  16293. return *internal_default_instance();
  16294. }
  16295. void TestIsInitialized::Clear() {
  16296. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestIsInitialized)
  16297. ::google::protobuf::uint32 cached_has_bits = 0;
  16298. // Prevent compiler warnings about cached_has_bits being unused
  16299. (void) cached_has_bits;
  16300. cached_has_bits = _has_bits_[0];
  16301. if (cached_has_bits & 0x00000001u) {
  16302. GOOGLE_DCHECK(sub_message_ != NULL);
  16303. sub_message_->Clear();
  16304. }
  16305. _has_bits_.Clear();
  16306. _internal_metadata_.Clear();
  16307. }
  16308. bool TestIsInitialized::MergePartialFromCodedStream(
  16309. ::google::protobuf::io::CodedInputStream* input) {
  16310. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  16311. ::google::protobuf::uint32 tag;
  16312. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestIsInitialized)
  16313. for (;;) {
  16314. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  16315. tag = p.first;
  16316. if (!p.second) goto handle_unusual;
  16317. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  16318. // optional .protobuf_unittest.TestIsInitialized.SubMessage sub_message = 1;
  16319. case 1: {
  16320. if (static_cast< ::google::protobuf::uint8>(tag) ==
  16321. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  16322. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  16323. input, mutable_sub_message()));
  16324. } else {
  16325. goto handle_unusual;
  16326. }
  16327. break;
  16328. }
  16329. default: {
  16330. handle_unusual:
  16331. if (tag == 0) {
  16332. goto success;
  16333. }
  16334. DO_(::google::protobuf::internal::WireFormat::SkipField(
  16335. input, tag, _internal_metadata_.mutable_unknown_fields()));
  16336. break;
  16337. }
  16338. }
  16339. }
  16340. success:
  16341. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestIsInitialized)
  16342. return true;
  16343. failure:
  16344. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestIsInitialized)
  16345. return false;
  16346. #undef DO_
  16347. }
  16348. void TestIsInitialized::SerializeWithCachedSizes(
  16349. ::google::protobuf::io::CodedOutputStream* output) const {
  16350. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestIsInitialized)
  16351. ::google::protobuf::uint32 cached_has_bits = 0;
  16352. (void) cached_has_bits;
  16353. cached_has_bits = _has_bits_[0];
  16354. // optional .protobuf_unittest.TestIsInitialized.SubMessage sub_message = 1;
  16355. if (cached_has_bits & 0x00000001u) {
  16356. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  16357. 1, this->_internal_sub_message(), output);
  16358. }
  16359. if (_internal_metadata_.have_unknown_fields()) {
  16360. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  16361. _internal_metadata_.unknown_fields(), output);
  16362. }
  16363. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestIsInitialized)
  16364. }
  16365. ::google::protobuf::uint8* TestIsInitialized::InternalSerializeWithCachedSizesToArray(
  16366. bool deterministic, ::google::protobuf::uint8* target) const {
  16367. (void)deterministic; // Unused
  16368. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestIsInitialized)
  16369. ::google::protobuf::uint32 cached_has_bits = 0;
  16370. (void) cached_has_bits;
  16371. cached_has_bits = _has_bits_[0];
  16372. // optional .protobuf_unittest.TestIsInitialized.SubMessage sub_message = 1;
  16373. if (cached_has_bits & 0x00000001u) {
  16374. target = ::google::protobuf::internal::WireFormatLite::
  16375. InternalWriteMessageToArray(
  16376. 1, this->_internal_sub_message(), deterministic, target);
  16377. }
  16378. if (_internal_metadata_.have_unknown_fields()) {
  16379. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  16380. _internal_metadata_.unknown_fields(), target);
  16381. }
  16382. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestIsInitialized)
  16383. return target;
  16384. }
  16385. size_t TestIsInitialized::ByteSizeLong() const {
  16386. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestIsInitialized)
  16387. size_t total_size = 0;
  16388. if (_internal_metadata_.have_unknown_fields()) {
  16389. total_size +=
  16390. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  16391. _internal_metadata_.unknown_fields());
  16392. }
  16393. // optional .protobuf_unittest.TestIsInitialized.SubMessage sub_message = 1;
  16394. if (has_sub_message()) {
  16395. total_size += 1 +
  16396. ::google::protobuf::internal::WireFormatLite::MessageSize(
  16397. *sub_message_);
  16398. }
  16399. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  16400. SetCachedSize(cached_size);
  16401. return total_size;
  16402. }
  16403. void TestIsInitialized::MergeFrom(const ::google::protobuf::Message& from) {
  16404. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestIsInitialized)
  16405. GOOGLE_DCHECK_NE(&from, this);
  16406. const TestIsInitialized* source =
  16407. ::google::protobuf::internal::DynamicCastToGenerated<const TestIsInitialized>(
  16408. &from);
  16409. if (source == NULL) {
  16410. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestIsInitialized)
  16411. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  16412. } else {
  16413. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestIsInitialized)
  16414. MergeFrom(*source);
  16415. }
  16416. }
  16417. void TestIsInitialized::MergeFrom(const TestIsInitialized& from) {
  16418. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestIsInitialized)
  16419. GOOGLE_DCHECK_NE(&from, this);
  16420. _internal_metadata_.MergeFrom(from._internal_metadata_);
  16421. ::google::protobuf::uint32 cached_has_bits = 0;
  16422. (void) cached_has_bits;
  16423. if (from.has_sub_message()) {
  16424. mutable_sub_message()->::protobuf_unittest::TestIsInitialized_SubMessage::MergeFrom(from.sub_message());
  16425. }
  16426. }
  16427. void TestIsInitialized::CopyFrom(const ::google::protobuf::Message& from) {
  16428. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestIsInitialized)
  16429. if (&from == this) return;
  16430. Clear();
  16431. MergeFrom(from);
  16432. }
  16433. void TestIsInitialized::CopyFrom(const TestIsInitialized& from) {
  16434. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestIsInitialized)
  16435. if (&from == this) return;
  16436. Clear();
  16437. MergeFrom(from);
  16438. }
  16439. bool TestIsInitialized::IsInitialized() const {
  16440. if (has_sub_message()) {
  16441. if (!this->sub_message_->IsInitialized()) return false;
  16442. }
  16443. return true;
  16444. }
  16445. void TestIsInitialized::Swap(TestIsInitialized* other) {
  16446. if (other == this) return;
  16447. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  16448. InternalSwap(other);
  16449. } else {
  16450. TestIsInitialized* temp = New(GetArenaNoVirtual());
  16451. temp->MergeFrom(*other);
  16452. other->CopyFrom(*this);
  16453. InternalSwap(temp);
  16454. if (GetArenaNoVirtual() == NULL) {
  16455. delete temp;
  16456. }
  16457. }
  16458. }
  16459. void TestIsInitialized::UnsafeArenaSwap(TestIsInitialized* other) {
  16460. if (other == this) return;
  16461. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  16462. InternalSwap(other);
  16463. }
  16464. void TestIsInitialized::InternalSwap(TestIsInitialized* other) {
  16465. using std::swap;
  16466. swap(sub_message_, other->sub_message_);
  16467. swap(_has_bits_[0], other->_has_bits_[0]);
  16468. _internal_metadata_.Swap(&other->_internal_metadata_);
  16469. }
  16470. ::google::protobuf::Metadata TestIsInitialized::GetMetadata() const {
  16471. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  16472. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  16473. }
  16474. // ===================================================================
  16475. void TestDupFieldNumber_Foo::InitAsDefaultInstance() {
  16476. }
  16477. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  16478. const int TestDupFieldNumber_Foo::kAFieldNumber;
  16479. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  16480. TestDupFieldNumber_Foo::TestDupFieldNumber_Foo()
  16481. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  16482. ::google::protobuf::internal::InitSCC(
  16483. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Foo.base);
  16484. SharedCtor();
  16485. // @@protoc_insertion_point(constructor:protobuf_unittest.TestDupFieldNumber.Foo)
  16486. }
  16487. TestDupFieldNumber_Foo::TestDupFieldNumber_Foo(::google::protobuf::Arena* arena)
  16488. : ::google::protobuf::Message(),
  16489. _internal_metadata_(arena) {
  16490. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Foo.base);
  16491. SharedCtor();
  16492. RegisterArenaDtor(arena);
  16493. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestDupFieldNumber.Foo)
  16494. }
  16495. TestDupFieldNumber_Foo::TestDupFieldNumber_Foo(const TestDupFieldNumber_Foo& from)
  16496. : ::google::protobuf::Message(),
  16497. _internal_metadata_(NULL),
  16498. _has_bits_(from._has_bits_) {
  16499. _internal_metadata_.MergeFrom(from._internal_metadata_);
  16500. a_ = from.a_;
  16501. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDupFieldNumber.Foo)
  16502. }
  16503. void TestDupFieldNumber_Foo::SharedCtor() {
  16504. a_ = 0;
  16505. }
  16506. TestDupFieldNumber_Foo::~TestDupFieldNumber_Foo() {
  16507. // @@protoc_insertion_point(destructor:protobuf_unittest.TestDupFieldNumber.Foo)
  16508. SharedDtor();
  16509. }
  16510. void TestDupFieldNumber_Foo::SharedDtor() {
  16511. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  16512. }
  16513. void TestDupFieldNumber_Foo::ArenaDtor(void* object) {
  16514. TestDupFieldNumber_Foo* _this = reinterpret_cast< TestDupFieldNumber_Foo* >(object);
  16515. (void)_this;
  16516. }
  16517. void TestDupFieldNumber_Foo::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  16518. }
  16519. void TestDupFieldNumber_Foo::SetCachedSize(int size) const {
  16520. _cached_size_.Set(size);
  16521. }
  16522. const ::google::protobuf::Descriptor* TestDupFieldNumber_Foo::descriptor() {
  16523. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  16524. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  16525. }
  16526. const TestDupFieldNumber_Foo& TestDupFieldNumber_Foo::default_instance() {
  16527. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Foo.base);
  16528. return *internal_default_instance();
  16529. }
  16530. void TestDupFieldNumber_Foo::Clear() {
  16531. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestDupFieldNumber.Foo)
  16532. ::google::protobuf::uint32 cached_has_bits = 0;
  16533. // Prevent compiler warnings about cached_has_bits being unused
  16534. (void) cached_has_bits;
  16535. a_ = 0;
  16536. _has_bits_.Clear();
  16537. _internal_metadata_.Clear();
  16538. }
  16539. bool TestDupFieldNumber_Foo::MergePartialFromCodedStream(
  16540. ::google::protobuf::io::CodedInputStream* input) {
  16541. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  16542. ::google::protobuf::uint32 tag;
  16543. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestDupFieldNumber.Foo)
  16544. for (;;) {
  16545. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  16546. tag = p.first;
  16547. if (!p.second) goto handle_unusual;
  16548. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  16549. // optional int32 a = 1;
  16550. case 1: {
  16551. if (static_cast< ::google::protobuf::uint8>(tag) ==
  16552. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  16553. set_has_a();
  16554. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  16555. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  16556. input, &a_)));
  16557. } else {
  16558. goto handle_unusual;
  16559. }
  16560. break;
  16561. }
  16562. default: {
  16563. handle_unusual:
  16564. if (tag == 0 ||
  16565. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  16566. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  16567. input->SetLastTag(tag);
  16568. goto success;
  16569. }
  16570. DO_(::google::protobuf::internal::WireFormat::SkipField(
  16571. input, tag, _internal_metadata_.mutable_unknown_fields()));
  16572. break;
  16573. }
  16574. }
  16575. }
  16576. success:
  16577. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestDupFieldNumber.Foo)
  16578. return true;
  16579. failure:
  16580. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDupFieldNumber.Foo)
  16581. return false;
  16582. #undef DO_
  16583. }
  16584. void TestDupFieldNumber_Foo::SerializeWithCachedSizes(
  16585. ::google::protobuf::io::CodedOutputStream* output) const {
  16586. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestDupFieldNumber.Foo)
  16587. ::google::protobuf::uint32 cached_has_bits = 0;
  16588. (void) cached_has_bits;
  16589. cached_has_bits = _has_bits_[0];
  16590. // optional int32 a = 1;
  16591. if (cached_has_bits & 0x00000001u) {
  16592. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->a(), output);
  16593. }
  16594. if (_internal_metadata_.have_unknown_fields()) {
  16595. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  16596. _internal_metadata_.unknown_fields(), output);
  16597. }
  16598. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDupFieldNumber.Foo)
  16599. }
  16600. ::google::protobuf::uint8* TestDupFieldNumber_Foo::InternalSerializeWithCachedSizesToArray(
  16601. bool deterministic, ::google::protobuf::uint8* target) const {
  16602. (void)deterministic; // Unused
  16603. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestDupFieldNumber.Foo)
  16604. ::google::protobuf::uint32 cached_has_bits = 0;
  16605. (void) cached_has_bits;
  16606. cached_has_bits = _has_bits_[0];
  16607. // optional int32 a = 1;
  16608. if (cached_has_bits & 0x00000001u) {
  16609. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->a(), target);
  16610. }
  16611. if (_internal_metadata_.have_unknown_fields()) {
  16612. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  16613. _internal_metadata_.unknown_fields(), target);
  16614. }
  16615. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDupFieldNumber.Foo)
  16616. return target;
  16617. }
  16618. size_t TestDupFieldNumber_Foo::ByteSizeLong() const {
  16619. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDupFieldNumber.Foo)
  16620. size_t total_size = 0;
  16621. if (_internal_metadata_.have_unknown_fields()) {
  16622. total_size +=
  16623. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  16624. _internal_metadata_.unknown_fields());
  16625. }
  16626. // optional int32 a = 1;
  16627. if (has_a()) {
  16628. total_size += 1 +
  16629. ::google::protobuf::internal::WireFormatLite::Int32Size(
  16630. this->a());
  16631. }
  16632. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  16633. SetCachedSize(cached_size);
  16634. return total_size;
  16635. }
  16636. void TestDupFieldNumber_Foo::MergeFrom(const ::google::protobuf::Message& from) {
  16637. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestDupFieldNumber.Foo)
  16638. GOOGLE_DCHECK_NE(&from, this);
  16639. const TestDupFieldNumber_Foo* source =
  16640. ::google::protobuf::internal::DynamicCastToGenerated<const TestDupFieldNumber_Foo>(
  16641. &from);
  16642. if (source == NULL) {
  16643. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestDupFieldNumber.Foo)
  16644. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  16645. } else {
  16646. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestDupFieldNumber.Foo)
  16647. MergeFrom(*source);
  16648. }
  16649. }
  16650. void TestDupFieldNumber_Foo::MergeFrom(const TestDupFieldNumber_Foo& from) {
  16651. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestDupFieldNumber.Foo)
  16652. GOOGLE_DCHECK_NE(&from, this);
  16653. _internal_metadata_.MergeFrom(from._internal_metadata_);
  16654. ::google::protobuf::uint32 cached_has_bits = 0;
  16655. (void) cached_has_bits;
  16656. if (from.has_a()) {
  16657. set_a(from.a());
  16658. }
  16659. }
  16660. void TestDupFieldNumber_Foo::CopyFrom(const ::google::protobuf::Message& from) {
  16661. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestDupFieldNumber.Foo)
  16662. if (&from == this) return;
  16663. Clear();
  16664. MergeFrom(from);
  16665. }
  16666. void TestDupFieldNumber_Foo::CopyFrom(const TestDupFieldNumber_Foo& from) {
  16667. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDupFieldNumber.Foo)
  16668. if (&from == this) return;
  16669. Clear();
  16670. MergeFrom(from);
  16671. }
  16672. bool TestDupFieldNumber_Foo::IsInitialized() const {
  16673. return true;
  16674. }
  16675. void TestDupFieldNumber_Foo::Swap(TestDupFieldNumber_Foo* other) {
  16676. if (other == this) return;
  16677. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  16678. InternalSwap(other);
  16679. } else {
  16680. TestDupFieldNumber_Foo* temp = New(GetArenaNoVirtual());
  16681. temp->MergeFrom(*other);
  16682. other->CopyFrom(*this);
  16683. InternalSwap(temp);
  16684. if (GetArenaNoVirtual() == NULL) {
  16685. delete temp;
  16686. }
  16687. }
  16688. }
  16689. void TestDupFieldNumber_Foo::UnsafeArenaSwap(TestDupFieldNumber_Foo* other) {
  16690. if (other == this) return;
  16691. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  16692. InternalSwap(other);
  16693. }
  16694. void TestDupFieldNumber_Foo::InternalSwap(TestDupFieldNumber_Foo* other) {
  16695. using std::swap;
  16696. swap(a_, other->a_);
  16697. swap(_has_bits_[0], other->_has_bits_[0]);
  16698. _internal_metadata_.Swap(&other->_internal_metadata_);
  16699. }
  16700. ::google::protobuf::Metadata TestDupFieldNumber_Foo::GetMetadata() const {
  16701. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  16702. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  16703. }
  16704. // ===================================================================
  16705. void TestDupFieldNumber_Bar::InitAsDefaultInstance() {
  16706. }
  16707. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  16708. const int TestDupFieldNumber_Bar::kAFieldNumber;
  16709. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  16710. TestDupFieldNumber_Bar::TestDupFieldNumber_Bar()
  16711. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  16712. ::google::protobuf::internal::InitSCC(
  16713. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Bar.base);
  16714. SharedCtor();
  16715. // @@protoc_insertion_point(constructor:protobuf_unittest.TestDupFieldNumber.Bar)
  16716. }
  16717. TestDupFieldNumber_Bar::TestDupFieldNumber_Bar(::google::protobuf::Arena* arena)
  16718. : ::google::protobuf::Message(),
  16719. _internal_metadata_(arena) {
  16720. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Bar.base);
  16721. SharedCtor();
  16722. RegisterArenaDtor(arena);
  16723. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestDupFieldNumber.Bar)
  16724. }
  16725. TestDupFieldNumber_Bar::TestDupFieldNumber_Bar(const TestDupFieldNumber_Bar& from)
  16726. : ::google::protobuf::Message(),
  16727. _internal_metadata_(NULL),
  16728. _has_bits_(from._has_bits_) {
  16729. _internal_metadata_.MergeFrom(from._internal_metadata_);
  16730. a_ = from.a_;
  16731. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDupFieldNumber.Bar)
  16732. }
  16733. void TestDupFieldNumber_Bar::SharedCtor() {
  16734. a_ = 0;
  16735. }
  16736. TestDupFieldNumber_Bar::~TestDupFieldNumber_Bar() {
  16737. // @@protoc_insertion_point(destructor:protobuf_unittest.TestDupFieldNumber.Bar)
  16738. SharedDtor();
  16739. }
  16740. void TestDupFieldNumber_Bar::SharedDtor() {
  16741. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  16742. }
  16743. void TestDupFieldNumber_Bar::ArenaDtor(void* object) {
  16744. TestDupFieldNumber_Bar* _this = reinterpret_cast< TestDupFieldNumber_Bar* >(object);
  16745. (void)_this;
  16746. }
  16747. void TestDupFieldNumber_Bar::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  16748. }
  16749. void TestDupFieldNumber_Bar::SetCachedSize(int size) const {
  16750. _cached_size_.Set(size);
  16751. }
  16752. const ::google::protobuf::Descriptor* TestDupFieldNumber_Bar::descriptor() {
  16753. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  16754. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  16755. }
  16756. const TestDupFieldNumber_Bar& TestDupFieldNumber_Bar::default_instance() {
  16757. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber_Bar.base);
  16758. return *internal_default_instance();
  16759. }
  16760. void TestDupFieldNumber_Bar::Clear() {
  16761. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestDupFieldNumber.Bar)
  16762. ::google::protobuf::uint32 cached_has_bits = 0;
  16763. // Prevent compiler warnings about cached_has_bits being unused
  16764. (void) cached_has_bits;
  16765. a_ = 0;
  16766. _has_bits_.Clear();
  16767. _internal_metadata_.Clear();
  16768. }
  16769. bool TestDupFieldNumber_Bar::MergePartialFromCodedStream(
  16770. ::google::protobuf::io::CodedInputStream* input) {
  16771. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  16772. ::google::protobuf::uint32 tag;
  16773. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestDupFieldNumber.Bar)
  16774. for (;;) {
  16775. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  16776. tag = p.first;
  16777. if (!p.second) goto handle_unusual;
  16778. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  16779. // optional int32 a = 1;
  16780. case 1: {
  16781. if (static_cast< ::google::protobuf::uint8>(tag) ==
  16782. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  16783. set_has_a();
  16784. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  16785. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  16786. input, &a_)));
  16787. } else {
  16788. goto handle_unusual;
  16789. }
  16790. break;
  16791. }
  16792. default: {
  16793. handle_unusual:
  16794. if (tag == 0 ||
  16795. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  16796. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  16797. input->SetLastTag(tag);
  16798. goto success;
  16799. }
  16800. DO_(::google::protobuf::internal::WireFormat::SkipField(
  16801. input, tag, _internal_metadata_.mutable_unknown_fields()));
  16802. break;
  16803. }
  16804. }
  16805. }
  16806. success:
  16807. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestDupFieldNumber.Bar)
  16808. return true;
  16809. failure:
  16810. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDupFieldNumber.Bar)
  16811. return false;
  16812. #undef DO_
  16813. }
  16814. void TestDupFieldNumber_Bar::SerializeWithCachedSizes(
  16815. ::google::protobuf::io::CodedOutputStream* output) const {
  16816. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestDupFieldNumber.Bar)
  16817. ::google::protobuf::uint32 cached_has_bits = 0;
  16818. (void) cached_has_bits;
  16819. cached_has_bits = _has_bits_[0];
  16820. // optional int32 a = 1;
  16821. if (cached_has_bits & 0x00000001u) {
  16822. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->a(), output);
  16823. }
  16824. if (_internal_metadata_.have_unknown_fields()) {
  16825. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  16826. _internal_metadata_.unknown_fields(), output);
  16827. }
  16828. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDupFieldNumber.Bar)
  16829. }
  16830. ::google::protobuf::uint8* TestDupFieldNumber_Bar::InternalSerializeWithCachedSizesToArray(
  16831. bool deterministic, ::google::protobuf::uint8* target) const {
  16832. (void)deterministic; // Unused
  16833. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestDupFieldNumber.Bar)
  16834. ::google::protobuf::uint32 cached_has_bits = 0;
  16835. (void) cached_has_bits;
  16836. cached_has_bits = _has_bits_[0];
  16837. // optional int32 a = 1;
  16838. if (cached_has_bits & 0x00000001u) {
  16839. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->a(), target);
  16840. }
  16841. if (_internal_metadata_.have_unknown_fields()) {
  16842. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  16843. _internal_metadata_.unknown_fields(), target);
  16844. }
  16845. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDupFieldNumber.Bar)
  16846. return target;
  16847. }
  16848. size_t TestDupFieldNumber_Bar::ByteSizeLong() const {
  16849. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDupFieldNumber.Bar)
  16850. size_t total_size = 0;
  16851. if (_internal_metadata_.have_unknown_fields()) {
  16852. total_size +=
  16853. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  16854. _internal_metadata_.unknown_fields());
  16855. }
  16856. // optional int32 a = 1;
  16857. if (has_a()) {
  16858. total_size += 1 +
  16859. ::google::protobuf::internal::WireFormatLite::Int32Size(
  16860. this->a());
  16861. }
  16862. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  16863. SetCachedSize(cached_size);
  16864. return total_size;
  16865. }
  16866. void TestDupFieldNumber_Bar::MergeFrom(const ::google::protobuf::Message& from) {
  16867. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestDupFieldNumber.Bar)
  16868. GOOGLE_DCHECK_NE(&from, this);
  16869. const TestDupFieldNumber_Bar* source =
  16870. ::google::protobuf::internal::DynamicCastToGenerated<const TestDupFieldNumber_Bar>(
  16871. &from);
  16872. if (source == NULL) {
  16873. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestDupFieldNumber.Bar)
  16874. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  16875. } else {
  16876. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestDupFieldNumber.Bar)
  16877. MergeFrom(*source);
  16878. }
  16879. }
  16880. void TestDupFieldNumber_Bar::MergeFrom(const TestDupFieldNumber_Bar& from) {
  16881. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestDupFieldNumber.Bar)
  16882. GOOGLE_DCHECK_NE(&from, this);
  16883. _internal_metadata_.MergeFrom(from._internal_metadata_);
  16884. ::google::protobuf::uint32 cached_has_bits = 0;
  16885. (void) cached_has_bits;
  16886. if (from.has_a()) {
  16887. set_a(from.a());
  16888. }
  16889. }
  16890. void TestDupFieldNumber_Bar::CopyFrom(const ::google::protobuf::Message& from) {
  16891. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestDupFieldNumber.Bar)
  16892. if (&from == this) return;
  16893. Clear();
  16894. MergeFrom(from);
  16895. }
  16896. void TestDupFieldNumber_Bar::CopyFrom(const TestDupFieldNumber_Bar& from) {
  16897. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDupFieldNumber.Bar)
  16898. if (&from == this) return;
  16899. Clear();
  16900. MergeFrom(from);
  16901. }
  16902. bool TestDupFieldNumber_Bar::IsInitialized() const {
  16903. return true;
  16904. }
  16905. void TestDupFieldNumber_Bar::Swap(TestDupFieldNumber_Bar* other) {
  16906. if (other == this) return;
  16907. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  16908. InternalSwap(other);
  16909. } else {
  16910. TestDupFieldNumber_Bar* temp = New(GetArenaNoVirtual());
  16911. temp->MergeFrom(*other);
  16912. other->CopyFrom(*this);
  16913. InternalSwap(temp);
  16914. if (GetArenaNoVirtual() == NULL) {
  16915. delete temp;
  16916. }
  16917. }
  16918. }
  16919. void TestDupFieldNumber_Bar::UnsafeArenaSwap(TestDupFieldNumber_Bar* other) {
  16920. if (other == this) return;
  16921. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  16922. InternalSwap(other);
  16923. }
  16924. void TestDupFieldNumber_Bar::InternalSwap(TestDupFieldNumber_Bar* other) {
  16925. using std::swap;
  16926. swap(a_, other->a_);
  16927. swap(_has_bits_[0], other->_has_bits_[0]);
  16928. _internal_metadata_.Swap(&other->_internal_metadata_);
  16929. }
  16930. ::google::protobuf::Metadata TestDupFieldNumber_Bar::GetMetadata() const {
  16931. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  16932. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  16933. }
  16934. // ===================================================================
  16935. void TestDupFieldNumber::InitAsDefaultInstance() {
  16936. ::protobuf_unittest::_TestDupFieldNumber_default_instance_._instance.get_mutable()->foo_ = const_cast< ::protobuf_unittest::TestDupFieldNumber_Foo*>(
  16937. ::protobuf_unittest::TestDupFieldNumber_Foo::internal_default_instance());
  16938. ::protobuf_unittest::_TestDupFieldNumber_default_instance_._instance.get_mutable()->bar_ = const_cast< ::protobuf_unittest::TestDupFieldNumber_Bar*>(
  16939. ::protobuf_unittest::TestDupFieldNumber_Bar::internal_default_instance());
  16940. }
  16941. void TestDupFieldNumber::unsafe_arena_set_allocated_foo(
  16942. ::protobuf_unittest::TestDupFieldNumber_Foo* foo) {
  16943. if (GetArenaNoVirtual() == NULL) {
  16944. delete foo_;
  16945. }
  16946. foo_ = foo;
  16947. if (foo) {
  16948. set_has_foo();
  16949. } else {
  16950. clear_has_foo();
  16951. }
  16952. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestDupFieldNumber.foo)
  16953. }
  16954. void TestDupFieldNumber::unsafe_arena_set_allocated_bar(
  16955. ::protobuf_unittest::TestDupFieldNumber_Bar* bar) {
  16956. if (GetArenaNoVirtual() == NULL) {
  16957. delete bar_;
  16958. }
  16959. bar_ = bar;
  16960. if (bar) {
  16961. set_has_bar();
  16962. } else {
  16963. clear_has_bar();
  16964. }
  16965. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestDupFieldNumber.bar)
  16966. }
  16967. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  16968. const int TestDupFieldNumber::kAFieldNumber;
  16969. const int TestDupFieldNumber::kFooFieldNumber;
  16970. const int TestDupFieldNumber::kBarFieldNumber;
  16971. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  16972. TestDupFieldNumber::TestDupFieldNumber()
  16973. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  16974. ::google::protobuf::internal::InitSCC(
  16975. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber.base);
  16976. SharedCtor();
  16977. // @@protoc_insertion_point(constructor:protobuf_unittest.TestDupFieldNumber)
  16978. }
  16979. TestDupFieldNumber::TestDupFieldNumber(::google::protobuf::Arena* arena)
  16980. : ::google::protobuf::Message(),
  16981. _internal_metadata_(arena) {
  16982. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber.base);
  16983. SharedCtor();
  16984. RegisterArenaDtor(arena);
  16985. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestDupFieldNumber)
  16986. }
  16987. TestDupFieldNumber::TestDupFieldNumber(const TestDupFieldNumber& from)
  16988. : ::google::protobuf::Message(),
  16989. _internal_metadata_(NULL),
  16990. _has_bits_(from._has_bits_) {
  16991. _internal_metadata_.MergeFrom(from._internal_metadata_);
  16992. if (from.has_foo()) {
  16993. foo_ = new ::protobuf_unittest::TestDupFieldNumber_Foo(*from.foo_);
  16994. } else {
  16995. foo_ = NULL;
  16996. }
  16997. if (from.has_bar()) {
  16998. bar_ = new ::protobuf_unittest::TestDupFieldNumber_Bar(*from.bar_);
  16999. } else {
  17000. bar_ = NULL;
  17001. }
  17002. a_ = from.a_;
  17003. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDupFieldNumber)
  17004. }
  17005. void TestDupFieldNumber::SharedCtor() {
  17006. ::memset(&foo_, 0, static_cast<size_t>(
  17007. reinterpret_cast<char*>(&a_) -
  17008. reinterpret_cast<char*>(&foo_)) + sizeof(a_));
  17009. }
  17010. TestDupFieldNumber::~TestDupFieldNumber() {
  17011. // @@protoc_insertion_point(destructor:protobuf_unittest.TestDupFieldNumber)
  17012. SharedDtor();
  17013. }
  17014. void TestDupFieldNumber::SharedDtor() {
  17015. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  17016. if (this != internal_default_instance()) delete foo_;
  17017. if (this != internal_default_instance()) delete bar_;
  17018. }
  17019. void TestDupFieldNumber::ArenaDtor(void* object) {
  17020. TestDupFieldNumber* _this = reinterpret_cast< TestDupFieldNumber* >(object);
  17021. (void)_this;
  17022. }
  17023. void TestDupFieldNumber::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  17024. }
  17025. void TestDupFieldNumber::SetCachedSize(int size) const {
  17026. _cached_size_.Set(size);
  17027. }
  17028. const ::google::protobuf::Descriptor* TestDupFieldNumber::descriptor() {
  17029. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  17030. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  17031. }
  17032. const TestDupFieldNumber& TestDupFieldNumber::default_instance() {
  17033. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDupFieldNumber.base);
  17034. return *internal_default_instance();
  17035. }
  17036. void TestDupFieldNumber::Clear() {
  17037. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestDupFieldNumber)
  17038. ::google::protobuf::uint32 cached_has_bits = 0;
  17039. // Prevent compiler warnings about cached_has_bits being unused
  17040. (void) cached_has_bits;
  17041. cached_has_bits = _has_bits_[0];
  17042. if (cached_has_bits & 3u) {
  17043. if (cached_has_bits & 0x00000001u) {
  17044. GOOGLE_DCHECK(foo_ != NULL);
  17045. foo_->Clear();
  17046. }
  17047. if (cached_has_bits & 0x00000002u) {
  17048. GOOGLE_DCHECK(bar_ != NULL);
  17049. bar_->Clear();
  17050. }
  17051. }
  17052. a_ = 0;
  17053. _has_bits_.Clear();
  17054. _internal_metadata_.Clear();
  17055. }
  17056. bool TestDupFieldNumber::MergePartialFromCodedStream(
  17057. ::google::protobuf::io::CodedInputStream* input) {
  17058. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  17059. ::google::protobuf::uint32 tag;
  17060. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestDupFieldNumber)
  17061. for (;;) {
  17062. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  17063. tag = p.first;
  17064. if (!p.second) goto handle_unusual;
  17065. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  17066. // optional int32 a = 1;
  17067. case 1: {
  17068. if (static_cast< ::google::protobuf::uint8>(tag) ==
  17069. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  17070. set_has_a();
  17071. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  17072. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  17073. input, &a_)));
  17074. } else {
  17075. goto handle_unusual;
  17076. }
  17077. break;
  17078. }
  17079. // optional group Foo = 2 { ... };
  17080. case 2: {
  17081. if (static_cast< ::google::protobuf::uint8>(tag) ==
  17082. static_cast< ::google::protobuf::uint8>(19u /* 19 & 0xFF */)) {
  17083. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
  17084. 2, input, mutable_foo()));
  17085. } else {
  17086. goto handle_unusual;
  17087. }
  17088. break;
  17089. }
  17090. // optional group Bar = 3 { ... };
  17091. case 3: {
  17092. if (static_cast< ::google::protobuf::uint8>(tag) ==
  17093. static_cast< ::google::protobuf::uint8>(27u /* 27 & 0xFF */)) {
  17094. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
  17095. 3, input, mutable_bar()));
  17096. } else {
  17097. goto handle_unusual;
  17098. }
  17099. break;
  17100. }
  17101. default: {
  17102. handle_unusual:
  17103. if (tag == 0) {
  17104. goto success;
  17105. }
  17106. DO_(::google::protobuf::internal::WireFormat::SkipField(
  17107. input, tag, _internal_metadata_.mutable_unknown_fields()));
  17108. break;
  17109. }
  17110. }
  17111. }
  17112. success:
  17113. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestDupFieldNumber)
  17114. return true;
  17115. failure:
  17116. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDupFieldNumber)
  17117. return false;
  17118. #undef DO_
  17119. }
  17120. void TestDupFieldNumber::SerializeWithCachedSizes(
  17121. ::google::protobuf::io::CodedOutputStream* output) const {
  17122. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestDupFieldNumber)
  17123. ::google::protobuf::uint32 cached_has_bits = 0;
  17124. (void) cached_has_bits;
  17125. cached_has_bits = _has_bits_[0];
  17126. // optional int32 a = 1;
  17127. if (cached_has_bits & 0x00000004u) {
  17128. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->a(), output);
  17129. }
  17130. // optional group Foo = 2 { ... };
  17131. if (cached_has_bits & 0x00000001u) {
  17132. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  17133. 2, this->_internal_foo(), output);
  17134. }
  17135. // optional group Bar = 3 { ... };
  17136. if (cached_has_bits & 0x00000002u) {
  17137. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  17138. 3, this->_internal_bar(), output);
  17139. }
  17140. if (_internal_metadata_.have_unknown_fields()) {
  17141. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  17142. _internal_metadata_.unknown_fields(), output);
  17143. }
  17144. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDupFieldNumber)
  17145. }
  17146. ::google::protobuf::uint8* TestDupFieldNumber::InternalSerializeWithCachedSizesToArray(
  17147. bool deterministic, ::google::protobuf::uint8* target) const {
  17148. (void)deterministic; // Unused
  17149. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestDupFieldNumber)
  17150. ::google::protobuf::uint32 cached_has_bits = 0;
  17151. (void) cached_has_bits;
  17152. cached_has_bits = _has_bits_[0];
  17153. // optional int32 a = 1;
  17154. if (cached_has_bits & 0x00000004u) {
  17155. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->a(), target);
  17156. }
  17157. // optional group Foo = 2 { ... };
  17158. if (cached_has_bits & 0x00000001u) {
  17159. target = ::google::protobuf::internal::WireFormatLite::
  17160. InternalWriteGroupToArray(
  17161. 2, this->_internal_foo(), deterministic, target);
  17162. }
  17163. // optional group Bar = 3 { ... };
  17164. if (cached_has_bits & 0x00000002u) {
  17165. target = ::google::protobuf::internal::WireFormatLite::
  17166. InternalWriteGroupToArray(
  17167. 3, this->_internal_bar(), deterministic, target);
  17168. }
  17169. if (_internal_metadata_.have_unknown_fields()) {
  17170. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  17171. _internal_metadata_.unknown_fields(), target);
  17172. }
  17173. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDupFieldNumber)
  17174. return target;
  17175. }
  17176. size_t TestDupFieldNumber::ByteSizeLong() const {
  17177. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDupFieldNumber)
  17178. size_t total_size = 0;
  17179. if (_internal_metadata_.have_unknown_fields()) {
  17180. total_size +=
  17181. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  17182. _internal_metadata_.unknown_fields());
  17183. }
  17184. if (_has_bits_[0 / 32] & 7u) {
  17185. // optional group Foo = 2 { ... };
  17186. if (has_foo()) {
  17187. total_size += 2 +
  17188. ::google::protobuf::internal::WireFormatLite::GroupSize(
  17189. *foo_);
  17190. }
  17191. // optional group Bar = 3 { ... };
  17192. if (has_bar()) {
  17193. total_size += 2 +
  17194. ::google::protobuf::internal::WireFormatLite::GroupSize(
  17195. *bar_);
  17196. }
  17197. // optional int32 a = 1;
  17198. if (has_a()) {
  17199. total_size += 1 +
  17200. ::google::protobuf::internal::WireFormatLite::Int32Size(
  17201. this->a());
  17202. }
  17203. }
  17204. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  17205. SetCachedSize(cached_size);
  17206. return total_size;
  17207. }
  17208. void TestDupFieldNumber::MergeFrom(const ::google::protobuf::Message& from) {
  17209. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestDupFieldNumber)
  17210. GOOGLE_DCHECK_NE(&from, this);
  17211. const TestDupFieldNumber* source =
  17212. ::google::protobuf::internal::DynamicCastToGenerated<const TestDupFieldNumber>(
  17213. &from);
  17214. if (source == NULL) {
  17215. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestDupFieldNumber)
  17216. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  17217. } else {
  17218. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestDupFieldNumber)
  17219. MergeFrom(*source);
  17220. }
  17221. }
  17222. void TestDupFieldNumber::MergeFrom(const TestDupFieldNumber& from) {
  17223. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestDupFieldNumber)
  17224. GOOGLE_DCHECK_NE(&from, this);
  17225. _internal_metadata_.MergeFrom(from._internal_metadata_);
  17226. ::google::protobuf::uint32 cached_has_bits = 0;
  17227. (void) cached_has_bits;
  17228. cached_has_bits = from._has_bits_[0];
  17229. if (cached_has_bits & 7u) {
  17230. if (cached_has_bits & 0x00000001u) {
  17231. mutable_foo()->::protobuf_unittest::TestDupFieldNumber_Foo::MergeFrom(from.foo());
  17232. }
  17233. if (cached_has_bits & 0x00000002u) {
  17234. mutable_bar()->::protobuf_unittest::TestDupFieldNumber_Bar::MergeFrom(from.bar());
  17235. }
  17236. if (cached_has_bits & 0x00000004u) {
  17237. a_ = from.a_;
  17238. }
  17239. _has_bits_[0] |= cached_has_bits;
  17240. }
  17241. }
  17242. void TestDupFieldNumber::CopyFrom(const ::google::protobuf::Message& from) {
  17243. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestDupFieldNumber)
  17244. if (&from == this) return;
  17245. Clear();
  17246. MergeFrom(from);
  17247. }
  17248. void TestDupFieldNumber::CopyFrom(const TestDupFieldNumber& from) {
  17249. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDupFieldNumber)
  17250. if (&from == this) return;
  17251. Clear();
  17252. MergeFrom(from);
  17253. }
  17254. bool TestDupFieldNumber::IsInitialized() const {
  17255. return true;
  17256. }
  17257. void TestDupFieldNumber::Swap(TestDupFieldNumber* other) {
  17258. if (other == this) return;
  17259. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  17260. InternalSwap(other);
  17261. } else {
  17262. TestDupFieldNumber* temp = New(GetArenaNoVirtual());
  17263. temp->MergeFrom(*other);
  17264. other->CopyFrom(*this);
  17265. InternalSwap(temp);
  17266. if (GetArenaNoVirtual() == NULL) {
  17267. delete temp;
  17268. }
  17269. }
  17270. }
  17271. void TestDupFieldNumber::UnsafeArenaSwap(TestDupFieldNumber* other) {
  17272. if (other == this) return;
  17273. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  17274. InternalSwap(other);
  17275. }
  17276. void TestDupFieldNumber::InternalSwap(TestDupFieldNumber* other) {
  17277. using std::swap;
  17278. swap(foo_, other->foo_);
  17279. swap(bar_, other->bar_);
  17280. swap(a_, other->a_);
  17281. swap(_has_bits_[0], other->_has_bits_[0]);
  17282. _internal_metadata_.Swap(&other->_internal_metadata_);
  17283. }
  17284. ::google::protobuf::Metadata TestDupFieldNumber::GetMetadata() const {
  17285. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  17286. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  17287. }
  17288. // ===================================================================
  17289. void TestEagerMessage::InitAsDefaultInstance() {
  17290. ::protobuf_unittest::_TestEagerMessage_default_instance_._instance.get_mutable()->sub_message_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
  17291. ::protobuf_unittest::TestAllTypes::internal_default_instance());
  17292. }
  17293. void TestEagerMessage::unsafe_arena_set_allocated_sub_message(
  17294. ::protobuf_unittest::TestAllTypes* sub_message) {
  17295. if (GetArenaNoVirtual() == NULL) {
  17296. delete sub_message_;
  17297. }
  17298. sub_message_ = sub_message;
  17299. if (sub_message) {
  17300. set_has_sub_message();
  17301. } else {
  17302. clear_has_sub_message();
  17303. }
  17304. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestEagerMessage.sub_message)
  17305. }
  17306. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  17307. const int TestEagerMessage::kSubMessageFieldNumber;
  17308. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  17309. TestEagerMessage::TestEagerMessage()
  17310. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  17311. ::google::protobuf::internal::InitSCC(
  17312. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEagerMessage.base);
  17313. SharedCtor();
  17314. // @@protoc_insertion_point(constructor:protobuf_unittest.TestEagerMessage)
  17315. }
  17316. TestEagerMessage::TestEagerMessage(::google::protobuf::Arena* arena)
  17317. : ::google::protobuf::Message(),
  17318. _internal_metadata_(arena) {
  17319. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEagerMessage.base);
  17320. SharedCtor();
  17321. RegisterArenaDtor(arena);
  17322. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestEagerMessage)
  17323. }
  17324. TestEagerMessage::TestEagerMessage(const TestEagerMessage& from)
  17325. : ::google::protobuf::Message(),
  17326. _internal_metadata_(NULL),
  17327. _has_bits_(from._has_bits_) {
  17328. _internal_metadata_.MergeFrom(from._internal_metadata_);
  17329. if (from.has_sub_message()) {
  17330. sub_message_ = new ::protobuf_unittest::TestAllTypes(*from.sub_message_);
  17331. } else {
  17332. sub_message_ = NULL;
  17333. }
  17334. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestEagerMessage)
  17335. }
  17336. void TestEagerMessage::SharedCtor() {
  17337. sub_message_ = NULL;
  17338. }
  17339. TestEagerMessage::~TestEagerMessage() {
  17340. // @@protoc_insertion_point(destructor:protobuf_unittest.TestEagerMessage)
  17341. SharedDtor();
  17342. }
  17343. void TestEagerMessage::SharedDtor() {
  17344. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  17345. if (this != internal_default_instance()) delete sub_message_;
  17346. }
  17347. void TestEagerMessage::ArenaDtor(void* object) {
  17348. TestEagerMessage* _this = reinterpret_cast< TestEagerMessage* >(object);
  17349. (void)_this;
  17350. }
  17351. void TestEagerMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  17352. }
  17353. void TestEagerMessage::SetCachedSize(int size) const {
  17354. _cached_size_.Set(size);
  17355. }
  17356. const ::google::protobuf::Descriptor* TestEagerMessage::descriptor() {
  17357. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  17358. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  17359. }
  17360. const TestEagerMessage& TestEagerMessage::default_instance() {
  17361. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestEagerMessage.base);
  17362. return *internal_default_instance();
  17363. }
  17364. void TestEagerMessage::Clear() {
  17365. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestEagerMessage)
  17366. ::google::protobuf::uint32 cached_has_bits = 0;
  17367. // Prevent compiler warnings about cached_has_bits being unused
  17368. (void) cached_has_bits;
  17369. cached_has_bits = _has_bits_[0];
  17370. if (cached_has_bits & 0x00000001u) {
  17371. GOOGLE_DCHECK(sub_message_ != NULL);
  17372. sub_message_->Clear();
  17373. }
  17374. _has_bits_.Clear();
  17375. _internal_metadata_.Clear();
  17376. }
  17377. bool TestEagerMessage::MergePartialFromCodedStream(
  17378. ::google::protobuf::io::CodedInputStream* input) {
  17379. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  17380. ::google::protobuf::uint32 tag;
  17381. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestEagerMessage)
  17382. for (;;) {
  17383. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  17384. tag = p.first;
  17385. if (!p.second) goto handle_unusual;
  17386. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  17387. // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = false];
  17388. case 1: {
  17389. if (static_cast< ::google::protobuf::uint8>(tag) ==
  17390. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  17391. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  17392. input, mutable_sub_message()));
  17393. } else {
  17394. goto handle_unusual;
  17395. }
  17396. break;
  17397. }
  17398. default: {
  17399. handle_unusual:
  17400. if (tag == 0) {
  17401. goto success;
  17402. }
  17403. DO_(::google::protobuf::internal::WireFormat::SkipField(
  17404. input, tag, _internal_metadata_.mutable_unknown_fields()));
  17405. break;
  17406. }
  17407. }
  17408. }
  17409. success:
  17410. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestEagerMessage)
  17411. return true;
  17412. failure:
  17413. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestEagerMessage)
  17414. return false;
  17415. #undef DO_
  17416. }
  17417. void TestEagerMessage::SerializeWithCachedSizes(
  17418. ::google::protobuf::io::CodedOutputStream* output) const {
  17419. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestEagerMessage)
  17420. ::google::protobuf::uint32 cached_has_bits = 0;
  17421. (void) cached_has_bits;
  17422. cached_has_bits = _has_bits_[0];
  17423. // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = false];
  17424. if (cached_has_bits & 0x00000001u) {
  17425. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  17426. 1, this->_internal_sub_message(), output);
  17427. }
  17428. if (_internal_metadata_.have_unknown_fields()) {
  17429. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  17430. _internal_metadata_.unknown_fields(), output);
  17431. }
  17432. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestEagerMessage)
  17433. }
  17434. ::google::protobuf::uint8* TestEagerMessage::InternalSerializeWithCachedSizesToArray(
  17435. bool deterministic, ::google::protobuf::uint8* target) const {
  17436. (void)deterministic; // Unused
  17437. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestEagerMessage)
  17438. ::google::protobuf::uint32 cached_has_bits = 0;
  17439. (void) cached_has_bits;
  17440. cached_has_bits = _has_bits_[0];
  17441. // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = false];
  17442. if (cached_has_bits & 0x00000001u) {
  17443. target = ::google::protobuf::internal::WireFormatLite::
  17444. InternalWriteMessageToArray(
  17445. 1, this->_internal_sub_message(), deterministic, target);
  17446. }
  17447. if (_internal_metadata_.have_unknown_fields()) {
  17448. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  17449. _internal_metadata_.unknown_fields(), target);
  17450. }
  17451. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestEagerMessage)
  17452. return target;
  17453. }
  17454. size_t TestEagerMessage::ByteSizeLong() const {
  17455. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestEagerMessage)
  17456. size_t total_size = 0;
  17457. if (_internal_metadata_.have_unknown_fields()) {
  17458. total_size +=
  17459. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  17460. _internal_metadata_.unknown_fields());
  17461. }
  17462. // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = false];
  17463. if (has_sub_message()) {
  17464. total_size += 1 +
  17465. ::google::protobuf::internal::WireFormatLite::MessageSize(
  17466. *sub_message_);
  17467. }
  17468. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  17469. SetCachedSize(cached_size);
  17470. return total_size;
  17471. }
  17472. void TestEagerMessage::MergeFrom(const ::google::protobuf::Message& from) {
  17473. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestEagerMessage)
  17474. GOOGLE_DCHECK_NE(&from, this);
  17475. const TestEagerMessage* source =
  17476. ::google::protobuf::internal::DynamicCastToGenerated<const TestEagerMessage>(
  17477. &from);
  17478. if (source == NULL) {
  17479. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestEagerMessage)
  17480. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  17481. } else {
  17482. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestEagerMessage)
  17483. MergeFrom(*source);
  17484. }
  17485. }
  17486. void TestEagerMessage::MergeFrom(const TestEagerMessage& from) {
  17487. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestEagerMessage)
  17488. GOOGLE_DCHECK_NE(&from, this);
  17489. _internal_metadata_.MergeFrom(from._internal_metadata_);
  17490. ::google::protobuf::uint32 cached_has_bits = 0;
  17491. (void) cached_has_bits;
  17492. if (from.has_sub_message()) {
  17493. mutable_sub_message()->::protobuf_unittest::TestAllTypes::MergeFrom(from.sub_message());
  17494. }
  17495. }
  17496. void TestEagerMessage::CopyFrom(const ::google::protobuf::Message& from) {
  17497. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestEagerMessage)
  17498. if (&from == this) return;
  17499. Clear();
  17500. MergeFrom(from);
  17501. }
  17502. void TestEagerMessage::CopyFrom(const TestEagerMessage& from) {
  17503. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestEagerMessage)
  17504. if (&from == this) return;
  17505. Clear();
  17506. MergeFrom(from);
  17507. }
  17508. bool TestEagerMessage::IsInitialized() const {
  17509. return true;
  17510. }
  17511. void TestEagerMessage::Swap(TestEagerMessage* other) {
  17512. if (other == this) return;
  17513. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  17514. InternalSwap(other);
  17515. } else {
  17516. TestEagerMessage* temp = New(GetArenaNoVirtual());
  17517. temp->MergeFrom(*other);
  17518. other->CopyFrom(*this);
  17519. InternalSwap(temp);
  17520. if (GetArenaNoVirtual() == NULL) {
  17521. delete temp;
  17522. }
  17523. }
  17524. }
  17525. void TestEagerMessage::UnsafeArenaSwap(TestEagerMessage* other) {
  17526. if (other == this) return;
  17527. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  17528. InternalSwap(other);
  17529. }
  17530. void TestEagerMessage::InternalSwap(TestEagerMessage* other) {
  17531. using std::swap;
  17532. swap(sub_message_, other->sub_message_);
  17533. swap(_has_bits_[0], other->_has_bits_[0]);
  17534. _internal_metadata_.Swap(&other->_internal_metadata_);
  17535. }
  17536. ::google::protobuf::Metadata TestEagerMessage::GetMetadata() const {
  17537. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  17538. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  17539. }
  17540. // ===================================================================
  17541. void TestLazyMessage::InitAsDefaultInstance() {
  17542. ::protobuf_unittest::_TestLazyMessage_default_instance_._instance.get_mutable()->sub_message_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
  17543. ::protobuf_unittest::TestAllTypes::internal_default_instance());
  17544. }
  17545. void TestLazyMessage::unsafe_arena_set_allocated_sub_message(
  17546. ::protobuf_unittest::TestAllTypes* sub_message) {
  17547. if (GetArenaNoVirtual() == NULL) {
  17548. delete sub_message_;
  17549. }
  17550. sub_message_ = sub_message;
  17551. if (sub_message) {
  17552. set_has_sub_message();
  17553. } else {
  17554. clear_has_sub_message();
  17555. }
  17556. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestLazyMessage.sub_message)
  17557. }
  17558. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  17559. const int TestLazyMessage::kSubMessageFieldNumber;
  17560. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  17561. TestLazyMessage::TestLazyMessage()
  17562. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  17563. ::google::protobuf::internal::InitSCC(
  17564. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestLazyMessage.base);
  17565. SharedCtor();
  17566. // @@protoc_insertion_point(constructor:protobuf_unittest.TestLazyMessage)
  17567. }
  17568. TestLazyMessage::TestLazyMessage(::google::protobuf::Arena* arena)
  17569. : ::google::protobuf::Message(),
  17570. _internal_metadata_(arena) {
  17571. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestLazyMessage.base);
  17572. SharedCtor();
  17573. RegisterArenaDtor(arena);
  17574. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestLazyMessage)
  17575. }
  17576. TestLazyMessage::TestLazyMessage(const TestLazyMessage& from)
  17577. : ::google::protobuf::Message(),
  17578. _internal_metadata_(NULL),
  17579. _has_bits_(from._has_bits_) {
  17580. _internal_metadata_.MergeFrom(from._internal_metadata_);
  17581. if (from.has_sub_message()) {
  17582. sub_message_ = new ::protobuf_unittest::TestAllTypes(*from.sub_message_);
  17583. } else {
  17584. sub_message_ = NULL;
  17585. }
  17586. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestLazyMessage)
  17587. }
  17588. void TestLazyMessage::SharedCtor() {
  17589. sub_message_ = NULL;
  17590. }
  17591. TestLazyMessage::~TestLazyMessage() {
  17592. // @@protoc_insertion_point(destructor:protobuf_unittest.TestLazyMessage)
  17593. SharedDtor();
  17594. }
  17595. void TestLazyMessage::SharedDtor() {
  17596. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  17597. if (this != internal_default_instance()) delete sub_message_;
  17598. }
  17599. void TestLazyMessage::ArenaDtor(void* object) {
  17600. TestLazyMessage* _this = reinterpret_cast< TestLazyMessage* >(object);
  17601. (void)_this;
  17602. }
  17603. void TestLazyMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  17604. }
  17605. void TestLazyMessage::SetCachedSize(int size) const {
  17606. _cached_size_.Set(size);
  17607. }
  17608. const ::google::protobuf::Descriptor* TestLazyMessage::descriptor() {
  17609. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  17610. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  17611. }
  17612. const TestLazyMessage& TestLazyMessage::default_instance() {
  17613. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestLazyMessage.base);
  17614. return *internal_default_instance();
  17615. }
  17616. void TestLazyMessage::Clear() {
  17617. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestLazyMessage)
  17618. ::google::protobuf::uint32 cached_has_bits = 0;
  17619. // Prevent compiler warnings about cached_has_bits being unused
  17620. (void) cached_has_bits;
  17621. cached_has_bits = _has_bits_[0];
  17622. if (cached_has_bits & 0x00000001u) {
  17623. GOOGLE_DCHECK(sub_message_ != NULL);
  17624. sub_message_->Clear();
  17625. }
  17626. _has_bits_.Clear();
  17627. _internal_metadata_.Clear();
  17628. }
  17629. bool TestLazyMessage::MergePartialFromCodedStream(
  17630. ::google::protobuf::io::CodedInputStream* input) {
  17631. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  17632. ::google::protobuf::uint32 tag;
  17633. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestLazyMessage)
  17634. for (;;) {
  17635. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  17636. tag = p.first;
  17637. if (!p.second) goto handle_unusual;
  17638. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  17639. // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = true];
  17640. case 1: {
  17641. if (static_cast< ::google::protobuf::uint8>(tag) ==
  17642. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  17643. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  17644. input, mutable_sub_message()));
  17645. } else {
  17646. goto handle_unusual;
  17647. }
  17648. break;
  17649. }
  17650. default: {
  17651. handle_unusual:
  17652. if (tag == 0) {
  17653. goto success;
  17654. }
  17655. DO_(::google::protobuf::internal::WireFormat::SkipField(
  17656. input, tag, _internal_metadata_.mutable_unknown_fields()));
  17657. break;
  17658. }
  17659. }
  17660. }
  17661. success:
  17662. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestLazyMessage)
  17663. return true;
  17664. failure:
  17665. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestLazyMessage)
  17666. return false;
  17667. #undef DO_
  17668. }
  17669. void TestLazyMessage::SerializeWithCachedSizes(
  17670. ::google::protobuf::io::CodedOutputStream* output) const {
  17671. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestLazyMessage)
  17672. ::google::protobuf::uint32 cached_has_bits = 0;
  17673. (void) cached_has_bits;
  17674. cached_has_bits = _has_bits_[0];
  17675. // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = true];
  17676. if (cached_has_bits & 0x00000001u) {
  17677. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  17678. 1, this->_internal_sub_message(), output);
  17679. }
  17680. if (_internal_metadata_.have_unknown_fields()) {
  17681. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  17682. _internal_metadata_.unknown_fields(), output);
  17683. }
  17684. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestLazyMessage)
  17685. }
  17686. ::google::protobuf::uint8* TestLazyMessage::InternalSerializeWithCachedSizesToArray(
  17687. bool deterministic, ::google::protobuf::uint8* target) const {
  17688. (void)deterministic; // Unused
  17689. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestLazyMessage)
  17690. ::google::protobuf::uint32 cached_has_bits = 0;
  17691. (void) cached_has_bits;
  17692. cached_has_bits = _has_bits_[0];
  17693. // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = true];
  17694. if (cached_has_bits & 0x00000001u) {
  17695. target = ::google::protobuf::internal::WireFormatLite::
  17696. InternalWriteMessageToArray(
  17697. 1, this->_internal_sub_message(), deterministic, target);
  17698. }
  17699. if (_internal_metadata_.have_unknown_fields()) {
  17700. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  17701. _internal_metadata_.unknown_fields(), target);
  17702. }
  17703. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestLazyMessage)
  17704. return target;
  17705. }
  17706. size_t TestLazyMessage::ByteSizeLong() const {
  17707. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestLazyMessage)
  17708. size_t total_size = 0;
  17709. if (_internal_metadata_.have_unknown_fields()) {
  17710. total_size +=
  17711. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  17712. _internal_metadata_.unknown_fields());
  17713. }
  17714. // optional .protobuf_unittest.TestAllTypes sub_message = 1 [lazy = true];
  17715. if (has_sub_message()) {
  17716. total_size += 1 +
  17717. ::google::protobuf::internal::WireFormatLite::MessageSize(
  17718. *sub_message_);
  17719. }
  17720. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  17721. SetCachedSize(cached_size);
  17722. return total_size;
  17723. }
  17724. void TestLazyMessage::MergeFrom(const ::google::protobuf::Message& from) {
  17725. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestLazyMessage)
  17726. GOOGLE_DCHECK_NE(&from, this);
  17727. const TestLazyMessage* source =
  17728. ::google::protobuf::internal::DynamicCastToGenerated<const TestLazyMessage>(
  17729. &from);
  17730. if (source == NULL) {
  17731. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestLazyMessage)
  17732. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  17733. } else {
  17734. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestLazyMessage)
  17735. MergeFrom(*source);
  17736. }
  17737. }
  17738. void TestLazyMessage::MergeFrom(const TestLazyMessage& from) {
  17739. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestLazyMessage)
  17740. GOOGLE_DCHECK_NE(&from, this);
  17741. _internal_metadata_.MergeFrom(from._internal_metadata_);
  17742. ::google::protobuf::uint32 cached_has_bits = 0;
  17743. (void) cached_has_bits;
  17744. if (from.has_sub_message()) {
  17745. mutable_sub_message()->::protobuf_unittest::TestAllTypes::MergeFrom(from.sub_message());
  17746. }
  17747. }
  17748. void TestLazyMessage::CopyFrom(const ::google::protobuf::Message& from) {
  17749. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestLazyMessage)
  17750. if (&from == this) return;
  17751. Clear();
  17752. MergeFrom(from);
  17753. }
  17754. void TestLazyMessage::CopyFrom(const TestLazyMessage& from) {
  17755. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestLazyMessage)
  17756. if (&from == this) return;
  17757. Clear();
  17758. MergeFrom(from);
  17759. }
  17760. bool TestLazyMessage::IsInitialized() const {
  17761. return true;
  17762. }
  17763. void TestLazyMessage::Swap(TestLazyMessage* other) {
  17764. if (other == this) return;
  17765. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  17766. InternalSwap(other);
  17767. } else {
  17768. TestLazyMessage* temp = New(GetArenaNoVirtual());
  17769. temp->MergeFrom(*other);
  17770. other->CopyFrom(*this);
  17771. InternalSwap(temp);
  17772. if (GetArenaNoVirtual() == NULL) {
  17773. delete temp;
  17774. }
  17775. }
  17776. }
  17777. void TestLazyMessage::UnsafeArenaSwap(TestLazyMessage* other) {
  17778. if (other == this) return;
  17779. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  17780. InternalSwap(other);
  17781. }
  17782. void TestLazyMessage::InternalSwap(TestLazyMessage* other) {
  17783. using std::swap;
  17784. swap(sub_message_, other->sub_message_);
  17785. swap(_has_bits_[0], other->_has_bits_[0]);
  17786. _internal_metadata_.Swap(&other->_internal_metadata_);
  17787. }
  17788. ::google::protobuf::Metadata TestLazyMessage::GetMetadata() const {
  17789. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  17790. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  17791. }
  17792. // ===================================================================
  17793. void TestNestedMessageHasBits_NestedMessage::InitAsDefaultInstance() {
  17794. }
  17795. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  17796. const int TestNestedMessageHasBits_NestedMessage::kNestedmessageRepeatedInt32FieldNumber;
  17797. const int TestNestedMessageHasBits_NestedMessage::kNestedmessageRepeatedForeignmessageFieldNumber;
  17798. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  17799. TestNestedMessageHasBits_NestedMessage::TestNestedMessageHasBits_NestedMessage()
  17800. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  17801. ::google::protobuf::internal::InitSCC(
  17802. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedMessageHasBits_NestedMessage.base);
  17803. SharedCtor();
  17804. // @@protoc_insertion_point(constructor:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  17805. }
  17806. TestNestedMessageHasBits_NestedMessage::TestNestedMessageHasBits_NestedMessage(::google::protobuf::Arena* arena)
  17807. : ::google::protobuf::Message(),
  17808. _internal_metadata_(arena),
  17809. nestedmessage_repeated_int32_(arena),
  17810. nestedmessage_repeated_foreignmessage_(arena) {
  17811. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedMessageHasBits_NestedMessage.base);
  17812. SharedCtor();
  17813. RegisterArenaDtor(arena);
  17814. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  17815. }
  17816. TestNestedMessageHasBits_NestedMessage::TestNestedMessageHasBits_NestedMessage(const TestNestedMessageHasBits_NestedMessage& from)
  17817. : ::google::protobuf::Message(),
  17818. _internal_metadata_(NULL),
  17819. _has_bits_(from._has_bits_),
  17820. nestedmessage_repeated_int32_(from.nestedmessage_repeated_int32_),
  17821. nestedmessage_repeated_foreignmessage_(from.nestedmessage_repeated_foreignmessage_) {
  17822. _internal_metadata_.MergeFrom(from._internal_metadata_);
  17823. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  17824. }
  17825. void TestNestedMessageHasBits_NestedMessage::SharedCtor() {
  17826. }
  17827. TestNestedMessageHasBits_NestedMessage::~TestNestedMessageHasBits_NestedMessage() {
  17828. // @@protoc_insertion_point(destructor:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  17829. SharedDtor();
  17830. }
  17831. void TestNestedMessageHasBits_NestedMessage::SharedDtor() {
  17832. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  17833. }
  17834. void TestNestedMessageHasBits_NestedMessage::ArenaDtor(void* object) {
  17835. TestNestedMessageHasBits_NestedMessage* _this = reinterpret_cast< TestNestedMessageHasBits_NestedMessage* >(object);
  17836. (void)_this;
  17837. }
  17838. void TestNestedMessageHasBits_NestedMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  17839. }
  17840. void TestNestedMessageHasBits_NestedMessage::SetCachedSize(int size) const {
  17841. _cached_size_.Set(size);
  17842. }
  17843. const ::google::protobuf::Descriptor* TestNestedMessageHasBits_NestedMessage::descriptor() {
  17844. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  17845. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  17846. }
  17847. const TestNestedMessageHasBits_NestedMessage& TestNestedMessageHasBits_NestedMessage::default_instance() {
  17848. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedMessageHasBits_NestedMessage.base);
  17849. return *internal_default_instance();
  17850. }
  17851. void TestNestedMessageHasBits_NestedMessage::Clear() {
  17852. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  17853. ::google::protobuf::uint32 cached_has_bits = 0;
  17854. // Prevent compiler warnings about cached_has_bits being unused
  17855. (void) cached_has_bits;
  17856. nestedmessage_repeated_int32_.Clear();
  17857. nestedmessage_repeated_foreignmessage_.Clear();
  17858. _has_bits_.Clear();
  17859. _internal_metadata_.Clear();
  17860. }
  17861. bool TestNestedMessageHasBits_NestedMessage::MergePartialFromCodedStream(
  17862. ::google::protobuf::io::CodedInputStream* input) {
  17863. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  17864. ::google::protobuf::uint32 tag;
  17865. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  17866. for (;;) {
  17867. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  17868. tag = p.first;
  17869. if (!p.second) goto handle_unusual;
  17870. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  17871. // repeated int32 nestedmessage_repeated_int32 = 1;
  17872. case 1: {
  17873. if (static_cast< ::google::protobuf::uint8>(tag) ==
  17874. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  17875. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  17876. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  17877. 1, 8u, input, this->mutable_nestedmessage_repeated_int32())));
  17878. } else if (
  17879. static_cast< ::google::protobuf::uint8>(tag) ==
  17880. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  17881. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  17882. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  17883. input, this->mutable_nestedmessage_repeated_int32())));
  17884. } else {
  17885. goto handle_unusual;
  17886. }
  17887. break;
  17888. }
  17889. // repeated .protobuf_unittest.ForeignMessage nestedmessage_repeated_foreignmessage = 2;
  17890. case 2: {
  17891. if (static_cast< ::google::protobuf::uint8>(tag) ==
  17892. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  17893. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  17894. input, add_nestedmessage_repeated_foreignmessage()));
  17895. } else {
  17896. goto handle_unusual;
  17897. }
  17898. break;
  17899. }
  17900. default: {
  17901. handle_unusual:
  17902. if (tag == 0) {
  17903. goto success;
  17904. }
  17905. DO_(::google::protobuf::internal::WireFormat::SkipField(
  17906. input, tag, _internal_metadata_.mutable_unknown_fields()));
  17907. break;
  17908. }
  17909. }
  17910. }
  17911. success:
  17912. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  17913. return true;
  17914. failure:
  17915. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  17916. return false;
  17917. #undef DO_
  17918. }
  17919. void TestNestedMessageHasBits_NestedMessage::SerializeWithCachedSizes(
  17920. ::google::protobuf::io::CodedOutputStream* output) const {
  17921. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  17922. ::google::protobuf::uint32 cached_has_bits = 0;
  17923. (void) cached_has_bits;
  17924. // repeated int32 nestedmessage_repeated_int32 = 1;
  17925. for (int i = 0, n = this->nestedmessage_repeated_int32_size(); i < n; i++) {
  17926. ::google::protobuf::internal::WireFormatLite::WriteInt32(
  17927. 1, this->nestedmessage_repeated_int32(i), output);
  17928. }
  17929. // repeated .protobuf_unittest.ForeignMessage nestedmessage_repeated_foreignmessage = 2;
  17930. for (unsigned int i = 0,
  17931. n = static_cast<unsigned int>(this->nestedmessage_repeated_foreignmessage_size()); i < n; i++) {
  17932. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  17933. 2,
  17934. this->nestedmessage_repeated_foreignmessage(static_cast<int>(i)),
  17935. output);
  17936. }
  17937. if (_internal_metadata_.have_unknown_fields()) {
  17938. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  17939. _internal_metadata_.unknown_fields(), output);
  17940. }
  17941. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  17942. }
  17943. ::google::protobuf::uint8* TestNestedMessageHasBits_NestedMessage::InternalSerializeWithCachedSizesToArray(
  17944. bool deterministic, ::google::protobuf::uint8* target) const {
  17945. (void)deterministic; // Unused
  17946. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  17947. ::google::protobuf::uint32 cached_has_bits = 0;
  17948. (void) cached_has_bits;
  17949. // repeated int32 nestedmessage_repeated_int32 = 1;
  17950. target = ::google::protobuf::internal::WireFormatLite::
  17951. WriteInt32ToArray(1, this->nestedmessage_repeated_int32_, target);
  17952. // repeated .protobuf_unittest.ForeignMessage nestedmessage_repeated_foreignmessage = 2;
  17953. for (unsigned int i = 0,
  17954. n = static_cast<unsigned int>(this->nestedmessage_repeated_foreignmessage_size()); i < n; i++) {
  17955. target = ::google::protobuf::internal::WireFormatLite::
  17956. InternalWriteMessageToArray(
  17957. 2, this->nestedmessage_repeated_foreignmessage(static_cast<int>(i)), deterministic, target);
  17958. }
  17959. if (_internal_metadata_.have_unknown_fields()) {
  17960. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  17961. _internal_metadata_.unknown_fields(), target);
  17962. }
  17963. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  17964. return target;
  17965. }
  17966. size_t TestNestedMessageHasBits_NestedMessage::ByteSizeLong() const {
  17967. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  17968. size_t total_size = 0;
  17969. if (_internal_metadata_.have_unknown_fields()) {
  17970. total_size +=
  17971. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  17972. _internal_metadata_.unknown_fields());
  17973. }
  17974. // repeated int32 nestedmessage_repeated_int32 = 1;
  17975. {
  17976. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  17977. Int32Size(this->nestedmessage_repeated_int32_);
  17978. total_size += 1 *
  17979. ::google::protobuf::internal::FromIntSize(this->nestedmessage_repeated_int32_size());
  17980. total_size += data_size;
  17981. }
  17982. // repeated .protobuf_unittest.ForeignMessage nestedmessage_repeated_foreignmessage = 2;
  17983. {
  17984. unsigned int count = static_cast<unsigned int>(this->nestedmessage_repeated_foreignmessage_size());
  17985. total_size += 1UL * count;
  17986. for (unsigned int i = 0; i < count; i++) {
  17987. total_size +=
  17988. ::google::protobuf::internal::WireFormatLite::MessageSize(
  17989. this->nestedmessage_repeated_foreignmessage(static_cast<int>(i)));
  17990. }
  17991. }
  17992. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  17993. SetCachedSize(cached_size);
  17994. return total_size;
  17995. }
  17996. void TestNestedMessageHasBits_NestedMessage::MergeFrom(const ::google::protobuf::Message& from) {
  17997. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  17998. GOOGLE_DCHECK_NE(&from, this);
  17999. const TestNestedMessageHasBits_NestedMessage* source =
  18000. ::google::protobuf::internal::DynamicCastToGenerated<const TestNestedMessageHasBits_NestedMessage>(
  18001. &from);
  18002. if (source == NULL) {
  18003. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  18004. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  18005. } else {
  18006. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  18007. MergeFrom(*source);
  18008. }
  18009. }
  18010. void TestNestedMessageHasBits_NestedMessage::MergeFrom(const TestNestedMessageHasBits_NestedMessage& from) {
  18011. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  18012. GOOGLE_DCHECK_NE(&from, this);
  18013. _internal_metadata_.MergeFrom(from._internal_metadata_);
  18014. ::google::protobuf::uint32 cached_has_bits = 0;
  18015. (void) cached_has_bits;
  18016. nestedmessage_repeated_int32_.MergeFrom(from.nestedmessage_repeated_int32_);
  18017. nestedmessage_repeated_foreignmessage_.MergeFrom(from.nestedmessage_repeated_foreignmessage_);
  18018. }
  18019. void TestNestedMessageHasBits_NestedMessage::CopyFrom(const ::google::protobuf::Message& from) {
  18020. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  18021. if (&from == this) return;
  18022. Clear();
  18023. MergeFrom(from);
  18024. }
  18025. void TestNestedMessageHasBits_NestedMessage::CopyFrom(const TestNestedMessageHasBits_NestedMessage& from) {
  18026. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestNestedMessageHasBits.NestedMessage)
  18027. if (&from == this) return;
  18028. Clear();
  18029. MergeFrom(from);
  18030. }
  18031. bool TestNestedMessageHasBits_NestedMessage::IsInitialized() const {
  18032. return true;
  18033. }
  18034. void TestNestedMessageHasBits_NestedMessage::Swap(TestNestedMessageHasBits_NestedMessage* other) {
  18035. if (other == this) return;
  18036. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  18037. InternalSwap(other);
  18038. } else {
  18039. TestNestedMessageHasBits_NestedMessage* temp = New(GetArenaNoVirtual());
  18040. temp->MergeFrom(*other);
  18041. other->CopyFrom(*this);
  18042. InternalSwap(temp);
  18043. if (GetArenaNoVirtual() == NULL) {
  18044. delete temp;
  18045. }
  18046. }
  18047. }
  18048. void TestNestedMessageHasBits_NestedMessage::UnsafeArenaSwap(TestNestedMessageHasBits_NestedMessage* other) {
  18049. if (other == this) return;
  18050. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  18051. InternalSwap(other);
  18052. }
  18053. void TestNestedMessageHasBits_NestedMessage::InternalSwap(TestNestedMessageHasBits_NestedMessage* other) {
  18054. using std::swap;
  18055. nestedmessage_repeated_int32_.InternalSwap(&other->nestedmessage_repeated_int32_);
  18056. CastToBase(&nestedmessage_repeated_foreignmessage_)->InternalSwap(CastToBase(&other->nestedmessage_repeated_foreignmessage_));
  18057. swap(_has_bits_[0], other->_has_bits_[0]);
  18058. _internal_metadata_.Swap(&other->_internal_metadata_);
  18059. }
  18060. ::google::protobuf::Metadata TestNestedMessageHasBits_NestedMessage::GetMetadata() const {
  18061. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  18062. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  18063. }
  18064. // ===================================================================
  18065. void TestNestedMessageHasBits::InitAsDefaultInstance() {
  18066. ::protobuf_unittest::_TestNestedMessageHasBits_default_instance_._instance.get_mutable()->optional_nested_message_ = const_cast< ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage*>(
  18067. ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage::internal_default_instance());
  18068. }
  18069. void TestNestedMessageHasBits::unsafe_arena_set_allocated_optional_nested_message(
  18070. ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage* optional_nested_message) {
  18071. if (GetArenaNoVirtual() == NULL) {
  18072. delete optional_nested_message_;
  18073. }
  18074. optional_nested_message_ = optional_nested_message;
  18075. if (optional_nested_message) {
  18076. set_has_optional_nested_message();
  18077. } else {
  18078. clear_has_optional_nested_message();
  18079. }
  18080. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestNestedMessageHasBits.optional_nested_message)
  18081. }
  18082. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  18083. const int TestNestedMessageHasBits::kOptionalNestedMessageFieldNumber;
  18084. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  18085. TestNestedMessageHasBits::TestNestedMessageHasBits()
  18086. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  18087. ::google::protobuf::internal::InitSCC(
  18088. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedMessageHasBits.base);
  18089. SharedCtor();
  18090. // @@protoc_insertion_point(constructor:protobuf_unittest.TestNestedMessageHasBits)
  18091. }
  18092. TestNestedMessageHasBits::TestNestedMessageHasBits(::google::protobuf::Arena* arena)
  18093. : ::google::protobuf::Message(),
  18094. _internal_metadata_(arena) {
  18095. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedMessageHasBits.base);
  18096. SharedCtor();
  18097. RegisterArenaDtor(arena);
  18098. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestNestedMessageHasBits)
  18099. }
  18100. TestNestedMessageHasBits::TestNestedMessageHasBits(const TestNestedMessageHasBits& from)
  18101. : ::google::protobuf::Message(),
  18102. _internal_metadata_(NULL),
  18103. _has_bits_(from._has_bits_) {
  18104. _internal_metadata_.MergeFrom(from._internal_metadata_);
  18105. if (from.has_optional_nested_message()) {
  18106. optional_nested_message_ = new ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage(*from.optional_nested_message_);
  18107. } else {
  18108. optional_nested_message_ = NULL;
  18109. }
  18110. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestNestedMessageHasBits)
  18111. }
  18112. void TestNestedMessageHasBits::SharedCtor() {
  18113. optional_nested_message_ = NULL;
  18114. }
  18115. TestNestedMessageHasBits::~TestNestedMessageHasBits() {
  18116. // @@protoc_insertion_point(destructor:protobuf_unittest.TestNestedMessageHasBits)
  18117. SharedDtor();
  18118. }
  18119. void TestNestedMessageHasBits::SharedDtor() {
  18120. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  18121. if (this != internal_default_instance()) delete optional_nested_message_;
  18122. }
  18123. void TestNestedMessageHasBits::ArenaDtor(void* object) {
  18124. TestNestedMessageHasBits* _this = reinterpret_cast< TestNestedMessageHasBits* >(object);
  18125. (void)_this;
  18126. }
  18127. void TestNestedMessageHasBits::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  18128. }
  18129. void TestNestedMessageHasBits::SetCachedSize(int size) const {
  18130. _cached_size_.Set(size);
  18131. }
  18132. const ::google::protobuf::Descriptor* TestNestedMessageHasBits::descriptor() {
  18133. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  18134. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  18135. }
  18136. const TestNestedMessageHasBits& TestNestedMessageHasBits::default_instance() {
  18137. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestNestedMessageHasBits.base);
  18138. return *internal_default_instance();
  18139. }
  18140. void TestNestedMessageHasBits::Clear() {
  18141. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestNestedMessageHasBits)
  18142. ::google::protobuf::uint32 cached_has_bits = 0;
  18143. // Prevent compiler warnings about cached_has_bits being unused
  18144. (void) cached_has_bits;
  18145. cached_has_bits = _has_bits_[0];
  18146. if (cached_has_bits & 0x00000001u) {
  18147. GOOGLE_DCHECK(optional_nested_message_ != NULL);
  18148. optional_nested_message_->Clear();
  18149. }
  18150. _has_bits_.Clear();
  18151. _internal_metadata_.Clear();
  18152. }
  18153. bool TestNestedMessageHasBits::MergePartialFromCodedStream(
  18154. ::google::protobuf::io::CodedInputStream* input) {
  18155. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  18156. ::google::protobuf::uint32 tag;
  18157. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestNestedMessageHasBits)
  18158. for (;;) {
  18159. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  18160. tag = p.first;
  18161. if (!p.second) goto handle_unusual;
  18162. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  18163. // optional .protobuf_unittest.TestNestedMessageHasBits.NestedMessage optional_nested_message = 1;
  18164. case 1: {
  18165. if (static_cast< ::google::protobuf::uint8>(tag) ==
  18166. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  18167. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  18168. input, mutable_optional_nested_message()));
  18169. } else {
  18170. goto handle_unusual;
  18171. }
  18172. break;
  18173. }
  18174. default: {
  18175. handle_unusual:
  18176. if (tag == 0) {
  18177. goto success;
  18178. }
  18179. DO_(::google::protobuf::internal::WireFormat::SkipField(
  18180. input, tag, _internal_metadata_.mutable_unknown_fields()));
  18181. break;
  18182. }
  18183. }
  18184. }
  18185. success:
  18186. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestNestedMessageHasBits)
  18187. return true;
  18188. failure:
  18189. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestNestedMessageHasBits)
  18190. return false;
  18191. #undef DO_
  18192. }
  18193. void TestNestedMessageHasBits::SerializeWithCachedSizes(
  18194. ::google::protobuf::io::CodedOutputStream* output) const {
  18195. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestNestedMessageHasBits)
  18196. ::google::protobuf::uint32 cached_has_bits = 0;
  18197. (void) cached_has_bits;
  18198. cached_has_bits = _has_bits_[0];
  18199. // optional .protobuf_unittest.TestNestedMessageHasBits.NestedMessage optional_nested_message = 1;
  18200. if (cached_has_bits & 0x00000001u) {
  18201. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  18202. 1, this->_internal_optional_nested_message(), output);
  18203. }
  18204. if (_internal_metadata_.have_unknown_fields()) {
  18205. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  18206. _internal_metadata_.unknown_fields(), output);
  18207. }
  18208. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestNestedMessageHasBits)
  18209. }
  18210. ::google::protobuf::uint8* TestNestedMessageHasBits::InternalSerializeWithCachedSizesToArray(
  18211. bool deterministic, ::google::protobuf::uint8* target) const {
  18212. (void)deterministic; // Unused
  18213. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestNestedMessageHasBits)
  18214. ::google::protobuf::uint32 cached_has_bits = 0;
  18215. (void) cached_has_bits;
  18216. cached_has_bits = _has_bits_[0];
  18217. // optional .protobuf_unittest.TestNestedMessageHasBits.NestedMessage optional_nested_message = 1;
  18218. if (cached_has_bits & 0x00000001u) {
  18219. target = ::google::protobuf::internal::WireFormatLite::
  18220. InternalWriteMessageToArray(
  18221. 1, this->_internal_optional_nested_message(), deterministic, target);
  18222. }
  18223. if (_internal_metadata_.have_unknown_fields()) {
  18224. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  18225. _internal_metadata_.unknown_fields(), target);
  18226. }
  18227. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestNestedMessageHasBits)
  18228. return target;
  18229. }
  18230. size_t TestNestedMessageHasBits::ByteSizeLong() const {
  18231. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestNestedMessageHasBits)
  18232. size_t total_size = 0;
  18233. if (_internal_metadata_.have_unknown_fields()) {
  18234. total_size +=
  18235. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  18236. _internal_metadata_.unknown_fields());
  18237. }
  18238. // optional .protobuf_unittest.TestNestedMessageHasBits.NestedMessage optional_nested_message = 1;
  18239. if (has_optional_nested_message()) {
  18240. total_size += 1 +
  18241. ::google::protobuf::internal::WireFormatLite::MessageSize(
  18242. *optional_nested_message_);
  18243. }
  18244. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  18245. SetCachedSize(cached_size);
  18246. return total_size;
  18247. }
  18248. void TestNestedMessageHasBits::MergeFrom(const ::google::protobuf::Message& from) {
  18249. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestNestedMessageHasBits)
  18250. GOOGLE_DCHECK_NE(&from, this);
  18251. const TestNestedMessageHasBits* source =
  18252. ::google::protobuf::internal::DynamicCastToGenerated<const TestNestedMessageHasBits>(
  18253. &from);
  18254. if (source == NULL) {
  18255. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestNestedMessageHasBits)
  18256. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  18257. } else {
  18258. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestNestedMessageHasBits)
  18259. MergeFrom(*source);
  18260. }
  18261. }
  18262. void TestNestedMessageHasBits::MergeFrom(const TestNestedMessageHasBits& from) {
  18263. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestNestedMessageHasBits)
  18264. GOOGLE_DCHECK_NE(&from, this);
  18265. _internal_metadata_.MergeFrom(from._internal_metadata_);
  18266. ::google::protobuf::uint32 cached_has_bits = 0;
  18267. (void) cached_has_bits;
  18268. if (from.has_optional_nested_message()) {
  18269. mutable_optional_nested_message()->::protobuf_unittest::TestNestedMessageHasBits_NestedMessage::MergeFrom(from.optional_nested_message());
  18270. }
  18271. }
  18272. void TestNestedMessageHasBits::CopyFrom(const ::google::protobuf::Message& from) {
  18273. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestNestedMessageHasBits)
  18274. if (&from == this) return;
  18275. Clear();
  18276. MergeFrom(from);
  18277. }
  18278. void TestNestedMessageHasBits::CopyFrom(const TestNestedMessageHasBits& from) {
  18279. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestNestedMessageHasBits)
  18280. if (&from == this) return;
  18281. Clear();
  18282. MergeFrom(from);
  18283. }
  18284. bool TestNestedMessageHasBits::IsInitialized() const {
  18285. return true;
  18286. }
  18287. void TestNestedMessageHasBits::Swap(TestNestedMessageHasBits* other) {
  18288. if (other == this) return;
  18289. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  18290. InternalSwap(other);
  18291. } else {
  18292. TestNestedMessageHasBits* temp = New(GetArenaNoVirtual());
  18293. temp->MergeFrom(*other);
  18294. other->CopyFrom(*this);
  18295. InternalSwap(temp);
  18296. if (GetArenaNoVirtual() == NULL) {
  18297. delete temp;
  18298. }
  18299. }
  18300. }
  18301. void TestNestedMessageHasBits::UnsafeArenaSwap(TestNestedMessageHasBits* other) {
  18302. if (other == this) return;
  18303. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  18304. InternalSwap(other);
  18305. }
  18306. void TestNestedMessageHasBits::InternalSwap(TestNestedMessageHasBits* other) {
  18307. using std::swap;
  18308. swap(optional_nested_message_, other->optional_nested_message_);
  18309. swap(_has_bits_[0], other->_has_bits_[0]);
  18310. _internal_metadata_.Swap(&other->_internal_metadata_);
  18311. }
  18312. ::google::protobuf::Metadata TestNestedMessageHasBits::GetMetadata() const {
  18313. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  18314. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  18315. }
  18316. // ===================================================================
  18317. void TestCamelCaseFieldNames::InitAsDefaultInstance() {
  18318. ::protobuf_unittest::_TestCamelCaseFieldNames_default_instance_._instance.get_mutable()->messagefield_ = const_cast< ::protobuf_unittest::ForeignMessage*>(
  18319. ::protobuf_unittest::ForeignMessage::internal_default_instance());
  18320. }
  18321. void TestCamelCaseFieldNames::unsafe_arena_set_allocated_messagefield(
  18322. ::protobuf_unittest::ForeignMessage* messagefield) {
  18323. if (GetArenaNoVirtual() == NULL) {
  18324. delete messagefield_;
  18325. }
  18326. messagefield_ = messagefield;
  18327. if (messagefield) {
  18328. set_has_messagefield();
  18329. } else {
  18330. clear_has_messagefield();
  18331. }
  18332. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestCamelCaseFieldNames.MessageField)
  18333. }
  18334. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  18335. const int TestCamelCaseFieldNames::kPrimitiveFieldFieldNumber;
  18336. const int TestCamelCaseFieldNames::kStringFieldFieldNumber;
  18337. const int TestCamelCaseFieldNames::kEnumFieldFieldNumber;
  18338. const int TestCamelCaseFieldNames::kMessageFieldFieldNumber;
  18339. const int TestCamelCaseFieldNames::kStringPieceFieldFieldNumber;
  18340. const int TestCamelCaseFieldNames::kCordFieldFieldNumber;
  18341. const int TestCamelCaseFieldNames::kRepeatedPrimitiveFieldFieldNumber;
  18342. const int TestCamelCaseFieldNames::kRepeatedStringFieldFieldNumber;
  18343. const int TestCamelCaseFieldNames::kRepeatedEnumFieldFieldNumber;
  18344. const int TestCamelCaseFieldNames::kRepeatedMessageFieldFieldNumber;
  18345. const int TestCamelCaseFieldNames::kRepeatedStringPieceFieldFieldNumber;
  18346. const int TestCamelCaseFieldNames::kRepeatedCordFieldFieldNumber;
  18347. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  18348. TestCamelCaseFieldNames::TestCamelCaseFieldNames()
  18349. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  18350. ::google::protobuf::internal::InitSCC(
  18351. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestCamelCaseFieldNames.base);
  18352. SharedCtor();
  18353. // @@protoc_insertion_point(constructor:protobuf_unittest.TestCamelCaseFieldNames)
  18354. }
  18355. TestCamelCaseFieldNames::TestCamelCaseFieldNames(::google::protobuf::Arena* arena)
  18356. : ::google::protobuf::Message(),
  18357. _internal_metadata_(arena),
  18358. repeatedprimitivefield_(arena),
  18359. repeatedstringfield_(arena),
  18360. repeatedenumfield_(arena),
  18361. repeatedmessagefield_(arena),
  18362. repeatedstringpiecefield_(arena),
  18363. repeatedcordfield_(arena) {
  18364. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestCamelCaseFieldNames.base);
  18365. SharedCtor();
  18366. RegisterArenaDtor(arena);
  18367. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestCamelCaseFieldNames)
  18368. }
  18369. TestCamelCaseFieldNames::TestCamelCaseFieldNames(const TestCamelCaseFieldNames& from)
  18370. : ::google::protobuf::Message(),
  18371. _internal_metadata_(NULL),
  18372. _has_bits_(from._has_bits_),
  18373. repeatedprimitivefield_(from.repeatedprimitivefield_),
  18374. repeatedstringfield_(from.repeatedstringfield_),
  18375. repeatedenumfield_(from.repeatedenumfield_),
  18376. repeatedmessagefield_(from.repeatedmessagefield_),
  18377. repeatedstringpiecefield_(from.repeatedstringpiecefield_),
  18378. repeatedcordfield_(from.repeatedcordfield_) {
  18379. _internal_metadata_.MergeFrom(from._internal_metadata_);
  18380. stringfield_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  18381. if (from.has_stringfield()) {
  18382. stringfield_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stringfield(),
  18383. GetArenaNoVirtual());
  18384. }
  18385. stringpiecefield_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  18386. if (from.has_stringpiecefield()) {
  18387. stringpiecefield_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stringpiecefield(),
  18388. GetArenaNoVirtual());
  18389. }
  18390. cordfield_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  18391. if (from.has_cordfield()) {
  18392. cordfield_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cordfield(),
  18393. GetArenaNoVirtual());
  18394. }
  18395. if (from.has_messagefield()) {
  18396. messagefield_ = new ::protobuf_unittest::ForeignMessage(*from.messagefield_);
  18397. } else {
  18398. messagefield_ = NULL;
  18399. }
  18400. ::memcpy(&primitivefield_, &from.primitivefield_,
  18401. static_cast<size_t>(reinterpret_cast<char*>(&enumfield_) -
  18402. reinterpret_cast<char*>(&primitivefield_)) + sizeof(enumfield_));
  18403. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestCamelCaseFieldNames)
  18404. }
  18405. void TestCamelCaseFieldNames::SharedCtor() {
  18406. stringfield_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  18407. stringpiecefield_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  18408. cordfield_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  18409. ::memset(&messagefield_, 0, static_cast<size_t>(
  18410. reinterpret_cast<char*>(&primitivefield_) -
  18411. reinterpret_cast<char*>(&messagefield_)) + sizeof(primitivefield_));
  18412. enumfield_ = 4;
  18413. }
  18414. TestCamelCaseFieldNames::~TestCamelCaseFieldNames() {
  18415. // @@protoc_insertion_point(destructor:protobuf_unittest.TestCamelCaseFieldNames)
  18416. SharedDtor();
  18417. }
  18418. void TestCamelCaseFieldNames::SharedDtor() {
  18419. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  18420. stringfield_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  18421. stringpiecefield_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  18422. cordfield_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  18423. if (this != internal_default_instance()) delete messagefield_;
  18424. }
  18425. void TestCamelCaseFieldNames::ArenaDtor(void* object) {
  18426. TestCamelCaseFieldNames* _this = reinterpret_cast< TestCamelCaseFieldNames* >(object);
  18427. (void)_this;
  18428. }
  18429. void TestCamelCaseFieldNames::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  18430. }
  18431. void TestCamelCaseFieldNames::SetCachedSize(int size) const {
  18432. _cached_size_.Set(size);
  18433. }
  18434. const ::google::protobuf::Descriptor* TestCamelCaseFieldNames::descriptor() {
  18435. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  18436. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  18437. }
  18438. const TestCamelCaseFieldNames& TestCamelCaseFieldNames::default_instance() {
  18439. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestCamelCaseFieldNames.base);
  18440. return *internal_default_instance();
  18441. }
  18442. void TestCamelCaseFieldNames::Clear() {
  18443. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestCamelCaseFieldNames)
  18444. ::google::protobuf::uint32 cached_has_bits = 0;
  18445. // Prevent compiler warnings about cached_has_bits being unused
  18446. (void) cached_has_bits;
  18447. repeatedprimitivefield_.Clear();
  18448. repeatedstringfield_.Clear();
  18449. repeatedenumfield_.Clear();
  18450. repeatedmessagefield_.Clear();
  18451. repeatedstringpiecefield_.Clear();
  18452. repeatedcordfield_.Clear();
  18453. cached_has_bits = _has_bits_[0];
  18454. if (cached_has_bits & 15u) {
  18455. if (cached_has_bits & 0x00000001u) {
  18456. stringfield_.ClearNonDefaultToEmpty();
  18457. }
  18458. if (cached_has_bits & 0x00000002u) {
  18459. stringpiecefield_.ClearNonDefaultToEmpty();
  18460. }
  18461. if (cached_has_bits & 0x00000004u) {
  18462. cordfield_.ClearNonDefaultToEmpty();
  18463. }
  18464. if (cached_has_bits & 0x00000008u) {
  18465. GOOGLE_DCHECK(messagefield_ != NULL);
  18466. messagefield_->Clear();
  18467. }
  18468. }
  18469. if (cached_has_bits & 48u) {
  18470. primitivefield_ = 0;
  18471. enumfield_ = 4;
  18472. }
  18473. _has_bits_.Clear();
  18474. _internal_metadata_.Clear();
  18475. }
  18476. bool TestCamelCaseFieldNames::MergePartialFromCodedStream(
  18477. ::google::protobuf::io::CodedInputStream* input) {
  18478. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  18479. ::google::protobuf::uint32 tag;
  18480. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestCamelCaseFieldNames)
  18481. for (;;) {
  18482. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  18483. tag = p.first;
  18484. if (!p.second) goto handle_unusual;
  18485. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  18486. // optional int32 PrimitiveField = 1;
  18487. case 1: {
  18488. if (static_cast< ::google::protobuf::uint8>(tag) ==
  18489. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  18490. set_has_primitivefield();
  18491. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  18492. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  18493. input, &primitivefield_)));
  18494. } else {
  18495. goto handle_unusual;
  18496. }
  18497. break;
  18498. }
  18499. // optional string StringField = 2;
  18500. case 2: {
  18501. if (static_cast< ::google::protobuf::uint8>(tag) ==
  18502. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  18503. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  18504. input, this->mutable_stringfield()));
  18505. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18506. this->stringfield().data(), static_cast<int>(this->stringfield().length()),
  18507. ::google::protobuf::internal::WireFormat::PARSE,
  18508. "protobuf_unittest.TestCamelCaseFieldNames.StringField");
  18509. } else {
  18510. goto handle_unusual;
  18511. }
  18512. break;
  18513. }
  18514. // optional .protobuf_unittest.ForeignEnum EnumField = 3;
  18515. case 3: {
  18516. if (static_cast< ::google::protobuf::uint8>(tag) ==
  18517. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  18518. int value;
  18519. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  18520. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  18521. input, &value)));
  18522. if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
  18523. set_enumfield(static_cast< ::protobuf_unittest::ForeignEnum >(value));
  18524. } else {
  18525. mutable_unknown_fields()->AddVarint(
  18526. 3, static_cast< ::google::protobuf::uint64>(value));
  18527. }
  18528. } else {
  18529. goto handle_unusual;
  18530. }
  18531. break;
  18532. }
  18533. // optional .protobuf_unittest.ForeignMessage MessageField = 4;
  18534. case 4: {
  18535. if (static_cast< ::google::protobuf::uint8>(tag) ==
  18536. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  18537. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  18538. input, mutable_messagefield()));
  18539. } else {
  18540. goto handle_unusual;
  18541. }
  18542. break;
  18543. }
  18544. // optional string StringPieceField = 5 [ctype = STRING_PIECE];
  18545. case 5: {
  18546. if (static_cast< ::google::protobuf::uint8>(tag) ==
  18547. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  18548. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  18549. input, this->mutable_stringpiecefield()));
  18550. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18551. this->stringpiecefield().data(), static_cast<int>(this->stringpiecefield().length()),
  18552. ::google::protobuf::internal::WireFormat::PARSE,
  18553. "protobuf_unittest.TestCamelCaseFieldNames.StringPieceField");
  18554. } else {
  18555. goto handle_unusual;
  18556. }
  18557. break;
  18558. }
  18559. // optional string CordField = 6 [ctype = CORD];
  18560. case 6: {
  18561. if (static_cast< ::google::protobuf::uint8>(tag) ==
  18562. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  18563. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  18564. input, this->mutable_cordfield()));
  18565. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18566. this->cordfield().data(), static_cast<int>(this->cordfield().length()),
  18567. ::google::protobuf::internal::WireFormat::PARSE,
  18568. "protobuf_unittest.TestCamelCaseFieldNames.CordField");
  18569. } else {
  18570. goto handle_unusual;
  18571. }
  18572. break;
  18573. }
  18574. // repeated int32 RepeatedPrimitiveField = 7;
  18575. case 7: {
  18576. if (static_cast< ::google::protobuf::uint8>(tag) ==
  18577. static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
  18578. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  18579. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  18580. 1, 56u, input, this->mutable_repeatedprimitivefield())));
  18581. } else if (
  18582. static_cast< ::google::protobuf::uint8>(tag) ==
  18583. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  18584. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  18585. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  18586. input, this->mutable_repeatedprimitivefield())));
  18587. } else {
  18588. goto handle_unusual;
  18589. }
  18590. break;
  18591. }
  18592. // repeated string RepeatedStringField = 8;
  18593. case 8: {
  18594. if (static_cast< ::google::protobuf::uint8>(tag) ==
  18595. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  18596. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  18597. input, this->add_repeatedstringfield()));
  18598. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18599. this->repeatedstringfield(this->repeatedstringfield_size() - 1).data(),
  18600. static_cast<int>(this->repeatedstringfield(this->repeatedstringfield_size() - 1).length()),
  18601. ::google::protobuf::internal::WireFormat::PARSE,
  18602. "protobuf_unittest.TestCamelCaseFieldNames.RepeatedStringField");
  18603. } else {
  18604. goto handle_unusual;
  18605. }
  18606. break;
  18607. }
  18608. // repeated .protobuf_unittest.ForeignEnum RepeatedEnumField = 9;
  18609. case 9: {
  18610. if (static_cast< ::google::protobuf::uint8>(tag) ==
  18611. static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
  18612. int value;
  18613. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  18614. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  18615. input, &value)));
  18616. if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
  18617. add_repeatedenumfield(static_cast< ::protobuf_unittest::ForeignEnum >(value));
  18618. } else {
  18619. mutable_unknown_fields()->AddVarint(
  18620. 9, static_cast< ::google::protobuf::uint64>(value));
  18621. }
  18622. } else if (
  18623. static_cast< ::google::protobuf::uint8>(tag) ==
  18624. static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
  18625. DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
  18626. input,
  18627. 9,
  18628. ::protobuf_unittest::ForeignEnum_IsValid,
  18629. mutable_unknown_fields(),
  18630. this->mutable_repeatedenumfield())));
  18631. } else {
  18632. goto handle_unusual;
  18633. }
  18634. break;
  18635. }
  18636. // repeated .protobuf_unittest.ForeignMessage RepeatedMessageField = 10;
  18637. case 10: {
  18638. if (static_cast< ::google::protobuf::uint8>(tag) ==
  18639. static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
  18640. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  18641. input, add_repeatedmessagefield()));
  18642. } else {
  18643. goto handle_unusual;
  18644. }
  18645. break;
  18646. }
  18647. // repeated string RepeatedStringPieceField = 11 [ctype = STRING_PIECE];
  18648. case 11: {
  18649. if (static_cast< ::google::protobuf::uint8>(tag) ==
  18650. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  18651. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  18652. input, this->add_repeatedstringpiecefield()));
  18653. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18654. this->repeatedstringpiecefield(this->repeatedstringpiecefield_size() - 1).data(),
  18655. static_cast<int>(this->repeatedstringpiecefield(this->repeatedstringpiecefield_size() - 1).length()),
  18656. ::google::protobuf::internal::WireFormat::PARSE,
  18657. "protobuf_unittest.TestCamelCaseFieldNames.RepeatedStringPieceField");
  18658. } else {
  18659. goto handle_unusual;
  18660. }
  18661. break;
  18662. }
  18663. // repeated string RepeatedCordField = 12 [ctype = CORD];
  18664. case 12: {
  18665. if (static_cast< ::google::protobuf::uint8>(tag) ==
  18666. static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
  18667. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  18668. input, this->add_repeatedcordfield()));
  18669. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18670. this->repeatedcordfield(this->repeatedcordfield_size() - 1).data(),
  18671. static_cast<int>(this->repeatedcordfield(this->repeatedcordfield_size() - 1).length()),
  18672. ::google::protobuf::internal::WireFormat::PARSE,
  18673. "protobuf_unittest.TestCamelCaseFieldNames.RepeatedCordField");
  18674. } else {
  18675. goto handle_unusual;
  18676. }
  18677. break;
  18678. }
  18679. default: {
  18680. handle_unusual:
  18681. if (tag == 0) {
  18682. goto success;
  18683. }
  18684. DO_(::google::protobuf::internal::WireFormat::SkipField(
  18685. input, tag, _internal_metadata_.mutable_unknown_fields()));
  18686. break;
  18687. }
  18688. }
  18689. }
  18690. success:
  18691. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestCamelCaseFieldNames)
  18692. return true;
  18693. failure:
  18694. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestCamelCaseFieldNames)
  18695. return false;
  18696. #undef DO_
  18697. }
  18698. void TestCamelCaseFieldNames::SerializeWithCachedSizes(
  18699. ::google::protobuf::io::CodedOutputStream* output) const {
  18700. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestCamelCaseFieldNames)
  18701. ::google::protobuf::uint32 cached_has_bits = 0;
  18702. (void) cached_has_bits;
  18703. cached_has_bits = _has_bits_[0];
  18704. // optional int32 PrimitiveField = 1;
  18705. if (cached_has_bits & 0x00000010u) {
  18706. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->primitivefield(), output);
  18707. }
  18708. // optional string StringField = 2;
  18709. if (cached_has_bits & 0x00000001u) {
  18710. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18711. this->stringfield().data(), static_cast<int>(this->stringfield().length()),
  18712. ::google::protobuf::internal::WireFormat::SERIALIZE,
  18713. "protobuf_unittest.TestCamelCaseFieldNames.StringField");
  18714. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  18715. 2, this->stringfield(), output);
  18716. }
  18717. // optional .protobuf_unittest.ForeignEnum EnumField = 3;
  18718. if (cached_has_bits & 0x00000020u) {
  18719. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  18720. 3, this->enumfield(), output);
  18721. }
  18722. // optional .protobuf_unittest.ForeignMessage MessageField = 4;
  18723. if (cached_has_bits & 0x00000008u) {
  18724. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  18725. 4, this->_internal_messagefield(), output);
  18726. }
  18727. // optional string StringPieceField = 5 [ctype = STRING_PIECE];
  18728. if (cached_has_bits & 0x00000002u) {
  18729. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18730. this->stringpiecefield().data(), static_cast<int>(this->stringpiecefield().length()),
  18731. ::google::protobuf::internal::WireFormat::SERIALIZE,
  18732. "protobuf_unittest.TestCamelCaseFieldNames.StringPieceField");
  18733. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  18734. 5, this->stringpiecefield(), output);
  18735. }
  18736. // optional string CordField = 6 [ctype = CORD];
  18737. if (cached_has_bits & 0x00000004u) {
  18738. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18739. this->cordfield().data(), static_cast<int>(this->cordfield().length()),
  18740. ::google::protobuf::internal::WireFormat::SERIALIZE,
  18741. "protobuf_unittest.TestCamelCaseFieldNames.CordField");
  18742. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  18743. 6, this->cordfield(), output);
  18744. }
  18745. // repeated int32 RepeatedPrimitiveField = 7;
  18746. for (int i = 0, n = this->repeatedprimitivefield_size(); i < n; i++) {
  18747. ::google::protobuf::internal::WireFormatLite::WriteInt32(
  18748. 7, this->repeatedprimitivefield(i), output);
  18749. }
  18750. // repeated string RepeatedStringField = 8;
  18751. for (int i = 0, n = this->repeatedstringfield_size(); i < n; i++) {
  18752. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18753. this->repeatedstringfield(i).data(), static_cast<int>(this->repeatedstringfield(i).length()),
  18754. ::google::protobuf::internal::WireFormat::SERIALIZE,
  18755. "protobuf_unittest.TestCamelCaseFieldNames.RepeatedStringField");
  18756. ::google::protobuf::internal::WireFormatLite::WriteString(
  18757. 8, this->repeatedstringfield(i), output);
  18758. }
  18759. // repeated .protobuf_unittest.ForeignEnum RepeatedEnumField = 9;
  18760. for (int i = 0, n = this->repeatedenumfield_size(); i < n; i++) {
  18761. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  18762. 9, this->repeatedenumfield(i), output);
  18763. }
  18764. // repeated .protobuf_unittest.ForeignMessage RepeatedMessageField = 10;
  18765. for (unsigned int i = 0,
  18766. n = static_cast<unsigned int>(this->repeatedmessagefield_size()); i < n; i++) {
  18767. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  18768. 10,
  18769. this->repeatedmessagefield(static_cast<int>(i)),
  18770. output);
  18771. }
  18772. // repeated string RepeatedStringPieceField = 11 [ctype = STRING_PIECE];
  18773. for (int i = 0, n = this->repeatedstringpiecefield_size(); i < n; i++) {
  18774. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18775. this->repeatedstringpiecefield(i).data(), static_cast<int>(this->repeatedstringpiecefield(i).length()),
  18776. ::google::protobuf::internal::WireFormat::SERIALIZE,
  18777. "protobuf_unittest.TestCamelCaseFieldNames.RepeatedStringPieceField");
  18778. ::google::protobuf::internal::WireFormatLite::WriteString(
  18779. 11, this->repeatedstringpiecefield(i), output);
  18780. }
  18781. // repeated string RepeatedCordField = 12 [ctype = CORD];
  18782. for (int i = 0, n = this->repeatedcordfield_size(); i < n; i++) {
  18783. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18784. this->repeatedcordfield(i).data(), static_cast<int>(this->repeatedcordfield(i).length()),
  18785. ::google::protobuf::internal::WireFormat::SERIALIZE,
  18786. "protobuf_unittest.TestCamelCaseFieldNames.RepeatedCordField");
  18787. ::google::protobuf::internal::WireFormatLite::WriteString(
  18788. 12, this->repeatedcordfield(i), output);
  18789. }
  18790. if (_internal_metadata_.have_unknown_fields()) {
  18791. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  18792. _internal_metadata_.unknown_fields(), output);
  18793. }
  18794. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestCamelCaseFieldNames)
  18795. }
  18796. ::google::protobuf::uint8* TestCamelCaseFieldNames::InternalSerializeWithCachedSizesToArray(
  18797. bool deterministic, ::google::protobuf::uint8* target) const {
  18798. (void)deterministic; // Unused
  18799. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestCamelCaseFieldNames)
  18800. ::google::protobuf::uint32 cached_has_bits = 0;
  18801. (void) cached_has_bits;
  18802. cached_has_bits = _has_bits_[0];
  18803. // optional int32 PrimitiveField = 1;
  18804. if (cached_has_bits & 0x00000010u) {
  18805. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->primitivefield(), target);
  18806. }
  18807. // optional string StringField = 2;
  18808. if (cached_has_bits & 0x00000001u) {
  18809. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18810. this->stringfield().data(), static_cast<int>(this->stringfield().length()),
  18811. ::google::protobuf::internal::WireFormat::SERIALIZE,
  18812. "protobuf_unittest.TestCamelCaseFieldNames.StringField");
  18813. target =
  18814. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  18815. 2, this->stringfield(), target);
  18816. }
  18817. // optional .protobuf_unittest.ForeignEnum EnumField = 3;
  18818. if (cached_has_bits & 0x00000020u) {
  18819. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  18820. 3, this->enumfield(), target);
  18821. }
  18822. // optional .protobuf_unittest.ForeignMessage MessageField = 4;
  18823. if (cached_has_bits & 0x00000008u) {
  18824. target = ::google::protobuf::internal::WireFormatLite::
  18825. InternalWriteMessageToArray(
  18826. 4, this->_internal_messagefield(), deterministic, target);
  18827. }
  18828. // optional string StringPieceField = 5 [ctype = STRING_PIECE];
  18829. if (cached_has_bits & 0x00000002u) {
  18830. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18831. this->stringpiecefield().data(), static_cast<int>(this->stringpiecefield().length()),
  18832. ::google::protobuf::internal::WireFormat::SERIALIZE,
  18833. "protobuf_unittest.TestCamelCaseFieldNames.StringPieceField");
  18834. target =
  18835. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  18836. 5, this->stringpiecefield(), target);
  18837. }
  18838. // optional string CordField = 6 [ctype = CORD];
  18839. if (cached_has_bits & 0x00000004u) {
  18840. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18841. this->cordfield().data(), static_cast<int>(this->cordfield().length()),
  18842. ::google::protobuf::internal::WireFormat::SERIALIZE,
  18843. "protobuf_unittest.TestCamelCaseFieldNames.CordField");
  18844. target =
  18845. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  18846. 6, this->cordfield(), target);
  18847. }
  18848. // repeated int32 RepeatedPrimitiveField = 7;
  18849. target = ::google::protobuf::internal::WireFormatLite::
  18850. WriteInt32ToArray(7, this->repeatedprimitivefield_, target);
  18851. // repeated string RepeatedStringField = 8;
  18852. for (int i = 0, n = this->repeatedstringfield_size(); i < n; i++) {
  18853. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18854. this->repeatedstringfield(i).data(), static_cast<int>(this->repeatedstringfield(i).length()),
  18855. ::google::protobuf::internal::WireFormat::SERIALIZE,
  18856. "protobuf_unittest.TestCamelCaseFieldNames.RepeatedStringField");
  18857. target = ::google::protobuf::internal::WireFormatLite::
  18858. WriteStringToArray(8, this->repeatedstringfield(i), target);
  18859. }
  18860. // repeated .protobuf_unittest.ForeignEnum RepeatedEnumField = 9;
  18861. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  18862. 9, this->repeatedenumfield_, target);
  18863. // repeated .protobuf_unittest.ForeignMessage RepeatedMessageField = 10;
  18864. for (unsigned int i = 0,
  18865. n = static_cast<unsigned int>(this->repeatedmessagefield_size()); i < n; i++) {
  18866. target = ::google::protobuf::internal::WireFormatLite::
  18867. InternalWriteMessageToArray(
  18868. 10, this->repeatedmessagefield(static_cast<int>(i)), deterministic, target);
  18869. }
  18870. // repeated string RepeatedStringPieceField = 11 [ctype = STRING_PIECE];
  18871. for (int i = 0, n = this->repeatedstringpiecefield_size(); i < n; i++) {
  18872. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18873. this->repeatedstringpiecefield(i).data(), static_cast<int>(this->repeatedstringpiecefield(i).length()),
  18874. ::google::protobuf::internal::WireFormat::SERIALIZE,
  18875. "protobuf_unittest.TestCamelCaseFieldNames.RepeatedStringPieceField");
  18876. target = ::google::protobuf::internal::WireFormatLite::
  18877. WriteStringToArray(11, this->repeatedstringpiecefield(i), target);
  18878. }
  18879. // repeated string RepeatedCordField = 12 [ctype = CORD];
  18880. for (int i = 0, n = this->repeatedcordfield_size(); i < n; i++) {
  18881. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  18882. this->repeatedcordfield(i).data(), static_cast<int>(this->repeatedcordfield(i).length()),
  18883. ::google::protobuf::internal::WireFormat::SERIALIZE,
  18884. "protobuf_unittest.TestCamelCaseFieldNames.RepeatedCordField");
  18885. target = ::google::protobuf::internal::WireFormatLite::
  18886. WriteStringToArray(12, this->repeatedcordfield(i), target);
  18887. }
  18888. if (_internal_metadata_.have_unknown_fields()) {
  18889. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  18890. _internal_metadata_.unknown_fields(), target);
  18891. }
  18892. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestCamelCaseFieldNames)
  18893. return target;
  18894. }
  18895. size_t TestCamelCaseFieldNames::ByteSizeLong() const {
  18896. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestCamelCaseFieldNames)
  18897. size_t total_size = 0;
  18898. if (_internal_metadata_.have_unknown_fields()) {
  18899. total_size +=
  18900. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  18901. _internal_metadata_.unknown_fields());
  18902. }
  18903. // repeated int32 RepeatedPrimitiveField = 7;
  18904. {
  18905. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  18906. Int32Size(this->repeatedprimitivefield_);
  18907. total_size += 1 *
  18908. ::google::protobuf::internal::FromIntSize(this->repeatedprimitivefield_size());
  18909. total_size += data_size;
  18910. }
  18911. // repeated string RepeatedStringField = 8;
  18912. total_size += 1 *
  18913. ::google::protobuf::internal::FromIntSize(this->repeatedstringfield_size());
  18914. for (int i = 0, n = this->repeatedstringfield_size(); i < n; i++) {
  18915. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  18916. this->repeatedstringfield(i));
  18917. }
  18918. // repeated .protobuf_unittest.ForeignEnum RepeatedEnumField = 9;
  18919. {
  18920. size_t data_size = 0;
  18921. unsigned int count = static_cast<unsigned int>(this->repeatedenumfield_size());for (unsigned int i = 0; i < count; i++) {
  18922. data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
  18923. this->repeatedenumfield(static_cast<int>(i)));
  18924. }
  18925. total_size += (1UL * count) + data_size;
  18926. }
  18927. // repeated .protobuf_unittest.ForeignMessage RepeatedMessageField = 10;
  18928. {
  18929. unsigned int count = static_cast<unsigned int>(this->repeatedmessagefield_size());
  18930. total_size += 1UL * count;
  18931. for (unsigned int i = 0; i < count; i++) {
  18932. total_size +=
  18933. ::google::protobuf::internal::WireFormatLite::MessageSize(
  18934. this->repeatedmessagefield(static_cast<int>(i)));
  18935. }
  18936. }
  18937. // repeated string RepeatedStringPieceField = 11 [ctype = STRING_PIECE];
  18938. total_size += 1 *
  18939. ::google::protobuf::internal::FromIntSize(this->repeatedstringpiecefield_size());
  18940. for (int i = 0, n = this->repeatedstringpiecefield_size(); i < n; i++) {
  18941. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  18942. this->repeatedstringpiecefield(i));
  18943. }
  18944. // repeated string RepeatedCordField = 12 [ctype = CORD];
  18945. total_size += 1 *
  18946. ::google::protobuf::internal::FromIntSize(this->repeatedcordfield_size());
  18947. for (int i = 0, n = this->repeatedcordfield_size(); i < n; i++) {
  18948. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  18949. this->repeatedcordfield(i));
  18950. }
  18951. if (_has_bits_[0 / 32] & 63u) {
  18952. // optional string StringField = 2;
  18953. if (has_stringfield()) {
  18954. total_size += 1 +
  18955. ::google::protobuf::internal::WireFormatLite::StringSize(
  18956. this->stringfield());
  18957. }
  18958. // optional string StringPieceField = 5 [ctype = STRING_PIECE];
  18959. if (has_stringpiecefield()) {
  18960. total_size += 1 +
  18961. ::google::protobuf::internal::WireFormatLite::StringSize(
  18962. this->stringpiecefield());
  18963. }
  18964. // optional string CordField = 6 [ctype = CORD];
  18965. if (has_cordfield()) {
  18966. total_size += 1 +
  18967. ::google::protobuf::internal::WireFormatLite::StringSize(
  18968. this->cordfield());
  18969. }
  18970. // optional .protobuf_unittest.ForeignMessage MessageField = 4;
  18971. if (has_messagefield()) {
  18972. total_size += 1 +
  18973. ::google::protobuf::internal::WireFormatLite::MessageSize(
  18974. *messagefield_);
  18975. }
  18976. // optional int32 PrimitiveField = 1;
  18977. if (has_primitivefield()) {
  18978. total_size += 1 +
  18979. ::google::protobuf::internal::WireFormatLite::Int32Size(
  18980. this->primitivefield());
  18981. }
  18982. // optional .protobuf_unittest.ForeignEnum EnumField = 3;
  18983. if (has_enumfield()) {
  18984. total_size += 1 +
  18985. ::google::protobuf::internal::WireFormatLite::EnumSize(this->enumfield());
  18986. }
  18987. }
  18988. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  18989. SetCachedSize(cached_size);
  18990. return total_size;
  18991. }
  18992. void TestCamelCaseFieldNames::MergeFrom(const ::google::protobuf::Message& from) {
  18993. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestCamelCaseFieldNames)
  18994. GOOGLE_DCHECK_NE(&from, this);
  18995. const TestCamelCaseFieldNames* source =
  18996. ::google::protobuf::internal::DynamicCastToGenerated<const TestCamelCaseFieldNames>(
  18997. &from);
  18998. if (source == NULL) {
  18999. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestCamelCaseFieldNames)
  19000. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  19001. } else {
  19002. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestCamelCaseFieldNames)
  19003. MergeFrom(*source);
  19004. }
  19005. }
  19006. void TestCamelCaseFieldNames::MergeFrom(const TestCamelCaseFieldNames& from) {
  19007. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestCamelCaseFieldNames)
  19008. GOOGLE_DCHECK_NE(&from, this);
  19009. _internal_metadata_.MergeFrom(from._internal_metadata_);
  19010. ::google::protobuf::uint32 cached_has_bits = 0;
  19011. (void) cached_has_bits;
  19012. repeatedprimitivefield_.MergeFrom(from.repeatedprimitivefield_);
  19013. repeatedstringfield_.MergeFrom(from.repeatedstringfield_);
  19014. repeatedenumfield_.MergeFrom(from.repeatedenumfield_);
  19015. repeatedmessagefield_.MergeFrom(from.repeatedmessagefield_);
  19016. repeatedstringpiecefield_.MergeFrom(from.repeatedstringpiecefield_);
  19017. repeatedcordfield_.MergeFrom(from.repeatedcordfield_);
  19018. cached_has_bits = from._has_bits_[0];
  19019. if (cached_has_bits & 63u) {
  19020. if (cached_has_bits & 0x00000001u) {
  19021. set_stringfield(from.stringfield());
  19022. }
  19023. if (cached_has_bits & 0x00000002u) {
  19024. set_stringpiecefield(from.stringpiecefield());
  19025. }
  19026. if (cached_has_bits & 0x00000004u) {
  19027. set_cordfield(from.cordfield());
  19028. }
  19029. if (cached_has_bits & 0x00000008u) {
  19030. mutable_messagefield()->::protobuf_unittest::ForeignMessage::MergeFrom(from.messagefield());
  19031. }
  19032. if (cached_has_bits & 0x00000010u) {
  19033. primitivefield_ = from.primitivefield_;
  19034. }
  19035. if (cached_has_bits & 0x00000020u) {
  19036. enumfield_ = from.enumfield_;
  19037. }
  19038. _has_bits_[0] |= cached_has_bits;
  19039. }
  19040. }
  19041. void TestCamelCaseFieldNames::CopyFrom(const ::google::protobuf::Message& from) {
  19042. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestCamelCaseFieldNames)
  19043. if (&from == this) return;
  19044. Clear();
  19045. MergeFrom(from);
  19046. }
  19047. void TestCamelCaseFieldNames::CopyFrom(const TestCamelCaseFieldNames& from) {
  19048. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestCamelCaseFieldNames)
  19049. if (&from == this) return;
  19050. Clear();
  19051. MergeFrom(from);
  19052. }
  19053. bool TestCamelCaseFieldNames::IsInitialized() const {
  19054. return true;
  19055. }
  19056. void TestCamelCaseFieldNames::Swap(TestCamelCaseFieldNames* other) {
  19057. if (other == this) return;
  19058. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  19059. InternalSwap(other);
  19060. } else {
  19061. TestCamelCaseFieldNames* temp = New(GetArenaNoVirtual());
  19062. temp->MergeFrom(*other);
  19063. other->CopyFrom(*this);
  19064. InternalSwap(temp);
  19065. if (GetArenaNoVirtual() == NULL) {
  19066. delete temp;
  19067. }
  19068. }
  19069. }
  19070. void TestCamelCaseFieldNames::UnsafeArenaSwap(TestCamelCaseFieldNames* other) {
  19071. if (other == this) return;
  19072. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  19073. InternalSwap(other);
  19074. }
  19075. void TestCamelCaseFieldNames::InternalSwap(TestCamelCaseFieldNames* other) {
  19076. using std::swap;
  19077. repeatedprimitivefield_.InternalSwap(&other->repeatedprimitivefield_);
  19078. repeatedstringfield_.InternalSwap(CastToBase(&other->repeatedstringfield_));
  19079. repeatedenumfield_.InternalSwap(&other->repeatedenumfield_);
  19080. CastToBase(&repeatedmessagefield_)->InternalSwap(CastToBase(&other->repeatedmessagefield_));
  19081. repeatedstringpiecefield_.InternalSwap(CastToBase(&other->repeatedstringpiecefield_));
  19082. repeatedcordfield_.InternalSwap(CastToBase(&other->repeatedcordfield_));
  19083. stringfield_.Swap(&other->stringfield_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  19084. GetArenaNoVirtual());
  19085. stringpiecefield_.Swap(&other->stringpiecefield_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  19086. GetArenaNoVirtual());
  19087. cordfield_.Swap(&other->cordfield_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  19088. GetArenaNoVirtual());
  19089. swap(messagefield_, other->messagefield_);
  19090. swap(primitivefield_, other->primitivefield_);
  19091. swap(enumfield_, other->enumfield_);
  19092. swap(_has_bits_[0], other->_has_bits_[0]);
  19093. _internal_metadata_.Swap(&other->_internal_metadata_);
  19094. }
  19095. ::google::protobuf::Metadata TestCamelCaseFieldNames::GetMetadata() const {
  19096. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  19097. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  19098. }
  19099. // ===================================================================
  19100. void TestFieldOrderings_NestedMessage::InitAsDefaultInstance() {
  19101. }
  19102. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  19103. const int TestFieldOrderings_NestedMessage::kOoFieldNumber;
  19104. const int TestFieldOrderings_NestedMessage::kBbFieldNumber;
  19105. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  19106. TestFieldOrderings_NestedMessage::TestFieldOrderings_NestedMessage()
  19107. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  19108. ::google::protobuf::internal::InitSCC(
  19109. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestFieldOrderings_NestedMessage.base);
  19110. SharedCtor();
  19111. // @@protoc_insertion_point(constructor:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19112. }
  19113. TestFieldOrderings_NestedMessage::TestFieldOrderings_NestedMessage(::google::protobuf::Arena* arena)
  19114. : ::google::protobuf::Message(),
  19115. _internal_metadata_(arena) {
  19116. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestFieldOrderings_NestedMessage.base);
  19117. SharedCtor();
  19118. RegisterArenaDtor(arena);
  19119. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19120. }
  19121. TestFieldOrderings_NestedMessage::TestFieldOrderings_NestedMessage(const TestFieldOrderings_NestedMessage& from)
  19122. : ::google::protobuf::Message(),
  19123. _internal_metadata_(NULL),
  19124. _has_bits_(from._has_bits_) {
  19125. _internal_metadata_.MergeFrom(from._internal_metadata_);
  19126. ::memcpy(&oo_, &from.oo_,
  19127. static_cast<size_t>(reinterpret_cast<char*>(&bb_) -
  19128. reinterpret_cast<char*>(&oo_)) + sizeof(bb_));
  19129. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19130. }
  19131. void TestFieldOrderings_NestedMessage::SharedCtor() {
  19132. ::memset(&oo_, 0, static_cast<size_t>(
  19133. reinterpret_cast<char*>(&bb_) -
  19134. reinterpret_cast<char*>(&oo_)) + sizeof(bb_));
  19135. }
  19136. TestFieldOrderings_NestedMessage::~TestFieldOrderings_NestedMessage() {
  19137. // @@protoc_insertion_point(destructor:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19138. SharedDtor();
  19139. }
  19140. void TestFieldOrderings_NestedMessage::SharedDtor() {
  19141. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  19142. }
  19143. void TestFieldOrderings_NestedMessage::ArenaDtor(void* object) {
  19144. TestFieldOrderings_NestedMessage* _this = reinterpret_cast< TestFieldOrderings_NestedMessage* >(object);
  19145. (void)_this;
  19146. }
  19147. void TestFieldOrderings_NestedMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  19148. }
  19149. void TestFieldOrderings_NestedMessage::SetCachedSize(int size) const {
  19150. _cached_size_.Set(size);
  19151. }
  19152. const ::google::protobuf::Descriptor* TestFieldOrderings_NestedMessage::descriptor() {
  19153. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  19154. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  19155. }
  19156. const TestFieldOrderings_NestedMessage& TestFieldOrderings_NestedMessage::default_instance() {
  19157. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestFieldOrderings_NestedMessage.base);
  19158. return *internal_default_instance();
  19159. }
  19160. void TestFieldOrderings_NestedMessage::Clear() {
  19161. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19162. ::google::protobuf::uint32 cached_has_bits = 0;
  19163. // Prevent compiler warnings about cached_has_bits being unused
  19164. (void) cached_has_bits;
  19165. cached_has_bits = _has_bits_[0];
  19166. if (cached_has_bits & 3u) {
  19167. ::memset(&oo_, 0, static_cast<size_t>(
  19168. reinterpret_cast<char*>(&bb_) -
  19169. reinterpret_cast<char*>(&oo_)) + sizeof(bb_));
  19170. }
  19171. _has_bits_.Clear();
  19172. _internal_metadata_.Clear();
  19173. }
  19174. bool TestFieldOrderings_NestedMessage::MergePartialFromCodedStream(
  19175. ::google::protobuf::io::CodedInputStream* input) {
  19176. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  19177. ::google::protobuf::uint32 tag;
  19178. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19179. for (;;) {
  19180. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  19181. tag = p.first;
  19182. if (!p.second) goto handle_unusual;
  19183. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  19184. // optional int32 bb = 1;
  19185. case 1: {
  19186. if (static_cast< ::google::protobuf::uint8>(tag) ==
  19187. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  19188. set_has_bb();
  19189. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  19190. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  19191. input, &bb_)));
  19192. } else {
  19193. goto handle_unusual;
  19194. }
  19195. break;
  19196. }
  19197. // optional int64 oo = 2;
  19198. case 2: {
  19199. if (static_cast< ::google::protobuf::uint8>(tag) ==
  19200. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  19201. set_has_oo();
  19202. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  19203. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  19204. input, &oo_)));
  19205. } else {
  19206. goto handle_unusual;
  19207. }
  19208. break;
  19209. }
  19210. default: {
  19211. handle_unusual:
  19212. if (tag == 0) {
  19213. goto success;
  19214. }
  19215. DO_(::google::protobuf::internal::WireFormat::SkipField(
  19216. input, tag, _internal_metadata_.mutable_unknown_fields()));
  19217. break;
  19218. }
  19219. }
  19220. }
  19221. success:
  19222. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19223. return true;
  19224. failure:
  19225. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19226. return false;
  19227. #undef DO_
  19228. }
  19229. void TestFieldOrderings_NestedMessage::SerializeWithCachedSizes(
  19230. ::google::protobuf::io::CodedOutputStream* output) const {
  19231. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19232. ::google::protobuf::uint32 cached_has_bits = 0;
  19233. (void) cached_has_bits;
  19234. cached_has_bits = _has_bits_[0];
  19235. // optional int32 bb = 1;
  19236. if (cached_has_bits & 0x00000002u) {
  19237. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->bb(), output);
  19238. }
  19239. // optional int64 oo = 2;
  19240. if (cached_has_bits & 0x00000001u) {
  19241. ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->oo(), output);
  19242. }
  19243. if (_internal_metadata_.have_unknown_fields()) {
  19244. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  19245. _internal_metadata_.unknown_fields(), output);
  19246. }
  19247. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19248. }
  19249. ::google::protobuf::uint8* TestFieldOrderings_NestedMessage::InternalSerializeWithCachedSizesToArray(
  19250. bool deterministic, ::google::protobuf::uint8* target) const {
  19251. (void)deterministic; // Unused
  19252. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19253. ::google::protobuf::uint32 cached_has_bits = 0;
  19254. (void) cached_has_bits;
  19255. cached_has_bits = _has_bits_[0];
  19256. // optional int32 bb = 1;
  19257. if (cached_has_bits & 0x00000002u) {
  19258. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->bb(), target);
  19259. }
  19260. // optional int64 oo = 2;
  19261. if (cached_has_bits & 0x00000001u) {
  19262. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->oo(), target);
  19263. }
  19264. if (_internal_metadata_.have_unknown_fields()) {
  19265. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  19266. _internal_metadata_.unknown_fields(), target);
  19267. }
  19268. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19269. return target;
  19270. }
  19271. size_t TestFieldOrderings_NestedMessage::ByteSizeLong() const {
  19272. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19273. size_t total_size = 0;
  19274. if (_internal_metadata_.have_unknown_fields()) {
  19275. total_size +=
  19276. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  19277. _internal_metadata_.unknown_fields());
  19278. }
  19279. if (_has_bits_[0 / 32] & 3u) {
  19280. // optional int64 oo = 2;
  19281. if (has_oo()) {
  19282. total_size += 1 +
  19283. ::google::protobuf::internal::WireFormatLite::Int64Size(
  19284. this->oo());
  19285. }
  19286. // optional int32 bb = 1;
  19287. if (has_bb()) {
  19288. total_size += 1 +
  19289. ::google::protobuf::internal::WireFormatLite::Int32Size(
  19290. this->bb());
  19291. }
  19292. }
  19293. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  19294. SetCachedSize(cached_size);
  19295. return total_size;
  19296. }
  19297. void TestFieldOrderings_NestedMessage::MergeFrom(const ::google::protobuf::Message& from) {
  19298. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19299. GOOGLE_DCHECK_NE(&from, this);
  19300. const TestFieldOrderings_NestedMessage* source =
  19301. ::google::protobuf::internal::DynamicCastToGenerated<const TestFieldOrderings_NestedMessage>(
  19302. &from);
  19303. if (source == NULL) {
  19304. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19305. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  19306. } else {
  19307. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19308. MergeFrom(*source);
  19309. }
  19310. }
  19311. void TestFieldOrderings_NestedMessage::MergeFrom(const TestFieldOrderings_NestedMessage& from) {
  19312. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19313. GOOGLE_DCHECK_NE(&from, this);
  19314. _internal_metadata_.MergeFrom(from._internal_metadata_);
  19315. ::google::protobuf::uint32 cached_has_bits = 0;
  19316. (void) cached_has_bits;
  19317. cached_has_bits = from._has_bits_[0];
  19318. if (cached_has_bits & 3u) {
  19319. if (cached_has_bits & 0x00000001u) {
  19320. oo_ = from.oo_;
  19321. }
  19322. if (cached_has_bits & 0x00000002u) {
  19323. bb_ = from.bb_;
  19324. }
  19325. _has_bits_[0] |= cached_has_bits;
  19326. }
  19327. }
  19328. void TestFieldOrderings_NestedMessage::CopyFrom(const ::google::protobuf::Message& from) {
  19329. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19330. if (&from == this) return;
  19331. Clear();
  19332. MergeFrom(from);
  19333. }
  19334. void TestFieldOrderings_NestedMessage::CopyFrom(const TestFieldOrderings_NestedMessage& from) {
  19335. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestFieldOrderings.NestedMessage)
  19336. if (&from == this) return;
  19337. Clear();
  19338. MergeFrom(from);
  19339. }
  19340. bool TestFieldOrderings_NestedMessage::IsInitialized() const {
  19341. return true;
  19342. }
  19343. void TestFieldOrderings_NestedMessage::Swap(TestFieldOrderings_NestedMessage* other) {
  19344. if (other == this) return;
  19345. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  19346. InternalSwap(other);
  19347. } else {
  19348. TestFieldOrderings_NestedMessage* temp = New(GetArenaNoVirtual());
  19349. temp->MergeFrom(*other);
  19350. other->CopyFrom(*this);
  19351. InternalSwap(temp);
  19352. if (GetArenaNoVirtual() == NULL) {
  19353. delete temp;
  19354. }
  19355. }
  19356. }
  19357. void TestFieldOrderings_NestedMessage::UnsafeArenaSwap(TestFieldOrderings_NestedMessage* other) {
  19358. if (other == this) return;
  19359. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  19360. InternalSwap(other);
  19361. }
  19362. void TestFieldOrderings_NestedMessage::InternalSwap(TestFieldOrderings_NestedMessage* other) {
  19363. using std::swap;
  19364. swap(oo_, other->oo_);
  19365. swap(bb_, other->bb_);
  19366. swap(_has_bits_[0], other->_has_bits_[0]);
  19367. _internal_metadata_.Swap(&other->_internal_metadata_);
  19368. }
  19369. ::google::protobuf::Metadata TestFieldOrderings_NestedMessage::GetMetadata() const {
  19370. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  19371. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  19372. }
  19373. // ===================================================================
  19374. void TestFieldOrderings::InitAsDefaultInstance() {
  19375. ::protobuf_unittest::_TestFieldOrderings_default_instance_._instance.get_mutable()->optional_nested_message_ = const_cast< ::protobuf_unittest::TestFieldOrderings_NestedMessage*>(
  19376. ::protobuf_unittest::TestFieldOrderings_NestedMessage::internal_default_instance());
  19377. }
  19378. void TestFieldOrderings::unsafe_arena_set_allocated_optional_nested_message(
  19379. ::protobuf_unittest::TestFieldOrderings_NestedMessage* optional_nested_message) {
  19380. if (GetArenaNoVirtual() == NULL) {
  19381. delete optional_nested_message_;
  19382. }
  19383. optional_nested_message_ = optional_nested_message;
  19384. if (optional_nested_message) {
  19385. set_has_optional_nested_message();
  19386. } else {
  19387. clear_has_optional_nested_message();
  19388. }
  19389. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestFieldOrderings.optional_nested_message)
  19390. }
  19391. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  19392. const int TestFieldOrderings::kMyStringFieldNumber;
  19393. const int TestFieldOrderings::kMyIntFieldNumber;
  19394. const int TestFieldOrderings::kMyFloatFieldNumber;
  19395. const int TestFieldOrderings::kOptionalNestedMessageFieldNumber;
  19396. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  19397. TestFieldOrderings::TestFieldOrderings()
  19398. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  19399. ::google::protobuf::internal::InitSCC(
  19400. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestFieldOrderings.base);
  19401. SharedCtor();
  19402. // @@protoc_insertion_point(constructor:protobuf_unittest.TestFieldOrderings)
  19403. }
  19404. TestFieldOrderings::TestFieldOrderings(::google::protobuf::Arena* arena)
  19405. : ::google::protobuf::Message(),
  19406. _extensions_(arena),
  19407. _internal_metadata_(arena) {
  19408. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestFieldOrderings.base);
  19409. SharedCtor();
  19410. RegisterArenaDtor(arena);
  19411. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestFieldOrderings)
  19412. }
  19413. TestFieldOrderings::TestFieldOrderings(const TestFieldOrderings& from)
  19414. : ::google::protobuf::Message(),
  19415. _internal_metadata_(NULL),
  19416. _has_bits_(from._has_bits_) {
  19417. _internal_metadata_.MergeFrom(from._internal_metadata_);
  19418. _extensions_.MergeFrom(from._extensions_);
  19419. my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  19420. if (from.has_my_string()) {
  19421. my_string_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.my_string(),
  19422. GetArenaNoVirtual());
  19423. }
  19424. if (from.has_optional_nested_message()) {
  19425. optional_nested_message_ = new ::protobuf_unittest::TestFieldOrderings_NestedMessage(*from.optional_nested_message_);
  19426. } else {
  19427. optional_nested_message_ = NULL;
  19428. }
  19429. ::memcpy(&my_int_, &from.my_int_,
  19430. static_cast<size_t>(reinterpret_cast<char*>(&my_float_) -
  19431. reinterpret_cast<char*>(&my_int_)) + sizeof(my_float_));
  19432. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestFieldOrderings)
  19433. }
  19434. void TestFieldOrderings::SharedCtor() {
  19435. my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  19436. ::memset(&optional_nested_message_, 0, static_cast<size_t>(
  19437. reinterpret_cast<char*>(&my_float_) -
  19438. reinterpret_cast<char*>(&optional_nested_message_)) + sizeof(my_float_));
  19439. }
  19440. TestFieldOrderings::~TestFieldOrderings() {
  19441. // @@protoc_insertion_point(destructor:protobuf_unittest.TestFieldOrderings)
  19442. SharedDtor();
  19443. }
  19444. void TestFieldOrderings::SharedDtor() {
  19445. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  19446. my_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  19447. if (this != internal_default_instance()) delete optional_nested_message_;
  19448. }
  19449. void TestFieldOrderings::ArenaDtor(void* object) {
  19450. TestFieldOrderings* _this = reinterpret_cast< TestFieldOrderings* >(object);
  19451. (void)_this;
  19452. }
  19453. void TestFieldOrderings::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  19454. }
  19455. void TestFieldOrderings::SetCachedSize(int size) const {
  19456. _cached_size_.Set(size);
  19457. }
  19458. const ::google::protobuf::Descriptor* TestFieldOrderings::descriptor() {
  19459. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  19460. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  19461. }
  19462. const TestFieldOrderings& TestFieldOrderings::default_instance() {
  19463. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestFieldOrderings.base);
  19464. return *internal_default_instance();
  19465. }
  19466. void TestFieldOrderings::Clear() {
  19467. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestFieldOrderings)
  19468. ::google::protobuf::uint32 cached_has_bits = 0;
  19469. // Prevent compiler warnings about cached_has_bits being unused
  19470. (void) cached_has_bits;
  19471. _extensions_.Clear();
  19472. cached_has_bits = _has_bits_[0];
  19473. if (cached_has_bits & 3u) {
  19474. if (cached_has_bits & 0x00000001u) {
  19475. my_string_.ClearNonDefaultToEmpty();
  19476. }
  19477. if (cached_has_bits & 0x00000002u) {
  19478. GOOGLE_DCHECK(optional_nested_message_ != NULL);
  19479. optional_nested_message_->Clear();
  19480. }
  19481. }
  19482. if (cached_has_bits & 12u) {
  19483. ::memset(&my_int_, 0, static_cast<size_t>(
  19484. reinterpret_cast<char*>(&my_float_) -
  19485. reinterpret_cast<char*>(&my_int_)) + sizeof(my_float_));
  19486. }
  19487. _has_bits_.Clear();
  19488. _internal_metadata_.Clear();
  19489. }
  19490. bool TestFieldOrderings::MergePartialFromCodedStream(
  19491. ::google::protobuf::io::CodedInputStream* input) {
  19492. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  19493. ::google::protobuf::uint32 tag;
  19494. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestFieldOrderings)
  19495. for (;;) {
  19496. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  19497. tag = p.first;
  19498. if (!p.second) goto handle_unusual;
  19499. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  19500. // optional int64 my_int = 1;
  19501. case 1: {
  19502. if (static_cast< ::google::protobuf::uint8>(tag) ==
  19503. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  19504. set_has_my_int();
  19505. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  19506. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  19507. input, &my_int_)));
  19508. } else {
  19509. goto handle_unusual;
  19510. }
  19511. break;
  19512. }
  19513. // optional string my_string = 11;
  19514. case 11: {
  19515. if (static_cast< ::google::protobuf::uint8>(tag) ==
  19516. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  19517. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  19518. input, this->mutable_my_string()));
  19519. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  19520. this->my_string().data(), static_cast<int>(this->my_string().length()),
  19521. ::google::protobuf::internal::WireFormat::PARSE,
  19522. "protobuf_unittest.TestFieldOrderings.my_string");
  19523. } else {
  19524. goto handle_unusual;
  19525. }
  19526. break;
  19527. }
  19528. // optional float my_float = 101;
  19529. case 101: {
  19530. if (static_cast< ::google::protobuf::uint8>(tag) ==
  19531. static_cast< ::google::protobuf::uint8>(45u /* 813 & 0xFF */)) {
  19532. set_has_my_float();
  19533. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  19534. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  19535. input, &my_float_)));
  19536. } else {
  19537. goto handle_unusual;
  19538. }
  19539. break;
  19540. }
  19541. // optional .protobuf_unittest.TestFieldOrderings.NestedMessage optional_nested_message = 200;
  19542. case 200: {
  19543. if (static_cast< ::google::protobuf::uint8>(tag) ==
  19544. static_cast< ::google::protobuf::uint8>(66u /* 1602 & 0xFF */)) {
  19545. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  19546. input, mutable_optional_nested_message()));
  19547. } else {
  19548. goto handle_unusual;
  19549. }
  19550. break;
  19551. }
  19552. default: {
  19553. handle_unusual:
  19554. if (tag == 0) {
  19555. goto success;
  19556. }
  19557. if ((16u <= tag && tag < 88u) ||
  19558. (96u <= tag && tag < 808u)) {
  19559. DO_(_extensions_.ParseField(tag, input,
  19560. internal_default_instance(),
  19561. _internal_metadata_.mutable_unknown_fields()));
  19562. continue;
  19563. }
  19564. DO_(::google::protobuf::internal::WireFormat::SkipField(
  19565. input, tag, _internal_metadata_.mutable_unknown_fields()));
  19566. break;
  19567. }
  19568. }
  19569. }
  19570. success:
  19571. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestFieldOrderings)
  19572. return true;
  19573. failure:
  19574. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestFieldOrderings)
  19575. return false;
  19576. #undef DO_
  19577. }
  19578. void TestFieldOrderings::SerializeWithCachedSizes(
  19579. ::google::protobuf::io::CodedOutputStream* output) const {
  19580. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestFieldOrderings)
  19581. ::google::protobuf::uint32 cached_has_bits = 0;
  19582. (void) cached_has_bits;
  19583. cached_has_bits = _has_bits_[0];
  19584. // optional int64 my_int = 1;
  19585. if (cached_has_bits & 0x00000004u) {
  19586. ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->my_int(), output);
  19587. }
  19588. // Extension range [2, 11)
  19589. _extensions_.SerializeWithCachedSizes(
  19590. 2, 11, output);
  19591. // optional string my_string = 11;
  19592. if (cached_has_bits & 0x00000001u) {
  19593. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  19594. this->my_string().data(), static_cast<int>(this->my_string().length()),
  19595. ::google::protobuf::internal::WireFormat::SERIALIZE,
  19596. "protobuf_unittest.TestFieldOrderings.my_string");
  19597. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  19598. 11, this->my_string(), output);
  19599. }
  19600. // Extension range [12, 101)
  19601. _extensions_.SerializeWithCachedSizes(
  19602. 12, 101, output);
  19603. // optional float my_float = 101;
  19604. if (cached_has_bits & 0x00000008u) {
  19605. ::google::protobuf::internal::WireFormatLite::WriteFloat(101, this->my_float(), output);
  19606. }
  19607. // optional .protobuf_unittest.TestFieldOrderings.NestedMessage optional_nested_message = 200;
  19608. if (cached_has_bits & 0x00000002u) {
  19609. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  19610. 200, this->_internal_optional_nested_message(), output);
  19611. }
  19612. if (_internal_metadata_.have_unknown_fields()) {
  19613. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  19614. _internal_metadata_.unknown_fields(), output);
  19615. }
  19616. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestFieldOrderings)
  19617. }
  19618. ::google::protobuf::uint8* TestFieldOrderings::InternalSerializeWithCachedSizesToArray(
  19619. bool deterministic, ::google::protobuf::uint8* target) const {
  19620. (void)deterministic; // Unused
  19621. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestFieldOrderings)
  19622. ::google::protobuf::uint32 cached_has_bits = 0;
  19623. (void) cached_has_bits;
  19624. cached_has_bits = _has_bits_[0];
  19625. // optional int64 my_int = 1;
  19626. if (cached_has_bits & 0x00000004u) {
  19627. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->my_int(), target);
  19628. }
  19629. // Extension range [2, 11)
  19630. target = _extensions_.InternalSerializeWithCachedSizesToArray(
  19631. 2, 11, deterministic, target);
  19632. // optional string my_string = 11;
  19633. if (cached_has_bits & 0x00000001u) {
  19634. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  19635. this->my_string().data(), static_cast<int>(this->my_string().length()),
  19636. ::google::protobuf::internal::WireFormat::SERIALIZE,
  19637. "protobuf_unittest.TestFieldOrderings.my_string");
  19638. target =
  19639. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  19640. 11, this->my_string(), target);
  19641. }
  19642. // Extension range [12, 101)
  19643. target = _extensions_.InternalSerializeWithCachedSizesToArray(
  19644. 12, 101, deterministic, target);
  19645. // optional float my_float = 101;
  19646. if (cached_has_bits & 0x00000008u) {
  19647. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(101, this->my_float(), target);
  19648. }
  19649. // optional .protobuf_unittest.TestFieldOrderings.NestedMessage optional_nested_message = 200;
  19650. if (cached_has_bits & 0x00000002u) {
  19651. target = ::google::protobuf::internal::WireFormatLite::
  19652. InternalWriteMessageToArray(
  19653. 200, this->_internal_optional_nested_message(), deterministic, target);
  19654. }
  19655. if (_internal_metadata_.have_unknown_fields()) {
  19656. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  19657. _internal_metadata_.unknown_fields(), target);
  19658. }
  19659. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestFieldOrderings)
  19660. return target;
  19661. }
  19662. size_t TestFieldOrderings::ByteSizeLong() const {
  19663. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestFieldOrderings)
  19664. size_t total_size = 0;
  19665. total_size += _extensions_.ByteSize();
  19666. if (_internal_metadata_.have_unknown_fields()) {
  19667. total_size +=
  19668. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  19669. _internal_metadata_.unknown_fields());
  19670. }
  19671. if (_has_bits_[0 / 32] & 15u) {
  19672. // optional string my_string = 11;
  19673. if (has_my_string()) {
  19674. total_size += 1 +
  19675. ::google::protobuf::internal::WireFormatLite::StringSize(
  19676. this->my_string());
  19677. }
  19678. // optional .protobuf_unittest.TestFieldOrderings.NestedMessage optional_nested_message = 200;
  19679. if (has_optional_nested_message()) {
  19680. total_size += 2 +
  19681. ::google::protobuf::internal::WireFormatLite::MessageSize(
  19682. *optional_nested_message_);
  19683. }
  19684. // optional int64 my_int = 1;
  19685. if (has_my_int()) {
  19686. total_size += 1 +
  19687. ::google::protobuf::internal::WireFormatLite::Int64Size(
  19688. this->my_int());
  19689. }
  19690. // optional float my_float = 101;
  19691. if (has_my_float()) {
  19692. total_size += 2 + 4;
  19693. }
  19694. }
  19695. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  19696. SetCachedSize(cached_size);
  19697. return total_size;
  19698. }
  19699. void TestFieldOrderings::MergeFrom(const ::google::protobuf::Message& from) {
  19700. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestFieldOrderings)
  19701. GOOGLE_DCHECK_NE(&from, this);
  19702. const TestFieldOrderings* source =
  19703. ::google::protobuf::internal::DynamicCastToGenerated<const TestFieldOrderings>(
  19704. &from);
  19705. if (source == NULL) {
  19706. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestFieldOrderings)
  19707. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  19708. } else {
  19709. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestFieldOrderings)
  19710. MergeFrom(*source);
  19711. }
  19712. }
  19713. void TestFieldOrderings::MergeFrom(const TestFieldOrderings& from) {
  19714. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestFieldOrderings)
  19715. GOOGLE_DCHECK_NE(&from, this);
  19716. _extensions_.MergeFrom(from._extensions_);
  19717. _internal_metadata_.MergeFrom(from._internal_metadata_);
  19718. ::google::protobuf::uint32 cached_has_bits = 0;
  19719. (void) cached_has_bits;
  19720. cached_has_bits = from._has_bits_[0];
  19721. if (cached_has_bits & 15u) {
  19722. if (cached_has_bits & 0x00000001u) {
  19723. set_my_string(from.my_string());
  19724. }
  19725. if (cached_has_bits & 0x00000002u) {
  19726. mutable_optional_nested_message()->::protobuf_unittest::TestFieldOrderings_NestedMessage::MergeFrom(from.optional_nested_message());
  19727. }
  19728. if (cached_has_bits & 0x00000004u) {
  19729. my_int_ = from.my_int_;
  19730. }
  19731. if (cached_has_bits & 0x00000008u) {
  19732. my_float_ = from.my_float_;
  19733. }
  19734. _has_bits_[0] |= cached_has_bits;
  19735. }
  19736. }
  19737. void TestFieldOrderings::CopyFrom(const ::google::protobuf::Message& from) {
  19738. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestFieldOrderings)
  19739. if (&from == this) return;
  19740. Clear();
  19741. MergeFrom(from);
  19742. }
  19743. void TestFieldOrderings::CopyFrom(const TestFieldOrderings& from) {
  19744. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestFieldOrderings)
  19745. if (&from == this) return;
  19746. Clear();
  19747. MergeFrom(from);
  19748. }
  19749. bool TestFieldOrderings::IsInitialized() const {
  19750. if (!_extensions_.IsInitialized()) {
  19751. return false;
  19752. }
  19753. return true;
  19754. }
  19755. void TestFieldOrderings::Swap(TestFieldOrderings* other) {
  19756. if (other == this) return;
  19757. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  19758. InternalSwap(other);
  19759. } else {
  19760. TestFieldOrderings* temp = New(GetArenaNoVirtual());
  19761. temp->MergeFrom(*other);
  19762. other->CopyFrom(*this);
  19763. InternalSwap(temp);
  19764. if (GetArenaNoVirtual() == NULL) {
  19765. delete temp;
  19766. }
  19767. }
  19768. }
  19769. void TestFieldOrderings::UnsafeArenaSwap(TestFieldOrderings* other) {
  19770. if (other == this) return;
  19771. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  19772. InternalSwap(other);
  19773. }
  19774. void TestFieldOrderings::InternalSwap(TestFieldOrderings* other) {
  19775. using std::swap;
  19776. my_string_.Swap(&other->my_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  19777. GetArenaNoVirtual());
  19778. swap(optional_nested_message_, other->optional_nested_message_);
  19779. swap(my_int_, other->my_int_);
  19780. swap(my_float_, other->my_float_);
  19781. swap(_has_bits_[0], other->_has_bits_[0]);
  19782. _internal_metadata_.Swap(&other->_internal_metadata_);
  19783. _extensions_.Swap(&other->_extensions_);
  19784. }
  19785. ::google::protobuf::Metadata TestFieldOrderings::GetMetadata() const {
  19786. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  19787. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  19788. }
  19789. // ===================================================================
  19790. void TestExtensionOrderings1::InitAsDefaultInstance() {
  19791. }
  19792. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  19793. const int TestExtensionOrderings1::kMyStringFieldNumber;
  19794. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  19795. TestExtensionOrderings1::TestExtensionOrderings1()
  19796. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  19797. ::google::protobuf::internal::InitSCC(
  19798. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings1.base);
  19799. SharedCtor();
  19800. // @@protoc_insertion_point(constructor:protobuf_unittest.TestExtensionOrderings1)
  19801. }
  19802. TestExtensionOrderings1::TestExtensionOrderings1(::google::protobuf::Arena* arena)
  19803. : ::google::protobuf::Message(),
  19804. _internal_metadata_(arena) {
  19805. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings1.base);
  19806. SharedCtor();
  19807. RegisterArenaDtor(arena);
  19808. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestExtensionOrderings1)
  19809. }
  19810. TestExtensionOrderings1::TestExtensionOrderings1(const TestExtensionOrderings1& from)
  19811. : ::google::protobuf::Message(),
  19812. _internal_metadata_(NULL),
  19813. _has_bits_(from._has_bits_) {
  19814. _internal_metadata_.MergeFrom(from._internal_metadata_);
  19815. my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  19816. if (from.has_my_string()) {
  19817. my_string_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.my_string(),
  19818. GetArenaNoVirtual());
  19819. }
  19820. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestExtensionOrderings1)
  19821. }
  19822. void TestExtensionOrderings1::SharedCtor() {
  19823. my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  19824. }
  19825. TestExtensionOrderings1::~TestExtensionOrderings1() {
  19826. // @@protoc_insertion_point(destructor:protobuf_unittest.TestExtensionOrderings1)
  19827. SharedDtor();
  19828. }
  19829. void TestExtensionOrderings1::SharedDtor() {
  19830. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  19831. my_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  19832. }
  19833. void TestExtensionOrderings1::ArenaDtor(void* object) {
  19834. TestExtensionOrderings1* _this = reinterpret_cast< TestExtensionOrderings1* >(object);
  19835. (void)_this;
  19836. }
  19837. void TestExtensionOrderings1::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  19838. }
  19839. void TestExtensionOrderings1::SetCachedSize(int size) const {
  19840. _cached_size_.Set(size);
  19841. }
  19842. const ::google::protobuf::Descriptor* TestExtensionOrderings1::descriptor() {
  19843. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  19844. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  19845. }
  19846. const TestExtensionOrderings1& TestExtensionOrderings1::default_instance() {
  19847. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings1.base);
  19848. return *internal_default_instance();
  19849. }
  19850. void TestExtensionOrderings1::Clear() {
  19851. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestExtensionOrderings1)
  19852. ::google::protobuf::uint32 cached_has_bits = 0;
  19853. // Prevent compiler warnings about cached_has_bits being unused
  19854. (void) cached_has_bits;
  19855. cached_has_bits = _has_bits_[0];
  19856. if (cached_has_bits & 0x00000001u) {
  19857. my_string_.ClearNonDefaultToEmpty();
  19858. }
  19859. _has_bits_.Clear();
  19860. _internal_metadata_.Clear();
  19861. }
  19862. bool TestExtensionOrderings1::MergePartialFromCodedStream(
  19863. ::google::protobuf::io::CodedInputStream* input) {
  19864. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  19865. ::google::protobuf::uint32 tag;
  19866. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestExtensionOrderings1)
  19867. for (;;) {
  19868. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  19869. tag = p.first;
  19870. if (!p.second) goto handle_unusual;
  19871. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  19872. // optional string my_string = 1;
  19873. case 1: {
  19874. if (static_cast< ::google::protobuf::uint8>(tag) ==
  19875. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  19876. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  19877. input, this->mutable_my_string()));
  19878. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  19879. this->my_string().data(), static_cast<int>(this->my_string().length()),
  19880. ::google::protobuf::internal::WireFormat::PARSE,
  19881. "protobuf_unittest.TestExtensionOrderings1.my_string");
  19882. } else {
  19883. goto handle_unusual;
  19884. }
  19885. break;
  19886. }
  19887. default: {
  19888. handle_unusual:
  19889. if (tag == 0) {
  19890. goto success;
  19891. }
  19892. DO_(::google::protobuf::internal::WireFormat::SkipField(
  19893. input, tag, _internal_metadata_.mutable_unknown_fields()));
  19894. break;
  19895. }
  19896. }
  19897. }
  19898. success:
  19899. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestExtensionOrderings1)
  19900. return true;
  19901. failure:
  19902. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestExtensionOrderings1)
  19903. return false;
  19904. #undef DO_
  19905. }
  19906. void TestExtensionOrderings1::SerializeWithCachedSizes(
  19907. ::google::protobuf::io::CodedOutputStream* output) const {
  19908. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestExtensionOrderings1)
  19909. ::google::protobuf::uint32 cached_has_bits = 0;
  19910. (void) cached_has_bits;
  19911. cached_has_bits = _has_bits_[0];
  19912. // optional string my_string = 1;
  19913. if (cached_has_bits & 0x00000001u) {
  19914. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  19915. this->my_string().data(), static_cast<int>(this->my_string().length()),
  19916. ::google::protobuf::internal::WireFormat::SERIALIZE,
  19917. "protobuf_unittest.TestExtensionOrderings1.my_string");
  19918. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  19919. 1, this->my_string(), output);
  19920. }
  19921. if (_internal_metadata_.have_unknown_fields()) {
  19922. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  19923. _internal_metadata_.unknown_fields(), output);
  19924. }
  19925. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestExtensionOrderings1)
  19926. }
  19927. ::google::protobuf::uint8* TestExtensionOrderings1::InternalSerializeWithCachedSizesToArray(
  19928. bool deterministic, ::google::protobuf::uint8* target) const {
  19929. (void)deterministic; // Unused
  19930. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestExtensionOrderings1)
  19931. ::google::protobuf::uint32 cached_has_bits = 0;
  19932. (void) cached_has_bits;
  19933. cached_has_bits = _has_bits_[0];
  19934. // optional string my_string = 1;
  19935. if (cached_has_bits & 0x00000001u) {
  19936. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  19937. this->my_string().data(), static_cast<int>(this->my_string().length()),
  19938. ::google::protobuf::internal::WireFormat::SERIALIZE,
  19939. "protobuf_unittest.TestExtensionOrderings1.my_string");
  19940. target =
  19941. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  19942. 1, this->my_string(), target);
  19943. }
  19944. if (_internal_metadata_.have_unknown_fields()) {
  19945. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  19946. _internal_metadata_.unknown_fields(), target);
  19947. }
  19948. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestExtensionOrderings1)
  19949. return target;
  19950. }
  19951. size_t TestExtensionOrderings1::ByteSizeLong() const {
  19952. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestExtensionOrderings1)
  19953. size_t total_size = 0;
  19954. if (_internal_metadata_.have_unknown_fields()) {
  19955. total_size +=
  19956. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  19957. _internal_metadata_.unknown_fields());
  19958. }
  19959. // optional string my_string = 1;
  19960. if (has_my_string()) {
  19961. total_size += 1 +
  19962. ::google::protobuf::internal::WireFormatLite::StringSize(
  19963. this->my_string());
  19964. }
  19965. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  19966. SetCachedSize(cached_size);
  19967. return total_size;
  19968. }
  19969. void TestExtensionOrderings1::MergeFrom(const ::google::protobuf::Message& from) {
  19970. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestExtensionOrderings1)
  19971. GOOGLE_DCHECK_NE(&from, this);
  19972. const TestExtensionOrderings1* source =
  19973. ::google::protobuf::internal::DynamicCastToGenerated<const TestExtensionOrderings1>(
  19974. &from);
  19975. if (source == NULL) {
  19976. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestExtensionOrderings1)
  19977. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  19978. } else {
  19979. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestExtensionOrderings1)
  19980. MergeFrom(*source);
  19981. }
  19982. }
  19983. void TestExtensionOrderings1::MergeFrom(const TestExtensionOrderings1& from) {
  19984. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestExtensionOrderings1)
  19985. GOOGLE_DCHECK_NE(&from, this);
  19986. _internal_metadata_.MergeFrom(from._internal_metadata_);
  19987. ::google::protobuf::uint32 cached_has_bits = 0;
  19988. (void) cached_has_bits;
  19989. if (from.has_my_string()) {
  19990. set_my_string(from.my_string());
  19991. }
  19992. }
  19993. void TestExtensionOrderings1::CopyFrom(const ::google::protobuf::Message& from) {
  19994. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestExtensionOrderings1)
  19995. if (&from == this) return;
  19996. Clear();
  19997. MergeFrom(from);
  19998. }
  19999. void TestExtensionOrderings1::CopyFrom(const TestExtensionOrderings1& from) {
  20000. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestExtensionOrderings1)
  20001. if (&from == this) return;
  20002. Clear();
  20003. MergeFrom(from);
  20004. }
  20005. bool TestExtensionOrderings1::IsInitialized() const {
  20006. return true;
  20007. }
  20008. void TestExtensionOrderings1::Swap(TestExtensionOrderings1* other) {
  20009. if (other == this) return;
  20010. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  20011. InternalSwap(other);
  20012. } else {
  20013. TestExtensionOrderings1* temp = New(GetArenaNoVirtual());
  20014. temp->MergeFrom(*other);
  20015. other->CopyFrom(*this);
  20016. InternalSwap(temp);
  20017. if (GetArenaNoVirtual() == NULL) {
  20018. delete temp;
  20019. }
  20020. }
  20021. }
  20022. void TestExtensionOrderings1::UnsafeArenaSwap(TestExtensionOrderings1* other) {
  20023. if (other == this) return;
  20024. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  20025. InternalSwap(other);
  20026. }
  20027. void TestExtensionOrderings1::InternalSwap(TestExtensionOrderings1* other) {
  20028. using std::swap;
  20029. my_string_.Swap(&other->my_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  20030. GetArenaNoVirtual());
  20031. swap(_has_bits_[0], other->_has_bits_[0]);
  20032. _internal_metadata_.Swap(&other->_internal_metadata_);
  20033. }
  20034. ::google::protobuf::Metadata TestExtensionOrderings1::GetMetadata() const {
  20035. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  20036. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  20037. }
  20038. // ===================================================================
  20039. void TestExtensionOrderings2_TestExtensionOrderings3::InitAsDefaultInstance() {
  20040. }
  20041. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  20042. const int TestExtensionOrderings2_TestExtensionOrderings3::kMyStringFieldNumber;
  20043. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  20044. TestExtensionOrderings2_TestExtensionOrderings3::TestExtensionOrderings2_TestExtensionOrderings3()
  20045. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  20046. ::google::protobuf::internal::InitSCC(
  20047. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings2_TestExtensionOrderings3.base);
  20048. SharedCtor();
  20049. // @@protoc_insertion_point(constructor:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20050. }
  20051. TestExtensionOrderings2_TestExtensionOrderings3::TestExtensionOrderings2_TestExtensionOrderings3(::google::protobuf::Arena* arena)
  20052. : ::google::protobuf::Message(),
  20053. _internal_metadata_(arena) {
  20054. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings2_TestExtensionOrderings3.base);
  20055. SharedCtor();
  20056. RegisterArenaDtor(arena);
  20057. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20058. }
  20059. TestExtensionOrderings2_TestExtensionOrderings3::TestExtensionOrderings2_TestExtensionOrderings3(const TestExtensionOrderings2_TestExtensionOrderings3& from)
  20060. : ::google::protobuf::Message(),
  20061. _internal_metadata_(NULL),
  20062. _has_bits_(from._has_bits_) {
  20063. _internal_metadata_.MergeFrom(from._internal_metadata_);
  20064. my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  20065. if (from.has_my_string()) {
  20066. my_string_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.my_string(),
  20067. GetArenaNoVirtual());
  20068. }
  20069. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20070. }
  20071. void TestExtensionOrderings2_TestExtensionOrderings3::SharedCtor() {
  20072. my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  20073. }
  20074. TestExtensionOrderings2_TestExtensionOrderings3::~TestExtensionOrderings2_TestExtensionOrderings3() {
  20075. // @@protoc_insertion_point(destructor:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20076. SharedDtor();
  20077. }
  20078. void TestExtensionOrderings2_TestExtensionOrderings3::SharedDtor() {
  20079. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  20080. my_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  20081. }
  20082. void TestExtensionOrderings2_TestExtensionOrderings3::ArenaDtor(void* object) {
  20083. TestExtensionOrderings2_TestExtensionOrderings3* _this = reinterpret_cast< TestExtensionOrderings2_TestExtensionOrderings3* >(object);
  20084. (void)_this;
  20085. }
  20086. void TestExtensionOrderings2_TestExtensionOrderings3::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  20087. }
  20088. void TestExtensionOrderings2_TestExtensionOrderings3::SetCachedSize(int size) const {
  20089. _cached_size_.Set(size);
  20090. }
  20091. const ::google::protobuf::Descriptor* TestExtensionOrderings2_TestExtensionOrderings3::descriptor() {
  20092. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  20093. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  20094. }
  20095. const TestExtensionOrderings2_TestExtensionOrderings3& TestExtensionOrderings2_TestExtensionOrderings3::default_instance() {
  20096. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings2_TestExtensionOrderings3.base);
  20097. return *internal_default_instance();
  20098. }
  20099. void TestExtensionOrderings2_TestExtensionOrderings3::Clear() {
  20100. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20101. ::google::protobuf::uint32 cached_has_bits = 0;
  20102. // Prevent compiler warnings about cached_has_bits being unused
  20103. (void) cached_has_bits;
  20104. cached_has_bits = _has_bits_[0];
  20105. if (cached_has_bits & 0x00000001u) {
  20106. my_string_.ClearNonDefaultToEmpty();
  20107. }
  20108. _has_bits_.Clear();
  20109. _internal_metadata_.Clear();
  20110. }
  20111. bool TestExtensionOrderings2_TestExtensionOrderings3::MergePartialFromCodedStream(
  20112. ::google::protobuf::io::CodedInputStream* input) {
  20113. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  20114. ::google::protobuf::uint32 tag;
  20115. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20116. for (;;) {
  20117. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  20118. tag = p.first;
  20119. if (!p.second) goto handle_unusual;
  20120. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  20121. // optional string my_string = 1;
  20122. case 1: {
  20123. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20124. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  20125. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  20126. input, this->mutable_my_string()));
  20127. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  20128. this->my_string().data(), static_cast<int>(this->my_string().length()),
  20129. ::google::protobuf::internal::WireFormat::PARSE,
  20130. "protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3.my_string");
  20131. } else {
  20132. goto handle_unusual;
  20133. }
  20134. break;
  20135. }
  20136. default: {
  20137. handle_unusual:
  20138. if (tag == 0) {
  20139. goto success;
  20140. }
  20141. DO_(::google::protobuf::internal::WireFormat::SkipField(
  20142. input, tag, _internal_metadata_.mutable_unknown_fields()));
  20143. break;
  20144. }
  20145. }
  20146. }
  20147. success:
  20148. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20149. return true;
  20150. failure:
  20151. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20152. return false;
  20153. #undef DO_
  20154. }
  20155. void TestExtensionOrderings2_TestExtensionOrderings3::SerializeWithCachedSizes(
  20156. ::google::protobuf::io::CodedOutputStream* output) const {
  20157. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20158. ::google::protobuf::uint32 cached_has_bits = 0;
  20159. (void) cached_has_bits;
  20160. cached_has_bits = _has_bits_[0];
  20161. // optional string my_string = 1;
  20162. if (cached_has_bits & 0x00000001u) {
  20163. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  20164. this->my_string().data(), static_cast<int>(this->my_string().length()),
  20165. ::google::protobuf::internal::WireFormat::SERIALIZE,
  20166. "protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3.my_string");
  20167. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  20168. 1, this->my_string(), output);
  20169. }
  20170. if (_internal_metadata_.have_unknown_fields()) {
  20171. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  20172. _internal_metadata_.unknown_fields(), output);
  20173. }
  20174. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20175. }
  20176. ::google::protobuf::uint8* TestExtensionOrderings2_TestExtensionOrderings3::InternalSerializeWithCachedSizesToArray(
  20177. bool deterministic, ::google::protobuf::uint8* target) const {
  20178. (void)deterministic; // Unused
  20179. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20180. ::google::protobuf::uint32 cached_has_bits = 0;
  20181. (void) cached_has_bits;
  20182. cached_has_bits = _has_bits_[0];
  20183. // optional string my_string = 1;
  20184. if (cached_has_bits & 0x00000001u) {
  20185. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  20186. this->my_string().data(), static_cast<int>(this->my_string().length()),
  20187. ::google::protobuf::internal::WireFormat::SERIALIZE,
  20188. "protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3.my_string");
  20189. target =
  20190. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  20191. 1, this->my_string(), target);
  20192. }
  20193. if (_internal_metadata_.have_unknown_fields()) {
  20194. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  20195. _internal_metadata_.unknown_fields(), target);
  20196. }
  20197. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20198. return target;
  20199. }
  20200. size_t TestExtensionOrderings2_TestExtensionOrderings3::ByteSizeLong() const {
  20201. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20202. size_t total_size = 0;
  20203. if (_internal_metadata_.have_unknown_fields()) {
  20204. total_size +=
  20205. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  20206. _internal_metadata_.unknown_fields());
  20207. }
  20208. // optional string my_string = 1;
  20209. if (has_my_string()) {
  20210. total_size += 1 +
  20211. ::google::protobuf::internal::WireFormatLite::StringSize(
  20212. this->my_string());
  20213. }
  20214. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  20215. SetCachedSize(cached_size);
  20216. return total_size;
  20217. }
  20218. void TestExtensionOrderings2_TestExtensionOrderings3::MergeFrom(const ::google::protobuf::Message& from) {
  20219. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20220. GOOGLE_DCHECK_NE(&from, this);
  20221. const TestExtensionOrderings2_TestExtensionOrderings3* source =
  20222. ::google::protobuf::internal::DynamicCastToGenerated<const TestExtensionOrderings2_TestExtensionOrderings3>(
  20223. &from);
  20224. if (source == NULL) {
  20225. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20226. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  20227. } else {
  20228. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20229. MergeFrom(*source);
  20230. }
  20231. }
  20232. void TestExtensionOrderings2_TestExtensionOrderings3::MergeFrom(const TestExtensionOrderings2_TestExtensionOrderings3& from) {
  20233. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20234. GOOGLE_DCHECK_NE(&from, this);
  20235. _internal_metadata_.MergeFrom(from._internal_metadata_);
  20236. ::google::protobuf::uint32 cached_has_bits = 0;
  20237. (void) cached_has_bits;
  20238. if (from.has_my_string()) {
  20239. set_my_string(from.my_string());
  20240. }
  20241. }
  20242. void TestExtensionOrderings2_TestExtensionOrderings3::CopyFrom(const ::google::protobuf::Message& from) {
  20243. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20244. if (&from == this) return;
  20245. Clear();
  20246. MergeFrom(from);
  20247. }
  20248. void TestExtensionOrderings2_TestExtensionOrderings3::CopyFrom(const TestExtensionOrderings2_TestExtensionOrderings3& from) {
  20249. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestExtensionOrderings2.TestExtensionOrderings3)
  20250. if (&from == this) return;
  20251. Clear();
  20252. MergeFrom(from);
  20253. }
  20254. bool TestExtensionOrderings2_TestExtensionOrderings3::IsInitialized() const {
  20255. return true;
  20256. }
  20257. void TestExtensionOrderings2_TestExtensionOrderings3::Swap(TestExtensionOrderings2_TestExtensionOrderings3* other) {
  20258. if (other == this) return;
  20259. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  20260. InternalSwap(other);
  20261. } else {
  20262. TestExtensionOrderings2_TestExtensionOrderings3* temp = New(GetArenaNoVirtual());
  20263. temp->MergeFrom(*other);
  20264. other->CopyFrom(*this);
  20265. InternalSwap(temp);
  20266. if (GetArenaNoVirtual() == NULL) {
  20267. delete temp;
  20268. }
  20269. }
  20270. }
  20271. void TestExtensionOrderings2_TestExtensionOrderings3::UnsafeArenaSwap(TestExtensionOrderings2_TestExtensionOrderings3* other) {
  20272. if (other == this) return;
  20273. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  20274. InternalSwap(other);
  20275. }
  20276. void TestExtensionOrderings2_TestExtensionOrderings3::InternalSwap(TestExtensionOrderings2_TestExtensionOrderings3* other) {
  20277. using std::swap;
  20278. my_string_.Swap(&other->my_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  20279. GetArenaNoVirtual());
  20280. swap(_has_bits_[0], other->_has_bits_[0]);
  20281. _internal_metadata_.Swap(&other->_internal_metadata_);
  20282. }
  20283. ::google::protobuf::Metadata TestExtensionOrderings2_TestExtensionOrderings3::GetMetadata() const {
  20284. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  20285. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  20286. }
  20287. // ===================================================================
  20288. void TestExtensionOrderings2::InitAsDefaultInstance() {
  20289. }
  20290. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  20291. const int TestExtensionOrderings2::kMyStringFieldNumber;
  20292. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  20293. TestExtensionOrderings2::TestExtensionOrderings2()
  20294. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  20295. ::google::protobuf::internal::InitSCC(
  20296. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings2.base);
  20297. SharedCtor();
  20298. // @@protoc_insertion_point(constructor:protobuf_unittest.TestExtensionOrderings2)
  20299. }
  20300. TestExtensionOrderings2::TestExtensionOrderings2(::google::protobuf::Arena* arena)
  20301. : ::google::protobuf::Message(),
  20302. _internal_metadata_(arena) {
  20303. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings2.base);
  20304. SharedCtor();
  20305. RegisterArenaDtor(arena);
  20306. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestExtensionOrderings2)
  20307. }
  20308. TestExtensionOrderings2::TestExtensionOrderings2(const TestExtensionOrderings2& from)
  20309. : ::google::protobuf::Message(),
  20310. _internal_metadata_(NULL),
  20311. _has_bits_(from._has_bits_) {
  20312. _internal_metadata_.MergeFrom(from._internal_metadata_);
  20313. my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  20314. if (from.has_my_string()) {
  20315. my_string_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.my_string(),
  20316. GetArenaNoVirtual());
  20317. }
  20318. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestExtensionOrderings2)
  20319. }
  20320. void TestExtensionOrderings2::SharedCtor() {
  20321. my_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  20322. }
  20323. TestExtensionOrderings2::~TestExtensionOrderings2() {
  20324. // @@protoc_insertion_point(destructor:protobuf_unittest.TestExtensionOrderings2)
  20325. SharedDtor();
  20326. }
  20327. void TestExtensionOrderings2::SharedDtor() {
  20328. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  20329. my_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  20330. }
  20331. void TestExtensionOrderings2::ArenaDtor(void* object) {
  20332. TestExtensionOrderings2* _this = reinterpret_cast< TestExtensionOrderings2* >(object);
  20333. (void)_this;
  20334. }
  20335. void TestExtensionOrderings2::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  20336. }
  20337. void TestExtensionOrderings2::SetCachedSize(int size) const {
  20338. _cached_size_.Set(size);
  20339. }
  20340. const ::google::protobuf::Descriptor* TestExtensionOrderings2::descriptor() {
  20341. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  20342. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  20343. }
  20344. const TestExtensionOrderings2& TestExtensionOrderings2::default_instance() {
  20345. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionOrderings2.base);
  20346. return *internal_default_instance();
  20347. }
  20348. void TestExtensionOrderings2::Clear() {
  20349. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestExtensionOrderings2)
  20350. ::google::protobuf::uint32 cached_has_bits = 0;
  20351. // Prevent compiler warnings about cached_has_bits being unused
  20352. (void) cached_has_bits;
  20353. cached_has_bits = _has_bits_[0];
  20354. if (cached_has_bits & 0x00000001u) {
  20355. my_string_.ClearNonDefaultToEmpty();
  20356. }
  20357. _has_bits_.Clear();
  20358. _internal_metadata_.Clear();
  20359. }
  20360. bool TestExtensionOrderings2::MergePartialFromCodedStream(
  20361. ::google::protobuf::io::CodedInputStream* input) {
  20362. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  20363. ::google::protobuf::uint32 tag;
  20364. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestExtensionOrderings2)
  20365. for (;;) {
  20366. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  20367. tag = p.first;
  20368. if (!p.second) goto handle_unusual;
  20369. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  20370. // optional string my_string = 1;
  20371. case 1: {
  20372. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20373. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  20374. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  20375. input, this->mutable_my_string()));
  20376. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  20377. this->my_string().data(), static_cast<int>(this->my_string().length()),
  20378. ::google::protobuf::internal::WireFormat::PARSE,
  20379. "protobuf_unittest.TestExtensionOrderings2.my_string");
  20380. } else {
  20381. goto handle_unusual;
  20382. }
  20383. break;
  20384. }
  20385. default: {
  20386. handle_unusual:
  20387. if (tag == 0) {
  20388. goto success;
  20389. }
  20390. DO_(::google::protobuf::internal::WireFormat::SkipField(
  20391. input, tag, _internal_metadata_.mutable_unknown_fields()));
  20392. break;
  20393. }
  20394. }
  20395. }
  20396. success:
  20397. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestExtensionOrderings2)
  20398. return true;
  20399. failure:
  20400. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestExtensionOrderings2)
  20401. return false;
  20402. #undef DO_
  20403. }
  20404. void TestExtensionOrderings2::SerializeWithCachedSizes(
  20405. ::google::protobuf::io::CodedOutputStream* output) const {
  20406. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestExtensionOrderings2)
  20407. ::google::protobuf::uint32 cached_has_bits = 0;
  20408. (void) cached_has_bits;
  20409. cached_has_bits = _has_bits_[0];
  20410. // optional string my_string = 1;
  20411. if (cached_has_bits & 0x00000001u) {
  20412. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  20413. this->my_string().data(), static_cast<int>(this->my_string().length()),
  20414. ::google::protobuf::internal::WireFormat::SERIALIZE,
  20415. "protobuf_unittest.TestExtensionOrderings2.my_string");
  20416. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  20417. 1, this->my_string(), output);
  20418. }
  20419. if (_internal_metadata_.have_unknown_fields()) {
  20420. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  20421. _internal_metadata_.unknown_fields(), output);
  20422. }
  20423. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestExtensionOrderings2)
  20424. }
  20425. ::google::protobuf::uint8* TestExtensionOrderings2::InternalSerializeWithCachedSizesToArray(
  20426. bool deterministic, ::google::protobuf::uint8* target) const {
  20427. (void)deterministic; // Unused
  20428. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestExtensionOrderings2)
  20429. ::google::protobuf::uint32 cached_has_bits = 0;
  20430. (void) cached_has_bits;
  20431. cached_has_bits = _has_bits_[0];
  20432. // optional string my_string = 1;
  20433. if (cached_has_bits & 0x00000001u) {
  20434. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  20435. this->my_string().data(), static_cast<int>(this->my_string().length()),
  20436. ::google::protobuf::internal::WireFormat::SERIALIZE,
  20437. "protobuf_unittest.TestExtensionOrderings2.my_string");
  20438. target =
  20439. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  20440. 1, this->my_string(), target);
  20441. }
  20442. if (_internal_metadata_.have_unknown_fields()) {
  20443. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  20444. _internal_metadata_.unknown_fields(), target);
  20445. }
  20446. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestExtensionOrderings2)
  20447. return target;
  20448. }
  20449. size_t TestExtensionOrderings2::ByteSizeLong() const {
  20450. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestExtensionOrderings2)
  20451. size_t total_size = 0;
  20452. if (_internal_metadata_.have_unknown_fields()) {
  20453. total_size +=
  20454. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  20455. _internal_metadata_.unknown_fields());
  20456. }
  20457. // optional string my_string = 1;
  20458. if (has_my_string()) {
  20459. total_size += 1 +
  20460. ::google::protobuf::internal::WireFormatLite::StringSize(
  20461. this->my_string());
  20462. }
  20463. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  20464. SetCachedSize(cached_size);
  20465. return total_size;
  20466. }
  20467. void TestExtensionOrderings2::MergeFrom(const ::google::protobuf::Message& from) {
  20468. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestExtensionOrderings2)
  20469. GOOGLE_DCHECK_NE(&from, this);
  20470. const TestExtensionOrderings2* source =
  20471. ::google::protobuf::internal::DynamicCastToGenerated<const TestExtensionOrderings2>(
  20472. &from);
  20473. if (source == NULL) {
  20474. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestExtensionOrderings2)
  20475. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  20476. } else {
  20477. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestExtensionOrderings2)
  20478. MergeFrom(*source);
  20479. }
  20480. }
  20481. void TestExtensionOrderings2::MergeFrom(const TestExtensionOrderings2& from) {
  20482. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestExtensionOrderings2)
  20483. GOOGLE_DCHECK_NE(&from, this);
  20484. _internal_metadata_.MergeFrom(from._internal_metadata_);
  20485. ::google::protobuf::uint32 cached_has_bits = 0;
  20486. (void) cached_has_bits;
  20487. if (from.has_my_string()) {
  20488. set_my_string(from.my_string());
  20489. }
  20490. }
  20491. void TestExtensionOrderings2::CopyFrom(const ::google::protobuf::Message& from) {
  20492. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestExtensionOrderings2)
  20493. if (&from == this) return;
  20494. Clear();
  20495. MergeFrom(from);
  20496. }
  20497. void TestExtensionOrderings2::CopyFrom(const TestExtensionOrderings2& from) {
  20498. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestExtensionOrderings2)
  20499. if (&from == this) return;
  20500. Clear();
  20501. MergeFrom(from);
  20502. }
  20503. bool TestExtensionOrderings2::IsInitialized() const {
  20504. return true;
  20505. }
  20506. void TestExtensionOrderings2::Swap(TestExtensionOrderings2* other) {
  20507. if (other == this) return;
  20508. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  20509. InternalSwap(other);
  20510. } else {
  20511. TestExtensionOrderings2* temp = New(GetArenaNoVirtual());
  20512. temp->MergeFrom(*other);
  20513. other->CopyFrom(*this);
  20514. InternalSwap(temp);
  20515. if (GetArenaNoVirtual() == NULL) {
  20516. delete temp;
  20517. }
  20518. }
  20519. }
  20520. void TestExtensionOrderings2::UnsafeArenaSwap(TestExtensionOrderings2* other) {
  20521. if (other == this) return;
  20522. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  20523. InternalSwap(other);
  20524. }
  20525. void TestExtensionOrderings2::InternalSwap(TestExtensionOrderings2* other) {
  20526. using std::swap;
  20527. my_string_.Swap(&other->my_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  20528. GetArenaNoVirtual());
  20529. swap(_has_bits_[0], other->_has_bits_[0]);
  20530. _internal_metadata_.Swap(&other->_internal_metadata_);
  20531. }
  20532. ::google::protobuf::Metadata TestExtensionOrderings2::GetMetadata() const {
  20533. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  20534. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  20535. }
  20536. // ===================================================================
  20537. void TestExtremeDefaultValues::InitAsDefaultInstance() {
  20538. }
  20539. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_;
  20540. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_;
  20541. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_;
  20542. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_;
  20543. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_;
  20544. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_;
  20545. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_;
  20546. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_;
  20547. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  20548. const int TestExtremeDefaultValues::kEscapedBytesFieldNumber;
  20549. const int TestExtremeDefaultValues::kLargeUint32FieldNumber;
  20550. const int TestExtremeDefaultValues::kLargeUint64FieldNumber;
  20551. const int TestExtremeDefaultValues::kSmallInt32FieldNumber;
  20552. const int TestExtremeDefaultValues::kSmallInt64FieldNumber;
  20553. const int TestExtremeDefaultValues::kReallySmallInt32FieldNumber;
  20554. const int TestExtremeDefaultValues::kReallySmallInt64FieldNumber;
  20555. const int TestExtremeDefaultValues::kUtf8StringFieldNumber;
  20556. const int TestExtremeDefaultValues::kZeroFloatFieldNumber;
  20557. const int TestExtremeDefaultValues::kOneFloatFieldNumber;
  20558. const int TestExtremeDefaultValues::kSmallFloatFieldNumber;
  20559. const int TestExtremeDefaultValues::kNegativeOneFloatFieldNumber;
  20560. const int TestExtremeDefaultValues::kNegativeFloatFieldNumber;
  20561. const int TestExtremeDefaultValues::kLargeFloatFieldNumber;
  20562. const int TestExtremeDefaultValues::kSmallNegativeFloatFieldNumber;
  20563. const int TestExtremeDefaultValues::kInfDoubleFieldNumber;
  20564. const int TestExtremeDefaultValues::kNegInfDoubleFieldNumber;
  20565. const int TestExtremeDefaultValues::kNanDoubleFieldNumber;
  20566. const int TestExtremeDefaultValues::kInfFloatFieldNumber;
  20567. const int TestExtremeDefaultValues::kNegInfFloatFieldNumber;
  20568. const int TestExtremeDefaultValues::kNanFloatFieldNumber;
  20569. const int TestExtremeDefaultValues::kCppTrigraphFieldNumber;
  20570. const int TestExtremeDefaultValues::kStringWithZeroFieldNumber;
  20571. const int TestExtremeDefaultValues::kBytesWithZeroFieldNumber;
  20572. const int TestExtremeDefaultValues::kStringPieceWithZeroFieldNumber;
  20573. const int TestExtremeDefaultValues::kCordWithZeroFieldNumber;
  20574. const int TestExtremeDefaultValues::kReplacementStringFieldNumber;
  20575. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  20576. TestExtremeDefaultValues::TestExtremeDefaultValues()
  20577. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  20578. ::google::protobuf::internal::InitSCC(
  20579. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtremeDefaultValues.base);
  20580. SharedCtor();
  20581. // @@protoc_insertion_point(constructor:protobuf_unittest.TestExtremeDefaultValues)
  20582. }
  20583. TestExtremeDefaultValues::TestExtremeDefaultValues(::google::protobuf::Arena* arena)
  20584. : ::google::protobuf::Message(),
  20585. _internal_metadata_(arena) {
  20586. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtremeDefaultValues.base);
  20587. SharedCtor();
  20588. RegisterArenaDtor(arena);
  20589. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestExtremeDefaultValues)
  20590. }
  20591. TestExtremeDefaultValues::TestExtremeDefaultValues(const TestExtremeDefaultValues& from)
  20592. : ::google::protobuf::Message(),
  20593. _internal_metadata_(NULL),
  20594. _has_bits_(from._has_bits_) {
  20595. _internal_metadata_.MergeFrom(from._internal_metadata_);
  20596. escaped_bytes_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get());
  20597. if (from.has_escaped_bytes()) {
  20598. escaped_bytes_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get(), from.escaped_bytes(),
  20599. GetArenaNoVirtual());
  20600. }
  20601. utf8_string_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get());
  20602. if (from.has_utf8_string()) {
  20603. utf8_string_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get(), from.utf8_string(),
  20604. GetArenaNoVirtual());
  20605. }
  20606. cpp_trigraph_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get());
  20607. if (from.has_cpp_trigraph()) {
  20608. cpp_trigraph_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get(), from.cpp_trigraph(),
  20609. GetArenaNoVirtual());
  20610. }
  20611. string_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get());
  20612. if (from.has_string_with_zero()) {
  20613. string_with_zero_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get(), from.string_with_zero(),
  20614. GetArenaNoVirtual());
  20615. }
  20616. bytes_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get());
  20617. if (from.has_bytes_with_zero()) {
  20618. bytes_with_zero_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get(), from.bytes_with_zero(),
  20619. GetArenaNoVirtual());
  20620. }
  20621. string_piece_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get());
  20622. if (from.has_string_piece_with_zero()) {
  20623. string_piece_with_zero_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get(), from.string_piece_with_zero(),
  20624. GetArenaNoVirtual());
  20625. }
  20626. cord_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get());
  20627. if (from.has_cord_with_zero()) {
  20628. cord_with_zero_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get(), from.cord_with_zero(),
  20629. GetArenaNoVirtual());
  20630. }
  20631. replacement_string_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get());
  20632. if (from.has_replacement_string()) {
  20633. replacement_string_.Set(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get(), from.replacement_string(),
  20634. GetArenaNoVirtual());
  20635. }
  20636. ::memcpy(&zero_float_, &from.zero_float_,
  20637. static_cast<size_t>(reinterpret_cast<char*>(&really_small_int64_) -
  20638. reinterpret_cast<char*>(&zero_float_)) + sizeof(really_small_int64_));
  20639. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestExtremeDefaultValues)
  20640. }
  20641. void TestExtremeDefaultValues::SharedCtor() {
  20642. escaped_bytes_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get());
  20643. utf8_string_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get());
  20644. cpp_trigraph_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get());
  20645. string_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get());
  20646. bytes_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get());
  20647. string_piece_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get());
  20648. cord_with_zero_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get());
  20649. replacement_string_.UnsafeSetDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get());
  20650. zero_float_ = 0;
  20651. large_uint64_ = GOOGLE_ULONGLONG(18446744073709551615);
  20652. large_uint32_ = 4294967295u;
  20653. small_int32_ = -2147483647;
  20654. small_int64_ = GOOGLE_LONGLONG(-9223372036854775807);
  20655. one_float_ = 1;
  20656. small_float_ = 1.5f;
  20657. negative_one_float_ = -1;
  20658. negative_float_ = -1.5f;
  20659. large_float_ = 2e+08f;
  20660. small_negative_float_ = -8e-28f;
  20661. inf_double_ = ::google::protobuf::internal::Infinity();
  20662. neg_inf_double_ = -::google::protobuf::internal::Infinity();
  20663. nan_double_ = ::google::protobuf::internal::NaN();
  20664. inf_float_ = static_cast<float>(::google::protobuf::internal::Infinity());
  20665. neg_inf_float_ = static_cast<float>(-::google::protobuf::internal::Infinity());
  20666. nan_float_ = static_cast<float>(::google::protobuf::internal::NaN());
  20667. really_small_int32_ = (~0x7fffffff);
  20668. really_small_int64_ = GOOGLE_LONGLONG(~0x7fffffffffffffff);
  20669. }
  20670. TestExtremeDefaultValues::~TestExtremeDefaultValues() {
  20671. // @@protoc_insertion_point(destructor:protobuf_unittest.TestExtremeDefaultValues)
  20672. SharedDtor();
  20673. }
  20674. void TestExtremeDefaultValues::SharedDtor() {
  20675. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  20676. escaped_bytes_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get());
  20677. utf8_string_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get());
  20678. cpp_trigraph_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get());
  20679. string_with_zero_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get());
  20680. bytes_with_zero_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get());
  20681. string_piece_with_zero_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get());
  20682. cord_with_zero_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get());
  20683. replacement_string_.DestroyNoArena(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get());
  20684. }
  20685. void TestExtremeDefaultValues::ArenaDtor(void* object) {
  20686. TestExtremeDefaultValues* _this = reinterpret_cast< TestExtremeDefaultValues* >(object);
  20687. (void)_this;
  20688. }
  20689. void TestExtremeDefaultValues::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  20690. }
  20691. void TestExtremeDefaultValues::SetCachedSize(int size) const {
  20692. _cached_size_.Set(size);
  20693. }
  20694. const ::google::protobuf::Descriptor* TestExtremeDefaultValues::descriptor() {
  20695. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  20696. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  20697. }
  20698. const TestExtremeDefaultValues& TestExtremeDefaultValues::default_instance() {
  20699. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtremeDefaultValues.base);
  20700. return *internal_default_instance();
  20701. }
  20702. void TestExtremeDefaultValues::Clear() {
  20703. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestExtremeDefaultValues)
  20704. ::google::protobuf::uint32 cached_has_bits = 0;
  20705. // Prevent compiler warnings about cached_has_bits being unused
  20706. (void) cached_has_bits;
  20707. cached_has_bits = _has_bits_[0];
  20708. if (cached_has_bits & 255u) {
  20709. if (cached_has_bits & 0x00000001u) {
  20710. escaped_bytes_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get(), GetArenaNoVirtual());
  20711. }
  20712. if (cached_has_bits & 0x00000002u) {
  20713. utf8_string_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get(), GetArenaNoVirtual());
  20714. }
  20715. if (cached_has_bits & 0x00000004u) {
  20716. cpp_trigraph_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get(), GetArenaNoVirtual());
  20717. }
  20718. if (cached_has_bits & 0x00000008u) {
  20719. string_with_zero_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get(), GetArenaNoVirtual());
  20720. }
  20721. if (cached_has_bits & 0x00000010u) {
  20722. bytes_with_zero_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get(), GetArenaNoVirtual());
  20723. }
  20724. if (cached_has_bits & 0x00000020u) {
  20725. string_piece_with_zero_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get(), GetArenaNoVirtual());
  20726. }
  20727. if (cached_has_bits & 0x00000040u) {
  20728. cord_with_zero_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get(), GetArenaNoVirtual());
  20729. }
  20730. if (cached_has_bits & 0x00000080u) {
  20731. replacement_string_.ClearToDefault(&::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get(), GetArenaNoVirtual());
  20732. }
  20733. }
  20734. if (cached_has_bits & 65280u) {
  20735. zero_float_ = 0;
  20736. large_uint64_ = GOOGLE_ULONGLONG(18446744073709551615);
  20737. large_uint32_ = 4294967295u;
  20738. small_int32_ = -2147483647;
  20739. small_int64_ = GOOGLE_LONGLONG(-9223372036854775807);
  20740. one_float_ = 1;
  20741. small_float_ = 1.5f;
  20742. negative_one_float_ = -1;
  20743. }
  20744. if (cached_has_bits & 16711680u) {
  20745. negative_float_ = -1.5f;
  20746. large_float_ = 2e+08f;
  20747. small_negative_float_ = -8e-28f;
  20748. inf_double_ = ::google::protobuf::internal::Infinity();
  20749. neg_inf_double_ = -::google::protobuf::internal::Infinity();
  20750. nan_double_ = ::google::protobuf::internal::NaN();
  20751. inf_float_ = static_cast<float>(::google::protobuf::internal::Infinity());
  20752. neg_inf_float_ = static_cast<float>(-::google::protobuf::internal::Infinity());
  20753. }
  20754. if (cached_has_bits & 117440512u) {
  20755. nan_float_ = static_cast<float>(::google::protobuf::internal::NaN());
  20756. really_small_int32_ = (~0x7fffffff);
  20757. really_small_int64_ = GOOGLE_LONGLONG(~0x7fffffffffffffff);
  20758. }
  20759. _has_bits_.Clear();
  20760. _internal_metadata_.Clear();
  20761. }
  20762. bool TestExtremeDefaultValues::MergePartialFromCodedStream(
  20763. ::google::protobuf::io::CodedInputStream* input) {
  20764. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  20765. ::google::protobuf::uint32 tag;
  20766. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestExtremeDefaultValues)
  20767. for (;;) {
  20768. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  20769. tag = p.first;
  20770. if (!p.second) goto handle_unusual;
  20771. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  20772. // optional bytes escaped_bytes = 1 [default = "\000\001\007\010\014\n\r\t\013\\\'\"\376"];
  20773. case 1: {
  20774. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20775. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  20776. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  20777. input, this->mutable_escaped_bytes()));
  20778. } else {
  20779. goto handle_unusual;
  20780. }
  20781. break;
  20782. }
  20783. // optional uint32 large_uint32 = 2 [default = 4294967295];
  20784. case 2: {
  20785. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20786. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  20787. set_has_large_uint32();
  20788. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20789. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  20790. input, &large_uint32_)));
  20791. } else {
  20792. goto handle_unusual;
  20793. }
  20794. break;
  20795. }
  20796. // optional uint64 large_uint64 = 3 [default = 18446744073709551615];
  20797. case 3: {
  20798. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20799. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  20800. set_has_large_uint64();
  20801. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20802. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  20803. input, &large_uint64_)));
  20804. } else {
  20805. goto handle_unusual;
  20806. }
  20807. break;
  20808. }
  20809. // optional int32 small_int32 = 4 [default = -2147483647];
  20810. case 4: {
  20811. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20812. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  20813. set_has_small_int32();
  20814. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20815. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  20816. input, &small_int32_)));
  20817. } else {
  20818. goto handle_unusual;
  20819. }
  20820. break;
  20821. }
  20822. // optional int64 small_int64 = 5 [default = -9223372036854775807];
  20823. case 5: {
  20824. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20825. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  20826. set_has_small_int64();
  20827. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20828. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  20829. input, &small_int64_)));
  20830. } else {
  20831. goto handle_unusual;
  20832. }
  20833. break;
  20834. }
  20835. // optional string utf8_string = 6 [default = "\341\210\264"];
  20836. case 6: {
  20837. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20838. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  20839. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  20840. input, this->mutable_utf8_string()));
  20841. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  20842. this->utf8_string().data(), static_cast<int>(this->utf8_string().length()),
  20843. ::google::protobuf::internal::WireFormat::PARSE,
  20844. "protobuf_unittest.TestExtremeDefaultValues.utf8_string");
  20845. } else {
  20846. goto handle_unusual;
  20847. }
  20848. break;
  20849. }
  20850. // optional float zero_float = 7 [default = 0];
  20851. case 7: {
  20852. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20853. static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
  20854. set_has_zero_float();
  20855. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20856. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  20857. input, &zero_float_)));
  20858. } else {
  20859. goto handle_unusual;
  20860. }
  20861. break;
  20862. }
  20863. // optional float one_float = 8 [default = 1];
  20864. case 8: {
  20865. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20866. static_cast< ::google::protobuf::uint8>(69u /* 69 & 0xFF */)) {
  20867. set_has_one_float();
  20868. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20869. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  20870. input, &one_float_)));
  20871. } else {
  20872. goto handle_unusual;
  20873. }
  20874. break;
  20875. }
  20876. // optional float small_float = 9 [default = 1.5];
  20877. case 9: {
  20878. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20879. static_cast< ::google::protobuf::uint8>(77u /* 77 & 0xFF */)) {
  20880. set_has_small_float();
  20881. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20882. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  20883. input, &small_float_)));
  20884. } else {
  20885. goto handle_unusual;
  20886. }
  20887. break;
  20888. }
  20889. // optional float negative_one_float = 10 [default = -1];
  20890. case 10: {
  20891. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20892. static_cast< ::google::protobuf::uint8>(85u /* 85 & 0xFF */)) {
  20893. set_has_negative_one_float();
  20894. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20895. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  20896. input, &negative_one_float_)));
  20897. } else {
  20898. goto handle_unusual;
  20899. }
  20900. break;
  20901. }
  20902. // optional float negative_float = 11 [default = -1.5];
  20903. case 11: {
  20904. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20905. static_cast< ::google::protobuf::uint8>(93u /* 93 & 0xFF */)) {
  20906. set_has_negative_float();
  20907. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20908. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  20909. input, &negative_float_)));
  20910. } else {
  20911. goto handle_unusual;
  20912. }
  20913. break;
  20914. }
  20915. // optional float large_float = 12 [default = 2e+08];
  20916. case 12: {
  20917. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20918. static_cast< ::google::protobuf::uint8>(101u /* 101 & 0xFF */)) {
  20919. set_has_large_float();
  20920. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20921. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  20922. input, &large_float_)));
  20923. } else {
  20924. goto handle_unusual;
  20925. }
  20926. break;
  20927. }
  20928. // optional float small_negative_float = 13 [default = -8e-28];
  20929. case 13: {
  20930. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20931. static_cast< ::google::protobuf::uint8>(109u /* 109 & 0xFF */)) {
  20932. set_has_small_negative_float();
  20933. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20934. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  20935. input, &small_negative_float_)));
  20936. } else {
  20937. goto handle_unusual;
  20938. }
  20939. break;
  20940. }
  20941. // optional double inf_double = 14 [default = inf];
  20942. case 14: {
  20943. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20944. static_cast< ::google::protobuf::uint8>(113u /* 113 & 0xFF */)) {
  20945. set_has_inf_double();
  20946. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20947. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  20948. input, &inf_double_)));
  20949. } else {
  20950. goto handle_unusual;
  20951. }
  20952. break;
  20953. }
  20954. // optional double neg_inf_double = 15 [default = -inf];
  20955. case 15: {
  20956. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20957. static_cast< ::google::protobuf::uint8>(121u /* 121 & 0xFF */)) {
  20958. set_has_neg_inf_double();
  20959. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20960. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  20961. input, &neg_inf_double_)));
  20962. } else {
  20963. goto handle_unusual;
  20964. }
  20965. break;
  20966. }
  20967. // optional double nan_double = 16 [default = nan];
  20968. case 16: {
  20969. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20970. static_cast< ::google::protobuf::uint8>(129u /* 129 & 0xFF */)) {
  20971. set_has_nan_double();
  20972. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20973. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  20974. input, &nan_double_)));
  20975. } else {
  20976. goto handle_unusual;
  20977. }
  20978. break;
  20979. }
  20980. // optional float inf_float = 17 [default = inf];
  20981. case 17: {
  20982. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20983. static_cast< ::google::protobuf::uint8>(141u /* 141 & 0xFF */)) {
  20984. set_has_inf_float();
  20985. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20986. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  20987. input, &inf_float_)));
  20988. } else {
  20989. goto handle_unusual;
  20990. }
  20991. break;
  20992. }
  20993. // optional float neg_inf_float = 18 [default = -inf];
  20994. case 18: {
  20995. if (static_cast< ::google::protobuf::uint8>(tag) ==
  20996. static_cast< ::google::protobuf::uint8>(149u /* 149 & 0xFF */)) {
  20997. set_has_neg_inf_float();
  20998. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  20999. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  21000. input, &neg_inf_float_)));
  21001. } else {
  21002. goto handle_unusual;
  21003. }
  21004. break;
  21005. }
  21006. // optional float nan_float = 19 [default = nan];
  21007. case 19: {
  21008. if (static_cast< ::google::protobuf::uint8>(tag) ==
  21009. static_cast< ::google::protobuf::uint8>(157u /* 157 & 0xFF */)) {
  21010. set_has_nan_float();
  21011. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  21012. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  21013. input, &nan_float_)));
  21014. } else {
  21015. goto handle_unusual;
  21016. }
  21017. break;
  21018. }
  21019. // optional string cpp_trigraph = 20 [default = "? ? ?? ?? ??? ??/ ??-"];
  21020. case 20: {
  21021. if (static_cast< ::google::protobuf::uint8>(tag) ==
  21022. static_cast< ::google::protobuf::uint8>(162u /* 162 & 0xFF */)) {
  21023. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  21024. input, this->mutable_cpp_trigraph()));
  21025. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21026. this->cpp_trigraph().data(), static_cast<int>(this->cpp_trigraph().length()),
  21027. ::google::protobuf::internal::WireFormat::PARSE,
  21028. "protobuf_unittest.TestExtremeDefaultValues.cpp_trigraph");
  21029. } else {
  21030. goto handle_unusual;
  21031. }
  21032. break;
  21033. }
  21034. // optional int32 really_small_int32 = 21 [default = -2147483648];
  21035. case 21: {
  21036. if (static_cast< ::google::protobuf::uint8>(tag) ==
  21037. static_cast< ::google::protobuf::uint8>(168u /* 168 & 0xFF */)) {
  21038. set_has_really_small_int32();
  21039. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  21040. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  21041. input, &really_small_int32_)));
  21042. } else {
  21043. goto handle_unusual;
  21044. }
  21045. break;
  21046. }
  21047. // optional int64 really_small_int64 = 22 [default = -9223372036854775808];
  21048. case 22: {
  21049. if (static_cast< ::google::protobuf::uint8>(tag) ==
  21050. static_cast< ::google::protobuf::uint8>(176u /* 176 & 0xFF */)) {
  21051. set_has_really_small_int64();
  21052. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  21053. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  21054. input, &really_small_int64_)));
  21055. } else {
  21056. goto handle_unusual;
  21057. }
  21058. break;
  21059. }
  21060. // optional string string_with_zero = 23 [default = "hel\000lo"];
  21061. case 23: {
  21062. if (static_cast< ::google::protobuf::uint8>(tag) ==
  21063. static_cast< ::google::protobuf::uint8>(186u /* 186 & 0xFF */)) {
  21064. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  21065. input, this->mutable_string_with_zero()));
  21066. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21067. this->string_with_zero().data(), static_cast<int>(this->string_with_zero().length()),
  21068. ::google::protobuf::internal::WireFormat::PARSE,
  21069. "protobuf_unittest.TestExtremeDefaultValues.string_with_zero");
  21070. } else {
  21071. goto handle_unusual;
  21072. }
  21073. break;
  21074. }
  21075. // optional bytes bytes_with_zero = 24 [default = "wor\000ld"];
  21076. case 24: {
  21077. if (static_cast< ::google::protobuf::uint8>(tag) ==
  21078. static_cast< ::google::protobuf::uint8>(194u /* 194 & 0xFF */)) {
  21079. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  21080. input, this->mutable_bytes_with_zero()));
  21081. } else {
  21082. goto handle_unusual;
  21083. }
  21084. break;
  21085. }
  21086. // optional string string_piece_with_zero = 25 [default = "ab\000c", ctype = STRING_PIECE];
  21087. case 25: {
  21088. if (static_cast< ::google::protobuf::uint8>(tag) ==
  21089. static_cast< ::google::protobuf::uint8>(202u /* 202 & 0xFF */)) {
  21090. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  21091. input, this->mutable_string_piece_with_zero()));
  21092. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21093. this->string_piece_with_zero().data(), static_cast<int>(this->string_piece_with_zero().length()),
  21094. ::google::protobuf::internal::WireFormat::PARSE,
  21095. "protobuf_unittest.TestExtremeDefaultValues.string_piece_with_zero");
  21096. } else {
  21097. goto handle_unusual;
  21098. }
  21099. break;
  21100. }
  21101. // optional string cord_with_zero = 26 [default = "12\0003", ctype = CORD];
  21102. case 26: {
  21103. if (static_cast< ::google::protobuf::uint8>(tag) ==
  21104. static_cast< ::google::protobuf::uint8>(210u /* 210 & 0xFF */)) {
  21105. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  21106. input, this->mutable_cord_with_zero()));
  21107. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21108. this->cord_with_zero().data(), static_cast<int>(this->cord_with_zero().length()),
  21109. ::google::protobuf::internal::WireFormat::PARSE,
  21110. "protobuf_unittest.TestExtremeDefaultValues.cord_with_zero");
  21111. } else {
  21112. goto handle_unusual;
  21113. }
  21114. break;
  21115. }
  21116. // optional string replacement_string = 27 [default = "${unknown}"];
  21117. case 27: {
  21118. if (static_cast< ::google::protobuf::uint8>(tag) ==
  21119. static_cast< ::google::protobuf::uint8>(218u /* 218 & 0xFF */)) {
  21120. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  21121. input, this->mutable_replacement_string()));
  21122. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21123. this->replacement_string().data(), static_cast<int>(this->replacement_string().length()),
  21124. ::google::protobuf::internal::WireFormat::PARSE,
  21125. "protobuf_unittest.TestExtremeDefaultValues.replacement_string");
  21126. } else {
  21127. goto handle_unusual;
  21128. }
  21129. break;
  21130. }
  21131. default: {
  21132. handle_unusual:
  21133. if (tag == 0) {
  21134. goto success;
  21135. }
  21136. DO_(::google::protobuf::internal::WireFormat::SkipField(
  21137. input, tag, _internal_metadata_.mutable_unknown_fields()));
  21138. break;
  21139. }
  21140. }
  21141. }
  21142. success:
  21143. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestExtremeDefaultValues)
  21144. return true;
  21145. failure:
  21146. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestExtremeDefaultValues)
  21147. return false;
  21148. #undef DO_
  21149. }
  21150. void TestExtremeDefaultValues::SerializeWithCachedSizes(
  21151. ::google::protobuf::io::CodedOutputStream* output) const {
  21152. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestExtremeDefaultValues)
  21153. ::google::protobuf::uint32 cached_has_bits = 0;
  21154. (void) cached_has_bits;
  21155. cached_has_bits = _has_bits_[0];
  21156. // optional bytes escaped_bytes = 1 [default = "\000\001\007\010\014\n\r\t\013\\\'\"\376"];
  21157. if (cached_has_bits & 0x00000001u) {
  21158. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  21159. 1, this->escaped_bytes(), output);
  21160. }
  21161. // optional uint32 large_uint32 = 2 [default = 4294967295];
  21162. if (cached_has_bits & 0x00000400u) {
  21163. ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->large_uint32(), output);
  21164. }
  21165. // optional uint64 large_uint64 = 3 [default = 18446744073709551615];
  21166. if (cached_has_bits & 0x00000200u) {
  21167. ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->large_uint64(), output);
  21168. }
  21169. // optional int32 small_int32 = 4 [default = -2147483647];
  21170. if (cached_has_bits & 0x00000800u) {
  21171. ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->small_int32(), output);
  21172. }
  21173. // optional int64 small_int64 = 5 [default = -9223372036854775807];
  21174. if (cached_has_bits & 0x00001000u) {
  21175. ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->small_int64(), output);
  21176. }
  21177. // optional string utf8_string = 6 [default = "\341\210\264"];
  21178. if (cached_has_bits & 0x00000002u) {
  21179. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21180. this->utf8_string().data(), static_cast<int>(this->utf8_string().length()),
  21181. ::google::protobuf::internal::WireFormat::SERIALIZE,
  21182. "protobuf_unittest.TestExtremeDefaultValues.utf8_string");
  21183. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  21184. 6, this->utf8_string(), output);
  21185. }
  21186. // optional float zero_float = 7 [default = 0];
  21187. if (cached_has_bits & 0x00000100u) {
  21188. ::google::protobuf::internal::WireFormatLite::WriteFloat(7, this->zero_float(), output);
  21189. }
  21190. // optional float one_float = 8 [default = 1];
  21191. if (cached_has_bits & 0x00002000u) {
  21192. ::google::protobuf::internal::WireFormatLite::WriteFloat(8, this->one_float(), output);
  21193. }
  21194. // optional float small_float = 9 [default = 1.5];
  21195. if (cached_has_bits & 0x00004000u) {
  21196. ::google::protobuf::internal::WireFormatLite::WriteFloat(9, this->small_float(), output);
  21197. }
  21198. // optional float negative_one_float = 10 [default = -1];
  21199. if (cached_has_bits & 0x00008000u) {
  21200. ::google::protobuf::internal::WireFormatLite::WriteFloat(10, this->negative_one_float(), output);
  21201. }
  21202. // optional float negative_float = 11 [default = -1.5];
  21203. if (cached_has_bits & 0x00010000u) {
  21204. ::google::protobuf::internal::WireFormatLite::WriteFloat(11, this->negative_float(), output);
  21205. }
  21206. // optional float large_float = 12 [default = 2e+08];
  21207. if (cached_has_bits & 0x00020000u) {
  21208. ::google::protobuf::internal::WireFormatLite::WriteFloat(12, this->large_float(), output);
  21209. }
  21210. // optional float small_negative_float = 13 [default = -8e-28];
  21211. if (cached_has_bits & 0x00040000u) {
  21212. ::google::protobuf::internal::WireFormatLite::WriteFloat(13, this->small_negative_float(), output);
  21213. }
  21214. // optional double inf_double = 14 [default = inf];
  21215. if (cached_has_bits & 0x00080000u) {
  21216. ::google::protobuf::internal::WireFormatLite::WriteDouble(14, this->inf_double(), output);
  21217. }
  21218. // optional double neg_inf_double = 15 [default = -inf];
  21219. if (cached_has_bits & 0x00100000u) {
  21220. ::google::protobuf::internal::WireFormatLite::WriteDouble(15, this->neg_inf_double(), output);
  21221. }
  21222. // optional double nan_double = 16 [default = nan];
  21223. if (cached_has_bits & 0x00200000u) {
  21224. ::google::protobuf::internal::WireFormatLite::WriteDouble(16, this->nan_double(), output);
  21225. }
  21226. // optional float inf_float = 17 [default = inf];
  21227. if (cached_has_bits & 0x00400000u) {
  21228. ::google::protobuf::internal::WireFormatLite::WriteFloat(17, this->inf_float(), output);
  21229. }
  21230. // optional float neg_inf_float = 18 [default = -inf];
  21231. if (cached_has_bits & 0x00800000u) {
  21232. ::google::protobuf::internal::WireFormatLite::WriteFloat(18, this->neg_inf_float(), output);
  21233. }
  21234. // optional float nan_float = 19 [default = nan];
  21235. if (cached_has_bits & 0x01000000u) {
  21236. ::google::protobuf::internal::WireFormatLite::WriteFloat(19, this->nan_float(), output);
  21237. }
  21238. // optional string cpp_trigraph = 20 [default = "? ? ?? ?? ??? ??/ ??-"];
  21239. if (cached_has_bits & 0x00000004u) {
  21240. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21241. this->cpp_trigraph().data(), static_cast<int>(this->cpp_trigraph().length()),
  21242. ::google::protobuf::internal::WireFormat::SERIALIZE,
  21243. "protobuf_unittest.TestExtremeDefaultValues.cpp_trigraph");
  21244. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  21245. 20, this->cpp_trigraph(), output);
  21246. }
  21247. // optional int32 really_small_int32 = 21 [default = -2147483648];
  21248. if (cached_has_bits & 0x02000000u) {
  21249. ::google::protobuf::internal::WireFormatLite::WriteInt32(21, this->really_small_int32(), output);
  21250. }
  21251. // optional int64 really_small_int64 = 22 [default = -9223372036854775808];
  21252. if (cached_has_bits & 0x04000000u) {
  21253. ::google::protobuf::internal::WireFormatLite::WriteInt64(22, this->really_small_int64(), output);
  21254. }
  21255. // optional string string_with_zero = 23 [default = "hel\000lo"];
  21256. if (cached_has_bits & 0x00000008u) {
  21257. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21258. this->string_with_zero().data(), static_cast<int>(this->string_with_zero().length()),
  21259. ::google::protobuf::internal::WireFormat::SERIALIZE,
  21260. "protobuf_unittest.TestExtremeDefaultValues.string_with_zero");
  21261. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  21262. 23, this->string_with_zero(), output);
  21263. }
  21264. // optional bytes bytes_with_zero = 24 [default = "wor\000ld"];
  21265. if (cached_has_bits & 0x00000010u) {
  21266. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  21267. 24, this->bytes_with_zero(), output);
  21268. }
  21269. // optional string string_piece_with_zero = 25 [default = "ab\000c", ctype = STRING_PIECE];
  21270. if (cached_has_bits & 0x00000020u) {
  21271. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21272. this->string_piece_with_zero().data(), static_cast<int>(this->string_piece_with_zero().length()),
  21273. ::google::protobuf::internal::WireFormat::SERIALIZE,
  21274. "protobuf_unittest.TestExtremeDefaultValues.string_piece_with_zero");
  21275. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  21276. 25, this->string_piece_with_zero(), output);
  21277. }
  21278. // optional string cord_with_zero = 26 [default = "12\0003", ctype = CORD];
  21279. if (cached_has_bits & 0x00000040u) {
  21280. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21281. this->cord_with_zero().data(), static_cast<int>(this->cord_with_zero().length()),
  21282. ::google::protobuf::internal::WireFormat::SERIALIZE,
  21283. "protobuf_unittest.TestExtremeDefaultValues.cord_with_zero");
  21284. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  21285. 26, this->cord_with_zero(), output);
  21286. }
  21287. // optional string replacement_string = 27 [default = "${unknown}"];
  21288. if (cached_has_bits & 0x00000080u) {
  21289. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21290. this->replacement_string().data(), static_cast<int>(this->replacement_string().length()),
  21291. ::google::protobuf::internal::WireFormat::SERIALIZE,
  21292. "protobuf_unittest.TestExtremeDefaultValues.replacement_string");
  21293. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  21294. 27, this->replacement_string(), output);
  21295. }
  21296. if (_internal_metadata_.have_unknown_fields()) {
  21297. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  21298. _internal_metadata_.unknown_fields(), output);
  21299. }
  21300. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestExtremeDefaultValues)
  21301. }
  21302. ::google::protobuf::uint8* TestExtremeDefaultValues::InternalSerializeWithCachedSizesToArray(
  21303. bool deterministic, ::google::protobuf::uint8* target) const {
  21304. (void)deterministic; // Unused
  21305. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestExtremeDefaultValues)
  21306. ::google::protobuf::uint32 cached_has_bits = 0;
  21307. (void) cached_has_bits;
  21308. cached_has_bits = _has_bits_[0];
  21309. // optional bytes escaped_bytes = 1 [default = "\000\001\007\010\014\n\r\t\013\\\'\"\376"];
  21310. if (cached_has_bits & 0x00000001u) {
  21311. target =
  21312. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  21313. 1, this->escaped_bytes(), target);
  21314. }
  21315. // optional uint32 large_uint32 = 2 [default = 4294967295];
  21316. if (cached_has_bits & 0x00000400u) {
  21317. target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->large_uint32(), target);
  21318. }
  21319. // optional uint64 large_uint64 = 3 [default = 18446744073709551615];
  21320. if (cached_has_bits & 0x00000200u) {
  21321. target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->large_uint64(), target);
  21322. }
  21323. // optional int32 small_int32 = 4 [default = -2147483647];
  21324. if (cached_has_bits & 0x00000800u) {
  21325. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->small_int32(), target);
  21326. }
  21327. // optional int64 small_int64 = 5 [default = -9223372036854775807];
  21328. if (cached_has_bits & 0x00001000u) {
  21329. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->small_int64(), target);
  21330. }
  21331. // optional string utf8_string = 6 [default = "\341\210\264"];
  21332. if (cached_has_bits & 0x00000002u) {
  21333. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21334. this->utf8_string().data(), static_cast<int>(this->utf8_string().length()),
  21335. ::google::protobuf::internal::WireFormat::SERIALIZE,
  21336. "protobuf_unittest.TestExtremeDefaultValues.utf8_string");
  21337. target =
  21338. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  21339. 6, this->utf8_string(), target);
  21340. }
  21341. // optional float zero_float = 7 [default = 0];
  21342. if (cached_has_bits & 0x00000100u) {
  21343. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(7, this->zero_float(), target);
  21344. }
  21345. // optional float one_float = 8 [default = 1];
  21346. if (cached_has_bits & 0x00002000u) {
  21347. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(8, this->one_float(), target);
  21348. }
  21349. // optional float small_float = 9 [default = 1.5];
  21350. if (cached_has_bits & 0x00004000u) {
  21351. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(9, this->small_float(), target);
  21352. }
  21353. // optional float negative_one_float = 10 [default = -1];
  21354. if (cached_has_bits & 0x00008000u) {
  21355. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(10, this->negative_one_float(), target);
  21356. }
  21357. // optional float negative_float = 11 [default = -1.5];
  21358. if (cached_has_bits & 0x00010000u) {
  21359. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(11, this->negative_float(), target);
  21360. }
  21361. // optional float large_float = 12 [default = 2e+08];
  21362. if (cached_has_bits & 0x00020000u) {
  21363. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(12, this->large_float(), target);
  21364. }
  21365. // optional float small_negative_float = 13 [default = -8e-28];
  21366. if (cached_has_bits & 0x00040000u) {
  21367. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(13, this->small_negative_float(), target);
  21368. }
  21369. // optional double inf_double = 14 [default = inf];
  21370. if (cached_has_bits & 0x00080000u) {
  21371. target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(14, this->inf_double(), target);
  21372. }
  21373. // optional double neg_inf_double = 15 [default = -inf];
  21374. if (cached_has_bits & 0x00100000u) {
  21375. target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(15, this->neg_inf_double(), target);
  21376. }
  21377. // optional double nan_double = 16 [default = nan];
  21378. if (cached_has_bits & 0x00200000u) {
  21379. target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(16, this->nan_double(), target);
  21380. }
  21381. // optional float inf_float = 17 [default = inf];
  21382. if (cached_has_bits & 0x00400000u) {
  21383. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(17, this->inf_float(), target);
  21384. }
  21385. // optional float neg_inf_float = 18 [default = -inf];
  21386. if (cached_has_bits & 0x00800000u) {
  21387. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(18, this->neg_inf_float(), target);
  21388. }
  21389. // optional float nan_float = 19 [default = nan];
  21390. if (cached_has_bits & 0x01000000u) {
  21391. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(19, this->nan_float(), target);
  21392. }
  21393. // optional string cpp_trigraph = 20 [default = "? ? ?? ?? ??? ??/ ??-"];
  21394. if (cached_has_bits & 0x00000004u) {
  21395. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21396. this->cpp_trigraph().data(), static_cast<int>(this->cpp_trigraph().length()),
  21397. ::google::protobuf::internal::WireFormat::SERIALIZE,
  21398. "protobuf_unittest.TestExtremeDefaultValues.cpp_trigraph");
  21399. target =
  21400. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  21401. 20, this->cpp_trigraph(), target);
  21402. }
  21403. // optional int32 really_small_int32 = 21 [default = -2147483648];
  21404. if (cached_has_bits & 0x02000000u) {
  21405. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(21, this->really_small_int32(), target);
  21406. }
  21407. // optional int64 really_small_int64 = 22 [default = -9223372036854775808];
  21408. if (cached_has_bits & 0x04000000u) {
  21409. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(22, this->really_small_int64(), target);
  21410. }
  21411. // optional string string_with_zero = 23 [default = "hel\000lo"];
  21412. if (cached_has_bits & 0x00000008u) {
  21413. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21414. this->string_with_zero().data(), static_cast<int>(this->string_with_zero().length()),
  21415. ::google::protobuf::internal::WireFormat::SERIALIZE,
  21416. "protobuf_unittest.TestExtremeDefaultValues.string_with_zero");
  21417. target =
  21418. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  21419. 23, this->string_with_zero(), target);
  21420. }
  21421. // optional bytes bytes_with_zero = 24 [default = "wor\000ld"];
  21422. if (cached_has_bits & 0x00000010u) {
  21423. target =
  21424. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  21425. 24, this->bytes_with_zero(), target);
  21426. }
  21427. // optional string string_piece_with_zero = 25 [default = "ab\000c", ctype = STRING_PIECE];
  21428. if (cached_has_bits & 0x00000020u) {
  21429. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21430. this->string_piece_with_zero().data(), static_cast<int>(this->string_piece_with_zero().length()),
  21431. ::google::protobuf::internal::WireFormat::SERIALIZE,
  21432. "protobuf_unittest.TestExtremeDefaultValues.string_piece_with_zero");
  21433. target =
  21434. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  21435. 25, this->string_piece_with_zero(), target);
  21436. }
  21437. // optional string cord_with_zero = 26 [default = "12\0003", ctype = CORD];
  21438. if (cached_has_bits & 0x00000040u) {
  21439. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21440. this->cord_with_zero().data(), static_cast<int>(this->cord_with_zero().length()),
  21441. ::google::protobuf::internal::WireFormat::SERIALIZE,
  21442. "protobuf_unittest.TestExtremeDefaultValues.cord_with_zero");
  21443. target =
  21444. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  21445. 26, this->cord_with_zero(), target);
  21446. }
  21447. // optional string replacement_string = 27 [default = "${unknown}"];
  21448. if (cached_has_bits & 0x00000080u) {
  21449. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  21450. this->replacement_string().data(), static_cast<int>(this->replacement_string().length()),
  21451. ::google::protobuf::internal::WireFormat::SERIALIZE,
  21452. "protobuf_unittest.TestExtremeDefaultValues.replacement_string");
  21453. target =
  21454. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  21455. 27, this->replacement_string(), target);
  21456. }
  21457. if (_internal_metadata_.have_unknown_fields()) {
  21458. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  21459. _internal_metadata_.unknown_fields(), target);
  21460. }
  21461. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestExtremeDefaultValues)
  21462. return target;
  21463. }
  21464. size_t TestExtremeDefaultValues::ByteSizeLong() const {
  21465. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestExtremeDefaultValues)
  21466. size_t total_size = 0;
  21467. if (_internal_metadata_.have_unknown_fields()) {
  21468. total_size +=
  21469. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  21470. _internal_metadata_.unknown_fields());
  21471. }
  21472. if (_has_bits_[0 / 32] & 255u) {
  21473. // optional bytes escaped_bytes = 1 [default = "\000\001\007\010\014\n\r\t\013\\\'\"\376"];
  21474. if (has_escaped_bytes()) {
  21475. total_size += 1 +
  21476. ::google::protobuf::internal::WireFormatLite::BytesSize(
  21477. this->escaped_bytes());
  21478. }
  21479. // optional string utf8_string = 6 [default = "\341\210\264"];
  21480. if (has_utf8_string()) {
  21481. total_size += 1 +
  21482. ::google::protobuf::internal::WireFormatLite::StringSize(
  21483. this->utf8_string());
  21484. }
  21485. // optional string cpp_trigraph = 20 [default = "? ? ?? ?? ??? ??/ ??-"];
  21486. if (has_cpp_trigraph()) {
  21487. total_size += 2 +
  21488. ::google::protobuf::internal::WireFormatLite::StringSize(
  21489. this->cpp_trigraph());
  21490. }
  21491. // optional string string_with_zero = 23 [default = "hel\000lo"];
  21492. if (has_string_with_zero()) {
  21493. total_size += 2 +
  21494. ::google::protobuf::internal::WireFormatLite::StringSize(
  21495. this->string_with_zero());
  21496. }
  21497. // optional bytes bytes_with_zero = 24 [default = "wor\000ld"];
  21498. if (has_bytes_with_zero()) {
  21499. total_size += 2 +
  21500. ::google::protobuf::internal::WireFormatLite::BytesSize(
  21501. this->bytes_with_zero());
  21502. }
  21503. // optional string string_piece_with_zero = 25 [default = "ab\000c", ctype = STRING_PIECE];
  21504. if (has_string_piece_with_zero()) {
  21505. total_size += 2 +
  21506. ::google::protobuf::internal::WireFormatLite::StringSize(
  21507. this->string_piece_with_zero());
  21508. }
  21509. // optional string cord_with_zero = 26 [default = "12\0003", ctype = CORD];
  21510. if (has_cord_with_zero()) {
  21511. total_size += 2 +
  21512. ::google::protobuf::internal::WireFormatLite::StringSize(
  21513. this->cord_with_zero());
  21514. }
  21515. // optional string replacement_string = 27 [default = "${unknown}"];
  21516. if (has_replacement_string()) {
  21517. total_size += 2 +
  21518. ::google::protobuf::internal::WireFormatLite::StringSize(
  21519. this->replacement_string());
  21520. }
  21521. }
  21522. if (_has_bits_[8 / 32] & 65280u) {
  21523. // optional float zero_float = 7 [default = 0];
  21524. if (has_zero_float()) {
  21525. total_size += 1 + 4;
  21526. }
  21527. // optional uint64 large_uint64 = 3 [default = 18446744073709551615];
  21528. if (has_large_uint64()) {
  21529. total_size += 1 +
  21530. ::google::protobuf::internal::WireFormatLite::UInt64Size(
  21531. this->large_uint64());
  21532. }
  21533. // optional uint32 large_uint32 = 2 [default = 4294967295];
  21534. if (has_large_uint32()) {
  21535. total_size += 1 +
  21536. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  21537. this->large_uint32());
  21538. }
  21539. // optional int32 small_int32 = 4 [default = -2147483647];
  21540. if (has_small_int32()) {
  21541. total_size += 1 +
  21542. ::google::protobuf::internal::WireFormatLite::Int32Size(
  21543. this->small_int32());
  21544. }
  21545. // optional int64 small_int64 = 5 [default = -9223372036854775807];
  21546. if (has_small_int64()) {
  21547. total_size += 1 +
  21548. ::google::protobuf::internal::WireFormatLite::Int64Size(
  21549. this->small_int64());
  21550. }
  21551. // optional float one_float = 8 [default = 1];
  21552. if (has_one_float()) {
  21553. total_size += 1 + 4;
  21554. }
  21555. // optional float small_float = 9 [default = 1.5];
  21556. if (has_small_float()) {
  21557. total_size += 1 + 4;
  21558. }
  21559. // optional float negative_one_float = 10 [default = -1];
  21560. if (has_negative_one_float()) {
  21561. total_size += 1 + 4;
  21562. }
  21563. }
  21564. if (_has_bits_[16 / 32] & 16711680u) {
  21565. // optional float negative_float = 11 [default = -1.5];
  21566. if (has_negative_float()) {
  21567. total_size += 1 + 4;
  21568. }
  21569. // optional float large_float = 12 [default = 2e+08];
  21570. if (has_large_float()) {
  21571. total_size += 1 + 4;
  21572. }
  21573. // optional float small_negative_float = 13 [default = -8e-28];
  21574. if (has_small_negative_float()) {
  21575. total_size += 1 + 4;
  21576. }
  21577. // optional double inf_double = 14 [default = inf];
  21578. if (has_inf_double()) {
  21579. total_size += 1 + 8;
  21580. }
  21581. // optional double neg_inf_double = 15 [default = -inf];
  21582. if (has_neg_inf_double()) {
  21583. total_size += 1 + 8;
  21584. }
  21585. // optional double nan_double = 16 [default = nan];
  21586. if (has_nan_double()) {
  21587. total_size += 2 + 8;
  21588. }
  21589. // optional float inf_float = 17 [default = inf];
  21590. if (has_inf_float()) {
  21591. total_size += 2 + 4;
  21592. }
  21593. // optional float neg_inf_float = 18 [default = -inf];
  21594. if (has_neg_inf_float()) {
  21595. total_size += 2 + 4;
  21596. }
  21597. }
  21598. if (_has_bits_[24 / 32] & 117440512u) {
  21599. // optional float nan_float = 19 [default = nan];
  21600. if (has_nan_float()) {
  21601. total_size += 2 + 4;
  21602. }
  21603. // optional int32 really_small_int32 = 21 [default = -2147483648];
  21604. if (has_really_small_int32()) {
  21605. total_size += 2 +
  21606. ::google::protobuf::internal::WireFormatLite::Int32Size(
  21607. this->really_small_int32());
  21608. }
  21609. // optional int64 really_small_int64 = 22 [default = -9223372036854775808];
  21610. if (has_really_small_int64()) {
  21611. total_size += 2 +
  21612. ::google::protobuf::internal::WireFormatLite::Int64Size(
  21613. this->really_small_int64());
  21614. }
  21615. }
  21616. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  21617. SetCachedSize(cached_size);
  21618. return total_size;
  21619. }
  21620. void TestExtremeDefaultValues::MergeFrom(const ::google::protobuf::Message& from) {
  21621. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestExtremeDefaultValues)
  21622. GOOGLE_DCHECK_NE(&from, this);
  21623. const TestExtremeDefaultValues* source =
  21624. ::google::protobuf::internal::DynamicCastToGenerated<const TestExtremeDefaultValues>(
  21625. &from);
  21626. if (source == NULL) {
  21627. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestExtremeDefaultValues)
  21628. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  21629. } else {
  21630. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestExtremeDefaultValues)
  21631. MergeFrom(*source);
  21632. }
  21633. }
  21634. void TestExtremeDefaultValues::MergeFrom(const TestExtremeDefaultValues& from) {
  21635. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestExtremeDefaultValues)
  21636. GOOGLE_DCHECK_NE(&from, this);
  21637. _internal_metadata_.MergeFrom(from._internal_metadata_);
  21638. ::google::protobuf::uint32 cached_has_bits = 0;
  21639. (void) cached_has_bits;
  21640. cached_has_bits = from._has_bits_[0];
  21641. if (cached_has_bits & 255u) {
  21642. if (cached_has_bits & 0x00000001u) {
  21643. set_escaped_bytes(from.escaped_bytes());
  21644. }
  21645. if (cached_has_bits & 0x00000002u) {
  21646. set_utf8_string(from.utf8_string());
  21647. }
  21648. if (cached_has_bits & 0x00000004u) {
  21649. set_cpp_trigraph(from.cpp_trigraph());
  21650. }
  21651. if (cached_has_bits & 0x00000008u) {
  21652. set_string_with_zero(from.string_with_zero());
  21653. }
  21654. if (cached_has_bits & 0x00000010u) {
  21655. set_bytes_with_zero(from.bytes_with_zero());
  21656. }
  21657. if (cached_has_bits & 0x00000020u) {
  21658. set_string_piece_with_zero(from.string_piece_with_zero());
  21659. }
  21660. if (cached_has_bits & 0x00000040u) {
  21661. set_cord_with_zero(from.cord_with_zero());
  21662. }
  21663. if (cached_has_bits & 0x00000080u) {
  21664. set_replacement_string(from.replacement_string());
  21665. }
  21666. }
  21667. if (cached_has_bits & 65280u) {
  21668. if (cached_has_bits & 0x00000100u) {
  21669. zero_float_ = from.zero_float_;
  21670. }
  21671. if (cached_has_bits & 0x00000200u) {
  21672. large_uint64_ = from.large_uint64_;
  21673. }
  21674. if (cached_has_bits & 0x00000400u) {
  21675. large_uint32_ = from.large_uint32_;
  21676. }
  21677. if (cached_has_bits & 0x00000800u) {
  21678. small_int32_ = from.small_int32_;
  21679. }
  21680. if (cached_has_bits & 0x00001000u) {
  21681. small_int64_ = from.small_int64_;
  21682. }
  21683. if (cached_has_bits & 0x00002000u) {
  21684. one_float_ = from.one_float_;
  21685. }
  21686. if (cached_has_bits & 0x00004000u) {
  21687. small_float_ = from.small_float_;
  21688. }
  21689. if (cached_has_bits & 0x00008000u) {
  21690. negative_one_float_ = from.negative_one_float_;
  21691. }
  21692. _has_bits_[0] |= cached_has_bits;
  21693. }
  21694. if (cached_has_bits & 16711680u) {
  21695. if (cached_has_bits & 0x00010000u) {
  21696. negative_float_ = from.negative_float_;
  21697. }
  21698. if (cached_has_bits & 0x00020000u) {
  21699. large_float_ = from.large_float_;
  21700. }
  21701. if (cached_has_bits & 0x00040000u) {
  21702. small_negative_float_ = from.small_negative_float_;
  21703. }
  21704. if (cached_has_bits & 0x00080000u) {
  21705. inf_double_ = from.inf_double_;
  21706. }
  21707. if (cached_has_bits & 0x00100000u) {
  21708. neg_inf_double_ = from.neg_inf_double_;
  21709. }
  21710. if (cached_has_bits & 0x00200000u) {
  21711. nan_double_ = from.nan_double_;
  21712. }
  21713. if (cached_has_bits & 0x00400000u) {
  21714. inf_float_ = from.inf_float_;
  21715. }
  21716. if (cached_has_bits & 0x00800000u) {
  21717. neg_inf_float_ = from.neg_inf_float_;
  21718. }
  21719. _has_bits_[0] |= cached_has_bits;
  21720. }
  21721. if (cached_has_bits & 117440512u) {
  21722. if (cached_has_bits & 0x01000000u) {
  21723. nan_float_ = from.nan_float_;
  21724. }
  21725. if (cached_has_bits & 0x02000000u) {
  21726. really_small_int32_ = from.really_small_int32_;
  21727. }
  21728. if (cached_has_bits & 0x04000000u) {
  21729. really_small_int64_ = from.really_small_int64_;
  21730. }
  21731. _has_bits_[0] |= cached_has_bits;
  21732. }
  21733. }
  21734. void TestExtremeDefaultValues::CopyFrom(const ::google::protobuf::Message& from) {
  21735. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestExtremeDefaultValues)
  21736. if (&from == this) return;
  21737. Clear();
  21738. MergeFrom(from);
  21739. }
  21740. void TestExtremeDefaultValues::CopyFrom(const TestExtremeDefaultValues& from) {
  21741. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestExtremeDefaultValues)
  21742. if (&from == this) return;
  21743. Clear();
  21744. MergeFrom(from);
  21745. }
  21746. bool TestExtremeDefaultValues::IsInitialized() const {
  21747. return true;
  21748. }
  21749. void TestExtremeDefaultValues::Swap(TestExtremeDefaultValues* other) {
  21750. if (other == this) return;
  21751. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  21752. InternalSwap(other);
  21753. } else {
  21754. TestExtremeDefaultValues* temp = New(GetArenaNoVirtual());
  21755. temp->MergeFrom(*other);
  21756. other->CopyFrom(*this);
  21757. InternalSwap(temp);
  21758. if (GetArenaNoVirtual() == NULL) {
  21759. delete temp;
  21760. }
  21761. }
  21762. }
  21763. void TestExtremeDefaultValues::UnsafeArenaSwap(TestExtremeDefaultValues* other) {
  21764. if (other == this) return;
  21765. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  21766. InternalSwap(other);
  21767. }
  21768. void TestExtremeDefaultValues::InternalSwap(TestExtremeDefaultValues* other) {
  21769. using std::swap;
  21770. escaped_bytes_.Swap(&other->escaped_bytes_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_escaped_bytes_.get(),
  21771. GetArenaNoVirtual());
  21772. utf8_string_.Swap(&other->utf8_string_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_utf8_string_.get(),
  21773. GetArenaNoVirtual());
  21774. cpp_trigraph_.Swap(&other->cpp_trigraph_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cpp_trigraph_.get(),
  21775. GetArenaNoVirtual());
  21776. string_with_zero_.Swap(&other->string_with_zero_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_with_zero_.get(),
  21777. GetArenaNoVirtual());
  21778. bytes_with_zero_.Swap(&other->bytes_with_zero_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_bytes_with_zero_.get(),
  21779. GetArenaNoVirtual());
  21780. string_piece_with_zero_.Swap(&other->string_piece_with_zero_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_string_piece_with_zero_.get(),
  21781. GetArenaNoVirtual());
  21782. cord_with_zero_.Swap(&other->cord_with_zero_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_cord_with_zero_.get(),
  21783. GetArenaNoVirtual());
  21784. replacement_string_.Swap(&other->replacement_string_, &::protobuf_unittest::TestExtremeDefaultValues::_i_give_permission_to_break_this_code_default_replacement_string_.get(),
  21785. GetArenaNoVirtual());
  21786. swap(zero_float_, other->zero_float_);
  21787. swap(large_uint64_, other->large_uint64_);
  21788. swap(large_uint32_, other->large_uint32_);
  21789. swap(small_int32_, other->small_int32_);
  21790. swap(small_int64_, other->small_int64_);
  21791. swap(one_float_, other->one_float_);
  21792. swap(small_float_, other->small_float_);
  21793. swap(negative_one_float_, other->negative_one_float_);
  21794. swap(negative_float_, other->negative_float_);
  21795. swap(large_float_, other->large_float_);
  21796. swap(small_negative_float_, other->small_negative_float_);
  21797. swap(inf_double_, other->inf_double_);
  21798. swap(neg_inf_double_, other->neg_inf_double_);
  21799. swap(nan_double_, other->nan_double_);
  21800. swap(inf_float_, other->inf_float_);
  21801. swap(neg_inf_float_, other->neg_inf_float_);
  21802. swap(nan_float_, other->nan_float_);
  21803. swap(really_small_int32_, other->really_small_int32_);
  21804. swap(really_small_int64_, other->really_small_int64_);
  21805. swap(_has_bits_[0], other->_has_bits_[0]);
  21806. _internal_metadata_.Swap(&other->_internal_metadata_);
  21807. }
  21808. ::google::protobuf::Metadata TestExtremeDefaultValues::GetMetadata() const {
  21809. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  21810. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  21811. }
  21812. // ===================================================================
  21813. void SparseEnumMessage::InitAsDefaultInstance() {
  21814. }
  21815. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  21816. const int SparseEnumMessage::kSparseEnumFieldNumber;
  21817. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  21818. SparseEnumMessage::SparseEnumMessage()
  21819. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  21820. ::google::protobuf::internal::InitSCC(
  21821. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_SparseEnumMessage.base);
  21822. SharedCtor();
  21823. // @@protoc_insertion_point(constructor:protobuf_unittest.SparseEnumMessage)
  21824. }
  21825. SparseEnumMessage::SparseEnumMessage(::google::protobuf::Arena* arena)
  21826. : ::google::protobuf::Message(),
  21827. _internal_metadata_(arena) {
  21828. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_SparseEnumMessage.base);
  21829. SharedCtor();
  21830. RegisterArenaDtor(arena);
  21831. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.SparseEnumMessage)
  21832. }
  21833. SparseEnumMessage::SparseEnumMessage(const SparseEnumMessage& from)
  21834. : ::google::protobuf::Message(),
  21835. _internal_metadata_(NULL),
  21836. _has_bits_(from._has_bits_) {
  21837. _internal_metadata_.MergeFrom(from._internal_metadata_);
  21838. sparse_enum_ = from.sparse_enum_;
  21839. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.SparseEnumMessage)
  21840. }
  21841. void SparseEnumMessage::SharedCtor() {
  21842. sparse_enum_ = 123;
  21843. }
  21844. SparseEnumMessage::~SparseEnumMessage() {
  21845. // @@protoc_insertion_point(destructor:protobuf_unittest.SparseEnumMessage)
  21846. SharedDtor();
  21847. }
  21848. void SparseEnumMessage::SharedDtor() {
  21849. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  21850. }
  21851. void SparseEnumMessage::ArenaDtor(void* object) {
  21852. SparseEnumMessage* _this = reinterpret_cast< SparseEnumMessage* >(object);
  21853. (void)_this;
  21854. }
  21855. void SparseEnumMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  21856. }
  21857. void SparseEnumMessage::SetCachedSize(int size) const {
  21858. _cached_size_.Set(size);
  21859. }
  21860. const ::google::protobuf::Descriptor* SparseEnumMessage::descriptor() {
  21861. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  21862. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  21863. }
  21864. const SparseEnumMessage& SparseEnumMessage::default_instance() {
  21865. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_SparseEnumMessage.base);
  21866. return *internal_default_instance();
  21867. }
  21868. void SparseEnumMessage::Clear() {
  21869. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.SparseEnumMessage)
  21870. ::google::protobuf::uint32 cached_has_bits = 0;
  21871. // Prevent compiler warnings about cached_has_bits being unused
  21872. (void) cached_has_bits;
  21873. sparse_enum_ = 123;
  21874. _has_bits_.Clear();
  21875. _internal_metadata_.Clear();
  21876. }
  21877. bool SparseEnumMessage::MergePartialFromCodedStream(
  21878. ::google::protobuf::io::CodedInputStream* input) {
  21879. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  21880. ::google::protobuf::uint32 tag;
  21881. // @@protoc_insertion_point(parse_start:protobuf_unittest.SparseEnumMessage)
  21882. for (;;) {
  21883. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  21884. tag = p.first;
  21885. if (!p.second) goto handle_unusual;
  21886. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  21887. // optional .protobuf_unittest.TestSparseEnum sparse_enum = 1;
  21888. case 1: {
  21889. if (static_cast< ::google::protobuf::uint8>(tag) ==
  21890. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  21891. int value;
  21892. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  21893. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  21894. input, &value)));
  21895. if (::protobuf_unittest::TestSparseEnum_IsValid(value)) {
  21896. set_sparse_enum(static_cast< ::protobuf_unittest::TestSparseEnum >(value));
  21897. } else {
  21898. mutable_unknown_fields()->AddVarint(
  21899. 1, static_cast< ::google::protobuf::uint64>(value));
  21900. }
  21901. } else {
  21902. goto handle_unusual;
  21903. }
  21904. break;
  21905. }
  21906. default: {
  21907. handle_unusual:
  21908. if (tag == 0) {
  21909. goto success;
  21910. }
  21911. DO_(::google::protobuf::internal::WireFormat::SkipField(
  21912. input, tag, _internal_metadata_.mutable_unknown_fields()));
  21913. break;
  21914. }
  21915. }
  21916. }
  21917. success:
  21918. // @@protoc_insertion_point(parse_success:protobuf_unittest.SparseEnumMessage)
  21919. return true;
  21920. failure:
  21921. // @@protoc_insertion_point(parse_failure:protobuf_unittest.SparseEnumMessage)
  21922. return false;
  21923. #undef DO_
  21924. }
  21925. void SparseEnumMessage::SerializeWithCachedSizes(
  21926. ::google::protobuf::io::CodedOutputStream* output) const {
  21927. // @@protoc_insertion_point(serialize_start:protobuf_unittest.SparseEnumMessage)
  21928. ::google::protobuf::uint32 cached_has_bits = 0;
  21929. (void) cached_has_bits;
  21930. cached_has_bits = _has_bits_[0];
  21931. // optional .protobuf_unittest.TestSparseEnum sparse_enum = 1;
  21932. if (cached_has_bits & 0x00000001u) {
  21933. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  21934. 1, this->sparse_enum(), output);
  21935. }
  21936. if (_internal_metadata_.have_unknown_fields()) {
  21937. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  21938. _internal_metadata_.unknown_fields(), output);
  21939. }
  21940. // @@protoc_insertion_point(serialize_end:protobuf_unittest.SparseEnumMessage)
  21941. }
  21942. ::google::protobuf::uint8* SparseEnumMessage::InternalSerializeWithCachedSizesToArray(
  21943. bool deterministic, ::google::protobuf::uint8* target) const {
  21944. (void)deterministic; // Unused
  21945. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.SparseEnumMessage)
  21946. ::google::protobuf::uint32 cached_has_bits = 0;
  21947. (void) cached_has_bits;
  21948. cached_has_bits = _has_bits_[0];
  21949. // optional .protobuf_unittest.TestSparseEnum sparse_enum = 1;
  21950. if (cached_has_bits & 0x00000001u) {
  21951. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  21952. 1, this->sparse_enum(), target);
  21953. }
  21954. if (_internal_metadata_.have_unknown_fields()) {
  21955. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  21956. _internal_metadata_.unknown_fields(), target);
  21957. }
  21958. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.SparseEnumMessage)
  21959. return target;
  21960. }
  21961. size_t SparseEnumMessage::ByteSizeLong() const {
  21962. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.SparseEnumMessage)
  21963. size_t total_size = 0;
  21964. if (_internal_metadata_.have_unknown_fields()) {
  21965. total_size +=
  21966. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  21967. _internal_metadata_.unknown_fields());
  21968. }
  21969. // optional .protobuf_unittest.TestSparseEnum sparse_enum = 1;
  21970. if (has_sparse_enum()) {
  21971. total_size += 1 +
  21972. ::google::protobuf::internal::WireFormatLite::EnumSize(this->sparse_enum());
  21973. }
  21974. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  21975. SetCachedSize(cached_size);
  21976. return total_size;
  21977. }
  21978. void SparseEnumMessage::MergeFrom(const ::google::protobuf::Message& from) {
  21979. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.SparseEnumMessage)
  21980. GOOGLE_DCHECK_NE(&from, this);
  21981. const SparseEnumMessage* source =
  21982. ::google::protobuf::internal::DynamicCastToGenerated<const SparseEnumMessage>(
  21983. &from);
  21984. if (source == NULL) {
  21985. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.SparseEnumMessage)
  21986. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  21987. } else {
  21988. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.SparseEnumMessage)
  21989. MergeFrom(*source);
  21990. }
  21991. }
  21992. void SparseEnumMessage::MergeFrom(const SparseEnumMessage& from) {
  21993. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.SparseEnumMessage)
  21994. GOOGLE_DCHECK_NE(&from, this);
  21995. _internal_metadata_.MergeFrom(from._internal_metadata_);
  21996. ::google::protobuf::uint32 cached_has_bits = 0;
  21997. (void) cached_has_bits;
  21998. if (from.has_sparse_enum()) {
  21999. set_sparse_enum(from.sparse_enum());
  22000. }
  22001. }
  22002. void SparseEnumMessage::CopyFrom(const ::google::protobuf::Message& from) {
  22003. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.SparseEnumMessage)
  22004. if (&from == this) return;
  22005. Clear();
  22006. MergeFrom(from);
  22007. }
  22008. void SparseEnumMessage::CopyFrom(const SparseEnumMessage& from) {
  22009. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.SparseEnumMessage)
  22010. if (&from == this) return;
  22011. Clear();
  22012. MergeFrom(from);
  22013. }
  22014. bool SparseEnumMessage::IsInitialized() const {
  22015. return true;
  22016. }
  22017. void SparseEnumMessage::Swap(SparseEnumMessage* other) {
  22018. if (other == this) return;
  22019. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  22020. InternalSwap(other);
  22021. } else {
  22022. SparseEnumMessage* temp = New(GetArenaNoVirtual());
  22023. temp->MergeFrom(*other);
  22024. other->CopyFrom(*this);
  22025. InternalSwap(temp);
  22026. if (GetArenaNoVirtual() == NULL) {
  22027. delete temp;
  22028. }
  22029. }
  22030. }
  22031. void SparseEnumMessage::UnsafeArenaSwap(SparseEnumMessage* other) {
  22032. if (other == this) return;
  22033. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  22034. InternalSwap(other);
  22035. }
  22036. void SparseEnumMessage::InternalSwap(SparseEnumMessage* other) {
  22037. using std::swap;
  22038. swap(sparse_enum_, other->sparse_enum_);
  22039. swap(_has_bits_[0], other->_has_bits_[0]);
  22040. _internal_metadata_.Swap(&other->_internal_metadata_);
  22041. }
  22042. ::google::protobuf::Metadata SparseEnumMessage::GetMetadata() const {
  22043. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  22044. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  22045. }
  22046. // ===================================================================
  22047. void OneString::InitAsDefaultInstance() {
  22048. }
  22049. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  22050. const int OneString::kDataFieldNumber;
  22051. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  22052. OneString::OneString()
  22053. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  22054. ::google::protobuf::internal::InitSCC(
  22055. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OneString.base);
  22056. SharedCtor();
  22057. // @@protoc_insertion_point(constructor:protobuf_unittest.OneString)
  22058. }
  22059. OneString::OneString(::google::protobuf::Arena* arena)
  22060. : ::google::protobuf::Message(),
  22061. _internal_metadata_(arena) {
  22062. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OneString.base);
  22063. SharedCtor();
  22064. RegisterArenaDtor(arena);
  22065. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.OneString)
  22066. }
  22067. OneString::OneString(const OneString& from)
  22068. : ::google::protobuf::Message(),
  22069. _internal_metadata_(NULL),
  22070. _has_bits_(from._has_bits_) {
  22071. _internal_metadata_.MergeFrom(from._internal_metadata_);
  22072. data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  22073. if (from.has_data()) {
  22074. data_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data(),
  22075. GetArenaNoVirtual());
  22076. }
  22077. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.OneString)
  22078. }
  22079. void OneString::SharedCtor() {
  22080. data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  22081. }
  22082. OneString::~OneString() {
  22083. // @@protoc_insertion_point(destructor:protobuf_unittest.OneString)
  22084. SharedDtor();
  22085. }
  22086. void OneString::SharedDtor() {
  22087. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  22088. data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  22089. }
  22090. void OneString::ArenaDtor(void* object) {
  22091. OneString* _this = reinterpret_cast< OneString* >(object);
  22092. (void)_this;
  22093. }
  22094. void OneString::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  22095. }
  22096. void OneString::SetCachedSize(int size) const {
  22097. _cached_size_.Set(size);
  22098. }
  22099. const ::google::protobuf::Descriptor* OneString::descriptor() {
  22100. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  22101. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  22102. }
  22103. const OneString& OneString::default_instance() {
  22104. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OneString.base);
  22105. return *internal_default_instance();
  22106. }
  22107. void OneString::Clear() {
  22108. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.OneString)
  22109. ::google::protobuf::uint32 cached_has_bits = 0;
  22110. // Prevent compiler warnings about cached_has_bits being unused
  22111. (void) cached_has_bits;
  22112. cached_has_bits = _has_bits_[0];
  22113. if (cached_has_bits & 0x00000001u) {
  22114. data_.ClearNonDefaultToEmpty();
  22115. }
  22116. _has_bits_.Clear();
  22117. _internal_metadata_.Clear();
  22118. }
  22119. bool OneString::MergePartialFromCodedStream(
  22120. ::google::protobuf::io::CodedInputStream* input) {
  22121. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  22122. ::google::protobuf::uint32 tag;
  22123. // @@protoc_insertion_point(parse_start:protobuf_unittest.OneString)
  22124. for (;;) {
  22125. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  22126. tag = p.first;
  22127. if (!p.second) goto handle_unusual;
  22128. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  22129. // optional string data = 1;
  22130. case 1: {
  22131. if (static_cast< ::google::protobuf::uint8>(tag) ==
  22132. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  22133. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  22134. input, this->mutable_data()));
  22135. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  22136. this->data().data(), static_cast<int>(this->data().length()),
  22137. ::google::protobuf::internal::WireFormat::PARSE,
  22138. "protobuf_unittest.OneString.data");
  22139. } else {
  22140. goto handle_unusual;
  22141. }
  22142. break;
  22143. }
  22144. default: {
  22145. handle_unusual:
  22146. if (tag == 0) {
  22147. goto success;
  22148. }
  22149. DO_(::google::protobuf::internal::WireFormat::SkipField(
  22150. input, tag, _internal_metadata_.mutable_unknown_fields()));
  22151. break;
  22152. }
  22153. }
  22154. }
  22155. success:
  22156. // @@protoc_insertion_point(parse_success:protobuf_unittest.OneString)
  22157. return true;
  22158. failure:
  22159. // @@protoc_insertion_point(parse_failure:protobuf_unittest.OneString)
  22160. return false;
  22161. #undef DO_
  22162. }
  22163. void OneString::SerializeWithCachedSizes(
  22164. ::google::protobuf::io::CodedOutputStream* output) const {
  22165. // @@protoc_insertion_point(serialize_start:protobuf_unittest.OneString)
  22166. ::google::protobuf::uint32 cached_has_bits = 0;
  22167. (void) cached_has_bits;
  22168. cached_has_bits = _has_bits_[0];
  22169. // optional string data = 1;
  22170. if (cached_has_bits & 0x00000001u) {
  22171. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  22172. this->data().data(), static_cast<int>(this->data().length()),
  22173. ::google::protobuf::internal::WireFormat::SERIALIZE,
  22174. "protobuf_unittest.OneString.data");
  22175. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  22176. 1, this->data(), output);
  22177. }
  22178. if (_internal_metadata_.have_unknown_fields()) {
  22179. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  22180. _internal_metadata_.unknown_fields(), output);
  22181. }
  22182. // @@protoc_insertion_point(serialize_end:protobuf_unittest.OneString)
  22183. }
  22184. ::google::protobuf::uint8* OneString::InternalSerializeWithCachedSizesToArray(
  22185. bool deterministic, ::google::protobuf::uint8* target) const {
  22186. (void)deterministic; // Unused
  22187. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.OneString)
  22188. ::google::protobuf::uint32 cached_has_bits = 0;
  22189. (void) cached_has_bits;
  22190. cached_has_bits = _has_bits_[0];
  22191. // optional string data = 1;
  22192. if (cached_has_bits & 0x00000001u) {
  22193. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  22194. this->data().data(), static_cast<int>(this->data().length()),
  22195. ::google::protobuf::internal::WireFormat::SERIALIZE,
  22196. "protobuf_unittest.OneString.data");
  22197. target =
  22198. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  22199. 1, this->data(), target);
  22200. }
  22201. if (_internal_metadata_.have_unknown_fields()) {
  22202. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  22203. _internal_metadata_.unknown_fields(), target);
  22204. }
  22205. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.OneString)
  22206. return target;
  22207. }
  22208. size_t OneString::ByteSizeLong() const {
  22209. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.OneString)
  22210. size_t total_size = 0;
  22211. if (_internal_metadata_.have_unknown_fields()) {
  22212. total_size +=
  22213. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  22214. _internal_metadata_.unknown_fields());
  22215. }
  22216. // optional string data = 1;
  22217. if (has_data()) {
  22218. total_size += 1 +
  22219. ::google::protobuf::internal::WireFormatLite::StringSize(
  22220. this->data());
  22221. }
  22222. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  22223. SetCachedSize(cached_size);
  22224. return total_size;
  22225. }
  22226. void OneString::MergeFrom(const ::google::protobuf::Message& from) {
  22227. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.OneString)
  22228. GOOGLE_DCHECK_NE(&from, this);
  22229. const OneString* source =
  22230. ::google::protobuf::internal::DynamicCastToGenerated<const OneString>(
  22231. &from);
  22232. if (source == NULL) {
  22233. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.OneString)
  22234. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  22235. } else {
  22236. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.OneString)
  22237. MergeFrom(*source);
  22238. }
  22239. }
  22240. void OneString::MergeFrom(const OneString& from) {
  22241. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.OneString)
  22242. GOOGLE_DCHECK_NE(&from, this);
  22243. _internal_metadata_.MergeFrom(from._internal_metadata_);
  22244. ::google::protobuf::uint32 cached_has_bits = 0;
  22245. (void) cached_has_bits;
  22246. if (from.has_data()) {
  22247. set_data(from.data());
  22248. }
  22249. }
  22250. void OneString::CopyFrom(const ::google::protobuf::Message& from) {
  22251. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.OneString)
  22252. if (&from == this) return;
  22253. Clear();
  22254. MergeFrom(from);
  22255. }
  22256. void OneString::CopyFrom(const OneString& from) {
  22257. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.OneString)
  22258. if (&from == this) return;
  22259. Clear();
  22260. MergeFrom(from);
  22261. }
  22262. bool OneString::IsInitialized() const {
  22263. return true;
  22264. }
  22265. void OneString::Swap(OneString* other) {
  22266. if (other == this) return;
  22267. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  22268. InternalSwap(other);
  22269. } else {
  22270. OneString* temp = New(GetArenaNoVirtual());
  22271. temp->MergeFrom(*other);
  22272. other->CopyFrom(*this);
  22273. InternalSwap(temp);
  22274. if (GetArenaNoVirtual() == NULL) {
  22275. delete temp;
  22276. }
  22277. }
  22278. }
  22279. void OneString::UnsafeArenaSwap(OneString* other) {
  22280. if (other == this) return;
  22281. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  22282. InternalSwap(other);
  22283. }
  22284. void OneString::InternalSwap(OneString* other) {
  22285. using std::swap;
  22286. data_.Swap(&other->data_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  22287. GetArenaNoVirtual());
  22288. swap(_has_bits_[0], other->_has_bits_[0]);
  22289. _internal_metadata_.Swap(&other->_internal_metadata_);
  22290. }
  22291. ::google::protobuf::Metadata OneString::GetMetadata() const {
  22292. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  22293. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  22294. }
  22295. // ===================================================================
  22296. void MoreString::InitAsDefaultInstance() {
  22297. }
  22298. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  22299. const int MoreString::kDataFieldNumber;
  22300. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  22301. MoreString::MoreString()
  22302. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  22303. ::google::protobuf::internal::InitSCC(
  22304. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_MoreString.base);
  22305. SharedCtor();
  22306. // @@protoc_insertion_point(constructor:protobuf_unittest.MoreString)
  22307. }
  22308. MoreString::MoreString(::google::protobuf::Arena* arena)
  22309. : ::google::protobuf::Message(),
  22310. _internal_metadata_(arena),
  22311. data_(arena) {
  22312. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_MoreString.base);
  22313. SharedCtor();
  22314. RegisterArenaDtor(arena);
  22315. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.MoreString)
  22316. }
  22317. MoreString::MoreString(const MoreString& from)
  22318. : ::google::protobuf::Message(),
  22319. _internal_metadata_(NULL),
  22320. _has_bits_(from._has_bits_),
  22321. data_(from.data_) {
  22322. _internal_metadata_.MergeFrom(from._internal_metadata_);
  22323. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.MoreString)
  22324. }
  22325. void MoreString::SharedCtor() {
  22326. }
  22327. MoreString::~MoreString() {
  22328. // @@protoc_insertion_point(destructor:protobuf_unittest.MoreString)
  22329. SharedDtor();
  22330. }
  22331. void MoreString::SharedDtor() {
  22332. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  22333. }
  22334. void MoreString::ArenaDtor(void* object) {
  22335. MoreString* _this = reinterpret_cast< MoreString* >(object);
  22336. (void)_this;
  22337. }
  22338. void MoreString::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  22339. }
  22340. void MoreString::SetCachedSize(int size) const {
  22341. _cached_size_.Set(size);
  22342. }
  22343. const ::google::protobuf::Descriptor* MoreString::descriptor() {
  22344. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  22345. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  22346. }
  22347. const MoreString& MoreString::default_instance() {
  22348. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_MoreString.base);
  22349. return *internal_default_instance();
  22350. }
  22351. void MoreString::Clear() {
  22352. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.MoreString)
  22353. ::google::protobuf::uint32 cached_has_bits = 0;
  22354. // Prevent compiler warnings about cached_has_bits being unused
  22355. (void) cached_has_bits;
  22356. data_.Clear();
  22357. _has_bits_.Clear();
  22358. _internal_metadata_.Clear();
  22359. }
  22360. bool MoreString::MergePartialFromCodedStream(
  22361. ::google::protobuf::io::CodedInputStream* input) {
  22362. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  22363. ::google::protobuf::uint32 tag;
  22364. // @@protoc_insertion_point(parse_start:protobuf_unittest.MoreString)
  22365. for (;;) {
  22366. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  22367. tag = p.first;
  22368. if (!p.second) goto handle_unusual;
  22369. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  22370. // repeated string data = 1;
  22371. case 1: {
  22372. if (static_cast< ::google::protobuf::uint8>(tag) ==
  22373. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  22374. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  22375. input, this->add_data()));
  22376. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  22377. this->data(this->data_size() - 1).data(),
  22378. static_cast<int>(this->data(this->data_size() - 1).length()),
  22379. ::google::protobuf::internal::WireFormat::PARSE,
  22380. "protobuf_unittest.MoreString.data");
  22381. } else {
  22382. goto handle_unusual;
  22383. }
  22384. break;
  22385. }
  22386. default: {
  22387. handle_unusual:
  22388. if (tag == 0) {
  22389. goto success;
  22390. }
  22391. DO_(::google::protobuf::internal::WireFormat::SkipField(
  22392. input, tag, _internal_metadata_.mutable_unknown_fields()));
  22393. break;
  22394. }
  22395. }
  22396. }
  22397. success:
  22398. // @@protoc_insertion_point(parse_success:protobuf_unittest.MoreString)
  22399. return true;
  22400. failure:
  22401. // @@protoc_insertion_point(parse_failure:protobuf_unittest.MoreString)
  22402. return false;
  22403. #undef DO_
  22404. }
  22405. void MoreString::SerializeWithCachedSizes(
  22406. ::google::protobuf::io::CodedOutputStream* output) const {
  22407. // @@protoc_insertion_point(serialize_start:protobuf_unittest.MoreString)
  22408. ::google::protobuf::uint32 cached_has_bits = 0;
  22409. (void) cached_has_bits;
  22410. // repeated string data = 1;
  22411. for (int i = 0, n = this->data_size(); i < n; i++) {
  22412. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  22413. this->data(i).data(), static_cast<int>(this->data(i).length()),
  22414. ::google::protobuf::internal::WireFormat::SERIALIZE,
  22415. "protobuf_unittest.MoreString.data");
  22416. ::google::protobuf::internal::WireFormatLite::WriteString(
  22417. 1, this->data(i), output);
  22418. }
  22419. if (_internal_metadata_.have_unknown_fields()) {
  22420. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  22421. _internal_metadata_.unknown_fields(), output);
  22422. }
  22423. // @@protoc_insertion_point(serialize_end:protobuf_unittest.MoreString)
  22424. }
  22425. ::google::protobuf::uint8* MoreString::InternalSerializeWithCachedSizesToArray(
  22426. bool deterministic, ::google::protobuf::uint8* target) const {
  22427. (void)deterministic; // Unused
  22428. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.MoreString)
  22429. ::google::protobuf::uint32 cached_has_bits = 0;
  22430. (void) cached_has_bits;
  22431. // repeated string data = 1;
  22432. for (int i = 0, n = this->data_size(); i < n; i++) {
  22433. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  22434. this->data(i).data(), static_cast<int>(this->data(i).length()),
  22435. ::google::protobuf::internal::WireFormat::SERIALIZE,
  22436. "protobuf_unittest.MoreString.data");
  22437. target = ::google::protobuf::internal::WireFormatLite::
  22438. WriteStringToArray(1, this->data(i), target);
  22439. }
  22440. if (_internal_metadata_.have_unknown_fields()) {
  22441. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  22442. _internal_metadata_.unknown_fields(), target);
  22443. }
  22444. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.MoreString)
  22445. return target;
  22446. }
  22447. size_t MoreString::ByteSizeLong() const {
  22448. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.MoreString)
  22449. size_t total_size = 0;
  22450. if (_internal_metadata_.have_unknown_fields()) {
  22451. total_size +=
  22452. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  22453. _internal_metadata_.unknown_fields());
  22454. }
  22455. // repeated string data = 1;
  22456. total_size += 1 *
  22457. ::google::protobuf::internal::FromIntSize(this->data_size());
  22458. for (int i = 0, n = this->data_size(); i < n; i++) {
  22459. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  22460. this->data(i));
  22461. }
  22462. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  22463. SetCachedSize(cached_size);
  22464. return total_size;
  22465. }
  22466. void MoreString::MergeFrom(const ::google::protobuf::Message& from) {
  22467. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.MoreString)
  22468. GOOGLE_DCHECK_NE(&from, this);
  22469. const MoreString* source =
  22470. ::google::protobuf::internal::DynamicCastToGenerated<const MoreString>(
  22471. &from);
  22472. if (source == NULL) {
  22473. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.MoreString)
  22474. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  22475. } else {
  22476. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.MoreString)
  22477. MergeFrom(*source);
  22478. }
  22479. }
  22480. void MoreString::MergeFrom(const MoreString& from) {
  22481. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.MoreString)
  22482. GOOGLE_DCHECK_NE(&from, this);
  22483. _internal_metadata_.MergeFrom(from._internal_metadata_);
  22484. ::google::protobuf::uint32 cached_has_bits = 0;
  22485. (void) cached_has_bits;
  22486. data_.MergeFrom(from.data_);
  22487. }
  22488. void MoreString::CopyFrom(const ::google::protobuf::Message& from) {
  22489. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.MoreString)
  22490. if (&from == this) return;
  22491. Clear();
  22492. MergeFrom(from);
  22493. }
  22494. void MoreString::CopyFrom(const MoreString& from) {
  22495. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.MoreString)
  22496. if (&from == this) return;
  22497. Clear();
  22498. MergeFrom(from);
  22499. }
  22500. bool MoreString::IsInitialized() const {
  22501. return true;
  22502. }
  22503. void MoreString::Swap(MoreString* other) {
  22504. if (other == this) return;
  22505. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  22506. InternalSwap(other);
  22507. } else {
  22508. MoreString* temp = New(GetArenaNoVirtual());
  22509. temp->MergeFrom(*other);
  22510. other->CopyFrom(*this);
  22511. InternalSwap(temp);
  22512. if (GetArenaNoVirtual() == NULL) {
  22513. delete temp;
  22514. }
  22515. }
  22516. }
  22517. void MoreString::UnsafeArenaSwap(MoreString* other) {
  22518. if (other == this) return;
  22519. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  22520. InternalSwap(other);
  22521. }
  22522. void MoreString::InternalSwap(MoreString* other) {
  22523. using std::swap;
  22524. data_.InternalSwap(CastToBase(&other->data_));
  22525. swap(_has_bits_[0], other->_has_bits_[0]);
  22526. _internal_metadata_.Swap(&other->_internal_metadata_);
  22527. }
  22528. ::google::protobuf::Metadata MoreString::GetMetadata() const {
  22529. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  22530. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  22531. }
  22532. // ===================================================================
  22533. void OneBytes::InitAsDefaultInstance() {
  22534. }
  22535. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  22536. const int OneBytes::kDataFieldNumber;
  22537. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  22538. OneBytes::OneBytes()
  22539. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  22540. ::google::protobuf::internal::InitSCC(
  22541. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OneBytes.base);
  22542. SharedCtor();
  22543. // @@protoc_insertion_point(constructor:protobuf_unittest.OneBytes)
  22544. }
  22545. OneBytes::OneBytes(::google::protobuf::Arena* arena)
  22546. : ::google::protobuf::Message(),
  22547. _internal_metadata_(arena) {
  22548. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OneBytes.base);
  22549. SharedCtor();
  22550. RegisterArenaDtor(arena);
  22551. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.OneBytes)
  22552. }
  22553. OneBytes::OneBytes(const OneBytes& from)
  22554. : ::google::protobuf::Message(),
  22555. _internal_metadata_(NULL),
  22556. _has_bits_(from._has_bits_) {
  22557. _internal_metadata_.MergeFrom(from._internal_metadata_);
  22558. data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  22559. if (from.has_data()) {
  22560. data_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data(),
  22561. GetArenaNoVirtual());
  22562. }
  22563. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.OneBytes)
  22564. }
  22565. void OneBytes::SharedCtor() {
  22566. data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  22567. }
  22568. OneBytes::~OneBytes() {
  22569. // @@protoc_insertion_point(destructor:protobuf_unittest.OneBytes)
  22570. SharedDtor();
  22571. }
  22572. void OneBytes::SharedDtor() {
  22573. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  22574. data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  22575. }
  22576. void OneBytes::ArenaDtor(void* object) {
  22577. OneBytes* _this = reinterpret_cast< OneBytes* >(object);
  22578. (void)_this;
  22579. }
  22580. void OneBytes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  22581. }
  22582. void OneBytes::SetCachedSize(int size) const {
  22583. _cached_size_.Set(size);
  22584. }
  22585. const ::google::protobuf::Descriptor* OneBytes::descriptor() {
  22586. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  22587. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  22588. }
  22589. const OneBytes& OneBytes::default_instance() {
  22590. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_OneBytes.base);
  22591. return *internal_default_instance();
  22592. }
  22593. void OneBytes::Clear() {
  22594. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.OneBytes)
  22595. ::google::protobuf::uint32 cached_has_bits = 0;
  22596. // Prevent compiler warnings about cached_has_bits being unused
  22597. (void) cached_has_bits;
  22598. cached_has_bits = _has_bits_[0];
  22599. if (cached_has_bits & 0x00000001u) {
  22600. data_.ClearNonDefaultToEmpty();
  22601. }
  22602. _has_bits_.Clear();
  22603. _internal_metadata_.Clear();
  22604. }
  22605. bool OneBytes::MergePartialFromCodedStream(
  22606. ::google::protobuf::io::CodedInputStream* input) {
  22607. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  22608. ::google::protobuf::uint32 tag;
  22609. // @@protoc_insertion_point(parse_start:protobuf_unittest.OneBytes)
  22610. for (;;) {
  22611. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  22612. tag = p.first;
  22613. if (!p.second) goto handle_unusual;
  22614. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  22615. // optional bytes data = 1;
  22616. case 1: {
  22617. if (static_cast< ::google::protobuf::uint8>(tag) ==
  22618. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  22619. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  22620. input, this->mutable_data()));
  22621. } else {
  22622. goto handle_unusual;
  22623. }
  22624. break;
  22625. }
  22626. default: {
  22627. handle_unusual:
  22628. if (tag == 0) {
  22629. goto success;
  22630. }
  22631. DO_(::google::protobuf::internal::WireFormat::SkipField(
  22632. input, tag, _internal_metadata_.mutable_unknown_fields()));
  22633. break;
  22634. }
  22635. }
  22636. }
  22637. success:
  22638. // @@protoc_insertion_point(parse_success:protobuf_unittest.OneBytes)
  22639. return true;
  22640. failure:
  22641. // @@protoc_insertion_point(parse_failure:protobuf_unittest.OneBytes)
  22642. return false;
  22643. #undef DO_
  22644. }
  22645. void OneBytes::SerializeWithCachedSizes(
  22646. ::google::protobuf::io::CodedOutputStream* output) const {
  22647. // @@protoc_insertion_point(serialize_start:protobuf_unittest.OneBytes)
  22648. ::google::protobuf::uint32 cached_has_bits = 0;
  22649. (void) cached_has_bits;
  22650. cached_has_bits = _has_bits_[0];
  22651. // optional bytes data = 1;
  22652. if (cached_has_bits & 0x00000001u) {
  22653. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  22654. 1, this->data(), output);
  22655. }
  22656. if (_internal_metadata_.have_unknown_fields()) {
  22657. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  22658. _internal_metadata_.unknown_fields(), output);
  22659. }
  22660. // @@protoc_insertion_point(serialize_end:protobuf_unittest.OneBytes)
  22661. }
  22662. ::google::protobuf::uint8* OneBytes::InternalSerializeWithCachedSizesToArray(
  22663. bool deterministic, ::google::protobuf::uint8* target) const {
  22664. (void)deterministic; // Unused
  22665. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.OneBytes)
  22666. ::google::protobuf::uint32 cached_has_bits = 0;
  22667. (void) cached_has_bits;
  22668. cached_has_bits = _has_bits_[0];
  22669. // optional bytes data = 1;
  22670. if (cached_has_bits & 0x00000001u) {
  22671. target =
  22672. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  22673. 1, this->data(), target);
  22674. }
  22675. if (_internal_metadata_.have_unknown_fields()) {
  22676. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  22677. _internal_metadata_.unknown_fields(), target);
  22678. }
  22679. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.OneBytes)
  22680. return target;
  22681. }
  22682. size_t OneBytes::ByteSizeLong() const {
  22683. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.OneBytes)
  22684. size_t total_size = 0;
  22685. if (_internal_metadata_.have_unknown_fields()) {
  22686. total_size +=
  22687. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  22688. _internal_metadata_.unknown_fields());
  22689. }
  22690. // optional bytes data = 1;
  22691. if (has_data()) {
  22692. total_size += 1 +
  22693. ::google::protobuf::internal::WireFormatLite::BytesSize(
  22694. this->data());
  22695. }
  22696. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  22697. SetCachedSize(cached_size);
  22698. return total_size;
  22699. }
  22700. void OneBytes::MergeFrom(const ::google::protobuf::Message& from) {
  22701. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.OneBytes)
  22702. GOOGLE_DCHECK_NE(&from, this);
  22703. const OneBytes* source =
  22704. ::google::protobuf::internal::DynamicCastToGenerated<const OneBytes>(
  22705. &from);
  22706. if (source == NULL) {
  22707. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.OneBytes)
  22708. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  22709. } else {
  22710. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.OneBytes)
  22711. MergeFrom(*source);
  22712. }
  22713. }
  22714. void OneBytes::MergeFrom(const OneBytes& from) {
  22715. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.OneBytes)
  22716. GOOGLE_DCHECK_NE(&from, this);
  22717. _internal_metadata_.MergeFrom(from._internal_metadata_);
  22718. ::google::protobuf::uint32 cached_has_bits = 0;
  22719. (void) cached_has_bits;
  22720. if (from.has_data()) {
  22721. set_data(from.data());
  22722. }
  22723. }
  22724. void OneBytes::CopyFrom(const ::google::protobuf::Message& from) {
  22725. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.OneBytes)
  22726. if (&from == this) return;
  22727. Clear();
  22728. MergeFrom(from);
  22729. }
  22730. void OneBytes::CopyFrom(const OneBytes& from) {
  22731. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.OneBytes)
  22732. if (&from == this) return;
  22733. Clear();
  22734. MergeFrom(from);
  22735. }
  22736. bool OneBytes::IsInitialized() const {
  22737. return true;
  22738. }
  22739. void OneBytes::Swap(OneBytes* other) {
  22740. if (other == this) return;
  22741. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  22742. InternalSwap(other);
  22743. } else {
  22744. OneBytes* temp = New(GetArenaNoVirtual());
  22745. temp->MergeFrom(*other);
  22746. other->CopyFrom(*this);
  22747. InternalSwap(temp);
  22748. if (GetArenaNoVirtual() == NULL) {
  22749. delete temp;
  22750. }
  22751. }
  22752. }
  22753. void OneBytes::UnsafeArenaSwap(OneBytes* other) {
  22754. if (other == this) return;
  22755. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  22756. InternalSwap(other);
  22757. }
  22758. void OneBytes::InternalSwap(OneBytes* other) {
  22759. using std::swap;
  22760. data_.Swap(&other->data_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  22761. GetArenaNoVirtual());
  22762. swap(_has_bits_[0], other->_has_bits_[0]);
  22763. _internal_metadata_.Swap(&other->_internal_metadata_);
  22764. }
  22765. ::google::protobuf::Metadata OneBytes::GetMetadata() const {
  22766. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  22767. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  22768. }
  22769. // ===================================================================
  22770. void MoreBytes::InitAsDefaultInstance() {
  22771. }
  22772. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  22773. const int MoreBytes::kDataFieldNumber;
  22774. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  22775. MoreBytes::MoreBytes()
  22776. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  22777. ::google::protobuf::internal::InitSCC(
  22778. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_MoreBytes.base);
  22779. SharedCtor();
  22780. // @@protoc_insertion_point(constructor:protobuf_unittest.MoreBytes)
  22781. }
  22782. MoreBytes::MoreBytes(::google::protobuf::Arena* arena)
  22783. : ::google::protobuf::Message(),
  22784. _internal_metadata_(arena),
  22785. data_(arena) {
  22786. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_MoreBytes.base);
  22787. SharedCtor();
  22788. RegisterArenaDtor(arena);
  22789. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.MoreBytes)
  22790. }
  22791. MoreBytes::MoreBytes(const MoreBytes& from)
  22792. : ::google::protobuf::Message(),
  22793. _internal_metadata_(NULL),
  22794. _has_bits_(from._has_bits_),
  22795. data_(from.data_) {
  22796. _internal_metadata_.MergeFrom(from._internal_metadata_);
  22797. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.MoreBytes)
  22798. }
  22799. void MoreBytes::SharedCtor() {
  22800. }
  22801. MoreBytes::~MoreBytes() {
  22802. // @@protoc_insertion_point(destructor:protobuf_unittest.MoreBytes)
  22803. SharedDtor();
  22804. }
  22805. void MoreBytes::SharedDtor() {
  22806. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  22807. }
  22808. void MoreBytes::ArenaDtor(void* object) {
  22809. MoreBytes* _this = reinterpret_cast< MoreBytes* >(object);
  22810. (void)_this;
  22811. }
  22812. void MoreBytes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  22813. }
  22814. void MoreBytes::SetCachedSize(int size) const {
  22815. _cached_size_.Set(size);
  22816. }
  22817. const ::google::protobuf::Descriptor* MoreBytes::descriptor() {
  22818. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  22819. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  22820. }
  22821. const MoreBytes& MoreBytes::default_instance() {
  22822. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_MoreBytes.base);
  22823. return *internal_default_instance();
  22824. }
  22825. void MoreBytes::Clear() {
  22826. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.MoreBytes)
  22827. ::google::protobuf::uint32 cached_has_bits = 0;
  22828. // Prevent compiler warnings about cached_has_bits being unused
  22829. (void) cached_has_bits;
  22830. data_.Clear();
  22831. _has_bits_.Clear();
  22832. _internal_metadata_.Clear();
  22833. }
  22834. bool MoreBytes::MergePartialFromCodedStream(
  22835. ::google::protobuf::io::CodedInputStream* input) {
  22836. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  22837. ::google::protobuf::uint32 tag;
  22838. // @@protoc_insertion_point(parse_start:protobuf_unittest.MoreBytes)
  22839. for (;;) {
  22840. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  22841. tag = p.first;
  22842. if (!p.second) goto handle_unusual;
  22843. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  22844. // repeated bytes data = 1;
  22845. case 1: {
  22846. if (static_cast< ::google::protobuf::uint8>(tag) ==
  22847. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  22848. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  22849. input, this->add_data()));
  22850. } else {
  22851. goto handle_unusual;
  22852. }
  22853. break;
  22854. }
  22855. default: {
  22856. handle_unusual:
  22857. if (tag == 0) {
  22858. goto success;
  22859. }
  22860. DO_(::google::protobuf::internal::WireFormat::SkipField(
  22861. input, tag, _internal_metadata_.mutable_unknown_fields()));
  22862. break;
  22863. }
  22864. }
  22865. }
  22866. success:
  22867. // @@protoc_insertion_point(parse_success:protobuf_unittest.MoreBytes)
  22868. return true;
  22869. failure:
  22870. // @@protoc_insertion_point(parse_failure:protobuf_unittest.MoreBytes)
  22871. return false;
  22872. #undef DO_
  22873. }
  22874. void MoreBytes::SerializeWithCachedSizes(
  22875. ::google::protobuf::io::CodedOutputStream* output) const {
  22876. // @@protoc_insertion_point(serialize_start:protobuf_unittest.MoreBytes)
  22877. ::google::protobuf::uint32 cached_has_bits = 0;
  22878. (void) cached_has_bits;
  22879. // repeated bytes data = 1;
  22880. for (int i = 0, n = this->data_size(); i < n; i++) {
  22881. ::google::protobuf::internal::WireFormatLite::WriteBytes(
  22882. 1, this->data(i), output);
  22883. }
  22884. if (_internal_metadata_.have_unknown_fields()) {
  22885. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  22886. _internal_metadata_.unknown_fields(), output);
  22887. }
  22888. // @@protoc_insertion_point(serialize_end:protobuf_unittest.MoreBytes)
  22889. }
  22890. ::google::protobuf::uint8* MoreBytes::InternalSerializeWithCachedSizesToArray(
  22891. bool deterministic, ::google::protobuf::uint8* target) const {
  22892. (void)deterministic; // Unused
  22893. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.MoreBytes)
  22894. ::google::protobuf::uint32 cached_has_bits = 0;
  22895. (void) cached_has_bits;
  22896. // repeated bytes data = 1;
  22897. for (int i = 0, n = this->data_size(); i < n; i++) {
  22898. target = ::google::protobuf::internal::WireFormatLite::
  22899. WriteBytesToArray(1, this->data(i), target);
  22900. }
  22901. if (_internal_metadata_.have_unknown_fields()) {
  22902. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  22903. _internal_metadata_.unknown_fields(), target);
  22904. }
  22905. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.MoreBytes)
  22906. return target;
  22907. }
  22908. size_t MoreBytes::ByteSizeLong() const {
  22909. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.MoreBytes)
  22910. size_t total_size = 0;
  22911. if (_internal_metadata_.have_unknown_fields()) {
  22912. total_size +=
  22913. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  22914. _internal_metadata_.unknown_fields());
  22915. }
  22916. // repeated bytes data = 1;
  22917. total_size += 1 *
  22918. ::google::protobuf::internal::FromIntSize(this->data_size());
  22919. for (int i = 0, n = this->data_size(); i < n; i++) {
  22920. total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
  22921. this->data(i));
  22922. }
  22923. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  22924. SetCachedSize(cached_size);
  22925. return total_size;
  22926. }
  22927. void MoreBytes::MergeFrom(const ::google::protobuf::Message& from) {
  22928. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.MoreBytes)
  22929. GOOGLE_DCHECK_NE(&from, this);
  22930. const MoreBytes* source =
  22931. ::google::protobuf::internal::DynamicCastToGenerated<const MoreBytes>(
  22932. &from);
  22933. if (source == NULL) {
  22934. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.MoreBytes)
  22935. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  22936. } else {
  22937. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.MoreBytes)
  22938. MergeFrom(*source);
  22939. }
  22940. }
  22941. void MoreBytes::MergeFrom(const MoreBytes& from) {
  22942. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.MoreBytes)
  22943. GOOGLE_DCHECK_NE(&from, this);
  22944. _internal_metadata_.MergeFrom(from._internal_metadata_);
  22945. ::google::protobuf::uint32 cached_has_bits = 0;
  22946. (void) cached_has_bits;
  22947. data_.MergeFrom(from.data_);
  22948. }
  22949. void MoreBytes::CopyFrom(const ::google::protobuf::Message& from) {
  22950. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.MoreBytes)
  22951. if (&from == this) return;
  22952. Clear();
  22953. MergeFrom(from);
  22954. }
  22955. void MoreBytes::CopyFrom(const MoreBytes& from) {
  22956. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.MoreBytes)
  22957. if (&from == this) return;
  22958. Clear();
  22959. MergeFrom(from);
  22960. }
  22961. bool MoreBytes::IsInitialized() const {
  22962. return true;
  22963. }
  22964. void MoreBytes::Swap(MoreBytes* other) {
  22965. if (other == this) return;
  22966. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  22967. InternalSwap(other);
  22968. } else {
  22969. MoreBytes* temp = New(GetArenaNoVirtual());
  22970. temp->MergeFrom(*other);
  22971. other->CopyFrom(*this);
  22972. InternalSwap(temp);
  22973. if (GetArenaNoVirtual() == NULL) {
  22974. delete temp;
  22975. }
  22976. }
  22977. }
  22978. void MoreBytes::UnsafeArenaSwap(MoreBytes* other) {
  22979. if (other == this) return;
  22980. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  22981. InternalSwap(other);
  22982. }
  22983. void MoreBytes::InternalSwap(MoreBytes* other) {
  22984. using std::swap;
  22985. data_.InternalSwap(CastToBase(&other->data_));
  22986. swap(_has_bits_[0], other->_has_bits_[0]);
  22987. _internal_metadata_.Swap(&other->_internal_metadata_);
  22988. }
  22989. ::google::protobuf::Metadata MoreBytes::GetMetadata() const {
  22990. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  22991. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  22992. }
  22993. // ===================================================================
  22994. void Int32Message::InitAsDefaultInstance() {
  22995. }
  22996. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  22997. const int Int32Message::kDataFieldNumber;
  22998. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  22999. Int32Message::Int32Message()
  23000. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  23001. ::google::protobuf::internal::InitSCC(
  23002. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Int32Message.base);
  23003. SharedCtor();
  23004. // @@protoc_insertion_point(constructor:protobuf_unittest.Int32Message)
  23005. }
  23006. Int32Message::Int32Message(::google::protobuf::Arena* arena)
  23007. : ::google::protobuf::Message(),
  23008. _internal_metadata_(arena) {
  23009. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Int32Message.base);
  23010. SharedCtor();
  23011. RegisterArenaDtor(arena);
  23012. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.Int32Message)
  23013. }
  23014. Int32Message::Int32Message(const Int32Message& from)
  23015. : ::google::protobuf::Message(),
  23016. _internal_metadata_(NULL),
  23017. _has_bits_(from._has_bits_) {
  23018. _internal_metadata_.MergeFrom(from._internal_metadata_);
  23019. data_ = from.data_;
  23020. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.Int32Message)
  23021. }
  23022. void Int32Message::SharedCtor() {
  23023. data_ = 0;
  23024. }
  23025. Int32Message::~Int32Message() {
  23026. // @@protoc_insertion_point(destructor:protobuf_unittest.Int32Message)
  23027. SharedDtor();
  23028. }
  23029. void Int32Message::SharedDtor() {
  23030. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  23031. }
  23032. void Int32Message::ArenaDtor(void* object) {
  23033. Int32Message* _this = reinterpret_cast< Int32Message* >(object);
  23034. (void)_this;
  23035. }
  23036. void Int32Message::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  23037. }
  23038. void Int32Message::SetCachedSize(int size) const {
  23039. _cached_size_.Set(size);
  23040. }
  23041. const ::google::protobuf::Descriptor* Int32Message::descriptor() {
  23042. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  23043. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  23044. }
  23045. const Int32Message& Int32Message::default_instance() {
  23046. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Int32Message.base);
  23047. return *internal_default_instance();
  23048. }
  23049. void Int32Message::Clear() {
  23050. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.Int32Message)
  23051. ::google::protobuf::uint32 cached_has_bits = 0;
  23052. // Prevent compiler warnings about cached_has_bits being unused
  23053. (void) cached_has_bits;
  23054. data_ = 0;
  23055. _has_bits_.Clear();
  23056. _internal_metadata_.Clear();
  23057. }
  23058. bool Int32Message::MergePartialFromCodedStream(
  23059. ::google::protobuf::io::CodedInputStream* input) {
  23060. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  23061. ::google::protobuf::uint32 tag;
  23062. // @@protoc_insertion_point(parse_start:protobuf_unittest.Int32Message)
  23063. for (;;) {
  23064. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  23065. tag = p.first;
  23066. if (!p.second) goto handle_unusual;
  23067. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  23068. // optional int32 data = 1;
  23069. case 1: {
  23070. if (static_cast< ::google::protobuf::uint8>(tag) ==
  23071. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  23072. set_has_data();
  23073. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  23074. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  23075. input, &data_)));
  23076. } else {
  23077. goto handle_unusual;
  23078. }
  23079. break;
  23080. }
  23081. default: {
  23082. handle_unusual:
  23083. if (tag == 0) {
  23084. goto success;
  23085. }
  23086. DO_(::google::protobuf::internal::WireFormat::SkipField(
  23087. input, tag, _internal_metadata_.mutable_unknown_fields()));
  23088. break;
  23089. }
  23090. }
  23091. }
  23092. success:
  23093. // @@protoc_insertion_point(parse_success:protobuf_unittest.Int32Message)
  23094. return true;
  23095. failure:
  23096. // @@protoc_insertion_point(parse_failure:protobuf_unittest.Int32Message)
  23097. return false;
  23098. #undef DO_
  23099. }
  23100. void Int32Message::SerializeWithCachedSizes(
  23101. ::google::protobuf::io::CodedOutputStream* output) const {
  23102. // @@protoc_insertion_point(serialize_start:protobuf_unittest.Int32Message)
  23103. ::google::protobuf::uint32 cached_has_bits = 0;
  23104. (void) cached_has_bits;
  23105. cached_has_bits = _has_bits_[0];
  23106. // optional int32 data = 1;
  23107. if (cached_has_bits & 0x00000001u) {
  23108. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->data(), output);
  23109. }
  23110. if (_internal_metadata_.have_unknown_fields()) {
  23111. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  23112. _internal_metadata_.unknown_fields(), output);
  23113. }
  23114. // @@protoc_insertion_point(serialize_end:protobuf_unittest.Int32Message)
  23115. }
  23116. ::google::protobuf::uint8* Int32Message::InternalSerializeWithCachedSizesToArray(
  23117. bool deterministic, ::google::protobuf::uint8* target) const {
  23118. (void)deterministic; // Unused
  23119. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.Int32Message)
  23120. ::google::protobuf::uint32 cached_has_bits = 0;
  23121. (void) cached_has_bits;
  23122. cached_has_bits = _has_bits_[0];
  23123. // optional int32 data = 1;
  23124. if (cached_has_bits & 0x00000001u) {
  23125. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->data(), target);
  23126. }
  23127. if (_internal_metadata_.have_unknown_fields()) {
  23128. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  23129. _internal_metadata_.unknown_fields(), target);
  23130. }
  23131. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.Int32Message)
  23132. return target;
  23133. }
  23134. size_t Int32Message::ByteSizeLong() const {
  23135. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.Int32Message)
  23136. size_t total_size = 0;
  23137. if (_internal_metadata_.have_unknown_fields()) {
  23138. total_size +=
  23139. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  23140. _internal_metadata_.unknown_fields());
  23141. }
  23142. // optional int32 data = 1;
  23143. if (has_data()) {
  23144. total_size += 1 +
  23145. ::google::protobuf::internal::WireFormatLite::Int32Size(
  23146. this->data());
  23147. }
  23148. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  23149. SetCachedSize(cached_size);
  23150. return total_size;
  23151. }
  23152. void Int32Message::MergeFrom(const ::google::protobuf::Message& from) {
  23153. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.Int32Message)
  23154. GOOGLE_DCHECK_NE(&from, this);
  23155. const Int32Message* source =
  23156. ::google::protobuf::internal::DynamicCastToGenerated<const Int32Message>(
  23157. &from);
  23158. if (source == NULL) {
  23159. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.Int32Message)
  23160. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  23161. } else {
  23162. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.Int32Message)
  23163. MergeFrom(*source);
  23164. }
  23165. }
  23166. void Int32Message::MergeFrom(const Int32Message& from) {
  23167. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.Int32Message)
  23168. GOOGLE_DCHECK_NE(&from, this);
  23169. _internal_metadata_.MergeFrom(from._internal_metadata_);
  23170. ::google::protobuf::uint32 cached_has_bits = 0;
  23171. (void) cached_has_bits;
  23172. if (from.has_data()) {
  23173. set_data(from.data());
  23174. }
  23175. }
  23176. void Int32Message::CopyFrom(const ::google::protobuf::Message& from) {
  23177. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.Int32Message)
  23178. if (&from == this) return;
  23179. Clear();
  23180. MergeFrom(from);
  23181. }
  23182. void Int32Message::CopyFrom(const Int32Message& from) {
  23183. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.Int32Message)
  23184. if (&from == this) return;
  23185. Clear();
  23186. MergeFrom(from);
  23187. }
  23188. bool Int32Message::IsInitialized() const {
  23189. return true;
  23190. }
  23191. void Int32Message::Swap(Int32Message* other) {
  23192. if (other == this) return;
  23193. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  23194. InternalSwap(other);
  23195. } else {
  23196. Int32Message* temp = New(GetArenaNoVirtual());
  23197. temp->MergeFrom(*other);
  23198. other->CopyFrom(*this);
  23199. InternalSwap(temp);
  23200. if (GetArenaNoVirtual() == NULL) {
  23201. delete temp;
  23202. }
  23203. }
  23204. }
  23205. void Int32Message::UnsafeArenaSwap(Int32Message* other) {
  23206. if (other == this) return;
  23207. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  23208. InternalSwap(other);
  23209. }
  23210. void Int32Message::InternalSwap(Int32Message* other) {
  23211. using std::swap;
  23212. swap(data_, other->data_);
  23213. swap(_has_bits_[0], other->_has_bits_[0]);
  23214. _internal_metadata_.Swap(&other->_internal_metadata_);
  23215. }
  23216. ::google::protobuf::Metadata Int32Message::GetMetadata() const {
  23217. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  23218. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  23219. }
  23220. // ===================================================================
  23221. void Uint32Message::InitAsDefaultInstance() {
  23222. }
  23223. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  23224. const int Uint32Message::kDataFieldNumber;
  23225. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  23226. Uint32Message::Uint32Message()
  23227. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  23228. ::google::protobuf::internal::InitSCC(
  23229. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Uint32Message.base);
  23230. SharedCtor();
  23231. // @@protoc_insertion_point(constructor:protobuf_unittest.Uint32Message)
  23232. }
  23233. Uint32Message::Uint32Message(::google::protobuf::Arena* arena)
  23234. : ::google::protobuf::Message(),
  23235. _internal_metadata_(arena) {
  23236. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Uint32Message.base);
  23237. SharedCtor();
  23238. RegisterArenaDtor(arena);
  23239. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.Uint32Message)
  23240. }
  23241. Uint32Message::Uint32Message(const Uint32Message& from)
  23242. : ::google::protobuf::Message(),
  23243. _internal_metadata_(NULL),
  23244. _has_bits_(from._has_bits_) {
  23245. _internal_metadata_.MergeFrom(from._internal_metadata_);
  23246. data_ = from.data_;
  23247. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.Uint32Message)
  23248. }
  23249. void Uint32Message::SharedCtor() {
  23250. data_ = 0u;
  23251. }
  23252. Uint32Message::~Uint32Message() {
  23253. // @@protoc_insertion_point(destructor:protobuf_unittest.Uint32Message)
  23254. SharedDtor();
  23255. }
  23256. void Uint32Message::SharedDtor() {
  23257. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  23258. }
  23259. void Uint32Message::ArenaDtor(void* object) {
  23260. Uint32Message* _this = reinterpret_cast< Uint32Message* >(object);
  23261. (void)_this;
  23262. }
  23263. void Uint32Message::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  23264. }
  23265. void Uint32Message::SetCachedSize(int size) const {
  23266. _cached_size_.Set(size);
  23267. }
  23268. const ::google::protobuf::Descriptor* Uint32Message::descriptor() {
  23269. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  23270. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  23271. }
  23272. const Uint32Message& Uint32Message::default_instance() {
  23273. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Uint32Message.base);
  23274. return *internal_default_instance();
  23275. }
  23276. void Uint32Message::Clear() {
  23277. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.Uint32Message)
  23278. ::google::protobuf::uint32 cached_has_bits = 0;
  23279. // Prevent compiler warnings about cached_has_bits being unused
  23280. (void) cached_has_bits;
  23281. data_ = 0u;
  23282. _has_bits_.Clear();
  23283. _internal_metadata_.Clear();
  23284. }
  23285. bool Uint32Message::MergePartialFromCodedStream(
  23286. ::google::protobuf::io::CodedInputStream* input) {
  23287. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  23288. ::google::protobuf::uint32 tag;
  23289. // @@protoc_insertion_point(parse_start:protobuf_unittest.Uint32Message)
  23290. for (;;) {
  23291. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  23292. tag = p.first;
  23293. if (!p.second) goto handle_unusual;
  23294. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  23295. // optional uint32 data = 1;
  23296. case 1: {
  23297. if (static_cast< ::google::protobuf::uint8>(tag) ==
  23298. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  23299. set_has_data();
  23300. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  23301. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  23302. input, &data_)));
  23303. } else {
  23304. goto handle_unusual;
  23305. }
  23306. break;
  23307. }
  23308. default: {
  23309. handle_unusual:
  23310. if (tag == 0) {
  23311. goto success;
  23312. }
  23313. DO_(::google::protobuf::internal::WireFormat::SkipField(
  23314. input, tag, _internal_metadata_.mutable_unknown_fields()));
  23315. break;
  23316. }
  23317. }
  23318. }
  23319. success:
  23320. // @@protoc_insertion_point(parse_success:protobuf_unittest.Uint32Message)
  23321. return true;
  23322. failure:
  23323. // @@protoc_insertion_point(parse_failure:protobuf_unittest.Uint32Message)
  23324. return false;
  23325. #undef DO_
  23326. }
  23327. void Uint32Message::SerializeWithCachedSizes(
  23328. ::google::protobuf::io::CodedOutputStream* output) const {
  23329. // @@protoc_insertion_point(serialize_start:protobuf_unittest.Uint32Message)
  23330. ::google::protobuf::uint32 cached_has_bits = 0;
  23331. (void) cached_has_bits;
  23332. cached_has_bits = _has_bits_[0];
  23333. // optional uint32 data = 1;
  23334. if (cached_has_bits & 0x00000001u) {
  23335. ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->data(), output);
  23336. }
  23337. if (_internal_metadata_.have_unknown_fields()) {
  23338. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  23339. _internal_metadata_.unknown_fields(), output);
  23340. }
  23341. // @@protoc_insertion_point(serialize_end:protobuf_unittest.Uint32Message)
  23342. }
  23343. ::google::protobuf::uint8* Uint32Message::InternalSerializeWithCachedSizesToArray(
  23344. bool deterministic, ::google::protobuf::uint8* target) const {
  23345. (void)deterministic; // Unused
  23346. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.Uint32Message)
  23347. ::google::protobuf::uint32 cached_has_bits = 0;
  23348. (void) cached_has_bits;
  23349. cached_has_bits = _has_bits_[0];
  23350. // optional uint32 data = 1;
  23351. if (cached_has_bits & 0x00000001u) {
  23352. target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->data(), target);
  23353. }
  23354. if (_internal_metadata_.have_unknown_fields()) {
  23355. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  23356. _internal_metadata_.unknown_fields(), target);
  23357. }
  23358. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.Uint32Message)
  23359. return target;
  23360. }
  23361. size_t Uint32Message::ByteSizeLong() const {
  23362. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.Uint32Message)
  23363. size_t total_size = 0;
  23364. if (_internal_metadata_.have_unknown_fields()) {
  23365. total_size +=
  23366. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  23367. _internal_metadata_.unknown_fields());
  23368. }
  23369. // optional uint32 data = 1;
  23370. if (has_data()) {
  23371. total_size += 1 +
  23372. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  23373. this->data());
  23374. }
  23375. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  23376. SetCachedSize(cached_size);
  23377. return total_size;
  23378. }
  23379. void Uint32Message::MergeFrom(const ::google::protobuf::Message& from) {
  23380. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.Uint32Message)
  23381. GOOGLE_DCHECK_NE(&from, this);
  23382. const Uint32Message* source =
  23383. ::google::protobuf::internal::DynamicCastToGenerated<const Uint32Message>(
  23384. &from);
  23385. if (source == NULL) {
  23386. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.Uint32Message)
  23387. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  23388. } else {
  23389. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.Uint32Message)
  23390. MergeFrom(*source);
  23391. }
  23392. }
  23393. void Uint32Message::MergeFrom(const Uint32Message& from) {
  23394. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.Uint32Message)
  23395. GOOGLE_DCHECK_NE(&from, this);
  23396. _internal_metadata_.MergeFrom(from._internal_metadata_);
  23397. ::google::protobuf::uint32 cached_has_bits = 0;
  23398. (void) cached_has_bits;
  23399. if (from.has_data()) {
  23400. set_data(from.data());
  23401. }
  23402. }
  23403. void Uint32Message::CopyFrom(const ::google::protobuf::Message& from) {
  23404. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.Uint32Message)
  23405. if (&from == this) return;
  23406. Clear();
  23407. MergeFrom(from);
  23408. }
  23409. void Uint32Message::CopyFrom(const Uint32Message& from) {
  23410. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.Uint32Message)
  23411. if (&from == this) return;
  23412. Clear();
  23413. MergeFrom(from);
  23414. }
  23415. bool Uint32Message::IsInitialized() const {
  23416. return true;
  23417. }
  23418. void Uint32Message::Swap(Uint32Message* other) {
  23419. if (other == this) return;
  23420. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  23421. InternalSwap(other);
  23422. } else {
  23423. Uint32Message* temp = New(GetArenaNoVirtual());
  23424. temp->MergeFrom(*other);
  23425. other->CopyFrom(*this);
  23426. InternalSwap(temp);
  23427. if (GetArenaNoVirtual() == NULL) {
  23428. delete temp;
  23429. }
  23430. }
  23431. }
  23432. void Uint32Message::UnsafeArenaSwap(Uint32Message* other) {
  23433. if (other == this) return;
  23434. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  23435. InternalSwap(other);
  23436. }
  23437. void Uint32Message::InternalSwap(Uint32Message* other) {
  23438. using std::swap;
  23439. swap(data_, other->data_);
  23440. swap(_has_bits_[0], other->_has_bits_[0]);
  23441. _internal_metadata_.Swap(&other->_internal_metadata_);
  23442. }
  23443. ::google::protobuf::Metadata Uint32Message::GetMetadata() const {
  23444. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  23445. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  23446. }
  23447. // ===================================================================
  23448. void Int64Message::InitAsDefaultInstance() {
  23449. }
  23450. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  23451. const int Int64Message::kDataFieldNumber;
  23452. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  23453. Int64Message::Int64Message()
  23454. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  23455. ::google::protobuf::internal::InitSCC(
  23456. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Int64Message.base);
  23457. SharedCtor();
  23458. // @@protoc_insertion_point(constructor:protobuf_unittest.Int64Message)
  23459. }
  23460. Int64Message::Int64Message(::google::protobuf::Arena* arena)
  23461. : ::google::protobuf::Message(),
  23462. _internal_metadata_(arena) {
  23463. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Int64Message.base);
  23464. SharedCtor();
  23465. RegisterArenaDtor(arena);
  23466. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.Int64Message)
  23467. }
  23468. Int64Message::Int64Message(const Int64Message& from)
  23469. : ::google::protobuf::Message(),
  23470. _internal_metadata_(NULL),
  23471. _has_bits_(from._has_bits_) {
  23472. _internal_metadata_.MergeFrom(from._internal_metadata_);
  23473. data_ = from.data_;
  23474. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.Int64Message)
  23475. }
  23476. void Int64Message::SharedCtor() {
  23477. data_ = GOOGLE_LONGLONG(0);
  23478. }
  23479. Int64Message::~Int64Message() {
  23480. // @@protoc_insertion_point(destructor:protobuf_unittest.Int64Message)
  23481. SharedDtor();
  23482. }
  23483. void Int64Message::SharedDtor() {
  23484. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  23485. }
  23486. void Int64Message::ArenaDtor(void* object) {
  23487. Int64Message* _this = reinterpret_cast< Int64Message* >(object);
  23488. (void)_this;
  23489. }
  23490. void Int64Message::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  23491. }
  23492. void Int64Message::SetCachedSize(int size) const {
  23493. _cached_size_.Set(size);
  23494. }
  23495. const ::google::protobuf::Descriptor* Int64Message::descriptor() {
  23496. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  23497. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  23498. }
  23499. const Int64Message& Int64Message::default_instance() {
  23500. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Int64Message.base);
  23501. return *internal_default_instance();
  23502. }
  23503. void Int64Message::Clear() {
  23504. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.Int64Message)
  23505. ::google::protobuf::uint32 cached_has_bits = 0;
  23506. // Prevent compiler warnings about cached_has_bits being unused
  23507. (void) cached_has_bits;
  23508. data_ = GOOGLE_LONGLONG(0);
  23509. _has_bits_.Clear();
  23510. _internal_metadata_.Clear();
  23511. }
  23512. bool Int64Message::MergePartialFromCodedStream(
  23513. ::google::protobuf::io::CodedInputStream* input) {
  23514. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  23515. ::google::protobuf::uint32 tag;
  23516. // @@protoc_insertion_point(parse_start:protobuf_unittest.Int64Message)
  23517. for (;;) {
  23518. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  23519. tag = p.first;
  23520. if (!p.second) goto handle_unusual;
  23521. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  23522. // optional int64 data = 1;
  23523. case 1: {
  23524. if (static_cast< ::google::protobuf::uint8>(tag) ==
  23525. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  23526. set_has_data();
  23527. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  23528. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  23529. input, &data_)));
  23530. } else {
  23531. goto handle_unusual;
  23532. }
  23533. break;
  23534. }
  23535. default: {
  23536. handle_unusual:
  23537. if (tag == 0) {
  23538. goto success;
  23539. }
  23540. DO_(::google::protobuf::internal::WireFormat::SkipField(
  23541. input, tag, _internal_metadata_.mutable_unknown_fields()));
  23542. break;
  23543. }
  23544. }
  23545. }
  23546. success:
  23547. // @@protoc_insertion_point(parse_success:protobuf_unittest.Int64Message)
  23548. return true;
  23549. failure:
  23550. // @@protoc_insertion_point(parse_failure:protobuf_unittest.Int64Message)
  23551. return false;
  23552. #undef DO_
  23553. }
  23554. void Int64Message::SerializeWithCachedSizes(
  23555. ::google::protobuf::io::CodedOutputStream* output) const {
  23556. // @@protoc_insertion_point(serialize_start:protobuf_unittest.Int64Message)
  23557. ::google::protobuf::uint32 cached_has_bits = 0;
  23558. (void) cached_has_bits;
  23559. cached_has_bits = _has_bits_[0];
  23560. // optional int64 data = 1;
  23561. if (cached_has_bits & 0x00000001u) {
  23562. ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->data(), output);
  23563. }
  23564. if (_internal_metadata_.have_unknown_fields()) {
  23565. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  23566. _internal_metadata_.unknown_fields(), output);
  23567. }
  23568. // @@protoc_insertion_point(serialize_end:protobuf_unittest.Int64Message)
  23569. }
  23570. ::google::protobuf::uint8* Int64Message::InternalSerializeWithCachedSizesToArray(
  23571. bool deterministic, ::google::protobuf::uint8* target) const {
  23572. (void)deterministic; // Unused
  23573. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.Int64Message)
  23574. ::google::protobuf::uint32 cached_has_bits = 0;
  23575. (void) cached_has_bits;
  23576. cached_has_bits = _has_bits_[0];
  23577. // optional int64 data = 1;
  23578. if (cached_has_bits & 0x00000001u) {
  23579. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->data(), target);
  23580. }
  23581. if (_internal_metadata_.have_unknown_fields()) {
  23582. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  23583. _internal_metadata_.unknown_fields(), target);
  23584. }
  23585. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.Int64Message)
  23586. return target;
  23587. }
  23588. size_t Int64Message::ByteSizeLong() const {
  23589. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.Int64Message)
  23590. size_t total_size = 0;
  23591. if (_internal_metadata_.have_unknown_fields()) {
  23592. total_size +=
  23593. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  23594. _internal_metadata_.unknown_fields());
  23595. }
  23596. // optional int64 data = 1;
  23597. if (has_data()) {
  23598. total_size += 1 +
  23599. ::google::protobuf::internal::WireFormatLite::Int64Size(
  23600. this->data());
  23601. }
  23602. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  23603. SetCachedSize(cached_size);
  23604. return total_size;
  23605. }
  23606. void Int64Message::MergeFrom(const ::google::protobuf::Message& from) {
  23607. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.Int64Message)
  23608. GOOGLE_DCHECK_NE(&from, this);
  23609. const Int64Message* source =
  23610. ::google::protobuf::internal::DynamicCastToGenerated<const Int64Message>(
  23611. &from);
  23612. if (source == NULL) {
  23613. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.Int64Message)
  23614. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  23615. } else {
  23616. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.Int64Message)
  23617. MergeFrom(*source);
  23618. }
  23619. }
  23620. void Int64Message::MergeFrom(const Int64Message& from) {
  23621. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.Int64Message)
  23622. GOOGLE_DCHECK_NE(&from, this);
  23623. _internal_metadata_.MergeFrom(from._internal_metadata_);
  23624. ::google::protobuf::uint32 cached_has_bits = 0;
  23625. (void) cached_has_bits;
  23626. if (from.has_data()) {
  23627. set_data(from.data());
  23628. }
  23629. }
  23630. void Int64Message::CopyFrom(const ::google::protobuf::Message& from) {
  23631. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.Int64Message)
  23632. if (&from == this) return;
  23633. Clear();
  23634. MergeFrom(from);
  23635. }
  23636. void Int64Message::CopyFrom(const Int64Message& from) {
  23637. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.Int64Message)
  23638. if (&from == this) return;
  23639. Clear();
  23640. MergeFrom(from);
  23641. }
  23642. bool Int64Message::IsInitialized() const {
  23643. return true;
  23644. }
  23645. void Int64Message::Swap(Int64Message* other) {
  23646. if (other == this) return;
  23647. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  23648. InternalSwap(other);
  23649. } else {
  23650. Int64Message* temp = New(GetArenaNoVirtual());
  23651. temp->MergeFrom(*other);
  23652. other->CopyFrom(*this);
  23653. InternalSwap(temp);
  23654. if (GetArenaNoVirtual() == NULL) {
  23655. delete temp;
  23656. }
  23657. }
  23658. }
  23659. void Int64Message::UnsafeArenaSwap(Int64Message* other) {
  23660. if (other == this) return;
  23661. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  23662. InternalSwap(other);
  23663. }
  23664. void Int64Message::InternalSwap(Int64Message* other) {
  23665. using std::swap;
  23666. swap(data_, other->data_);
  23667. swap(_has_bits_[0], other->_has_bits_[0]);
  23668. _internal_metadata_.Swap(&other->_internal_metadata_);
  23669. }
  23670. ::google::protobuf::Metadata Int64Message::GetMetadata() const {
  23671. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  23672. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  23673. }
  23674. // ===================================================================
  23675. void Uint64Message::InitAsDefaultInstance() {
  23676. }
  23677. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  23678. const int Uint64Message::kDataFieldNumber;
  23679. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  23680. Uint64Message::Uint64Message()
  23681. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  23682. ::google::protobuf::internal::InitSCC(
  23683. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Uint64Message.base);
  23684. SharedCtor();
  23685. // @@protoc_insertion_point(constructor:protobuf_unittest.Uint64Message)
  23686. }
  23687. Uint64Message::Uint64Message(::google::protobuf::Arena* arena)
  23688. : ::google::protobuf::Message(),
  23689. _internal_metadata_(arena) {
  23690. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Uint64Message.base);
  23691. SharedCtor();
  23692. RegisterArenaDtor(arena);
  23693. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.Uint64Message)
  23694. }
  23695. Uint64Message::Uint64Message(const Uint64Message& from)
  23696. : ::google::protobuf::Message(),
  23697. _internal_metadata_(NULL),
  23698. _has_bits_(from._has_bits_) {
  23699. _internal_metadata_.MergeFrom(from._internal_metadata_);
  23700. data_ = from.data_;
  23701. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.Uint64Message)
  23702. }
  23703. void Uint64Message::SharedCtor() {
  23704. data_ = GOOGLE_ULONGLONG(0);
  23705. }
  23706. Uint64Message::~Uint64Message() {
  23707. // @@protoc_insertion_point(destructor:protobuf_unittest.Uint64Message)
  23708. SharedDtor();
  23709. }
  23710. void Uint64Message::SharedDtor() {
  23711. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  23712. }
  23713. void Uint64Message::ArenaDtor(void* object) {
  23714. Uint64Message* _this = reinterpret_cast< Uint64Message* >(object);
  23715. (void)_this;
  23716. }
  23717. void Uint64Message::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  23718. }
  23719. void Uint64Message::SetCachedSize(int size) const {
  23720. _cached_size_.Set(size);
  23721. }
  23722. const ::google::protobuf::Descriptor* Uint64Message::descriptor() {
  23723. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  23724. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  23725. }
  23726. const Uint64Message& Uint64Message::default_instance() {
  23727. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_Uint64Message.base);
  23728. return *internal_default_instance();
  23729. }
  23730. void Uint64Message::Clear() {
  23731. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.Uint64Message)
  23732. ::google::protobuf::uint32 cached_has_bits = 0;
  23733. // Prevent compiler warnings about cached_has_bits being unused
  23734. (void) cached_has_bits;
  23735. data_ = GOOGLE_ULONGLONG(0);
  23736. _has_bits_.Clear();
  23737. _internal_metadata_.Clear();
  23738. }
  23739. bool Uint64Message::MergePartialFromCodedStream(
  23740. ::google::protobuf::io::CodedInputStream* input) {
  23741. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  23742. ::google::protobuf::uint32 tag;
  23743. // @@protoc_insertion_point(parse_start:protobuf_unittest.Uint64Message)
  23744. for (;;) {
  23745. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  23746. tag = p.first;
  23747. if (!p.second) goto handle_unusual;
  23748. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  23749. // optional uint64 data = 1;
  23750. case 1: {
  23751. if (static_cast< ::google::protobuf::uint8>(tag) ==
  23752. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  23753. set_has_data();
  23754. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  23755. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  23756. input, &data_)));
  23757. } else {
  23758. goto handle_unusual;
  23759. }
  23760. break;
  23761. }
  23762. default: {
  23763. handle_unusual:
  23764. if (tag == 0) {
  23765. goto success;
  23766. }
  23767. DO_(::google::protobuf::internal::WireFormat::SkipField(
  23768. input, tag, _internal_metadata_.mutable_unknown_fields()));
  23769. break;
  23770. }
  23771. }
  23772. }
  23773. success:
  23774. // @@protoc_insertion_point(parse_success:protobuf_unittest.Uint64Message)
  23775. return true;
  23776. failure:
  23777. // @@protoc_insertion_point(parse_failure:protobuf_unittest.Uint64Message)
  23778. return false;
  23779. #undef DO_
  23780. }
  23781. void Uint64Message::SerializeWithCachedSizes(
  23782. ::google::protobuf::io::CodedOutputStream* output) const {
  23783. // @@protoc_insertion_point(serialize_start:protobuf_unittest.Uint64Message)
  23784. ::google::protobuf::uint32 cached_has_bits = 0;
  23785. (void) cached_has_bits;
  23786. cached_has_bits = _has_bits_[0];
  23787. // optional uint64 data = 1;
  23788. if (cached_has_bits & 0x00000001u) {
  23789. ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->data(), output);
  23790. }
  23791. if (_internal_metadata_.have_unknown_fields()) {
  23792. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  23793. _internal_metadata_.unknown_fields(), output);
  23794. }
  23795. // @@protoc_insertion_point(serialize_end:protobuf_unittest.Uint64Message)
  23796. }
  23797. ::google::protobuf::uint8* Uint64Message::InternalSerializeWithCachedSizesToArray(
  23798. bool deterministic, ::google::protobuf::uint8* target) const {
  23799. (void)deterministic; // Unused
  23800. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.Uint64Message)
  23801. ::google::protobuf::uint32 cached_has_bits = 0;
  23802. (void) cached_has_bits;
  23803. cached_has_bits = _has_bits_[0];
  23804. // optional uint64 data = 1;
  23805. if (cached_has_bits & 0x00000001u) {
  23806. target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->data(), target);
  23807. }
  23808. if (_internal_metadata_.have_unknown_fields()) {
  23809. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  23810. _internal_metadata_.unknown_fields(), target);
  23811. }
  23812. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.Uint64Message)
  23813. return target;
  23814. }
  23815. size_t Uint64Message::ByteSizeLong() const {
  23816. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.Uint64Message)
  23817. size_t total_size = 0;
  23818. if (_internal_metadata_.have_unknown_fields()) {
  23819. total_size +=
  23820. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  23821. _internal_metadata_.unknown_fields());
  23822. }
  23823. // optional uint64 data = 1;
  23824. if (has_data()) {
  23825. total_size += 1 +
  23826. ::google::protobuf::internal::WireFormatLite::UInt64Size(
  23827. this->data());
  23828. }
  23829. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  23830. SetCachedSize(cached_size);
  23831. return total_size;
  23832. }
  23833. void Uint64Message::MergeFrom(const ::google::protobuf::Message& from) {
  23834. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.Uint64Message)
  23835. GOOGLE_DCHECK_NE(&from, this);
  23836. const Uint64Message* source =
  23837. ::google::protobuf::internal::DynamicCastToGenerated<const Uint64Message>(
  23838. &from);
  23839. if (source == NULL) {
  23840. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.Uint64Message)
  23841. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  23842. } else {
  23843. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.Uint64Message)
  23844. MergeFrom(*source);
  23845. }
  23846. }
  23847. void Uint64Message::MergeFrom(const Uint64Message& from) {
  23848. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.Uint64Message)
  23849. GOOGLE_DCHECK_NE(&from, this);
  23850. _internal_metadata_.MergeFrom(from._internal_metadata_);
  23851. ::google::protobuf::uint32 cached_has_bits = 0;
  23852. (void) cached_has_bits;
  23853. if (from.has_data()) {
  23854. set_data(from.data());
  23855. }
  23856. }
  23857. void Uint64Message::CopyFrom(const ::google::protobuf::Message& from) {
  23858. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.Uint64Message)
  23859. if (&from == this) return;
  23860. Clear();
  23861. MergeFrom(from);
  23862. }
  23863. void Uint64Message::CopyFrom(const Uint64Message& from) {
  23864. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.Uint64Message)
  23865. if (&from == this) return;
  23866. Clear();
  23867. MergeFrom(from);
  23868. }
  23869. bool Uint64Message::IsInitialized() const {
  23870. return true;
  23871. }
  23872. void Uint64Message::Swap(Uint64Message* other) {
  23873. if (other == this) return;
  23874. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  23875. InternalSwap(other);
  23876. } else {
  23877. Uint64Message* temp = New(GetArenaNoVirtual());
  23878. temp->MergeFrom(*other);
  23879. other->CopyFrom(*this);
  23880. InternalSwap(temp);
  23881. if (GetArenaNoVirtual() == NULL) {
  23882. delete temp;
  23883. }
  23884. }
  23885. }
  23886. void Uint64Message::UnsafeArenaSwap(Uint64Message* other) {
  23887. if (other == this) return;
  23888. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  23889. InternalSwap(other);
  23890. }
  23891. void Uint64Message::InternalSwap(Uint64Message* other) {
  23892. using std::swap;
  23893. swap(data_, other->data_);
  23894. swap(_has_bits_[0], other->_has_bits_[0]);
  23895. _internal_metadata_.Swap(&other->_internal_metadata_);
  23896. }
  23897. ::google::protobuf::Metadata Uint64Message::GetMetadata() const {
  23898. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  23899. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  23900. }
  23901. // ===================================================================
  23902. void BoolMessage::InitAsDefaultInstance() {
  23903. }
  23904. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  23905. const int BoolMessage::kDataFieldNumber;
  23906. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  23907. BoolMessage::BoolMessage()
  23908. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  23909. ::google::protobuf::internal::InitSCC(
  23910. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BoolMessage.base);
  23911. SharedCtor();
  23912. // @@protoc_insertion_point(constructor:protobuf_unittest.BoolMessage)
  23913. }
  23914. BoolMessage::BoolMessage(::google::protobuf::Arena* arena)
  23915. : ::google::protobuf::Message(),
  23916. _internal_metadata_(arena) {
  23917. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BoolMessage.base);
  23918. SharedCtor();
  23919. RegisterArenaDtor(arena);
  23920. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.BoolMessage)
  23921. }
  23922. BoolMessage::BoolMessage(const BoolMessage& from)
  23923. : ::google::protobuf::Message(),
  23924. _internal_metadata_(NULL),
  23925. _has_bits_(from._has_bits_) {
  23926. _internal_metadata_.MergeFrom(from._internal_metadata_);
  23927. data_ = from.data_;
  23928. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.BoolMessage)
  23929. }
  23930. void BoolMessage::SharedCtor() {
  23931. data_ = false;
  23932. }
  23933. BoolMessage::~BoolMessage() {
  23934. // @@protoc_insertion_point(destructor:protobuf_unittest.BoolMessage)
  23935. SharedDtor();
  23936. }
  23937. void BoolMessage::SharedDtor() {
  23938. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  23939. }
  23940. void BoolMessage::ArenaDtor(void* object) {
  23941. BoolMessage* _this = reinterpret_cast< BoolMessage* >(object);
  23942. (void)_this;
  23943. }
  23944. void BoolMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  23945. }
  23946. void BoolMessage::SetCachedSize(int size) const {
  23947. _cached_size_.Set(size);
  23948. }
  23949. const ::google::protobuf::Descriptor* BoolMessage::descriptor() {
  23950. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  23951. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  23952. }
  23953. const BoolMessage& BoolMessage::default_instance() {
  23954. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BoolMessage.base);
  23955. return *internal_default_instance();
  23956. }
  23957. void BoolMessage::Clear() {
  23958. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.BoolMessage)
  23959. ::google::protobuf::uint32 cached_has_bits = 0;
  23960. // Prevent compiler warnings about cached_has_bits being unused
  23961. (void) cached_has_bits;
  23962. data_ = false;
  23963. _has_bits_.Clear();
  23964. _internal_metadata_.Clear();
  23965. }
  23966. bool BoolMessage::MergePartialFromCodedStream(
  23967. ::google::protobuf::io::CodedInputStream* input) {
  23968. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  23969. ::google::protobuf::uint32 tag;
  23970. // @@protoc_insertion_point(parse_start:protobuf_unittest.BoolMessage)
  23971. for (;;) {
  23972. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  23973. tag = p.first;
  23974. if (!p.second) goto handle_unusual;
  23975. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  23976. // optional bool data = 1;
  23977. case 1: {
  23978. if (static_cast< ::google::protobuf::uint8>(tag) ==
  23979. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  23980. set_has_data();
  23981. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  23982. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  23983. input, &data_)));
  23984. } else {
  23985. goto handle_unusual;
  23986. }
  23987. break;
  23988. }
  23989. default: {
  23990. handle_unusual:
  23991. if (tag == 0) {
  23992. goto success;
  23993. }
  23994. DO_(::google::protobuf::internal::WireFormat::SkipField(
  23995. input, tag, _internal_metadata_.mutable_unknown_fields()));
  23996. break;
  23997. }
  23998. }
  23999. }
  24000. success:
  24001. // @@protoc_insertion_point(parse_success:protobuf_unittest.BoolMessage)
  24002. return true;
  24003. failure:
  24004. // @@protoc_insertion_point(parse_failure:protobuf_unittest.BoolMessage)
  24005. return false;
  24006. #undef DO_
  24007. }
  24008. void BoolMessage::SerializeWithCachedSizes(
  24009. ::google::protobuf::io::CodedOutputStream* output) const {
  24010. // @@protoc_insertion_point(serialize_start:protobuf_unittest.BoolMessage)
  24011. ::google::protobuf::uint32 cached_has_bits = 0;
  24012. (void) cached_has_bits;
  24013. cached_has_bits = _has_bits_[0];
  24014. // optional bool data = 1;
  24015. if (cached_has_bits & 0x00000001u) {
  24016. ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->data(), output);
  24017. }
  24018. if (_internal_metadata_.have_unknown_fields()) {
  24019. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  24020. _internal_metadata_.unknown_fields(), output);
  24021. }
  24022. // @@protoc_insertion_point(serialize_end:protobuf_unittest.BoolMessage)
  24023. }
  24024. ::google::protobuf::uint8* BoolMessage::InternalSerializeWithCachedSizesToArray(
  24025. bool deterministic, ::google::protobuf::uint8* target) const {
  24026. (void)deterministic; // Unused
  24027. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.BoolMessage)
  24028. ::google::protobuf::uint32 cached_has_bits = 0;
  24029. (void) cached_has_bits;
  24030. cached_has_bits = _has_bits_[0];
  24031. // optional bool data = 1;
  24032. if (cached_has_bits & 0x00000001u) {
  24033. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->data(), target);
  24034. }
  24035. if (_internal_metadata_.have_unknown_fields()) {
  24036. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  24037. _internal_metadata_.unknown_fields(), target);
  24038. }
  24039. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.BoolMessage)
  24040. return target;
  24041. }
  24042. size_t BoolMessage::ByteSizeLong() const {
  24043. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.BoolMessage)
  24044. size_t total_size = 0;
  24045. if (_internal_metadata_.have_unknown_fields()) {
  24046. total_size +=
  24047. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  24048. _internal_metadata_.unknown_fields());
  24049. }
  24050. // optional bool data = 1;
  24051. if (has_data()) {
  24052. total_size += 1 + 1;
  24053. }
  24054. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  24055. SetCachedSize(cached_size);
  24056. return total_size;
  24057. }
  24058. void BoolMessage::MergeFrom(const ::google::protobuf::Message& from) {
  24059. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.BoolMessage)
  24060. GOOGLE_DCHECK_NE(&from, this);
  24061. const BoolMessage* source =
  24062. ::google::protobuf::internal::DynamicCastToGenerated<const BoolMessage>(
  24063. &from);
  24064. if (source == NULL) {
  24065. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.BoolMessage)
  24066. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  24067. } else {
  24068. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.BoolMessage)
  24069. MergeFrom(*source);
  24070. }
  24071. }
  24072. void BoolMessage::MergeFrom(const BoolMessage& from) {
  24073. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.BoolMessage)
  24074. GOOGLE_DCHECK_NE(&from, this);
  24075. _internal_metadata_.MergeFrom(from._internal_metadata_);
  24076. ::google::protobuf::uint32 cached_has_bits = 0;
  24077. (void) cached_has_bits;
  24078. if (from.has_data()) {
  24079. set_data(from.data());
  24080. }
  24081. }
  24082. void BoolMessage::CopyFrom(const ::google::protobuf::Message& from) {
  24083. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.BoolMessage)
  24084. if (&from == this) return;
  24085. Clear();
  24086. MergeFrom(from);
  24087. }
  24088. void BoolMessage::CopyFrom(const BoolMessage& from) {
  24089. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.BoolMessage)
  24090. if (&from == this) return;
  24091. Clear();
  24092. MergeFrom(from);
  24093. }
  24094. bool BoolMessage::IsInitialized() const {
  24095. return true;
  24096. }
  24097. void BoolMessage::Swap(BoolMessage* other) {
  24098. if (other == this) return;
  24099. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  24100. InternalSwap(other);
  24101. } else {
  24102. BoolMessage* temp = New(GetArenaNoVirtual());
  24103. temp->MergeFrom(*other);
  24104. other->CopyFrom(*this);
  24105. InternalSwap(temp);
  24106. if (GetArenaNoVirtual() == NULL) {
  24107. delete temp;
  24108. }
  24109. }
  24110. }
  24111. void BoolMessage::UnsafeArenaSwap(BoolMessage* other) {
  24112. if (other == this) return;
  24113. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  24114. InternalSwap(other);
  24115. }
  24116. void BoolMessage::InternalSwap(BoolMessage* other) {
  24117. using std::swap;
  24118. swap(data_, other->data_);
  24119. swap(_has_bits_[0], other->_has_bits_[0]);
  24120. _internal_metadata_.Swap(&other->_internal_metadata_);
  24121. }
  24122. ::google::protobuf::Metadata BoolMessage::GetMetadata() const {
  24123. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  24124. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  24125. }
  24126. // ===================================================================
  24127. void TestOneof_FooGroup::InitAsDefaultInstance() {
  24128. }
  24129. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  24130. const int TestOneof_FooGroup::kAFieldNumber;
  24131. const int TestOneof_FooGroup::kBFieldNumber;
  24132. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  24133. TestOneof_FooGroup::TestOneof_FooGroup()
  24134. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  24135. ::google::protobuf::internal::InitSCC(
  24136. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof_FooGroup.base);
  24137. SharedCtor();
  24138. // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneof.FooGroup)
  24139. }
  24140. TestOneof_FooGroup::TestOneof_FooGroup(::google::protobuf::Arena* arena)
  24141. : ::google::protobuf::Message(),
  24142. _internal_metadata_(arena) {
  24143. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof_FooGroup.base);
  24144. SharedCtor();
  24145. RegisterArenaDtor(arena);
  24146. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestOneof.FooGroup)
  24147. }
  24148. TestOneof_FooGroup::TestOneof_FooGroup(const TestOneof_FooGroup& from)
  24149. : ::google::protobuf::Message(),
  24150. _internal_metadata_(NULL),
  24151. _has_bits_(from._has_bits_) {
  24152. _internal_metadata_.MergeFrom(from._internal_metadata_);
  24153. b_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  24154. if (from.has_b()) {
  24155. b_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.b(),
  24156. GetArenaNoVirtual());
  24157. }
  24158. a_ = from.a_;
  24159. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneof.FooGroup)
  24160. }
  24161. void TestOneof_FooGroup::SharedCtor() {
  24162. b_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  24163. a_ = 0;
  24164. }
  24165. TestOneof_FooGroup::~TestOneof_FooGroup() {
  24166. // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneof.FooGroup)
  24167. SharedDtor();
  24168. }
  24169. void TestOneof_FooGroup::SharedDtor() {
  24170. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  24171. b_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  24172. }
  24173. void TestOneof_FooGroup::ArenaDtor(void* object) {
  24174. TestOneof_FooGroup* _this = reinterpret_cast< TestOneof_FooGroup* >(object);
  24175. (void)_this;
  24176. }
  24177. void TestOneof_FooGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  24178. }
  24179. void TestOneof_FooGroup::SetCachedSize(int size) const {
  24180. _cached_size_.Set(size);
  24181. }
  24182. const ::google::protobuf::Descriptor* TestOneof_FooGroup::descriptor() {
  24183. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  24184. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  24185. }
  24186. const TestOneof_FooGroup& TestOneof_FooGroup::default_instance() {
  24187. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof_FooGroup.base);
  24188. return *internal_default_instance();
  24189. }
  24190. void TestOneof_FooGroup::Clear() {
  24191. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestOneof.FooGroup)
  24192. ::google::protobuf::uint32 cached_has_bits = 0;
  24193. // Prevent compiler warnings about cached_has_bits being unused
  24194. (void) cached_has_bits;
  24195. cached_has_bits = _has_bits_[0];
  24196. if (cached_has_bits & 0x00000001u) {
  24197. b_.ClearNonDefaultToEmpty();
  24198. }
  24199. a_ = 0;
  24200. _has_bits_.Clear();
  24201. _internal_metadata_.Clear();
  24202. }
  24203. bool TestOneof_FooGroup::MergePartialFromCodedStream(
  24204. ::google::protobuf::io::CodedInputStream* input) {
  24205. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  24206. ::google::protobuf::uint32 tag;
  24207. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestOneof.FooGroup)
  24208. for (;;) {
  24209. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  24210. tag = p.first;
  24211. if (!p.second) goto handle_unusual;
  24212. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  24213. // optional int32 a = 5;
  24214. case 5: {
  24215. if (static_cast< ::google::protobuf::uint8>(tag) ==
  24216. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  24217. set_has_a();
  24218. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  24219. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  24220. input, &a_)));
  24221. } else {
  24222. goto handle_unusual;
  24223. }
  24224. break;
  24225. }
  24226. // optional string b = 6;
  24227. case 6: {
  24228. if (static_cast< ::google::protobuf::uint8>(tag) ==
  24229. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  24230. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  24231. input, this->mutable_b()));
  24232. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  24233. this->b().data(), static_cast<int>(this->b().length()),
  24234. ::google::protobuf::internal::WireFormat::PARSE,
  24235. "protobuf_unittest.TestOneof.FooGroup.b");
  24236. } else {
  24237. goto handle_unusual;
  24238. }
  24239. break;
  24240. }
  24241. default: {
  24242. handle_unusual:
  24243. if (tag == 0 ||
  24244. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  24245. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  24246. input->SetLastTag(tag);
  24247. goto success;
  24248. }
  24249. DO_(::google::protobuf::internal::WireFormat::SkipField(
  24250. input, tag, _internal_metadata_.mutable_unknown_fields()));
  24251. break;
  24252. }
  24253. }
  24254. }
  24255. success:
  24256. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestOneof.FooGroup)
  24257. return true;
  24258. failure:
  24259. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneof.FooGroup)
  24260. return false;
  24261. #undef DO_
  24262. }
  24263. void TestOneof_FooGroup::SerializeWithCachedSizes(
  24264. ::google::protobuf::io::CodedOutputStream* output) const {
  24265. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestOneof.FooGroup)
  24266. ::google::protobuf::uint32 cached_has_bits = 0;
  24267. (void) cached_has_bits;
  24268. cached_has_bits = _has_bits_[0];
  24269. // optional int32 a = 5;
  24270. if (cached_has_bits & 0x00000002u) {
  24271. ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->a(), output);
  24272. }
  24273. // optional string b = 6;
  24274. if (cached_has_bits & 0x00000001u) {
  24275. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  24276. this->b().data(), static_cast<int>(this->b().length()),
  24277. ::google::protobuf::internal::WireFormat::SERIALIZE,
  24278. "protobuf_unittest.TestOneof.FooGroup.b");
  24279. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  24280. 6, this->b(), output);
  24281. }
  24282. if (_internal_metadata_.have_unknown_fields()) {
  24283. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  24284. _internal_metadata_.unknown_fields(), output);
  24285. }
  24286. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneof.FooGroup)
  24287. }
  24288. ::google::protobuf::uint8* TestOneof_FooGroup::InternalSerializeWithCachedSizesToArray(
  24289. bool deterministic, ::google::protobuf::uint8* target) const {
  24290. (void)deterministic; // Unused
  24291. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestOneof.FooGroup)
  24292. ::google::protobuf::uint32 cached_has_bits = 0;
  24293. (void) cached_has_bits;
  24294. cached_has_bits = _has_bits_[0];
  24295. // optional int32 a = 5;
  24296. if (cached_has_bits & 0x00000002u) {
  24297. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->a(), target);
  24298. }
  24299. // optional string b = 6;
  24300. if (cached_has_bits & 0x00000001u) {
  24301. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  24302. this->b().data(), static_cast<int>(this->b().length()),
  24303. ::google::protobuf::internal::WireFormat::SERIALIZE,
  24304. "protobuf_unittest.TestOneof.FooGroup.b");
  24305. target =
  24306. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  24307. 6, this->b(), target);
  24308. }
  24309. if (_internal_metadata_.have_unknown_fields()) {
  24310. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  24311. _internal_metadata_.unknown_fields(), target);
  24312. }
  24313. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestOneof.FooGroup)
  24314. return target;
  24315. }
  24316. size_t TestOneof_FooGroup::ByteSizeLong() const {
  24317. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneof.FooGroup)
  24318. size_t total_size = 0;
  24319. if (_internal_metadata_.have_unknown_fields()) {
  24320. total_size +=
  24321. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  24322. _internal_metadata_.unknown_fields());
  24323. }
  24324. if (_has_bits_[0 / 32] & 3u) {
  24325. // optional string b = 6;
  24326. if (has_b()) {
  24327. total_size += 1 +
  24328. ::google::protobuf::internal::WireFormatLite::StringSize(
  24329. this->b());
  24330. }
  24331. // optional int32 a = 5;
  24332. if (has_a()) {
  24333. total_size += 1 +
  24334. ::google::protobuf::internal::WireFormatLite::Int32Size(
  24335. this->a());
  24336. }
  24337. }
  24338. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  24339. SetCachedSize(cached_size);
  24340. return total_size;
  24341. }
  24342. void TestOneof_FooGroup::MergeFrom(const ::google::protobuf::Message& from) {
  24343. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestOneof.FooGroup)
  24344. GOOGLE_DCHECK_NE(&from, this);
  24345. const TestOneof_FooGroup* source =
  24346. ::google::protobuf::internal::DynamicCastToGenerated<const TestOneof_FooGroup>(
  24347. &from);
  24348. if (source == NULL) {
  24349. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestOneof.FooGroup)
  24350. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  24351. } else {
  24352. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestOneof.FooGroup)
  24353. MergeFrom(*source);
  24354. }
  24355. }
  24356. void TestOneof_FooGroup::MergeFrom(const TestOneof_FooGroup& from) {
  24357. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestOneof.FooGroup)
  24358. GOOGLE_DCHECK_NE(&from, this);
  24359. _internal_metadata_.MergeFrom(from._internal_metadata_);
  24360. ::google::protobuf::uint32 cached_has_bits = 0;
  24361. (void) cached_has_bits;
  24362. cached_has_bits = from._has_bits_[0];
  24363. if (cached_has_bits & 3u) {
  24364. if (cached_has_bits & 0x00000001u) {
  24365. set_b(from.b());
  24366. }
  24367. if (cached_has_bits & 0x00000002u) {
  24368. a_ = from.a_;
  24369. }
  24370. _has_bits_[0] |= cached_has_bits;
  24371. }
  24372. }
  24373. void TestOneof_FooGroup::CopyFrom(const ::google::protobuf::Message& from) {
  24374. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestOneof.FooGroup)
  24375. if (&from == this) return;
  24376. Clear();
  24377. MergeFrom(from);
  24378. }
  24379. void TestOneof_FooGroup::CopyFrom(const TestOneof_FooGroup& from) {
  24380. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneof.FooGroup)
  24381. if (&from == this) return;
  24382. Clear();
  24383. MergeFrom(from);
  24384. }
  24385. bool TestOneof_FooGroup::IsInitialized() const {
  24386. return true;
  24387. }
  24388. void TestOneof_FooGroup::Swap(TestOneof_FooGroup* other) {
  24389. if (other == this) return;
  24390. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  24391. InternalSwap(other);
  24392. } else {
  24393. TestOneof_FooGroup* temp = New(GetArenaNoVirtual());
  24394. temp->MergeFrom(*other);
  24395. other->CopyFrom(*this);
  24396. InternalSwap(temp);
  24397. if (GetArenaNoVirtual() == NULL) {
  24398. delete temp;
  24399. }
  24400. }
  24401. }
  24402. void TestOneof_FooGroup::UnsafeArenaSwap(TestOneof_FooGroup* other) {
  24403. if (other == this) return;
  24404. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  24405. InternalSwap(other);
  24406. }
  24407. void TestOneof_FooGroup::InternalSwap(TestOneof_FooGroup* other) {
  24408. using std::swap;
  24409. b_.Swap(&other->b_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  24410. GetArenaNoVirtual());
  24411. swap(a_, other->a_);
  24412. swap(_has_bits_[0], other->_has_bits_[0]);
  24413. _internal_metadata_.Swap(&other->_internal_metadata_);
  24414. }
  24415. ::google::protobuf::Metadata TestOneof_FooGroup::GetMetadata() const {
  24416. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  24417. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  24418. }
  24419. // ===================================================================
  24420. void TestOneof::InitAsDefaultInstance() {
  24421. ::protobuf_unittest::_TestOneof_default_instance_.foo_int_ = 0;
  24422. ::protobuf_unittest::_TestOneof_default_instance_.foo_string_.UnsafeSetDefault(
  24423. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  24424. ::protobuf_unittest::_TestOneof_default_instance_.foo_message_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
  24425. ::protobuf_unittest::TestAllTypes::internal_default_instance());
  24426. ::protobuf_unittest::_TestOneof_default_instance_.foogroup_ = const_cast< ::protobuf_unittest::TestOneof_FooGroup*>(
  24427. ::protobuf_unittest::TestOneof_FooGroup::internal_default_instance());
  24428. }
  24429. void TestOneof::set_allocated_foo_message(::protobuf_unittest::TestAllTypes* foo_message) {
  24430. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  24431. clear_foo();
  24432. if (foo_message) {
  24433. ::google::protobuf::Arena* submessage_arena =
  24434. ::google::protobuf::Arena::GetArena(foo_message);
  24435. if (message_arena != submessage_arena) {
  24436. foo_message = ::google::protobuf::internal::GetOwnedMessage(
  24437. message_arena, foo_message, submessage_arena);
  24438. }
  24439. set_has_foo_message();
  24440. foo_.foo_message_ = foo_message;
  24441. }
  24442. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestOneof.foo_message)
  24443. }
  24444. void TestOneof::set_allocated_foogroup(::protobuf_unittest::TestOneof_FooGroup* foogroup) {
  24445. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  24446. clear_foo();
  24447. if (foogroup) {
  24448. ::google::protobuf::Arena* submessage_arena =
  24449. ::google::protobuf::Arena::GetArena(foogroup);
  24450. if (message_arena != submessage_arena) {
  24451. foogroup = ::google::protobuf::internal::GetOwnedMessage(
  24452. message_arena, foogroup, submessage_arena);
  24453. }
  24454. set_has_foogroup();
  24455. foo_.foogroup_ = foogroup;
  24456. }
  24457. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestOneof.foogroup)
  24458. }
  24459. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  24460. const int TestOneof::kFooIntFieldNumber;
  24461. const int TestOneof::kFooStringFieldNumber;
  24462. const int TestOneof::kFooMessageFieldNumber;
  24463. const int TestOneof::kFoogroupFieldNumber;
  24464. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  24465. TestOneof::TestOneof()
  24466. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  24467. ::google::protobuf::internal::InitSCC(
  24468. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof.base);
  24469. SharedCtor();
  24470. // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneof)
  24471. }
  24472. TestOneof::TestOneof(::google::protobuf::Arena* arena)
  24473. : ::google::protobuf::Message(),
  24474. _internal_metadata_(arena) {
  24475. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof.base);
  24476. SharedCtor();
  24477. RegisterArenaDtor(arena);
  24478. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestOneof)
  24479. }
  24480. TestOneof::TestOneof(const TestOneof& from)
  24481. : ::google::protobuf::Message(),
  24482. _internal_metadata_(NULL),
  24483. _has_bits_(from._has_bits_) {
  24484. _internal_metadata_.MergeFrom(from._internal_metadata_);
  24485. clear_has_foo();
  24486. switch (from.foo_case()) {
  24487. case kFooInt: {
  24488. set_foo_int(from.foo_int());
  24489. break;
  24490. }
  24491. case kFooString: {
  24492. set_foo_string(from.foo_string());
  24493. break;
  24494. }
  24495. case kFooMessage: {
  24496. mutable_foo_message()->::protobuf_unittest::TestAllTypes::MergeFrom(from.foo_message());
  24497. break;
  24498. }
  24499. case kFoogroup: {
  24500. mutable_foogroup()->::protobuf_unittest::TestOneof_FooGroup::MergeFrom(from.foogroup());
  24501. break;
  24502. }
  24503. case FOO_NOT_SET: {
  24504. break;
  24505. }
  24506. }
  24507. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneof)
  24508. }
  24509. void TestOneof::SharedCtor() {
  24510. clear_has_foo();
  24511. }
  24512. TestOneof::~TestOneof() {
  24513. // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneof)
  24514. SharedDtor();
  24515. }
  24516. void TestOneof::SharedDtor() {
  24517. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  24518. if (has_foo()) {
  24519. clear_foo();
  24520. }
  24521. }
  24522. void TestOneof::ArenaDtor(void* object) {
  24523. TestOneof* _this = reinterpret_cast< TestOneof* >(object);
  24524. (void)_this;
  24525. }
  24526. void TestOneof::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  24527. }
  24528. void TestOneof::SetCachedSize(int size) const {
  24529. _cached_size_.Set(size);
  24530. }
  24531. const ::google::protobuf::Descriptor* TestOneof::descriptor() {
  24532. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  24533. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  24534. }
  24535. const TestOneof& TestOneof::default_instance() {
  24536. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof.base);
  24537. return *internal_default_instance();
  24538. }
  24539. void TestOneof::clear_foo() {
  24540. // @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestOneof)
  24541. switch (foo_case()) {
  24542. case kFooInt: {
  24543. // No need to clear
  24544. break;
  24545. }
  24546. case kFooString: {
  24547. foo_.foo_string_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  24548. GetArenaNoVirtual());
  24549. break;
  24550. }
  24551. case kFooMessage: {
  24552. if (GetArenaNoVirtual() == NULL) {
  24553. delete foo_.foo_message_;
  24554. }
  24555. break;
  24556. }
  24557. case kFoogroup: {
  24558. if (GetArenaNoVirtual() == NULL) {
  24559. delete foo_.foogroup_;
  24560. }
  24561. break;
  24562. }
  24563. case FOO_NOT_SET: {
  24564. break;
  24565. }
  24566. }
  24567. _oneof_case_[0] = FOO_NOT_SET;
  24568. }
  24569. void TestOneof::Clear() {
  24570. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestOneof)
  24571. ::google::protobuf::uint32 cached_has_bits = 0;
  24572. // Prevent compiler warnings about cached_has_bits being unused
  24573. (void) cached_has_bits;
  24574. clear_foo();
  24575. _has_bits_.Clear();
  24576. _internal_metadata_.Clear();
  24577. }
  24578. bool TestOneof::MergePartialFromCodedStream(
  24579. ::google::protobuf::io::CodedInputStream* input) {
  24580. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  24581. ::google::protobuf::uint32 tag;
  24582. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestOneof)
  24583. for (;;) {
  24584. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  24585. tag = p.first;
  24586. if (!p.second) goto handle_unusual;
  24587. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  24588. // optional int32 foo_int = 1;
  24589. case 1: {
  24590. if (static_cast< ::google::protobuf::uint8>(tag) ==
  24591. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  24592. clear_foo();
  24593. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  24594. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  24595. input, &foo_.foo_int_)));
  24596. set_has_foo_int();
  24597. } else {
  24598. goto handle_unusual;
  24599. }
  24600. break;
  24601. }
  24602. // optional string foo_string = 2;
  24603. case 2: {
  24604. if (static_cast< ::google::protobuf::uint8>(tag) ==
  24605. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  24606. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  24607. input, this->mutable_foo_string()));
  24608. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  24609. this->foo_string().data(), static_cast<int>(this->foo_string().length()),
  24610. ::google::protobuf::internal::WireFormat::PARSE,
  24611. "protobuf_unittest.TestOneof.foo_string");
  24612. } else {
  24613. goto handle_unusual;
  24614. }
  24615. break;
  24616. }
  24617. // optional .protobuf_unittest.TestAllTypes foo_message = 3;
  24618. case 3: {
  24619. if (static_cast< ::google::protobuf::uint8>(tag) ==
  24620. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  24621. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  24622. input, mutable_foo_message()));
  24623. } else {
  24624. goto handle_unusual;
  24625. }
  24626. break;
  24627. }
  24628. // optional group FooGroup = 4 { ... };
  24629. case 4: {
  24630. if (static_cast< ::google::protobuf::uint8>(tag) ==
  24631. static_cast< ::google::protobuf::uint8>(35u /* 35 & 0xFF */)) {
  24632. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
  24633. 4, input, mutable_foogroup()));
  24634. } else {
  24635. goto handle_unusual;
  24636. }
  24637. break;
  24638. }
  24639. default: {
  24640. handle_unusual:
  24641. if (tag == 0) {
  24642. goto success;
  24643. }
  24644. DO_(::google::protobuf::internal::WireFormat::SkipField(
  24645. input, tag, _internal_metadata_.mutable_unknown_fields()));
  24646. break;
  24647. }
  24648. }
  24649. }
  24650. success:
  24651. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestOneof)
  24652. return true;
  24653. failure:
  24654. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneof)
  24655. return false;
  24656. #undef DO_
  24657. }
  24658. void TestOneof::SerializeWithCachedSizes(
  24659. ::google::protobuf::io::CodedOutputStream* output) const {
  24660. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestOneof)
  24661. ::google::protobuf::uint32 cached_has_bits = 0;
  24662. (void) cached_has_bits;
  24663. switch (foo_case()) {
  24664. case kFooInt:
  24665. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->foo_int(), output);
  24666. break;
  24667. case kFooString:
  24668. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  24669. this->foo_string().data(), static_cast<int>(this->foo_string().length()),
  24670. ::google::protobuf::internal::WireFormat::SERIALIZE,
  24671. "protobuf_unittest.TestOneof.foo_string");
  24672. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  24673. 2, this->foo_string(), output);
  24674. break;
  24675. case kFooMessage:
  24676. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  24677. 3, this->_internal_foo_message(), output);
  24678. break;
  24679. case kFoogroup:
  24680. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  24681. 4, this->_internal_foogroup(), output);
  24682. break;
  24683. default: ;
  24684. }
  24685. if (_internal_metadata_.have_unknown_fields()) {
  24686. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  24687. _internal_metadata_.unknown_fields(), output);
  24688. }
  24689. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneof)
  24690. }
  24691. ::google::protobuf::uint8* TestOneof::InternalSerializeWithCachedSizesToArray(
  24692. bool deterministic, ::google::protobuf::uint8* target) const {
  24693. (void)deterministic; // Unused
  24694. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestOneof)
  24695. ::google::protobuf::uint32 cached_has_bits = 0;
  24696. (void) cached_has_bits;
  24697. switch (foo_case()) {
  24698. case kFooInt:
  24699. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->foo_int(), target);
  24700. break;
  24701. case kFooString:
  24702. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  24703. this->foo_string().data(), static_cast<int>(this->foo_string().length()),
  24704. ::google::protobuf::internal::WireFormat::SERIALIZE,
  24705. "protobuf_unittest.TestOneof.foo_string");
  24706. target =
  24707. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  24708. 2, this->foo_string(), target);
  24709. break;
  24710. case kFooMessage:
  24711. target = ::google::protobuf::internal::WireFormatLite::
  24712. InternalWriteMessageToArray(
  24713. 3, this->_internal_foo_message(), deterministic, target);
  24714. break;
  24715. case kFoogroup:
  24716. target = ::google::protobuf::internal::WireFormatLite::
  24717. InternalWriteGroupToArray(
  24718. 4, this->_internal_foogroup(), deterministic, target);
  24719. break;
  24720. default: ;
  24721. }
  24722. if (_internal_metadata_.have_unknown_fields()) {
  24723. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  24724. _internal_metadata_.unknown_fields(), target);
  24725. }
  24726. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestOneof)
  24727. return target;
  24728. }
  24729. size_t TestOneof::ByteSizeLong() const {
  24730. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneof)
  24731. size_t total_size = 0;
  24732. if (_internal_metadata_.have_unknown_fields()) {
  24733. total_size +=
  24734. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  24735. _internal_metadata_.unknown_fields());
  24736. }
  24737. switch (foo_case()) {
  24738. // optional int32 foo_int = 1;
  24739. case kFooInt: {
  24740. total_size += 1 +
  24741. ::google::protobuf::internal::WireFormatLite::Int32Size(
  24742. this->foo_int());
  24743. break;
  24744. }
  24745. // optional string foo_string = 2;
  24746. case kFooString: {
  24747. total_size += 1 +
  24748. ::google::protobuf::internal::WireFormatLite::StringSize(
  24749. this->foo_string());
  24750. break;
  24751. }
  24752. // optional .protobuf_unittest.TestAllTypes foo_message = 3;
  24753. case kFooMessage: {
  24754. total_size += 1 +
  24755. ::google::protobuf::internal::WireFormatLite::MessageSize(
  24756. *foo_.foo_message_);
  24757. break;
  24758. }
  24759. // optional group FooGroup = 4 { ... };
  24760. case kFoogroup: {
  24761. total_size += 2 +
  24762. ::google::protobuf::internal::WireFormatLite::GroupSize(
  24763. *foo_.foogroup_);
  24764. break;
  24765. }
  24766. case FOO_NOT_SET: {
  24767. break;
  24768. }
  24769. }
  24770. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  24771. SetCachedSize(cached_size);
  24772. return total_size;
  24773. }
  24774. void TestOneof::MergeFrom(const ::google::protobuf::Message& from) {
  24775. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestOneof)
  24776. GOOGLE_DCHECK_NE(&from, this);
  24777. const TestOneof* source =
  24778. ::google::protobuf::internal::DynamicCastToGenerated<const TestOneof>(
  24779. &from);
  24780. if (source == NULL) {
  24781. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestOneof)
  24782. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  24783. } else {
  24784. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestOneof)
  24785. MergeFrom(*source);
  24786. }
  24787. }
  24788. void TestOneof::MergeFrom(const TestOneof& from) {
  24789. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestOneof)
  24790. GOOGLE_DCHECK_NE(&from, this);
  24791. _internal_metadata_.MergeFrom(from._internal_metadata_);
  24792. ::google::protobuf::uint32 cached_has_bits = 0;
  24793. (void) cached_has_bits;
  24794. switch (from.foo_case()) {
  24795. case kFooInt: {
  24796. set_foo_int(from.foo_int());
  24797. break;
  24798. }
  24799. case kFooString: {
  24800. set_foo_string(from.foo_string());
  24801. break;
  24802. }
  24803. case kFooMessage: {
  24804. mutable_foo_message()->::protobuf_unittest::TestAllTypes::MergeFrom(from.foo_message());
  24805. break;
  24806. }
  24807. case kFoogroup: {
  24808. mutable_foogroup()->::protobuf_unittest::TestOneof_FooGroup::MergeFrom(from.foogroup());
  24809. break;
  24810. }
  24811. case FOO_NOT_SET: {
  24812. break;
  24813. }
  24814. }
  24815. }
  24816. void TestOneof::CopyFrom(const ::google::protobuf::Message& from) {
  24817. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestOneof)
  24818. if (&from == this) return;
  24819. Clear();
  24820. MergeFrom(from);
  24821. }
  24822. void TestOneof::CopyFrom(const TestOneof& from) {
  24823. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneof)
  24824. if (&from == this) return;
  24825. Clear();
  24826. MergeFrom(from);
  24827. }
  24828. bool TestOneof::IsInitialized() const {
  24829. return true;
  24830. }
  24831. void TestOneof::Swap(TestOneof* other) {
  24832. if (other == this) return;
  24833. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  24834. InternalSwap(other);
  24835. } else {
  24836. TestOneof* temp = New(GetArenaNoVirtual());
  24837. temp->MergeFrom(*other);
  24838. other->CopyFrom(*this);
  24839. InternalSwap(temp);
  24840. if (GetArenaNoVirtual() == NULL) {
  24841. delete temp;
  24842. }
  24843. }
  24844. }
  24845. void TestOneof::UnsafeArenaSwap(TestOneof* other) {
  24846. if (other == this) return;
  24847. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  24848. InternalSwap(other);
  24849. }
  24850. void TestOneof::InternalSwap(TestOneof* other) {
  24851. using std::swap;
  24852. swap(foo_, other->foo_);
  24853. swap(_oneof_case_[0], other->_oneof_case_[0]);
  24854. swap(_has_bits_[0], other->_has_bits_[0]);
  24855. _internal_metadata_.Swap(&other->_internal_metadata_);
  24856. }
  24857. ::google::protobuf::Metadata TestOneof::GetMetadata() const {
  24858. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  24859. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  24860. }
  24861. // ===================================================================
  24862. void TestOneofBackwardsCompatible_FooGroup::InitAsDefaultInstance() {
  24863. }
  24864. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  24865. const int TestOneofBackwardsCompatible_FooGroup::kAFieldNumber;
  24866. const int TestOneofBackwardsCompatible_FooGroup::kBFieldNumber;
  24867. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  24868. TestOneofBackwardsCompatible_FooGroup::TestOneofBackwardsCompatible_FooGroup()
  24869. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  24870. ::google::protobuf::internal::InitSCC(
  24871. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneofBackwardsCompatible_FooGroup.base);
  24872. SharedCtor();
  24873. // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  24874. }
  24875. TestOneofBackwardsCompatible_FooGroup::TestOneofBackwardsCompatible_FooGroup(::google::protobuf::Arena* arena)
  24876. : ::google::protobuf::Message(),
  24877. _internal_metadata_(arena) {
  24878. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneofBackwardsCompatible_FooGroup.base);
  24879. SharedCtor();
  24880. RegisterArenaDtor(arena);
  24881. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  24882. }
  24883. TestOneofBackwardsCompatible_FooGroup::TestOneofBackwardsCompatible_FooGroup(const TestOneofBackwardsCompatible_FooGroup& from)
  24884. : ::google::protobuf::Message(),
  24885. _internal_metadata_(NULL),
  24886. _has_bits_(from._has_bits_) {
  24887. _internal_metadata_.MergeFrom(from._internal_metadata_);
  24888. b_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  24889. if (from.has_b()) {
  24890. b_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.b(),
  24891. GetArenaNoVirtual());
  24892. }
  24893. a_ = from.a_;
  24894. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  24895. }
  24896. void TestOneofBackwardsCompatible_FooGroup::SharedCtor() {
  24897. b_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  24898. a_ = 0;
  24899. }
  24900. TestOneofBackwardsCompatible_FooGroup::~TestOneofBackwardsCompatible_FooGroup() {
  24901. // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  24902. SharedDtor();
  24903. }
  24904. void TestOneofBackwardsCompatible_FooGroup::SharedDtor() {
  24905. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  24906. b_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  24907. }
  24908. void TestOneofBackwardsCompatible_FooGroup::ArenaDtor(void* object) {
  24909. TestOneofBackwardsCompatible_FooGroup* _this = reinterpret_cast< TestOneofBackwardsCompatible_FooGroup* >(object);
  24910. (void)_this;
  24911. }
  24912. void TestOneofBackwardsCompatible_FooGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  24913. }
  24914. void TestOneofBackwardsCompatible_FooGroup::SetCachedSize(int size) const {
  24915. _cached_size_.Set(size);
  24916. }
  24917. const ::google::protobuf::Descriptor* TestOneofBackwardsCompatible_FooGroup::descriptor() {
  24918. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  24919. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  24920. }
  24921. const TestOneofBackwardsCompatible_FooGroup& TestOneofBackwardsCompatible_FooGroup::default_instance() {
  24922. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneofBackwardsCompatible_FooGroup.base);
  24923. return *internal_default_instance();
  24924. }
  24925. void TestOneofBackwardsCompatible_FooGroup::Clear() {
  24926. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  24927. ::google::protobuf::uint32 cached_has_bits = 0;
  24928. // Prevent compiler warnings about cached_has_bits being unused
  24929. (void) cached_has_bits;
  24930. cached_has_bits = _has_bits_[0];
  24931. if (cached_has_bits & 0x00000001u) {
  24932. b_.ClearNonDefaultToEmpty();
  24933. }
  24934. a_ = 0;
  24935. _has_bits_.Clear();
  24936. _internal_metadata_.Clear();
  24937. }
  24938. bool TestOneofBackwardsCompatible_FooGroup::MergePartialFromCodedStream(
  24939. ::google::protobuf::io::CodedInputStream* input) {
  24940. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  24941. ::google::protobuf::uint32 tag;
  24942. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  24943. for (;;) {
  24944. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  24945. tag = p.first;
  24946. if (!p.second) goto handle_unusual;
  24947. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  24948. // optional int32 a = 5;
  24949. case 5: {
  24950. if (static_cast< ::google::protobuf::uint8>(tag) ==
  24951. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  24952. set_has_a();
  24953. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  24954. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  24955. input, &a_)));
  24956. } else {
  24957. goto handle_unusual;
  24958. }
  24959. break;
  24960. }
  24961. // optional string b = 6;
  24962. case 6: {
  24963. if (static_cast< ::google::protobuf::uint8>(tag) ==
  24964. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  24965. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  24966. input, this->mutable_b()));
  24967. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  24968. this->b().data(), static_cast<int>(this->b().length()),
  24969. ::google::protobuf::internal::WireFormat::PARSE,
  24970. "protobuf_unittest.TestOneofBackwardsCompatible.FooGroup.b");
  24971. } else {
  24972. goto handle_unusual;
  24973. }
  24974. break;
  24975. }
  24976. default: {
  24977. handle_unusual:
  24978. if (tag == 0 ||
  24979. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  24980. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  24981. input->SetLastTag(tag);
  24982. goto success;
  24983. }
  24984. DO_(::google::protobuf::internal::WireFormat::SkipField(
  24985. input, tag, _internal_metadata_.mutable_unknown_fields()));
  24986. break;
  24987. }
  24988. }
  24989. }
  24990. success:
  24991. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  24992. return true;
  24993. failure:
  24994. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  24995. return false;
  24996. #undef DO_
  24997. }
  24998. void TestOneofBackwardsCompatible_FooGroup::SerializeWithCachedSizes(
  24999. ::google::protobuf::io::CodedOutputStream* output) const {
  25000. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  25001. ::google::protobuf::uint32 cached_has_bits = 0;
  25002. (void) cached_has_bits;
  25003. cached_has_bits = _has_bits_[0];
  25004. // optional int32 a = 5;
  25005. if (cached_has_bits & 0x00000002u) {
  25006. ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->a(), output);
  25007. }
  25008. // optional string b = 6;
  25009. if (cached_has_bits & 0x00000001u) {
  25010. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  25011. this->b().data(), static_cast<int>(this->b().length()),
  25012. ::google::protobuf::internal::WireFormat::SERIALIZE,
  25013. "protobuf_unittest.TestOneofBackwardsCompatible.FooGroup.b");
  25014. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  25015. 6, this->b(), output);
  25016. }
  25017. if (_internal_metadata_.have_unknown_fields()) {
  25018. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  25019. _internal_metadata_.unknown_fields(), output);
  25020. }
  25021. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  25022. }
  25023. ::google::protobuf::uint8* TestOneofBackwardsCompatible_FooGroup::InternalSerializeWithCachedSizesToArray(
  25024. bool deterministic, ::google::protobuf::uint8* target) const {
  25025. (void)deterministic; // Unused
  25026. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  25027. ::google::protobuf::uint32 cached_has_bits = 0;
  25028. (void) cached_has_bits;
  25029. cached_has_bits = _has_bits_[0];
  25030. // optional int32 a = 5;
  25031. if (cached_has_bits & 0x00000002u) {
  25032. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->a(), target);
  25033. }
  25034. // optional string b = 6;
  25035. if (cached_has_bits & 0x00000001u) {
  25036. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  25037. this->b().data(), static_cast<int>(this->b().length()),
  25038. ::google::protobuf::internal::WireFormat::SERIALIZE,
  25039. "protobuf_unittest.TestOneofBackwardsCompatible.FooGroup.b");
  25040. target =
  25041. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  25042. 6, this->b(), target);
  25043. }
  25044. if (_internal_metadata_.have_unknown_fields()) {
  25045. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  25046. _internal_metadata_.unknown_fields(), target);
  25047. }
  25048. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  25049. return target;
  25050. }
  25051. size_t TestOneofBackwardsCompatible_FooGroup::ByteSizeLong() const {
  25052. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  25053. size_t total_size = 0;
  25054. if (_internal_metadata_.have_unknown_fields()) {
  25055. total_size +=
  25056. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  25057. _internal_metadata_.unknown_fields());
  25058. }
  25059. if (_has_bits_[0 / 32] & 3u) {
  25060. // optional string b = 6;
  25061. if (has_b()) {
  25062. total_size += 1 +
  25063. ::google::protobuf::internal::WireFormatLite::StringSize(
  25064. this->b());
  25065. }
  25066. // optional int32 a = 5;
  25067. if (has_a()) {
  25068. total_size += 1 +
  25069. ::google::protobuf::internal::WireFormatLite::Int32Size(
  25070. this->a());
  25071. }
  25072. }
  25073. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  25074. SetCachedSize(cached_size);
  25075. return total_size;
  25076. }
  25077. void TestOneofBackwardsCompatible_FooGroup::MergeFrom(const ::google::protobuf::Message& from) {
  25078. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  25079. GOOGLE_DCHECK_NE(&from, this);
  25080. const TestOneofBackwardsCompatible_FooGroup* source =
  25081. ::google::protobuf::internal::DynamicCastToGenerated<const TestOneofBackwardsCompatible_FooGroup>(
  25082. &from);
  25083. if (source == NULL) {
  25084. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  25085. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  25086. } else {
  25087. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  25088. MergeFrom(*source);
  25089. }
  25090. }
  25091. void TestOneofBackwardsCompatible_FooGroup::MergeFrom(const TestOneofBackwardsCompatible_FooGroup& from) {
  25092. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  25093. GOOGLE_DCHECK_NE(&from, this);
  25094. _internal_metadata_.MergeFrom(from._internal_metadata_);
  25095. ::google::protobuf::uint32 cached_has_bits = 0;
  25096. (void) cached_has_bits;
  25097. cached_has_bits = from._has_bits_[0];
  25098. if (cached_has_bits & 3u) {
  25099. if (cached_has_bits & 0x00000001u) {
  25100. set_b(from.b());
  25101. }
  25102. if (cached_has_bits & 0x00000002u) {
  25103. a_ = from.a_;
  25104. }
  25105. _has_bits_[0] |= cached_has_bits;
  25106. }
  25107. }
  25108. void TestOneofBackwardsCompatible_FooGroup::CopyFrom(const ::google::protobuf::Message& from) {
  25109. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  25110. if (&from == this) return;
  25111. Clear();
  25112. MergeFrom(from);
  25113. }
  25114. void TestOneofBackwardsCompatible_FooGroup::CopyFrom(const TestOneofBackwardsCompatible_FooGroup& from) {
  25115. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneofBackwardsCompatible.FooGroup)
  25116. if (&from == this) return;
  25117. Clear();
  25118. MergeFrom(from);
  25119. }
  25120. bool TestOneofBackwardsCompatible_FooGroup::IsInitialized() const {
  25121. return true;
  25122. }
  25123. void TestOneofBackwardsCompatible_FooGroup::Swap(TestOneofBackwardsCompatible_FooGroup* other) {
  25124. if (other == this) return;
  25125. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  25126. InternalSwap(other);
  25127. } else {
  25128. TestOneofBackwardsCompatible_FooGroup* temp = New(GetArenaNoVirtual());
  25129. temp->MergeFrom(*other);
  25130. other->CopyFrom(*this);
  25131. InternalSwap(temp);
  25132. if (GetArenaNoVirtual() == NULL) {
  25133. delete temp;
  25134. }
  25135. }
  25136. }
  25137. void TestOneofBackwardsCompatible_FooGroup::UnsafeArenaSwap(TestOneofBackwardsCompatible_FooGroup* other) {
  25138. if (other == this) return;
  25139. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  25140. InternalSwap(other);
  25141. }
  25142. void TestOneofBackwardsCompatible_FooGroup::InternalSwap(TestOneofBackwardsCompatible_FooGroup* other) {
  25143. using std::swap;
  25144. b_.Swap(&other->b_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  25145. GetArenaNoVirtual());
  25146. swap(a_, other->a_);
  25147. swap(_has_bits_[0], other->_has_bits_[0]);
  25148. _internal_metadata_.Swap(&other->_internal_metadata_);
  25149. }
  25150. ::google::protobuf::Metadata TestOneofBackwardsCompatible_FooGroup::GetMetadata() const {
  25151. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  25152. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  25153. }
  25154. // ===================================================================
  25155. void TestOneofBackwardsCompatible::InitAsDefaultInstance() {
  25156. ::protobuf_unittest::_TestOneofBackwardsCompatible_default_instance_._instance.get_mutable()->foo_message_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
  25157. ::protobuf_unittest::TestAllTypes::internal_default_instance());
  25158. ::protobuf_unittest::_TestOneofBackwardsCompatible_default_instance_._instance.get_mutable()->foogroup_ = const_cast< ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup*>(
  25159. ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup::internal_default_instance());
  25160. }
  25161. void TestOneofBackwardsCompatible::unsafe_arena_set_allocated_foo_message(
  25162. ::protobuf_unittest::TestAllTypes* foo_message) {
  25163. if (GetArenaNoVirtual() == NULL) {
  25164. delete foo_message_;
  25165. }
  25166. foo_message_ = foo_message;
  25167. if (foo_message) {
  25168. set_has_foo_message();
  25169. } else {
  25170. clear_has_foo_message();
  25171. }
  25172. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestOneofBackwardsCompatible.foo_message)
  25173. }
  25174. void TestOneofBackwardsCompatible::unsafe_arena_set_allocated_foogroup(
  25175. ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup* foogroup) {
  25176. if (GetArenaNoVirtual() == NULL) {
  25177. delete foogroup_;
  25178. }
  25179. foogroup_ = foogroup;
  25180. if (foogroup) {
  25181. set_has_foogroup();
  25182. } else {
  25183. clear_has_foogroup();
  25184. }
  25185. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestOneofBackwardsCompatible.foogroup)
  25186. }
  25187. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  25188. const int TestOneofBackwardsCompatible::kFooIntFieldNumber;
  25189. const int TestOneofBackwardsCompatible::kFooStringFieldNumber;
  25190. const int TestOneofBackwardsCompatible::kFooMessageFieldNumber;
  25191. const int TestOneofBackwardsCompatible::kFoogroupFieldNumber;
  25192. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  25193. TestOneofBackwardsCompatible::TestOneofBackwardsCompatible()
  25194. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  25195. ::google::protobuf::internal::InitSCC(
  25196. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneofBackwardsCompatible.base);
  25197. SharedCtor();
  25198. // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneofBackwardsCompatible)
  25199. }
  25200. TestOneofBackwardsCompatible::TestOneofBackwardsCompatible(::google::protobuf::Arena* arena)
  25201. : ::google::protobuf::Message(),
  25202. _internal_metadata_(arena) {
  25203. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneofBackwardsCompatible.base);
  25204. SharedCtor();
  25205. RegisterArenaDtor(arena);
  25206. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestOneofBackwardsCompatible)
  25207. }
  25208. TestOneofBackwardsCompatible::TestOneofBackwardsCompatible(const TestOneofBackwardsCompatible& from)
  25209. : ::google::protobuf::Message(),
  25210. _internal_metadata_(NULL),
  25211. _has_bits_(from._has_bits_) {
  25212. _internal_metadata_.MergeFrom(from._internal_metadata_);
  25213. foo_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  25214. if (from.has_foo_string()) {
  25215. foo_string_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.foo_string(),
  25216. GetArenaNoVirtual());
  25217. }
  25218. if (from.has_foo_message()) {
  25219. foo_message_ = new ::protobuf_unittest::TestAllTypes(*from.foo_message_);
  25220. } else {
  25221. foo_message_ = NULL;
  25222. }
  25223. if (from.has_foogroup()) {
  25224. foogroup_ = new ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup(*from.foogroup_);
  25225. } else {
  25226. foogroup_ = NULL;
  25227. }
  25228. foo_int_ = from.foo_int_;
  25229. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneofBackwardsCompatible)
  25230. }
  25231. void TestOneofBackwardsCompatible::SharedCtor() {
  25232. foo_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  25233. ::memset(&foo_message_, 0, static_cast<size_t>(
  25234. reinterpret_cast<char*>(&foo_int_) -
  25235. reinterpret_cast<char*>(&foo_message_)) + sizeof(foo_int_));
  25236. }
  25237. TestOneofBackwardsCompatible::~TestOneofBackwardsCompatible() {
  25238. // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneofBackwardsCompatible)
  25239. SharedDtor();
  25240. }
  25241. void TestOneofBackwardsCompatible::SharedDtor() {
  25242. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  25243. foo_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  25244. if (this != internal_default_instance()) delete foo_message_;
  25245. if (this != internal_default_instance()) delete foogroup_;
  25246. }
  25247. void TestOneofBackwardsCompatible::ArenaDtor(void* object) {
  25248. TestOneofBackwardsCompatible* _this = reinterpret_cast< TestOneofBackwardsCompatible* >(object);
  25249. (void)_this;
  25250. }
  25251. void TestOneofBackwardsCompatible::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  25252. }
  25253. void TestOneofBackwardsCompatible::SetCachedSize(int size) const {
  25254. _cached_size_.Set(size);
  25255. }
  25256. const ::google::protobuf::Descriptor* TestOneofBackwardsCompatible::descriptor() {
  25257. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  25258. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  25259. }
  25260. const TestOneofBackwardsCompatible& TestOneofBackwardsCompatible::default_instance() {
  25261. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneofBackwardsCompatible.base);
  25262. return *internal_default_instance();
  25263. }
  25264. void TestOneofBackwardsCompatible::Clear() {
  25265. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestOneofBackwardsCompatible)
  25266. ::google::protobuf::uint32 cached_has_bits = 0;
  25267. // Prevent compiler warnings about cached_has_bits being unused
  25268. (void) cached_has_bits;
  25269. cached_has_bits = _has_bits_[0];
  25270. if (cached_has_bits & 7u) {
  25271. if (cached_has_bits & 0x00000001u) {
  25272. foo_string_.ClearNonDefaultToEmpty();
  25273. }
  25274. if (cached_has_bits & 0x00000002u) {
  25275. GOOGLE_DCHECK(foo_message_ != NULL);
  25276. foo_message_->Clear();
  25277. }
  25278. if (cached_has_bits & 0x00000004u) {
  25279. GOOGLE_DCHECK(foogroup_ != NULL);
  25280. foogroup_->Clear();
  25281. }
  25282. }
  25283. foo_int_ = 0;
  25284. _has_bits_.Clear();
  25285. _internal_metadata_.Clear();
  25286. }
  25287. bool TestOneofBackwardsCompatible::MergePartialFromCodedStream(
  25288. ::google::protobuf::io::CodedInputStream* input) {
  25289. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  25290. ::google::protobuf::uint32 tag;
  25291. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestOneofBackwardsCompatible)
  25292. for (;;) {
  25293. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  25294. tag = p.first;
  25295. if (!p.second) goto handle_unusual;
  25296. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  25297. // optional int32 foo_int = 1;
  25298. case 1: {
  25299. if (static_cast< ::google::protobuf::uint8>(tag) ==
  25300. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  25301. set_has_foo_int();
  25302. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  25303. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  25304. input, &foo_int_)));
  25305. } else {
  25306. goto handle_unusual;
  25307. }
  25308. break;
  25309. }
  25310. // optional string foo_string = 2;
  25311. case 2: {
  25312. if (static_cast< ::google::protobuf::uint8>(tag) ==
  25313. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  25314. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  25315. input, this->mutable_foo_string()));
  25316. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  25317. this->foo_string().data(), static_cast<int>(this->foo_string().length()),
  25318. ::google::protobuf::internal::WireFormat::PARSE,
  25319. "protobuf_unittest.TestOneofBackwardsCompatible.foo_string");
  25320. } else {
  25321. goto handle_unusual;
  25322. }
  25323. break;
  25324. }
  25325. // optional .protobuf_unittest.TestAllTypes foo_message = 3;
  25326. case 3: {
  25327. if (static_cast< ::google::protobuf::uint8>(tag) ==
  25328. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  25329. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  25330. input, mutable_foo_message()));
  25331. } else {
  25332. goto handle_unusual;
  25333. }
  25334. break;
  25335. }
  25336. // optional group FooGroup = 4 { ... };
  25337. case 4: {
  25338. if (static_cast< ::google::protobuf::uint8>(tag) ==
  25339. static_cast< ::google::protobuf::uint8>(35u /* 35 & 0xFF */)) {
  25340. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
  25341. 4, input, mutable_foogroup()));
  25342. } else {
  25343. goto handle_unusual;
  25344. }
  25345. break;
  25346. }
  25347. default: {
  25348. handle_unusual:
  25349. if (tag == 0) {
  25350. goto success;
  25351. }
  25352. DO_(::google::protobuf::internal::WireFormat::SkipField(
  25353. input, tag, _internal_metadata_.mutable_unknown_fields()));
  25354. break;
  25355. }
  25356. }
  25357. }
  25358. success:
  25359. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestOneofBackwardsCompatible)
  25360. return true;
  25361. failure:
  25362. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneofBackwardsCompatible)
  25363. return false;
  25364. #undef DO_
  25365. }
  25366. void TestOneofBackwardsCompatible::SerializeWithCachedSizes(
  25367. ::google::protobuf::io::CodedOutputStream* output) const {
  25368. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestOneofBackwardsCompatible)
  25369. ::google::protobuf::uint32 cached_has_bits = 0;
  25370. (void) cached_has_bits;
  25371. cached_has_bits = _has_bits_[0];
  25372. // optional int32 foo_int = 1;
  25373. if (cached_has_bits & 0x00000008u) {
  25374. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->foo_int(), output);
  25375. }
  25376. // optional string foo_string = 2;
  25377. if (cached_has_bits & 0x00000001u) {
  25378. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  25379. this->foo_string().data(), static_cast<int>(this->foo_string().length()),
  25380. ::google::protobuf::internal::WireFormat::SERIALIZE,
  25381. "protobuf_unittest.TestOneofBackwardsCompatible.foo_string");
  25382. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  25383. 2, this->foo_string(), output);
  25384. }
  25385. // optional .protobuf_unittest.TestAllTypes foo_message = 3;
  25386. if (cached_has_bits & 0x00000002u) {
  25387. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  25388. 3, this->_internal_foo_message(), output);
  25389. }
  25390. // optional group FooGroup = 4 { ... };
  25391. if (cached_has_bits & 0x00000004u) {
  25392. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  25393. 4, this->_internal_foogroup(), output);
  25394. }
  25395. if (_internal_metadata_.have_unknown_fields()) {
  25396. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  25397. _internal_metadata_.unknown_fields(), output);
  25398. }
  25399. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneofBackwardsCompatible)
  25400. }
  25401. ::google::protobuf::uint8* TestOneofBackwardsCompatible::InternalSerializeWithCachedSizesToArray(
  25402. bool deterministic, ::google::protobuf::uint8* target) const {
  25403. (void)deterministic; // Unused
  25404. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestOneofBackwardsCompatible)
  25405. ::google::protobuf::uint32 cached_has_bits = 0;
  25406. (void) cached_has_bits;
  25407. cached_has_bits = _has_bits_[0];
  25408. // optional int32 foo_int = 1;
  25409. if (cached_has_bits & 0x00000008u) {
  25410. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->foo_int(), target);
  25411. }
  25412. // optional string foo_string = 2;
  25413. if (cached_has_bits & 0x00000001u) {
  25414. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  25415. this->foo_string().data(), static_cast<int>(this->foo_string().length()),
  25416. ::google::protobuf::internal::WireFormat::SERIALIZE,
  25417. "protobuf_unittest.TestOneofBackwardsCompatible.foo_string");
  25418. target =
  25419. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  25420. 2, this->foo_string(), target);
  25421. }
  25422. // optional .protobuf_unittest.TestAllTypes foo_message = 3;
  25423. if (cached_has_bits & 0x00000002u) {
  25424. target = ::google::protobuf::internal::WireFormatLite::
  25425. InternalWriteMessageToArray(
  25426. 3, this->_internal_foo_message(), deterministic, target);
  25427. }
  25428. // optional group FooGroup = 4 { ... };
  25429. if (cached_has_bits & 0x00000004u) {
  25430. target = ::google::protobuf::internal::WireFormatLite::
  25431. InternalWriteGroupToArray(
  25432. 4, this->_internal_foogroup(), deterministic, target);
  25433. }
  25434. if (_internal_metadata_.have_unknown_fields()) {
  25435. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  25436. _internal_metadata_.unknown_fields(), target);
  25437. }
  25438. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestOneofBackwardsCompatible)
  25439. return target;
  25440. }
  25441. size_t TestOneofBackwardsCompatible::ByteSizeLong() const {
  25442. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneofBackwardsCompatible)
  25443. size_t total_size = 0;
  25444. if (_internal_metadata_.have_unknown_fields()) {
  25445. total_size +=
  25446. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  25447. _internal_metadata_.unknown_fields());
  25448. }
  25449. if (_has_bits_[0 / 32] & 15u) {
  25450. // optional string foo_string = 2;
  25451. if (has_foo_string()) {
  25452. total_size += 1 +
  25453. ::google::protobuf::internal::WireFormatLite::StringSize(
  25454. this->foo_string());
  25455. }
  25456. // optional .protobuf_unittest.TestAllTypes foo_message = 3;
  25457. if (has_foo_message()) {
  25458. total_size += 1 +
  25459. ::google::protobuf::internal::WireFormatLite::MessageSize(
  25460. *foo_message_);
  25461. }
  25462. // optional group FooGroup = 4 { ... };
  25463. if (has_foogroup()) {
  25464. total_size += 2 +
  25465. ::google::protobuf::internal::WireFormatLite::GroupSize(
  25466. *foogroup_);
  25467. }
  25468. // optional int32 foo_int = 1;
  25469. if (has_foo_int()) {
  25470. total_size += 1 +
  25471. ::google::protobuf::internal::WireFormatLite::Int32Size(
  25472. this->foo_int());
  25473. }
  25474. }
  25475. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  25476. SetCachedSize(cached_size);
  25477. return total_size;
  25478. }
  25479. void TestOneofBackwardsCompatible::MergeFrom(const ::google::protobuf::Message& from) {
  25480. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestOneofBackwardsCompatible)
  25481. GOOGLE_DCHECK_NE(&from, this);
  25482. const TestOneofBackwardsCompatible* source =
  25483. ::google::protobuf::internal::DynamicCastToGenerated<const TestOneofBackwardsCompatible>(
  25484. &from);
  25485. if (source == NULL) {
  25486. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestOneofBackwardsCompatible)
  25487. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  25488. } else {
  25489. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestOneofBackwardsCompatible)
  25490. MergeFrom(*source);
  25491. }
  25492. }
  25493. void TestOneofBackwardsCompatible::MergeFrom(const TestOneofBackwardsCompatible& from) {
  25494. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestOneofBackwardsCompatible)
  25495. GOOGLE_DCHECK_NE(&from, this);
  25496. _internal_metadata_.MergeFrom(from._internal_metadata_);
  25497. ::google::protobuf::uint32 cached_has_bits = 0;
  25498. (void) cached_has_bits;
  25499. cached_has_bits = from._has_bits_[0];
  25500. if (cached_has_bits & 15u) {
  25501. if (cached_has_bits & 0x00000001u) {
  25502. set_foo_string(from.foo_string());
  25503. }
  25504. if (cached_has_bits & 0x00000002u) {
  25505. mutable_foo_message()->::protobuf_unittest::TestAllTypes::MergeFrom(from.foo_message());
  25506. }
  25507. if (cached_has_bits & 0x00000004u) {
  25508. mutable_foogroup()->::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup::MergeFrom(from.foogroup());
  25509. }
  25510. if (cached_has_bits & 0x00000008u) {
  25511. foo_int_ = from.foo_int_;
  25512. }
  25513. _has_bits_[0] |= cached_has_bits;
  25514. }
  25515. }
  25516. void TestOneofBackwardsCompatible::CopyFrom(const ::google::protobuf::Message& from) {
  25517. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestOneofBackwardsCompatible)
  25518. if (&from == this) return;
  25519. Clear();
  25520. MergeFrom(from);
  25521. }
  25522. void TestOneofBackwardsCompatible::CopyFrom(const TestOneofBackwardsCompatible& from) {
  25523. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneofBackwardsCompatible)
  25524. if (&from == this) return;
  25525. Clear();
  25526. MergeFrom(from);
  25527. }
  25528. bool TestOneofBackwardsCompatible::IsInitialized() const {
  25529. return true;
  25530. }
  25531. void TestOneofBackwardsCompatible::Swap(TestOneofBackwardsCompatible* other) {
  25532. if (other == this) return;
  25533. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  25534. InternalSwap(other);
  25535. } else {
  25536. TestOneofBackwardsCompatible* temp = New(GetArenaNoVirtual());
  25537. temp->MergeFrom(*other);
  25538. other->CopyFrom(*this);
  25539. InternalSwap(temp);
  25540. if (GetArenaNoVirtual() == NULL) {
  25541. delete temp;
  25542. }
  25543. }
  25544. }
  25545. void TestOneofBackwardsCompatible::UnsafeArenaSwap(TestOneofBackwardsCompatible* other) {
  25546. if (other == this) return;
  25547. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  25548. InternalSwap(other);
  25549. }
  25550. void TestOneofBackwardsCompatible::InternalSwap(TestOneofBackwardsCompatible* other) {
  25551. using std::swap;
  25552. foo_string_.Swap(&other->foo_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  25553. GetArenaNoVirtual());
  25554. swap(foo_message_, other->foo_message_);
  25555. swap(foogroup_, other->foogroup_);
  25556. swap(foo_int_, other->foo_int_);
  25557. swap(_has_bits_[0], other->_has_bits_[0]);
  25558. _internal_metadata_.Swap(&other->_internal_metadata_);
  25559. }
  25560. ::google::protobuf::Metadata TestOneofBackwardsCompatible::GetMetadata() const {
  25561. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  25562. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  25563. }
  25564. // ===================================================================
  25565. void TestOneof2_FooGroup::InitAsDefaultInstance() {
  25566. }
  25567. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  25568. const int TestOneof2_FooGroup::kAFieldNumber;
  25569. const int TestOneof2_FooGroup::kBFieldNumber;
  25570. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  25571. TestOneof2_FooGroup::TestOneof2_FooGroup()
  25572. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  25573. ::google::protobuf::internal::InitSCC(
  25574. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_FooGroup.base);
  25575. SharedCtor();
  25576. // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneof2.FooGroup)
  25577. }
  25578. TestOneof2_FooGroup::TestOneof2_FooGroup(::google::protobuf::Arena* arena)
  25579. : ::google::protobuf::Message(),
  25580. _internal_metadata_(arena) {
  25581. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_FooGroup.base);
  25582. SharedCtor();
  25583. RegisterArenaDtor(arena);
  25584. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestOneof2.FooGroup)
  25585. }
  25586. TestOneof2_FooGroup::TestOneof2_FooGroup(const TestOneof2_FooGroup& from)
  25587. : ::google::protobuf::Message(),
  25588. _internal_metadata_(NULL),
  25589. _has_bits_(from._has_bits_) {
  25590. _internal_metadata_.MergeFrom(from._internal_metadata_);
  25591. b_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  25592. if (from.has_b()) {
  25593. b_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.b(),
  25594. GetArenaNoVirtual());
  25595. }
  25596. a_ = from.a_;
  25597. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneof2.FooGroup)
  25598. }
  25599. void TestOneof2_FooGroup::SharedCtor() {
  25600. b_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  25601. a_ = 0;
  25602. }
  25603. TestOneof2_FooGroup::~TestOneof2_FooGroup() {
  25604. // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneof2.FooGroup)
  25605. SharedDtor();
  25606. }
  25607. void TestOneof2_FooGroup::SharedDtor() {
  25608. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  25609. b_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  25610. }
  25611. void TestOneof2_FooGroup::ArenaDtor(void* object) {
  25612. TestOneof2_FooGroup* _this = reinterpret_cast< TestOneof2_FooGroup* >(object);
  25613. (void)_this;
  25614. }
  25615. void TestOneof2_FooGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  25616. }
  25617. void TestOneof2_FooGroup::SetCachedSize(int size) const {
  25618. _cached_size_.Set(size);
  25619. }
  25620. const ::google::protobuf::Descriptor* TestOneof2_FooGroup::descriptor() {
  25621. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  25622. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  25623. }
  25624. const TestOneof2_FooGroup& TestOneof2_FooGroup::default_instance() {
  25625. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_FooGroup.base);
  25626. return *internal_default_instance();
  25627. }
  25628. void TestOneof2_FooGroup::Clear() {
  25629. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestOneof2.FooGroup)
  25630. ::google::protobuf::uint32 cached_has_bits = 0;
  25631. // Prevent compiler warnings about cached_has_bits being unused
  25632. (void) cached_has_bits;
  25633. cached_has_bits = _has_bits_[0];
  25634. if (cached_has_bits & 0x00000001u) {
  25635. b_.ClearNonDefaultToEmpty();
  25636. }
  25637. a_ = 0;
  25638. _has_bits_.Clear();
  25639. _internal_metadata_.Clear();
  25640. }
  25641. bool TestOneof2_FooGroup::MergePartialFromCodedStream(
  25642. ::google::protobuf::io::CodedInputStream* input) {
  25643. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  25644. ::google::protobuf::uint32 tag;
  25645. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestOneof2.FooGroup)
  25646. for (;;) {
  25647. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  25648. tag = p.first;
  25649. if (!p.second) goto handle_unusual;
  25650. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  25651. // optional int32 a = 9;
  25652. case 9: {
  25653. if (static_cast< ::google::protobuf::uint8>(tag) ==
  25654. static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
  25655. set_has_a();
  25656. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  25657. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  25658. input, &a_)));
  25659. } else {
  25660. goto handle_unusual;
  25661. }
  25662. break;
  25663. }
  25664. // optional string b = 10;
  25665. case 10: {
  25666. if (static_cast< ::google::protobuf::uint8>(tag) ==
  25667. static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
  25668. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  25669. input, this->mutable_b()));
  25670. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  25671. this->b().data(), static_cast<int>(this->b().length()),
  25672. ::google::protobuf::internal::WireFormat::PARSE,
  25673. "protobuf_unittest.TestOneof2.FooGroup.b");
  25674. } else {
  25675. goto handle_unusual;
  25676. }
  25677. break;
  25678. }
  25679. default: {
  25680. handle_unusual:
  25681. if (tag == 0 ||
  25682. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  25683. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  25684. input->SetLastTag(tag);
  25685. goto success;
  25686. }
  25687. DO_(::google::protobuf::internal::WireFormat::SkipField(
  25688. input, tag, _internal_metadata_.mutable_unknown_fields()));
  25689. break;
  25690. }
  25691. }
  25692. }
  25693. success:
  25694. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestOneof2.FooGroup)
  25695. return true;
  25696. failure:
  25697. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneof2.FooGroup)
  25698. return false;
  25699. #undef DO_
  25700. }
  25701. void TestOneof2_FooGroup::SerializeWithCachedSizes(
  25702. ::google::protobuf::io::CodedOutputStream* output) const {
  25703. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestOneof2.FooGroup)
  25704. ::google::protobuf::uint32 cached_has_bits = 0;
  25705. (void) cached_has_bits;
  25706. cached_has_bits = _has_bits_[0];
  25707. // optional int32 a = 9;
  25708. if (cached_has_bits & 0x00000002u) {
  25709. ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->a(), output);
  25710. }
  25711. // optional string b = 10;
  25712. if (cached_has_bits & 0x00000001u) {
  25713. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  25714. this->b().data(), static_cast<int>(this->b().length()),
  25715. ::google::protobuf::internal::WireFormat::SERIALIZE,
  25716. "protobuf_unittest.TestOneof2.FooGroup.b");
  25717. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  25718. 10, this->b(), output);
  25719. }
  25720. if (_internal_metadata_.have_unknown_fields()) {
  25721. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  25722. _internal_metadata_.unknown_fields(), output);
  25723. }
  25724. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneof2.FooGroup)
  25725. }
  25726. ::google::protobuf::uint8* TestOneof2_FooGroup::InternalSerializeWithCachedSizesToArray(
  25727. bool deterministic, ::google::protobuf::uint8* target) const {
  25728. (void)deterministic; // Unused
  25729. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestOneof2.FooGroup)
  25730. ::google::protobuf::uint32 cached_has_bits = 0;
  25731. (void) cached_has_bits;
  25732. cached_has_bits = _has_bits_[0];
  25733. // optional int32 a = 9;
  25734. if (cached_has_bits & 0x00000002u) {
  25735. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->a(), target);
  25736. }
  25737. // optional string b = 10;
  25738. if (cached_has_bits & 0x00000001u) {
  25739. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  25740. this->b().data(), static_cast<int>(this->b().length()),
  25741. ::google::protobuf::internal::WireFormat::SERIALIZE,
  25742. "protobuf_unittest.TestOneof2.FooGroup.b");
  25743. target =
  25744. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  25745. 10, this->b(), target);
  25746. }
  25747. if (_internal_metadata_.have_unknown_fields()) {
  25748. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  25749. _internal_metadata_.unknown_fields(), target);
  25750. }
  25751. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestOneof2.FooGroup)
  25752. return target;
  25753. }
  25754. size_t TestOneof2_FooGroup::ByteSizeLong() const {
  25755. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneof2.FooGroup)
  25756. size_t total_size = 0;
  25757. if (_internal_metadata_.have_unknown_fields()) {
  25758. total_size +=
  25759. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  25760. _internal_metadata_.unknown_fields());
  25761. }
  25762. if (_has_bits_[0 / 32] & 3u) {
  25763. // optional string b = 10;
  25764. if (has_b()) {
  25765. total_size += 1 +
  25766. ::google::protobuf::internal::WireFormatLite::StringSize(
  25767. this->b());
  25768. }
  25769. // optional int32 a = 9;
  25770. if (has_a()) {
  25771. total_size += 1 +
  25772. ::google::protobuf::internal::WireFormatLite::Int32Size(
  25773. this->a());
  25774. }
  25775. }
  25776. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  25777. SetCachedSize(cached_size);
  25778. return total_size;
  25779. }
  25780. void TestOneof2_FooGroup::MergeFrom(const ::google::protobuf::Message& from) {
  25781. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestOneof2.FooGroup)
  25782. GOOGLE_DCHECK_NE(&from, this);
  25783. const TestOneof2_FooGroup* source =
  25784. ::google::protobuf::internal::DynamicCastToGenerated<const TestOneof2_FooGroup>(
  25785. &from);
  25786. if (source == NULL) {
  25787. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestOneof2.FooGroup)
  25788. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  25789. } else {
  25790. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestOneof2.FooGroup)
  25791. MergeFrom(*source);
  25792. }
  25793. }
  25794. void TestOneof2_FooGroup::MergeFrom(const TestOneof2_FooGroup& from) {
  25795. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestOneof2.FooGroup)
  25796. GOOGLE_DCHECK_NE(&from, this);
  25797. _internal_metadata_.MergeFrom(from._internal_metadata_);
  25798. ::google::protobuf::uint32 cached_has_bits = 0;
  25799. (void) cached_has_bits;
  25800. cached_has_bits = from._has_bits_[0];
  25801. if (cached_has_bits & 3u) {
  25802. if (cached_has_bits & 0x00000001u) {
  25803. set_b(from.b());
  25804. }
  25805. if (cached_has_bits & 0x00000002u) {
  25806. a_ = from.a_;
  25807. }
  25808. _has_bits_[0] |= cached_has_bits;
  25809. }
  25810. }
  25811. void TestOneof2_FooGroup::CopyFrom(const ::google::protobuf::Message& from) {
  25812. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestOneof2.FooGroup)
  25813. if (&from == this) return;
  25814. Clear();
  25815. MergeFrom(from);
  25816. }
  25817. void TestOneof2_FooGroup::CopyFrom(const TestOneof2_FooGroup& from) {
  25818. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneof2.FooGroup)
  25819. if (&from == this) return;
  25820. Clear();
  25821. MergeFrom(from);
  25822. }
  25823. bool TestOneof2_FooGroup::IsInitialized() const {
  25824. return true;
  25825. }
  25826. void TestOneof2_FooGroup::Swap(TestOneof2_FooGroup* other) {
  25827. if (other == this) return;
  25828. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  25829. InternalSwap(other);
  25830. } else {
  25831. TestOneof2_FooGroup* temp = New(GetArenaNoVirtual());
  25832. temp->MergeFrom(*other);
  25833. other->CopyFrom(*this);
  25834. InternalSwap(temp);
  25835. if (GetArenaNoVirtual() == NULL) {
  25836. delete temp;
  25837. }
  25838. }
  25839. }
  25840. void TestOneof2_FooGroup::UnsafeArenaSwap(TestOneof2_FooGroup* other) {
  25841. if (other == this) return;
  25842. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  25843. InternalSwap(other);
  25844. }
  25845. void TestOneof2_FooGroup::InternalSwap(TestOneof2_FooGroup* other) {
  25846. using std::swap;
  25847. b_.Swap(&other->b_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  25848. GetArenaNoVirtual());
  25849. swap(a_, other->a_);
  25850. swap(_has_bits_[0], other->_has_bits_[0]);
  25851. _internal_metadata_.Swap(&other->_internal_metadata_);
  25852. }
  25853. ::google::protobuf::Metadata TestOneof2_FooGroup::GetMetadata() const {
  25854. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  25855. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  25856. }
  25857. // ===================================================================
  25858. void TestOneof2_NestedMessage::InitAsDefaultInstance() {
  25859. }
  25860. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  25861. const int TestOneof2_NestedMessage::kQuxIntFieldNumber;
  25862. const int TestOneof2_NestedMessage::kCorgeIntFieldNumber;
  25863. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  25864. TestOneof2_NestedMessage::TestOneof2_NestedMessage()
  25865. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  25866. ::google::protobuf::internal::InitSCC(
  25867. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_NestedMessage.base);
  25868. SharedCtor();
  25869. // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneof2.NestedMessage)
  25870. }
  25871. TestOneof2_NestedMessage::TestOneof2_NestedMessage(::google::protobuf::Arena* arena)
  25872. : ::google::protobuf::Message(),
  25873. _internal_metadata_(arena),
  25874. corge_int_(arena) {
  25875. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_NestedMessage.base);
  25876. SharedCtor();
  25877. RegisterArenaDtor(arena);
  25878. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestOneof2.NestedMessage)
  25879. }
  25880. TestOneof2_NestedMessage::TestOneof2_NestedMessage(const TestOneof2_NestedMessage& from)
  25881. : ::google::protobuf::Message(),
  25882. _internal_metadata_(NULL),
  25883. _has_bits_(from._has_bits_),
  25884. corge_int_(from.corge_int_) {
  25885. _internal_metadata_.MergeFrom(from._internal_metadata_);
  25886. qux_int_ = from.qux_int_;
  25887. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneof2.NestedMessage)
  25888. }
  25889. void TestOneof2_NestedMessage::SharedCtor() {
  25890. qux_int_ = GOOGLE_LONGLONG(0);
  25891. }
  25892. TestOneof2_NestedMessage::~TestOneof2_NestedMessage() {
  25893. // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneof2.NestedMessage)
  25894. SharedDtor();
  25895. }
  25896. void TestOneof2_NestedMessage::SharedDtor() {
  25897. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  25898. }
  25899. void TestOneof2_NestedMessage::ArenaDtor(void* object) {
  25900. TestOneof2_NestedMessage* _this = reinterpret_cast< TestOneof2_NestedMessage* >(object);
  25901. (void)_this;
  25902. }
  25903. void TestOneof2_NestedMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  25904. }
  25905. void TestOneof2_NestedMessage::SetCachedSize(int size) const {
  25906. _cached_size_.Set(size);
  25907. }
  25908. const ::google::protobuf::Descriptor* TestOneof2_NestedMessage::descriptor() {
  25909. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  25910. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  25911. }
  25912. const TestOneof2_NestedMessage& TestOneof2_NestedMessage::default_instance() {
  25913. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2_NestedMessage.base);
  25914. return *internal_default_instance();
  25915. }
  25916. void TestOneof2_NestedMessage::Clear() {
  25917. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestOneof2.NestedMessage)
  25918. ::google::protobuf::uint32 cached_has_bits = 0;
  25919. // Prevent compiler warnings about cached_has_bits being unused
  25920. (void) cached_has_bits;
  25921. corge_int_.Clear();
  25922. qux_int_ = GOOGLE_LONGLONG(0);
  25923. _has_bits_.Clear();
  25924. _internal_metadata_.Clear();
  25925. }
  25926. bool TestOneof2_NestedMessage::MergePartialFromCodedStream(
  25927. ::google::protobuf::io::CodedInputStream* input) {
  25928. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  25929. ::google::protobuf::uint32 tag;
  25930. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestOneof2.NestedMessage)
  25931. for (;;) {
  25932. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  25933. tag = p.first;
  25934. if (!p.second) goto handle_unusual;
  25935. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  25936. // optional int64 qux_int = 1;
  25937. case 1: {
  25938. if (static_cast< ::google::protobuf::uint8>(tag) ==
  25939. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  25940. set_has_qux_int();
  25941. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  25942. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  25943. input, &qux_int_)));
  25944. } else {
  25945. goto handle_unusual;
  25946. }
  25947. break;
  25948. }
  25949. // repeated int32 corge_int = 2;
  25950. case 2: {
  25951. if (static_cast< ::google::protobuf::uint8>(tag) ==
  25952. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  25953. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  25954. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  25955. 1, 16u, input, this->mutable_corge_int())));
  25956. } else if (
  25957. static_cast< ::google::protobuf::uint8>(tag) ==
  25958. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  25959. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  25960. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  25961. input, this->mutable_corge_int())));
  25962. } else {
  25963. goto handle_unusual;
  25964. }
  25965. break;
  25966. }
  25967. default: {
  25968. handle_unusual:
  25969. if (tag == 0) {
  25970. goto success;
  25971. }
  25972. DO_(::google::protobuf::internal::WireFormat::SkipField(
  25973. input, tag, _internal_metadata_.mutable_unknown_fields()));
  25974. break;
  25975. }
  25976. }
  25977. }
  25978. success:
  25979. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestOneof2.NestedMessage)
  25980. return true;
  25981. failure:
  25982. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneof2.NestedMessage)
  25983. return false;
  25984. #undef DO_
  25985. }
  25986. void TestOneof2_NestedMessage::SerializeWithCachedSizes(
  25987. ::google::protobuf::io::CodedOutputStream* output) const {
  25988. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestOneof2.NestedMessage)
  25989. ::google::protobuf::uint32 cached_has_bits = 0;
  25990. (void) cached_has_bits;
  25991. cached_has_bits = _has_bits_[0];
  25992. // optional int64 qux_int = 1;
  25993. if (cached_has_bits & 0x00000001u) {
  25994. ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->qux_int(), output);
  25995. }
  25996. // repeated int32 corge_int = 2;
  25997. for (int i = 0, n = this->corge_int_size(); i < n; i++) {
  25998. ::google::protobuf::internal::WireFormatLite::WriteInt32(
  25999. 2, this->corge_int(i), output);
  26000. }
  26001. if (_internal_metadata_.have_unknown_fields()) {
  26002. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  26003. _internal_metadata_.unknown_fields(), output);
  26004. }
  26005. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneof2.NestedMessage)
  26006. }
  26007. ::google::protobuf::uint8* TestOneof2_NestedMessage::InternalSerializeWithCachedSizesToArray(
  26008. bool deterministic, ::google::protobuf::uint8* target) const {
  26009. (void)deterministic; // Unused
  26010. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestOneof2.NestedMessage)
  26011. ::google::protobuf::uint32 cached_has_bits = 0;
  26012. (void) cached_has_bits;
  26013. cached_has_bits = _has_bits_[0];
  26014. // optional int64 qux_int = 1;
  26015. if (cached_has_bits & 0x00000001u) {
  26016. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->qux_int(), target);
  26017. }
  26018. // repeated int32 corge_int = 2;
  26019. target = ::google::protobuf::internal::WireFormatLite::
  26020. WriteInt32ToArray(2, this->corge_int_, target);
  26021. if (_internal_metadata_.have_unknown_fields()) {
  26022. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  26023. _internal_metadata_.unknown_fields(), target);
  26024. }
  26025. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestOneof2.NestedMessage)
  26026. return target;
  26027. }
  26028. size_t TestOneof2_NestedMessage::ByteSizeLong() const {
  26029. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneof2.NestedMessage)
  26030. size_t total_size = 0;
  26031. if (_internal_metadata_.have_unknown_fields()) {
  26032. total_size +=
  26033. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  26034. _internal_metadata_.unknown_fields());
  26035. }
  26036. // repeated int32 corge_int = 2;
  26037. {
  26038. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  26039. Int32Size(this->corge_int_);
  26040. total_size += 1 *
  26041. ::google::protobuf::internal::FromIntSize(this->corge_int_size());
  26042. total_size += data_size;
  26043. }
  26044. // optional int64 qux_int = 1;
  26045. if (has_qux_int()) {
  26046. total_size += 1 +
  26047. ::google::protobuf::internal::WireFormatLite::Int64Size(
  26048. this->qux_int());
  26049. }
  26050. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  26051. SetCachedSize(cached_size);
  26052. return total_size;
  26053. }
  26054. void TestOneof2_NestedMessage::MergeFrom(const ::google::protobuf::Message& from) {
  26055. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestOneof2.NestedMessage)
  26056. GOOGLE_DCHECK_NE(&from, this);
  26057. const TestOneof2_NestedMessage* source =
  26058. ::google::protobuf::internal::DynamicCastToGenerated<const TestOneof2_NestedMessage>(
  26059. &from);
  26060. if (source == NULL) {
  26061. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestOneof2.NestedMessage)
  26062. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  26063. } else {
  26064. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestOneof2.NestedMessage)
  26065. MergeFrom(*source);
  26066. }
  26067. }
  26068. void TestOneof2_NestedMessage::MergeFrom(const TestOneof2_NestedMessage& from) {
  26069. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestOneof2.NestedMessage)
  26070. GOOGLE_DCHECK_NE(&from, this);
  26071. _internal_metadata_.MergeFrom(from._internal_metadata_);
  26072. ::google::protobuf::uint32 cached_has_bits = 0;
  26073. (void) cached_has_bits;
  26074. corge_int_.MergeFrom(from.corge_int_);
  26075. if (from.has_qux_int()) {
  26076. set_qux_int(from.qux_int());
  26077. }
  26078. }
  26079. void TestOneof2_NestedMessage::CopyFrom(const ::google::protobuf::Message& from) {
  26080. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestOneof2.NestedMessage)
  26081. if (&from == this) return;
  26082. Clear();
  26083. MergeFrom(from);
  26084. }
  26085. void TestOneof2_NestedMessage::CopyFrom(const TestOneof2_NestedMessage& from) {
  26086. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneof2.NestedMessage)
  26087. if (&from == this) return;
  26088. Clear();
  26089. MergeFrom(from);
  26090. }
  26091. bool TestOneof2_NestedMessage::IsInitialized() const {
  26092. return true;
  26093. }
  26094. void TestOneof2_NestedMessage::Swap(TestOneof2_NestedMessage* other) {
  26095. if (other == this) return;
  26096. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  26097. InternalSwap(other);
  26098. } else {
  26099. TestOneof2_NestedMessage* temp = New(GetArenaNoVirtual());
  26100. temp->MergeFrom(*other);
  26101. other->CopyFrom(*this);
  26102. InternalSwap(temp);
  26103. if (GetArenaNoVirtual() == NULL) {
  26104. delete temp;
  26105. }
  26106. }
  26107. }
  26108. void TestOneof2_NestedMessage::UnsafeArenaSwap(TestOneof2_NestedMessage* other) {
  26109. if (other == this) return;
  26110. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  26111. InternalSwap(other);
  26112. }
  26113. void TestOneof2_NestedMessage::InternalSwap(TestOneof2_NestedMessage* other) {
  26114. using std::swap;
  26115. corge_int_.InternalSwap(&other->corge_int_);
  26116. swap(qux_int_, other->qux_int_);
  26117. swap(_has_bits_[0], other->_has_bits_[0]);
  26118. _internal_metadata_.Swap(&other->_internal_metadata_);
  26119. }
  26120. ::google::protobuf::Metadata TestOneof2_NestedMessage::GetMetadata() const {
  26121. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  26122. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  26123. }
  26124. // ===================================================================
  26125. void TestOneof2::InitAsDefaultInstance() {
  26126. ::protobuf_unittest::_TestOneof2_default_instance_.foo_int_ = 0;
  26127. ::protobuf_unittest::_TestOneof2_default_instance_.foo_string_.UnsafeSetDefault(
  26128. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  26129. ::protobuf_unittest::_TestOneof2_default_instance_.foo_cord_.UnsafeSetDefault(
  26130. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  26131. ::protobuf_unittest::_TestOneof2_default_instance_.foo_string_piece_.UnsafeSetDefault(
  26132. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  26133. ::protobuf_unittest::_TestOneof2_default_instance_.foo_bytes_.UnsafeSetDefault(
  26134. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  26135. ::protobuf_unittest::_TestOneof2_default_instance_.foo_enum_ = 1;
  26136. ::protobuf_unittest::_TestOneof2_default_instance_.foo_message_ = const_cast< ::protobuf_unittest::TestOneof2_NestedMessage*>(
  26137. ::protobuf_unittest::TestOneof2_NestedMessage::internal_default_instance());
  26138. ::protobuf_unittest::_TestOneof2_default_instance_.foogroup_ = const_cast< ::protobuf_unittest::TestOneof2_FooGroup*>(
  26139. ::protobuf_unittest::TestOneof2_FooGroup::internal_default_instance());
  26140. ::protobuf_unittest::_TestOneof2_default_instance_.foo_lazy_message_ = const_cast< ::protobuf_unittest::TestOneof2_NestedMessage*>(
  26141. ::protobuf_unittest::TestOneof2_NestedMessage::internal_default_instance());
  26142. ::protobuf_unittest::_TestOneof2_default_instance_.bar_int_ = 5;
  26143. ::protobuf_unittest::_TestOneof2_default_instance_.bar_string_.UnsafeSetDefault(
  26144. &::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_.get());
  26145. ::protobuf_unittest::_TestOneof2_default_instance_.bar_cord_.UnsafeSetDefault(
  26146. &::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_cord_.get());
  26147. ::protobuf_unittest::_TestOneof2_default_instance_.bar_string_piece_.UnsafeSetDefault(
  26148. &::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_piece_.get());
  26149. ::protobuf_unittest::_TestOneof2_default_instance_.bar_bytes_.UnsafeSetDefault(
  26150. &::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_bytes_.get());
  26151. ::protobuf_unittest::_TestOneof2_default_instance_.bar_enum_ = 2;
  26152. }
  26153. void TestOneof2::set_allocated_foo_message(::protobuf_unittest::TestOneof2_NestedMessage* foo_message) {
  26154. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  26155. clear_foo();
  26156. if (foo_message) {
  26157. ::google::protobuf::Arena* submessage_arena =
  26158. ::google::protobuf::Arena::GetArena(foo_message);
  26159. if (message_arena != submessage_arena) {
  26160. foo_message = ::google::protobuf::internal::GetOwnedMessage(
  26161. message_arena, foo_message, submessage_arena);
  26162. }
  26163. set_has_foo_message();
  26164. foo_.foo_message_ = foo_message;
  26165. }
  26166. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestOneof2.foo_message)
  26167. }
  26168. void TestOneof2::set_allocated_foogroup(::protobuf_unittest::TestOneof2_FooGroup* foogroup) {
  26169. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  26170. clear_foo();
  26171. if (foogroup) {
  26172. ::google::protobuf::Arena* submessage_arena =
  26173. ::google::protobuf::Arena::GetArena(foogroup);
  26174. if (message_arena != submessage_arena) {
  26175. foogroup = ::google::protobuf::internal::GetOwnedMessage(
  26176. message_arena, foogroup, submessage_arena);
  26177. }
  26178. set_has_foogroup();
  26179. foo_.foogroup_ = foogroup;
  26180. }
  26181. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestOneof2.foogroup)
  26182. }
  26183. void TestOneof2::set_allocated_foo_lazy_message(::protobuf_unittest::TestOneof2_NestedMessage* foo_lazy_message) {
  26184. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  26185. clear_foo();
  26186. if (foo_lazy_message) {
  26187. ::google::protobuf::Arena* submessage_arena =
  26188. ::google::protobuf::Arena::GetArena(foo_lazy_message);
  26189. if (message_arena != submessage_arena) {
  26190. foo_lazy_message = ::google::protobuf::internal::GetOwnedMessage(
  26191. message_arena, foo_lazy_message, submessage_arena);
  26192. }
  26193. set_has_foo_lazy_message();
  26194. foo_.foo_lazy_message_ = foo_lazy_message;
  26195. }
  26196. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestOneof2.foo_lazy_message)
  26197. }
  26198. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_;
  26199. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestOneof2::_i_give_permission_to_break_this_code_default_bar_cord_;
  26200. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_piece_;
  26201. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestOneof2::_i_give_permission_to_break_this_code_default_bar_bytes_;
  26202. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_;
  26203. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  26204. const int TestOneof2::kFooIntFieldNumber;
  26205. const int TestOneof2::kFooStringFieldNumber;
  26206. const int TestOneof2::kFooCordFieldNumber;
  26207. const int TestOneof2::kFooStringPieceFieldNumber;
  26208. const int TestOneof2::kFooBytesFieldNumber;
  26209. const int TestOneof2::kFooEnumFieldNumber;
  26210. const int TestOneof2::kFooMessageFieldNumber;
  26211. const int TestOneof2::kFoogroupFieldNumber;
  26212. const int TestOneof2::kFooLazyMessageFieldNumber;
  26213. const int TestOneof2::kBarIntFieldNumber;
  26214. const int TestOneof2::kBarStringFieldNumber;
  26215. const int TestOneof2::kBarCordFieldNumber;
  26216. const int TestOneof2::kBarStringPieceFieldNumber;
  26217. const int TestOneof2::kBarBytesFieldNumber;
  26218. const int TestOneof2::kBarEnumFieldNumber;
  26219. const int TestOneof2::kBazIntFieldNumber;
  26220. const int TestOneof2::kBazStringFieldNumber;
  26221. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  26222. TestOneof2::TestOneof2()
  26223. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  26224. ::google::protobuf::internal::InitSCC(
  26225. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2.base);
  26226. SharedCtor();
  26227. // @@protoc_insertion_point(constructor:protobuf_unittest.TestOneof2)
  26228. }
  26229. TestOneof2::TestOneof2(::google::protobuf::Arena* arena)
  26230. : ::google::protobuf::Message(),
  26231. _internal_metadata_(arena) {
  26232. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2.base);
  26233. SharedCtor();
  26234. RegisterArenaDtor(arena);
  26235. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestOneof2)
  26236. }
  26237. TestOneof2::TestOneof2(const TestOneof2& from)
  26238. : ::google::protobuf::Message(),
  26239. _internal_metadata_(NULL),
  26240. _has_bits_(from._has_bits_) {
  26241. _internal_metadata_.MergeFrom(from._internal_metadata_);
  26242. baz_string_.UnsafeSetDefault(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get());
  26243. if (from.has_baz_string()) {
  26244. baz_string_.Set(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get(), from.baz_string(),
  26245. GetArenaNoVirtual());
  26246. }
  26247. baz_int_ = from.baz_int_;
  26248. clear_has_foo();
  26249. switch (from.foo_case()) {
  26250. case kFooInt: {
  26251. set_foo_int(from.foo_int());
  26252. break;
  26253. }
  26254. case kFooString: {
  26255. set_foo_string(from.foo_string());
  26256. break;
  26257. }
  26258. case kFooCord: {
  26259. set_foo_cord(from.foo_cord());
  26260. break;
  26261. }
  26262. case kFooStringPiece: {
  26263. set_foo_string_piece(from.foo_string_piece());
  26264. break;
  26265. }
  26266. case kFooBytes: {
  26267. set_foo_bytes(from.foo_bytes());
  26268. break;
  26269. }
  26270. case kFooEnum: {
  26271. set_foo_enum(from.foo_enum());
  26272. break;
  26273. }
  26274. case kFooMessage: {
  26275. mutable_foo_message()->::protobuf_unittest::TestOneof2_NestedMessage::MergeFrom(from.foo_message());
  26276. break;
  26277. }
  26278. case kFoogroup: {
  26279. mutable_foogroup()->::protobuf_unittest::TestOneof2_FooGroup::MergeFrom(from.foogroup());
  26280. break;
  26281. }
  26282. case kFooLazyMessage: {
  26283. mutable_foo_lazy_message()->::protobuf_unittest::TestOneof2_NestedMessage::MergeFrom(from.foo_lazy_message());
  26284. break;
  26285. }
  26286. case FOO_NOT_SET: {
  26287. break;
  26288. }
  26289. }
  26290. clear_has_bar();
  26291. switch (from.bar_case()) {
  26292. case kBarInt: {
  26293. set_bar_int(from.bar_int());
  26294. break;
  26295. }
  26296. case kBarString: {
  26297. set_bar_string(from.bar_string());
  26298. break;
  26299. }
  26300. case kBarCord: {
  26301. set_bar_cord(from.bar_cord());
  26302. break;
  26303. }
  26304. case kBarStringPiece: {
  26305. set_bar_string_piece(from.bar_string_piece());
  26306. break;
  26307. }
  26308. case kBarBytes: {
  26309. set_bar_bytes(from.bar_bytes());
  26310. break;
  26311. }
  26312. case kBarEnum: {
  26313. set_bar_enum(from.bar_enum());
  26314. break;
  26315. }
  26316. case BAR_NOT_SET: {
  26317. break;
  26318. }
  26319. }
  26320. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestOneof2)
  26321. }
  26322. void TestOneof2::SharedCtor() {
  26323. baz_string_.UnsafeSetDefault(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get());
  26324. baz_int_ = 0;
  26325. clear_has_foo();
  26326. clear_has_bar();
  26327. }
  26328. TestOneof2::~TestOneof2() {
  26329. // @@protoc_insertion_point(destructor:protobuf_unittest.TestOneof2)
  26330. SharedDtor();
  26331. }
  26332. void TestOneof2::SharedDtor() {
  26333. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  26334. baz_string_.DestroyNoArena(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get());
  26335. if (has_foo()) {
  26336. clear_foo();
  26337. }
  26338. if (has_bar()) {
  26339. clear_bar();
  26340. }
  26341. }
  26342. void TestOneof2::ArenaDtor(void* object) {
  26343. TestOneof2* _this = reinterpret_cast< TestOneof2* >(object);
  26344. (void)_this;
  26345. }
  26346. void TestOneof2::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  26347. }
  26348. void TestOneof2::SetCachedSize(int size) const {
  26349. _cached_size_.Set(size);
  26350. }
  26351. const ::google::protobuf::Descriptor* TestOneof2::descriptor() {
  26352. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  26353. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  26354. }
  26355. const TestOneof2& TestOneof2::default_instance() {
  26356. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestOneof2.base);
  26357. return *internal_default_instance();
  26358. }
  26359. void TestOneof2::clear_foo() {
  26360. // @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestOneof2)
  26361. switch (foo_case()) {
  26362. case kFooInt: {
  26363. // No need to clear
  26364. break;
  26365. }
  26366. case kFooString: {
  26367. foo_.foo_string_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  26368. GetArenaNoVirtual());
  26369. break;
  26370. }
  26371. case kFooCord: {
  26372. foo_.foo_cord_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  26373. GetArenaNoVirtual());
  26374. break;
  26375. }
  26376. case kFooStringPiece: {
  26377. foo_.foo_string_piece_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  26378. GetArenaNoVirtual());
  26379. break;
  26380. }
  26381. case kFooBytes: {
  26382. foo_.foo_bytes_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  26383. GetArenaNoVirtual());
  26384. break;
  26385. }
  26386. case kFooEnum: {
  26387. // No need to clear
  26388. break;
  26389. }
  26390. case kFooMessage: {
  26391. if (GetArenaNoVirtual() == NULL) {
  26392. delete foo_.foo_message_;
  26393. }
  26394. break;
  26395. }
  26396. case kFoogroup: {
  26397. if (GetArenaNoVirtual() == NULL) {
  26398. delete foo_.foogroup_;
  26399. }
  26400. break;
  26401. }
  26402. case kFooLazyMessage: {
  26403. if (GetArenaNoVirtual() == NULL) {
  26404. delete foo_.foo_lazy_message_;
  26405. }
  26406. break;
  26407. }
  26408. case FOO_NOT_SET: {
  26409. break;
  26410. }
  26411. }
  26412. _oneof_case_[0] = FOO_NOT_SET;
  26413. }
  26414. void TestOneof2::clear_bar() {
  26415. // @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestOneof2)
  26416. switch (bar_case()) {
  26417. case kBarInt: {
  26418. // No need to clear
  26419. break;
  26420. }
  26421. case kBarString: {
  26422. bar_.bar_string_.Destroy(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_.get(),
  26423. GetArenaNoVirtual());
  26424. break;
  26425. }
  26426. case kBarCord: {
  26427. bar_.bar_cord_.Destroy(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_cord_.get(),
  26428. GetArenaNoVirtual());
  26429. break;
  26430. }
  26431. case kBarStringPiece: {
  26432. bar_.bar_string_piece_.Destroy(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_string_piece_.get(),
  26433. GetArenaNoVirtual());
  26434. break;
  26435. }
  26436. case kBarBytes: {
  26437. bar_.bar_bytes_.Destroy(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_bar_bytes_.get(),
  26438. GetArenaNoVirtual());
  26439. break;
  26440. }
  26441. case kBarEnum: {
  26442. // No need to clear
  26443. break;
  26444. }
  26445. case BAR_NOT_SET: {
  26446. break;
  26447. }
  26448. }
  26449. _oneof_case_[1] = BAR_NOT_SET;
  26450. }
  26451. void TestOneof2::Clear() {
  26452. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestOneof2)
  26453. ::google::protobuf::uint32 cached_has_bits = 0;
  26454. // Prevent compiler warnings about cached_has_bits being unused
  26455. (void) cached_has_bits;
  26456. cached_has_bits = _has_bits_[0];
  26457. if (cached_has_bits & 0x00000001u) {
  26458. baz_string_.ClearToDefault(&::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get(), GetArenaNoVirtual());
  26459. }
  26460. baz_int_ = 0;
  26461. clear_foo();
  26462. clear_bar();
  26463. _has_bits_.Clear();
  26464. _internal_metadata_.Clear();
  26465. }
  26466. bool TestOneof2::MergePartialFromCodedStream(
  26467. ::google::protobuf::io::CodedInputStream* input) {
  26468. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  26469. ::google::protobuf::uint32 tag;
  26470. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestOneof2)
  26471. for (;;) {
  26472. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  26473. tag = p.first;
  26474. if (!p.second) goto handle_unusual;
  26475. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  26476. // optional int32 foo_int = 1;
  26477. case 1: {
  26478. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26479. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  26480. clear_foo();
  26481. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  26482. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  26483. input, &foo_.foo_int_)));
  26484. set_has_foo_int();
  26485. } else {
  26486. goto handle_unusual;
  26487. }
  26488. break;
  26489. }
  26490. // optional string foo_string = 2;
  26491. case 2: {
  26492. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26493. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  26494. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  26495. input, this->mutable_foo_string()));
  26496. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26497. this->foo_string().data(), static_cast<int>(this->foo_string().length()),
  26498. ::google::protobuf::internal::WireFormat::PARSE,
  26499. "protobuf_unittest.TestOneof2.foo_string");
  26500. } else {
  26501. goto handle_unusual;
  26502. }
  26503. break;
  26504. }
  26505. // optional string foo_cord = 3 [ctype = CORD];
  26506. case 3: {
  26507. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26508. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  26509. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  26510. input, this->mutable_foo_cord()));
  26511. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26512. this->foo_cord().data(), static_cast<int>(this->foo_cord().length()),
  26513. ::google::protobuf::internal::WireFormat::PARSE,
  26514. "protobuf_unittest.TestOneof2.foo_cord");
  26515. } else {
  26516. goto handle_unusual;
  26517. }
  26518. break;
  26519. }
  26520. // optional string foo_string_piece = 4 [ctype = STRING_PIECE];
  26521. case 4: {
  26522. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26523. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  26524. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  26525. input, this->mutable_foo_string_piece()));
  26526. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26527. this->foo_string_piece().data(), static_cast<int>(this->foo_string_piece().length()),
  26528. ::google::protobuf::internal::WireFormat::PARSE,
  26529. "protobuf_unittest.TestOneof2.foo_string_piece");
  26530. } else {
  26531. goto handle_unusual;
  26532. }
  26533. break;
  26534. }
  26535. // optional bytes foo_bytes = 5;
  26536. case 5: {
  26537. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26538. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  26539. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  26540. input, this->mutable_foo_bytes()));
  26541. } else {
  26542. goto handle_unusual;
  26543. }
  26544. break;
  26545. }
  26546. // optional .protobuf_unittest.TestOneof2.NestedEnum foo_enum = 6;
  26547. case 6: {
  26548. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26549. static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
  26550. int value;
  26551. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  26552. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  26553. input, &value)));
  26554. if (::protobuf_unittest::TestOneof2_NestedEnum_IsValid(value)) {
  26555. set_foo_enum(static_cast< ::protobuf_unittest::TestOneof2_NestedEnum >(value));
  26556. } else {
  26557. mutable_unknown_fields()->AddVarint(
  26558. 6, static_cast< ::google::protobuf::uint64>(value));
  26559. }
  26560. } else {
  26561. goto handle_unusual;
  26562. }
  26563. break;
  26564. }
  26565. // optional .protobuf_unittest.TestOneof2.NestedMessage foo_message = 7;
  26566. case 7: {
  26567. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26568. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  26569. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  26570. input, mutable_foo_message()));
  26571. } else {
  26572. goto handle_unusual;
  26573. }
  26574. break;
  26575. }
  26576. // optional group FooGroup = 8 { ... };
  26577. case 8: {
  26578. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26579. static_cast< ::google::protobuf::uint8>(67u /* 67 & 0xFF */)) {
  26580. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
  26581. 8, input, mutable_foogroup()));
  26582. } else {
  26583. goto handle_unusual;
  26584. }
  26585. break;
  26586. }
  26587. // optional .protobuf_unittest.TestOneof2.NestedMessage foo_lazy_message = 11 [lazy = true];
  26588. case 11: {
  26589. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26590. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  26591. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  26592. input, mutable_foo_lazy_message()));
  26593. } else {
  26594. goto handle_unusual;
  26595. }
  26596. break;
  26597. }
  26598. // optional int32 bar_int = 12 [default = 5];
  26599. case 12: {
  26600. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26601. static_cast< ::google::protobuf::uint8>(96u /* 96 & 0xFF */)) {
  26602. clear_bar();
  26603. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  26604. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  26605. input, &bar_.bar_int_)));
  26606. set_has_bar_int();
  26607. } else {
  26608. goto handle_unusual;
  26609. }
  26610. break;
  26611. }
  26612. // optional string bar_string = 13 [default = "STRING"];
  26613. case 13: {
  26614. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26615. static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
  26616. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  26617. input, this->mutable_bar_string()));
  26618. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26619. this->bar_string().data(), static_cast<int>(this->bar_string().length()),
  26620. ::google::protobuf::internal::WireFormat::PARSE,
  26621. "protobuf_unittest.TestOneof2.bar_string");
  26622. } else {
  26623. goto handle_unusual;
  26624. }
  26625. break;
  26626. }
  26627. // optional string bar_cord = 14 [default = "CORD", ctype = CORD];
  26628. case 14: {
  26629. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26630. static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
  26631. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  26632. input, this->mutable_bar_cord()));
  26633. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26634. this->bar_cord().data(), static_cast<int>(this->bar_cord().length()),
  26635. ::google::protobuf::internal::WireFormat::PARSE,
  26636. "protobuf_unittest.TestOneof2.bar_cord");
  26637. } else {
  26638. goto handle_unusual;
  26639. }
  26640. break;
  26641. }
  26642. // optional string bar_string_piece = 15 [default = "SPIECE", ctype = STRING_PIECE];
  26643. case 15: {
  26644. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26645. static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
  26646. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  26647. input, this->mutable_bar_string_piece()));
  26648. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26649. this->bar_string_piece().data(), static_cast<int>(this->bar_string_piece().length()),
  26650. ::google::protobuf::internal::WireFormat::PARSE,
  26651. "protobuf_unittest.TestOneof2.bar_string_piece");
  26652. } else {
  26653. goto handle_unusual;
  26654. }
  26655. break;
  26656. }
  26657. // optional bytes bar_bytes = 16 [default = "BYTES"];
  26658. case 16: {
  26659. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26660. static_cast< ::google::protobuf::uint8>(130u /* 130 & 0xFF */)) {
  26661. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  26662. input, this->mutable_bar_bytes()));
  26663. } else {
  26664. goto handle_unusual;
  26665. }
  26666. break;
  26667. }
  26668. // optional .protobuf_unittest.TestOneof2.NestedEnum bar_enum = 17 [default = BAR];
  26669. case 17: {
  26670. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26671. static_cast< ::google::protobuf::uint8>(136u /* 136 & 0xFF */)) {
  26672. int value;
  26673. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  26674. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  26675. input, &value)));
  26676. if (::protobuf_unittest::TestOneof2_NestedEnum_IsValid(value)) {
  26677. set_bar_enum(static_cast< ::protobuf_unittest::TestOneof2_NestedEnum >(value));
  26678. } else {
  26679. mutable_unknown_fields()->AddVarint(
  26680. 17, static_cast< ::google::protobuf::uint64>(value));
  26681. }
  26682. } else {
  26683. goto handle_unusual;
  26684. }
  26685. break;
  26686. }
  26687. // optional int32 baz_int = 18;
  26688. case 18: {
  26689. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26690. static_cast< ::google::protobuf::uint8>(144u /* 144 & 0xFF */)) {
  26691. set_has_baz_int();
  26692. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  26693. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  26694. input, &baz_int_)));
  26695. } else {
  26696. goto handle_unusual;
  26697. }
  26698. break;
  26699. }
  26700. // optional string baz_string = 19 [default = "BAZ"];
  26701. case 19: {
  26702. if (static_cast< ::google::protobuf::uint8>(tag) ==
  26703. static_cast< ::google::protobuf::uint8>(154u /* 154 & 0xFF */)) {
  26704. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  26705. input, this->mutable_baz_string()));
  26706. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26707. this->baz_string().data(), static_cast<int>(this->baz_string().length()),
  26708. ::google::protobuf::internal::WireFormat::PARSE,
  26709. "protobuf_unittest.TestOneof2.baz_string");
  26710. } else {
  26711. goto handle_unusual;
  26712. }
  26713. break;
  26714. }
  26715. default: {
  26716. handle_unusual:
  26717. if (tag == 0) {
  26718. goto success;
  26719. }
  26720. DO_(::google::protobuf::internal::WireFormat::SkipField(
  26721. input, tag, _internal_metadata_.mutable_unknown_fields()));
  26722. break;
  26723. }
  26724. }
  26725. }
  26726. success:
  26727. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestOneof2)
  26728. return true;
  26729. failure:
  26730. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestOneof2)
  26731. return false;
  26732. #undef DO_
  26733. }
  26734. void TestOneof2::SerializeWithCachedSizes(
  26735. ::google::protobuf::io::CodedOutputStream* output) const {
  26736. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestOneof2)
  26737. ::google::protobuf::uint32 cached_has_bits = 0;
  26738. (void) cached_has_bits;
  26739. switch (foo_case()) {
  26740. case kFooInt:
  26741. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->foo_int(), output);
  26742. break;
  26743. case kFooString:
  26744. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26745. this->foo_string().data(), static_cast<int>(this->foo_string().length()),
  26746. ::google::protobuf::internal::WireFormat::SERIALIZE,
  26747. "protobuf_unittest.TestOneof2.foo_string");
  26748. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  26749. 2, this->foo_string(), output);
  26750. break;
  26751. case kFooCord:
  26752. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26753. this->foo_cord().data(), static_cast<int>(this->foo_cord().length()),
  26754. ::google::protobuf::internal::WireFormat::SERIALIZE,
  26755. "protobuf_unittest.TestOneof2.foo_cord");
  26756. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  26757. 3, this->foo_cord(), output);
  26758. break;
  26759. case kFooStringPiece:
  26760. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26761. this->foo_string_piece().data(), static_cast<int>(this->foo_string_piece().length()),
  26762. ::google::protobuf::internal::WireFormat::SERIALIZE,
  26763. "protobuf_unittest.TestOneof2.foo_string_piece");
  26764. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  26765. 4, this->foo_string_piece(), output);
  26766. break;
  26767. case kFooBytes:
  26768. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  26769. 5, this->foo_bytes(), output);
  26770. break;
  26771. case kFooEnum:
  26772. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  26773. 6, this->foo_enum(), output);
  26774. break;
  26775. case kFooMessage:
  26776. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  26777. 7, this->_internal_foo_message(), output);
  26778. break;
  26779. case kFoogroup:
  26780. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  26781. 8, this->_internal_foogroup(), output);
  26782. break;
  26783. case kFooLazyMessage:
  26784. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  26785. 11, this->_internal_foo_lazy_message(), output);
  26786. break;
  26787. default: ;
  26788. }
  26789. switch (bar_case()) {
  26790. case kBarInt:
  26791. ::google::protobuf::internal::WireFormatLite::WriteInt32(12, this->bar_int(), output);
  26792. break;
  26793. case kBarString:
  26794. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26795. this->bar_string().data(), static_cast<int>(this->bar_string().length()),
  26796. ::google::protobuf::internal::WireFormat::SERIALIZE,
  26797. "protobuf_unittest.TestOneof2.bar_string");
  26798. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  26799. 13, this->bar_string(), output);
  26800. break;
  26801. case kBarCord:
  26802. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26803. this->bar_cord().data(), static_cast<int>(this->bar_cord().length()),
  26804. ::google::protobuf::internal::WireFormat::SERIALIZE,
  26805. "protobuf_unittest.TestOneof2.bar_cord");
  26806. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  26807. 14, this->bar_cord(), output);
  26808. break;
  26809. case kBarStringPiece:
  26810. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26811. this->bar_string_piece().data(), static_cast<int>(this->bar_string_piece().length()),
  26812. ::google::protobuf::internal::WireFormat::SERIALIZE,
  26813. "protobuf_unittest.TestOneof2.bar_string_piece");
  26814. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  26815. 15, this->bar_string_piece(), output);
  26816. break;
  26817. case kBarBytes:
  26818. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  26819. 16, this->bar_bytes(), output);
  26820. break;
  26821. case kBarEnum:
  26822. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  26823. 17, this->bar_enum(), output);
  26824. break;
  26825. default: ;
  26826. }
  26827. cached_has_bits = _has_bits_[0];
  26828. // optional int32 baz_int = 18;
  26829. if (cached_has_bits & 0x00000002u) {
  26830. ::google::protobuf::internal::WireFormatLite::WriteInt32(18, this->baz_int(), output);
  26831. }
  26832. // optional string baz_string = 19 [default = "BAZ"];
  26833. if (cached_has_bits & 0x00000001u) {
  26834. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26835. this->baz_string().data(), static_cast<int>(this->baz_string().length()),
  26836. ::google::protobuf::internal::WireFormat::SERIALIZE,
  26837. "protobuf_unittest.TestOneof2.baz_string");
  26838. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  26839. 19, this->baz_string(), output);
  26840. }
  26841. if (_internal_metadata_.have_unknown_fields()) {
  26842. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  26843. _internal_metadata_.unknown_fields(), output);
  26844. }
  26845. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestOneof2)
  26846. }
  26847. ::google::protobuf::uint8* TestOneof2::InternalSerializeWithCachedSizesToArray(
  26848. bool deterministic, ::google::protobuf::uint8* target) const {
  26849. (void)deterministic; // Unused
  26850. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestOneof2)
  26851. ::google::protobuf::uint32 cached_has_bits = 0;
  26852. (void) cached_has_bits;
  26853. switch (foo_case()) {
  26854. case kFooInt:
  26855. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->foo_int(), target);
  26856. break;
  26857. case kFooString:
  26858. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26859. this->foo_string().data(), static_cast<int>(this->foo_string().length()),
  26860. ::google::protobuf::internal::WireFormat::SERIALIZE,
  26861. "protobuf_unittest.TestOneof2.foo_string");
  26862. target =
  26863. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  26864. 2, this->foo_string(), target);
  26865. break;
  26866. case kFooCord:
  26867. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26868. this->foo_cord().data(), static_cast<int>(this->foo_cord().length()),
  26869. ::google::protobuf::internal::WireFormat::SERIALIZE,
  26870. "protobuf_unittest.TestOneof2.foo_cord");
  26871. target =
  26872. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  26873. 3, this->foo_cord(), target);
  26874. break;
  26875. case kFooStringPiece:
  26876. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26877. this->foo_string_piece().data(), static_cast<int>(this->foo_string_piece().length()),
  26878. ::google::protobuf::internal::WireFormat::SERIALIZE,
  26879. "protobuf_unittest.TestOneof2.foo_string_piece");
  26880. target =
  26881. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  26882. 4, this->foo_string_piece(), target);
  26883. break;
  26884. case kFooBytes:
  26885. target =
  26886. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  26887. 5, this->foo_bytes(), target);
  26888. break;
  26889. case kFooEnum:
  26890. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  26891. 6, this->foo_enum(), target);
  26892. break;
  26893. case kFooMessage:
  26894. target = ::google::protobuf::internal::WireFormatLite::
  26895. InternalWriteMessageToArray(
  26896. 7, this->_internal_foo_message(), deterministic, target);
  26897. break;
  26898. case kFoogroup:
  26899. target = ::google::protobuf::internal::WireFormatLite::
  26900. InternalWriteGroupToArray(
  26901. 8, this->_internal_foogroup(), deterministic, target);
  26902. break;
  26903. case kFooLazyMessage:
  26904. target = ::google::protobuf::internal::WireFormatLite::
  26905. InternalWriteMessageToArray(
  26906. 11, this->_internal_foo_lazy_message(), deterministic, target);
  26907. break;
  26908. default: ;
  26909. }
  26910. switch (bar_case()) {
  26911. case kBarInt:
  26912. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(12, this->bar_int(), target);
  26913. break;
  26914. case kBarString:
  26915. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26916. this->bar_string().data(), static_cast<int>(this->bar_string().length()),
  26917. ::google::protobuf::internal::WireFormat::SERIALIZE,
  26918. "protobuf_unittest.TestOneof2.bar_string");
  26919. target =
  26920. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  26921. 13, this->bar_string(), target);
  26922. break;
  26923. case kBarCord:
  26924. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26925. this->bar_cord().data(), static_cast<int>(this->bar_cord().length()),
  26926. ::google::protobuf::internal::WireFormat::SERIALIZE,
  26927. "protobuf_unittest.TestOneof2.bar_cord");
  26928. target =
  26929. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  26930. 14, this->bar_cord(), target);
  26931. break;
  26932. case kBarStringPiece:
  26933. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26934. this->bar_string_piece().data(), static_cast<int>(this->bar_string_piece().length()),
  26935. ::google::protobuf::internal::WireFormat::SERIALIZE,
  26936. "protobuf_unittest.TestOneof2.bar_string_piece");
  26937. target =
  26938. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  26939. 15, this->bar_string_piece(), target);
  26940. break;
  26941. case kBarBytes:
  26942. target =
  26943. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  26944. 16, this->bar_bytes(), target);
  26945. break;
  26946. case kBarEnum:
  26947. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  26948. 17, this->bar_enum(), target);
  26949. break;
  26950. default: ;
  26951. }
  26952. cached_has_bits = _has_bits_[0];
  26953. // optional int32 baz_int = 18;
  26954. if (cached_has_bits & 0x00000002u) {
  26955. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(18, this->baz_int(), target);
  26956. }
  26957. // optional string baz_string = 19 [default = "BAZ"];
  26958. if (cached_has_bits & 0x00000001u) {
  26959. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  26960. this->baz_string().data(), static_cast<int>(this->baz_string().length()),
  26961. ::google::protobuf::internal::WireFormat::SERIALIZE,
  26962. "protobuf_unittest.TestOneof2.baz_string");
  26963. target =
  26964. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  26965. 19, this->baz_string(), target);
  26966. }
  26967. if (_internal_metadata_.have_unknown_fields()) {
  26968. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  26969. _internal_metadata_.unknown_fields(), target);
  26970. }
  26971. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestOneof2)
  26972. return target;
  26973. }
  26974. size_t TestOneof2::ByteSizeLong() const {
  26975. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestOneof2)
  26976. size_t total_size = 0;
  26977. if (_internal_metadata_.have_unknown_fields()) {
  26978. total_size +=
  26979. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  26980. _internal_metadata_.unknown_fields());
  26981. }
  26982. if (_has_bits_[0 / 32] & 3u) {
  26983. // optional string baz_string = 19 [default = "BAZ"];
  26984. if (has_baz_string()) {
  26985. total_size += 2 +
  26986. ::google::protobuf::internal::WireFormatLite::StringSize(
  26987. this->baz_string());
  26988. }
  26989. // optional int32 baz_int = 18;
  26990. if (has_baz_int()) {
  26991. total_size += 2 +
  26992. ::google::protobuf::internal::WireFormatLite::Int32Size(
  26993. this->baz_int());
  26994. }
  26995. }
  26996. switch (foo_case()) {
  26997. // optional int32 foo_int = 1;
  26998. case kFooInt: {
  26999. total_size += 1 +
  27000. ::google::protobuf::internal::WireFormatLite::Int32Size(
  27001. this->foo_int());
  27002. break;
  27003. }
  27004. // optional string foo_string = 2;
  27005. case kFooString: {
  27006. total_size += 1 +
  27007. ::google::protobuf::internal::WireFormatLite::StringSize(
  27008. this->foo_string());
  27009. break;
  27010. }
  27011. // optional string foo_cord = 3 [ctype = CORD];
  27012. case kFooCord: {
  27013. total_size += 1 +
  27014. ::google::protobuf::internal::WireFormatLite::StringSize(
  27015. this->foo_cord());
  27016. break;
  27017. }
  27018. // optional string foo_string_piece = 4 [ctype = STRING_PIECE];
  27019. case kFooStringPiece: {
  27020. total_size += 1 +
  27021. ::google::protobuf::internal::WireFormatLite::StringSize(
  27022. this->foo_string_piece());
  27023. break;
  27024. }
  27025. // optional bytes foo_bytes = 5;
  27026. case kFooBytes: {
  27027. total_size += 1 +
  27028. ::google::protobuf::internal::WireFormatLite::BytesSize(
  27029. this->foo_bytes());
  27030. break;
  27031. }
  27032. // optional .protobuf_unittest.TestOneof2.NestedEnum foo_enum = 6;
  27033. case kFooEnum: {
  27034. total_size += 1 +
  27035. ::google::protobuf::internal::WireFormatLite::EnumSize(this->foo_enum());
  27036. break;
  27037. }
  27038. // optional .protobuf_unittest.TestOneof2.NestedMessage foo_message = 7;
  27039. case kFooMessage: {
  27040. total_size += 1 +
  27041. ::google::protobuf::internal::WireFormatLite::MessageSize(
  27042. *foo_.foo_message_);
  27043. break;
  27044. }
  27045. // optional group FooGroup = 8 { ... };
  27046. case kFoogroup: {
  27047. total_size += 2 +
  27048. ::google::protobuf::internal::WireFormatLite::GroupSize(
  27049. *foo_.foogroup_);
  27050. break;
  27051. }
  27052. // optional .protobuf_unittest.TestOneof2.NestedMessage foo_lazy_message = 11 [lazy = true];
  27053. case kFooLazyMessage: {
  27054. total_size += 1 +
  27055. ::google::protobuf::internal::WireFormatLite::MessageSize(
  27056. *foo_.foo_lazy_message_);
  27057. break;
  27058. }
  27059. case FOO_NOT_SET: {
  27060. break;
  27061. }
  27062. }
  27063. switch (bar_case()) {
  27064. // optional int32 bar_int = 12 [default = 5];
  27065. case kBarInt: {
  27066. total_size += 1 +
  27067. ::google::protobuf::internal::WireFormatLite::Int32Size(
  27068. this->bar_int());
  27069. break;
  27070. }
  27071. // optional string bar_string = 13 [default = "STRING"];
  27072. case kBarString: {
  27073. total_size += 1 +
  27074. ::google::protobuf::internal::WireFormatLite::StringSize(
  27075. this->bar_string());
  27076. break;
  27077. }
  27078. // optional string bar_cord = 14 [default = "CORD", ctype = CORD];
  27079. case kBarCord: {
  27080. total_size += 1 +
  27081. ::google::protobuf::internal::WireFormatLite::StringSize(
  27082. this->bar_cord());
  27083. break;
  27084. }
  27085. // optional string bar_string_piece = 15 [default = "SPIECE", ctype = STRING_PIECE];
  27086. case kBarStringPiece: {
  27087. total_size += 1 +
  27088. ::google::protobuf::internal::WireFormatLite::StringSize(
  27089. this->bar_string_piece());
  27090. break;
  27091. }
  27092. // optional bytes bar_bytes = 16 [default = "BYTES"];
  27093. case kBarBytes: {
  27094. total_size += 2 +
  27095. ::google::protobuf::internal::WireFormatLite::BytesSize(
  27096. this->bar_bytes());
  27097. break;
  27098. }
  27099. // optional .protobuf_unittest.TestOneof2.NestedEnum bar_enum = 17 [default = BAR];
  27100. case kBarEnum: {
  27101. total_size += 2 +
  27102. ::google::protobuf::internal::WireFormatLite::EnumSize(this->bar_enum());
  27103. break;
  27104. }
  27105. case BAR_NOT_SET: {
  27106. break;
  27107. }
  27108. }
  27109. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  27110. SetCachedSize(cached_size);
  27111. return total_size;
  27112. }
  27113. void TestOneof2::MergeFrom(const ::google::protobuf::Message& from) {
  27114. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestOneof2)
  27115. GOOGLE_DCHECK_NE(&from, this);
  27116. const TestOneof2* source =
  27117. ::google::protobuf::internal::DynamicCastToGenerated<const TestOneof2>(
  27118. &from);
  27119. if (source == NULL) {
  27120. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestOneof2)
  27121. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  27122. } else {
  27123. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestOneof2)
  27124. MergeFrom(*source);
  27125. }
  27126. }
  27127. void TestOneof2::MergeFrom(const TestOneof2& from) {
  27128. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestOneof2)
  27129. GOOGLE_DCHECK_NE(&from, this);
  27130. _internal_metadata_.MergeFrom(from._internal_metadata_);
  27131. ::google::protobuf::uint32 cached_has_bits = 0;
  27132. (void) cached_has_bits;
  27133. cached_has_bits = from._has_bits_[0];
  27134. if (cached_has_bits & 3u) {
  27135. if (cached_has_bits & 0x00000001u) {
  27136. set_baz_string(from.baz_string());
  27137. }
  27138. if (cached_has_bits & 0x00000002u) {
  27139. baz_int_ = from.baz_int_;
  27140. }
  27141. _has_bits_[0] |= cached_has_bits;
  27142. }
  27143. switch (from.foo_case()) {
  27144. case kFooInt: {
  27145. set_foo_int(from.foo_int());
  27146. break;
  27147. }
  27148. case kFooString: {
  27149. set_foo_string(from.foo_string());
  27150. break;
  27151. }
  27152. case kFooCord: {
  27153. set_foo_cord(from.foo_cord());
  27154. break;
  27155. }
  27156. case kFooStringPiece: {
  27157. set_foo_string_piece(from.foo_string_piece());
  27158. break;
  27159. }
  27160. case kFooBytes: {
  27161. set_foo_bytes(from.foo_bytes());
  27162. break;
  27163. }
  27164. case kFooEnum: {
  27165. set_foo_enum(from.foo_enum());
  27166. break;
  27167. }
  27168. case kFooMessage: {
  27169. mutable_foo_message()->::protobuf_unittest::TestOneof2_NestedMessage::MergeFrom(from.foo_message());
  27170. break;
  27171. }
  27172. case kFoogroup: {
  27173. mutable_foogroup()->::protobuf_unittest::TestOneof2_FooGroup::MergeFrom(from.foogroup());
  27174. break;
  27175. }
  27176. case kFooLazyMessage: {
  27177. mutable_foo_lazy_message()->::protobuf_unittest::TestOneof2_NestedMessage::MergeFrom(from.foo_lazy_message());
  27178. break;
  27179. }
  27180. case FOO_NOT_SET: {
  27181. break;
  27182. }
  27183. }
  27184. switch (from.bar_case()) {
  27185. case kBarInt: {
  27186. set_bar_int(from.bar_int());
  27187. break;
  27188. }
  27189. case kBarString: {
  27190. set_bar_string(from.bar_string());
  27191. break;
  27192. }
  27193. case kBarCord: {
  27194. set_bar_cord(from.bar_cord());
  27195. break;
  27196. }
  27197. case kBarStringPiece: {
  27198. set_bar_string_piece(from.bar_string_piece());
  27199. break;
  27200. }
  27201. case kBarBytes: {
  27202. set_bar_bytes(from.bar_bytes());
  27203. break;
  27204. }
  27205. case kBarEnum: {
  27206. set_bar_enum(from.bar_enum());
  27207. break;
  27208. }
  27209. case BAR_NOT_SET: {
  27210. break;
  27211. }
  27212. }
  27213. }
  27214. void TestOneof2::CopyFrom(const ::google::protobuf::Message& from) {
  27215. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestOneof2)
  27216. if (&from == this) return;
  27217. Clear();
  27218. MergeFrom(from);
  27219. }
  27220. void TestOneof2::CopyFrom(const TestOneof2& from) {
  27221. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestOneof2)
  27222. if (&from == this) return;
  27223. Clear();
  27224. MergeFrom(from);
  27225. }
  27226. bool TestOneof2::IsInitialized() const {
  27227. return true;
  27228. }
  27229. void TestOneof2::Swap(TestOneof2* other) {
  27230. if (other == this) return;
  27231. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  27232. InternalSwap(other);
  27233. } else {
  27234. TestOneof2* temp = New(GetArenaNoVirtual());
  27235. temp->MergeFrom(*other);
  27236. other->CopyFrom(*this);
  27237. InternalSwap(temp);
  27238. if (GetArenaNoVirtual() == NULL) {
  27239. delete temp;
  27240. }
  27241. }
  27242. }
  27243. void TestOneof2::UnsafeArenaSwap(TestOneof2* other) {
  27244. if (other == this) return;
  27245. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  27246. InternalSwap(other);
  27247. }
  27248. void TestOneof2::InternalSwap(TestOneof2* other) {
  27249. using std::swap;
  27250. baz_string_.Swap(&other->baz_string_, &::protobuf_unittest::TestOneof2::_i_give_permission_to_break_this_code_default_baz_string_.get(),
  27251. GetArenaNoVirtual());
  27252. swap(baz_int_, other->baz_int_);
  27253. swap(foo_, other->foo_);
  27254. swap(_oneof_case_[0], other->_oneof_case_[0]);
  27255. swap(bar_, other->bar_);
  27256. swap(_oneof_case_[1], other->_oneof_case_[1]);
  27257. swap(_has_bits_[0], other->_has_bits_[0]);
  27258. _internal_metadata_.Swap(&other->_internal_metadata_);
  27259. }
  27260. ::google::protobuf::Metadata TestOneof2::GetMetadata() const {
  27261. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  27262. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  27263. }
  27264. // ===================================================================
  27265. void TestRequiredOneof_NestedMessage::InitAsDefaultInstance() {
  27266. }
  27267. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  27268. const int TestRequiredOneof_NestedMessage::kRequiredDoubleFieldNumber;
  27269. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  27270. TestRequiredOneof_NestedMessage::TestRequiredOneof_NestedMessage()
  27271. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  27272. ::google::protobuf::internal::InitSCC(
  27273. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredOneof_NestedMessage.base);
  27274. SharedCtor();
  27275. // @@protoc_insertion_point(constructor:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27276. }
  27277. TestRequiredOneof_NestedMessage::TestRequiredOneof_NestedMessage(::google::protobuf::Arena* arena)
  27278. : ::google::protobuf::Message(),
  27279. _internal_metadata_(arena) {
  27280. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredOneof_NestedMessage.base);
  27281. SharedCtor();
  27282. RegisterArenaDtor(arena);
  27283. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27284. }
  27285. TestRequiredOneof_NestedMessage::TestRequiredOneof_NestedMessage(const TestRequiredOneof_NestedMessage& from)
  27286. : ::google::protobuf::Message(),
  27287. _internal_metadata_(NULL),
  27288. _has_bits_(from._has_bits_) {
  27289. _internal_metadata_.MergeFrom(from._internal_metadata_);
  27290. required_double_ = from.required_double_;
  27291. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27292. }
  27293. void TestRequiredOneof_NestedMessage::SharedCtor() {
  27294. required_double_ = 0;
  27295. }
  27296. TestRequiredOneof_NestedMessage::~TestRequiredOneof_NestedMessage() {
  27297. // @@protoc_insertion_point(destructor:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27298. SharedDtor();
  27299. }
  27300. void TestRequiredOneof_NestedMessage::SharedDtor() {
  27301. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  27302. }
  27303. void TestRequiredOneof_NestedMessage::ArenaDtor(void* object) {
  27304. TestRequiredOneof_NestedMessage* _this = reinterpret_cast< TestRequiredOneof_NestedMessage* >(object);
  27305. (void)_this;
  27306. }
  27307. void TestRequiredOneof_NestedMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  27308. }
  27309. void TestRequiredOneof_NestedMessage::SetCachedSize(int size) const {
  27310. _cached_size_.Set(size);
  27311. }
  27312. const ::google::protobuf::Descriptor* TestRequiredOneof_NestedMessage::descriptor() {
  27313. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  27314. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  27315. }
  27316. const TestRequiredOneof_NestedMessage& TestRequiredOneof_NestedMessage::default_instance() {
  27317. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredOneof_NestedMessage.base);
  27318. return *internal_default_instance();
  27319. }
  27320. void TestRequiredOneof_NestedMessage::Clear() {
  27321. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27322. ::google::protobuf::uint32 cached_has_bits = 0;
  27323. // Prevent compiler warnings about cached_has_bits being unused
  27324. (void) cached_has_bits;
  27325. required_double_ = 0;
  27326. _has_bits_.Clear();
  27327. _internal_metadata_.Clear();
  27328. }
  27329. bool TestRequiredOneof_NestedMessage::MergePartialFromCodedStream(
  27330. ::google::protobuf::io::CodedInputStream* input) {
  27331. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  27332. ::google::protobuf::uint32 tag;
  27333. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27334. for (;;) {
  27335. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  27336. tag = p.first;
  27337. if (!p.second) goto handle_unusual;
  27338. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  27339. // required double required_double = 1;
  27340. case 1: {
  27341. if (static_cast< ::google::protobuf::uint8>(tag) ==
  27342. static_cast< ::google::protobuf::uint8>(9u /* 9 & 0xFF */)) {
  27343. set_has_required_double();
  27344. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  27345. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  27346. input, &required_double_)));
  27347. } else {
  27348. goto handle_unusual;
  27349. }
  27350. break;
  27351. }
  27352. default: {
  27353. handle_unusual:
  27354. if (tag == 0) {
  27355. goto success;
  27356. }
  27357. DO_(::google::protobuf::internal::WireFormat::SkipField(
  27358. input, tag, _internal_metadata_.mutable_unknown_fields()));
  27359. break;
  27360. }
  27361. }
  27362. }
  27363. success:
  27364. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27365. return true;
  27366. failure:
  27367. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27368. return false;
  27369. #undef DO_
  27370. }
  27371. void TestRequiredOneof_NestedMessage::SerializeWithCachedSizes(
  27372. ::google::protobuf::io::CodedOutputStream* output) const {
  27373. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27374. ::google::protobuf::uint32 cached_has_bits = 0;
  27375. (void) cached_has_bits;
  27376. cached_has_bits = _has_bits_[0];
  27377. // required double required_double = 1;
  27378. if (cached_has_bits & 0x00000001u) {
  27379. ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->required_double(), output);
  27380. }
  27381. if (_internal_metadata_.have_unknown_fields()) {
  27382. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  27383. _internal_metadata_.unknown_fields(), output);
  27384. }
  27385. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27386. }
  27387. ::google::protobuf::uint8* TestRequiredOneof_NestedMessage::InternalSerializeWithCachedSizesToArray(
  27388. bool deterministic, ::google::protobuf::uint8* target) const {
  27389. (void)deterministic; // Unused
  27390. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27391. ::google::protobuf::uint32 cached_has_bits = 0;
  27392. (void) cached_has_bits;
  27393. cached_has_bits = _has_bits_[0];
  27394. // required double required_double = 1;
  27395. if (cached_has_bits & 0x00000001u) {
  27396. target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->required_double(), target);
  27397. }
  27398. if (_internal_metadata_.have_unknown_fields()) {
  27399. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  27400. _internal_metadata_.unknown_fields(), target);
  27401. }
  27402. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27403. return target;
  27404. }
  27405. size_t TestRequiredOneof_NestedMessage::ByteSizeLong() const {
  27406. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27407. size_t total_size = 0;
  27408. if (_internal_metadata_.have_unknown_fields()) {
  27409. total_size +=
  27410. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  27411. _internal_metadata_.unknown_fields());
  27412. }
  27413. // required double required_double = 1;
  27414. if (has_required_double()) {
  27415. total_size += 1 + 8;
  27416. }
  27417. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  27418. SetCachedSize(cached_size);
  27419. return total_size;
  27420. }
  27421. void TestRequiredOneof_NestedMessage::MergeFrom(const ::google::protobuf::Message& from) {
  27422. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27423. GOOGLE_DCHECK_NE(&from, this);
  27424. const TestRequiredOneof_NestedMessage* source =
  27425. ::google::protobuf::internal::DynamicCastToGenerated<const TestRequiredOneof_NestedMessage>(
  27426. &from);
  27427. if (source == NULL) {
  27428. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27429. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  27430. } else {
  27431. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27432. MergeFrom(*source);
  27433. }
  27434. }
  27435. void TestRequiredOneof_NestedMessage::MergeFrom(const TestRequiredOneof_NestedMessage& from) {
  27436. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27437. GOOGLE_DCHECK_NE(&from, this);
  27438. _internal_metadata_.MergeFrom(from._internal_metadata_);
  27439. ::google::protobuf::uint32 cached_has_bits = 0;
  27440. (void) cached_has_bits;
  27441. if (from.has_required_double()) {
  27442. set_required_double(from.required_double());
  27443. }
  27444. }
  27445. void TestRequiredOneof_NestedMessage::CopyFrom(const ::google::protobuf::Message& from) {
  27446. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27447. if (&from == this) return;
  27448. Clear();
  27449. MergeFrom(from);
  27450. }
  27451. void TestRequiredOneof_NestedMessage::CopyFrom(const TestRequiredOneof_NestedMessage& from) {
  27452. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestRequiredOneof.NestedMessage)
  27453. if (&from == this) return;
  27454. Clear();
  27455. MergeFrom(from);
  27456. }
  27457. bool TestRequiredOneof_NestedMessage::IsInitialized() const {
  27458. if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
  27459. return true;
  27460. }
  27461. void TestRequiredOneof_NestedMessage::Swap(TestRequiredOneof_NestedMessage* other) {
  27462. if (other == this) return;
  27463. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  27464. InternalSwap(other);
  27465. } else {
  27466. TestRequiredOneof_NestedMessage* temp = New(GetArenaNoVirtual());
  27467. temp->MergeFrom(*other);
  27468. other->CopyFrom(*this);
  27469. InternalSwap(temp);
  27470. if (GetArenaNoVirtual() == NULL) {
  27471. delete temp;
  27472. }
  27473. }
  27474. }
  27475. void TestRequiredOneof_NestedMessage::UnsafeArenaSwap(TestRequiredOneof_NestedMessage* other) {
  27476. if (other == this) return;
  27477. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  27478. InternalSwap(other);
  27479. }
  27480. void TestRequiredOneof_NestedMessage::InternalSwap(TestRequiredOneof_NestedMessage* other) {
  27481. using std::swap;
  27482. swap(required_double_, other->required_double_);
  27483. swap(_has_bits_[0], other->_has_bits_[0]);
  27484. _internal_metadata_.Swap(&other->_internal_metadata_);
  27485. }
  27486. ::google::protobuf::Metadata TestRequiredOneof_NestedMessage::GetMetadata() const {
  27487. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  27488. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  27489. }
  27490. // ===================================================================
  27491. void TestRequiredOneof::InitAsDefaultInstance() {
  27492. ::protobuf_unittest::_TestRequiredOneof_default_instance_.foo_int_ = 0;
  27493. ::protobuf_unittest::_TestRequiredOneof_default_instance_.foo_string_.UnsafeSetDefault(
  27494. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  27495. ::protobuf_unittest::_TestRequiredOneof_default_instance_.foo_message_ = const_cast< ::protobuf_unittest::TestRequiredOneof_NestedMessage*>(
  27496. ::protobuf_unittest::TestRequiredOneof_NestedMessage::internal_default_instance());
  27497. }
  27498. void TestRequiredOneof::set_allocated_foo_message(::protobuf_unittest::TestRequiredOneof_NestedMessage* foo_message) {
  27499. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  27500. clear_foo();
  27501. if (foo_message) {
  27502. ::google::protobuf::Arena* submessage_arena =
  27503. ::google::protobuf::Arena::GetArena(foo_message);
  27504. if (message_arena != submessage_arena) {
  27505. foo_message = ::google::protobuf::internal::GetOwnedMessage(
  27506. message_arena, foo_message, submessage_arena);
  27507. }
  27508. set_has_foo_message();
  27509. foo_.foo_message_ = foo_message;
  27510. }
  27511. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestRequiredOneof.foo_message)
  27512. }
  27513. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  27514. const int TestRequiredOneof::kFooIntFieldNumber;
  27515. const int TestRequiredOneof::kFooStringFieldNumber;
  27516. const int TestRequiredOneof::kFooMessageFieldNumber;
  27517. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  27518. TestRequiredOneof::TestRequiredOneof()
  27519. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  27520. ::google::protobuf::internal::InitSCC(
  27521. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredOneof.base);
  27522. SharedCtor();
  27523. // @@protoc_insertion_point(constructor:protobuf_unittest.TestRequiredOneof)
  27524. }
  27525. TestRequiredOneof::TestRequiredOneof(::google::protobuf::Arena* arena)
  27526. : ::google::protobuf::Message(),
  27527. _internal_metadata_(arena) {
  27528. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredOneof.base);
  27529. SharedCtor();
  27530. RegisterArenaDtor(arena);
  27531. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestRequiredOneof)
  27532. }
  27533. TestRequiredOneof::TestRequiredOneof(const TestRequiredOneof& from)
  27534. : ::google::protobuf::Message(),
  27535. _internal_metadata_(NULL),
  27536. _has_bits_(from._has_bits_) {
  27537. _internal_metadata_.MergeFrom(from._internal_metadata_);
  27538. clear_has_foo();
  27539. switch (from.foo_case()) {
  27540. case kFooInt: {
  27541. set_foo_int(from.foo_int());
  27542. break;
  27543. }
  27544. case kFooString: {
  27545. set_foo_string(from.foo_string());
  27546. break;
  27547. }
  27548. case kFooMessage: {
  27549. mutable_foo_message()->::protobuf_unittest::TestRequiredOneof_NestedMessage::MergeFrom(from.foo_message());
  27550. break;
  27551. }
  27552. case FOO_NOT_SET: {
  27553. break;
  27554. }
  27555. }
  27556. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestRequiredOneof)
  27557. }
  27558. void TestRequiredOneof::SharedCtor() {
  27559. clear_has_foo();
  27560. }
  27561. TestRequiredOneof::~TestRequiredOneof() {
  27562. // @@protoc_insertion_point(destructor:protobuf_unittest.TestRequiredOneof)
  27563. SharedDtor();
  27564. }
  27565. void TestRequiredOneof::SharedDtor() {
  27566. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  27567. if (has_foo()) {
  27568. clear_foo();
  27569. }
  27570. }
  27571. void TestRequiredOneof::ArenaDtor(void* object) {
  27572. TestRequiredOneof* _this = reinterpret_cast< TestRequiredOneof* >(object);
  27573. (void)_this;
  27574. }
  27575. void TestRequiredOneof::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  27576. }
  27577. void TestRequiredOneof::SetCachedSize(int size) const {
  27578. _cached_size_.Set(size);
  27579. }
  27580. const ::google::protobuf::Descriptor* TestRequiredOneof::descriptor() {
  27581. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  27582. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  27583. }
  27584. const TestRequiredOneof& TestRequiredOneof::default_instance() {
  27585. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRequiredOneof.base);
  27586. return *internal_default_instance();
  27587. }
  27588. void TestRequiredOneof::clear_foo() {
  27589. // @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestRequiredOneof)
  27590. switch (foo_case()) {
  27591. case kFooInt: {
  27592. // No need to clear
  27593. break;
  27594. }
  27595. case kFooString: {
  27596. foo_.foo_string_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  27597. GetArenaNoVirtual());
  27598. break;
  27599. }
  27600. case kFooMessage: {
  27601. if (GetArenaNoVirtual() == NULL) {
  27602. delete foo_.foo_message_;
  27603. }
  27604. break;
  27605. }
  27606. case FOO_NOT_SET: {
  27607. break;
  27608. }
  27609. }
  27610. _oneof_case_[0] = FOO_NOT_SET;
  27611. }
  27612. void TestRequiredOneof::Clear() {
  27613. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestRequiredOneof)
  27614. ::google::protobuf::uint32 cached_has_bits = 0;
  27615. // Prevent compiler warnings about cached_has_bits being unused
  27616. (void) cached_has_bits;
  27617. clear_foo();
  27618. _has_bits_.Clear();
  27619. _internal_metadata_.Clear();
  27620. }
  27621. bool TestRequiredOneof::MergePartialFromCodedStream(
  27622. ::google::protobuf::io::CodedInputStream* input) {
  27623. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  27624. ::google::protobuf::uint32 tag;
  27625. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestRequiredOneof)
  27626. for (;;) {
  27627. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  27628. tag = p.first;
  27629. if (!p.second) goto handle_unusual;
  27630. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  27631. // optional int32 foo_int = 1;
  27632. case 1: {
  27633. if (static_cast< ::google::protobuf::uint8>(tag) ==
  27634. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  27635. clear_foo();
  27636. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  27637. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  27638. input, &foo_.foo_int_)));
  27639. set_has_foo_int();
  27640. } else {
  27641. goto handle_unusual;
  27642. }
  27643. break;
  27644. }
  27645. // optional string foo_string = 2;
  27646. case 2: {
  27647. if (static_cast< ::google::protobuf::uint8>(tag) ==
  27648. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  27649. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  27650. input, this->mutable_foo_string()));
  27651. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  27652. this->foo_string().data(), static_cast<int>(this->foo_string().length()),
  27653. ::google::protobuf::internal::WireFormat::PARSE,
  27654. "protobuf_unittest.TestRequiredOneof.foo_string");
  27655. } else {
  27656. goto handle_unusual;
  27657. }
  27658. break;
  27659. }
  27660. // optional .protobuf_unittest.TestRequiredOneof.NestedMessage foo_message = 3;
  27661. case 3: {
  27662. if (static_cast< ::google::protobuf::uint8>(tag) ==
  27663. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  27664. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  27665. input, mutable_foo_message()));
  27666. } else {
  27667. goto handle_unusual;
  27668. }
  27669. break;
  27670. }
  27671. default: {
  27672. handle_unusual:
  27673. if (tag == 0) {
  27674. goto success;
  27675. }
  27676. DO_(::google::protobuf::internal::WireFormat::SkipField(
  27677. input, tag, _internal_metadata_.mutable_unknown_fields()));
  27678. break;
  27679. }
  27680. }
  27681. }
  27682. success:
  27683. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestRequiredOneof)
  27684. return true;
  27685. failure:
  27686. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestRequiredOneof)
  27687. return false;
  27688. #undef DO_
  27689. }
  27690. void TestRequiredOneof::SerializeWithCachedSizes(
  27691. ::google::protobuf::io::CodedOutputStream* output) const {
  27692. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestRequiredOneof)
  27693. ::google::protobuf::uint32 cached_has_bits = 0;
  27694. (void) cached_has_bits;
  27695. switch (foo_case()) {
  27696. case kFooInt:
  27697. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->foo_int(), output);
  27698. break;
  27699. case kFooString:
  27700. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  27701. this->foo_string().data(), static_cast<int>(this->foo_string().length()),
  27702. ::google::protobuf::internal::WireFormat::SERIALIZE,
  27703. "protobuf_unittest.TestRequiredOneof.foo_string");
  27704. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  27705. 2, this->foo_string(), output);
  27706. break;
  27707. case kFooMessage:
  27708. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  27709. 3, this->_internal_foo_message(), output);
  27710. break;
  27711. default: ;
  27712. }
  27713. if (_internal_metadata_.have_unknown_fields()) {
  27714. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  27715. _internal_metadata_.unknown_fields(), output);
  27716. }
  27717. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestRequiredOneof)
  27718. }
  27719. ::google::protobuf::uint8* TestRequiredOneof::InternalSerializeWithCachedSizesToArray(
  27720. bool deterministic, ::google::protobuf::uint8* target) const {
  27721. (void)deterministic; // Unused
  27722. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestRequiredOneof)
  27723. ::google::protobuf::uint32 cached_has_bits = 0;
  27724. (void) cached_has_bits;
  27725. switch (foo_case()) {
  27726. case kFooInt:
  27727. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->foo_int(), target);
  27728. break;
  27729. case kFooString:
  27730. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  27731. this->foo_string().data(), static_cast<int>(this->foo_string().length()),
  27732. ::google::protobuf::internal::WireFormat::SERIALIZE,
  27733. "protobuf_unittest.TestRequiredOneof.foo_string");
  27734. target =
  27735. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  27736. 2, this->foo_string(), target);
  27737. break;
  27738. case kFooMessage:
  27739. target = ::google::protobuf::internal::WireFormatLite::
  27740. InternalWriteMessageToArray(
  27741. 3, this->_internal_foo_message(), deterministic, target);
  27742. break;
  27743. default: ;
  27744. }
  27745. if (_internal_metadata_.have_unknown_fields()) {
  27746. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  27747. _internal_metadata_.unknown_fields(), target);
  27748. }
  27749. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestRequiredOneof)
  27750. return target;
  27751. }
  27752. size_t TestRequiredOneof::ByteSizeLong() const {
  27753. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestRequiredOneof)
  27754. size_t total_size = 0;
  27755. if (_internal_metadata_.have_unknown_fields()) {
  27756. total_size +=
  27757. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  27758. _internal_metadata_.unknown_fields());
  27759. }
  27760. switch (foo_case()) {
  27761. // optional int32 foo_int = 1;
  27762. case kFooInt: {
  27763. total_size += 1 +
  27764. ::google::protobuf::internal::WireFormatLite::Int32Size(
  27765. this->foo_int());
  27766. break;
  27767. }
  27768. // optional string foo_string = 2;
  27769. case kFooString: {
  27770. total_size += 1 +
  27771. ::google::protobuf::internal::WireFormatLite::StringSize(
  27772. this->foo_string());
  27773. break;
  27774. }
  27775. // optional .protobuf_unittest.TestRequiredOneof.NestedMessage foo_message = 3;
  27776. case kFooMessage: {
  27777. total_size += 1 +
  27778. ::google::protobuf::internal::WireFormatLite::MessageSize(
  27779. *foo_.foo_message_);
  27780. break;
  27781. }
  27782. case FOO_NOT_SET: {
  27783. break;
  27784. }
  27785. }
  27786. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  27787. SetCachedSize(cached_size);
  27788. return total_size;
  27789. }
  27790. void TestRequiredOneof::MergeFrom(const ::google::protobuf::Message& from) {
  27791. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestRequiredOneof)
  27792. GOOGLE_DCHECK_NE(&from, this);
  27793. const TestRequiredOneof* source =
  27794. ::google::protobuf::internal::DynamicCastToGenerated<const TestRequiredOneof>(
  27795. &from);
  27796. if (source == NULL) {
  27797. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestRequiredOneof)
  27798. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  27799. } else {
  27800. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestRequiredOneof)
  27801. MergeFrom(*source);
  27802. }
  27803. }
  27804. void TestRequiredOneof::MergeFrom(const TestRequiredOneof& from) {
  27805. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestRequiredOneof)
  27806. GOOGLE_DCHECK_NE(&from, this);
  27807. _internal_metadata_.MergeFrom(from._internal_metadata_);
  27808. ::google::protobuf::uint32 cached_has_bits = 0;
  27809. (void) cached_has_bits;
  27810. switch (from.foo_case()) {
  27811. case kFooInt: {
  27812. set_foo_int(from.foo_int());
  27813. break;
  27814. }
  27815. case kFooString: {
  27816. set_foo_string(from.foo_string());
  27817. break;
  27818. }
  27819. case kFooMessage: {
  27820. mutable_foo_message()->::protobuf_unittest::TestRequiredOneof_NestedMessage::MergeFrom(from.foo_message());
  27821. break;
  27822. }
  27823. case FOO_NOT_SET: {
  27824. break;
  27825. }
  27826. }
  27827. }
  27828. void TestRequiredOneof::CopyFrom(const ::google::protobuf::Message& from) {
  27829. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestRequiredOneof)
  27830. if (&from == this) return;
  27831. Clear();
  27832. MergeFrom(from);
  27833. }
  27834. void TestRequiredOneof::CopyFrom(const TestRequiredOneof& from) {
  27835. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestRequiredOneof)
  27836. if (&from == this) return;
  27837. Clear();
  27838. MergeFrom(from);
  27839. }
  27840. bool TestRequiredOneof::IsInitialized() const {
  27841. switch (foo_case()) {
  27842. case kFooInt: {
  27843. break;
  27844. }
  27845. case kFooString: {
  27846. break;
  27847. }
  27848. case kFooMessage: {
  27849. if (has_foo_message()) {
  27850. if (!this->foo_message().IsInitialized()) return false;
  27851. }
  27852. break;
  27853. }
  27854. case FOO_NOT_SET: {
  27855. break;
  27856. }
  27857. }
  27858. return true;
  27859. }
  27860. void TestRequiredOneof::Swap(TestRequiredOneof* other) {
  27861. if (other == this) return;
  27862. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  27863. InternalSwap(other);
  27864. } else {
  27865. TestRequiredOneof* temp = New(GetArenaNoVirtual());
  27866. temp->MergeFrom(*other);
  27867. other->CopyFrom(*this);
  27868. InternalSwap(temp);
  27869. if (GetArenaNoVirtual() == NULL) {
  27870. delete temp;
  27871. }
  27872. }
  27873. }
  27874. void TestRequiredOneof::UnsafeArenaSwap(TestRequiredOneof* other) {
  27875. if (other == this) return;
  27876. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  27877. InternalSwap(other);
  27878. }
  27879. void TestRequiredOneof::InternalSwap(TestRequiredOneof* other) {
  27880. using std::swap;
  27881. swap(foo_, other->foo_);
  27882. swap(_oneof_case_[0], other->_oneof_case_[0]);
  27883. swap(_has_bits_[0], other->_has_bits_[0]);
  27884. _internal_metadata_.Swap(&other->_internal_metadata_);
  27885. }
  27886. ::google::protobuf::Metadata TestRequiredOneof::GetMetadata() const {
  27887. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  27888. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  27889. }
  27890. // ===================================================================
  27891. void TestPackedTypes::InitAsDefaultInstance() {
  27892. }
  27893. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  27894. const int TestPackedTypes::kPackedInt32FieldNumber;
  27895. const int TestPackedTypes::kPackedInt64FieldNumber;
  27896. const int TestPackedTypes::kPackedUint32FieldNumber;
  27897. const int TestPackedTypes::kPackedUint64FieldNumber;
  27898. const int TestPackedTypes::kPackedSint32FieldNumber;
  27899. const int TestPackedTypes::kPackedSint64FieldNumber;
  27900. const int TestPackedTypes::kPackedFixed32FieldNumber;
  27901. const int TestPackedTypes::kPackedFixed64FieldNumber;
  27902. const int TestPackedTypes::kPackedSfixed32FieldNumber;
  27903. const int TestPackedTypes::kPackedSfixed64FieldNumber;
  27904. const int TestPackedTypes::kPackedFloatFieldNumber;
  27905. const int TestPackedTypes::kPackedDoubleFieldNumber;
  27906. const int TestPackedTypes::kPackedBoolFieldNumber;
  27907. const int TestPackedTypes::kPackedEnumFieldNumber;
  27908. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  27909. TestPackedTypes::TestPackedTypes()
  27910. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  27911. ::google::protobuf::internal::InitSCC(
  27912. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestPackedTypes.base);
  27913. SharedCtor();
  27914. // @@protoc_insertion_point(constructor:protobuf_unittest.TestPackedTypes)
  27915. }
  27916. TestPackedTypes::TestPackedTypes(::google::protobuf::Arena* arena)
  27917. : ::google::protobuf::Message(),
  27918. _internal_metadata_(arena),
  27919. packed_int32_(arena),
  27920. packed_int64_(arena),
  27921. packed_uint32_(arena),
  27922. packed_uint64_(arena),
  27923. packed_sint32_(arena),
  27924. packed_sint64_(arena),
  27925. packed_fixed32_(arena),
  27926. packed_fixed64_(arena),
  27927. packed_sfixed32_(arena),
  27928. packed_sfixed64_(arena),
  27929. packed_float_(arena),
  27930. packed_double_(arena),
  27931. packed_bool_(arena),
  27932. packed_enum_(arena) {
  27933. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestPackedTypes.base);
  27934. SharedCtor();
  27935. RegisterArenaDtor(arena);
  27936. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestPackedTypes)
  27937. }
  27938. TestPackedTypes::TestPackedTypes(const TestPackedTypes& from)
  27939. : ::google::protobuf::Message(),
  27940. _internal_metadata_(NULL),
  27941. _has_bits_(from._has_bits_),
  27942. packed_int32_(from.packed_int32_),
  27943. packed_int64_(from.packed_int64_),
  27944. packed_uint32_(from.packed_uint32_),
  27945. packed_uint64_(from.packed_uint64_),
  27946. packed_sint32_(from.packed_sint32_),
  27947. packed_sint64_(from.packed_sint64_),
  27948. packed_fixed32_(from.packed_fixed32_),
  27949. packed_fixed64_(from.packed_fixed64_),
  27950. packed_sfixed32_(from.packed_sfixed32_),
  27951. packed_sfixed64_(from.packed_sfixed64_),
  27952. packed_float_(from.packed_float_),
  27953. packed_double_(from.packed_double_),
  27954. packed_bool_(from.packed_bool_),
  27955. packed_enum_(from.packed_enum_) {
  27956. _internal_metadata_.MergeFrom(from._internal_metadata_);
  27957. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestPackedTypes)
  27958. }
  27959. void TestPackedTypes::SharedCtor() {
  27960. }
  27961. TestPackedTypes::~TestPackedTypes() {
  27962. // @@protoc_insertion_point(destructor:protobuf_unittest.TestPackedTypes)
  27963. SharedDtor();
  27964. }
  27965. void TestPackedTypes::SharedDtor() {
  27966. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  27967. }
  27968. void TestPackedTypes::ArenaDtor(void* object) {
  27969. TestPackedTypes* _this = reinterpret_cast< TestPackedTypes* >(object);
  27970. (void)_this;
  27971. }
  27972. void TestPackedTypes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  27973. }
  27974. void TestPackedTypes::SetCachedSize(int size) const {
  27975. _cached_size_.Set(size);
  27976. }
  27977. const ::google::protobuf::Descriptor* TestPackedTypes::descriptor() {
  27978. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  27979. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  27980. }
  27981. const TestPackedTypes& TestPackedTypes::default_instance() {
  27982. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestPackedTypes.base);
  27983. return *internal_default_instance();
  27984. }
  27985. void TestPackedTypes::Clear() {
  27986. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestPackedTypes)
  27987. ::google::protobuf::uint32 cached_has_bits = 0;
  27988. // Prevent compiler warnings about cached_has_bits being unused
  27989. (void) cached_has_bits;
  27990. packed_int32_.Clear();
  27991. packed_int64_.Clear();
  27992. packed_uint32_.Clear();
  27993. packed_uint64_.Clear();
  27994. packed_sint32_.Clear();
  27995. packed_sint64_.Clear();
  27996. packed_fixed32_.Clear();
  27997. packed_fixed64_.Clear();
  27998. packed_sfixed32_.Clear();
  27999. packed_sfixed64_.Clear();
  28000. packed_float_.Clear();
  28001. packed_double_.Clear();
  28002. packed_bool_.Clear();
  28003. packed_enum_.Clear();
  28004. _has_bits_.Clear();
  28005. _internal_metadata_.Clear();
  28006. }
  28007. bool TestPackedTypes::MergePartialFromCodedStream(
  28008. ::google::protobuf::io::CodedInputStream* input) {
  28009. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  28010. ::google::protobuf::uint32 tag;
  28011. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestPackedTypes)
  28012. for (;;) {
  28013. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  28014. tag = p.first;
  28015. if (!p.second) goto handle_unusual;
  28016. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  28017. // repeated int32 packed_int32 = 90 [packed = true];
  28018. case 90: {
  28019. if (static_cast< ::google::protobuf::uint8>(tag) ==
  28020. static_cast< ::google::protobuf::uint8>(210u /* 722 & 0xFF */)) {
  28021. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  28022. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  28023. input, this->mutable_packed_int32())));
  28024. } else if (
  28025. static_cast< ::google::protobuf::uint8>(tag) ==
  28026. static_cast< ::google::protobuf::uint8>(208u /* 720 & 0xFF */)) {
  28027. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  28028. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  28029. 2, 722u, input, this->mutable_packed_int32())));
  28030. } else {
  28031. goto handle_unusual;
  28032. }
  28033. break;
  28034. }
  28035. // repeated int64 packed_int64 = 91 [packed = true];
  28036. case 91: {
  28037. if (static_cast< ::google::protobuf::uint8>(tag) ==
  28038. static_cast< ::google::protobuf::uint8>(218u /* 730 & 0xFF */)) {
  28039. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  28040. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  28041. input, this->mutable_packed_int64())));
  28042. } else if (
  28043. static_cast< ::google::protobuf::uint8>(tag) ==
  28044. static_cast< ::google::protobuf::uint8>(216u /* 728 & 0xFF */)) {
  28045. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  28046. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  28047. 2, 730u, input, this->mutable_packed_int64())));
  28048. } else {
  28049. goto handle_unusual;
  28050. }
  28051. break;
  28052. }
  28053. // repeated uint32 packed_uint32 = 92 [packed = true];
  28054. case 92: {
  28055. if (static_cast< ::google::protobuf::uint8>(tag) ==
  28056. static_cast< ::google::protobuf::uint8>(226u /* 738 & 0xFF */)) {
  28057. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  28058. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  28059. input, this->mutable_packed_uint32())));
  28060. } else if (
  28061. static_cast< ::google::protobuf::uint8>(tag) ==
  28062. static_cast< ::google::protobuf::uint8>(224u /* 736 & 0xFF */)) {
  28063. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  28064. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  28065. 2, 738u, input, this->mutable_packed_uint32())));
  28066. } else {
  28067. goto handle_unusual;
  28068. }
  28069. break;
  28070. }
  28071. // repeated uint64 packed_uint64 = 93 [packed = true];
  28072. case 93: {
  28073. if (static_cast< ::google::protobuf::uint8>(tag) ==
  28074. static_cast< ::google::protobuf::uint8>(234u /* 746 & 0xFF */)) {
  28075. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  28076. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  28077. input, this->mutable_packed_uint64())));
  28078. } else if (
  28079. static_cast< ::google::protobuf::uint8>(tag) ==
  28080. static_cast< ::google::protobuf::uint8>(232u /* 744 & 0xFF */)) {
  28081. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  28082. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  28083. 2, 746u, input, this->mutable_packed_uint64())));
  28084. } else {
  28085. goto handle_unusual;
  28086. }
  28087. break;
  28088. }
  28089. // repeated sint32 packed_sint32 = 94 [packed = true];
  28090. case 94: {
  28091. if (static_cast< ::google::protobuf::uint8>(tag) ==
  28092. static_cast< ::google::protobuf::uint8>(242u /* 754 & 0xFF */)) {
  28093. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  28094. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  28095. input, this->mutable_packed_sint32())));
  28096. } else if (
  28097. static_cast< ::google::protobuf::uint8>(tag) ==
  28098. static_cast< ::google::protobuf::uint8>(240u /* 752 & 0xFF */)) {
  28099. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  28100. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  28101. 2, 754u, input, this->mutable_packed_sint32())));
  28102. } else {
  28103. goto handle_unusual;
  28104. }
  28105. break;
  28106. }
  28107. // repeated sint64 packed_sint64 = 95 [packed = true];
  28108. case 95: {
  28109. if (static_cast< ::google::protobuf::uint8>(tag) ==
  28110. static_cast< ::google::protobuf::uint8>(250u /* 762 & 0xFF */)) {
  28111. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  28112. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  28113. input, this->mutable_packed_sint64())));
  28114. } else if (
  28115. static_cast< ::google::protobuf::uint8>(tag) ==
  28116. static_cast< ::google::protobuf::uint8>(248u /* 760 & 0xFF */)) {
  28117. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  28118. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  28119. 2, 762u, input, this->mutable_packed_sint64())));
  28120. } else {
  28121. goto handle_unusual;
  28122. }
  28123. break;
  28124. }
  28125. // repeated fixed32 packed_fixed32 = 96 [packed = true];
  28126. case 96: {
  28127. if (static_cast< ::google::protobuf::uint8>(tag) ==
  28128. static_cast< ::google::protobuf::uint8>(2u /* 770 & 0xFF */)) {
  28129. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  28130. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  28131. input, this->mutable_packed_fixed32())));
  28132. } else if (
  28133. static_cast< ::google::protobuf::uint8>(tag) ==
  28134. static_cast< ::google::protobuf::uint8>(5u /* 773 & 0xFF */)) {
  28135. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  28136. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  28137. 2, 770u, input, this->mutable_packed_fixed32())));
  28138. } else {
  28139. goto handle_unusual;
  28140. }
  28141. break;
  28142. }
  28143. // repeated fixed64 packed_fixed64 = 97 [packed = true];
  28144. case 97: {
  28145. if (static_cast< ::google::protobuf::uint8>(tag) ==
  28146. static_cast< ::google::protobuf::uint8>(10u /* 778 & 0xFF */)) {
  28147. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  28148. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  28149. input, this->mutable_packed_fixed64())));
  28150. } else if (
  28151. static_cast< ::google::protobuf::uint8>(tag) ==
  28152. static_cast< ::google::protobuf::uint8>(9u /* 777 & 0xFF */)) {
  28153. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  28154. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  28155. 2, 778u, input, this->mutable_packed_fixed64())));
  28156. } else {
  28157. goto handle_unusual;
  28158. }
  28159. break;
  28160. }
  28161. // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
  28162. case 98: {
  28163. if (static_cast< ::google::protobuf::uint8>(tag) ==
  28164. static_cast< ::google::protobuf::uint8>(18u /* 786 & 0xFF */)) {
  28165. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  28166. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  28167. input, this->mutable_packed_sfixed32())));
  28168. } else if (
  28169. static_cast< ::google::protobuf::uint8>(tag) ==
  28170. static_cast< ::google::protobuf::uint8>(21u /* 789 & 0xFF */)) {
  28171. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  28172. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  28173. 2, 786u, input, this->mutable_packed_sfixed32())));
  28174. } else {
  28175. goto handle_unusual;
  28176. }
  28177. break;
  28178. }
  28179. // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
  28180. case 99: {
  28181. if (static_cast< ::google::protobuf::uint8>(tag) ==
  28182. static_cast< ::google::protobuf::uint8>(26u /* 794 & 0xFF */)) {
  28183. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  28184. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  28185. input, this->mutable_packed_sfixed64())));
  28186. } else if (
  28187. static_cast< ::google::protobuf::uint8>(tag) ==
  28188. static_cast< ::google::protobuf::uint8>(25u /* 793 & 0xFF */)) {
  28189. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  28190. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  28191. 2, 794u, input, this->mutable_packed_sfixed64())));
  28192. } else {
  28193. goto handle_unusual;
  28194. }
  28195. break;
  28196. }
  28197. // repeated float packed_float = 100 [packed = true];
  28198. case 100: {
  28199. if (static_cast< ::google::protobuf::uint8>(tag) ==
  28200. static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) {
  28201. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  28202. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  28203. input, this->mutable_packed_float())));
  28204. } else if (
  28205. static_cast< ::google::protobuf::uint8>(tag) ==
  28206. static_cast< ::google::protobuf::uint8>(37u /* 805 & 0xFF */)) {
  28207. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  28208. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  28209. 2, 802u, input, this->mutable_packed_float())));
  28210. } else {
  28211. goto handle_unusual;
  28212. }
  28213. break;
  28214. }
  28215. // repeated double packed_double = 101 [packed = true];
  28216. case 101: {
  28217. if (static_cast< ::google::protobuf::uint8>(tag) ==
  28218. static_cast< ::google::protobuf::uint8>(42u /* 810 & 0xFF */)) {
  28219. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  28220. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  28221. input, this->mutable_packed_double())));
  28222. } else if (
  28223. static_cast< ::google::protobuf::uint8>(tag) ==
  28224. static_cast< ::google::protobuf::uint8>(41u /* 809 & 0xFF */)) {
  28225. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  28226. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  28227. 2, 810u, input, this->mutable_packed_double())));
  28228. } else {
  28229. goto handle_unusual;
  28230. }
  28231. break;
  28232. }
  28233. // repeated bool packed_bool = 102 [packed = true];
  28234. case 102: {
  28235. if (static_cast< ::google::protobuf::uint8>(tag) ==
  28236. static_cast< ::google::protobuf::uint8>(50u /* 818 & 0xFF */)) {
  28237. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  28238. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  28239. input, this->mutable_packed_bool())));
  28240. } else if (
  28241. static_cast< ::google::protobuf::uint8>(tag) ==
  28242. static_cast< ::google::protobuf::uint8>(48u /* 816 & 0xFF */)) {
  28243. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  28244. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  28245. 2, 818u, input, this->mutable_packed_bool())));
  28246. } else {
  28247. goto handle_unusual;
  28248. }
  28249. break;
  28250. }
  28251. // repeated .protobuf_unittest.ForeignEnum packed_enum = 103 [packed = true];
  28252. case 103: {
  28253. if (static_cast< ::google::protobuf::uint8>(tag) ==
  28254. static_cast< ::google::protobuf::uint8>(58u /* 826 & 0xFF */)) {
  28255. ::google::protobuf::uint32 length;
  28256. DO_(input->ReadVarint32(&length));
  28257. ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(static_cast<int>(length));
  28258. while (input->BytesUntilLimit() > 0) {
  28259. int value;
  28260. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  28261. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  28262. input, &value)));
  28263. if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
  28264. add_packed_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
  28265. } else {
  28266. mutable_unknown_fields()->AddVarint(
  28267. 103, static_cast< ::google::protobuf::uint64>(value));
  28268. }
  28269. }
  28270. input->PopLimit(limit);
  28271. } else if (
  28272. static_cast< ::google::protobuf::uint8>(tag) ==
  28273. static_cast< ::google::protobuf::uint8>(56u /* 824 & 0xFF */)) {
  28274. int value;
  28275. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  28276. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  28277. input, &value)));
  28278. if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
  28279. add_packed_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
  28280. } else {
  28281. mutable_unknown_fields()->AddVarint(
  28282. 103, static_cast< ::google::protobuf::uint64>(value));
  28283. }
  28284. } else {
  28285. goto handle_unusual;
  28286. }
  28287. break;
  28288. }
  28289. default: {
  28290. handle_unusual:
  28291. if (tag == 0) {
  28292. goto success;
  28293. }
  28294. DO_(::google::protobuf::internal::WireFormat::SkipField(
  28295. input, tag, _internal_metadata_.mutable_unknown_fields()));
  28296. break;
  28297. }
  28298. }
  28299. }
  28300. success:
  28301. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestPackedTypes)
  28302. return true;
  28303. failure:
  28304. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestPackedTypes)
  28305. return false;
  28306. #undef DO_
  28307. }
  28308. void TestPackedTypes::SerializeWithCachedSizes(
  28309. ::google::protobuf::io::CodedOutputStream* output) const {
  28310. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestPackedTypes)
  28311. ::google::protobuf::uint32 cached_has_bits = 0;
  28312. (void) cached_has_bits;
  28313. // repeated int32 packed_int32 = 90 [packed = true];
  28314. if (this->packed_int32_size() > 0) {
  28315. ::google::protobuf::internal::WireFormatLite::WriteTag(90, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  28316. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  28317. _packed_int32_cached_byte_size_));
  28318. }
  28319. for (int i = 0, n = this->packed_int32_size(); i < n; i++) {
  28320. ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
  28321. this->packed_int32(i), output);
  28322. }
  28323. // repeated int64 packed_int64 = 91 [packed = true];
  28324. if (this->packed_int64_size() > 0) {
  28325. ::google::protobuf::internal::WireFormatLite::WriteTag(91, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  28326. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  28327. _packed_int64_cached_byte_size_));
  28328. }
  28329. for (int i = 0, n = this->packed_int64_size(); i < n; i++) {
  28330. ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag(
  28331. this->packed_int64(i), output);
  28332. }
  28333. // repeated uint32 packed_uint32 = 92 [packed = true];
  28334. if (this->packed_uint32_size() > 0) {
  28335. ::google::protobuf::internal::WireFormatLite::WriteTag(92, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  28336. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  28337. _packed_uint32_cached_byte_size_));
  28338. }
  28339. for (int i = 0, n = this->packed_uint32_size(); i < n; i++) {
  28340. ::google::protobuf::internal::WireFormatLite::WriteUInt32NoTag(
  28341. this->packed_uint32(i), output);
  28342. }
  28343. // repeated uint64 packed_uint64 = 93 [packed = true];
  28344. if (this->packed_uint64_size() > 0) {
  28345. ::google::protobuf::internal::WireFormatLite::WriteTag(93, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  28346. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  28347. _packed_uint64_cached_byte_size_));
  28348. }
  28349. for (int i = 0, n = this->packed_uint64_size(); i < n; i++) {
  28350. ::google::protobuf::internal::WireFormatLite::WriteUInt64NoTag(
  28351. this->packed_uint64(i), output);
  28352. }
  28353. // repeated sint32 packed_sint32 = 94 [packed = true];
  28354. if (this->packed_sint32_size() > 0) {
  28355. ::google::protobuf::internal::WireFormatLite::WriteTag(94, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  28356. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  28357. _packed_sint32_cached_byte_size_));
  28358. }
  28359. for (int i = 0, n = this->packed_sint32_size(); i < n; i++) {
  28360. ::google::protobuf::internal::WireFormatLite::WriteSInt32NoTag(
  28361. this->packed_sint32(i), output);
  28362. }
  28363. // repeated sint64 packed_sint64 = 95 [packed = true];
  28364. if (this->packed_sint64_size() > 0) {
  28365. ::google::protobuf::internal::WireFormatLite::WriteTag(95, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  28366. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  28367. _packed_sint64_cached_byte_size_));
  28368. }
  28369. for (int i = 0, n = this->packed_sint64_size(); i < n; i++) {
  28370. ::google::protobuf::internal::WireFormatLite::WriteSInt64NoTag(
  28371. this->packed_sint64(i), output);
  28372. }
  28373. // repeated fixed32 packed_fixed32 = 96 [packed = true];
  28374. if (this->packed_fixed32_size() > 0) {
  28375. ::google::protobuf::internal::WireFormatLite::WriteTag(96, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  28376. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  28377. _packed_fixed32_cached_byte_size_));
  28378. ::google::protobuf::internal::WireFormatLite::WriteFixed32Array(
  28379. this->packed_fixed32().data(), this->packed_fixed32_size(), output);
  28380. }
  28381. // repeated fixed64 packed_fixed64 = 97 [packed = true];
  28382. if (this->packed_fixed64_size() > 0) {
  28383. ::google::protobuf::internal::WireFormatLite::WriteTag(97, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  28384. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  28385. _packed_fixed64_cached_byte_size_));
  28386. ::google::protobuf::internal::WireFormatLite::WriteFixed64Array(
  28387. this->packed_fixed64().data(), this->packed_fixed64_size(), output);
  28388. }
  28389. // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
  28390. if (this->packed_sfixed32_size() > 0) {
  28391. ::google::protobuf::internal::WireFormatLite::WriteTag(98, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  28392. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  28393. _packed_sfixed32_cached_byte_size_));
  28394. ::google::protobuf::internal::WireFormatLite::WriteSFixed32Array(
  28395. this->packed_sfixed32().data(), this->packed_sfixed32_size(), output);
  28396. }
  28397. // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
  28398. if (this->packed_sfixed64_size() > 0) {
  28399. ::google::protobuf::internal::WireFormatLite::WriteTag(99, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  28400. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  28401. _packed_sfixed64_cached_byte_size_));
  28402. ::google::protobuf::internal::WireFormatLite::WriteSFixed64Array(
  28403. this->packed_sfixed64().data(), this->packed_sfixed64_size(), output);
  28404. }
  28405. // repeated float packed_float = 100 [packed = true];
  28406. if (this->packed_float_size() > 0) {
  28407. ::google::protobuf::internal::WireFormatLite::WriteTag(100, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  28408. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  28409. _packed_float_cached_byte_size_));
  28410. ::google::protobuf::internal::WireFormatLite::WriteFloatArray(
  28411. this->packed_float().data(), this->packed_float_size(), output);
  28412. }
  28413. // repeated double packed_double = 101 [packed = true];
  28414. if (this->packed_double_size() > 0) {
  28415. ::google::protobuf::internal::WireFormatLite::WriteTag(101, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  28416. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  28417. _packed_double_cached_byte_size_));
  28418. ::google::protobuf::internal::WireFormatLite::WriteDoubleArray(
  28419. this->packed_double().data(), this->packed_double_size(), output);
  28420. }
  28421. // repeated bool packed_bool = 102 [packed = true];
  28422. if (this->packed_bool_size() > 0) {
  28423. ::google::protobuf::internal::WireFormatLite::WriteTag(102, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  28424. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  28425. _packed_bool_cached_byte_size_));
  28426. ::google::protobuf::internal::WireFormatLite::WriteBoolArray(
  28427. this->packed_bool().data(), this->packed_bool_size(), output);
  28428. }
  28429. // repeated .protobuf_unittest.ForeignEnum packed_enum = 103 [packed = true];
  28430. if (this->packed_enum_size() > 0) {
  28431. ::google::protobuf::internal::WireFormatLite::WriteTag(
  28432. 103,
  28433. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28434. output);
  28435. output->WriteVarint32(
  28436. static_cast< ::google::protobuf::uint32>(_packed_enum_cached_byte_size_));
  28437. }
  28438. for (int i = 0, n = this->packed_enum_size(); i < n; i++) {
  28439. ::google::protobuf::internal::WireFormatLite::WriteEnumNoTag(
  28440. this->packed_enum(i), output);
  28441. }
  28442. if (_internal_metadata_.have_unknown_fields()) {
  28443. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  28444. _internal_metadata_.unknown_fields(), output);
  28445. }
  28446. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestPackedTypes)
  28447. }
  28448. ::google::protobuf::uint8* TestPackedTypes::InternalSerializeWithCachedSizesToArray(
  28449. bool deterministic, ::google::protobuf::uint8* target) const {
  28450. (void)deterministic; // Unused
  28451. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestPackedTypes)
  28452. ::google::protobuf::uint32 cached_has_bits = 0;
  28453. (void) cached_has_bits;
  28454. // repeated int32 packed_int32 = 90 [packed = true];
  28455. if (this->packed_int32_size() > 0) {
  28456. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  28457. 90,
  28458. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28459. target);
  28460. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  28461. static_cast< ::google::protobuf::int32>(
  28462. _packed_int32_cached_byte_size_), target);
  28463. target = ::google::protobuf::internal::WireFormatLite::
  28464. WriteInt32NoTagToArray(this->packed_int32_, target);
  28465. }
  28466. // repeated int64 packed_int64 = 91 [packed = true];
  28467. if (this->packed_int64_size() > 0) {
  28468. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  28469. 91,
  28470. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28471. target);
  28472. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  28473. static_cast< ::google::protobuf::int32>(
  28474. _packed_int64_cached_byte_size_), target);
  28475. target = ::google::protobuf::internal::WireFormatLite::
  28476. WriteInt64NoTagToArray(this->packed_int64_, target);
  28477. }
  28478. // repeated uint32 packed_uint32 = 92 [packed = true];
  28479. if (this->packed_uint32_size() > 0) {
  28480. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  28481. 92,
  28482. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28483. target);
  28484. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  28485. static_cast< ::google::protobuf::int32>(
  28486. _packed_uint32_cached_byte_size_), target);
  28487. target = ::google::protobuf::internal::WireFormatLite::
  28488. WriteUInt32NoTagToArray(this->packed_uint32_, target);
  28489. }
  28490. // repeated uint64 packed_uint64 = 93 [packed = true];
  28491. if (this->packed_uint64_size() > 0) {
  28492. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  28493. 93,
  28494. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28495. target);
  28496. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  28497. static_cast< ::google::protobuf::int32>(
  28498. _packed_uint64_cached_byte_size_), target);
  28499. target = ::google::protobuf::internal::WireFormatLite::
  28500. WriteUInt64NoTagToArray(this->packed_uint64_, target);
  28501. }
  28502. // repeated sint32 packed_sint32 = 94 [packed = true];
  28503. if (this->packed_sint32_size() > 0) {
  28504. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  28505. 94,
  28506. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28507. target);
  28508. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  28509. static_cast< ::google::protobuf::int32>(
  28510. _packed_sint32_cached_byte_size_), target);
  28511. target = ::google::protobuf::internal::WireFormatLite::
  28512. WriteSInt32NoTagToArray(this->packed_sint32_, target);
  28513. }
  28514. // repeated sint64 packed_sint64 = 95 [packed = true];
  28515. if (this->packed_sint64_size() > 0) {
  28516. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  28517. 95,
  28518. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28519. target);
  28520. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  28521. static_cast< ::google::protobuf::int32>(
  28522. _packed_sint64_cached_byte_size_), target);
  28523. target = ::google::protobuf::internal::WireFormatLite::
  28524. WriteSInt64NoTagToArray(this->packed_sint64_, target);
  28525. }
  28526. // repeated fixed32 packed_fixed32 = 96 [packed = true];
  28527. if (this->packed_fixed32_size() > 0) {
  28528. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  28529. 96,
  28530. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28531. target);
  28532. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  28533. static_cast< ::google::protobuf::int32>(
  28534. _packed_fixed32_cached_byte_size_), target);
  28535. target = ::google::protobuf::internal::WireFormatLite::
  28536. WriteFixed32NoTagToArray(this->packed_fixed32_, target);
  28537. }
  28538. // repeated fixed64 packed_fixed64 = 97 [packed = true];
  28539. if (this->packed_fixed64_size() > 0) {
  28540. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  28541. 97,
  28542. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28543. target);
  28544. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  28545. static_cast< ::google::protobuf::int32>(
  28546. _packed_fixed64_cached_byte_size_), target);
  28547. target = ::google::protobuf::internal::WireFormatLite::
  28548. WriteFixed64NoTagToArray(this->packed_fixed64_, target);
  28549. }
  28550. // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
  28551. if (this->packed_sfixed32_size() > 0) {
  28552. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  28553. 98,
  28554. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28555. target);
  28556. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  28557. static_cast< ::google::protobuf::int32>(
  28558. _packed_sfixed32_cached_byte_size_), target);
  28559. target = ::google::protobuf::internal::WireFormatLite::
  28560. WriteSFixed32NoTagToArray(this->packed_sfixed32_, target);
  28561. }
  28562. // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
  28563. if (this->packed_sfixed64_size() > 0) {
  28564. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  28565. 99,
  28566. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28567. target);
  28568. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  28569. static_cast< ::google::protobuf::int32>(
  28570. _packed_sfixed64_cached_byte_size_), target);
  28571. target = ::google::protobuf::internal::WireFormatLite::
  28572. WriteSFixed64NoTagToArray(this->packed_sfixed64_, target);
  28573. }
  28574. // repeated float packed_float = 100 [packed = true];
  28575. if (this->packed_float_size() > 0) {
  28576. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  28577. 100,
  28578. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28579. target);
  28580. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  28581. static_cast< ::google::protobuf::int32>(
  28582. _packed_float_cached_byte_size_), target);
  28583. target = ::google::protobuf::internal::WireFormatLite::
  28584. WriteFloatNoTagToArray(this->packed_float_, target);
  28585. }
  28586. // repeated double packed_double = 101 [packed = true];
  28587. if (this->packed_double_size() > 0) {
  28588. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  28589. 101,
  28590. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28591. target);
  28592. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  28593. static_cast< ::google::protobuf::int32>(
  28594. _packed_double_cached_byte_size_), target);
  28595. target = ::google::protobuf::internal::WireFormatLite::
  28596. WriteDoubleNoTagToArray(this->packed_double_, target);
  28597. }
  28598. // repeated bool packed_bool = 102 [packed = true];
  28599. if (this->packed_bool_size() > 0) {
  28600. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  28601. 102,
  28602. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28603. target);
  28604. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  28605. static_cast< ::google::protobuf::int32>(
  28606. _packed_bool_cached_byte_size_), target);
  28607. target = ::google::protobuf::internal::WireFormatLite::
  28608. WriteBoolNoTagToArray(this->packed_bool_, target);
  28609. }
  28610. // repeated .protobuf_unittest.ForeignEnum packed_enum = 103 [packed = true];
  28611. if (this->packed_enum_size() > 0) {
  28612. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  28613. 103,
  28614. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  28615. target);
  28616. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( static_cast< ::google::protobuf::uint32>(
  28617. _packed_enum_cached_byte_size_), target);
  28618. target = ::google::protobuf::internal::WireFormatLite::WriteEnumNoTagToArray(
  28619. this->packed_enum_, target);
  28620. }
  28621. if (_internal_metadata_.have_unknown_fields()) {
  28622. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  28623. _internal_metadata_.unknown_fields(), target);
  28624. }
  28625. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestPackedTypes)
  28626. return target;
  28627. }
  28628. size_t TestPackedTypes::ByteSizeLong() const {
  28629. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestPackedTypes)
  28630. size_t total_size = 0;
  28631. if (_internal_metadata_.have_unknown_fields()) {
  28632. total_size +=
  28633. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  28634. _internal_metadata_.unknown_fields());
  28635. }
  28636. // repeated int32 packed_int32 = 90 [packed = true];
  28637. {
  28638. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  28639. Int32Size(this->packed_int32_);
  28640. if (data_size > 0) {
  28641. total_size += 2 +
  28642. ::google::protobuf::internal::WireFormatLite::Int32Size(
  28643. static_cast< ::google::protobuf::int32>(data_size));
  28644. }
  28645. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  28646. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  28647. _packed_int32_cached_byte_size_ = cached_size;
  28648. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  28649. total_size += data_size;
  28650. }
  28651. // repeated int64 packed_int64 = 91 [packed = true];
  28652. {
  28653. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  28654. Int64Size(this->packed_int64_);
  28655. if (data_size > 0) {
  28656. total_size += 2 +
  28657. ::google::protobuf::internal::WireFormatLite::Int32Size(
  28658. static_cast< ::google::protobuf::int32>(data_size));
  28659. }
  28660. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  28661. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  28662. _packed_int64_cached_byte_size_ = cached_size;
  28663. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  28664. total_size += data_size;
  28665. }
  28666. // repeated uint32 packed_uint32 = 92 [packed = true];
  28667. {
  28668. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  28669. UInt32Size(this->packed_uint32_);
  28670. if (data_size > 0) {
  28671. total_size += 2 +
  28672. ::google::protobuf::internal::WireFormatLite::Int32Size(
  28673. static_cast< ::google::protobuf::int32>(data_size));
  28674. }
  28675. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  28676. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  28677. _packed_uint32_cached_byte_size_ = cached_size;
  28678. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  28679. total_size += data_size;
  28680. }
  28681. // repeated uint64 packed_uint64 = 93 [packed = true];
  28682. {
  28683. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  28684. UInt64Size(this->packed_uint64_);
  28685. if (data_size > 0) {
  28686. total_size += 2 +
  28687. ::google::protobuf::internal::WireFormatLite::Int32Size(
  28688. static_cast< ::google::protobuf::int32>(data_size));
  28689. }
  28690. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  28691. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  28692. _packed_uint64_cached_byte_size_ = cached_size;
  28693. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  28694. total_size += data_size;
  28695. }
  28696. // repeated sint32 packed_sint32 = 94 [packed = true];
  28697. {
  28698. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  28699. SInt32Size(this->packed_sint32_);
  28700. if (data_size > 0) {
  28701. total_size += 2 +
  28702. ::google::protobuf::internal::WireFormatLite::Int32Size(
  28703. static_cast< ::google::protobuf::int32>(data_size));
  28704. }
  28705. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  28706. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  28707. _packed_sint32_cached_byte_size_ = cached_size;
  28708. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  28709. total_size += data_size;
  28710. }
  28711. // repeated sint64 packed_sint64 = 95 [packed = true];
  28712. {
  28713. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  28714. SInt64Size(this->packed_sint64_);
  28715. if (data_size > 0) {
  28716. total_size += 2 +
  28717. ::google::protobuf::internal::WireFormatLite::Int32Size(
  28718. static_cast< ::google::protobuf::int32>(data_size));
  28719. }
  28720. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  28721. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  28722. _packed_sint64_cached_byte_size_ = cached_size;
  28723. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  28724. total_size += data_size;
  28725. }
  28726. // repeated fixed32 packed_fixed32 = 96 [packed = true];
  28727. {
  28728. unsigned int count = static_cast<unsigned int>(this->packed_fixed32_size());
  28729. size_t data_size = 4UL * count;
  28730. if (data_size > 0) {
  28731. total_size += 2 +
  28732. ::google::protobuf::internal::WireFormatLite::Int32Size(
  28733. static_cast< ::google::protobuf::int32>(data_size));
  28734. }
  28735. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  28736. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  28737. _packed_fixed32_cached_byte_size_ = cached_size;
  28738. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  28739. total_size += data_size;
  28740. }
  28741. // repeated fixed64 packed_fixed64 = 97 [packed = true];
  28742. {
  28743. unsigned int count = static_cast<unsigned int>(this->packed_fixed64_size());
  28744. size_t data_size = 8UL * count;
  28745. if (data_size > 0) {
  28746. total_size += 2 +
  28747. ::google::protobuf::internal::WireFormatLite::Int32Size(
  28748. static_cast< ::google::protobuf::int32>(data_size));
  28749. }
  28750. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  28751. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  28752. _packed_fixed64_cached_byte_size_ = cached_size;
  28753. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  28754. total_size += data_size;
  28755. }
  28756. // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
  28757. {
  28758. unsigned int count = static_cast<unsigned int>(this->packed_sfixed32_size());
  28759. size_t data_size = 4UL * count;
  28760. if (data_size > 0) {
  28761. total_size += 2 +
  28762. ::google::protobuf::internal::WireFormatLite::Int32Size(
  28763. static_cast< ::google::protobuf::int32>(data_size));
  28764. }
  28765. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  28766. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  28767. _packed_sfixed32_cached_byte_size_ = cached_size;
  28768. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  28769. total_size += data_size;
  28770. }
  28771. // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
  28772. {
  28773. unsigned int count = static_cast<unsigned int>(this->packed_sfixed64_size());
  28774. size_t data_size = 8UL * count;
  28775. if (data_size > 0) {
  28776. total_size += 2 +
  28777. ::google::protobuf::internal::WireFormatLite::Int32Size(
  28778. static_cast< ::google::protobuf::int32>(data_size));
  28779. }
  28780. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  28781. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  28782. _packed_sfixed64_cached_byte_size_ = cached_size;
  28783. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  28784. total_size += data_size;
  28785. }
  28786. // repeated float packed_float = 100 [packed = true];
  28787. {
  28788. unsigned int count = static_cast<unsigned int>(this->packed_float_size());
  28789. size_t data_size = 4UL * count;
  28790. if (data_size > 0) {
  28791. total_size += 2 +
  28792. ::google::protobuf::internal::WireFormatLite::Int32Size(
  28793. static_cast< ::google::protobuf::int32>(data_size));
  28794. }
  28795. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  28796. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  28797. _packed_float_cached_byte_size_ = cached_size;
  28798. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  28799. total_size += data_size;
  28800. }
  28801. // repeated double packed_double = 101 [packed = true];
  28802. {
  28803. unsigned int count = static_cast<unsigned int>(this->packed_double_size());
  28804. size_t data_size = 8UL * count;
  28805. if (data_size > 0) {
  28806. total_size += 2 +
  28807. ::google::protobuf::internal::WireFormatLite::Int32Size(
  28808. static_cast< ::google::protobuf::int32>(data_size));
  28809. }
  28810. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  28811. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  28812. _packed_double_cached_byte_size_ = cached_size;
  28813. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  28814. total_size += data_size;
  28815. }
  28816. // repeated bool packed_bool = 102 [packed = true];
  28817. {
  28818. unsigned int count = static_cast<unsigned int>(this->packed_bool_size());
  28819. size_t data_size = 1UL * count;
  28820. if (data_size > 0) {
  28821. total_size += 2 +
  28822. ::google::protobuf::internal::WireFormatLite::Int32Size(
  28823. static_cast< ::google::protobuf::int32>(data_size));
  28824. }
  28825. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  28826. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  28827. _packed_bool_cached_byte_size_ = cached_size;
  28828. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  28829. total_size += data_size;
  28830. }
  28831. // repeated .protobuf_unittest.ForeignEnum packed_enum = 103 [packed = true];
  28832. {
  28833. size_t data_size = 0;
  28834. unsigned int count = static_cast<unsigned int>(this->packed_enum_size());for (unsigned int i = 0; i < count; i++) {
  28835. data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
  28836. this->packed_enum(static_cast<int>(i)));
  28837. }
  28838. if (data_size > 0) {
  28839. total_size += 2 +
  28840. ::google::protobuf::internal::WireFormatLite::Int32Size(
  28841. static_cast< ::google::protobuf::int32>(data_size));
  28842. }
  28843. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  28844. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  28845. _packed_enum_cached_byte_size_ = cached_size;
  28846. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  28847. total_size += data_size;
  28848. }
  28849. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  28850. SetCachedSize(cached_size);
  28851. return total_size;
  28852. }
  28853. void TestPackedTypes::MergeFrom(const ::google::protobuf::Message& from) {
  28854. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestPackedTypes)
  28855. GOOGLE_DCHECK_NE(&from, this);
  28856. const TestPackedTypes* source =
  28857. ::google::protobuf::internal::DynamicCastToGenerated<const TestPackedTypes>(
  28858. &from);
  28859. if (source == NULL) {
  28860. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestPackedTypes)
  28861. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  28862. } else {
  28863. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestPackedTypes)
  28864. MergeFrom(*source);
  28865. }
  28866. }
  28867. void TestPackedTypes::MergeFrom(const TestPackedTypes& from) {
  28868. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestPackedTypes)
  28869. GOOGLE_DCHECK_NE(&from, this);
  28870. _internal_metadata_.MergeFrom(from._internal_metadata_);
  28871. ::google::protobuf::uint32 cached_has_bits = 0;
  28872. (void) cached_has_bits;
  28873. packed_int32_.MergeFrom(from.packed_int32_);
  28874. packed_int64_.MergeFrom(from.packed_int64_);
  28875. packed_uint32_.MergeFrom(from.packed_uint32_);
  28876. packed_uint64_.MergeFrom(from.packed_uint64_);
  28877. packed_sint32_.MergeFrom(from.packed_sint32_);
  28878. packed_sint64_.MergeFrom(from.packed_sint64_);
  28879. packed_fixed32_.MergeFrom(from.packed_fixed32_);
  28880. packed_fixed64_.MergeFrom(from.packed_fixed64_);
  28881. packed_sfixed32_.MergeFrom(from.packed_sfixed32_);
  28882. packed_sfixed64_.MergeFrom(from.packed_sfixed64_);
  28883. packed_float_.MergeFrom(from.packed_float_);
  28884. packed_double_.MergeFrom(from.packed_double_);
  28885. packed_bool_.MergeFrom(from.packed_bool_);
  28886. packed_enum_.MergeFrom(from.packed_enum_);
  28887. }
  28888. void TestPackedTypes::CopyFrom(const ::google::protobuf::Message& from) {
  28889. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestPackedTypes)
  28890. if (&from == this) return;
  28891. Clear();
  28892. MergeFrom(from);
  28893. }
  28894. void TestPackedTypes::CopyFrom(const TestPackedTypes& from) {
  28895. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestPackedTypes)
  28896. if (&from == this) return;
  28897. Clear();
  28898. MergeFrom(from);
  28899. }
  28900. bool TestPackedTypes::IsInitialized() const {
  28901. return true;
  28902. }
  28903. void TestPackedTypes::Swap(TestPackedTypes* other) {
  28904. if (other == this) return;
  28905. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  28906. InternalSwap(other);
  28907. } else {
  28908. TestPackedTypes* temp = New(GetArenaNoVirtual());
  28909. temp->MergeFrom(*other);
  28910. other->CopyFrom(*this);
  28911. InternalSwap(temp);
  28912. if (GetArenaNoVirtual() == NULL) {
  28913. delete temp;
  28914. }
  28915. }
  28916. }
  28917. void TestPackedTypes::UnsafeArenaSwap(TestPackedTypes* other) {
  28918. if (other == this) return;
  28919. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  28920. InternalSwap(other);
  28921. }
  28922. void TestPackedTypes::InternalSwap(TestPackedTypes* other) {
  28923. using std::swap;
  28924. packed_int32_.InternalSwap(&other->packed_int32_);
  28925. packed_int64_.InternalSwap(&other->packed_int64_);
  28926. packed_uint32_.InternalSwap(&other->packed_uint32_);
  28927. packed_uint64_.InternalSwap(&other->packed_uint64_);
  28928. packed_sint32_.InternalSwap(&other->packed_sint32_);
  28929. packed_sint64_.InternalSwap(&other->packed_sint64_);
  28930. packed_fixed32_.InternalSwap(&other->packed_fixed32_);
  28931. packed_fixed64_.InternalSwap(&other->packed_fixed64_);
  28932. packed_sfixed32_.InternalSwap(&other->packed_sfixed32_);
  28933. packed_sfixed64_.InternalSwap(&other->packed_sfixed64_);
  28934. packed_float_.InternalSwap(&other->packed_float_);
  28935. packed_double_.InternalSwap(&other->packed_double_);
  28936. packed_bool_.InternalSwap(&other->packed_bool_);
  28937. packed_enum_.InternalSwap(&other->packed_enum_);
  28938. swap(_has_bits_[0], other->_has_bits_[0]);
  28939. _internal_metadata_.Swap(&other->_internal_metadata_);
  28940. }
  28941. ::google::protobuf::Metadata TestPackedTypes::GetMetadata() const {
  28942. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  28943. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  28944. }
  28945. // ===================================================================
  28946. void TestUnpackedTypes::InitAsDefaultInstance() {
  28947. }
  28948. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  28949. const int TestUnpackedTypes::kUnpackedInt32FieldNumber;
  28950. const int TestUnpackedTypes::kUnpackedInt64FieldNumber;
  28951. const int TestUnpackedTypes::kUnpackedUint32FieldNumber;
  28952. const int TestUnpackedTypes::kUnpackedUint64FieldNumber;
  28953. const int TestUnpackedTypes::kUnpackedSint32FieldNumber;
  28954. const int TestUnpackedTypes::kUnpackedSint64FieldNumber;
  28955. const int TestUnpackedTypes::kUnpackedFixed32FieldNumber;
  28956. const int TestUnpackedTypes::kUnpackedFixed64FieldNumber;
  28957. const int TestUnpackedTypes::kUnpackedSfixed32FieldNumber;
  28958. const int TestUnpackedTypes::kUnpackedSfixed64FieldNumber;
  28959. const int TestUnpackedTypes::kUnpackedFloatFieldNumber;
  28960. const int TestUnpackedTypes::kUnpackedDoubleFieldNumber;
  28961. const int TestUnpackedTypes::kUnpackedBoolFieldNumber;
  28962. const int TestUnpackedTypes::kUnpackedEnumFieldNumber;
  28963. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  28964. TestUnpackedTypes::TestUnpackedTypes()
  28965. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  28966. ::google::protobuf::internal::InitSCC(
  28967. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestUnpackedTypes.base);
  28968. SharedCtor();
  28969. // @@protoc_insertion_point(constructor:protobuf_unittest.TestUnpackedTypes)
  28970. }
  28971. TestUnpackedTypes::TestUnpackedTypes(::google::protobuf::Arena* arena)
  28972. : ::google::protobuf::Message(),
  28973. _internal_metadata_(arena),
  28974. unpacked_int32_(arena),
  28975. unpacked_int64_(arena),
  28976. unpacked_uint32_(arena),
  28977. unpacked_uint64_(arena),
  28978. unpacked_sint32_(arena),
  28979. unpacked_sint64_(arena),
  28980. unpacked_fixed32_(arena),
  28981. unpacked_fixed64_(arena),
  28982. unpacked_sfixed32_(arena),
  28983. unpacked_sfixed64_(arena),
  28984. unpacked_float_(arena),
  28985. unpacked_double_(arena),
  28986. unpacked_bool_(arena),
  28987. unpacked_enum_(arena) {
  28988. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestUnpackedTypes.base);
  28989. SharedCtor();
  28990. RegisterArenaDtor(arena);
  28991. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestUnpackedTypes)
  28992. }
  28993. TestUnpackedTypes::TestUnpackedTypes(const TestUnpackedTypes& from)
  28994. : ::google::protobuf::Message(),
  28995. _internal_metadata_(NULL),
  28996. _has_bits_(from._has_bits_),
  28997. unpacked_int32_(from.unpacked_int32_),
  28998. unpacked_int64_(from.unpacked_int64_),
  28999. unpacked_uint32_(from.unpacked_uint32_),
  29000. unpacked_uint64_(from.unpacked_uint64_),
  29001. unpacked_sint32_(from.unpacked_sint32_),
  29002. unpacked_sint64_(from.unpacked_sint64_),
  29003. unpacked_fixed32_(from.unpacked_fixed32_),
  29004. unpacked_fixed64_(from.unpacked_fixed64_),
  29005. unpacked_sfixed32_(from.unpacked_sfixed32_),
  29006. unpacked_sfixed64_(from.unpacked_sfixed64_),
  29007. unpacked_float_(from.unpacked_float_),
  29008. unpacked_double_(from.unpacked_double_),
  29009. unpacked_bool_(from.unpacked_bool_),
  29010. unpacked_enum_(from.unpacked_enum_) {
  29011. _internal_metadata_.MergeFrom(from._internal_metadata_);
  29012. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestUnpackedTypes)
  29013. }
  29014. void TestUnpackedTypes::SharedCtor() {
  29015. }
  29016. TestUnpackedTypes::~TestUnpackedTypes() {
  29017. // @@protoc_insertion_point(destructor:protobuf_unittest.TestUnpackedTypes)
  29018. SharedDtor();
  29019. }
  29020. void TestUnpackedTypes::SharedDtor() {
  29021. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  29022. }
  29023. void TestUnpackedTypes::ArenaDtor(void* object) {
  29024. TestUnpackedTypes* _this = reinterpret_cast< TestUnpackedTypes* >(object);
  29025. (void)_this;
  29026. }
  29027. void TestUnpackedTypes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  29028. }
  29029. void TestUnpackedTypes::SetCachedSize(int size) const {
  29030. _cached_size_.Set(size);
  29031. }
  29032. const ::google::protobuf::Descriptor* TestUnpackedTypes::descriptor() {
  29033. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  29034. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  29035. }
  29036. const TestUnpackedTypes& TestUnpackedTypes::default_instance() {
  29037. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestUnpackedTypes.base);
  29038. return *internal_default_instance();
  29039. }
  29040. void TestUnpackedTypes::Clear() {
  29041. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestUnpackedTypes)
  29042. ::google::protobuf::uint32 cached_has_bits = 0;
  29043. // Prevent compiler warnings about cached_has_bits being unused
  29044. (void) cached_has_bits;
  29045. unpacked_int32_.Clear();
  29046. unpacked_int64_.Clear();
  29047. unpacked_uint32_.Clear();
  29048. unpacked_uint64_.Clear();
  29049. unpacked_sint32_.Clear();
  29050. unpacked_sint64_.Clear();
  29051. unpacked_fixed32_.Clear();
  29052. unpacked_fixed64_.Clear();
  29053. unpacked_sfixed32_.Clear();
  29054. unpacked_sfixed64_.Clear();
  29055. unpacked_float_.Clear();
  29056. unpacked_double_.Clear();
  29057. unpacked_bool_.Clear();
  29058. unpacked_enum_.Clear();
  29059. _has_bits_.Clear();
  29060. _internal_metadata_.Clear();
  29061. }
  29062. bool TestUnpackedTypes::MergePartialFromCodedStream(
  29063. ::google::protobuf::io::CodedInputStream* input) {
  29064. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  29065. ::google::protobuf::uint32 tag;
  29066. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestUnpackedTypes)
  29067. for (;;) {
  29068. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  29069. tag = p.first;
  29070. if (!p.second) goto handle_unusual;
  29071. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  29072. // repeated int32 unpacked_int32 = 90 [packed = false];
  29073. case 90: {
  29074. if (static_cast< ::google::protobuf::uint8>(tag) ==
  29075. static_cast< ::google::protobuf::uint8>(208u /* 720 & 0xFF */)) {
  29076. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  29077. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  29078. 2, 720u, input, this->mutable_unpacked_int32())));
  29079. } else if (
  29080. static_cast< ::google::protobuf::uint8>(tag) ==
  29081. static_cast< ::google::protobuf::uint8>(210u /* 722 & 0xFF */)) {
  29082. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  29083. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  29084. input, this->mutable_unpacked_int32())));
  29085. } else {
  29086. goto handle_unusual;
  29087. }
  29088. break;
  29089. }
  29090. // repeated int64 unpacked_int64 = 91 [packed = false];
  29091. case 91: {
  29092. if (static_cast< ::google::protobuf::uint8>(tag) ==
  29093. static_cast< ::google::protobuf::uint8>(216u /* 728 & 0xFF */)) {
  29094. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  29095. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  29096. 2, 728u, input, this->mutable_unpacked_int64())));
  29097. } else if (
  29098. static_cast< ::google::protobuf::uint8>(tag) ==
  29099. static_cast< ::google::protobuf::uint8>(218u /* 730 & 0xFF */)) {
  29100. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  29101. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  29102. input, this->mutable_unpacked_int64())));
  29103. } else {
  29104. goto handle_unusual;
  29105. }
  29106. break;
  29107. }
  29108. // repeated uint32 unpacked_uint32 = 92 [packed = false];
  29109. case 92: {
  29110. if (static_cast< ::google::protobuf::uint8>(tag) ==
  29111. static_cast< ::google::protobuf::uint8>(224u /* 736 & 0xFF */)) {
  29112. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  29113. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  29114. 2, 736u, input, this->mutable_unpacked_uint32())));
  29115. } else if (
  29116. static_cast< ::google::protobuf::uint8>(tag) ==
  29117. static_cast< ::google::protobuf::uint8>(226u /* 738 & 0xFF */)) {
  29118. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  29119. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  29120. input, this->mutable_unpacked_uint32())));
  29121. } else {
  29122. goto handle_unusual;
  29123. }
  29124. break;
  29125. }
  29126. // repeated uint64 unpacked_uint64 = 93 [packed = false];
  29127. case 93: {
  29128. if (static_cast< ::google::protobuf::uint8>(tag) ==
  29129. static_cast< ::google::protobuf::uint8>(232u /* 744 & 0xFF */)) {
  29130. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  29131. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  29132. 2, 744u, input, this->mutable_unpacked_uint64())));
  29133. } else if (
  29134. static_cast< ::google::protobuf::uint8>(tag) ==
  29135. static_cast< ::google::protobuf::uint8>(234u /* 746 & 0xFF */)) {
  29136. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  29137. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  29138. input, this->mutable_unpacked_uint64())));
  29139. } else {
  29140. goto handle_unusual;
  29141. }
  29142. break;
  29143. }
  29144. // repeated sint32 unpacked_sint32 = 94 [packed = false];
  29145. case 94: {
  29146. if (static_cast< ::google::protobuf::uint8>(tag) ==
  29147. static_cast< ::google::protobuf::uint8>(240u /* 752 & 0xFF */)) {
  29148. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  29149. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  29150. 2, 752u, input, this->mutable_unpacked_sint32())));
  29151. } else if (
  29152. static_cast< ::google::protobuf::uint8>(tag) ==
  29153. static_cast< ::google::protobuf::uint8>(242u /* 754 & 0xFF */)) {
  29154. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  29155. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  29156. input, this->mutable_unpacked_sint32())));
  29157. } else {
  29158. goto handle_unusual;
  29159. }
  29160. break;
  29161. }
  29162. // repeated sint64 unpacked_sint64 = 95 [packed = false];
  29163. case 95: {
  29164. if (static_cast< ::google::protobuf::uint8>(tag) ==
  29165. static_cast< ::google::protobuf::uint8>(248u /* 760 & 0xFF */)) {
  29166. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  29167. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  29168. 2, 760u, input, this->mutable_unpacked_sint64())));
  29169. } else if (
  29170. static_cast< ::google::protobuf::uint8>(tag) ==
  29171. static_cast< ::google::protobuf::uint8>(250u /* 762 & 0xFF */)) {
  29172. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  29173. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
  29174. input, this->mutable_unpacked_sint64())));
  29175. } else {
  29176. goto handle_unusual;
  29177. }
  29178. break;
  29179. }
  29180. // repeated fixed32 unpacked_fixed32 = 96 [packed = false];
  29181. case 96: {
  29182. if (static_cast< ::google::protobuf::uint8>(tag) ==
  29183. static_cast< ::google::protobuf::uint8>(5u /* 773 & 0xFF */)) {
  29184. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  29185. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  29186. 2, 773u, input, this->mutable_unpacked_fixed32())));
  29187. } else if (
  29188. static_cast< ::google::protobuf::uint8>(tag) ==
  29189. static_cast< ::google::protobuf::uint8>(2u /* 770 & 0xFF */)) {
  29190. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  29191. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  29192. input, this->mutable_unpacked_fixed32())));
  29193. } else {
  29194. goto handle_unusual;
  29195. }
  29196. break;
  29197. }
  29198. // repeated fixed64 unpacked_fixed64 = 97 [packed = false];
  29199. case 97: {
  29200. if (static_cast< ::google::protobuf::uint8>(tag) ==
  29201. static_cast< ::google::protobuf::uint8>(9u /* 777 & 0xFF */)) {
  29202. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  29203. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  29204. 2, 777u, input, this->mutable_unpacked_fixed64())));
  29205. } else if (
  29206. static_cast< ::google::protobuf::uint8>(tag) ==
  29207. static_cast< ::google::protobuf::uint8>(10u /* 778 & 0xFF */)) {
  29208. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  29209. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  29210. input, this->mutable_unpacked_fixed64())));
  29211. } else {
  29212. goto handle_unusual;
  29213. }
  29214. break;
  29215. }
  29216. // repeated sfixed32 unpacked_sfixed32 = 98 [packed = false];
  29217. case 98: {
  29218. if (static_cast< ::google::protobuf::uint8>(tag) ==
  29219. static_cast< ::google::protobuf::uint8>(21u /* 789 & 0xFF */)) {
  29220. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  29221. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  29222. 2, 789u, input, this->mutable_unpacked_sfixed32())));
  29223. } else if (
  29224. static_cast< ::google::protobuf::uint8>(tag) ==
  29225. static_cast< ::google::protobuf::uint8>(18u /* 786 & 0xFF */)) {
  29226. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  29227. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
  29228. input, this->mutable_unpacked_sfixed32())));
  29229. } else {
  29230. goto handle_unusual;
  29231. }
  29232. break;
  29233. }
  29234. // repeated sfixed64 unpacked_sfixed64 = 99 [packed = false];
  29235. case 99: {
  29236. if (static_cast< ::google::protobuf::uint8>(tag) ==
  29237. static_cast< ::google::protobuf::uint8>(25u /* 793 & 0xFF */)) {
  29238. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  29239. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  29240. 2, 793u, input, this->mutable_unpacked_sfixed64())));
  29241. } else if (
  29242. static_cast< ::google::protobuf::uint8>(tag) ==
  29243. static_cast< ::google::protobuf::uint8>(26u /* 794 & 0xFF */)) {
  29244. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  29245. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
  29246. input, this->mutable_unpacked_sfixed64())));
  29247. } else {
  29248. goto handle_unusual;
  29249. }
  29250. break;
  29251. }
  29252. // repeated float unpacked_float = 100 [packed = false];
  29253. case 100: {
  29254. if (static_cast< ::google::protobuf::uint8>(tag) ==
  29255. static_cast< ::google::protobuf::uint8>(37u /* 805 & 0xFF */)) {
  29256. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  29257. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  29258. 2, 805u, input, this->mutable_unpacked_float())));
  29259. } else if (
  29260. static_cast< ::google::protobuf::uint8>(tag) ==
  29261. static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) {
  29262. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  29263. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  29264. input, this->mutable_unpacked_float())));
  29265. } else {
  29266. goto handle_unusual;
  29267. }
  29268. break;
  29269. }
  29270. // repeated double unpacked_double = 101 [packed = false];
  29271. case 101: {
  29272. if (static_cast< ::google::protobuf::uint8>(tag) ==
  29273. static_cast< ::google::protobuf::uint8>(41u /* 809 & 0xFF */)) {
  29274. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  29275. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  29276. 2, 809u, input, this->mutable_unpacked_double())));
  29277. } else if (
  29278. static_cast< ::google::protobuf::uint8>(tag) ==
  29279. static_cast< ::google::protobuf::uint8>(42u /* 810 & 0xFF */)) {
  29280. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  29281. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  29282. input, this->mutable_unpacked_double())));
  29283. } else {
  29284. goto handle_unusual;
  29285. }
  29286. break;
  29287. }
  29288. // repeated bool unpacked_bool = 102 [packed = false];
  29289. case 102: {
  29290. if (static_cast< ::google::protobuf::uint8>(tag) ==
  29291. static_cast< ::google::protobuf::uint8>(48u /* 816 & 0xFF */)) {
  29292. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  29293. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  29294. 2, 816u, input, this->mutable_unpacked_bool())));
  29295. } else if (
  29296. static_cast< ::google::protobuf::uint8>(tag) ==
  29297. static_cast< ::google::protobuf::uint8>(50u /* 818 & 0xFF */)) {
  29298. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  29299. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  29300. input, this->mutable_unpacked_bool())));
  29301. } else {
  29302. goto handle_unusual;
  29303. }
  29304. break;
  29305. }
  29306. // repeated .protobuf_unittest.ForeignEnum unpacked_enum = 103 [packed = false];
  29307. case 103: {
  29308. if (static_cast< ::google::protobuf::uint8>(tag) ==
  29309. static_cast< ::google::protobuf::uint8>(56u /* 824 & 0xFF */)) {
  29310. int value;
  29311. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  29312. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  29313. input, &value)));
  29314. if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
  29315. add_unpacked_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
  29316. } else {
  29317. mutable_unknown_fields()->AddVarint(
  29318. 103, static_cast< ::google::protobuf::uint64>(value));
  29319. }
  29320. } else if (
  29321. static_cast< ::google::protobuf::uint8>(tag) ==
  29322. static_cast< ::google::protobuf::uint8>(58u /* 826 & 0xFF */)) {
  29323. DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
  29324. input,
  29325. 103,
  29326. ::protobuf_unittest::ForeignEnum_IsValid,
  29327. mutable_unknown_fields(),
  29328. this->mutable_unpacked_enum())));
  29329. } else {
  29330. goto handle_unusual;
  29331. }
  29332. break;
  29333. }
  29334. default: {
  29335. handle_unusual:
  29336. if (tag == 0) {
  29337. goto success;
  29338. }
  29339. DO_(::google::protobuf::internal::WireFormat::SkipField(
  29340. input, tag, _internal_metadata_.mutable_unknown_fields()));
  29341. break;
  29342. }
  29343. }
  29344. }
  29345. success:
  29346. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestUnpackedTypes)
  29347. return true;
  29348. failure:
  29349. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestUnpackedTypes)
  29350. return false;
  29351. #undef DO_
  29352. }
  29353. void TestUnpackedTypes::SerializeWithCachedSizes(
  29354. ::google::protobuf::io::CodedOutputStream* output) const {
  29355. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestUnpackedTypes)
  29356. ::google::protobuf::uint32 cached_has_bits = 0;
  29357. (void) cached_has_bits;
  29358. // repeated int32 unpacked_int32 = 90 [packed = false];
  29359. for (int i = 0, n = this->unpacked_int32_size(); i < n; i++) {
  29360. ::google::protobuf::internal::WireFormatLite::WriteInt32(
  29361. 90, this->unpacked_int32(i), output);
  29362. }
  29363. // repeated int64 unpacked_int64 = 91 [packed = false];
  29364. for (int i = 0, n = this->unpacked_int64_size(); i < n; i++) {
  29365. ::google::protobuf::internal::WireFormatLite::WriteInt64(
  29366. 91, this->unpacked_int64(i), output);
  29367. }
  29368. // repeated uint32 unpacked_uint32 = 92 [packed = false];
  29369. for (int i = 0, n = this->unpacked_uint32_size(); i < n; i++) {
  29370. ::google::protobuf::internal::WireFormatLite::WriteUInt32(
  29371. 92, this->unpacked_uint32(i), output);
  29372. }
  29373. // repeated uint64 unpacked_uint64 = 93 [packed = false];
  29374. for (int i = 0, n = this->unpacked_uint64_size(); i < n; i++) {
  29375. ::google::protobuf::internal::WireFormatLite::WriteUInt64(
  29376. 93, this->unpacked_uint64(i), output);
  29377. }
  29378. // repeated sint32 unpacked_sint32 = 94 [packed = false];
  29379. for (int i = 0, n = this->unpacked_sint32_size(); i < n; i++) {
  29380. ::google::protobuf::internal::WireFormatLite::WriteSInt32(
  29381. 94, this->unpacked_sint32(i), output);
  29382. }
  29383. // repeated sint64 unpacked_sint64 = 95 [packed = false];
  29384. for (int i = 0, n = this->unpacked_sint64_size(); i < n; i++) {
  29385. ::google::protobuf::internal::WireFormatLite::WriteSInt64(
  29386. 95, this->unpacked_sint64(i), output);
  29387. }
  29388. // repeated fixed32 unpacked_fixed32 = 96 [packed = false];
  29389. for (int i = 0, n = this->unpacked_fixed32_size(); i < n; i++) {
  29390. ::google::protobuf::internal::WireFormatLite::WriteFixed32(
  29391. 96, this->unpacked_fixed32(i), output);
  29392. }
  29393. // repeated fixed64 unpacked_fixed64 = 97 [packed = false];
  29394. for (int i = 0, n = this->unpacked_fixed64_size(); i < n; i++) {
  29395. ::google::protobuf::internal::WireFormatLite::WriteFixed64(
  29396. 97, this->unpacked_fixed64(i), output);
  29397. }
  29398. // repeated sfixed32 unpacked_sfixed32 = 98 [packed = false];
  29399. for (int i = 0, n = this->unpacked_sfixed32_size(); i < n; i++) {
  29400. ::google::protobuf::internal::WireFormatLite::WriteSFixed32(
  29401. 98, this->unpacked_sfixed32(i), output);
  29402. }
  29403. // repeated sfixed64 unpacked_sfixed64 = 99 [packed = false];
  29404. for (int i = 0, n = this->unpacked_sfixed64_size(); i < n; i++) {
  29405. ::google::protobuf::internal::WireFormatLite::WriteSFixed64(
  29406. 99, this->unpacked_sfixed64(i), output);
  29407. }
  29408. // repeated float unpacked_float = 100 [packed = false];
  29409. for (int i = 0, n = this->unpacked_float_size(); i < n; i++) {
  29410. ::google::protobuf::internal::WireFormatLite::WriteFloat(
  29411. 100, this->unpacked_float(i), output);
  29412. }
  29413. // repeated double unpacked_double = 101 [packed = false];
  29414. for (int i = 0, n = this->unpacked_double_size(); i < n; i++) {
  29415. ::google::protobuf::internal::WireFormatLite::WriteDouble(
  29416. 101, this->unpacked_double(i), output);
  29417. }
  29418. // repeated bool unpacked_bool = 102 [packed = false];
  29419. for (int i = 0, n = this->unpacked_bool_size(); i < n; i++) {
  29420. ::google::protobuf::internal::WireFormatLite::WriteBool(
  29421. 102, this->unpacked_bool(i), output);
  29422. }
  29423. // repeated .protobuf_unittest.ForeignEnum unpacked_enum = 103 [packed = false];
  29424. for (int i = 0, n = this->unpacked_enum_size(); i < n; i++) {
  29425. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  29426. 103, this->unpacked_enum(i), output);
  29427. }
  29428. if (_internal_metadata_.have_unknown_fields()) {
  29429. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  29430. _internal_metadata_.unknown_fields(), output);
  29431. }
  29432. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestUnpackedTypes)
  29433. }
  29434. ::google::protobuf::uint8* TestUnpackedTypes::InternalSerializeWithCachedSizesToArray(
  29435. bool deterministic, ::google::protobuf::uint8* target) const {
  29436. (void)deterministic; // Unused
  29437. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestUnpackedTypes)
  29438. ::google::protobuf::uint32 cached_has_bits = 0;
  29439. (void) cached_has_bits;
  29440. // repeated int32 unpacked_int32 = 90 [packed = false];
  29441. target = ::google::protobuf::internal::WireFormatLite::
  29442. WriteInt32ToArray(90, this->unpacked_int32_, target);
  29443. // repeated int64 unpacked_int64 = 91 [packed = false];
  29444. target = ::google::protobuf::internal::WireFormatLite::
  29445. WriteInt64ToArray(91, this->unpacked_int64_, target);
  29446. // repeated uint32 unpacked_uint32 = 92 [packed = false];
  29447. target = ::google::protobuf::internal::WireFormatLite::
  29448. WriteUInt32ToArray(92, this->unpacked_uint32_, target);
  29449. // repeated uint64 unpacked_uint64 = 93 [packed = false];
  29450. target = ::google::protobuf::internal::WireFormatLite::
  29451. WriteUInt64ToArray(93, this->unpacked_uint64_, target);
  29452. // repeated sint32 unpacked_sint32 = 94 [packed = false];
  29453. target = ::google::protobuf::internal::WireFormatLite::
  29454. WriteSInt32ToArray(94, this->unpacked_sint32_, target);
  29455. // repeated sint64 unpacked_sint64 = 95 [packed = false];
  29456. target = ::google::protobuf::internal::WireFormatLite::
  29457. WriteSInt64ToArray(95, this->unpacked_sint64_, target);
  29458. // repeated fixed32 unpacked_fixed32 = 96 [packed = false];
  29459. target = ::google::protobuf::internal::WireFormatLite::
  29460. WriteFixed32ToArray(96, this->unpacked_fixed32_, target);
  29461. // repeated fixed64 unpacked_fixed64 = 97 [packed = false];
  29462. target = ::google::protobuf::internal::WireFormatLite::
  29463. WriteFixed64ToArray(97, this->unpacked_fixed64_, target);
  29464. // repeated sfixed32 unpacked_sfixed32 = 98 [packed = false];
  29465. target = ::google::protobuf::internal::WireFormatLite::
  29466. WriteSFixed32ToArray(98, this->unpacked_sfixed32_, target);
  29467. // repeated sfixed64 unpacked_sfixed64 = 99 [packed = false];
  29468. target = ::google::protobuf::internal::WireFormatLite::
  29469. WriteSFixed64ToArray(99, this->unpacked_sfixed64_, target);
  29470. // repeated float unpacked_float = 100 [packed = false];
  29471. target = ::google::protobuf::internal::WireFormatLite::
  29472. WriteFloatToArray(100, this->unpacked_float_, target);
  29473. // repeated double unpacked_double = 101 [packed = false];
  29474. target = ::google::protobuf::internal::WireFormatLite::
  29475. WriteDoubleToArray(101, this->unpacked_double_, target);
  29476. // repeated bool unpacked_bool = 102 [packed = false];
  29477. target = ::google::protobuf::internal::WireFormatLite::
  29478. WriteBoolToArray(102, this->unpacked_bool_, target);
  29479. // repeated .protobuf_unittest.ForeignEnum unpacked_enum = 103 [packed = false];
  29480. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  29481. 103, this->unpacked_enum_, target);
  29482. if (_internal_metadata_.have_unknown_fields()) {
  29483. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  29484. _internal_metadata_.unknown_fields(), target);
  29485. }
  29486. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestUnpackedTypes)
  29487. return target;
  29488. }
  29489. size_t TestUnpackedTypes::ByteSizeLong() const {
  29490. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestUnpackedTypes)
  29491. size_t total_size = 0;
  29492. if (_internal_metadata_.have_unknown_fields()) {
  29493. total_size +=
  29494. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  29495. _internal_metadata_.unknown_fields());
  29496. }
  29497. // repeated int32 unpacked_int32 = 90 [packed = false];
  29498. {
  29499. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  29500. Int32Size(this->unpacked_int32_);
  29501. total_size += 2 *
  29502. ::google::protobuf::internal::FromIntSize(this->unpacked_int32_size());
  29503. total_size += data_size;
  29504. }
  29505. // repeated int64 unpacked_int64 = 91 [packed = false];
  29506. {
  29507. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  29508. Int64Size(this->unpacked_int64_);
  29509. total_size += 2 *
  29510. ::google::protobuf::internal::FromIntSize(this->unpacked_int64_size());
  29511. total_size += data_size;
  29512. }
  29513. // repeated uint32 unpacked_uint32 = 92 [packed = false];
  29514. {
  29515. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  29516. UInt32Size(this->unpacked_uint32_);
  29517. total_size += 2 *
  29518. ::google::protobuf::internal::FromIntSize(this->unpacked_uint32_size());
  29519. total_size += data_size;
  29520. }
  29521. // repeated uint64 unpacked_uint64 = 93 [packed = false];
  29522. {
  29523. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  29524. UInt64Size(this->unpacked_uint64_);
  29525. total_size += 2 *
  29526. ::google::protobuf::internal::FromIntSize(this->unpacked_uint64_size());
  29527. total_size += data_size;
  29528. }
  29529. // repeated sint32 unpacked_sint32 = 94 [packed = false];
  29530. {
  29531. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  29532. SInt32Size(this->unpacked_sint32_);
  29533. total_size += 2 *
  29534. ::google::protobuf::internal::FromIntSize(this->unpacked_sint32_size());
  29535. total_size += data_size;
  29536. }
  29537. // repeated sint64 unpacked_sint64 = 95 [packed = false];
  29538. {
  29539. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  29540. SInt64Size(this->unpacked_sint64_);
  29541. total_size += 2 *
  29542. ::google::protobuf::internal::FromIntSize(this->unpacked_sint64_size());
  29543. total_size += data_size;
  29544. }
  29545. // repeated fixed32 unpacked_fixed32 = 96 [packed = false];
  29546. {
  29547. unsigned int count = static_cast<unsigned int>(this->unpacked_fixed32_size());
  29548. size_t data_size = 4UL * count;
  29549. total_size += 2 *
  29550. ::google::protobuf::internal::FromIntSize(this->unpacked_fixed32_size());
  29551. total_size += data_size;
  29552. }
  29553. // repeated fixed64 unpacked_fixed64 = 97 [packed = false];
  29554. {
  29555. unsigned int count = static_cast<unsigned int>(this->unpacked_fixed64_size());
  29556. size_t data_size = 8UL * count;
  29557. total_size += 2 *
  29558. ::google::protobuf::internal::FromIntSize(this->unpacked_fixed64_size());
  29559. total_size += data_size;
  29560. }
  29561. // repeated sfixed32 unpacked_sfixed32 = 98 [packed = false];
  29562. {
  29563. unsigned int count = static_cast<unsigned int>(this->unpacked_sfixed32_size());
  29564. size_t data_size = 4UL * count;
  29565. total_size += 2 *
  29566. ::google::protobuf::internal::FromIntSize(this->unpacked_sfixed32_size());
  29567. total_size += data_size;
  29568. }
  29569. // repeated sfixed64 unpacked_sfixed64 = 99 [packed = false];
  29570. {
  29571. unsigned int count = static_cast<unsigned int>(this->unpacked_sfixed64_size());
  29572. size_t data_size = 8UL * count;
  29573. total_size += 2 *
  29574. ::google::protobuf::internal::FromIntSize(this->unpacked_sfixed64_size());
  29575. total_size += data_size;
  29576. }
  29577. // repeated float unpacked_float = 100 [packed = false];
  29578. {
  29579. unsigned int count = static_cast<unsigned int>(this->unpacked_float_size());
  29580. size_t data_size = 4UL * count;
  29581. total_size += 2 *
  29582. ::google::protobuf::internal::FromIntSize(this->unpacked_float_size());
  29583. total_size += data_size;
  29584. }
  29585. // repeated double unpacked_double = 101 [packed = false];
  29586. {
  29587. unsigned int count = static_cast<unsigned int>(this->unpacked_double_size());
  29588. size_t data_size = 8UL * count;
  29589. total_size += 2 *
  29590. ::google::protobuf::internal::FromIntSize(this->unpacked_double_size());
  29591. total_size += data_size;
  29592. }
  29593. // repeated bool unpacked_bool = 102 [packed = false];
  29594. {
  29595. unsigned int count = static_cast<unsigned int>(this->unpacked_bool_size());
  29596. size_t data_size = 1UL * count;
  29597. total_size += 2 *
  29598. ::google::protobuf::internal::FromIntSize(this->unpacked_bool_size());
  29599. total_size += data_size;
  29600. }
  29601. // repeated .protobuf_unittest.ForeignEnum unpacked_enum = 103 [packed = false];
  29602. {
  29603. size_t data_size = 0;
  29604. unsigned int count = static_cast<unsigned int>(this->unpacked_enum_size());for (unsigned int i = 0; i < count; i++) {
  29605. data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
  29606. this->unpacked_enum(static_cast<int>(i)));
  29607. }
  29608. total_size += (2UL * count) + data_size;
  29609. }
  29610. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  29611. SetCachedSize(cached_size);
  29612. return total_size;
  29613. }
  29614. void TestUnpackedTypes::MergeFrom(const ::google::protobuf::Message& from) {
  29615. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestUnpackedTypes)
  29616. GOOGLE_DCHECK_NE(&from, this);
  29617. const TestUnpackedTypes* source =
  29618. ::google::protobuf::internal::DynamicCastToGenerated<const TestUnpackedTypes>(
  29619. &from);
  29620. if (source == NULL) {
  29621. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestUnpackedTypes)
  29622. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  29623. } else {
  29624. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestUnpackedTypes)
  29625. MergeFrom(*source);
  29626. }
  29627. }
  29628. void TestUnpackedTypes::MergeFrom(const TestUnpackedTypes& from) {
  29629. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestUnpackedTypes)
  29630. GOOGLE_DCHECK_NE(&from, this);
  29631. _internal_metadata_.MergeFrom(from._internal_metadata_);
  29632. ::google::protobuf::uint32 cached_has_bits = 0;
  29633. (void) cached_has_bits;
  29634. unpacked_int32_.MergeFrom(from.unpacked_int32_);
  29635. unpacked_int64_.MergeFrom(from.unpacked_int64_);
  29636. unpacked_uint32_.MergeFrom(from.unpacked_uint32_);
  29637. unpacked_uint64_.MergeFrom(from.unpacked_uint64_);
  29638. unpacked_sint32_.MergeFrom(from.unpacked_sint32_);
  29639. unpacked_sint64_.MergeFrom(from.unpacked_sint64_);
  29640. unpacked_fixed32_.MergeFrom(from.unpacked_fixed32_);
  29641. unpacked_fixed64_.MergeFrom(from.unpacked_fixed64_);
  29642. unpacked_sfixed32_.MergeFrom(from.unpacked_sfixed32_);
  29643. unpacked_sfixed64_.MergeFrom(from.unpacked_sfixed64_);
  29644. unpacked_float_.MergeFrom(from.unpacked_float_);
  29645. unpacked_double_.MergeFrom(from.unpacked_double_);
  29646. unpacked_bool_.MergeFrom(from.unpacked_bool_);
  29647. unpacked_enum_.MergeFrom(from.unpacked_enum_);
  29648. }
  29649. void TestUnpackedTypes::CopyFrom(const ::google::protobuf::Message& from) {
  29650. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestUnpackedTypes)
  29651. if (&from == this) return;
  29652. Clear();
  29653. MergeFrom(from);
  29654. }
  29655. void TestUnpackedTypes::CopyFrom(const TestUnpackedTypes& from) {
  29656. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestUnpackedTypes)
  29657. if (&from == this) return;
  29658. Clear();
  29659. MergeFrom(from);
  29660. }
  29661. bool TestUnpackedTypes::IsInitialized() const {
  29662. return true;
  29663. }
  29664. void TestUnpackedTypes::Swap(TestUnpackedTypes* other) {
  29665. if (other == this) return;
  29666. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  29667. InternalSwap(other);
  29668. } else {
  29669. TestUnpackedTypes* temp = New(GetArenaNoVirtual());
  29670. temp->MergeFrom(*other);
  29671. other->CopyFrom(*this);
  29672. InternalSwap(temp);
  29673. if (GetArenaNoVirtual() == NULL) {
  29674. delete temp;
  29675. }
  29676. }
  29677. }
  29678. void TestUnpackedTypes::UnsafeArenaSwap(TestUnpackedTypes* other) {
  29679. if (other == this) return;
  29680. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  29681. InternalSwap(other);
  29682. }
  29683. void TestUnpackedTypes::InternalSwap(TestUnpackedTypes* other) {
  29684. using std::swap;
  29685. unpacked_int32_.InternalSwap(&other->unpacked_int32_);
  29686. unpacked_int64_.InternalSwap(&other->unpacked_int64_);
  29687. unpacked_uint32_.InternalSwap(&other->unpacked_uint32_);
  29688. unpacked_uint64_.InternalSwap(&other->unpacked_uint64_);
  29689. unpacked_sint32_.InternalSwap(&other->unpacked_sint32_);
  29690. unpacked_sint64_.InternalSwap(&other->unpacked_sint64_);
  29691. unpacked_fixed32_.InternalSwap(&other->unpacked_fixed32_);
  29692. unpacked_fixed64_.InternalSwap(&other->unpacked_fixed64_);
  29693. unpacked_sfixed32_.InternalSwap(&other->unpacked_sfixed32_);
  29694. unpacked_sfixed64_.InternalSwap(&other->unpacked_sfixed64_);
  29695. unpacked_float_.InternalSwap(&other->unpacked_float_);
  29696. unpacked_double_.InternalSwap(&other->unpacked_double_);
  29697. unpacked_bool_.InternalSwap(&other->unpacked_bool_);
  29698. unpacked_enum_.InternalSwap(&other->unpacked_enum_);
  29699. swap(_has_bits_[0], other->_has_bits_[0]);
  29700. _internal_metadata_.Swap(&other->_internal_metadata_);
  29701. }
  29702. ::google::protobuf::Metadata TestUnpackedTypes::GetMetadata() const {
  29703. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  29704. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  29705. }
  29706. // ===================================================================
  29707. void TestPackedExtensions::InitAsDefaultInstance() {
  29708. }
  29709. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  29710. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  29711. TestPackedExtensions::TestPackedExtensions()
  29712. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  29713. ::google::protobuf::internal::InitSCC(
  29714. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestPackedExtensions.base);
  29715. SharedCtor();
  29716. // @@protoc_insertion_point(constructor:protobuf_unittest.TestPackedExtensions)
  29717. }
  29718. TestPackedExtensions::TestPackedExtensions(::google::protobuf::Arena* arena)
  29719. : ::google::protobuf::Message(),
  29720. _extensions_(arena),
  29721. _internal_metadata_(arena) {
  29722. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestPackedExtensions.base);
  29723. SharedCtor();
  29724. RegisterArenaDtor(arena);
  29725. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestPackedExtensions)
  29726. }
  29727. TestPackedExtensions::TestPackedExtensions(const TestPackedExtensions& from)
  29728. : ::google::protobuf::Message(),
  29729. _internal_metadata_(NULL),
  29730. _has_bits_(from._has_bits_) {
  29731. _internal_metadata_.MergeFrom(from._internal_metadata_);
  29732. _extensions_.MergeFrom(from._extensions_);
  29733. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestPackedExtensions)
  29734. }
  29735. void TestPackedExtensions::SharedCtor() {
  29736. }
  29737. TestPackedExtensions::~TestPackedExtensions() {
  29738. // @@protoc_insertion_point(destructor:protobuf_unittest.TestPackedExtensions)
  29739. SharedDtor();
  29740. }
  29741. void TestPackedExtensions::SharedDtor() {
  29742. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  29743. }
  29744. void TestPackedExtensions::ArenaDtor(void* object) {
  29745. TestPackedExtensions* _this = reinterpret_cast< TestPackedExtensions* >(object);
  29746. (void)_this;
  29747. }
  29748. void TestPackedExtensions::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  29749. }
  29750. void TestPackedExtensions::SetCachedSize(int size) const {
  29751. _cached_size_.Set(size);
  29752. }
  29753. const ::google::protobuf::Descriptor* TestPackedExtensions::descriptor() {
  29754. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  29755. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  29756. }
  29757. const TestPackedExtensions& TestPackedExtensions::default_instance() {
  29758. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestPackedExtensions.base);
  29759. return *internal_default_instance();
  29760. }
  29761. void TestPackedExtensions::Clear() {
  29762. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestPackedExtensions)
  29763. ::google::protobuf::uint32 cached_has_bits = 0;
  29764. // Prevent compiler warnings about cached_has_bits being unused
  29765. (void) cached_has_bits;
  29766. _extensions_.Clear();
  29767. _has_bits_.Clear();
  29768. _internal_metadata_.Clear();
  29769. }
  29770. bool TestPackedExtensions::MergePartialFromCodedStream(
  29771. ::google::protobuf::io::CodedInputStream* input) {
  29772. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  29773. ::google::protobuf::uint32 tag;
  29774. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestPackedExtensions)
  29775. for (;;) {
  29776. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  29777. tag = p.first;
  29778. if (!p.second) goto handle_unusual;
  29779. handle_unusual:
  29780. if (tag == 0) {
  29781. goto success;
  29782. }
  29783. if ((8u <= tag)) {
  29784. DO_(_extensions_.ParseField(tag, input,
  29785. internal_default_instance(),
  29786. _internal_metadata_.mutable_unknown_fields()));
  29787. continue;
  29788. }
  29789. DO_(::google::protobuf::internal::WireFormat::SkipField(
  29790. input, tag, _internal_metadata_.mutable_unknown_fields()));
  29791. }
  29792. success:
  29793. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestPackedExtensions)
  29794. return true;
  29795. failure:
  29796. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestPackedExtensions)
  29797. return false;
  29798. #undef DO_
  29799. }
  29800. void TestPackedExtensions::SerializeWithCachedSizes(
  29801. ::google::protobuf::io::CodedOutputStream* output) const {
  29802. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestPackedExtensions)
  29803. ::google::protobuf::uint32 cached_has_bits = 0;
  29804. (void) cached_has_bits;
  29805. // Extension range [1, 536870912)
  29806. _extensions_.SerializeWithCachedSizes(
  29807. 1, 536870912, output);
  29808. if (_internal_metadata_.have_unknown_fields()) {
  29809. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  29810. _internal_metadata_.unknown_fields(), output);
  29811. }
  29812. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestPackedExtensions)
  29813. }
  29814. ::google::protobuf::uint8* TestPackedExtensions::InternalSerializeWithCachedSizesToArray(
  29815. bool deterministic, ::google::protobuf::uint8* target) const {
  29816. (void)deterministic; // Unused
  29817. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestPackedExtensions)
  29818. ::google::protobuf::uint32 cached_has_bits = 0;
  29819. (void) cached_has_bits;
  29820. // Extension range [1, 536870912)
  29821. target = _extensions_.InternalSerializeWithCachedSizesToArray(
  29822. 1, 536870912, deterministic, target);
  29823. if (_internal_metadata_.have_unknown_fields()) {
  29824. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  29825. _internal_metadata_.unknown_fields(), target);
  29826. }
  29827. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestPackedExtensions)
  29828. return target;
  29829. }
  29830. size_t TestPackedExtensions::ByteSizeLong() const {
  29831. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestPackedExtensions)
  29832. size_t total_size = 0;
  29833. total_size += _extensions_.ByteSize();
  29834. if (_internal_metadata_.have_unknown_fields()) {
  29835. total_size +=
  29836. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  29837. _internal_metadata_.unknown_fields());
  29838. }
  29839. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  29840. SetCachedSize(cached_size);
  29841. return total_size;
  29842. }
  29843. void TestPackedExtensions::MergeFrom(const ::google::protobuf::Message& from) {
  29844. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestPackedExtensions)
  29845. GOOGLE_DCHECK_NE(&from, this);
  29846. const TestPackedExtensions* source =
  29847. ::google::protobuf::internal::DynamicCastToGenerated<const TestPackedExtensions>(
  29848. &from);
  29849. if (source == NULL) {
  29850. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestPackedExtensions)
  29851. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  29852. } else {
  29853. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestPackedExtensions)
  29854. MergeFrom(*source);
  29855. }
  29856. }
  29857. void TestPackedExtensions::MergeFrom(const TestPackedExtensions& from) {
  29858. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestPackedExtensions)
  29859. GOOGLE_DCHECK_NE(&from, this);
  29860. _extensions_.MergeFrom(from._extensions_);
  29861. _internal_metadata_.MergeFrom(from._internal_metadata_);
  29862. ::google::protobuf::uint32 cached_has_bits = 0;
  29863. (void) cached_has_bits;
  29864. }
  29865. void TestPackedExtensions::CopyFrom(const ::google::protobuf::Message& from) {
  29866. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestPackedExtensions)
  29867. if (&from == this) return;
  29868. Clear();
  29869. MergeFrom(from);
  29870. }
  29871. void TestPackedExtensions::CopyFrom(const TestPackedExtensions& from) {
  29872. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestPackedExtensions)
  29873. if (&from == this) return;
  29874. Clear();
  29875. MergeFrom(from);
  29876. }
  29877. bool TestPackedExtensions::IsInitialized() const {
  29878. if (!_extensions_.IsInitialized()) {
  29879. return false;
  29880. }
  29881. return true;
  29882. }
  29883. void TestPackedExtensions::Swap(TestPackedExtensions* other) {
  29884. if (other == this) return;
  29885. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  29886. InternalSwap(other);
  29887. } else {
  29888. TestPackedExtensions* temp = New(GetArenaNoVirtual());
  29889. temp->MergeFrom(*other);
  29890. other->CopyFrom(*this);
  29891. InternalSwap(temp);
  29892. if (GetArenaNoVirtual() == NULL) {
  29893. delete temp;
  29894. }
  29895. }
  29896. }
  29897. void TestPackedExtensions::UnsafeArenaSwap(TestPackedExtensions* other) {
  29898. if (other == this) return;
  29899. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  29900. InternalSwap(other);
  29901. }
  29902. void TestPackedExtensions::InternalSwap(TestPackedExtensions* other) {
  29903. using std::swap;
  29904. swap(_has_bits_[0], other->_has_bits_[0]);
  29905. _internal_metadata_.Swap(&other->_internal_metadata_);
  29906. _extensions_.Swap(&other->_extensions_);
  29907. }
  29908. ::google::protobuf::Metadata TestPackedExtensions::GetMetadata() const {
  29909. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  29910. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  29911. }
  29912. // ===================================================================
  29913. void TestUnpackedExtensions::InitAsDefaultInstance() {
  29914. }
  29915. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  29916. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  29917. TestUnpackedExtensions::TestUnpackedExtensions()
  29918. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  29919. ::google::protobuf::internal::InitSCC(
  29920. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestUnpackedExtensions.base);
  29921. SharedCtor();
  29922. // @@protoc_insertion_point(constructor:protobuf_unittest.TestUnpackedExtensions)
  29923. }
  29924. TestUnpackedExtensions::TestUnpackedExtensions(::google::protobuf::Arena* arena)
  29925. : ::google::protobuf::Message(),
  29926. _extensions_(arena),
  29927. _internal_metadata_(arena) {
  29928. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestUnpackedExtensions.base);
  29929. SharedCtor();
  29930. RegisterArenaDtor(arena);
  29931. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestUnpackedExtensions)
  29932. }
  29933. TestUnpackedExtensions::TestUnpackedExtensions(const TestUnpackedExtensions& from)
  29934. : ::google::protobuf::Message(),
  29935. _internal_metadata_(NULL),
  29936. _has_bits_(from._has_bits_) {
  29937. _internal_metadata_.MergeFrom(from._internal_metadata_);
  29938. _extensions_.MergeFrom(from._extensions_);
  29939. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestUnpackedExtensions)
  29940. }
  29941. void TestUnpackedExtensions::SharedCtor() {
  29942. }
  29943. TestUnpackedExtensions::~TestUnpackedExtensions() {
  29944. // @@protoc_insertion_point(destructor:protobuf_unittest.TestUnpackedExtensions)
  29945. SharedDtor();
  29946. }
  29947. void TestUnpackedExtensions::SharedDtor() {
  29948. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  29949. }
  29950. void TestUnpackedExtensions::ArenaDtor(void* object) {
  29951. TestUnpackedExtensions* _this = reinterpret_cast< TestUnpackedExtensions* >(object);
  29952. (void)_this;
  29953. }
  29954. void TestUnpackedExtensions::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  29955. }
  29956. void TestUnpackedExtensions::SetCachedSize(int size) const {
  29957. _cached_size_.Set(size);
  29958. }
  29959. const ::google::protobuf::Descriptor* TestUnpackedExtensions::descriptor() {
  29960. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  29961. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  29962. }
  29963. const TestUnpackedExtensions& TestUnpackedExtensions::default_instance() {
  29964. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestUnpackedExtensions.base);
  29965. return *internal_default_instance();
  29966. }
  29967. void TestUnpackedExtensions::Clear() {
  29968. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestUnpackedExtensions)
  29969. ::google::protobuf::uint32 cached_has_bits = 0;
  29970. // Prevent compiler warnings about cached_has_bits being unused
  29971. (void) cached_has_bits;
  29972. _extensions_.Clear();
  29973. _has_bits_.Clear();
  29974. _internal_metadata_.Clear();
  29975. }
  29976. bool TestUnpackedExtensions::MergePartialFromCodedStream(
  29977. ::google::protobuf::io::CodedInputStream* input) {
  29978. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  29979. ::google::protobuf::uint32 tag;
  29980. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestUnpackedExtensions)
  29981. for (;;) {
  29982. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  29983. tag = p.first;
  29984. if (!p.second) goto handle_unusual;
  29985. handle_unusual:
  29986. if (tag == 0) {
  29987. goto success;
  29988. }
  29989. if ((8u <= tag)) {
  29990. DO_(_extensions_.ParseField(tag, input,
  29991. internal_default_instance(),
  29992. _internal_metadata_.mutable_unknown_fields()));
  29993. continue;
  29994. }
  29995. DO_(::google::protobuf::internal::WireFormat::SkipField(
  29996. input, tag, _internal_metadata_.mutable_unknown_fields()));
  29997. }
  29998. success:
  29999. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestUnpackedExtensions)
  30000. return true;
  30001. failure:
  30002. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestUnpackedExtensions)
  30003. return false;
  30004. #undef DO_
  30005. }
  30006. void TestUnpackedExtensions::SerializeWithCachedSizes(
  30007. ::google::protobuf::io::CodedOutputStream* output) const {
  30008. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestUnpackedExtensions)
  30009. ::google::protobuf::uint32 cached_has_bits = 0;
  30010. (void) cached_has_bits;
  30011. // Extension range [1, 536870912)
  30012. _extensions_.SerializeWithCachedSizes(
  30013. 1, 536870912, output);
  30014. if (_internal_metadata_.have_unknown_fields()) {
  30015. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  30016. _internal_metadata_.unknown_fields(), output);
  30017. }
  30018. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestUnpackedExtensions)
  30019. }
  30020. ::google::protobuf::uint8* TestUnpackedExtensions::InternalSerializeWithCachedSizesToArray(
  30021. bool deterministic, ::google::protobuf::uint8* target) const {
  30022. (void)deterministic; // Unused
  30023. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestUnpackedExtensions)
  30024. ::google::protobuf::uint32 cached_has_bits = 0;
  30025. (void) cached_has_bits;
  30026. // Extension range [1, 536870912)
  30027. target = _extensions_.InternalSerializeWithCachedSizesToArray(
  30028. 1, 536870912, deterministic, target);
  30029. if (_internal_metadata_.have_unknown_fields()) {
  30030. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  30031. _internal_metadata_.unknown_fields(), target);
  30032. }
  30033. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestUnpackedExtensions)
  30034. return target;
  30035. }
  30036. size_t TestUnpackedExtensions::ByteSizeLong() const {
  30037. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestUnpackedExtensions)
  30038. size_t total_size = 0;
  30039. total_size += _extensions_.ByteSize();
  30040. if (_internal_metadata_.have_unknown_fields()) {
  30041. total_size +=
  30042. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  30043. _internal_metadata_.unknown_fields());
  30044. }
  30045. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  30046. SetCachedSize(cached_size);
  30047. return total_size;
  30048. }
  30049. void TestUnpackedExtensions::MergeFrom(const ::google::protobuf::Message& from) {
  30050. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestUnpackedExtensions)
  30051. GOOGLE_DCHECK_NE(&from, this);
  30052. const TestUnpackedExtensions* source =
  30053. ::google::protobuf::internal::DynamicCastToGenerated<const TestUnpackedExtensions>(
  30054. &from);
  30055. if (source == NULL) {
  30056. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestUnpackedExtensions)
  30057. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  30058. } else {
  30059. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestUnpackedExtensions)
  30060. MergeFrom(*source);
  30061. }
  30062. }
  30063. void TestUnpackedExtensions::MergeFrom(const TestUnpackedExtensions& from) {
  30064. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestUnpackedExtensions)
  30065. GOOGLE_DCHECK_NE(&from, this);
  30066. _extensions_.MergeFrom(from._extensions_);
  30067. _internal_metadata_.MergeFrom(from._internal_metadata_);
  30068. ::google::protobuf::uint32 cached_has_bits = 0;
  30069. (void) cached_has_bits;
  30070. }
  30071. void TestUnpackedExtensions::CopyFrom(const ::google::protobuf::Message& from) {
  30072. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestUnpackedExtensions)
  30073. if (&from == this) return;
  30074. Clear();
  30075. MergeFrom(from);
  30076. }
  30077. void TestUnpackedExtensions::CopyFrom(const TestUnpackedExtensions& from) {
  30078. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestUnpackedExtensions)
  30079. if (&from == this) return;
  30080. Clear();
  30081. MergeFrom(from);
  30082. }
  30083. bool TestUnpackedExtensions::IsInitialized() const {
  30084. if (!_extensions_.IsInitialized()) {
  30085. return false;
  30086. }
  30087. return true;
  30088. }
  30089. void TestUnpackedExtensions::Swap(TestUnpackedExtensions* other) {
  30090. if (other == this) return;
  30091. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  30092. InternalSwap(other);
  30093. } else {
  30094. TestUnpackedExtensions* temp = New(GetArenaNoVirtual());
  30095. temp->MergeFrom(*other);
  30096. other->CopyFrom(*this);
  30097. InternalSwap(temp);
  30098. if (GetArenaNoVirtual() == NULL) {
  30099. delete temp;
  30100. }
  30101. }
  30102. }
  30103. void TestUnpackedExtensions::UnsafeArenaSwap(TestUnpackedExtensions* other) {
  30104. if (other == this) return;
  30105. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  30106. InternalSwap(other);
  30107. }
  30108. void TestUnpackedExtensions::InternalSwap(TestUnpackedExtensions* other) {
  30109. using std::swap;
  30110. swap(_has_bits_[0], other->_has_bits_[0]);
  30111. _internal_metadata_.Swap(&other->_internal_metadata_);
  30112. _extensions_.Swap(&other->_extensions_);
  30113. }
  30114. ::google::protobuf::Metadata TestUnpackedExtensions::GetMetadata() const {
  30115. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  30116. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  30117. }
  30118. // ===================================================================
  30119. void TestDynamicExtensions_DynamicMessageType::InitAsDefaultInstance() {
  30120. }
  30121. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  30122. const int TestDynamicExtensions_DynamicMessageType::kDynamicFieldFieldNumber;
  30123. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  30124. TestDynamicExtensions_DynamicMessageType::TestDynamicExtensions_DynamicMessageType()
  30125. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  30126. ::google::protobuf::internal::InitSCC(
  30127. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDynamicExtensions_DynamicMessageType.base);
  30128. SharedCtor();
  30129. // @@protoc_insertion_point(constructor:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30130. }
  30131. TestDynamicExtensions_DynamicMessageType::TestDynamicExtensions_DynamicMessageType(::google::protobuf::Arena* arena)
  30132. : ::google::protobuf::Message(),
  30133. _internal_metadata_(arena) {
  30134. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDynamicExtensions_DynamicMessageType.base);
  30135. SharedCtor();
  30136. RegisterArenaDtor(arena);
  30137. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30138. }
  30139. TestDynamicExtensions_DynamicMessageType::TestDynamicExtensions_DynamicMessageType(const TestDynamicExtensions_DynamicMessageType& from)
  30140. : ::google::protobuf::Message(),
  30141. _internal_metadata_(NULL),
  30142. _has_bits_(from._has_bits_) {
  30143. _internal_metadata_.MergeFrom(from._internal_metadata_);
  30144. dynamic_field_ = from.dynamic_field_;
  30145. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30146. }
  30147. void TestDynamicExtensions_DynamicMessageType::SharedCtor() {
  30148. dynamic_field_ = 0;
  30149. }
  30150. TestDynamicExtensions_DynamicMessageType::~TestDynamicExtensions_DynamicMessageType() {
  30151. // @@protoc_insertion_point(destructor:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30152. SharedDtor();
  30153. }
  30154. void TestDynamicExtensions_DynamicMessageType::SharedDtor() {
  30155. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  30156. }
  30157. void TestDynamicExtensions_DynamicMessageType::ArenaDtor(void* object) {
  30158. TestDynamicExtensions_DynamicMessageType* _this = reinterpret_cast< TestDynamicExtensions_DynamicMessageType* >(object);
  30159. (void)_this;
  30160. }
  30161. void TestDynamicExtensions_DynamicMessageType::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  30162. }
  30163. void TestDynamicExtensions_DynamicMessageType::SetCachedSize(int size) const {
  30164. _cached_size_.Set(size);
  30165. }
  30166. const ::google::protobuf::Descriptor* TestDynamicExtensions_DynamicMessageType::descriptor() {
  30167. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  30168. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  30169. }
  30170. const TestDynamicExtensions_DynamicMessageType& TestDynamicExtensions_DynamicMessageType::default_instance() {
  30171. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDynamicExtensions_DynamicMessageType.base);
  30172. return *internal_default_instance();
  30173. }
  30174. void TestDynamicExtensions_DynamicMessageType::Clear() {
  30175. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30176. ::google::protobuf::uint32 cached_has_bits = 0;
  30177. // Prevent compiler warnings about cached_has_bits being unused
  30178. (void) cached_has_bits;
  30179. dynamic_field_ = 0;
  30180. _has_bits_.Clear();
  30181. _internal_metadata_.Clear();
  30182. }
  30183. bool TestDynamicExtensions_DynamicMessageType::MergePartialFromCodedStream(
  30184. ::google::protobuf::io::CodedInputStream* input) {
  30185. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  30186. ::google::protobuf::uint32 tag;
  30187. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30188. for (;;) {
  30189. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16805u);
  30190. tag = p.first;
  30191. if (!p.second) goto handle_unusual;
  30192. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  30193. // optional int32 dynamic_field = 2100;
  30194. case 2100: {
  30195. if (static_cast< ::google::protobuf::uint8>(tag) ==
  30196. static_cast< ::google::protobuf::uint8>(160u /* 16800 & 0xFF */)) {
  30197. set_has_dynamic_field();
  30198. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  30199. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  30200. input, &dynamic_field_)));
  30201. } else {
  30202. goto handle_unusual;
  30203. }
  30204. break;
  30205. }
  30206. default: {
  30207. handle_unusual:
  30208. if (tag == 0) {
  30209. goto success;
  30210. }
  30211. DO_(::google::protobuf::internal::WireFormat::SkipField(
  30212. input, tag, _internal_metadata_.mutable_unknown_fields()));
  30213. break;
  30214. }
  30215. }
  30216. }
  30217. success:
  30218. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30219. return true;
  30220. failure:
  30221. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30222. return false;
  30223. #undef DO_
  30224. }
  30225. void TestDynamicExtensions_DynamicMessageType::SerializeWithCachedSizes(
  30226. ::google::protobuf::io::CodedOutputStream* output) const {
  30227. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30228. ::google::protobuf::uint32 cached_has_bits = 0;
  30229. (void) cached_has_bits;
  30230. cached_has_bits = _has_bits_[0];
  30231. // optional int32 dynamic_field = 2100;
  30232. if (cached_has_bits & 0x00000001u) {
  30233. ::google::protobuf::internal::WireFormatLite::WriteInt32(2100, this->dynamic_field(), output);
  30234. }
  30235. if (_internal_metadata_.have_unknown_fields()) {
  30236. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  30237. _internal_metadata_.unknown_fields(), output);
  30238. }
  30239. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30240. }
  30241. ::google::protobuf::uint8* TestDynamicExtensions_DynamicMessageType::InternalSerializeWithCachedSizesToArray(
  30242. bool deterministic, ::google::protobuf::uint8* target) const {
  30243. (void)deterministic; // Unused
  30244. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30245. ::google::protobuf::uint32 cached_has_bits = 0;
  30246. (void) cached_has_bits;
  30247. cached_has_bits = _has_bits_[0];
  30248. // optional int32 dynamic_field = 2100;
  30249. if (cached_has_bits & 0x00000001u) {
  30250. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2100, this->dynamic_field(), target);
  30251. }
  30252. if (_internal_metadata_.have_unknown_fields()) {
  30253. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  30254. _internal_metadata_.unknown_fields(), target);
  30255. }
  30256. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30257. return target;
  30258. }
  30259. size_t TestDynamicExtensions_DynamicMessageType::ByteSizeLong() const {
  30260. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30261. size_t total_size = 0;
  30262. if (_internal_metadata_.have_unknown_fields()) {
  30263. total_size +=
  30264. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  30265. _internal_metadata_.unknown_fields());
  30266. }
  30267. // optional int32 dynamic_field = 2100;
  30268. if (has_dynamic_field()) {
  30269. total_size += 3 +
  30270. ::google::protobuf::internal::WireFormatLite::Int32Size(
  30271. this->dynamic_field());
  30272. }
  30273. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  30274. SetCachedSize(cached_size);
  30275. return total_size;
  30276. }
  30277. void TestDynamicExtensions_DynamicMessageType::MergeFrom(const ::google::protobuf::Message& from) {
  30278. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30279. GOOGLE_DCHECK_NE(&from, this);
  30280. const TestDynamicExtensions_DynamicMessageType* source =
  30281. ::google::protobuf::internal::DynamicCastToGenerated<const TestDynamicExtensions_DynamicMessageType>(
  30282. &from);
  30283. if (source == NULL) {
  30284. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30285. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  30286. } else {
  30287. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30288. MergeFrom(*source);
  30289. }
  30290. }
  30291. void TestDynamicExtensions_DynamicMessageType::MergeFrom(const TestDynamicExtensions_DynamicMessageType& from) {
  30292. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30293. GOOGLE_DCHECK_NE(&from, this);
  30294. _internal_metadata_.MergeFrom(from._internal_metadata_);
  30295. ::google::protobuf::uint32 cached_has_bits = 0;
  30296. (void) cached_has_bits;
  30297. if (from.has_dynamic_field()) {
  30298. set_dynamic_field(from.dynamic_field());
  30299. }
  30300. }
  30301. void TestDynamicExtensions_DynamicMessageType::CopyFrom(const ::google::protobuf::Message& from) {
  30302. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30303. if (&from == this) return;
  30304. Clear();
  30305. MergeFrom(from);
  30306. }
  30307. void TestDynamicExtensions_DynamicMessageType::CopyFrom(const TestDynamicExtensions_DynamicMessageType& from) {
  30308. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDynamicExtensions.DynamicMessageType)
  30309. if (&from == this) return;
  30310. Clear();
  30311. MergeFrom(from);
  30312. }
  30313. bool TestDynamicExtensions_DynamicMessageType::IsInitialized() const {
  30314. return true;
  30315. }
  30316. void TestDynamicExtensions_DynamicMessageType::Swap(TestDynamicExtensions_DynamicMessageType* other) {
  30317. if (other == this) return;
  30318. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  30319. InternalSwap(other);
  30320. } else {
  30321. TestDynamicExtensions_DynamicMessageType* temp = New(GetArenaNoVirtual());
  30322. temp->MergeFrom(*other);
  30323. other->CopyFrom(*this);
  30324. InternalSwap(temp);
  30325. if (GetArenaNoVirtual() == NULL) {
  30326. delete temp;
  30327. }
  30328. }
  30329. }
  30330. void TestDynamicExtensions_DynamicMessageType::UnsafeArenaSwap(TestDynamicExtensions_DynamicMessageType* other) {
  30331. if (other == this) return;
  30332. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  30333. InternalSwap(other);
  30334. }
  30335. void TestDynamicExtensions_DynamicMessageType::InternalSwap(TestDynamicExtensions_DynamicMessageType* other) {
  30336. using std::swap;
  30337. swap(dynamic_field_, other->dynamic_field_);
  30338. swap(_has_bits_[0], other->_has_bits_[0]);
  30339. _internal_metadata_.Swap(&other->_internal_metadata_);
  30340. }
  30341. ::google::protobuf::Metadata TestDynamicExtensions_DynamicMessageType::GetMetadata() const {
  30342. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  30343. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  30344. }
  30345. // ===================================================================
  30346. void TestDynamicExtensions::InitAsDefaultInstance() {
  30347. ::protobuf_unittest::_TestDynamicExtensions_default_instance_._instance.get_mutable()->message_extension_ = const_cast< ::protobuf_unittest::ForeignMessage*>(
  30348. ::protobuf_unittest::ForeignMessage::internal_default_instance());
  30349. ::protobuf_unittest::_TestDynamicExtensions_default_instance_._instance.get_mutable()->dynamic_message_extension_ = const_cast< ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType*>(
  30350. ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType::internal_default_instance());
  30351. }
  30352. void TestDynamicExtensions::unsafe_arena_set_allocated_message_extension(
  30353. ::protobuf_unittest::ForeignMessage* message_extension) {
  30354. if (GetArenaNoVirtual() == NULL) {
  30355. delete message_extension_;
  30356. }
  30357. message_extension_ = message_extension;
  30358. if (message_extension) {
  30359. set_has_message_extension();
  30360. } else {
  30361. clear_has_message_extension();
  30362. }
  30363. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestDynamicExtensions.message_extension)
  30364. }
  30365. void TestDynamicExtensions::unsafe_arena_set_allocated_dynamic_message_extension(
  30366. ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType* dynamic_message_extension) {
  30367. if (GetArenaNoVirtual() == NULL) {
  30368. delete dynamic_message_extension_;
  30369. }
  30370. dynamic_message_extension_ = dynamic_message_extension;
  30371. if (dynamic_message_extension) {
  30372. set_has_dynamic_message_extension();
  30373. } else {
  30374. clear_has_dynamic_message_extension();
  30375. }
  30376. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestDynamicExtensions.dynamic_message_extension)
  30377. }
  30378. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  30379. const int TestDynamicExtensions::kScalarExtensionFieldNumber;
  30380. const int TestDynamicExtensions::kEnumExtensionFieldNumber;
  30381. const int TestDynamicExtensions::kDynamicEnumExtensionFieldNumber;
  30382. const int TestDynamicExtensions::kMessageExtensionFieldNumber;
  30383. const int TestDynamicExtensions::kDynamicMessageExtensionFieldNumber;
  30384. const int TestDynamicExtensions::kRepeatedExtensionFieldNumber;
  30385. const int TestDynamicExtensions::kPackedExtensionFieldNumber;
  30386. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  30387. TestDynamicExtensions::TestDynamicExtensions()
  30388. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  30389. ::google::protobuf::internal::InitSCC(
  30390. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDynamicExtensions.base);
  30391. SharedCtor();
  30392. // @@protoc_insertion_point(constructor:protobuf_unittest.TestDynamicExtensions)
  30393. }
  30394. TestDynamicExtensions::TestDynamicExtensions(::google::protobuf::Arena* arena)
  30395. : ::google::protobuf::Message(),
  30396. _internal_metadata_(arena),
  30397. repeated_extension_(arena),
  30398. packed_extension_(arena) {
  30399. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDynamicExtensions.base);
  30400. SharedCtor();
  30401. RegisterArenaDtor(arena);
  30402. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestDynamicExtensions)
  30403. }
  30404. TestDynamicExtensions::TestDynamicExtensions(const TestDynamicExtensions& from)
  30405. : ::google::protobuf::Message(),
  30406. _internal_metadata_(NULL),
  30407. _has_bits_(from._has_bits_),
  30408. repeated_extension_(from.repeated_extension_),
  30409. packed_extension_(from.packed_extension_) {
  30410. _internal_metadata_.MergeFrom(from._internal_metadata_);
  30411. if (from.has_message_extension()) {
  30412. message_extension_ = new ::protobuf_unittest::ForeignMessage(*from.message_extension_);
  30413. } else {
  30414. message_extension_ = NULL;
  30415. }
  30416. if (from.has_dynamic_message_extension()) {
  30417. dynamic_message_extension_ = new ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType(*from.dynamic_message_extension_);
  30418. } else {
  30419. dynamic_message_extension_ = NULL;
  30420. }
  30421. ::memcpy(&scalar_extension_, &from.scalar_extension_,
  30422. static_cast<size_t>(reinterpret_cast<char*>(&dynamic_enum_extension_) -
  30423. reinterpret_cast<char*>(&scalar_extension_)) + sizeof(dynamic_enum_extension_));
  30424. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDynamicExtensions)
  30425. }
  30426. void TestDynamicExtensions::SharedCtor() {
  30427. ::memset(&message_extension_, 0, static_cast<size_t>(
  30428. reinterpret_cast<char*>(&scalar_extension_) -
  30429. reinterpret_cast<char*>(&message_extension_)) + sizeof(scalar_extension_));
  30430. enum_extension_ = 4;
  30431. dynamic_enum_extension_ = 2200;
  30432. }
  30433. TestDynamicExtensions::~TestDynamicExtensions() {
  30434. // @@protoc_insertion_point(destructor:protobuf_unittest.TestDynamicExtensions)
  30435. SharedDtor();
  30436. }
  30437. void TestDynamicExtensions::SharedDtor() {
  30438. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  30439. if (this != internal_default_instance()) delete message_extension_;
  30440. if (this != internal_default_instance()) delete dynamic_message_extension_;
  30441. }
  30442. void TestDynamicExtensions::ArenaDtor(void* object) {
  30443. TestDynamicExtensions* _this = reinterpret_cast< TestDynamicExtensions* >(object);
  30444. (void)_this;
  30445. }
  30446. void TestDynamicExtensions::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  30447. }
  30448. void TestDynamicExtensions::SetCachedSize(int size) const {
  30449. _cached_size_.Set(size);
  30450. }
  30451. const ::google::protobuf::Descriptor* TestDynamicExtensions::descriptor() {
  30452. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  30453. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  30454. }
  30455. const TestDynamicExtensions& TestDynamicExtensions::default_instance() {
  30456. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestDynamicExtensions.base);
  30457. return *internal_default_instance();
  30458. }
  30459. void TestDynamicExtensions::Clear() {
  30460. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestDynamicExtensions)
  30461. ::google::protobuf::uint32 cached_has_bits = 0;
  30462. // Prevent compiler warnings about cached_has_bits being unused
  30463. (void) cached_has_bits;
  30464. repeated_extension_.Clear();
  30465. packed_extension_.Clear();
  30466. cached_has_bits = _has_bits_[0];
  30467. if (cached_has_bits & 3u) {
  30468. if (cached_has_bits & 0x00000001u) {
  30469. GOOGLE_DCHECK(message_extension_ != NULL);
  30470. message_extension_->Clear();
  30471. }
  30472. if (cached_has_bits & 0x00000002u) {
  30473. GOOGLE_DCHECK(dynamic_message_extension_ != NULL);
  30474. dynamic_message_extension_->Clear();
  30475. }
  30476. }
  30477. if (cached_has_bits & 28u) {
  30478. scalar_extension_ = 0u;
  30479. enum_extension_ = 4;
  30480. dynamic_enum_extension_ = 2200;
  30481. }
  30482. _has_bits_.Clear();
  30483. _internal_metadata_.Clear();
  30484. }
  30485. bool TestDynamicExtensions::MergePartialFromCodedStream(
  30486. ::google::protobuf::io::CodedInputStream* input) {
  30487. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  30488. ::google::protobuf::uint32 tag;
  30489. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestDynamicExtensions)
  30490. for (;;) {
  30491. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  30492. tag = p.first;
  30493. if (!p.second) goto handle_unusual;
  30494. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  30495. // optional fixed32 scalar_extension = 2000;
  30496. case 2000: {
  30497. if (static_cast< ::google::protobuf::uint8>(tag) ==
  30498. static_cast< ::google::protobuf::uint8>(133u /* 16005 & 0xFF */)) {
  30499. set_has_scalar_extension();
  30500. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  30501. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  30502. input, &scalar_extension_)));
  30503. } else {
  30504. goto handle_unusual;
  30505. }
  30506. break;
  30507. }
  30508. // optional .protobuf_unittest.ForeignEnum enum_extension = 2001;
  30509. case 2001: {
  30510. if (static_cast< ::google::protobuf::uint8>(tag) ==
  30511. static_cast< ::google::protobuf::uint8>(136u /* 16008 & 0xFF */)) {
  30512. int value;
  30513. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  30514. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  30515. input, &value)));
  30516. if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
  30517. set_enum_extension(static_cast< ::protobuf_unittest::ForeignEnum >(value));
  30518. } else {
  30519. mutable_unknown_fields()->AddVarint(
  30520. 2001, static_cast< ::google::protobuf::uint64>(value));
  30521. }
  30522. } else {
  30523. goto handle_unusual;
  30524. }
  30525. break;
  30526. }
  30527. // optional .protobuf_unittest.TestDynamicExtensions.DynamicEnumType dynamic_enum_extension = 2002;
  30528. case 2002: {
  30529. if (static_cast< ::google::protobuf::uint8>(tag) ==
  30530. static_cast< ::google::protobuf::uint8>(144u /* 16016 & 0xFF */)) {
  30531. int value;
  30532. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  30533. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  30534. input, &value)));
  30535. if (::protobuf_unittest::TestDynamicExtensions_DynamicEnumType_IsValid(value)) {
  30536. set_dynamic_enum_extension(static_cast< ::protobuf_unittest::TestDynamicExtensions_DynamicEnumType >(value));
  30537. } else {
  30538. mutable_unknown_fields()->AddVarint(
  30539. 2002, static_cast< ::google::protobuf::uint64>(value));
  30540. }
  30541. } else {
  30542. goto handle_unusual;
  30543. }
  30544. break;
  30545. }
  30546. // optional .protobuf_unittest.ForeignMessage message_extension = 2003;
  30547. case 2003: {
  30548. if (static_cast< ::google::protobuf::uint8>(tag) ==
  30549. static_cast< ::google::protobuf::uint8>(154u /* 16026 & 0xFF */)) {
  30550. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  30551. input, mutable_message_extension()));
  30552. } else {
  30553. goto handle_unusual;
  30554. }
  30555. break;
  30556. }
  30557. // optional .protobuf_unittest.TestDynamicExtensions.DynamicMessageType dynamic_message_extension = 2004;
  30558. case 2004: {
  30559. if (static_cast< ::google::protobuf::uint8>(tag) ==
  30560. static_cast< ::google::protobuf::uint8>(162u /* 16034 & 0xFF */)) {
  30561. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  30562. input, mutable_dynamic_message_extension()));
  30563. } else {
  30564. goto handle_unusual;
  30565. }
  30566. break;
  30567. }
  30568. // repeated string repeated_extension = 2005;
  30569. case 2005: {
  30570. if (static_cast< ::google::protobuf::uint8>(tag) ==
  30571. static_cast< ::google::protobuf::uint8>(170u /* 16042 & 0xFF */)) {
  30572. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  30573. input, this->add_repeated_extension()));
  30574. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  30575. this->repeated_extension(this->repeated_extension_size() - 1).data(),
  30576. static_cast<int>(this->repeated_extension(this->repeated_extension_size() - 1).length()),
  30577. ::google::protobuf::internal::WireFormat::PARSE,
  30578. "protobuf_unittest.TestDynamicExtensions.repeated_extension");
  30579. } else {
  30580. goto handle_unusual;
  30581. }
  30582. break;
  30583. }
  30584. // repeated sint32 packed_extension = 2006 [packed = true];
  30585. case 2006: {
  30586. if (static_cast< ::google::protobuf::uint8>(tag) ==
  30587. static_cast< ::google::protobuf::uint8>(178u /* 16050 & 0xFF */)) {
  30588. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  30589. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  30590. input, this->mutable_packed_extension())));
  30591. } else if (
  30592. static_cast< ::google::protobuf::uint8>(tag) ==
  30593. static_cast< ::google::protobuf::uint8>(176u /* 16048 & 0xFF */)) {
  30594. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  30595. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
  30596. 2, 16050u, input, this->mutable_packed_extension())));
  30597. } else {
  30598. goto handle_unusual;
  30599. }
  30600. break;
  30601. }
  30602. default: {
  30603. handle_unusual:
  30604. if (tag == 0) {
  30605. goto success;
  30606. }
  30607. DO_(::google::protobuf::internal::WireFormat::SkipField(
  30608. input, tag, _internal_metadata_.mutable_unknown_fields()));
  30609. break;
  30610. }
  30611. }
  30612. }
  30613. success:
  30614. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestDynamicExtensions)
  30615. return true;
  30616. failure:
  30617. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDynamicExtensions)
  30618. return false;
  30619. #undef DO_
  30620. }
  30621. void TestDynamicExtensions::SerializeWithCachedSizes(
  30622. ::google::protobuf::io::CodedOutputStream* output) const {
  30623. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestDynamicExtensions)
  30624. ::google::protobuf::uint32 cached_has_bits = 0;
  30625. (void) cached_has_bits;
  30626. cached_has_bits = _has_bits_[0];
  30627. // optional fixed32 scalar_extension = 2000;
  30628. if (cached_has_bits & 0x00000004u) {
  30629. ::google::protobuf::internal::WireFormatLite::WriteFixed32(2000, this->scalar_extension(), output);
  30630. }
  30631. // optional .protobuf_unittest.ForeignEnum enum_extension = 2001;
  30632. if (cached_has_bits & 0x00000008u) {
  30633. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  30634. 2001, this->enum_extension(), output);
  30635. }
  30636. // optional .protobuf_unittest.TestDynamicExtensions.DynamicEnumType dynamic_enum_extension = 2002;
  30637. if (cached_has_bits & 0x00000010u) {
  30638. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  30639. 2002, this->dynamic_enum_extension(), output);
  30640. }
  30641. // optional .protobuf_unittest.ForeignMessage message_extension = 2003;
  30642. if (cached_has_bits & 0x00000001u) {
  30643. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  30644. 2003, this->_internal_message_extension(), output);
  30645. }
  30646. // optional .protobuf_unittest.TestDynamicExtensions.DynamicMessageType dynamic_message_extension = 2004;
  30647. if (cached_has_bits & 0x00000002u) {
  30648. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  30649. 2004, this->_internal_dynamic_message_extension(), output);
  30650. }
  30651. // repeated string repeated_extension = 2005;
  30652. for (int i = 0, n = this->repeated_extension_size(); i < n; i++) {
  30653. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  30654. this->repeated_extension(i).data(), static_cast<int>(this->repeated_extension(i).length()),
  30655. ::google::protobuf::internal::WireFormat::SERIALIZE,
  30656. "protobuf_unittest.TestDynamicExtensions.repeated_extension");
  30657. ::google::protobuf::internal::WireFormatLite::WriteString(
  30658. 2005, this->repeated_extension(i), output);
  30659. }
  30660. // repeated sint32 packed_extension = 2006 [packed = true];
  30661. if (this->packed_extension_size() > 0) {
  30662. ::google::protobuf::internal::WireFormatLite::WriteTag(2006, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  30663. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  30664. _packed_extension_cached_byte_size_));
  30665. }
  30666. for (int i = 0, n = this->packed_extension_size(); i < n; i++) {
  30667. ::google::protobuf::internal::WireFormatLite::WriteSInt32NoTag(
  30668. this->packed_extension(i), output);
  30669. }
  30670. if (_internal_metadata_.have_unknown_fields()) {
  30671. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  30672. _internal_metadata_.unknown_fields(), output);
  30673. }
  30674. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDynamicExtensions)
  30675. }
  30676. ::google::protobuf::uint8* TestDynamicExtensions::InternalSerializeWithCachedSizesToArray(
  30677. bool deterministic, ::google::protobuf::uint8* target) const {
  30678. (void)deterministic; // Unused
  30679. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestDynamicExtensions)
  30680. ::google::protobuf::uint32 cached_has_bits = 0;
  30681. (void) cached_has_bits;
  30682. cached_has_bits = _has_bits_[0];
  30683. // optional fixed32 scalar_extension = 2000;
  30684. if (cached_has_bits & 0x00000004u) {
  30685. target = ::google::protobuf::internal::WireFormatLite::WriteFixed32ToArray(2000, this->scalar_extension(), target);
  30686. }
  30687. // optional .protobuf_unittest.ForeignEnum enum_extension = 2001;
  30688. if (cached_has_bits & 0x00000008u) {
  30689. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  30690. 2001, this->enum_extension(), target);
  30691. }
  30692. // optional .protobuf_unittest.TestDynamicExtensions.DynamicEnumType dynamic_enum_extension = 2002;
  30693. if (cached_has_bits & 0x00000010u) {
  30694. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  30695. 2002, this->dynamic_enum_extension(), target);
  30696. }
  30697. // optional .protobuf_unittest.ForeignMessage message_extension = 2003;
  30698. if (cached_has_bits & 0x00000001u) {
  30699. target = ::google::protobuf::internal::WireFormatLite::
  30700. InternalWriteMessageToArray(
  30701. 2003, this->_internal_message_extension(), deterministic, target);
  30702. }
  30703. // optional .protobuf_unittest.TestDynamicExtensions.DynamicMessageType dynamic_message_extension = 2004;
  30704. if (cached_has_bits & 0x00000002u) {
  30705. target = ::google::protobuf::internal::WireFormatLite::
  30706. InternalWriteMessageToArray(
  30707. 2004, this->_internal_dynamic_message_extension(), deterministic, target);
  30708. }
  30709. // repeated string repeated_extension = 2005;
  30710. for (int i = 0, n = this->repeated_extension_size(); i < n; i++) {
  30711. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  30712. this->repeated_extension(i).data(), static_cast<int>(this->repeated_extension(i).length()),
  30713. ::google::protobuf::internal::WireFormat::SERIALIZE,
  30714. "protobuf_unittest.TestDynamicExtensions.repeated_extension");
  30715. target = ::google::protobuf::internal::WireFormatLite::
  30716. WriteStringToArray(2005, this->repeated_extension(i), target);
  30717. }
  30718. // repeated sint32 packed_extension = 2006 [packed = true];
  30719. if (this->packed_extension_size() > 0) {
  30720. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  30721. 2006,
  30722. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  30723. target);
  30724. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  30725. static_cast< ::google::protobuf::int32>(
  30726. _packed_extension_cached_byte_size_), target);
  30727. target = ::google::protobuf::internal::WireFormatLite::
  30728. WriteSInt32NoTagToArray(this->packed_extension_, target);
  30729. }
  30730. if (_internal_metadata_.have_unknown_fields()) {
  30731. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  30732. _internal_metadata_.unknown_fields(), target);
  30733. }
  30734. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDynamicExtensions)
  30735. return target;
  30736. }
  30737. size_t TestDynamicExtensions::ByteSizeLong() const {
  30738. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDynamicExtensions)
  30739. size_t total_size = 0;
  30740. if (_internal_metadata_.have_unknown_fields()) {
  30741. total_size +=
  30742. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  30743. _internal_metadata_.unknown_fields());
  30744. }
  30745. // repeated string repeated_extension = 2005;
  30746. total_size += 2 *
  30747. ::google::protobuf::internal::FromIntSize(this->repeated_extension_size());
  30748. for (int i = 0, n = this->repeated_extension_size(); i < n; i++) {
  30749. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  30750. this->repeated_extension(i));
  30751. }
  30752. // repeated sint32 packed_extension = 2006 [packed = true];
  30753. {
  30754. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  30755. SInt32Size(this->packed_extension_);
  30756. if (data_size > 0) {
  30757. total_size += 2 +
  30758. ::google::protobuf::internal::WireFormatLite::Int32Size(
  30759. static_cast< ::google::protobuf::int32>(data_size));
  30760. }
  30761. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  30762. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  30763. _packed_extension_cached_byte_size_ = cached_size;
  30764. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  30765. total_size += data_size;
  30766. }
  30767. if (_has_bits_[0 / 32] & 31u) {
  30768. // optional .protobuf_unittest.ForeignMessage message_extension = 2003;
  30769. if (has_message_extension()) {
  30770. total_size += 2 +
  30771. ::google::protobuf::internal::WireFormatLite::MessageSize(
  30772. *message_extension_);
  30773. }
  30774. // optional .protobuf_unittest.TestDynamicExtensions.DynamicMessageType dynamic_message_extension = 2004;
  30775. if (has_dynamic_message_extension()) {
  30776. total_size += 2 +
  30777. ::google::protobuf::internal::WireFormatLite::MessageSize(
  30778. *dynamic_message_extension_);
  30779. }
  30780. // optional fixed32 scalar_extension = 2000;
  30781. if (has_scalar_extension()) {
  30782. total_size += 2 + 4;
  30783. }
  30784. // optional .protobuf_unittest.ForeignEnum enum_extension = 2001;
  30785. if (has_enum_extension()) {
  30786. total_size += 2 +
  30787. ::google::protobuf::internal::WireFormatLite::EnumSize(this->enum_extension());
  30788. }
  30789. // optional .protobuf_unittest.TestDynamicExtensions.DynamicEnumType dynamic_enum_extension = 2002;
  30790. if (has_dynamic_enum_extension()) {
  30791. total_size += 2 +
  30792. ::google::protobuf::internal::WireFormatLite::EnumSize(this->dynamic_enum_extension());
  30793. }
  30794. }
  30795. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  30796. SetCachedSize(cached_size);
  30797. return total_size;
  30798. }
  30799. void TestDynamicExtensions::MergeFrom(const ::google::protobuf::Message& from) {
  30800. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestDynamicExtensions)
  30801. GOOGLE_DCHECK_NE(&from, this);
  30802. const TestDynamicExtensions* source =
  30803. ::google::protobuf::internal::DynamicCastToGenerated<const TestDynamicExtensions>(
  30804. &from);
  30805. if (source == NULL) {
  30806. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestDynamicExtensions)
  30807. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  30808. } else {
  30809. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestDynamicExtensions)
  30810. MergeFrom(*source);
  30811. }
  30812. }
  30813. void TestDynamicExtensions::MergeFrom(const TestDynamicExtensions& from) {
  30814. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestDynamicExtensions)
  30815. GOOGLE_DCHECK_NE(&from, this);
  30816. _internal_metadata_.MergeFrom(from._internal_metadata_);
  30817. ::google::protobuf::uint32 cached_has_bits = 0;
  30818. (void) cached_has_bits;
  30819. repeated_extension_.MergeFrom(from.repeated_extension_);
  30820. packed_extension_.MergeFrom(from.packed_extension_);
  30821. cached_has_bits = from._has_bits_[0];
  30822. if (cached_has_bits & 31u) {
  30823. if (cached_has_bits & 0x00000001u) {
  30824. mutable_message_extension()->::protobuf_unittest::ForeignMessage::MergeFrom(from.message_extension());
  30825. }
  30826. if (cached_has_bits & 0x00000002u) {
  30827. mutable_dynamic_message_extension()->::protobuf_unittest::TestDynamicExtensions_DynamicMessageType::MergeFrom(from.dynamic_message_extension());
  30828. }
  30829. if (cached_has_bits & 0x00000004u) {
  30830. scalar_extension_ = from.scalar_extension_;
  30831. }
  30832. if (cached_has_bits & 0x00000008u) {
  30833. enum_extension_ = from.enum_extension_;
  30834. }
  30835. if (cached_has_bits & 0x00000010u) {
  30836. dynamic_enum_extension_ = from.dynamic_enum_extension_;
  30837. }
  30838. _has_bits_[0] |= cached_has_bits;
  30839. }
  30840. }
  30841. void TestDynamicExtensions::CopyFrom(const ::google::protobuf::Message& from) {
  30842. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestDynamicExtensions)
  30843. if (&from == this) return;
  30844. Clear();
  30845. MergeFrom(from);
  30846. }
  30847. void TestDynamicExtensions::CopyFrom(const TestDynamicExtensions& from) {
  30848. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDynamicExtensions)
  30849. if (&from == this) return;
  30850. Clear();
  30851. MergeFrom(from);
  30852. }
  30853. bool TestDynamicExtensions::IsInitialized() const {
  30854. return true;
  30855. }
  30856. void TestDynamicExtensions::Swap(TestDynamicExtensions* other) {
  30857. if (other == this) return;
  30858. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  30859. InternalSwap(other);
  30860. } else {
  30861. TestDynamicExtensions* temp = New(GetArenaNoVirtual());
  30862. temp->MergeFrom(*other);
  30863. other->CopyFrom(*this);
  30864. InternalSwap(temp);
  30865. if (GetArenaNoVirtual() == NULL) {
  30866. delete temp;
  30867. }
  30868. }
  30869. }
  30870. void TestDynamicExtensions::UnsafeArenaSwap(TestDynamicExtensions* other) {
  30871. if (other == this) return;
  30872. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  30873. InternalSwap(other);
  30874. }
  30875. void TestDynamicExtensions::InternalSwap(TestDynamicExtensions* other) {
  30876. using std::swap;
  30877. repeated_extension_.InternalSwap(CastToBase(&other->repeated_extension_));
  30878. packed_extension_.InternalSwap(&other->packed_extension_);
  30879. swap(message_extension_, other->message_extension_);
  30880. swap(dynamic_message_extension_, other->dynamic_message_extension_);
  30881. swap(scalar_extension_, other->scalar_extension_);
  30882. swap(enum_extension_, other->enum_extension_);
  30883. swap(dynamic_enum_extension_, other->dynamic_enum_extension_);
  30884. swap(_has_bits_[0], other->_has_bits_[0]);
  30885. _internal_metadata_.Swap(&other->_internal_metadata_);
  30886. }
  30887. ::google::protobuf::Metadata TestDynamicExtensions::GetMetadata() const {
  30888. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  30889. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  30890. }
  30891. // ===================================================================
  30892. void TestRepeatedScalarDifferentTagSizes::InitAsDefaultInstance() {
  30893. }
  30894. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  30895. const int TestRepeatedScalarDifferentTagSizes::kRepeatedFixed32FieldNumber;
  30896. const int TestRepeatedScalarDifferentTagSizes::kRepeatedInt32FieldNumber;
  30897. const int TestRepeatedScalarDifferentTagSizes::kRepeatedFixed64FieldNumber;
  30898. const int TestRepeatedScalarDifferentTagSizes::kRepeatedInt64FieldNumber;
  30899. const int TestRepeatedScalarDifferentTagSizes::kRepeatedFloatFieldNumber;
  30900. const int TestRepeatedScalarDifferentTagSizes::kRepeatedUint64FieldNumber;
  30901. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  30902. TestRepeatedScalarDifferentTagSizes::TestRepeatedScalarDifferentTagSizes()
  30903. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  30904. ::google::protobuf::internal::InitSCC(
  30905. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRepeatedScalarDifferentTagSizes.base);
  30906. SharedCtor();
  30907. // @@protoc_insertion_point(constructor:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  30908. }
  30909. TestRepeatedScalarDifferentTagSizes::TestRepeatedScalarDifferentTagSizes(::google::protobuf::Arena* arena)
  30910. : ::google::protobuf::Message(),
  30911. _internal_metadata_(arena),
  30912. repeated_fixed32_(arena),
  30913. repeated_int32_(arena),
  30914. repeated_fixed64_(arena),
  30915. repeated_int64_(arena),
  30916. repeated_float_(arena),
  30917. repeated_uint64_(arena) {
  30918. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRepeatedScalarDifferentTagSizes.base);
  30919. SharedCtor();
  30920. RegisterArenaDtor(arena);
  30921. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  30922. }
  30923. TestRepeatedScalarDifferentTagSizes::TestRepeatedScalarDifferentTagSizes(const TestRepeatedScalarDifferentTagSizes& from)
  30924. : ::google::protobuf::Message(),
  30925. _internal_metadata_(NULL),
  30926. _has_bits_(from._has_bits_),
  30927. repeated_fixed32_(from.repeated_fixed32_),
  30928. repeated_int32_(from.repeated_int32_),
  30929. repeated_fixed64_(from.repeated_fixed64_),
  30930. repeated_int64_(from.repeated_int64_),
  30931. repeated_float_(from.repeated_float_),
  30932. repeated_uint64_(from.repeated_uint64_) {
  30933. _internal_metadata_.MergeFrom(from._internal_metadata_);
  30934. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  30935. }
  30936. void TestRepeatedScalarDifferentTagSizes::SharedCtor() {
  30937. }
  30938. TestRepeatedScalarDifferentTagSizes::~TestRepeatedScalarDifferentTagSizes() {
  30939. // @@protoc_insertion_point(destructor:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  30940. SharedDtor();
  30941. }
  30942. void TestRepeatedScalarDifferentTagSizes::SharedDtor() {
  30943. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  30944. }
  30945. void TestRepeatedScalarDifferentTagSizes::ArenaDtor(void* object) {
  30946. TestRepeatedScalarDifferentTagSizes* _this = reinterpret_cast< TestRepeatedScalarDifferentTagSizes* >(object);
  30947. (void)_this;
  30948. }
  30949. void TestRepeatedScalarDifferentTagSizes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  30950. }
  30951. void TestRepeatedScalarDifferentTagSizes::SetCachedSize(int size) const {
  30952. _cached_size_.Set(size);
  30953. }
  30954. const ::google::protobuf::Descriptor* TestRepeatedScalarDifferentTagSizes::descriptor() {
  30955. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  30956. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  30957. }
  30958. const TestRepeatedScalarDifferentTagSizes& TestRepeatedScalarDifferentTagSizes::default_instance() {
  30959. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestRepeatedScalarDifferentTagSizes.base);
  30960. return *internal_default_instance();
  30961. }
  30962. void TestRepeatedScalarDifferentTagSizes::Clear() {
  30963. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  30964. ::google::protobuf::uint32 cached_has_bits = 0;
  30965. // Prevent compiler warnings about cached_has_bits being unused
  30966. (void) cached_has_bits;
  30967. repeated_fixed32_.Clear();
  30968. repeated_int32_.Clear();
  30969. repeated_fixed64_.Clear();
  30970. repeated_int64_.Clear();
  30971. repeated_float_.Clear();
  30972. repeated_uint64_.Clear();
  30973. _has_bits_.Clear();
  30974. _internal_metadata_.Clear();
  30975. }
  30976. bool TestRepeatedScalarDifferentTagSizes::MergePartialFromCodedStream(
  30977. ::google::protobuf::io::CodedInputStream* input) {
  30978. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  30979. ::google::protobuf::uint32 tag;
  30980. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  30981. for (;;) {
  30982. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(2097149u);
  30983. tag = p.first;
  30984. if (!p.second) goto handle_unusual;
  30985. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  30986. // repeated fixed32 repeated_fixed32 = 12;
  30987. case 12: {
  30988. if (static_cast< ::google::protobuf::uint8>(tag) ==
  30989. static_cast< ::google::protobuf::uint8>(101u /* 101 & 0xFF */)) {
  30990. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  30991. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  30992. 1, 101u, input, this->mutable_repeated_fixed32())));
  30993. } else if (
  30994. static_cast< ::google::protobuf::uint8>(tag) ==
  30995. static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
  30996. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  30997. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
  30998. input, this->mutable_repeated_fixed32())));
  30999. } else {
  31000. goto handle_unusual;
  31001. }
  31002. break;
  31003. }
  31004. // repeated int32 repeated_int32 = 13;
  31005. case 13: {
  31006. if (static_cast< ::google::protobuf::uint8>(tag) ==
  31007. static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
  31008. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  31009. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  31010. 1, 104u, input, this->mutable_repeated_int32())));
  31011. } else if (
  31012. static_cast< ::google::protobuf::uint8>(tag) ==
  31013. static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
  31014. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  31015. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  31016. input, this->mutable_repeated_int32())));
  31017. } else {
  31018. goto handle_unusual;
  31019. }
  31020. break;
  31021. }
  31022. // repeated fixed64 repeated_fixed64 = 2046;
  31023. case 2046: {
  31024. if (static_cast< ::google::protobuf::uint8>(tag) ==
  31025. static_cast< ::google::protobuf::uint8>(241u /* 16369 & 0xFF */)) {
  31026. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  31027. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  31028. 2, 16369u, input, this->mutable_repeated_fixed64())));
  31029. } else if (
  31030. static_cast< ::google::protobuf::uint8>(tag) ==
  31031. static_cast< ::google::protobuf::uint8>(242u /* 16370 & 0xFF */)) {
  31032. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  31033. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
  31034. input, this->mutable_repeated_fixed64())));
  31035. } else {
  31036. goto handle_unusual;
  31037. }
  31038. break;
  31039. }
  31040. // repeated int64 repeated_int64 = 2047;
  31041. case 2047: {
  31042. if (static_cast< ::google::protobuf::uint8>(tag) ==
  31043. static_cast< ::google::protobuf::uint8>(248u /* 16376 & 0xFF */)) {
  31044. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  31045. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  31046. 2, 16376u, input, this->mutable_repeated_int64())));
  31047. } else if (
  31048. static_cast< ::google::protobuf::uint8>(tag) ==
  31049. static_cast< ::google::protobuf::uint8>(250u /* 16378 & 0xFF */)) {
  31050. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  31051. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  31052. input, this->mutable_repeated_int64())));
  31053. } else {
  31054. goto handle_unusual;
  31055. }
  31056. break;
  31057. }
  31058. // repeated float repeated_float = 262142;
  31059. case 262142: {
  31060. if (static_cast< ::google::protobuf::uint8>(tag) ==
  31061. static_cast< ::google::protobuf::uint8>(245u /* 2097141 & 0xFF */)) {
  31062. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  31063. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  31064. 3, 2097141u, input, this->mutable_repeated_float())));
  31065. } else if (
  31066. static_cast< ::google::protobuf::uint8>(tag) ==
  31067. static_cast< ::google::protobuf::uint8>(242u /* 2097138 & 0xFF */)) {
  31068. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  31069. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  31070. input, this->mutable_repeated_float())));
  31071. } else {
  31072. goto handle_unusual;
  31073. }
  31074. break;
  31075. }
  31076. // repeated uint64 repeated_uint64 = 262143;
  31077. case 262143: {
  31078. if (static_cast< ::google::protobuf::uint8>(tag) ==
  31079. static_cast< ::google::protobuf::uint8>(248u /* 2097144 & 0xFF */)) {
  31080. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  31081. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  31082. 3, 2097144u, input, this->mutable_repeated_uint64())));
  31083. } else if (
  31084. static_cast< ::google::protobuf::uint8>(tag) ==
  31085. static_cast< ::google::protobuf::uint8>(250u /* 2097146 & 0xFF */)) {
  31086. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  31087. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  31088. input, this->mutable_repeated_uint64())));
  31089. } else {
  31090. goto handle_unusual;
  31091. }
  31092. break;
  31093. }
  31094. default: {
  31095. handle_unusual:
  31096. if (tag == 0) {
  31097. goto success;
  31098. }
  31099. DO_(::google::protobuf::internal::WireFormat::SkipField(
  31100. input, tag, _internal_metadata_.mutable_unknown_fields()));
  31101. break;
  31102. }
  31103. }
  31104. }
  31105. success:
  31106. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  31107. return true;
  31108. failure:
  31109. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  31110. return false;
  31111. #undef DO_
  31112. }
  31113. void TestRepeatedScalarDifferentTagSizes::SerializeWithCachedSizes(
  31114. ::google::protobuf::io::CodedOutputStream* output) const {
  31115. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  31116. ::google::protobuf::uint32 cached_has_bits = 0;
  31117. (void) cached_has_bits;
  31118. // repeated fixed32 repeated_fixed32 = 12;
  31119. for (int i = 0, n = this->repeated_fixed32_size(); i < n; i++) {
  31120. ::google::protobuf::internal::WireFormatLite::WriteFixed32(
  31121. 12, this->repeated_fixed32(i), output);
  31122. }
  31123. // repeated int32 repeated_int32 = 13;
  31124. for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
  31125. ::google::protobuf::internal::WireFormatLite::WriteInt32(
  31126. 13, this->repeated_int32(i), output);
  31127. }
  31128. // repeated fixed64 repeated_fixed64 = 2046;
  31129. for (int i = 0, n = this->repeated_fixed64_size(); i < n; i++) {
  31130. ::google::protobuf::internal::WireFormatLite::WriteFixed64(
  31131. 2046, this->repeated_fixed64(i), output);
  31132. }
  31133. // repeated int64 repeated_int64 = 2047;
  31134. for (int i = 0, n = this->repeated_int64_size(); i < n; i++) {
  31135. ::google::protobuf::internal::WireFormatLite::WriteInt64(
  31136. 2047, this->repeated_int64(i), output);
  31137. }
  31138. // repeated float repeated_float = 262142;
  31139. for (int i = 0, n = this->repeated_float_size(); i < n; i++) {
  31140. ::google::protobuf::internal::WireFormatLite::WriteFloat(
  31141. 262142, this->repeated_float(i), output);
  31142. }
  31143. // repeated uint64 repeated_uint64 = 262143;
  31144. for (int i = 0, n = this->repeated_uint64_size(); i < n; i++) {
  31145. ::google::protobuf::internal::WireFormatLite::WriteUInt64(
  31146. 262143, this->repeated_uint64(i), output);
  31147. }
  31148. if (_internal_metadata_.have_unknown_fields()) {
  31149. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  31150. _internal_metadata_.unknown_fields(), output);
  31151. }
  31152. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  31153. }
  31154. ::google::protobuf::uint8* TestRepeatedScalarDifferentTagSizes::InternalSerializeWithCachedSizesToArray(
  31155. bool deterministic, ::google::protobuf::uint8* target) const {
  31156. (void)deterministic; // Unused
  31157. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  31158. ::google::protobuf::uint32 cached_has_bits = 0;
  31159. (void) cached_has_bits;
  31160. // repeated fixed32 repeated_fixed32 = 12;
  31161. target = ::google::protobuf::internal::WireFormatLite::
  31162. WriteFixed32ToArray(12, this->repeated_fixed32_, target);
  31163. // repeated int32 repeated_int32 = 13;
  31164. target = ::google::protobuf::internal::WireFormatLite::
  31165. WriteInt32ToArray(13, this->repeated_int32_, target);
  31166. // repeated fixed64 repeated_fixed64 = 2046;
  31167. target = ::google::protobuf::internal::WireFormatLite::
  31168. WriteFixed64ToArray(2046, this->repeated_fixed64_, target);
  31169. // repeated int64 repeated_int64 = 2047;
  31170. target = ::google::protobuf::internal::WireFormatLite::
  31171. WriteInt64ToArray(2047, this->repeated_int64_, target);
  31172. // repeated float repeated_float = 262142;
  31173. target = ::google::protobuf::internal::WireFormatLite::
  31174. WriteFloatToArray(262142, this->repeated_float_, target);
  31175. // repeated uint64 repeated_uint64 = 262143;
  31176. target = ::google::protobuf::internal::WireFormatLite::
  31177. WriteUInt64ToArray(262143, this->repeated_uint64_, target);
  31178. if (_internal_metadata_.have_unknown_fields()) {
  31179. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  31180. _internal_metadata_.unknown_fields(), target);
  31181. }
  31182. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  31183. return target;
  31184. }
  31185. size_t TestRepeatedScalarDifferentTagSizes::ByteSizeLong() const {
  31186. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  31187. size_t total_size = 0;
  31188. if (_internal_metadata_.have_unknown_fields()) {
  31189. total_size +=
  31190. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  31191. _internal_metadata_.unknown_fields());
  31192. }
  31193. // repeated fixed32 repeated_fixed32 = 12;
  31194. {
  31195. unsigned int count = static_cast<unsigned int>(this->repeated_fixed32_size());
  31196. size_t data_size = 4UL * count;
  31197. total_size += 1 *
  31198. ::google::protobuf::internal::FromIntSize(this->repeated_fixed32_size());
  31199. total_size += data_size;
  31200. }
  31201. // repeated int32 repeated_int32 = 13;
  31202. {
  31203. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  31204. Int32Size(this->repeated_int32_);
  31205. total_size += 1 *
  31206. ::google::protobuf::internal::FromIntSize(this->repeated_int32_size());
  31207. total_size += data_size;
  31208. }
  31209. // repeated fixed64 repeated_fixed64 = 2046;
  31210. {
  31211. unsigned int count = static_cast<unsigned int>(this->repeated_fixed64_size());
  31212. size_t data_size = 8UL * count;
  31213. total_size += 2 *
  31214. ::google::protobuf::internal::FromIntSize(this->repeated_fixed64_size());
  31215. total_size += data_size;
  31216. }
  31217. // repeated int64 repeated_int64 = 2047;
  31218. {
  31219. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  31220. Int64Size(this->repeated_int64_);
  31221. total_size += 2 *
  31222. ::google::protobuf::internal::FromIntSize(this->repeated_int64_size());
  31223. total_size += data_size;
  31224. }
  31225. // repeated float repeated_float = 262142;
  31226. {
  31227. unsigned int count = static_cast<unsigned int>(this->repeated_float_size());
  31228. size_t data_size = 4UL * count;
  31229. total_size += 3 *
  31230. ::google::protobuf::internal::FromIntSize(this->repeated_float_size());
  31231. total_size += data_size;
  31232. }
  31233. // repeated uint64 repeated_uint64 = 262143;
  31234. {
  31235. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  31236. UInt64Size(this->repeated_uint64_);
  31237. total_size += 3 *
  31238. ::google::protobuf::internal::FromIntSize(this->repeated_uint64_size());
  31239. total_size += data_size;
  31240. }
  31241. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  31242. SetCachedSize(cached_size);
  31243. return total_size;
  31244. }
  31245. void TestRepeatedScalarDifferentTagSizes::MergeFrom(const ::google::protobuf::Message& from) {
  31246. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  31247. GOOGLE_DCHECK_NE(&from, this);
  31248. const TestRepeatedScalarDifferentTagSizes* source =
  31249. ::google::protobuf::internal::DynamicCastToGenerated<const TestRepeatedScalarDifferentTagSizes>(
  31250. &from);
  31251. if (source == NULL) {
  31252. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  31253. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  31254. } else {
  31255. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  31256. MergeFrom(*source);
  31257. }
  31258. }
  31259. void TestRepeatedScalarDifferentTagSizes::MergeFrom(const TestRepeatedScalarDifferentTagSizes& from) {
  31260. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  31261. GOOGLE_DCHECK_NE(&from, this);
  31262. _internal_metadata_.MergeFrom(from._internal_metadata_);
  31263. ::google::protobuf::uint32 cached_has_bits = 0;
  31264. (void) cached_has_bits;
  31265. repeated_fixed32_.MergeFrom(from.repeated_fixed32_);
  31266. repeated_int32_.MergeFrom(from.repeated_int32_);
  31267. repeated_fixed64_.MergeFrom(from.repeated_fixed64_);
  31268. repeated_int64_.MergeFrom(from.repeated_int64_);
  31269. repeated_float_.MergeFrom(from.repeated_float_);
  31270. repeated_uint64_.MergeFrom(from.repeated_uint64_);
  31271. }
  31272. void TestRepeatedScalarDifferentTagSizes::CopyFrom(const ::google::protobuf::Message& from) {
  31273. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  31274. if (&from == this) return;
  31275. Clear();
  31276. MergeFrom(from);
  31277. }
  31278. void TestRepeatedScalarDifferentTagSizes::CopyFrom(const TestRepeatedScalarDifferentTagSizes& from) {
  31279. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestRepeatedScalarDifferentTagSizes)
  31280. if (&from == this) return;
  31281. Clear();
  31282. MergeFrom(from);
  31283. }
  31284. bool TestRepeatedScalarDifferentTagSizes::IsInitialized() const {
  31285. return true;
  31286. }
  31287. void TestRepeatedScalarDifferentTagSizes::Swap(TestRepeatedScalarDifferentTagSizes* other) {
  31288. if (other == this) return;
  31289. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  31290. InternalSwap(other);
  31291. } else {
  31292. TestRepeatedScalarDifferentTagSizes* temp = New(GetArenaNoVirtual());
  31293. temp->MergeFrom(*other);
  31294. other->CopyFrom(*this);
  31295. InternalSwap(temp);
  31296. if (GetArenaNoVirtual() == NULL) {
  31297. delete temp;
  31298. }
  31299. }
  31300. }
  31301. void TestRepeatedScalarDifferentTagSizes::UnsafeArenaSwap(TestRepeatedScalarDifferentTagSizes* other) {
  31302. if (other == this) return;
  31303. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  31304. InternalSwap(other);
  31305. }
  31306. void TestRepeatedScalarDifferentTagSizes::InternalSwap(TestRepeatedScalarDifferentTagSizes* other) {
  31307. using std::swap;
  31308. repeated_fixed32_.InternalSwap(&other->repeated_fixed32_);
  31309. repeated_int32_.InternalSwap(&other->repeated_int32_);
  31310. repeated_fixed64_.InternalSwap(&other->repeated_fixed64_);
  31311. repeated_int64_.InternalSwap(&other->repeated_int64_);
  31312. repeated_float_.InternalSwap(&other->repeated_float_);
  31313. repeated_uint64_.InternalSwap(&other->repeated_uint64_);
  31314. swap(_has_bits_[0], other->_has_bits_[0]);
  31315. _internal_metadata_.Swap(&other->_internal_metadata_);
  31316. }
  31317. ::google::protobuf::Metadata TestRepeatedScalarDifferentTagSizes::GetMetadata() const {
  31318. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  31319. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  31320. }
  31321. // ===================================================================
  31322. void TestParsingMerge_RepeatedFieldsGenerator_Group1::InitAsDefaultInstance() {
  31323. ::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_Group1_default_instance_._instance.get_mutable()->field1_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
  31324. ::protobuf_unittest::TestAllTypes::internal_default_instance());
  31325. }
  31326. void TestParsingMerge_RepeatedFieldsGenerator_Group1::unsafe_arena_set_allocated_field1(
  31327. ::protobuf_unittest::TestAllTypes* field1) {
  31328. if (GetArenaNoVirtual() == NULL) {
  31329. delete field1_;
  31330. }
  31331. field1_ = field1;
  31332. if (field1) {
  31333. set_has_field1();
  31334. } else {
  31335. clear_has_field1();
  31336. }
  31337. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.field1)
  31338. }
  31339. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  31340. const int TestParsingMerge_RepeatedFieldsGenerator_Group1::kField1FieldNumber;
  31341. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  31342. TestParsingMerge_RepeatedFieldsGenerator_Group1::TestParsingMerge_RepeatedFieldsGenerator_Group1()
  31343. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  31344. ::google::protobuf::internal::InitSCC(
  31345. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group1.base);
  31346. SharedCtor();
  31347. // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31348. }
  31349. TestParsingMerge_RepeatedFieldsGenerator_Group1::TestParsingMerge_RepeatedFieldsGenerator_Group1(::google::protobuf::Arena* arena)
  31350. : ::google::protobuf::Message(),
  31351. _internal_metadata_(arena) {
  31352. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group1.base);
  31353. SharedCtor();
  31354. RegisterArenaDtor(arena);
  31355. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31356. }
  31357. TestParsingMerge_RepeatedFieldsGenerator_Group1::TestParsingMerge_RepeatedFieldsGenerator_Group1(const TestParsingMerge_RepeatedFieldsGenerator_Group1& from)
  31358. : ::google::protobuf::Message(),
  31359. _internal_metadata_(NULL),
  31360. _has_bits_(from._has_bits_) {
  31361. _internal_metadata_.MergeFrom(from._internal_metadata_);
  31362. if (from.has_field1()) {
  31363. field1_ = new ::protobuf_unittest::TestAllTypes(*from.field1_);
  31364. } else {
  31365. field1_ = NULL;
  31366. }
  31367. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31368. }
  31369. void TestParsingMerge_RepeatedFieldsGenerator_Group1::SharedCtor() {
  31370. field1_ = NULL;
  31371. }
  31372. TestParsingMerge_RepeatedFieldsGenerator_Group1::~TestParsingMerge_RepeatedFieldsGenerator_Group1() {
  31373. // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31374. SharedDtor();
  31375. }
  31376. void TestParsingMerge_RepeatedFieldsGenerator_Group1::SharedDtor() {
  31377. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  31378. if (this != internal_default_instance()) delete field1_;
  31379. }
  31380. void TestParsingMerge_RepeatedFieldsGenerator_Group1::ArenaDtor(void* object) {
  31381. TestParsingMerge_RepeatedFieldsGenerator_Group1* _this = reinterpret_cast< TestParsingMerge_RepeatedFieldsGenerator_Group1* >(object);
  31382. (void)_this;
  31383. }
  31384. void TestParsingMerge_RepeatedFieldsGenerator_Group1::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  31385. }
  31386. void TestParsingMerge_RepeatedFieldsGenerator_Group1::SetCachedSize(int size) const {
  31387. _cached_size_.Set(size);
  31388. }
  31389. const ::google::protobuf::Descriptor* TestParsingMerge_RepeatedFieldsGenerator_Group1::descriptor() {
  31390. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  31391. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  31392. }
  31393. const TestParsingMerge_RepeatedFieldsGenerator_Group1& TestParsingMerge_RepeatedFieldsGenerator_Group1::default_instance() {
  31394. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group1.base);
  31395. return *internal_default_instance();
  31396. }
  31397. void TestParsingMerge_RepeatedFieldsGenerator_Group1::Clear() {
  31398. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31399. ::google::protobuf::uint32 cached_has_bits = 0;
  31400. // Prevent compiler warnings about cached_has_bits being unused
  31401. (void) cached_has_bits;
  31402. cached_has_bits = _has_bits_[0];
  31403. if (cached_has_bits & 0x00000001u) {
  31404. GOOGLE_DCHECK(field1_ != NULL);
  31405. field1_->Clear();
  31406. }
  31407. _has_bits_.Clear();
  31408. _internal_metadata_.Clear();
  31409. }
  31410. bool TestParsingMerge_RepeatedFieldsGenerator_Group1::MergePartialFromCodedStream(
  31411. ::google::protobuf::io::CodedInputStream* input) {
  31412. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  31413. ::google::protobuf::uint32 tag;
  31414. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31415. for (;;) {
  31416. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  31417. tag = p.first;
  31418. if (!p.second) goto handle_unusual;
  31419. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  31420. // optional .protobuf_unittest.TestAllTypes field1 = 11;
  31421. case 11: {
  31422. if (static_cast< ::google::protobuf::uint8>(tag) ==
  31423. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  31424. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  31425. input, mutable_field1()));
  31426. } else {
  31427. goto handle_unusual;
  31428. }
  31429. break;
  31430. }
  31431. default: {
  31432. handle_unusual:
  31433. if (tag == 0 ||
  31434. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  31435. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  31436. input->SetLastTag(tag);
  31437. goto success;
  31438. }
  31439. DO_(::google::protobuf::internal::WireFormat::SkipField(
  31440. input, tag, _internal_metadata_.mutable_unknown_fields()));
  31441. break;
  31442. }
  31443. }
  31444. }
  31445. success:
  31446. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31447. return true;
  31448. failure:
  31449. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31450. return false;
  31451. #undef DO_
  31452. }
  31453. void TestParsingMerge_RepeatedFieldsGenerator_Group1::SerializeWithCachedSizes(
  31454. ::google::protobuf::io::CodedOutputStream* output) const {
  31455. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31456. ::google::protobuf::uint32 cached_has_bits = 0;
  31457. (void) cached_has_bits;
  31458. cached_has_bits = _has_bits_[0];
  31459. // optional .protobuf_unittest.TestAllTypes field1 = 11;
  31460. if (cached_has_bits & 0x00000001u) {
  31461. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  31462. 11, this->_internal_field1(), output);
  31463. }
  31464. if (_internal_metadata_.have_unknown_fields()) {
  31465. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  31466. _internal_metadata_.unknown_fields(), output);
  31467. }
  31468. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31469. }
  31470. ::google::protobuf::uint8* TestParsingMerge_RepeatedFieldsGenerator_Group1::InternalSerializeWithCachedSizesToArray(
  31471. bool deterministic, ::google::protobuf::uint8* target) const {
  31472. (void)deterministic; // Unused
  31473. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31474. ::google::protobuf::uint32 cached_has_bits = 0;
  31475. (void) cached_has_bits;
  31476. cached_has_bits = _has_bits_[0];
  31477. // optional .protobuf_unittest.TestAllTypes field1 = 11;
  31478. if (cached_has_bits & 0x00000001u) {
  31479. target = ::google::protobuf::internal::WireFormatLite::
  31480. InternalWriteMessageToArray(
  31481. 11, this->_internal_field1(), deterministic, target);
  31482. }
  31483. if (_internal_metadata_.have_unknown_fields()) {
  31484. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  31485. _internal_metadata_.unknown_fields(), target);
  31486. }
  31487. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31488. return target;
  31489. }
  31490. size_t TestParsingMerge_RepeatedFieldsGenerator_Group1::ByteSizeLong() const {
  31491. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31492. size_t total_size = 0;
  31493. if (_internal_metadata_.have_unknown_fields()) {
  31494. total_size +=
  31495. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  31496. _internal_metadata_.unknown_fields());
  31497. }
  31498. // optional .protobuf_unittest.TestAllTypes field1 = 11;
  31499. if (has_field1()) {
  31500. total_size += 1 +
  31501. ::google::protobuf::internal::WireFormatLite::MessageSize(
  31502. *field1_);
  31503. }
  31504. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  31505. SetCachedSize(cached_size);
  31506. return total_size;
  31507. }
  31508. void TestParsingMerge_RepeatedFieldsGenerator_Group1::MergeFrom(const ::google::protobuf::Message& from) {
  31509. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31510. GOOGLE_DCHECK_NE(&from, this);
  31511. const TestParsingMerge_RepeatedFieldsGenerator_Group1* source =
  31512. ::google::protobuf::internal::DynamicCastToGenerated<const TestParsingMerge_RepeatedFieldsGenerator_Group1>(
  31513. &from);
  31514. if (source == NULL) {
  31515. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31516. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  31517. } else {
  31518. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31519. MergeFrom(*source);
  31520. }
  31521. }
  31522. void TestParsingMerge_RepeatedFieldsGenerator_Group1::MergeFrom(const TestParsingMerge_RepeatedFieldsGenerator_Group1& from) {
  31523. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31524. GOOGLE_DCHECK_NE(&from, this);
  31525. _internal_metadata_.MergeFrom(from._internal_metadata_);
  31526. ::google::protobuf::uint32 cached_has_bits = 0;
  31527. (void) cached_has_bits;
  31528. if (from.has_field1()) {
  31529. mutable_field1()->::protobuf_unittest::TestAllTypes::MergeFrom(from.field1());
  31530. }
  31531. }
  31532. void TestParsingMerge_RepeatedFieldsGenerator_Group1::CopyFrom(const ::google::protobuf::Message& from) {
  31533. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31534. if (&from == this) return;
  31535. Clear();
  31536. MergeFrom(from);
  31537. }
  31538. void TestParsingMerge_RepeatedFieldsGenerator_Group1::CopyFrom(const TestParsingMerge_RepeatedFieldsGenerator_Group1& from) {
  31539. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group1)
  31540. if (&from == this) return;
  31541. Clear();
  31542. MergeFrom(from);
  31543. }
  31544. bool TestParsingMerge_RepeatedFieldsGenerator_Group1::IsInitialized() const {
  31545. return true;
  31546. }
  31547. void TestParsingMerge_RepeatedFieldsGenerator_Group1::Swap(TestParsingMerge_RepeatedFieldsGenerator_Group1* other) {
  31548. if (other == this) return;
  31549. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  31550. InternalSwap(other);
  31551. } else {
  31552. TestParsingMerge_RepeatedFieldsGenerator_Group1* temp = New(GetArenaNoVirtual());
  31553. temp->MergeFrom(*other);
  31554. other->CopyFrom(*this);
  31555. InternalSwap(temp);
  31556. if (GetArenaNoVirtual() == NULL) {
  31557. delete temp;
  31558. }
  31559. }
  31560. }
  31561. void TestParsingMerge_RepeatedFieldsGenerator_Group1::UnsafeArenaSwap(TestParsingMerge_RepeatedFieldsGenerator_Group1* other) {
  31562. if (other == this) return;
  31563. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  31564. InternalSwap(other);
  31565. }
  31566. void TestParsingMerge_RepeatedFieldsGenerator_Group1::InternalSwap(TestParsingMerge_RepeatedFieldsGenerator_Group1* other) {
  31567. using std::swap;
  31568. swap(field1_, other->field1_);
  31569. swap(_has_bits_[0], other->_has_bits_[0]);
  31570. _internal_metadata_.Swap(&other->_internal_metadata_);
  31571. }
  31572. ::google::protobuf::Metadata TestParsingMerge_RepeatedFieldsGenerator_Group1::GetMetadata() const {
  31573. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  31574. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  31575. }
  31576. // ===================================================================
  31577. void TestParsingMerge_RepeatedFieldsGenerator_Group2::InitAsDefaultInstance() {
  31578. ::protobuf_unittest::_TestParsingMerge_RepeatedFieldsGenerator_Group2_default_instance_._instance.get_mutable()->field1_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
  31579. ::protobuf_unittest::TestAllTypes::internal_default_instance());
  31580. }
  31581. void TestParsingMerge_RepeatedFieldsGenerator_Group2::unsafe_arena_set_allocated_field1(
  31582. ::protobuf_unittest::TestAllTypes* field1) {
  31583. if (GetArenaNoVirtual() == NULL) {
  31584. delete field1_;
  31585. }
  31586. field1_ = field1;
  31587. if (field1) {
  31588. set_has_field1();
  31589. } else {
  31590. clear_has_field1();
  31591. }
  31592. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.field1)
  31593. }
  31594. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  31595. const int TestParsingMerge_RepeatedFieldsGenerator_Group2::kField1FieldNumber;
  31596. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  31597. TestParsingMerge_RepeatedFieldsGenerator_Group2::TestParsingMerge_RepeatedFieldsGenerator_Group2()
  31598. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  31599. ::google::protobuf::internal::InitSCC(
  31600. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group2.base);
  31601. SharedCtor();
  31602. // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31603. }
  31604. TestParsingMerge_RepeatedFieldsGenerator_Group2::TestParsingMerge_RepeatedFieldsGenerator_Group2(::google::protobuf::Arena* arena)
  31605. : ::google::protobuf::Message(),
  31606. _internal_metadata_(arena) {
  31607. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group2.base);
  31608. SharedCtor();
  31609. RegisterArenaDtor(arena);
  31610. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31611. }
  31612. TestParsingMerge_RepeatedFieldsGenerator_Group2::TestParsingMerge_RepeatedFieldsGenerator_Group2(const TestParsingMerge_RepeatedFieldsGenerator_Group2& from)
  31613. : ::google::protobuf::Message(),
  31614. _internal_metadata_(NULL),
  31615. _has_bits_(from._has_bits_) {
  31616. _internal_metadata_.MergeFrom(from._internal_metadata_);
  31617. if (from.has_field1()) {
  31618. field1_ = new ::protobuf_unittest::TestAllTypes(*from.field1_);
  31619. } else {
  31620. field1_ = NULL;
  31621. }
  31622. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31623. }
  31624. void TestParsingMerge_RepeatedFieldsGenerator_Group2::SharedCtor() {
  31625. field1_ = NULL;
  31626. }
  31627. TestParsingMerge_RepeatedFieldsGenerator_Group2::~TestParsingMerge_RepeatedFieldsGenerator_Group2() {
  31628. // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31629. SharedDtor();
  31630. }
  31631. void TestParsingMerge_RepeatedFieldsGenerator_Group2::SharedDtor() {
  31632. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  31633. if (this != internal_default_instance()) delete field1_;
  31634. }
  31635. void TestParsingMerge_RepeatedFieldsGenerator_Group2::ArenaDtor(void* object) {
  31636. TestParsingMerge_RepeatedFieldsGenerator_Group2* _this = reinterpret_cast< TestParsingMerge_RepeatedFieldsGenerator_Group2* >(object);
  31637. (void)_this;
  31638. }
  31639. void TestParsingMerge_RepeatedFieldsGenerator_Group2::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  31640. }
  31641. void TestParsingMerge_RepeatedFieldsGenerator_Group2::SetCachedSize(int size) const {
  31642. _cached_size_.Set(size);
  31643. }
  31644. const ::google::protobuf::Descriptor* TestParsingMerge_RepeatedFieldsGenerator_Group2::descriptor() {
  31645. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  31646. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  31647. }
  31648. const TestParsingMerge_RepeatedFieldsGenerator_Group2& TestParsingMerge_RepeatedFieldsGenerator_Group2::default_instance() {
  31649. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator_Group2.base);
  31650. return *internal_default_instance();
  31651. }
  31652. void TestParsingMerge_RepeatedFieldsGenerator_Group2::Clear() {
  31653. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31654. ::google::protobuf::uint32 cached_has_bits = 0;
  31655. // Prevent compiler warnings about cached_has_bits being unused
  31656. (void) cached_has_bits;
  31657. cached_has_bits = _has_bits_[0];
  31658. if (cached_has_bits & 0x00000001u) {
  31659. GOOGLE_DCHECK(field1_ != NULL);
  31660. field1_->Clear();
  31661. }
  31662. _has_bits_.Clear();
  31663. _internal_metadata_.Clear();
  31664. }
  31665. bool TestParsingMerge_RepeatedFieldsGenerator_Group2::MergePartialFromCodedStream(
  31666. ::google::protobuf::io::CodedInputStream* input) {
  31667. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  31668. ::google::protobuf::uint32 tag;
  31669. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31670. for (;;) {
  31671. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  31672. tag = p.first;
  31673. if (!p.second) goto handle_unusual;
  31674. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  31675. // optional .protobuf_unittest.TestAllTypes field1 = 21;
  31676. case 21: {
  31677. if (static_cast< ::google::protobuf::uint8>(tag) ==
  31678. static_cast< ::google::protobuf::uint8>(170u /* 170 & 0xFF */)) {
  31679. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  31680. input, mutable_field1()));
  31681. } else {
  31682. goto handle_unusual;
  31683. }
  31684. break;
  31685. }
  31686. default: {
  31687. handle_unusual:
  31688. if (tag == 0 ||
  31689. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  31690. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  31691. input->SetLastTag(tag);
  31692. goto success;
  31693. }
  31694. DO_(::google::protobuf::internal::WireFormat::SkipField(
  31695. input, tag, _internal_metadata_.mutable_unknown_fields()));
  31696. break;
  31697. }
  31698. }
  31699. }
  31700. success:
  31701. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31702. return true;
  31703. failure:
  31704. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31705. return false;
  31706. #undef DO_
  31707. }
  31708. void TestParsingMerge_RepeatedFieldsGenerator_Group2::SerializeWithCachedSizes(
  31709. ::google::protobuf::io::CodedOutputStream* output) const {
  31710. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31711. ::google::protobuf::uint32 cached_has_bits = 0;
  31712. (void) cached_has_bits;
  31713. cached_has_bits = _has_bits_[0];
  31714. // optional .protobuf_unittest.TestAllTypes field1 = 21;
  31715. if (cached_has_bits & 0x00000001u) {
  31716. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  31717. 21, this->_internal_field1(), output);
  31718. }
  31719. if (_internal_metadata_.have_unknown_fields()) {
  31720. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  31721. _internal_metadata_.unknown_fields(), output);
  31722. }
  31723. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31724. }
  31725. ::google::protobuf::uint8* TestParsingMerge_RepeatedFieldsGenerator_Group2::InternalSerializeWithCachedSizesToArray(
  31726. bool deterministic, ::google::protobuf::uint8* target) const {
  31727. (void)deterministic; // Unused
  31728. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31729. ::google::protobuf::uint32 cached_has_bits = 0;
  31730. (void) cached_has_bits;
  31731. cached_has_bits = _has_bits_[0];
  31732. // optional .protobuf_unittest.TestAllTypes field1 = 21;
  31733. if (cached_has_bits & 0x00000001u) {
  31734. target = ::google::protobuf::internal::WireFormatLite::
  31735. InternalWriteMessageToArray(
  31736. 21, this->_internal_field1(), deterministic, target);
  31737. }
  31738. if (_internal_metadata_.have_unknown_fields()) {
  31739. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  31740. _internal_metadata_.unknown_fields(), target);
  31741. }
  31742. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31743. return target;
  31744. }
  31745. size_t TestParsingMerge_RepeatedFieldsGenerator_Group2::ByteSizeLong() const {
  31746. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31747. size_t total_size = 0;
  31748. if (_internal_metadata_.have_unknown_fields()) {
  31749. total_size +=
  31750. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  31751. _internal_metadata_.unknown_fields());
  31752. }
  31753. // optional .protobuf_unittest.TestAllTypes field1 = 21;
  31754. if (has_field1()) {
  31755. total_size += 2 +
  31756. ::google::protobuf::internal::WireFormatLite::MessageSize(
  31757. *field1_);
  31758. }
  31759. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  31760. SetCachedSize(cached_size);
  31761. return total_size;
  31762. }
  31763. void TestParsingMerge_RepeatedFieldsGenerator_Group2::MergeFrom(const ::google::protobuf::Message& from) {
  31764. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31765. GOOGLE_DCHECK_NE(&from, this);
  31766. const TestParsingMerge_RepeatedFieldsGenerator_Group2* source =
  31767. ::google::protobuf::internal::DynamicCastToGenerated<const TestParsingMerge_RepeatedFieldsGenerator_Group2>(
  31768. &from);
  31769. if (source == NULL) {
  31770. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31771. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  31772. } else {
  31773. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31774. MergeFrom(*source);
  31775. }
  31776. }
  31777. void TestParsingMerge_RepeatedFieldsGenerator_Group2::MergeFrom(const TestParsingMerge_RepeatedFieldsGenerator_Group2& from) {
  31778. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31779. GOOGLE_DCHECK_NE(&from, this);
  31780. _internal_metadata_.MergeFrom(from._internal_metadata_);
  31781. ::google::protobuf::uint32 cached_has_bits = 0;
  31782. (void) cached_has_bits;
  31783. if (from.has_field1()) {
  31784. mutable_field1()->::protobuf_unittest::TestAllTypes::MergeFrom(from.field1());
  31785. }
  31786. }
  31787. void TestParsingMerge_RepeatedFieldsGenerator_Group2::CopyFrom(const ::google::protobuf::Message& from) {
  31788. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31789. if (&from == this) return;
  31790. Clear();
  31791. MergeFrom(from);
  31792. }
  31793. void TestParsingMerge_RepeatedFieldsGenerator_Group2::CopyFrom(const TestParsingMerge_RepeatedFieldsGenerator_Group2& from) {
  31794. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator.Group2)
  31795. if (&from == this) return;
  31796. Clear();
  31797. MergeFrom(from);
  31798. }
  31799. bool TestParsingMerge_RepeatedFieldsGenerator_Group2::IsInitialized() const {
  31800. return true;
  31801. }
  31802. void TestParsingMerge_RepeatedFieldsGenerator_Group2::Swap(TestParsingMerge_RepeatedFieldsGenerator_Group2* other) {
  31803. if (other == this) return;
  31804. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  31805. InternalSwap(other);
  31806. } else {
  31807. TestParsingMerge_RepeatedFieldsGenerator_Group2* temp = New(GetArenaNoVirtual());
  31808. temp->MergeFrom(*other);
  31809. other->CopyFrom(*this);
  31810. InternalSwap(temp);
  31811. if (GetArenaNoVirtual() == NULL) {
  31812. delete temp;
  31813. }
  31814. }
  31815. }
  31816. void TestParsingMerge_RepeatedFieldsGenerator_Group2::UnsafeArenaSwap(TestParsingMerge_RepeatedFieldsGenerator_Group2* other) {
  31817. if (other == this) return;
  31818. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  31819. InternalSwap(other);
  31820. }
  31821. void TestParsingMerge_RepeatedFieldsGenerator_Group2::InternalSwap(TestParsingMerge_RepeatedFieldsGenerator_Group2* other) {
  31822. using std::swap;
  31823. swap(field1_, other->field1_);
  31824. swap(_has_bits_[0], other->_has_bits_[0]);
  31825. _internal_metadata_.Swap(&other->_internal_metadata_);
  31826. }
  31827. ::google::protobuf::Metadata TestParsingMerge_RepeatedFieldsGenerator_Group2::GetMetadata() const {
  31828. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  31829. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  31830. }
  31831. // ===================================================================
  31832. void TestParsingMerge_RepeatedFieldsGenerator::InitAsDefaultInstance() {
  31833. }
  31834. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  31835. const int TestParsingMerge_RepeatedFieldsGenerator::kField1FieldNumber;
  31836. const int TestParsingMerge_RepeatedFieldsGenerator::kField2FieldNumber;
  31837. const int TestParsingMerge_RepeatedFieldsGenerator::kField3FieldNumber;
  31838. const int TestParsingMerge_RepeatedFieldsGenerator::kGroup1FieldNumber;
  31839. const int TestParsingMerge_RepeatedFieldsGenerator::kGroup2FieldNumber;
  31840. const int TestParsingMerge_RepeatedFieldsGenerator::kExt1FieldNumber;
  31841. const int TestParsingMerge_RepeatedFieldsGenerator::kExt2FieldNumber;
  31842. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  31843. TestParsingMerge_RepeatedFieldsGenerator::TestParsingMerge_RepeatedFieldsGenerator()
  31844. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  31845. ::google::protobuf::internal::InitSCC(
  31846. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator.base);
  31847. SharedCtor();
  31848. // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  31849. }
  31850. TestParsingMerge_RepeatedFieldsGenerator::TestParsingMerge_RepeatedFieldsGenerator(::google::protobuf::Arena* arena)
  31851. : ::google::protobuf::Message(),
  31852. _internal_metadata_(arena),
  31853. field1_(arena),
  31854. field2_(arena),
  31855. field3_(arena),
  31856. group1_(arena),
  31857. group2_(arena),
  31858. ext1_(arena),
  31859. ext2_(arena) {
  31860. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator.base);
  31861. SharedCtor();
  31862. RegisterArenaDtor(arena);
  31863. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  31864. }
  31865. TestParsingMerge_RepeatedFieldsGenerator::TestParsingMerge_RepeatedFieldsGenerator(const TestParsingMerge_RepeatedFieldsGenerator& from)
  31866. : ::google::protobuf::Message(),
  31867. _internal_metadata_(NULL),
  31868. _has_bits_(from._has_bits_),
  31869. field1_(from.field1_),
  31870. field2_(from.field2_),
  31871. field3_(from.field3_),
  31872. group1_(from.group1_),
  31873. group2_(from.group2_),
  31874. ext1_(from.ext1_),
  31875. ext2_(from.ext2_) {
  31876. _internal_metadata_.MergeFrom(from._internal_metadata_);
  31877. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  31878. }
  31879. void TestParsingMerge_RepeatedFieldsGenerator::SharedCtor() {
  31880. }
  31881. TestParsingMerge_RepeatedFieldsGenerator::~TestParsingMerge_RepeatedFieldsGenerator() {
  31882. // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  31883. SharedDtor();
  31884. }
  31885. void TestParsingMerge_RepeatedFieldsGenerator::SharedDtor() {
  31886. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  31887. }
  31888. void TestParsingMerge_RepeatedFieldsGenerator::ArenaDtor(void* object) {
  31889. TestParsingMerge_RepeatedFieldsGenerator* _this = reinterpret_cast< TestParsingMerge_RepeatedFieldsGenerator* >(object);
  31890. (void)_this;
  31891. }
  31892. void TestParsingMerge_RepeatedFieldsGenerator::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  31893. }
  31894. void TestParsingMerge_RepeatedFieldsGenerator::SetCachedSize(int size) const {
  31895. _cached_size_.Set(size);
  31896. }
  31897. const ::google::protobuf::Descriptor* TestParsingMerge_RepeatedFieldsGenerator::descriptor() {
  31898. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  31899. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  31900. }
  31901. const TestParsingMerge_RepeatedFieldsGenerator& TestParsingMerge_RepeatedFieldsGenerator::default_instance() {
  31902. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedFieldsGenerator.base);
  31903. return *internal_default_instance();
  31904. }
  31905. void TestParsingMerge_RepeatedFieldsGenerator::Clear() {
  31906. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  31907. ::google::protobuf::uint32 cached_has_bits = 0;
  31908. // Prevent compiler warnings about cached_has_bits being unused
  31909. (void) cached_has_bits;
  31910. field1_.Clear();
  31911. field2_.Clear();
  31912. field3_.Clear();
  31913. group1_.Clear();
  31914. group2_.Clear();
  31915. ext1_.Clear();
  31916. ext2_.Clear();
  31917. _has_bits_.Clear();
  31918. _internal_metadata_.Clear();
  31919. }
  31920. bool TestParsingMerge_RepeatedFieldsGenerator::MergePartialFromCodedStream(
  31921. ::google::protobuf::io::CodedInputStream* input) {
  31922. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  31923. ::google::protobuf::uint32 tag;
  31924. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  31925. for (;;) {
  31926. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  31927. tag = p.first;
  31928. if (!p.second) goto handle_unusual;
  31929. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  31930. // repeated .protobuf_unittest.TestAllTypes field1 = 1;
  31931. case 1: {
  31932. if (static_cast< ::google::protobuf::uint8>(tag) ==
  31933. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  31934. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  31935. input, add_field1()));
  31936. } else {
  31937. goto handle_unusual;
  31938. }
  31939. break;
  31940. }
  31941. // repeated .protobuf_unittest.TestAllTypes field2 = 2;
  31942. case 2: {
  31943. if (static_cast< ::google::protobuf::uint8>(tag) ==
  31944. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  31945. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  31946. input, add_field2()));
  31947. } else {
  31948. goto handle_unusual;
  31949. }
  31950. break;
  31951. }
  31952. // repeated .protobuf_unittest.TestAllTypes field3 = 3;
  31953. case 3: {
  31954. if (static_cast< ::google::protobuf::uint8>(tag) ==
  31955. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  31956. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  31957. input, add_field3()));
  31958. } else {
  31959. goto handle_unusual;
  31960. }
  31961. break;
  31962. }
  31963. // repeated group Group1 = 10 { ... };
  31964. case 10: {
  31965. if (static_cast< ::google::protobuf::uint8>(tag) ==
  31966. static_cast< ::google::protobuf::uint8>(83u /* 83 & 0xFF */)) {
  31967. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(10, input, add_group1()));
  31968. } else {
  31969. goto handle_unusual;
  31970. }
  31971. break;
  31972. }
  31973. // repeated group Group2 = 20 { ... };
  31974. case 20: {
  31975. if (static_cast< ::google::protobuf::uint8>(tag) ==
  31976. static_cast< ::google::protobuf::uint8>(163u /* 163 & 0xFF */)) {
  31977. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(20, input, add_group2()));
  31978. } else {
  31979. goto handle_unusual;
  31980. }
  31981. break;
  31982. }
  31983. // repeated .protobuf_unittest.TestAllTypes ext1 = 1000;
  31984. case 1000: {
  31985. if (static_cast< ::google::protobuf::uint8>(tag) ==
  31986. static_cast< ::google::protobuf::uint8>(66u /* 8002 & 0xFF */)) {
  31987. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  31988. input, add_ext1()));
  31989. } else {
  31990. goto handle_unusual;
  31991. }
  31992. break;
  31993. }
  31994. // repeated .protobuf_unittest.TestAllTypes ext2 = 1001;
  31995. case 1001: {
  31996. if (static_cast< ::google::protobuf::uint8>(tag) ==
  31997. static_cast< ::google::protobuf::uint8>(74u /* 8010 & 0xFF */)) {
  31998. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  31999. input, add_ext2()));
  32000. } else {
  32001. goto handle_unusual;
  32002. }
  32003. break;
  32004. }
  32005. default: {
  32006. handle_unusual:
  32007. if (tag == 0) {
  32008. goto success;
  32009. }
  32010. DO_(::google::protobuf::internal::WireFormat::SkipField(
  32011. input, tag, _internal_metadata_.mutable_unknown_fields()));
  32012. break;
  32013. }
  32014. }
  32015. }
  32016. success:
  32017. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  32018. return true;
  32019. failure:
  32020. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  32021. return false;
  32022. #undef DO_
  32023. }
  32024. void TestParsingMerge_RepeatedFieldsGenerator::SerializeWithCachedSizes(
  32025. ::google::protobuf::io::CodedOutputStream* output) const {
  32026. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  32027. ::google::protobuf::uint32 cached_has_bits = 0;
  32028. (void) cached_has_bits;
  32029. // repeated .protobuf_unittest.TestAllTypes field1 = 1;
  32030. for (unsigned int i = 0,
  32031. n = static_cast<unsigned int>(this->field1_size()); i < n; i++) {
  32032. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  32033. 1,
  32034. this->field1(static_cast<int>(i)),
  32035. output);
  32036. }
  32037. // repeated .protobuf_unittest.TestAllTypes field2 = 2;
  32038. for (unsigned int i = 0,
  32039. n = static_cast<unsigned int>(this->field2_size()); i < n; i++) {
  32040. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  32041. 2,
  32042. this->field2(static_cast<int>(i)),
  32043. output);
  32044. }
  32045. // repeated .protobuf_unittest.TestAllTypes field3 = 3;
  32046. for (unsigned int i = 0,
  32047. n = static_cast<unsigned int>(this->field3_size()); i < n; i++) {
  32048. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  32049. 3,
  32050. this->field3(static_cast<int>(i)),
  32051. output);
  32052. }
  32053. // repeated group Group1 = 10 { ... };
  32054. for (unsigned int i = 0,
  32055. n = static_cast<unsigned int>(this->group1_size()); i < n; i++) {
  32056. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  32057. 10,
  32058. this->group1(static_cast<int>(i)),
  32059. output);
  32060. }
  32061. // repeated group Group2 = 20 { ... };
  32062. for (unsigned int i = 0,
  32063. n = static_cast<unsigned int>(this->group2_size()); i < n; i++) {
  32064. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  32065. 20,
  32066. this->group2(static_cast<int>(i)),
  32067. output);
  32068. }
  32069. // repeated .protobuf_unittest.TestAllTypes ext1 = 1000;
  32070. for (unsigned int i = 0,
  32071. n = static_cast<unsigned int>(this->ext1_size()); i < n; i++) {
  32072. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  32073. 1000,
  32074. this->ext1(static_cast<int>(i)),
  32075. output);
  32076. }
  32077. // repeated .protobuf_unittest.TestAllTypes ext2 = 1001;
  32078. for (unsigned int i = 0,
  32079. n = static_cast<unsigned int>(this->ext2_size()); i < n; i++) {
  32080. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  32081. 1001,
  32082. this->ext2(static_cast<int>(i)),
  32083. output);
  32084. }
  32085. if (_internal_metadata_.have_unknown_fields()) {
  32086. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  32087. _internal_metadata_.unknown_fields(), output);
  32088. }
  32089. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  32090. }
  32091. ::google::protobuf::uint8* TestParsingMerge_RepeatedFieldsGenerator::InternalSerializeWithCachedSizesToArray(
  32092. bool deterministic, ::google::protobuf::uint8* target) const {
  32093. (void)deterministic; // Unused
  32094. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  32095. ::google::protobuf::uint32 cached_has_bits = 0;
  32096. (void) cached_has_bits;
  32097. // repeated .protobuf_unittest.TestAllTypes field1 = 1;
  32098. for (unsigned int i = 0,
  32099. n = static_cast<unsigned int>(this->field1_size()); i < n; i++) {
  32100. target = ::google::protobuf::internal::WireFormatLite::
  32101. InternalWriteMessageToArray(
  32102. 1, this->field1(static_cast<int>(i)), deterministic, target);
  32103. }
  32104. // repeated .protobuf_unittest.TestAllTypes field2 = 2;
  32105. for (unsigned int i = 0,
  32106. n = static_cast<unsigned int>(this->field2_size()); i < n; i++) {
  32107. target = ::google::protobuf::internal::WireFormatLite::
  32108. InternalWriteMessageToArray(
  32109. 2, this->field2(static_cast<int>(i)), deterministic, target);
  32110. }
  32111. // repeated .protobuf_unittest.TestAllTypes field3 = 3;
  32112. for (unsigned int i = 0,
  32113. n = static_cast<unsigned int>(this->field3_size()); i < n; i++) {
  32114. target = ::google::protobuf::internal::WireFormatLite::
  32115. InternalWriteMessageToArray(
  32116. 3, this->field3(static_cast<int>(i)), deterministic, target);
  32117. }
  32118. // repeated group Group1 = 10 { ... };
  32119. for (unsigned int i = 0,
  32120. n = static_cast<unsigned int>(this->group1_size()); i < n; i++) {
  32121. target = ::google::protobuf::internal::WireFormatLite::
  32122. InternalWriteGroupToArray(
  32123. 10, this->group1(static_cast<int>(i)), deterministic, target);
  32124. }
  32125. // repeated group Group2 = 20 { ... };
  32126. for (unsigned int i = 0,
  32127. n = static_cast<unsigned int>(this->group2_size()); i < n; i++) {
  32128. target = ::google::protobuf::internal::WireFormatLite::
  32129. InternalWriteGroupToArray(
  32130. 20, this->group2(static_cast<int>(i)), deterministic, target);
  32131. }
  32132. // repeated .protobuf_unittest.TestAllTypes ext1 = 1000;
  32133. for (unsigned int i = 0,
  32134. n = static_cast<unsigned int>(this->ext1_size()); i < n; i++) {
  32135. target = ::google::protobuf::internal::WireFormatLite::
  32136. InternalWriteMessageToArray(
  32137. 1000, this->ext1(static_cast<int>(i)), deterministic, target);
  32138. }
  32139. // repeated .protobuf_unittest.TestAllTypes ext2 = 1001;
  32140. for (unsigned int i = 0,
  32141. n = static_cast<unsigned int>(this->ext2_size()); i < n; i++) {
  32142. target = ::google::protobuf::internal::WireFormatLite::
  32143. InternalWriteMessageToArray(
  32144. 1001, this->ext2(static_cast<int>(i)), deterministic, target);
  32145. }
  32146. if (_internal_metadata_.have_unknown_fields()) {
  32147. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  32148. _internal_metadata_.unknown_fields(), target);
  32149. }
  32150. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  32151. return target;
  32152. }
  32153. size_t TestParsingMerge_RepeatedFieldsGenerator::ByteSizeLong() const {
  32154. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  32155. size_t total_size = 0;
  32156. if (_internal_metadata_.have_unknown_fields()) {
  32157. total_size +=
  32158. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  32159. _internal_metadata_.unknown_fields());
  32160. }
  32161. // repeated .protobuf_unittest.TestAllTypes field1 = 1;
  32162. {
  32163. unsigned int count = static_cast<unsigned int>(this->field1_size());
  32164. total_size += 1UL * count;
  32165. for (unsigned int i = 0; i < count; i++) {
  32166. total_size +=
  32167. ::google::protobuf::internal::WireFormatLite::MessageSize(
  32168. this->field1(static_cast<int>(i)));
  32169. }
  32170. }
  32171. // repeated .protobuf_unittest.TestAllTypes field2 = 2;
  32172. {
  32173. unsigned int count = static_cast<unsigned int>(this->field2_size());
  32174. total_size += 1UL * count;
  32175. for (unsigned int i = 0; i < count; i++) {
  32176. total_size +=
  32177. ::google::protobuf::internal::WireFormatLite::MessageSize(
  32178. this->field2(static_cast<int>(i)));
  32179. }
  32180. }
  32181. // repeated .protobuf_unittest.TestAllTypes field3 = 3;
  32182. {
  32183. unsigned int count = static_cast<unsigned int>(this->field3_size());
  32184. total_size += 1UL * count;
  32185. for (unsigned int i = 0; i < count; i++) {
  32186. total_size +=
  32187. ::google::protobuf::internal::WireFormatLite::MessageSize(
  32188. this->field3(static_cast<int>(i)));
  32189. }
  32190. }
  32191. // repeated group Group1 = 10 { ... };
  32192. {
  32193. unsigned int count = static_cast<unsigned int>(this->group1_size());
  32194. total_size += 2UL * count;
  32195. for (unsigned int i = 0; i < count; i++) {
  32196. total_size +=
  32197. ::google::protobuf::internal::WireFormatLite::GroupSize(
  32198. this->group1(static_cast<int>(i)));
  32199. }
  32200. }
  32201. // repeated group Group2 = 20 { ... };
  32202. {
  32203. unsigned int count = static_cast<unsigned int>(this->group2_size());
  32204. total_size += 4UL * count;
  32205. for (unsigned int i = 0; i < count; i++) {
  32206. total_size +=
  32207. ::google::protobuf::internal::WireFormatLite::GroupSize(
  32208. this->group2(static_cast<int>(i)));
  32209. }
  32210. }
  32211. // repeated .protobuf_unittest.TestAllTypes ext1 = 1000;
  32212. {
  32213. unsigned int count = static_cast<unsigned int>(this->ext1_size());
  32214. total_size += 2UL * count;
  32215. for (unsigned int i = 0; i < count; i++) {
  32216. total_size +=
  32217. ::google::protobuf::internal::WireFormatLite::MessageSize(
  32218. this->ext1(static_cast<int>(i)));
  32219. }
  32220. }
  32221. // repeated .protobuf_unittest.TestAllTypes ext2 = 1001;
  32222. {
  32223. unsigned int count = static_cast<unsigned int>(this->ext2_size());
  32224. total_size += 2UL * count;
  32225. for (unsigned int i = 0; i < count; i++) {
  32226. total_size +=
  32227. ::google::protobuf::internal::WireFormatLite::MessageSize(
  32228. this->ext2(static_cast<int>(i)));
  32229. }
  32230. }
  32231. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  32232. SetCachedSize(cached_size);
  32233. return total_size;
  32234. }
  32235. void TestParsingMerge_RepeatedFieldsGenerator::MergeFrom(const ::google::protobuf::Message& from) {
  32236. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  32237. GOOGLE_DCHECK_NE(&from, this);
  32238. const TestParsingMerge_RepeatedFieldsGenerator* source =
  32239. ::google::protobuf::internal::DynamicCastToGenerated<const TestParsingMerge_RepeatedFieldsGenerator>(
  32240. &from);
  32241. if (source == NULL) {
  32242. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  32243. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  32244. } else {
  32245. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  32246. MergeFrom(*source);
  32247. }
  32248. }
  32249. void TestParsingMerge_RepeatedFieldsGenerator::MergeFrom(const TestParsingMerge_RepeatedFieldsGenerator& from) {
  32250. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  32251. GOOGLE_DCHECK_NE(&from, this);
  32252. _internal_metadata_.MergeFrom(from._internal_metadata_);
  32253. ::google::protobuf::uint32 cached_has_bits = 0;
  32254. (void) cached_has_bits;
  32255. field1_.MergeFrom(from.field1_);
  32256. field2_.MergeFrom(from.field2_);
  32257. field3_.MergeFrom(from.field3_);
  32258. group1_.MergeFrom(from.group1_);
  32259. group2_.MergeFrom(from.group2_);
  32260. ext1_.MergeFrom(from.ext1_);
  32261. ext2_.MergeFrom(from.ext2_);
  32262. }
  32263. void TestParsingMerge_RepeatedFieldsGenerator::CopyFrom(const ::google::protobuf::Message& from) {
  32264. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  32265. if (&from == this) return;
  32266. Clear();
  32267. MergeFrom(from);
  32268. }
  32269. void TestParsingMerge_RepeatedFieldsGenerator::CopyFrom(const TestParsingMerge_RepeatedFieldsGenerator& from) {
  32270. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMerge.RepeatedFieldsGenerator)
  32271. if (&from == this) return;
  32272. Clear();
  32273. MergeFrom(from);
  32274. }
  32275. bool TestParsingMerge_RepeatedFieldsGenerator::IsInitialized() const {
  32276. return true;
  32277. }
  32278. void TestParsingMerge_RepeatedFieldsGenerator::Swap(TestParsingMerge_RepeatedFieldsGenerator* other) {
  32279. if (other == this) return;
  32280. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  32281. InternalSwap(other);
  32282. } else {
  32283. TestParsingMerge_RepeatedFieldsGenerator* temp = New(GetArenaNoVirtual());
  32284. temp->MergeFrom(*other);
  32285. other->CopyFrom(*this);
  32286. InternalSwap(temp);
  32287. if (GetArenaNoVirtual() == NULL) {
  32288. delete temp;
  32289. }
  32290. }
  32291. }
  32292. void TestParsingMerge_RepeatedFieldsGenerator::UnsafeArenaSwap(TestParsingMerge_RepeatedFieldsGenerator* other) {
  32293. if (other == this) return;
  32294. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  32295. InternalSwap(other);
  32296. }
  32297. void TestParsingMerge_RepeatedFieldsGenerator::InternalSwap(TestParsingMerge_RepeatedFieldsGenerator* other) {
  32298. using std::swap;
  32299. CastToBase(&field1_)->InternalSwap(CastToBase(&other->field1_));
  32300. CastToBase(&field2_)->InternalSwap(CastToBase(&other->field2_));
  32301. CastToBase(&field3_)->InternalSwap(CastToBase(&other->field3_));
  32302. CastToBase(&group1_)->InternalSwap(CastToBase(&other->group1_));
  32303. CastToBase(&group2_)->InternalSwap(CastToBase(&other->group2_));
  32304. CastToBase(&ext1_)->InternalSwap(CastToBase(&other->ext1_));
  32305. CastToBase(&ext2_)->InternalSwap(CastToBase(&other->ext2_));
  32306. swap(_has_bits_[0], other->_has_bits_[0]);
  32307. _internal_metadata_.Swap(&other->_internal_metadata_);
  32308. }
  32309. ::google::protobuf::Metadata TestParsingMerge_RepeatedFieldsGenerator::GetMetadata() const {
  32310. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  32311. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  32312. }
  32313. // ===================================================================
  32314. void TestParsingMerge_OptionalGroup::InitAsDefaultInstance() {
  32315. ::protobuf_unittest::_TestParsingMerge_OptionalGroup_default_instance_._instance.get_mutable()->optional_group_all_types_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
  32316. ::protobuf_unittest::TestAllTypes::internal_default_instance());
  32317. }
  32318. void TestParsingMerge_OptionalGroup::unsafe_arena_set_allocated_optional_group_all_types(
  32319. ::protobuf_unittest::TestAllTypes* optional_group_all_types) {
  32320. if (GetArenaNoVirtual() == NULL) {
  32321. delete optional_group_all_types_;
  32322. }
  32323. optional_group_all_types_ = optional_group_all_types;
  32324. if (optional_group_all_types) {
  32325. set_has_optional_group_all_types();
  32326. } else {
  32327. clear_has_optional_group_all_types();
  32328. }
  32329. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestParsingMerge.OptionalGroup.optional_group_all_types)
  32330. }
  32331. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  32332. const int TestParsingMerge_OptionalGroup::kOptionalGroupAllTypesFieldNumber;
  32333. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  32334. TestParsingMerge_OptionalGroup::TestParsingMerge_OptionalGroup()
  32335. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  32336. ::google::protobuf::internal::InitSCC(
  32337. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_OptionalGroup.base);
  32338. SharedCtor();
  32339. // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32340. }
  32341. TestParsingMerge_OptionalGroup::TestParsingMerge_OptionalGroup(::google::protobuf::Arena* arena)
  32342. : ::google::protobuf::Message(),
  32343. _internal_metadata_(arena) {
  32344. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_OptionalGroup.base);
  32345. SharedCtor();
  32346. RegisterArenaDtor(arena);
  32347. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32348. }
  32349. TestParsingMerge_OptionalGroup::TestParsingMerge_OptionalGroup(const TestParsingMerge_OptionalGroup& from)
  32350. : ::google::protobuf::Message(),
  32351. _internal_metadata_(NULL),
  32352. _has_bits_(from._has_bits_) {
  32353. _internal_metadata_.MergeFrom(from._internal_metadata_);
  32354. if (from.has_optional_group_all_types()) {
  32355. optional_group_all_types_ = new ::protobuf_unittest::TestAllTypes(*from.optional_group_all_types_);
  32356. } else {
  32357. optional_group_all_types_ = NULL;
  32358. }
  32359. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32360. }
  32361. void TestParsingMerge_OptionalGroup::SharedCtor() {
  32362. optional_group_all_types_ = NULL;
  32363. }
  32364. TestParsingMerge_OptionalGroup::~TestParsingMerge_OptionalGroup() {
  32365. // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32366. SharedDtor();
  32367. }
  32368. void TestParsingMerge_OptionalGroup::SharedDtor() {
  32369. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  32370. if (this != internal_default_instance()) delete optional_group_all_types_;
  32371. }
  32372. void TestParsingMerge_OptionalGroup::ArenaDtor(void* object) {
  32373. TestParsingMerge_OptionalGroup* _this = reinterpret_cast< TestParsingMerge_OptionalGroup* >(object);
  32374. (void)_this;
  32375. }
  32376. void TestParsingMerge_OptionalGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  32377. }
  32378. void TestParsingMerge_OptionalGroup::SetCachedSize(int size) const {
  32379. _cached_size_.Set(size);
  32380. }
  32381. const ::google::protobuf::Descriptor* TestParsingMerge_OptionalGroup::descriptor() {
  32382. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  32383. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  32384. }
  32385. const TestParsingMerge_OptionalGroup& TestParsingMerge_OptionalGroup::default_instance() {
  32386. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_OptionalGroup.base);
  32387. return *internal_default_instance();
  32388. }
  32389. void TestParsingMerge_OptionalGroup::Clear() {
  32390. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32391. ::google::protobuf::uint32 cached_has_bits = 0;
  32392. // Prevent compiler warnings about cached_has_bits being unused
  32393. (void) cached_has_bits;
  32394. cached_has_bits = _has_bits_[0];
  32395. if (cached_has_bits & 0x00000001u) {
  32396. GOOGLE_DCHECK(optional_group_all_types_ != NULL);
  32397. optional_group_all_types_->Clear();
  32398. }
  32399. _has_bits_.Clear();
  32400. _internal_metadata_.Clear();
  32401. }
  32402. bool TestParsingMerge_OptionalGroup::MergePartialFromCodedStream(
  32403. ::google::protobuf::io::CodedInputStream* input) {
  32404. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  32405. ::google::protobuf::uint32 tag;
  32406. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32407. for (;;) {
  32408. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  32409. tag = p.first;
  32410. if (!p.second) goto handle_unusual;
  32411. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  32412. // optional .protobuf_unittest.TestAllTypes optional_group_all_types = 11;
  32413. case 11: {
  32414. if (static_cast< ::google::protobuf::uint8>(tag) ==
  32415. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  32416. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  32417. input, mutable_optional_group_all_types()));
  32418. } else {
  32419. goto handle_unusual;
  32420. }
  32421. break;
  32422. }
  32423. default: {
  32424. handle_unusual:
  32425. if (tag == 0 ||
  32426. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  32427. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  32428. input->SetLastTag(tag);
  32429. goto success;
  32430. }
  32431. DO_(::google::protobuf::internal::WireFormat::SkipField(
  32432. input, tag, _internal_metadata_.mutable_unknown_fields()));
  32433. break;
  32434. }
  32435. }
  32436. }
  32437. success:
  32438. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32439. return true;
  32440. failure:
  32441. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32442. return false;
  32443. #undef DO_
  32444. }
  32445. void TestParsingMerge_OptionalGroup::SerializeWithCachedSizes(
  32446. ::google::protobuf::io::CodedOutputStream* output) const {
  32447. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32448. ::google::protobuf::uint32 cached_has_bits = 0;
  32449. (void) cached_has_bits;
  32450. cached_has_bits = _has_bits_[0];
  32451. // optional .protobuf_unittest.TestAllTypes optional_group_all_types = 11;
  32452. if (cached_has_bits & 0x00000001u) {
  32453. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  32454. 11, this->_internal_optional_group_all_types(), output);
  32455. }
  32456. if (_internal_metadata_.have_unknown_fields()) {
  32457. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  32458. _internal_metadata_.unknown_fields(), output);
  32459. }
  32460. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32461. }
  32462. ::google::protobuf::uint8* TestParsingMerge_OptionalGroup::InternalSerializeWithCachedSizesToArray(
  32463. bool deterministic, ::google::protobuf::uint8* target) const {
  32464. (void)deterministic; // Unused
  32465. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32466. ::google::protobuf::uint32 cached_has_bits = 0;
  32467. (void) cached_has_bits;
  32468. cached_has_bits = _has_bits_[0];
  32469. // optional .protobuf_unittest.TestAllTypes optional_group_all_types = 11;
  32470. if (cached_has_bits & 0x00000001u) {
  32471. target = ::google::protobuf::internal::WireFormatLite::
  32472. InternalWriteMessageToArray(
  32473. 11, this->_internal_optional_group_all_types(), deterministic, target);
  32474. }
  32475. if (_internal_metadata_.have_unknown_fields()) {
  32476. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  32477. _internal_metadata_.unknown_fields(), target);
  32478. }
  32479. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32480. return target;
  32481. }
  32482. size_t TestParsingMerge_OptionalGroup::ByteSizeLong() const {
  32483. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32484. size_t total_size = 0;
  32485. if (_internal_metadata_.have_unknown_fields()) {
  32486. total_size +=
  32487. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  32488. _internal_metadata_.unknown_fields());
  32489. }
  32490. // optional .protobuf_unittest.TestAllTypes optional_group_all_types = 11;
  32491. if (has_optional_group_all_types()) {
  32492. total_size += 1 +
  32493. ::google::protobuf::internal::WireFormatLite::MessageSize(
  32494. *optional_group_all_types_);
  32495. }
  32496. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  32497. SetCachedSize(cached_size);
  32498. return total_size;
  32499. }
  32500. void TestParsingMerge_OptionalGroup::MergeFrom(const ::google::protobuf::Message& from) {
  32501. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32502. GOOGLE_DCHECK_NE(&from, this);
  32503. const TestParsingMerge_OptionalGroup* source =
  32504. ::google::protobuf::internal::DynamicCastToGenerated<const TestParsingMerge_OptionalGroup>(
  32505. &from);
  32506. if (source == NULL) {
  32507. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32508. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  32509. } else {
  32510. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32511. MergeFrom(*source);
  32512. }
  32513. }
  32514. void TestParsingMerge_OptionalGroup::MergeFrom(const TestParsingMerge_OptionalGroup& from) {
  32515. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32516. GOOGLE_DCHECK_NE(&from, this);
  32517. _internal_metadata_.MergeFrom(from._internal_metadata_);
  32518. ::google::protobuf::uint32 cached_has_bits = 0;
  32519. (void) cached_has_bits;
  32520. if (from.has_optional_group_all_types()) {
  32521. mutable_optional_group_all_types()->::protobuf_unittest::TestAllTypes::MergeFrom(from.optional_group_all_types());
  32522. }
  32523. }
  32524. void TestParsingMerge_OptionalGroup::CopyFrom(const ::google::protobuf::Message& from) {
  32525. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32526. if (&from == this) return;
  32527. Clear();
  32528. MergeFrom(from);
  32529. }
  32530. void TestParsingMerge_OptionalGroup::CopyFrom(const TestParsingMerge_OptionalGroup& from) {
  32531. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMerge.OptionalGroup)
  32532. if (&from == this) return;
  32533. Clear();
  32534. MergeFrom(from);
  32535. }
  32536. bool TestParsingMerge_OptionalGroup::IsInitialized() const {
  32537. return true;
  32538. }
  32539. void TestParsingMerge_OptionalGroup::Swap(TestParsingMerge_OptionalGroup* other) {
  32540. if (other == this) return;
  32541. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  32542. InternalSwap(other);
  32543. } else {
  32544. TestParsingMerge_OptionalGroup* temp = New(GetArenaNoVirtual());
  32545. temp->MergeFrom(*other);
  32546. other->CopyFrom(*this);
  32547. InternalSwap(temp);
  32548. if (GetArenaNoVirtual() == NULL) {
  32549. delete temp;
  32550. }
  32551. }
  32552. }
  32553. void TestParsingMerge_OptionalGroup::UnsafeArenaSwap(TestParsingMerge_OptionalGroup* other) {
  32554. if (other == this) return;
  32555. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  32556. InternalSwap(other);
  32557. }
  32558. void TestParsingMerge_OptionalGroup::InternalSwap(TestParsingMerge_OptionalGroup* other) {
  32559. using std::swap;
  32560. swap(optional_group_all_types_, other->optional_group_all_types_);
  32561. swap(_has_bits_[0], other->_has_bits_[0]);
  32562. _internal_metadata_.Swap(&other->_internal_metadata_);
  32563. }
  32564. ::google::protobuf::Metadata TestParsingMerge_OptionalGroup::GetMetadata() const {
  32565. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  32566. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  32567. }
  32568. // ===================================================================
  32569. void TestParsingMerge_RepeatedGroup::InitAsDefaultInstance() {
  32570. ::protobuf_unittest::_TestParsingMerge_RepeatedGroup_default_instance_._instance.get_mutable()->repeated_group_all_types_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
  32571. ::protobuf_unittest::TestAllTypes::internal_default_instance());
  32572. }
  32573. void TestParsingMerge_RepeatedGroup::unsafe_arena_set_allocated_repeated_group_all_types(
  32574. ::protobuf_unittest::TestAllTypes* repeated_group_all_types) {
  32575. if (GetArenaNoVirtual() == NULL) {
  32576. delete repeated_group_all_types_;
  32577. }
  32578. repeated_group_all_types_ = repeated_group_all_types;
  32579. if (repeated_group_all_types) {
  32580. set_has_repeated_group_all_types();
  32581. } else {
  32582. clear_has_repeated_group_all_types();
  32583. }
  32584. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestParsingMerge.RepeatedGroup.repeated_group_all_types)
  32585. }
  32586. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  32587. const int TestParsingMerge_RepeatedGroup::kRepeatedGroupAllTypesFieldNumber;
  32588. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  32589. TestParsingMerge_RepeatedGroup::TestParsingMerge_RepeatedGroup()
  32590. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  32591. ::google::protobuf::internal::InitSCC(
  32592. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedGroup.base);
  32593. SharedCtor();
  32594. // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32595. }
  32596. TestParsingMerge_RepeatedGroup::TestParsingMerge_RepeatedGroup(::google::protobuf::Arena* arena)
  32597. : ::google::protobuf::Message(),
  32598. _internal_metadata_(arena) {
  32599. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedGroup.base);
  32600. SharedCtor();
  32601. RegisterArenaDtor(arena);
  32602. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32603. }
  32604. TestParsingMerge_RepeatedGroup::TestParsingMerge_RepeatedGroup(const TestParsingMerge_RepeatedGroup& from)
  32605. : ::google::protobuf::Message(),
  32606. _internal_metadata_(NULL),
  32607. _has_bits_(from._has_bits_) {
  32608. _internal_metadata_.MergeFrom(from._internal_metadata_);
  32609. if (from.has_repeated_group_all_types()) {
  32610. repeated_group_all_types_ = new ::protobuf_unittest::TestAllTypes(*from.repeated_group_all_types_);
  32611. } else {
  32612. repeated_group_all_types_ = NULL;
  32613. }
  32614. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32615. }
  32616. void TestParsingMerge_RepeatedGroup::SharedCtor() {
  32617. repeated_group_all_types_ = NULL;
  32618. }
  32619. TestParsingMerge_RepeatedGroup::~TestParsingMerge_RepeatedGroup() {
  32620. // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32621. SharedDtor();
  32622. }
  32623. void TestParsingMerge_RepeatedGroup::SharedDtor() {
  32624. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  32625. if (this != internal_default_instance()) delete repeated_group_all_types_;
  32626. }
  32627. void TestParsingMerge_RepeatedGroup::ArenaDtor(void* object) {
  32628. TestParsingMerge_RepeatedGroup* _this = reinterpret_cast< TestParsingMerge_RepeatedGroup* >(object);
  32629. (void)_this;
  32630. }
  32631. void TestParsingMerge_RepeatedGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  32632. }
  32633. void TestParsingMerge_RepeatedGroup::SetCachedSize(int size) const {
  32634. _cached_size_.Set(size);
  32635. }
  32636. const ::google::protobuf::Descriptor* TestParsingMerge_RepeatedGroup::descriptor() {
  32637. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  32638. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  32639. }
  32640. const TestParsingMerge_RepeatedGroup& TestParsingMerge_RepeatedGroup::default_instance() {
  32641. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge_RepeatedGroup.base);
  32642. return *internal_default_instance();
  32643. }
  32644. void TestParsingMerge_RepeatedGroup::Clear() {
  32645. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32646. ::google::protobuf::uint32 cached_has_bits = 0;
  32647. // Prevent compiler warnings about cached_has_bits being unused
  32648. (void) cached_has_bits;
  32649. cached_has_bits = _has_bits_[0];
  32650. if (cached_has_bits & 0x00000001u) {
  32651. GOOGLE_DCHECK(repeated_group_all_types_ != NULL);
  32652. repeated_group_all_types_->Clear();
  32653. }
  32654. _has_bits_.Clear();
  32655. _internal_metadata_.Clear();
  32656. }
  32657. bool TestParsingMerge_RepeatedGroup::MergePartialFromCodedStream(
  32658. ::google::protobuf::io::CodedInputStream* input) {
  32659. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  32660. ::google::protobuf::uint32 tag;
  32661. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32662. for (;;) {
  32663. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  32664. tag = p.first;
  32665. if (!p.second) goto handle_unusual;
  32666. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  32667. // optional .protobuf_unittest.TestAllTypes repeated_group_all_types = 21;
  32668. case 21: {
  32669. if (static_cast< ::google::protobuf::uint8>(tag) ==
  32670. static_cast< ::google::protobuf::uint8>(170u /* 170 & 0xFF */)) {
  32671. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  32672. input, mutable_repeated_group_all_types()));
  32673. } else {
  32674. goto handle_unusual;
  32675. }
  32676. break;
  32677. }
  32678. default: {
  32679. handle_unusual:
  32680. if (tag == 0 ||
  32681. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  32682. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  32683. input->SetLastTag(tag);
  32684. goto success;
  32685. }
  32686. DO_(::google::protobuf::internal::WireFormat::SkipField(
  32687. input, tag, _internal_metadata_.mutable_unknown_fields()));
  32688. break;
  32689. }
  32690. }
  32691. }
  32692. success:
  32693. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32694. return true;
  32695. failure:
  32696. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32697. return false;
  32698. #undef DO_
  32699. }
  32700. void TestParsingMerge_RepeatedGroup::SerializeWithCachedSizes(
  32701. ::google::protobuf::io::CodedOutputStream* output) const {
  32702. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32703. ::google::protobuf::uint32 cached_has_bits = 0;
  32704. (void) cached_has_bits;
  32705. cached_has_bits = _has_bits_[0];
  32706. // optional .protobuf_unittest.TestAllTypes repeated_group_all_types = 21;
  32707. if (cached_has_bits & 0x00000001u) {
  32708. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  32709. 21, this->_internal_repeated_group_all_types(), output);
  32710. }
  32711. if (_internal_metadata_.have_unknown_fields()) {
  32712. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  32713. _internal_metadata_.unknown_fields(), output);
  32714. }
  32715. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32716. }
  32717. ::google::protobuf::uint8* TestParsingMerge_RepeatedGroup::InternalSerializeWithCachedSizesToArray(
  32718. bool deterministic, ::google::protobuf::uint8* target) const {
  32719. (void)deterministic; // Unused
  32720. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32721. ::google::protobuf::uint32 cached_has_bits = 0;
  32722. (void) cached_has_bits;
  32723. cached_has_bits = _has_bits_[0];
  32724. // optional .protobuf_unittest.TestAllTypes repeated_group_all_types = 21;
  32725. if (cached_has_bits & 0x00000001u) {
  32726. target = ::google::protobuf::internal::WireFormatLite::
  32727. InternalWriteMessageToArray(
  32728. 21, this->_internal_repeated_group_all_types(), deterministic, target);
  32729. }
  32730. if (_internal_metadata_.have_unknown_fields()) {
  32731. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  32732. _internal_metadata_.unknown_fields(), target);
  32733. }
  32734. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32735. return target;
  32736. }
  32737. size_t TestParsingMerge_RepeatedGroup::ByteSizeLong() const {
  32738. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32739. size_t total_size = 0;
  32740. if (_internal_metadata_.have_unknown_fields()) {
  32741. total_size +=
  32742. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  32743. _internal_metadata_.unknown_fields());
  32744. }
  32745. // optional .protobuf_unittest.TestAllTypes repeated_group_all_types = 21;
  32746. if (has_repeated_group_all_types()) {
  32747. total_size += 2 +
  32748. ::google::protobuf::internal::WireFormatLite::MessageSize(
  32749. *repeated_group_all_types_);
  32750. }
  32751. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  32752. SetCachedSize(cached_size);
  32753. return total_size;
  32754. }
  32755. void TestParsingMerge_RepeatedGroup::MergeFrom(const ::google::protobuf::Message& from) {
  32756. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32757. GOOGLE_DCHECK_NE(&from, this);
  32758. const TestParsingMerge_RepeatedGroup* source =
  32759. ::google::protobuf::internal::DynamicCastToGenerated<const TestParsingMerge_RepeatedGroup>(
  32760. &from);
  32761. if (source == NULL) {
  32762. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32763. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  32764. } else {
  32765. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32766. MergeFrom(*source);
  32767. }
  32768. }
  32769. void TestParsingMerge_RepeatedGroup::MergeFrom(const TestParsingMerge_RepeatedGroup& from) {
  32770. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32771. GOOGLE_DCHECK_NE(&from, this);
  32772. _internal_metadata_.MergeFrom(from._internal_metadata_);
  32773. ::google::protobuf::uint32 cached_has_bits = 0;
  32774. (void) cached_has_bits;
  32775. if (from.has_repeated_group_all_types()) {
  32776. mutable_repeated_group_all_types()->::protobuf_unittest::TestAllTypes::MergeFrom(from.repeated_group_all_types());
  32777. }
  32778. }
  32779. void TestParsingMerge_RepeatedGroup::CopyFrom(const ::google::protobuf::Message& from) {
  32780. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32781. if (&from == this) return;
  32782. Clear();
  32783. MergeFrom(from);
  32784. }
  32785. void TestParsingMerge_RepeatedGroup::CopyFrom(const TestParsingMerge_RepeatedGroup& from) {
  32786. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMerge.RepeatedGroup)
  32787. if (&from == this) return;
  32788. Clear();
  32789. MergeFrom(from);
  32790. }
  32791. bool TestParsingMerge_RepeatedGroup::IsInitialized() const {
  32792. return true;
  32793. }
  32794. void TestParsingMerge_RepeatedGroup::Swap(TestParsingMerge_RepeatedGroup* other) {
  32795. if (other == this) return;
  32796. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  32797. InternalSwap(other);
  32798. } else {
  32799. TestParsingMerge_RepeatedGroup* temp = New(GetArenaNoVirtual());
  32800. temp->MergeFrom(*other);
  32801. other->CopyFrom(*this);
  32802. InternalSwap(temp);
  32803. if (GetArenaNoVirtual() == NULL) {
  32804. delete temp;
  32805. }
  32806. }
  32807. }
  32808. void TestParsingMerge_RepeatedGroup::UnsafeArenaSwap(TestParsingMerge_RepeatedGroup* other) {
  32809. if (other == this) return;
  32810. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  32811. InternalSwap(other);
  32812. }
  32813. void TestParsingMerge_RepeatedGroup::InternalSwap(TestParsingMerge_RepeatedGroup* other) {
  32814. using std::swap;
  32815. swap(repeated_group_all_types_, other->repeated_group_all_types_);
  32816. swap(_has_bits_[0], other->_has_bits_[0]);
  32817. _internal_metadata_.Swap(&other->_internal_metadata_);
  32818. }
  32819. ::google::protobuf::Metadata TestParsingMerge_RepeatedGroup::GetMetadata() const {
  32820. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  32821. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  32822. }
  32823. // ===================================================================
  32824. void TestParsingMerge::InitAsDefaultInstance() {
  32825. ::protobuf_unittest::_TestParsingMerge_default_instance_._instance.get_mutable()->required_all_types_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
  32826. ::protobuf_unittest::TestAllTypes::internal_default_instance());
  32827. ::protobuf_unittest::_TestParsingMerge_default_instance_._instance.get_mutable()->optional_all_types_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
  32828. ::protobuf_unittest::TestAllTypes::internal_default_instance());
  32829. ::protobuf_unittest::_TestParsingMerge_default_instance_._instance.get_mutable()->optionalgroup_ = const_cast< ::protobuf_unittest::TestParsingMerge_OptionalGroup*>(
  32830. ::protobuf_unittest::TestParsingMerge_OptionalGroup::internal_default_instance());
  32831. }
  32832. void TestParsingMerge::unsafe_arena_set_allocated_required_all_types(
  32833. ::protobuf_unittest::TestAllTypes* required_all_types) {
  32834. if (GetArenaNoVirtual() == NULL) {
  32835. delete required_all_types_;
  32836. }
  32837. required_all_types_ = required_all_types;
  32838. if (required_all_types) {
  32839. set_has_required_all_types();
  32840. } else {
  32841. clear_has_required_all_types();
  32842. }
  32843. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestParsingMerge.required_all_types)
  32844. }
  32845. void TestParsingMerge::unsafe_arena_set_allocated_optional_all_types(
  32846. ::protobuf_unittest::TestAllTypes* optional_all_types) {
  32847. if (GetArenaNoVirtual() == NULL) {
  32848. delete optional_all_types_;
  32849. }
  32850. optional_all_types_ = optional_all_types;
  32851. if (optional_all_types) {
  32852. set_has_optional_all_types();
  32853. } else {
  32854. clear_has_optional_all_types();
  32855. }
  32856. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestParsingMerge.optional_all_types)
  32857. }
  32858. void TestParsingMerge::unsafe_arena_set_allocated_optionalgroup(
  32859. ::protobuf_unittest::TestParsingMerge_OptionalGroup* optionalgroup) {
  32860. if (GetArenaNoVirtual() == NULL) {
  32861. delete optionalgroup_;
  32862. }
  32863. optionalgroup_ = optionalgroup;
  32864. if (optionalgroup) {
  32865. set_has_optionalgroup();
  32866. } else {
  32867. clear_has_optionalgroup();
  32868. }
  32869. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestParsingMerge.optionalgroup)
  32870. }
  32871. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  32872. const int TestParsingMerge::kRequiredAllTypesFieldNumber;
  32873. const int TestParsingMerge::kOptionalAllTypesFieldNumber;
  32874. const int TestParsingMerge::kRepeatedAllTypesFieldNumber;
  32875. const int TestParsingMerge::kOptionalgroupFieldNumber;
  32876. const int TestParsingMerge::kRepeatedgroupFieldNumber;
  32877. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  32878. TestParsingMerge::TestParsingMerge()
  32879. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  32880. ::google::protobuf::internal::InitSCC(
  32881. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge.base);
  32882. SharedCtor();
  32883. // @@protoc_insertion_point(constructor:protobuf_unittest.TestParsingMerge)
  32884. }
  32885. TestParsingMerge::TestParsingMerge(::google::protobuf::Arena* arena)
  32886. : ::google::protobuf::Message(),
  32887. _extensions_(arena),
  32888. _internal_metadata_(arena),
  32889. repeated_all_types_(arena),
  32890. repeatedgroup_(arena) {
  32891. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge.base);
  32892. SharedCtor();
  32893. RegisterArenaDtor(arena);
  32894. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestParsingMerge)
  32895. }
  32896. TestParsingMerge::TestParsingMerge(const TestParsingMerge& from)
  32897. : ::google::protobuf::Message(),
  32898. _internal_metadata_(NULL),
  32899. _has_bits_(from._has_bits_),
  32900. repeated_all_types_(from.repeated_all_types_),
  32901. repeatedgroup_(from.repeatedgroup_) {
  32902. _internal_metadata_.MergeFrom(from._internal_metadata_);
  32903. _extensions_.MergeFrom(from._extensions_);
  32904. if (from.has_required_all_types()) {
  32905. required_all_types_ = new ::protobuf_unittest::TestAllTypes(*from.required_all_types_);
  32906. } else {
  32907. required_all_types_ = NULL;
  32908. }
  32909. if (from.has_optional_all_types()) {
  32910. optional_all_types_ = new ::protobuf_unittest::TestAllTypes(*from.optional_all_types_);
  32911. } else {
  32912. optional_all_types_ = NULL;
  32913. }
  32914. if (from.has_optionalgroup()) {
  32915. optionalgroup_ = new ::protobuf_unittest::TestParsingMerge_OptionalGroup(*from.optionalgroup_);
  32916. } else {
  32917. optionalgroup_ = NULL;
  32918. }
  32919. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestParsingMerge)
  32920. }
  32921. void TestParsingMerge::SharedCtor() {
  32922. ::memset(&required_all_types_, 0, static_cast<size_t>(
  32923. reinterpret_cast<char*>(&optionalgroup_) -
  32924. reinterpret_cast<char*>(&required_all_types_)) + sizeof(optionalgroup_));
  32925. }
  32926. TestParsingMerge::~TestParsingMerge() {
  32927. // @@protoc_insertion_point(destructor:protobuf_unittest.TestParsingMerge)
  32928. SharedDtor();
  32929. }
  32930. void TestParsingMerge::SharedDtor() {
  32931. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  32932. if (this != internal_default_instance()) delete required_all_types_;
  32933. if (this != internal_default_instance()) delete optional_all_types_;
  32934. if (this != internal_default_instance()) delete optionalgroup_;
  32935. }
  32936. void TestParsingMerge::ArenaDtor(void* object) {
  32937. TestParsingMerge* _this = reinterpret_cast< TestParsingMerge* >(object);
  32938. (void)_this;
  32939. }
  32940. void TestParsingMerge::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  32941. }
  32942. void TestParsingMerge::SetCachedSize(int size) const {
  32943. _cached_size_.Set(size);
  32944. }
  32945. const ::google::protobuf::Descriptor* TestParsingMerge::descriptor() {
  32946. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  32947. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  32948. }
  32949. const TestParsingMerge& TestParsingMerge::default_instance() {
  32950. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestParsingMerge.base);
  32951. return *internal_default_instance();
  32952. }
  32953. void TestParsingMerge::Clear() {
  32954. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestParsingMerge)
  32955. ::google::protobuf::uint32 cached_has_bits = 0;
  32956. // Prevent compiler warnings about cached_has_bits being unused
  32957. (void) cached_has_bits;
  32958. _extensions_.Clear();
  32959. repeated_all_types_.Clear();
  32960. repeatedgroup_.Clear();
  32961. cached_has_bits = _has_bits_[0];
  32962. if (cached_has_bits & 7u) {
  32963. if (cached_has_bits & 0x00000001u) {
  32964. GOOGLE_DCHECK(required_all_types_ != NULL);
  32965. required_all_types_->Clear();
  32966. }
  32967. if (cached_has_bits & 0x00000002u) {
  32968. GOOGLE_DCHECK(optional_all_types_ != NULL);
  32969. optional_all_types_->Clear();
  32970. }
  32971. if (cached_has_bits & 0x00000004u) {
  32972. GOOGLE_DCHECK(optionalgroup_ != NULL);
  32973. optionalgroup_->Clear();
  32974. }
  32975. }
  32976. _has_bits_.Clear();
  32977. _internal_metadata_.Clear();
  32978. }
  32979. bool TestParsingMerge::MergePartialFromCodedStream(
  32980. ::google::protobuf::io::CodedInputStream* input) {
  32981. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  32982. ::google::protobuf::uint32 tag;
  32983. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestParsingMerge)
  32984. for (;;) {
  32985. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  32986. tag = p.first;
  32987. if (!p.second) goto handle_unusual;
  32988. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  32989. // required .protobuf_unittest.TestAllTypes required_all_types = 1;
  32990. case 1: {
  32991. if (static_cast< ::google::protobuf::uint8>(tag) ==
  32992. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  32993. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  32994. input, mutable_required_all_types()));
  32995. } else {
  32996. goto handle_unusual;
  32997. }
  32998. break;
  32999. }
  33000. // optional .protobuf_unittest.TestAllTypes optional_all_types = 2;
  33001. case 2: {
  33002. if (static_cast< ::google::protobuf::uint8>(tag) ==
  33003. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  33004. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  33005. input, mutable_optional_all_types()));
  33006. } else {
  33007. goto handle_unusual;
  33008. }
  33009. break;
  33010. }
  33011. // repeated .protobuf_unittest.TestAllTypes repeated_all_types = 3;
  33012. case 3: {
  33013. if (static_cast< ::google::protobuf::uint8>(tag) ==
  33014. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  33015. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  33016. input, add_repeated_all_types()));
  33017. } else {
  33018. goto handle_unusual;
  33019. }
  33020. break;
  33021. }
  33022. // optional group OptionalGroup = 10 { ... };
  33023. case 10: {
  33024. if (static_cast< ::google::protobuf::uint8>(tag) ==
  33025. static_cast< ::google::protobuf::uint8>(83u /* 83 & 0xFF */)) {
  33026. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
  33027. 10, input, mutable_optionalgroup()));
  33028. } else {
  33029. goto handle_unusual;
  33030. }
  33031. break;
  33032. }
  33033. // repeated group RepeatedGroup = 20 { ... };
  33034. case 20: {
  33035. if (static_cast< ::google::protobuf::uint8>(tag) ==
  33036. static_cast< ::google::protobuf::uint8>(163u /* 163 & 0xFF */)) {
  33037. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(20, input, add_repeatedgroup()));
  33038. } else {
  33039. goto handle_unusual;
  33040. }
  33041. break;
  33042. }
  33043. default: {
  33044. handle_unusual:
  33045. if (tag == 0) {
  33046. goto success;
  33047. }
  33048. if ((8000u <= tag)) {
  33049. DO_(_extensions_.ParseField(tag, input,
  33050. internal_default_instance(),
  33051. _internal_metadata_.mutable_unknown_fields()));
  33052. continue;
  33053. }
  33054. DO_(::google::protobuf::internal::WireFormat::SkipField(
  33055. input, tag, _internal_metadata_.mutable_unknown_fields()));
  33056. break;
  33057. }
  33058. }
  33059. }
  33060. success:
  33061. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestParsingMerge)
  33062. return true;
  33063. failure:
  33064. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestParsingMerge)
  33065. return false;
  33066. #undef DO_
  33067. }
  33068. void TestParsingMerge::SerializeWithCachedSizes(
  33069. ::google::protobuf::io::CodedOutputStream* output) const {
  33070. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestParsingMerge)
  33071. ::google::protobuf::uint32 cached_has_bits = 0;
  33072. (void) cached_has_bits;
  33073. cached_has_bits = _has_bits_[0];
  33074. // required .protobuf_unittest.TestAllTypes required_all_types = 1;
  33075. if (cached_has_bits & 0x00000001u) {
  33076. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  33077. 1, this->_internal_required_all_types(), output);
  33078. }
  33079. // optional .protobuf_unittest.TestAllTypes optional_all_types = 2;
  33080. if (cached_has_bits & 0x00000002u) {
  33081. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  33082. 2, this->_internal_optional_all_types(), output);
  33083. }
  33084. // repeated .protobuf_unittest.TestAllTypes repeated_all_types = 3;
  33085. for (unsigned int i = 0,
  33086. n = static_cast<unsigned int>(this->repeated_all_types_size()); i < n; i++) {
  33087. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  33088. 3,
  33089. this->repeated_all_types(static_cast<int>(i)),
  33090. output);
  33091. }
  33092. // optional group OptionalGroup = 10 { ... };
  33093. if (cached_has_bits & 0x00000004u) {
  33094. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  33095. 10, this->_internal_optionalgroup(), output);
  33096. }
  33097. // repeated group RepeatedGroup = 20 { ... };
  33098. for (unsigned int i = 0,
  33099. n = static_cast<unsigned int>(this->repeatedgroup_size()); i < n; i++) {
  33100. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  33101. 20,
  33102. this->repeatedgroup(static_cast<int>(i)),
  33103. output);
  33104. }
  33105. // Extension range [1000, 536870912)
  33106. _extensions_.SerializeWithCachedSizes(
  33107. 1000, 536870912, output);
  33108. if (_internal_metadata_.have_unknown_fields()) {
  33109. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  33110. _internal_metadata_.unknown_fields(), output);
  33111. }
  33112. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestParsingMerge)
  33113. }
  33114. ::google::protobuf::uint8* TestParsingMerge::InternalSerializeWithCachedSizesToArray(
  33115. bool deterministic, ::google::protobuf::uint8* target) const {
  33116. (void)deterministic; // Unused
  33117. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestParsingMerge)
  33118. ::google::protobuf::uint32 cached_has_bits = 0;
  33119. (void) cached_has_bits;
  33120. cached_has_bits = _has_bits_[0];
  33121. // required .protobuf_unittest.TestAllTypes required_all_types = 1;
  33122. if (cached_has_bits & 0x00000001u) {
  33123. target = ::google::protobuf::internal::WireFormatLite::
  33124. InternalWriteMessageToArray(
  33125. 1, this->_internal_required_all_types(), deterministic, target);
  33126. }
  33127. // optional .protobuf_unittest.TestAllTypes optional_all_types = 2;
  33128. if (cached_has_bits & 0x00000002u) {
  33129. target = ::google::protobuf::internal::WireFormatLite::
  33130. InternalWriteMessageToArray(
  33131. 2, this->_internal_optional_all_types(), deterministic, target);
  33132. }
  33133. // repeated .protobuf_unittest.TestAllTypes repeated_all_types = 3;
  33134. for (unsigned int i = 0,
  33135. n = static_cast<unsigned int>(this->repeated_all_types_size()); i < n; i++) {
  33136. target = ::google::protobuf::internal::WireFormatLite::
  33137. InternalWriteMessageToArray(
  33138. 3, this->repeated_all_types(static_cast<int>(i)), deterministic, target);
  33139. }
  33140. // optional group OptionalGroup = 10 { ... };
  33141. if (cached_has_bits & 0x00000004u) {
  33142. target = ::google::protobuf::internal::WireFormatLite::
  33143. InternalWriteGroupToArray(
  33144. 10, this->_internal_optionalgroup(), deterministic, target);
  33145. }
  33146. // repeated group RepeatedGroup = 20 { ... };
  33147. for (unsigned int i = 0,
  33148. n = static_cast<unsigned int>(this->repeatedgroup_size()); i < n; i++) {
  33149. target = ::google::protobuf::internal::WireFormatLite::
  33150. InternalWriteGroupToArray(
  33151. 20, this->repeatedgroup(static_cast<int>(i)), deterministic, target);
  33152. }
  33153. // Extension range [1000, 536870912)
  33154. target = _extensions_.InternalSerializeWithCachedSizesToArray(
  33155. 1000, 536870912, deterministic, target);
  33156. if (_internal_metadata_.have_unknown_fields()) {
  33157. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  33158. _internal_metadata_.unknown_fields(), target);
  33159. }
  33160. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestParsingMerge)
  33161. return target;
  33162. }
  33163. size_t TestParsingMerge::ByteSizeLong() const {
  33164. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestParsingMerge)
  33165. size_t total_size = 0;
  33166. total_size += _extensions_.ByteSize();
  33167. if (_internal_metadata_.have_unknown_fields()) {
  33168. total_size +=
  33169. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  33170. _internal_metadata_.unknown_fields());
  33171. }
  33172. // required .protobuf_unittest.TestAllTypes required_all_types = 1;
  33173. if (has_required_all_types()) {
  33174. total_size += 1 +
  33175. ::google::protobuf::internal::WireFormatLite::MessageSize(
  33176. *required_all_types_);
  33177. }
  33178. // repeated .protobuf_unittest.TestAllTypes repeated_all_types = 3;
  33179. {
  33180. unsigned int count = static_cast<unsigned int>(this->repeated_all_types_size());
  33181. total_size += 1UL * count;
  33182. for (unsigned int i = 0; i < count; i++) {
  33183. total_size +=
  33184. ::google::protobuf::internal::WireFormatLite::MessageSize(
  33185. this->repeated_all_types(static_cast<int>(i)));
  33186. }
  33187. }
  33188. // repeated group RepeatedGroup = 20 { ... };
  33189. {
  33190. unsigned int count = static_cast<unsigned int>(this->repeatedgroup_size());
  33191. total_size += 4UL * count;
  33192. for (unsigned int i = 0; i < count; i++) {
  33193. total_size +=
  33194. ::google::protobuf::internal::WireFormatLite::GroupSize(
  33195. this->repeatedgroup(static_cast<int>(i)));
  33196. }
  33197. }
  33198. if (_has_bits_[0 / 32] & 6u) {
  33199. // optional .protobuf_unittest.TestAllTypes optional_all_types = 2;
  33200. if (has_optional_all_types()) {
  33201. total_size += 1 +
  33202. ::google::protobuf::internal::WireFormatLite::MessageSize(
  33203. *optional_all_types_);
  33204. }
  33205. // optional group OptionalGroup = 10 { ... };
  33206. if (has_optionalgroup()) {
  33207. total_size += 2 +
  33208. ::google::protobuf::internal::WireFormatLite::GroupSize(
  33209. *optionalgroup_);
  33210. }
  33211. }
  33212. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  33213. SetCachedSize(cached_size);
  33214. return total_size;
  33215. }
  33216. void TestParsingMerge::MergeFrom(const ::google::protobuf::Message& from) {
  33217. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestParsingMerge)
  33218. GOOGLE_DCHECK_NE(&from, this);
  33219. const TestParsingMerge* source =
  33220. ::google::protobuf::internal::DynamicCastToGenerated<const TestParsingMerge>(
  33221. &from);
  33222. if (source == NULL) {
  33223. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestParsingMerge)
  33224. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  33225. } else {
  33226. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestParsingMerge)
  33227. MergeFrom(*source);
  33228. }
  33229. }
  33230. void TestParsingMerge::MergeFrom(const TestParsingMerge& from) {
  33231. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestParsingMerge)
  33232. GOOGLE_DCHECK_NE(&from, this);
  33233. _extensions_.MergeFrom(from._extensions_);
  33234. _internal_metadata_.MergeFrom(from._internal_metadata_);
  33235. ::google::protobuf::uint32 cached_has_bits = 0;
  33236. (void) cached_has_bits;
  33237. repeated_all_types_.MergeFrom(from.repeated_all_types_);
  33238. repeatedgroup_.MergeFrom(from.repeatedgroup_);
  33239. cached_has_bits = from._has_bits_[0];
  33240. if (cached_has_bits & 7u) {
  33241. if (cached_has_bits & 0x00000001u) {
  33242. mutable_required_all_types()->::protobuf_unittest::TestAllTypes::MergeFrom(from.required_all_types());
  33243. }
  33244. if (cached_has_bits & 0x00000002u) {
  33245. mutable_optional_all_types()->::protobuf_unittest::TestAllTypes::MergeFrom(from.optional_all_types());
  33246. }
  33247. if (cached_has_bits & 0x00000004u) {
  33248. mutable_optionalgroup()->::protobuf_unittest::TestParsingMerge_OptionalGroup::MergeFrom(from.optionalgroup());
  33249. }
  33250. }
  33251. }
  33252. void TestParsingMerge::CopyFrom(const ::google::protobuf::Message& from) {
  33253. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestParsingMerge)
  33254. if (&from == this) return;
  33255. Clear();
  33256. MergeFrom(from);
  33257. }
  33258. void TestParsingMerge::CopyFrom(const TestParsingMerge& from) {
  33259. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestParsingMerge)
  33260. if (&from == this) return;
  33261. Clear();
  33262. MergeFrom(from);
  33263. }
  33264. bool TestParsingMerge::IsInitialized() const {
  33265. if (!_extensions_.IsInitialized()) {
  33266. return false;
  33267. }
  33268. if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
  33269. return true;
  33270. }
  33271. void TestParsingMerge::Swap(TestParsingMerge* other) {
  33272. if (other == this) return;
  33273. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  33274. InternalSwap(other);
  33275. } else {
  33276. TestParsingMerge* temp = New(GetArenaNoVirtual());
  33277. temp->MergeFrom(*other);
  33278. other->CopyFrom(*this);
  33279. InternalSwap(temp);
  33280. if (GetArenaNoVirtual() == NULL) {
  33281. delete temp;
  33282. }
  33283. }
  33284. }
  33285. void TestParsingMerge::UnsafeArenaSwap(TestParsingMerge* other) {
  33286. if (other == this) return;
  33287. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  33288. InternalSwap(other);
  33289. }
  33290. void TestParsingMerge::InternalSwap(TestParsingMerge* other) {
  33291. using std::swap;
  33292. CastToBase(&repeated_all_types_)->InternalSwap(CastToBase(&other->repeated_all_types_));
  33293. CastToBase(&repeatedgroup_)->InternalSwap(CastToBase(&other->repeatedgroup_));
  33294. swap(required_all_types_, other->required_all_types_);
  33295. swap(optional_all_types_, other->optional_all_types_);
  33296. swap(optionalgroup_, other->optionalgroup_);
  33297. swap(_has_bits_[0], other->_has_bits_[0]);
  33298. _internal_metadata_.Swap(&other->_internal_metadata_);
  33299. _extensions_.Swap(&other->_extensions_);
  33300. }
  33301. ::google::protobuf::Metadata TestParsingMerge::GetMetadata() const {
  33302. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  33303. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  33304. }
  33305. // ===================================================================
  33306. void TestCommentInjectionMessage::InitAsDefaultInstance() {
  33307. }
  33308. ::google::protobuf::internal::ExplicitlyConstructed<::std::string> TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_;
  33309. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  33310. const int TestCommentInjectionMessage::kAFieldNumber;
  33311. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  33312. TestCommentInjectionMessage::TestCommentInjectionMessage()
  33313. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  33314. ::google::protobuf::internal::InitSCC(
  33315. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestCommentInjectionMessage.base);
  33316. SharedCtor();
  33317. // @@protoc_insertion_point(constructor:protobuf_unittest.TestCommentInjectionMessage)
  33318. }
  33319. TestCommentInjectionMessage::TestCommentInjectionMessage(::google::protobuf::Arena* arena)
  33320. : ::google::protobuf::Message(),
  33321. _internal_metadata_(arena) {
  33322. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestCommentInjectionMessage.base);
  33323. SharedCtor();
  33324. RegisterArenaDtor(arena);
  33325. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestCommentInjectionMessage)
  33326. }
  33327. TestCommentInjectionMessage::TestCommentInjectionMessage(const TestCommentInjectionMessage& from)
  33328. : ::google::protobuf::Message(),
  33329. _internal_metadata_(NULL),
  33330. _has_bits_(from._has_bits_) {
  33331. _internal_metadata_.MergeFrom(from._internal_metadata_);
  33332. a_.UnsafeSetDefault(&::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get());
  33333. if (from.has_a()) {
  33334. a_.Set(&::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get(), from.a(),
  33335. GetArenaNoVirtual());
  33336. }
  33337. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestCommentInjectionMessage)
  33338. }
  33339. void TestCommentInjectionMessage::SharedCtor() {
  33340. a_.UnsafeSetDefault(&::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get());
  33341. }
  33342. TestCommentInjectionMessage::~TestCommentInjectionMessage() {
  33343. // @@protoc_insertion_point(destructor:protobuf_unittest.TestCommentInjectionMessage)
  33344. SharedDtor();
  33345. }
  33346. void TestCommentInjectionMessage::SharedDtor() {
  33347. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  33348. a_.DestroyNoArena(&::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get());
  33349. }
  33350. void TestCommentInjectionMessage::ArenaDtor(void* object) {
  33351. TestCommentInjectionMessage* _this = reinterpret_cast< TestCommentInjectionMessage* >(object);
  33352. (void)_this;
  33353. }
  33354. void TestCommentInjectionMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  33355. }
  33356. void TestCommentInjectionMessage::SetCachedSize(int size) const {
  33357. _cached_size_.Set(size);
  33358. }
  33359. const ::google::protobuf::Descriptor* TestCommentInjectionMessage::descriptor() {
  33360. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  33361. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  33362. }
  33363. const TestCommentInjectionMessage& TestCommentInjectionMessage::default_instance() {
  33364. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestCommentInjectionMessage.base);
  33365. return *internal_default_instance();
  33366. }
  33367. void TestCommentInjectionMessage::Clear() {
  33368. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestCommentInjectionMessage)
  33369. ::google::protobuf::uint32 cached_has_bits = 0;
  33370. // Prevent compiler warnings about cached_has_bits being unused
  33371. (void) cached_has_bits;
  33372. cached_has_bits = _has_bits_[0];
  33373. if (cached_has_bits & 0x00000001u) {
  33374. a_.ClearToDefault(&::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get(), GetArenaNoVirtual());
  33375. }
  33376. _has_bits_.Clear();
  33377. _internal_metadata_.Clear();
  33378. }
  33379. bool TestCommentInjectionMessage::MergePartialFromCodedStream(
  33380. ::google::protobuf::io::CodedInputStream* input) {
  33381. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  33382. ::google::protobuf::uint32 tag;
  33383. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestCommentInjectionMessage)
  33384. for (;;) {
  33385. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  33386. tag = p.first;
  33387. if (!p.second) goto handle_unusual;
  33388. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  33389. // optional string a = 1 [default = "*/ <- Neither should this."];
  33390. case 1: {
  33391. if (static_cast< ::google::protobuf::uint8>(tag) ==
  33392. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  33393. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  33394. input, this->mutable_a()));
  33395. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  33396. this->a().data(), static_cast<int>(this->a().length()),
  33397. ::google::protobuf::internal::WireFormat::PARSE,
  33398. "protobuf_unittest.TestCommentInjectionMessage.a");
  33399. } else {
  33400. goto handle_unusual;
  33401. }
  33402. break;
  33403. }
  33404. default: {
  33405. handle_unusual:
  33406. if (tag == 0) {
  33407. goto success;
  33408. }
  33409. DO_(::google::protobuf::internal::WireFormat::SkipField(
  33410. input, tag, _internal_metadata_.mutable_unknown_fields()));
  33411. break;
  33412. }
  33413. }
  33414. }
  33415. success:
  33416. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestCommentInjectionMessage)
  33417. return true;
  33418. failure:
  33419. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestCommentInjectionMessage)
  33420. return false;
  33421. #undef DO_
  33422. }
  33423. void TestCommentInjectionMessage::SerializeWithCachedSizes(
  33424. ::google::protobuf::io::CodedOutputStream* output) const {
  33425. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestCommentInjectionMessage)
  33426. ::google::protobuf::uint32 cached_has_bits = 0;
  33427. (void) cached_has_bits;
  33428. cached_has_bits = _has_bits_[0];
  33429. // optional string a = 1 [default = "*/ <- Neither should this."];
  33430. if (cached_has_bits & 0x00000001u) {
  33431. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  33432. this->a().data(), static_cast<int>(this->a().length()),
  33433. ::google::protobuf::internal::WireFormat::SERIALIZE,
  33434. "protobuf_unittest.TestCommentInjectionMessage.a");
  33435. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  33436. 1, this->a(), output);
  33437. }
  33438. if (_internal_metadata_.have_unknown_fields()) {
  33439. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  33440. _internal_metadata_.unknown_fields(), output);
  33441. }
  33442. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestCommentInjectionMessage)
  33443. }
  33444. ::google::protobuf::uint8* TestCommentInjectionMessage::InternalSerializeWithCachedSizesToArray(
  33445. bool deterministic, ::google::protobuf::uint8* target) const {
  33446. (void)deterministic; // Unused
  33447. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestCommentInjectionMessage)
  33448. ::google::protobuf::uint32 cached_has_bits = 0;
  33449. (void) cached_has_bits;
  33450. cached_has_bits = _has_bits_[0];
  33451. // optional string a = 1 [default = "*/ <- Neither should this."];
  33452. if (cached_has_bits & 0x00000001u) {
  33453. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  33454. this->a().data(), static_cast<int>(this->a().length()),
  33455. ::google::protobuf::internal::WireFormat::SERIALIZE,
  33456. "protobuf_unittest.TestCommentInjectionMessage.a");
  33457. target =
  33458. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  33459. 1, this->a(), target);
  33460. }
  33461. if (_internal_metadata_.have_unknown_fields()) {
  33462. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  33463. _internal_metadata_.unknown_fields(), target);
  33464. }
  33465. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestCommentInjectionMessage)
  33466. return target;
  33467. }
  33468. size_t TestCommentInjectionMessage::ByteSizeLong() const {
  33469. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestCommentInjectionMessage)
  33470. size_t total_size = 0;
  33471. if (_internal_metadata_.have_unknown_fields()) {
  33472. total_size +=
  33473. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  33474. _internal_metadata_.unknown_fields());
  33475. }
  33476. // optional string a = 1 [default = "*/ <- Neither should this."];
  33477. if (has_a()) {
  33478. total_size += 1 +
  33479. ::google::protobuf::internal::WireFormatLite::StringSize(
  33480. this->a());
  33481. }
  33482. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  33483. SetCachedSize(cached_size);
  33484. return total_size;
  33485. }
  33486. void TestCommentInjectionMessage::MergeFrom(const ::google::protobuf::Message& from) {
  33487. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestCommentInjectionMessage)
  33488. GOOGLE_DCHECK_NE(&from, this);
  33489. const TestCommentInjectionMessage* source =
  33490. ::google::protobuf::internal::DynamicCastToGenerated<const TestCommentInjectionMessage>(
  33491. &from);
  33492. if (source == NULL) {
  33493. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestCommentInjectionMessage)
  33494. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  33495. } else {
  33496. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestCommentInjectionMessage)
  33497. MergeFrom(*source);
  33498. }
  33499. }
  33500. void TestCommentInjectionMessage::MergeFrom(const TestCommentInjectionMessage& from) {
  33501. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestCommentInjectionMessage)
  33502. GOOGLE_DCHECK_NE(&from, this);
  33503. _internal_metadata_.MergeFrom(from._internal_metadata_);
  33504. ::google::protobuf::uint32 cached_has_bits = 0;
  33505. (void) cached_has_bits;
  33506. if (from.has_a()) {
  33507. set_a(from.a());
  33508. }
  33509. }
  33510. void TestCommentInjectionMessage::CopyFrom(const ::google::protobuf::Message& from) {
  33511. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestCommentInjectionMessage)
  33512. if (&from == this) return;
  33513. Clear();
  33514. MergeFrom(from);
  33515. }
  33516. void TestCommentInjectionMessage::CopyFrom(const TestCommentInjectionMessage& from) {
  33517. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestCommentInjectionMessage)
  33518. if (&from == this) return;
  33519. Clear();
  33520. MergeFrom(from);
  33521. }
  33522. bool TestCommentInjectionMessage::IsInitialized() const {
  33523. return true;
  33524. }
  33525. void TestCommentInjectionMessage::Swap(TestCommentInjectionMessage* other) {
  33526. if (other == this) return;
  33527. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  33528. InternalSwap(other);
  33529. } else {
  33530. TestCommentInjectionMessage* temp = New(GetArenaNoVirtual());
  33531. temp->MergeFrom(*other);
  33532. other->CopyFrom(*this);
  33533. InternalSwap(temp);
  33534. if (GetArenaNoVirtual() == NULL) {
  33535. delete temp;
  33536. }
  33537. }
  33538. }
  33539. void TestCommentInjectionMessage::UnsafeArenaSwap(TestCommentInjectionMessage* other) {
  33540. if (other == this) return;
  33541. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  33542. InternalSwap(other);
  33543. }
  33544. void TestCommentInjectionMessage::InternalSwap(TestCommentInjectionMessage* other) {
  33545. using std::swap;
  33546. a_.Swap(&other->a_, &::protobuf_unittest::TestCommentInjectionMessage::_i_give_permission_to_break_this_code_default_a_.get(),
  33547. GetArenaNoVirtual());
  33548. swap(_has_bits_[0], other->_has_bits_[0]);
  33549. _internal_metadata_.Swap(&other->_internal_metadata_);
  33550. }
  33551. ::google::protobuf::Metadata TestCommentInjectionMessage::GetMetadata() const {
  33552. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  33553. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  33554. }
  33555. // ===================================================================
  33556. void FooRequest::InitAsDefaultInstance() {
  33557. }
  33558. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  33559. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  33560. FooRequest::FooRequest()
  33561. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  33562. ::google::protobuf::internal::InitSCC(
  33563. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooRequest.base);
  33564. SharedCtor();
  33565. // @@protoc_insertion_point(constructor:protobuf_unittest.FooRequest)
  33566. }
  33567. FooRequest::FooRequest(::google::protobuf::Arena* arena)
  33568. : ::google::protobuf::Message(),
  33569. _internal_metadata_(arena) {
  33570. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooRequest.base);
  33571. SharedCtor();
  33572. RegisterArenaDtor(arena);
  33573. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.FooRequest)
  33574. }
  33575. FooRequest::FooRequest(const FooRequest& from)
  33576. : ::google::protobuf::Message(),
  33577. _internal_metadata_(NULL),
  33578. _has_bits_(from._has_bits_) {
  33579. _internal_metadata_.MergeFrom(from._internal_metadata_);
  33580. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.FooRequest)
  33581. }
  33582. void FooRequest::SharedCtor() {
  33583. }
  33584. FooRequest::~FooRequest() {
  33585. // @@protoc_insertion_point(destructor:protobuf_unittest.FooRequest)
  33586. SharedDtor();
  33587. }
  33588. void FooRequest::SharedDtor() {
  33589. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  33590. }
  33591. void FooRequest::ArenaDtor(void* object) {
  33592. FooRequest* _this = reinterpret_cast< FooRequest* >(object);
  33593. (void)_this;
  33594. }
  33595. void FooRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  33596. }
  33597. void FooRequest::SetCachedSize(int size) const {
  33598. _cached_size_.Set(size);
  33599. }
  33600. const ::google::protobuf::Descriptor* FooRequest::descriptor() {
  33601. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  33602. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  33603. }
  33604. const FooRequest& FooRequest::default_instance() {
  33605. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooRequest.base);
  33606. return *internal_default_instance();
  33607. }
  33608. void FooRequest::Clear() {
  33609. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.FooRequest)
  33610. ::google::protobuf::uint32 cached_has_bits = 0;
  33611. // Prevent compiler warnings about cached_has_bits being unused
  33612. (void) cached_has_bits;
  33613. _has_bits_.Clear();
  33614. _internal_metadata_.Clear();
  33615. }
  33616. bool FooRequest::MergePartialFromCodedStream(
  33617. ::google::protobuf::io::CodedInputStream* input) {
  33618. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  33619. ::google::protobuf::uint32 tag;
  33620. // @@protoc_insertion_point(parse_start:protobuf_unittest.FooRequest)
  33621. for (;;) {
  33622. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  33623. tag = p.first;
  33624. if (!p.second) goto handle_unusual;
  33625. handle_unusual:
  33626. if (tag == 0) {
  33627. goto success;
  33628. }
  33629. DO_(::google::protobuf::internal::WireFormat::SkipField(
  33630. input, tag, _internal_metadata_.mutable_unknown_fields()));
  33631. }
  33632. success:
  33633. // @@protoc_insertion_point(parse_success:protobuf_unittest.FooRequest)
  33634. return true;
  33635. failure:
  33636. // @@protoc_insertion_point(parse_failure:protobuf_unittest.FooRequest)
  33637. return false;
  33638. #undef DO_
  33639. }
  33640. void FooRequest::SerializeWithCachedSizes(
  33641. ::google::protobuf::io::CodedOutputStream* output) const {
  33642. // @@protoc_insertion_point(serialize_start:protobuf_unittest.FooRequest)
  33643. ::google::protobuf::uint32 cached_has_bits = 0;
  33644. (void) cached_has_bits;
  33645. if (_internal_metadata_.have_unknown_fields()) {
  33646. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  33647. _internal_metadata_.unknown_fields(), output);
  33648. }
  33649. // @@protoc_insertion_point(serialize_end:protobuf_unittest.FooRequest)
  33650. }
  33651. ::google::protobuf::uint8* FooRequest::InternalSerializeWithCachedSizesToArray(
  33652. bool deterministic, ::google::protobuf::uint8* target) const {
  33653. (void)deterministic; // Unused
  33654. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.FooRequest)
  33655. ::google::protobuf::uint32 cached_has_bits = 0;
  33656. (void) cached_has_bits;
  33657. if (_internal_metadata_.have_unknown_fields()) {
  33658. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  33659. _internal_metadata_.unknown_fields(), target);
  33660. }
  33661. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.FooRequest)
  33662. return target;
  33663. }
  33664. size_t FooRequest::ByteSizeLong() const {
  33665. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.FooRequest)
  33666. size_t total_size = 0;
  33667. if (_internal_metadata_.have_unknown_fields()) {
  33668. total_size +=
  33669. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  33670. _internal_metadata_.unknown_fields());
  33671. }
  33672. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  33673. SetCachedSize(cached_size);
  33674. return total_size;
  33675. }
  33676. void FooRequest::MergeFrom(const ::google::protobuf::Message& from) {
  33677. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.FooRequest)
  33678. GOOGLE_DCHECK_NE(&from, this);
  33679. const FooRequest* source =
  33680. ::google::protobuf::internal::DynamicCastToGenerated<const FooRequest>(
  33681. &from);
  33682. if (source == NULL) {
  33683. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.FooRequest)
  33684. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  33685. } else {
  33686. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.FooRequest)
  33687. MergeFrom(*source);
  33688. }
  33689. }
  33690. void FooRequest::MergeFrom(const FooRequest& from) {
  33691. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.FooRequest)
  33692. GOOGLE_DCHECK_NE(&from, this);
  33693. _internal_metadata_.MergeFrom(from._internal_metadata_);
  33694. ::google::protobuf::uint32 cached_has_bits = 0;
  33695. (void) cached_has_bits;
  33696. }
  33697. void FooRequest::CopyFrom(const ::google::protobuf::Message& from) {
  33698. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.FooRequest)
  33699. if (&from == this) return;
  33700. Clear();
  33701. MergeFrom(from);
  33702. }
  33703. void FooRequest::CopyFrom(const FooRequest& from) {
  33704. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.FooRequest)
  33705. if (&from == this) return;
  33706. Clear();
  33707. MergeFrom(from);
  33708. }
  33709. bool FooRequest::IsInitialized() const {
  33710. return true;
  33711. }
  33712. void FooRequest::Swap(FooRequest* other) {
  33713. if (other == this) return;
  33714. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  33715. InternalSwap(other);
  33716. } else {
  33717. FooRequest* temp = New(GetArenaNoVirtual());
  33718. temp->MergeFrom(*other);
  33719. other->CopyFrom(*this);
  33720. InternalSwap(temp);
  33721. if (GetArenaNoVirtual() == NULL) {
  33722. delete temp;
  33723. }
  33724. }
  33725. }
  33726. void FooRequest::UnsafeArenaSwap(FooRequest* other) {
  33727. if (other == this) return;
  33728. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  33729. InternalSwap(other);
  33730. }
  33731. void FooRequest::InternalSwap(FooRequest* other) {
  33732. using std::swap;
  33733. swap(_has_bits_[0], other->_has_bits_[0]);
  33734. _internal_metadata_.Swap(&other->_internal_metadata_);
  33735. }
  33736. ::google::protobuf::Metadata FooRequest::GetMetadata() const {
  33737. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  33738. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  33739. }
  33740. // ===================================================================
  33741. void FooResponse::InitAsDefaultInstance() {
  33742. }
  33743. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  33744. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  33745. FooResponse::FooResponse()
  33746. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  33747. ::google::protobuf::internal::InitSCC(
  33748. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooResponse.base);
  33749. SharedCtor();
  33750. // @@protoc_insertion_point(constructor:protobuf_unittest.FooResponse)
  33751. }
  33752. FooResponse::FooResponse(::google::protobuf::Arena* arena)
  33753. : ::google::protobuf::Message(),
  33754. _internal_metadata_(arena) {
  33755. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooResponse.base);
  33756. SharedCtor();
  33757. RegisterArenaDtor(arena);
  33758. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.FooResponse)
  33759. }
  33760. FooResponse::FooResponse(const FooResponse& from)
  33761. : ::google::protobuf::Message(),
  33762. _internal_metadata_(NULL),
  33763. _has_bits_(from._has_bits_) {
  33764. _internal_metadata_.MergeFrom(from._internal_metadata_);
  33765. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.FooResponse)
  33766. }
  33767. void FooResponse::SharedCtor() {
  33768. }
  33769. FooResponse::~FooResponse() {
  33770. // @@protoc_insertion_point(destructor:protobuf_unittest.FooResponse)
  33771. SharedDtor();
  33772. }
  33773. void FooResponse::SharedDtor() {
  33774. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  33775. }
  33776. void FooResponse::ArenaDtor(void* object) {
  33777. FooResponse* _this = reinterpret_cast< FooResponse* >(object);
  33778. (void)_this;
  33779. }
  33780. void FooResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  33781. }
  33782. void FooResponse::SetCachedSize(int size) const {
  33783. _cached_size_.Set(size);
  33784. }
  33785. const ::google::protobuf::Descriptor* FooResponse::descriptor() {
  33786. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  33787. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  33788. }
  33789. const FooResponse& FooResponse::default_instance() {
  33790. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooResponse.base);
  33791. return *internal_default_instance();
  33792. }
  33793. void FooResponse::Clear() {
  33794. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.FooResponse)
  33795. ::google::protobuf::uint32 cached_has_bits = 0;
  33796. // Prevent compiler warnings about cached_has_bits being unused
  33797. (void) cached_has_bits;
  33798. _has_bits_.Clear();
  33799. _internal_metadata_.Clear();
  33800. }
  33801. bool FooResponse::MergePartialFromCodedStream(
  33802. ::google::protobuf::io::CodedInputStream* input) {
  33803. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  33804. ::google::protobuf::uint32 tag;
  33805. // @@protoc_insertion_point(parse_start:protobuf_unittest.FooResponse)
  33806. for (;;) {
  33807. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  33808. tag = p.first;
  33809. if (!p.second) goto handle_unusual;
  33810. handle_unusual:
  33811. if (tag == 0) {
  33812. goto success;
  33813. }
  33814. DO_(::google::protobuf::internal::WireFormat::SkipField(
  33815. input, tag, _internal_metadata_.mutable_unknown_fields()));
  33816. }
  33817. success:
  33818. // @@protoc_insertion_point(parse_success:protobuf_unittest.FooResponse)
  33819. return true;
  33820. failure:
  33821. // @@protoc_insertion_point(parse_failure:protobuf_unittest.FooResponse)
  33822. return false;
  33823. #undef DO_
  33824. }
  33825. void FooResponse::SerializeWithCachedSizes(
  33826. ::google::protobuf::io::CodedOutputStream* output) const {
  33827. // @@protoc_insertion_point(serialize_start:protobuf_unittest.FooResponse)
  33828. ::google::protobuf::uint32 cached_has_bits = 0;
  33829. (void) cached_has_bits;
  33830. if (_internal_metadata_.have_unknown_fields()) {
  33831. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  33832. _internal_metadata_.unknown_fields(), output);
  33833. }
  33834. // @@protoc_insertion_point(serialize_end:protobuf_unittest.FooResponse)
  33835. }
  33836. ::google::protobuf::uint8* FooResponse::InternalSerializeWithCachedSizesToArray(
  33837. bool deterministic, ::google::protobuf::uint8* target) const {
  33838. (void)deterministic; // Unused
  33839. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.FooResponse)
  33840. ::google::protobuf::uint32 cached_has_bits = 0;
  33841. (void) cached_has_bits;
  33842. if (_internal_metadata_.have_unknown_fields()) {
  33843. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  33844. _internal_metadata_.unknown_fields(), target);
  33845. }
  33846. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.FooResponse)
  33847. return target;
  33848. }
  33849. size_t FooResponse::ByteSizeLong() const {
  33850. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.FooResponse)
  33851. size_t total_size = 0;
  33852. if (_internal_metadata_.have_unknown_fields()) {
  33853. total_size +=
  33854. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  33855. _internal_metadata_.unknown_fields());
  33856. }
  33857. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  33858. SetCachedSize(cached_size);
  33859. return total_size;
  33860. }
  33861. void FooResponse::MergeFrom(const ::google::protobuf::Message& from) {
  33862. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.FooResponse)
  33863. GOOGLE_DCHECK_NE(&from, this);
  33864. const FooResponse* source =
  33865. ::google::protobuf::internal::DynamicCastToGenerated<const FooResponse>(
  33866. &from);
  33867. if (source == NULL) {
  33868. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.FooResponse)
  33869. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  33870. } else {
  33871. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.FooResponse)
  33872. MergeFrom(*source);
  33873. }
  33874. }
  33875. void FooResponse::MergeFrom(const FooResponse& from) {
  33876. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.FooResponse)
  33877. GOOGLE_DCHECK_NE(&from, this);
  33878. _internal_metadata_.MergeFrom(from._internal_metadata_);
  33879. ::google::protobuf::uint32 cached_has_bits = 0;
  33880. (void) cached_has_bits;
  33881. }
  33882. void FooResponse::CopyFrom(const ::google::protobuf::Message& from) {
  33883. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.FooResponse)
  33884. if (&from == this) return;
  33885. Clear();
  33886. MergeFrom(from);
  33887. }
  33888. void FooResponse::CopyFrom(const FooResponse& from) {
  33889. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.FooResponse)
  33890. if (&from == this) return;
  33891. Clear();
  33892. MergeFrom(from);
  33893. }
  33894. bool FooResponse::IsInitialized() const {
  33895. return true;
  33896. }
  33897. void FooResponse::Swap(FooResponse* other) {
  33898. if (other == this) return;
  33899. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  33900. InternalSwap(other);
  33901. } else {
  33902. FooResponse* temp = New(GetArenaNoVirtual());
  33903. temp->MergeFrom(*other);
  33904. other->CopyFrom(*this);
  33905. InternalSwap(temp);
  33906. if (GetArenaNoVirtual() == NULL) {
  33907. delete temp;
  33908. }
  33909. }
  33910. }
  33911. void FooResponse::UnsafeArenaSwap(FooResponse* other) {
  33912. if (other == this) return;
  33913. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  33914. InternalSwap(other);
  33915. }
  33916. void FooResponse::InternalSwap(FooResponse* other) {
  33917. using std::swap;
  33918. swap(_has_bits_[0], other->_has_bits_[0]);
  33919. _internal_metadata_.Swap(&other->_internal_metadata_);
  33920. }
  33921. ::google::protobuf::Metadata FooResponse::GetMetadata() const {
  33922. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  33923. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  33924. }
  33925. // ===================================================================
  33926. void FooClientMessage::InitAsDefaultInstance() {
  33927. }
  33928. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  33929. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  33930. FooClientMessage::FooClientMessage()
  33931. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  33932. ::google::protobuf::internal::InitSCC(
  33933. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooClientMessage.base);
  33934. SharedCtor();
  33935. // @@protoc_insertion_point(constructor:protobuf_unittest.FooClientMessage)
  33936. }
  33937. FooClientMessage::FooClientMessage(::google::protobuf::Arena* arena)
  33938. : ::google::protobuf::Message(),
  33939. _internal_metadata_(arena) {
  33940. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooClientMessage.base);
  33941. SharedCtor();
  33942. RegisterArenaDtor(arena);
  33943. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.FooClientMessage)
  33944. }
  33945. FooClientMessage::FooClientMessage(const FooClientMessage& from)
  33946. : ::google::protobuf::Message(),
  33947. _internal_metadata_(NULL),
  33948. _has_bits_(from._has_bits_) {
  33949. _internal_metadata_.MergeFrom(from._internal_metadata_);
  33950. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.FooClientMessage)
  33951. }
  33952. void FooClientMessage::SharedCtor() {
  33953. }
  33954. FooClientMessage::~FooClientMessage() {
  33955. // @@protoc_insertion_point(destructor:protobuf_unittest.FooClientMessage)
  33956. SharedDtor();
  33957. }
  33958. void FooClientMessage::SharedDtor() {
  33959. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  33960. }
  33961. void FooClientMessage::ArenaDtor(void* object) {
  33962. FooClientMessage* _this = reinterpret_cast< FooClientMessage* >(object);
  33963. (void)_this;
  33964. }
  33965. void FooClientMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  33966. }
  33967. void FooClientMessage::SetCachedSize(int size) const {
  33968. _cached_size_.Set(size);
  33969. }
  33970. const ::google::protobuf::Descriptor* FooClientMessage::descriptor() {
  33971. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  33972. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  33973. }
  33974. const FooClientMessage& FooClientMessage::default_instance() {
  33975. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooClientMessage.base);
  33976. return *internal_default_instance();
  33977. }
  33978. void FooClientMessage::Clear() {
  33979. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.FooClientMessage)
  33980. ::google::protobuf::uint32 cached_has_bits = 0;
  33981. // Prevent compiler warnings about cached_has_bits being unused
  33982. (void) cached_has_bits;
  33983. _has_bits_.Clear();
  33984. _internal_metadata_.Clear();
  33985. }
  33986. bool FooClientMessage::MergePartialFromCodedStream(
  33987. ::google::protobuf::io::CodedInputStream* input) {
  33988. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  33989. ::google::protobuf::uint32 tag;
  33990. // @@protoc_insertion_point(parse_start:protobuf_unittest.FooClientMessage)
  33991. for (;;) {
  33992. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  33993. tag = p.first;
  33994. if (!p.second) goto handle_unusual;
  33995. handle_unusual:
  33996. if (tag == 0) {
  33997. goto success;
  33998. }
  33999. DO_(::google::protobuf::internal::WireFormat::SkipField(
  34000. input, tag, _internal_metadata_.mutable_unknown_fields()));
  34001. }
  34002. success:
  34003. // @@protoc_insertion_point(parse_success:protobuf_unittest.FooClientMessage)
  34004. return true;
  34005. failure:
  34006. // @@protoc_insertion_point(parse_failure:protobuf_unittest.FooClientMessage)
  34007. return false;
  34008. #undef DO_
  34009. }
  34010. void FooClientMessage::SerializeWithCachedSizes(
  34011. ::google::protobuf::io::CodedOutputStream* output) const {
  34012. // @@protoc_insertion_point(serialize_start:protobuf_unittest.FooClientMessage)
  34013. ::google::protobuf::uint32 cached_has_bits = 0;
  34014. (void) cached_has_bits;
  34015. if (_internal_metadata_.have_unknown_fields()) {
  34016. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  34017. _internal_metadata_.unknown_fields(), output);
  34018. }
  34019. // @@protoc_insertion_point(serialize_end:protobuf_unittest.FooClientMessage)
  34020. }
  34021. ::google::protobuf::uint8* FooClientMessage::InternalSerializeWithCachedSizesToArray(
  34022. bool deterministic, ::google::protobuf::uint8* target) const {
  34023. (void)deterministic; // Unused
  34024. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.FooClientMessage)
  34025. ::google::protobuf::uint32 cached_has_bits = 0;
  34026. (void) cached_has_bits;
  34027. if (_internal_metadata_.have_unknown_fields()) {
  34028. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  34029. _internal_metadata_.unknown_fields(), target);
  34030. }
  34031. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.FooClientMessage)
  34032. return target;
  34033. }
  34034. size_t FooClientMessage::ByteSizeLong() const {
  34035. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.FooClientMessage)
  34036. size_t total_size = 0;
  34037. if (_internal_metadata_.have_unknown_fields()) {
  34038. total_size +=
  34039. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  34040. _internal_metadata_.unknown_fields());
  34041. }
  34042. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  34043. SetCachedSize(cached_size);
  34044. return total_size;
  34045. }
  34046. void FooClientMessage::MergeFrom(const ::google::protobuf::Message& from) {
  34047. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.FooClientMessage)
  34048. GOOGLE_DCHECK_NE(&from, this);
  34049. const FooClientMessage* source =
  34050. ::google::protobuf::internal::DynamicCastToGenerated<const FooClientMessage>(
  34051. &from);
  34052. if (source == NULL) {
  34053. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.FooClientMessage)
  34054. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  34055. } else {
  34056. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.FooClientMessage)
  34057. MergeFrom(*source);
  34058. }
  34059. }
  34060. void FooClientMessage::MergeFrom(const FooClientMessage& from) {
  34061. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.FooClientMessage)
  34062. GOOGLE_DCHECK_NE(&from, this);
  34063. _internal_metadata_.MergeFrom(from._internal_metadata_);
  34064. ::google::protobuf::uint32 cached_has_bits = 0;
  34065. (void) cached_has_bits;
  34066. }
  34067. void FooClientMessage::CopyFrom(const ::google::protobuf::Message& from) {
  34068. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.FooClientMessage)
  34069. if (&from == this) return;
  34070. Clear();
  34071. MergeFrom(from);
  34072. }
  34073. void FooClientMessage::CopyFrom(const FooClientMessage& from) {
  34074. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.FooClientMessage)
  34075. if (&from == this) return;
  34076. Clear();
  34077. MergeFrom(from);
  34078. }
  34079. bool FooClientMessage::IsInitialized() const {
  34080. return true;
  34081. }
  34082. void FooClientMessage::Swap(FooClientMessage* other) {
  34083. if (other == this) return;
  34084. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  34085. InternalSwap(other);
  34086. } else {
  34087. FooClientMessage* temp = New(GetArenaNoVirtual());
  34088. temp->MergeFrom(*other);
  34089. other->CopyFrom(*this);
  34090. InternalSwap(temp);
  34091. if (GetArenaNoVirtual() == NULL) {
  34092. delete temp;
  34093. }
  34094. }
  34095. }
  34096. void FooClientMessage::UnsafeArenaSwap(FooClientMessage* other) {
  34097. if (other == this) return;
  34098. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  34099. InternalSwap(other);
  34100. }
  34101. void FooClientMessage::InternalSwap(FooClientMessage* other) {
  34102. using std::swap;
  34103. swap(_has_bits_[0], other->_has_bits_[0]);
  34104. _internal_metadata_.Swap(&other->_internal_metadata_);
  34105. }
  34106. ::google::protobuf::Metadata FooClientMessage::GetMetadata() const {
  34107. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  34108. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  34109. }
  34110. // ===================================================================
  34111. void FooServerMessage::InitAsDefaultInstance() {
  34112. }
  34113. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  34114. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  34115. FooServerMessage::FooServerMessage()
  34116. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  34117. ::google::protobuf::internal::InitSCC(
  34118. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooServerMessage.base);
  34119. SharedCtor();
  34120. // @@protoc_insertion_point(constructor:protobuf_unittest.FooServerMessage)
  34121. }
  34122. FooServerMessage::FooServerMessage(::google::protobuf::Arena* arena)
  34123. : ::google::protobuf::Message(),
  34124. _internal_metadata_(arena) {
  34125. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooServerMessage.base);
  34126. SharedCtor();
  34127. RegisterArenaDtor(arena);
  34128. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.FooServerMessage)
  34129. }
  34130. FooServerMessage::FooServerMessage(const FooServerMessage& from)
  34131. : ::google::protobuf::Message(),
  34132. _internal_metadata_(NULL),
  34133. _has_bits_(from._has_bits_) {
  34134. _internal_metadata_.MergeFrom(from._internal_metadata_);
  34135. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.FooServerMessage)
  34136. }
  34137. void FooServerMessage::SharedCtor() {
  34138. }
  34139. FooServerMessage::~FooServerMessage() {
  34140. // @@protoc_insertion_point(destructor:protobuf_unittest.FooServerMessage)
  34141. SharedDtor();
  34142. }
  34143. void FooServerMessage::SharedDtor() {
  34144. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  34145. }
  34146. void FooServerMessage::ArenaDtor(void* object) {
  34147. FooServerMessage* _this = reinterpret_cast< FooServerMessage* >(object);
  34148. (void)_this;
  34149. }
  34150. void FooServerMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  34151. }
  34152. void FooServerMessage::SetCachedSize(int size) const {
  34153. _cached_size_.Set(size);
  34154. }
  34155. const ::google::protobuf::Descriptor* FooServerMessage::descriptor() {
  34156. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  34157. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  34158. }
  34159. const FooServerMessage& FooServerMessage::default_instance() {
  34160. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_FooServerMessage.base);
  34161. return *internal_default_instance();
  34162. }
  34163. void FooServerMessage::Clear() {
  34164. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.FooServerMessage)
  34165. ::google::protobuf::uint32 cached_has_bits = 0;
  34166. // Prevent compiler warnings about cached_has_bits being unused
  34167. (void) cached_has_bits;
  34168. _has_bits_.Clear();
  34169. _internal_metadata_.Clear();
  34170. }
  34171. bool FooServerMessage::MergePartialFromCodedStream(
  34172. ::google::protobuf::io::CodedInputStream* input) {
  34173. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  34174. ::google::protobuf::uint32 tag;
  34175. // @@protoc_insertion_point(parse_start:protobuf_unittest.FooServerMessage)
  34176. for (;;) {
  34177. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  34178. tag = p.first;
  34179. if (!p.second) goto handle_unusual;
  34180. handle_unusual:
  34181. if (tag == 0) {
  34182. goto success;
  34183. }
  34184. DO_(::google::protobuf::internal::WireFormat::SkipField(
  34185. input, tag, _internal_metadata_.mutable_unknown_fields()));
  34186. }
  34187. success:
  34188. // @@protoc_insertion_point(parse_success:protobuf_unittest.FooServerMessage)
  34189. return true;
  34190. failure:
  34191. // @@protoc_insertion_point(parse_failure:protobuf_unittest.FooServerMessage)
  34192. return false;
  34193. #undef DO_
  34194. }
  34195. void FooServerMessage::SerializeWithCachedSizes(
  34196. ::google::protobuf::io::CodedOutputStream* output) const {
  34197. // @@protoc_insertion_point(serialize_start:protobuf_unittest.FooServerMessage)
  34198. ::google::protobuf::uint32 cached_has_bits = 0;
  34199. (void) cached_has_bits;
  34200. if (_internal_metadata_.have_unknown_fields()) {
  34201. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  34202. _internal_metadata_.unknown_fields(), output);
  34203. }
  34204. // @@protoc_insertion_point(serialize_end:protobuf_unittest.FooServerMessage)
  34205. }
  34206. ::google::protobuf::uint8* FooServerMessage::InternalSerializeWithCachedSizesToArray(
  34207. bool deterministic, ::google::protobuf::uint8* target) const {
  34208. (void)deterministic; // Unused
  34209. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.FooServerMessage)
  34210. ::google::protobuf::uint32 cached_has_bits = 0;
  34211. (void) cached_has_bits;
  34212. if (_internal_metadata_.have_unknown_fields()) {
  34213. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  34214. _internal_metadata_.unknown_fields(), target);
  34215. }
  34216. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.FooServerMessage)
  34217. return target;
  34218. }
  34219. size_t FooServerMessage::ByteSizeLong() const {
  34220. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.FooServerMessage)
  34221. size_t total_size = 0;
  34222. if (_internal_metadata_.have_unknown_fields()) {
  34223. total_size +=
  34224. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  34225. _internal_metadata_.unknown_fields());
  34226. }
  34227. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  34228. SetCachedSize(cached_size);
  34229. return total_size;
  34230. }
  34231. void FooServerMessage::MergeFrom(const ::google::protobuf::Message& from) {
  34232. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.FooServerMessage)
  34233. GOOGLE_DCHECK_NE(&from, this);
  34234. const FooServerMessage* source =
  34235. ::google::protobuf::internal::DynamicCastToGenerated<const FooServerMessage>(
  34236. &from);
  34237. if (source == NULL) {
  34238. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.FooServerMessage)
  34239. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  34240. } else {
  34241. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.FooServerMessage)
  34242. MergeFrom(*source);
  34243. }
  34244. }
  34245. void FooServerMessage::MergeFrom(const FooServerMessage& from) {
  34246. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.FooServerMessage)
  34247. GOOGLE_DCHECK_NE(&from, this);
  34248. _internal_metadata_.MergeFrom(from._internal_metadata_);
  34249. ::google::protobuf::uint32 cached_has_bits = 0;
  34250. (void) cached_has_bits;
  34251. }
  34252. void FooServerMessage::CopyFrom(const ::google::protobuf::Message& from) {
  34253. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.FooServerMessage)
  34254. if (&from == this) return;
  34255. Clear();
  34256. MergeFrom(from);
  34257. }
  34258. void FooServerMessage::CopyFrom(const FooServerMessage& from) {
  34259. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.FooServerMessage)
  34260. if (&from == this) return;
  34261. Clear();
  34262. MergeFrom(from);
  34263. }
  34264. bool FooServerMessage::IsInitialized() const {
  34265. return true;
  34266. }
  34267. void FooServerMessage::Swap(FooServerMessage* other) {
  34268. if (other == this) return;
  34269. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  34270. InternalSwap(other);
  34271. } else {
  34272. FooServerMessage* temp = New(GetArenaNoVirtual());
  34273. temp->MergeFrom(*other);
  34274. other->CopyFrom(*this);
  34275. InternalSwap(temp);
  34276. if (GetArenaNoVirtual() == NULL) {
  34277. delete temp;
  34278. }
  34279. }
  34280. }
  34281. void FooServerMessage::UnsafeArenaSwap(FooServerMessage* other) {
  34282. if (other == this) return;
  34283. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  34284. InternalSwap(other);
  34285. }
  34286. void FooServerMessage::InternalSwap(FooServerMessage* other) {
  34287. using std::swap;
  34288. swap(_has_bits_[0], other->_has_bits_[0]);
  34289. _internal_metadata_.Swap(&other->_internal_metadata_);
  34290. }
  34291. ::google::protobuf::Metadata FooServerMessage::GetMetadata() const {
  34292. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  34293. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  34294. }
  34295. // ===================================================================
  34296. void BarRequest::InitAsDefaultInstance() {
  34297. }
  34298. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  34299. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  34300. BarRequest::BarRequest()
  34301. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  34302. ::google::protobuf::internal::InitSCC(
  34303. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BarRequest.base);
  34304. SharedCtor();
  34305. // @@protoc_insertion_point(constructor:protobuf_unittest.BarRequest)
  34306. }
  34307. BarRequest::BarRequest(::google::protobuf::Arena* arena)
  34308. : ::google::protobuf::Message(),
  34309. _internal_metadata_(arena) {
  34310. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BarRequest.base);
  34311. SharedCtor();
  34312. RegisterArenaDtor(arena);
  34313. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.BarRequest)
  34314. }
  34315. BarRequest::BarRequest(const BarRequest& from)
  34316. : ::google::protobuf::Message(),
  34317. _internal_metadata_(NULL),
  34318. _has_bits_(from._has_bits_) {
  34319. _internal_metadata_.MergeFrom(from._internal_metadata_);
  34320. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.BarRequest)
  34321. }
  34322. void BarRequest::SharedCtor() {
  34323. }
  34324. BarRequest::~BarRequest() {
  34325. // @@protoc_insertion_point(destructor:protobuf_unittest.BarRequest)
  34326. SharedDtor();
  34327. }
  34328. void BarRequest::SharedDtor() {
  34329. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  34330. }
  34331. void BarRequest::ArenaDtor(void* object) {
  34332. BarRequest* _this = reinterpret_cast< BarRequest* >(object);
  34333. (void)_this;
  34334. }
  34335. void BarRequest::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  34336. }
  34337. void BarRequest::SetCachedSize(int size) const {
  34338. _cached_size_.Set(size);
  34339. }
  34340. const ::google::protobuf::Descriptor* BarRequest::descriptor() {
  34341. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  34342. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  34343. }
  34344. const BarRequest& BarRequest::default_instance() {
  34345. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BarRequest.base);
  34346. return *internal_default_instance();
  34347. }
  34348. void BarRequest::Clear() {
  34349. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.BarRequest)
  34350. ::google::protobuf::uint32 cached_has_bits = 0;
  34351. // Prevent compiler warnings about cached_has_bits being unused
  34352. (void) cached_has_bits;
  34353. _has_bits_.Clear();
  34354. _internal_metadata_.Clear();
  34355. }
  34356. bool BarRequest::MergePartialFromCodedStream(
  34357. ::google::protobuf::io::CodedInputStream* input) {
  34358. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  34359. ::google::protobuf::uint32 tag;
  34360. // @@protoc_insertion_point(parse_start:protobuf_unittest.BarRequest)
  34361. for (;;) {
  34362. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  34363. tag = p.first;
  34364. if (!p.second) goto handle_unusual;
  34365. handle_unusual:
  34366. if (tag == 0) {
  34367. goto success;
  34368. }
  34369. DO_(::google::protobuf::internal::WireFormat::SkipField(
  34370. input, tag, _internal_metadata_.mutable_unknown_fields()));
  34371. }
  34372. success:
  34373. // @@protoc_insertion_point(parse_success:protobuf_unittest.BarRequest)
  34374. return true;
  34375. failure:
  34376. // @@protoc_insertion_point(parse_failure:protobuf_unittest.BarRequest)
  34377. return false;
  34378. #undef DO_
  34379. }
  34380. void BarRequest::SerializeWithCachedSizes(
  34381. ::google::protobuf::io::CodedOutputStream* output) const {
  34382. // @@protoc_insertion_point(serialize_start:protobuf_unittest.BarRequest)
  34383. ::google::protobuf::uint32 cached_has_bits = 0;
  34384. (void) cached_has_bits;
  34385. if (_internal_metadata_.have_unknown_fields()) {
  34386. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  34387. _internal_metadata_.unknown_fields(), output);
  34388. }
  34389. // @@protoc_insertion_point(serialize_end:protobuf_unittest.BarRequest)
  34390. }
  34391. ::google::protobuf::uint8* BarRequest::InternalSerializeWithCachedSizesToArray(
  34392. bool deterministic, ::google::protobuf::uint8* target) const {
  34393. (void)deterministic; // Unused
  34394. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.BarRequest)
  34395. ::google::protobuf::uint32 cached_has_bits = 0;
  34396. (void) cached_has_bits;
  34397. if (_internal_metadata_.have_unknown_fields()) {
  34398. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  34399. _internal_metadata_.unknown_fields(), target);
  34400. }
  34401. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.BarRequest)
  34402. return target;
  34403. }
  34404. size_t BarRequest::ByteSizeLong() const {
  34405. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.BarRequest)
  34406. size_t total_size = 0;
  34407. if (_internal_metadata_.have_unknown_fields()) {
  34408. total_size +=
  34409. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  34410. _internal_metadata_.unknown_fields());
  34411. }
  34412. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  34413. SetCachedSize(cached_size);
  34414. return total_size;
  34415. }
  34416. void BarRequest::MergeFrom(const ::google::protobuf::Message& from) {
  34417. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.BarRequest)
  34418. GOOGLE_DCHECK_NE(&from, this);
  34419. const BarRequest* source =
  34420. ::google::protobuf::internal::DynamicCastToGenerated<const BarRequest>(
  34421. &from);
  34422. if (source == NULL) {
  34423. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.BarRequest)
  34424. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  34425. } else {
  34426. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.BarRequest)
  34427. MergeFrom(*source);
  34428. }
  34429. }
  34430. void BarRequest::MergeFrom(const BarRequest& from) {
  34431. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.BarRequest)
  34432. GOOGLE_DCHECK_NE(&from, this);
  34433. _internal_metadata_.MergeFrom(from._internal_metadata_);
  34434. ::google::protobuf::uint32 cached_has_bits = 0;
  34435. (void) cached_has_bits;
  34436. }
  34437. void BarRequest::CopyFrom(const ::google::protobuf::Message& from) {
  34438. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.BarRequest)
  34439. if (&from == this) return;
  34440. Clear();
  34441. MergeFrom(from);
  34442. }
  34443. void BarRequest::CopyFrom(const BarRequest& from) {
  34444. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.BarRequest)
  34445. if (&from == this) return;
  34446. Clear();
  34447. MergeFrom(from);
  34448. }
  34449. bool BarRequest::IsInitialized() const {
  34450. return true;
  34451. }
  34452. void BarRequest::Swap(BarRequest* other) {
  34453. if (other == this) return;
  34454. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  34455. InternalSwap(other);
  34456. } else {
  34457. BarRequest* temp = New(GetArenaNoVirtual());
  34458. temp->MergeFrom(*other);
  34459. other->CopyFrom(*this);
  34460. InternalSwap(temp);
  34461. if (GetArenaNoVirtual() == NULL) {
  34462. delete temp;
  34463. }
  34464. }
  34465. }
  34466. void BarRequest::UnsafeArenaSwap(BarRequest* other) {
  34467. if (other == this) return;
  34468. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  34469. InternalSwap(other);
  34470. }
  34471. void BarRequest::InternalSwap(BarRequest* other) {
  34472. using std::swap;
  34473. swap(_has_bits_[0], other->_has_bits_[0]);
  34474. _internal_metadata_.Swap(&other->_internal_metadata_);
  34475. }
  34476. ::google::protobuf::Metadata BarRequest::GetMetadata() const {
  34477. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  34478. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  34479. }
  34480. // ===================================================================
  34481. void BarResponse::InitAsDefaultInstance() {
  34482. }
  34483. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  34484. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  34485. BarResponse::BarResponse()
  34486. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  34487. ::google::protobuf::internal::InitSCC(
  34488. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BarResponse.base);
  34489. SharedCtor();
  34490. // @@protoc_insertion_point(constructor:protobuf_unittest.BarResponse)
  34491. }
  34492. BarResponse::BarResponse(::google::protobuf::Arena* arena)
  34493. : ::google::protobuf::Message(),
  34494. _internal_metadata_(arena) {
  34495. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BarResponse.base);
  34496. SharedCtor();
  34497. RegisterArenaDtor(arena);
  34498. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.BarResponse)
  34499. }
  34500. BarResponse::BarResponse(const BarResponse& from)
  34501. : ::google::protobuf::Message(),
  34502. _internal_metadata_(NULL),
  34503. _has_bits_(from._has_bits_) {
  34504. _internal_metadata_.MergeFrom(from._internal_metadata_);
  34505. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.BarResponse)
  34506. }
  34507. void BarResponse::SharedCtor() {
  34508. }
  34509. BarResponse::~BarResponse() {
  34510. // @@protoc_insertion_point(destructor:protobuf_unittest.BarResponse)
  34511. SharedDtor();
  34512. }
  34513. void BarResponse::SharedDtor() {
  34514. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  34515. }
  34516. void BarResponse::ArenaDtor(void* object) {
  34517. BarResponse* _this = reinterpret_cast< BarResponse* >(object);
  34518. (void)_this;
  34519. }
  34520. void BarResponse::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  34521. }
  34522. void BarResponse::SetCachedSize(int size) const {
  34523. _cached_size_.Set(size);
  34524. }
  34525. const ::google::protobuf::Descriptor* BarResponse::descriptor() {
  34526. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  34527. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  34528. }
  34529. const BarResponse& BarResponse::default_instance() {
  34530. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_BarResponse.base);
  34531. return *internal_default_instance();
  34532. }
  34533. void BarResponse::Clear() {
  34534. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.BarResponse)
  34535. ::google::protobuf::uint32 cached_has_bits = 0;
  34536. // Prevent compiler warnings about cached_has_bits being unused
  34537. (void) cached_has_bits;
  34538. _has_bits_.Clear();
  34539. _internal_metadata_.Clear();
  34540. }
  34541. bool BarResponse::MergePartialFromCodedStream(
  34542. ::google::protobuf::io::CodedInputStream* input) {
  34543. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  34544. ::google::protobuf::uint32 tag;
  34545. // @@protoc_insertion_point(parse_start:protobuf_unittest.BarResponse)
  34546. for (;;) {
  34547. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  34548. tag = p.first;
  34549. if (!p.second) goto handle_unusual;
  34550. handle_unusual:
  34551. if (tag == 0) {
  34552. goto success;
  34553. }
  34554. DO_(::google::protobuf::internal::WireFormat::SkipField(
  34555. input, tag, _internal_metadata_.mutable_unknown_fields()));
  34556. }
  34557. success:
  34558. // @@protoc_insertion_point(parse_success:protobuf_unittest.BarResponse)
  34559. return true;
  34560. failure:
  34561. // @@protoc_insertion_point(parse_failure:protobuf_unittest.BarResponse)
  34562. return false;
  34563. #undef DO_
  34564. }
  34565. void BarResponse::SerializeWithCachedSizes(
  34566. ::google::protobuf::io::CodedOutputStream* output) const {
  34567. // @@protoc_insertion_point(serialize_start:protobuf_unittest.BarResponse)
  34568. ::google::protobuf::uint32 cached_has_bits = 0;
  34569. (void) cached_has_bits;
  34570. if (_internal_metadata_.have_unknown_fields()) {
  34571. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  34572. _internal_metadata_.unknown_fields(), output);
  34573. }
  34574. // @@protoc_insertion_point(serialize_end:protobuf_unittest.BarResponse)
  34575. }
  34576. ::google::protobuf::uint8* BarResponse::InternalSerializeWithCachedSizesToArray(
  34577. bool deterministic, ::google::protobuf::uint8* target) const {
  34578. (void)deterministic; // Unused
  34579. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.BarResponse)
  34580. ::google::protobuf::uint32 cached_has_bits = 0;
  34581. (void) cached_has_bits;
  34582. if (_internal_metadata_.have_unknown_fields()) {
  34583. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  34584. _internal_metadata_.unknown_fields(), target);
  34585. }
  34586. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.BarResponse)
  34587. return target;
  34588. }
  34589. size_t BarResponse::ByteSizeLong() const {
  34590. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.BarResponse)
  34591. size_t total_size = 0;
  34592. if (_internal_metadata_.have_unknown_fields()) {
  34593. total_size +=
  34594. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  34595. _internal_metadata_.unknown_fields());
  34596. }
  34597. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  34598. SetCachedSize(cached_size);
  34599. return total_size;
  34600. }
  34601. void BarResponse::MergeFrom(const ::google::protobuf::Message& from) {
  34602. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.BarResponse)
  34603. GOOGLE_DCHECK_NE(&from, this);
  34604. const BarResponse* source =
  34605. ::google::protobuf::internal::DynamicCastToGenerated<const BarResponse>(
  34606. &from);
  34607. if (source == NULL) {
  34608. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.BarResponse)
  34609. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  34610. } else {
  34611. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.BarResponse)
  34612. MergeFrom(*source);
  34613. }
  34614. }
  34615. void BarResponse::MergeFrom(const BarResponse& from) {
  34616. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.BarResponse)
  34617. GOOGLE_DCHECK_NE(&from, this);
  34618. _internal_metadata_.MergeFrom(from._internal_metadata_);
  34619. ::google::protobuf::uint32 cached_has_bits = 0;
  34620. (void) cached_has_bits;
  34621. }
  34622. void BarResponse::CopyFrom(const ::google::protobuf::Message& from) {
  34623. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.BarResponse)
  34624. if (&from == this) return;
  34625. Clear();
  34626. MergeFrom(from);
  34627. }
  34628. void BarResponse::CopyFrom(const BarResponse& from) {
  34629. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.BarResponse)
  34630. if (&from == this) return;
  34631. Clear();
  34632. MergeFrom(from);
  34633. }
  34634. bool BarResponse::IsInitialized() const {
  34635. return true;
  34636. }
  34637. void BarResponse::Swap(BarResponse* other) {
  34638. if (other == this) return;
  34639. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  34640. InternalSwap(other);
  34641. } else {
  34642. BarResponse* temp = New(GetArenaNoVirtual());
  34643. temp->MergeFrom(*other);
  34644. other->CopyFrom(*this);
  34645. InternalSwap(temp);
  34646. if (GetArenaNoVirtual() == NULL) {
  34647. delete temp;
  34648. }
  34649. }
  34650. }
  34651. void BarResponse::UnsafeArenaSwap(BarResponse* other) {
  34652. if (other == this) return;
  34653. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  34654. InternalSwap(other);
  34655. }
  34656. void BarResponse::InternalSwap(BarResponse* other) {
  34657. using std::swap;
  34658. swap(_has_bits_[0], other->_has_bits_[0]);
  34659. _internal_metadata_.Swap(&other->_internal_metadata_);
  34660. }
  34661. ::google::protobuf::Metadata BarResponse::GetMetadata() const {
  34662. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  34663. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  34664. }
  34665. // ===================================================================
  34666. void TestJsonName::InitAsDefaultInstance() {
  34667. }
  34668. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  34669. const int TestJsonName::kFieldName1FieldNumber;
  34670. const int TestJsonName::kFieldName2FieldNumber;
  34671. const int TestJsonName::kFieldName3FieldNumber;
  34672. const int TestJsonName::kFieldName4FieldNumber;
  34673. const int TestJsonName::kFIELDNAME5FieldNumber;
  34674. const int TestJsonName::kFieldName6FieldNumber;
  34675. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  34676. TestJsonName::TestJsonName()
  34677. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  34678. ::google::protobuf::internal::InitSCC(
  34679. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestJsonName.base);
  34680. SharedCtor();
  34681. // @@protoc_insertion_point(constructor:protobuf_unittest.TestJsonName)
  34682. }
  34683. TestJsonName::TestJsonName(::google::protobuf::Arena* arena)
  34684. : ::google::protobuf::Message(),
  34685. _internal_metadata_(arena) {
  34686. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestJsonName.base);
  34687. SharedCtor();
  34688. RegisterArenaDtor(arena);
  34689. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestJsonName)
  34690. }
  34691. TestJsonName::TestJsonName(const TestJsonName& from)
  34692. : ::google::protobuf::Message(),
  34693. _internal_metadata_(NULL),
  34694. _has_bits_(from._has_bits_) {
  34695. _internal_metadata_.MergeFrom(from._internal_metadata_);
  34696. ::memcpy(&field_name1_, &from.field_name1_,
  34697. static_cast<size_t>(reinterpret_cast<char*>(&field_name6_) -
  34698. reinterpret_cast<char*>(&field_name1_)) + sizeof(field_name6_));
  34699. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestJsonName)
  34700. }
  34701. void TestJsonName::SharedCtor() {
  34702. ::memset(&field_name1_, 0, static_cast<size_t>(
  34703. reinterpret_cast<char*>(&field_name6_) -
  34704. reinterpret_cast<char*>(&field_name1_)) + sizeof(field_name6_));
  34705. }
  34706. TestJsonName::~TestJsonName() {
  34707. // @@protoc_insertion_point(destructor:protobuf_unittest.TestJsonName)
  34708. SharedDtor();
  34709. }
  34710. void TestJsonName::SharedDtor() {
  34711. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  34712. }
  34713. void TestJsonName::ArenaDtor(void* object) {
  34714. TestJsonName* _this = reinterpret_cast< TestJsonName* >(object);
  34715. (void)_this;
  34716. }
  34717. void TestJsonName::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  34718. }
  34719. void TestJsonName::SetCachedSize(int size) const {
  34720. _cached_size_.Set(size);
  34721. }
  34722. const ::google::protobuf::Descriptor* TestJsonName::descriptor() {
  34723. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  34724. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  34725. }
  34726. const TestJsonName& TestJsonName::default_instance() {
  34727. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestJsonName.base);
  34728. return *internal_default_instance();
  34729. }
  34730. void TestJsonName::Clear() {
  34731. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestJsonName)
  34732. ::google::protobuf::uint32 cached_has_bits = 0;
  34733. // Prevent compiler warnings about cached_has_bits being unused
  34734. (void) cached_has_bits;
  34735. cached_has_bits = _has_bits_[0];
  34736. if (cached_has_bits & 63u) {
  34737. ::memset(&field_name1_, 0, static_cast<size_t>(
  34738. reinterpret_cast<char*>(&field_name6_) -
  34739. reinterpret_cast<char*>(&field_name1_)) + sizeof(field_name6_));
  34740. }
  34741. _has_bits_.Clear();
  34742. _internal_metadata_.Clear();
  34743. }
  34744. bool TestJsonName::MergePartialFromCodedStream(
  34745. ::google::protobuf::io::CodedInputStream* input) {
  34746. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  34747. ::google::protobuf::uint32 tag;
  34748. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestJsonName)
  34749. for (;;) {
  34750. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  34751. tag = p.first;
  34752. if (!p.second) goto handle_unusual;
  34753. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  34754. // optional int32 field_name1 = 1;
  34755. case 1: {
  34756. if (static_cast< ::google::protobuf::uint8>(tag) ==
  34757. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  34758. set_has_field_name1();
  34759. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  34760. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  34761. input, &field_name1_)));
  34762. } else {
  34763. goto handle_unusual;
  34764. }
  34765. break;
  34766. }
  34767. // optional int32 fieldName2 = 2;
  34768. case 2: {
  34769. if (static_cast< ::google::protobuf::uint8>(tag) ==
  34770. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  34771. set_has_fieldname2();
  34772. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  34773. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  34774. input, &fieldname2_)));
  34775. } else {
  34776. goto handle_unusual;
  34777. }
  34778. break;
  34779. }
  34780. // optional int32 FieldName3 = 3;
  34781. case 3: {
  34782. if (static_cast< ::google::protobuf::uint8>(tag) ==
  34783. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  34784. set_has_fieldname3();
  34785. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  34786. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  34787. input, &fieldname3_)));
  34788. } else {
  34789. goto handle_unusual;
  34790. }
  34791. break;
  34792. }
  34793. // optional int32 _field_name4 = 4;
  34794. case 4: {
  34795. if (static_cast< ::google::protobuf::uint8>(tag) ==
  34796. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  34797. set_has__field_name4();
  34798. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  34799. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  34800. input, &_field_name4_)));
  34801. } else {
  34802. goto handle_unusual;
  34803. }
  34804. break;
  34805. }
  34806. // optional int32 FIELD_NAME5 = 5;
  34807. case 5: {
  34808. if (static_cast< ::google::protobuf::uint8>(tag) ==
  34809. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  34810. set_has_field_name5();
  34811. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  34812. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  34813. input, &field_name5_)));
  34814. } else {
  34815. goto handle_unusual;
  34816. }
  34817. break;
  34818. }
  34819. // optional int32 field_name6 = 6[json_name = "@type"];
  34820. case 6: {
  34821. if (static_cast< ::google::protobuf::uint8>(tag) ==
  34822. static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
  34823. set_has_field_name6();
  34824. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  34825. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  34826. input, &field_name6_)));
  34827. } else {
  34828. goto handle_unusual;
  34829. }
  34830. break;
  34831. }
  34832. default: {
  34833. handle_unusual:
  34834. if (tag == 0) {
  34835. goto success;
  34836. }
  34837. DO_(::google::protobuf::internal::WireFormat::SkipField(
  34838. input, tag, _internal_metadata_.mutable_unknown_fields()));
  34839. break;
  34840. }
  34841. }
  34842. }
  34843. success:
  34844. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestJsonName)
  34845. return true;
  34846. failure:
  34847. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestJsonName)
  34848. return false;
  34849. #undef DO_
  34850. }
  34851. void TestJsonName::SerializeWithCachedSizes(
  34852. ::google::protobuf::io::CodedOutputStream* output) const {
  34853. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestJsonName)
  34854. ::google::protobuf::uint32 cached_has_bits = 0;
  34855. (void) cached_has_bits;
  34856. cached_has_bits = _has_bits_[0];
  34857. // optional int32 field_name1 = 1;
  34858. if (cached_has_bits & 0x00000001u) {
  34859. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->field_name1(), output);
  34860. }
  34861. // optional int32 fieldName2 = 2;
  34862. if (cached_has_bits & 0x00000002u) {
  34863. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->fieldname2(), output);
  34864. }
  34865. // optional int32 FieldName3 = 3;
  34866. if (cached_has_bits & 0x00000004u) {
  34867. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->fieldname3(), output);
  34868. }
  34869. // optional int32 _field_name4 = 4;
  34870. if (cached_has_bits & 0x00000008u) {
  34871. ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->_field_name4(), output);
  34872. }
  34873. // optional int32 FIELD_NAME5 = 5;
  34874. if (cached_has_bits & 0x00000010u) {
  34875. ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->field_name5(), output);
  34876. }
  34877. // optional int32 field_name6 = 6[json_name = "@type"];
  34878. if (cached_has_bits & 0x00000020u) {
  34879. ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->field_name6(), output);
  34880. }
  34881. if (_internal_metadata_.have_unknown_fields()) {
  34882. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  34883. _internal_metadata_.unknown_fields(), output);
  34884. }
  34885. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestJsonName)
  34886. }
  34887. ::google::protobuf::uint8* TestJsonName::InternalSerializeWithCachedSizesToArray(
  34888. bool deterministic, ::google::protobuf::uint8* target) const {
  34889. (void)deterministic; // Unused
  34890. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestJsonName)
  34891. ::google::protobuf::uint32 cached_has_bits = 0;
  34892. (void) cached_has_bits;
  34893. cached_has_bits = _has_bits_[0];
  34894. // optional int32 field_name1 = 1;
  34895. if (cached_has_bits & 0x00000001u) {
  34896. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->field_name1(), target);
  34897. }
  34898. // optional int32 fieldName2 = 2;
  34899. if (cached_has_bits & 0x00000002u) {
  34900. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->fieldname2(), target);
  34901. }
  34902. // optional int32 FieldName3 = 3;
  34903. if (cached_has_bits & 0x00000004u) {
  34904. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->fieldname3(), target);
  34905. }
  34906. // optional int32 _field_name4 = 4;
  34907. if (cached_has_bits & 0x00000008u) {
  34908. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->_field_name4(), target);
  34909. }
  34910. // optional int32 FIELD_NAME5 = 5;
  34911. if (cached_has_bits & 0x00000010u) {
  34912. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->field_name5(), target);
  34913. }
  34914. // optional int32 field_name6 = 6[json_name = "@type"];
  34915. if (cached_has_bits & 0x00000020u) {
  34916. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->field_name6(), target);
  34917. }
  34918. if (_internal_metadata_.have_unknown_fields()) {
  34919. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  34920. _internal_metadata_.unknown_fields(), target);
  34921. }
  34922. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestJsonName)
  34923. return target;
  34924. }
  34925. size_t TestJsonName::ByteSizeLong() const {
  34926. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestJsonName)
  34927. size_t total_size = 0;
  34928. if (_internal_metadata_.have_unknown_fields()) {
  34929. total_size +=
  34930. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  34931. _internal_metadata_.unknown_fields());
  34932. }
  34933. if (_has_bits_[0 / 32] & 63u) {
  34934. // optional int32 field_name1 = 1;
  34935. if (has_field_name1()) {
  34936. total_size += 1 +
  34937. ::google::protobuf::internal::WireFormatLite::Int32Size(
  34938. this->field_name1());
  34939. }
  34940. // optional int32 fieldName2 = 2;
  34941. if (has_fieldname2()) {
  34942. total_size += 1 +
  34943. ::google::protobuf::internal::WireFormatLite::Int32Size(
  34944. this->fieldname2());
  34945. }
  34946. // optional int32 FieldName3 = 3;
  34947. if (has_fieldname3()) {
  34948. total_size += 1 +
  34949. ::google::protobuf::internal::WireFormatLite::Int32Size(
  34950. this->fieldname3());
  34951. }
  34952. // optional int32 _field_name4 = 4;
  34953. if (has__field_name4()) {
  34954. total_size += 1 +
  34955. ::google::protobuf::internal::WireFormatLite::Int32Size(
  34956. this->_field_name4());
  34957. }
  34958. // optional int32 FIELD_NAME5 = 5;
  34959. if (has_field_name5()) {
  34960. total_size += 1 +
  34961. ::google::protobuf::internal::WireFormatLite::Int32Size(
  34962. this->field_name5());
  34963. }
  34964. // optional int32 field_name6 = 6[json_name = "@type"];
  34965. if (has_field_name6()) {
  34966. total_size += 1 +
  34967. ::google::protobuf::internal::WireFormatLite::Int32Size(
  34968. this->field_name6());
  34969. }
  34970. }
  34971. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  34972. SetCachedSize(cached_size);
  34973. return total_size;
  34974. }
  34975. void TestJsonName::MergeFrom(const ::google::protobuf::Message& from) {
  34976. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestJsonName)
  34977. GOOGLE_DCHECK_NE(&from, this);
  34978. const TestJsonName* source =
  34979. ::google::protobuf::internal::DynamicCastToGenerated<const TestJsonName>(
  34980. &from);
  34981. if (source == NULL) {
  34982. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestJsonName)
  34983. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  34984. } else {
  34985. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestJsonName)
  34986. MergeFrom(*source);
  34987. }
  34988. }
  34989. void TestJsonName::MergeFrom(const TestJsonName& from) {
  34990. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestJsonName)
  34991. GOOGLE_DCHECK_NE(&from, this);
  34992. _internal_metadata_.MergeFrom(from._internal_metadata_);
  34993. ::google::protobuf::uint32 cached_has_bits = 0;
  34994. (void) cached_has_bits;
  34995. cached_has_bits = from._has_bits_[0];
  34996. if (cached_has_bits & 63u) {
  34997. if (cached_has_bits & 0x00000001u) {
  34998. field_name1_ = from.field_name1_;
  34999. }
  35000. if (cached_has_bits & 0x00000002u) {
  35001. fieldname2_ = from.fieldname2_;
  35002. }
  35003. if (cached_has_bits & 0x00000004u) {
  35004. fieldname3_ = from.fieldname3_;
  35005. }
  35006. if (cached_has_bits & 0x00000008u) {
  35007. _field_name4_ = from._field_name4_;
  35008. }
  35009. if (cached_has_bits & 0x00000010u) {
  35010. field_name5_ = from.field_name5_;
  35011. }
  35012. if (cached_has_bits & 0x00000020u) {
  35013. field_name6_ = from.field_name6_;
  35014. }
  35015. _has_bits_[0] |= cached_has_bits;
  35016. }
  35017. }
  35018. void TestJsonName::CopyFrom(const ::google::protobuf::Message& from) {
  35019. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestJsonName)
  35020. if (&from == this) return;
  35021. Clear();
  35022. MergeFrom(from);
  35023. }
  35024. void TestJsonName::CopyFrom(const TestJsonName& from) {
  35025. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestJsonName)
  35026. if (&from == this) return;
  35027. Clear();
  35028. MergeFrom(from);
  35029. }
  35030. bool TestJsonName::IsInitialized() const {
  35031. return true;
  35032. }
  35033. void TestJsonName::Swap(TestJsonName* other) {
  35034. if (other == this) return;
  35035. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  35036. InternalSwap(other);
  35037. } else {
  35038. TestJsonName* temp = New(GetArenaNoVirtual());
  35039. temp->MergeFrom(*other);
  35040. other->CopyFrom(*this);
  35041. InternalSwap(temp);
  35042. if (GetArenaNoVirtual() == NULL) {
  35043. delete temp;
  35044. }
  35045. }
  35046. }
  35047. void TestJsonName::UnsafeArenaSwap(TestJsonName* other) {
  35048. if (other == this) return;
  35049. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  35050. InternalSwap(other);
  35051. }
  35052. void TestJsonName::InternalSwap(TestJsonName* other) {
  35053. using std::swap;
  35054. swap(field_name1_, other->field_name1_);
  35055. swap(fieldname2_, other->fieldname2_);
  35056. swap(fieldname3_, other->fieldname3_);
  35057. swap(_field_name4_, other->_field_name4_);
  35058. swap(field_name5_, other->field_name5_);
  35059. swap(field_name6_, other->field_name6_);
  35060. swap(_has_bits_[0], other->_has_bits_[0]);
  35061. _internal_metadata_.Swap(&other->_internal_metadata_);
  35062. }
  35063. ::google::protobuf::Metadata TestJsonName::GetMetadata() const {
  35064. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  35065. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  35066. }
  35067. // ===================================================================
  35068. void TestHugeFieldNumbers_OptionalGroup::InitAsDefaultInstance() {
  35069. }
  35070. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  35071. const int TestHugeFieldNumbers_OptionalGroup::kGroupAFieldNumber;
  35072. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  35073. TestHugeFieldNumbers_OptionalGroup::TestHugeFieldNumbers_OptionalGroup()
  35074. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  35075. ::google::protobuf::internal::InitSCC(
  35076. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers_OptionalGroup.base);
  35077. SharedCtor();
  35078. // @@protoc_insertion_point(constructor:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35079. }
  35080. TestHugeFieldNumbers_OptionalGroup::TestHugeFieldNumbers_OptionalGroup(::google::protobuf::Arena* arena)
  35081. : ::google::protobuf::Message(),
  35082. _internal_metadata_(arena) {
  35083. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers_OptionalGroup.base);
  35084. SharedCtor();
  35085. RegisterArenaDtor(arena);
  35086. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35087. }
  35088. TestHugeFieldNumbers_OptionalGroup::TestHugeFieldNumbers_OptionalGroup(const TestHugeFieldNumbers_OptionalGroup& from)
  35089. : ::google::protobuf::Message(),
  35090. _internal_metadata_(NULL),
  35091. _has_bits_(from._has_bits_) {
  35092. _internal_metadata_.MergeFrom(from._internal_metadata_);
  35093. group_a_ = from.group_a_;
  35094. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35095. }
  35096. void TestHugeFieldNumbers_OptionalGroup::SharedCtor() {
  35097. group_a_ = 0;
  35098. }
  35099. TestHugeFieldNumbers_OptionalGroup::~TestHugeFieldNumbers_OptionalGroup() {
  35100. // @@protoc_insertion_point(destructor:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35101. SharedDtor();
  35102. }
  35103. void TestHugeFieldNumbers_OptionalGroup::SharedDtor() {
  35104. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  35105. }
  35106. void TestHugeFieldNumbers_OptionalGroup::ArenaDtor(void* object) {
  35107. TestHugeFieldNumbers_OptionalGroup* _this = reinterpret_cast< TestHugeFieldNumbers_OptionalGroup* >(object);
  35108. (void)_this;
  35109. }
  35110. void TestHugeFieldNumbers_OptionalGroup::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  35111. }
  35112. void TestHugeFieldNumbers_OptionalGroup::SetCachedSize(int size) const {
  35113. _cached_size_.Set(size);
  35114. }
  35115. const ::google::protobuf::Descriptor* TestHugeFieldNumbers_OptionalGroup::descriptor() {
  35116. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  35117. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  35118. }
  35119. const TestHugeFieldNumbers_OptionalGroup& TestHugeFieldNumbers_OptionalGroup::default_instance() {
  35120. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers_OptionalGroup.base);
  35121. return *internal_default_instance();
  35122. }
  35123. void TestHugeFieldNumbers_OptionalGroup::Clear() {
  35124. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35125. ::google::protobuf::uint32 cached_has_bits = 0;
  35126. // Prevent compiler warnings about cached_has_bits being unused
  35127. (void) cached_has_bits;
  35128. group_a_ = 0;
  35129. _has_bits_.Clear();
  35130. _internal_metadata_.Clear();
  35131. }
  35132. bool TestHugeFieldNumbers_OptionalGroup::MergePartialFromCodedStream(
  35133. ::google::protobuf::io::CodedInputStream* input) {
  35134. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  35135. ::google::protobuf::uint32 tag;
  35136. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35137. for (;;) {
  35138. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(4294960077u);
  35139. tag = p.first;
  35140. if (!p.second) goto handle_unusual;
  35141. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  35142. // optional int32 group_a = 536870009;
  35143. case 536870009: {
  35144. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35145. static_cast< ::google::protobuf::uint8>(200u /* 4294960072 & 0xFF */)) {
  35146. set_has_group_a();
  35147. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  35148. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  35149. input, &group_a_)));
  35150. } else {
  35151. goto handle_unusual;
  35152. }
  35153. break;
  35154. }
  35155. default: {
  35156. handle_unusual:
  35157. if (tag == 0 ||
  35158. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  35159. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  35160. input->SetLastTag(tag);
  35161. goto success;
  35162. }
  35163. DO_(::google::protobuf::internal::WireFormat::SkipField(
  35164. input, tag, _internal_metadata_.mutable_unknown_fields()));
  35165. break;
  35166. }
  35167. }
  35168. }
  35169. success:
  35170. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35171. return true;
  35172. failure:
  35173. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35174. return false;
  35175. #undef DO_
  35176. }
  35177. void TestHugeFieldNumbers_OptionalGroup::SerializeWithCachedSizes(
  35178. ::google::protobuf::io::CodedOutputStream* output) const {
  35179. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35180. ::google::protobuf::uint32 cached_has_bits = 0;
  35181. (void) cached_has_bits;
  35182. cached_has_bits = _has_bits_[0];
  35183. // optional int32 group_a = 536870009;
  35184. if (cached_has_bits & 0x00000001u) {
  35185. ::google::protobuf::internal::WireFormatLite::WriteInt32(536870009, this->group_a(), output);
  35186. }
  35187. if (_internal_metadata_.have_unknown_fields()) {
  35188. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  35189. _internal_metadata_.unknown_fields(), output);
  35190. }
  35191. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35192. }
  35193. ::google::protobuf::uint8* TestHugeFieldNumbers_OptionalGroup::InternalSerializeWithCachedSizesToArray(
  35194. bool deterministic, ::google::protobuf::uint8* target) const {
  35195. (void)deterministic; // Unused
  35196. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35197. ::google::protobuf::uint32 cached_has_bits = 0;
  35198. (void) cached_has_bits;
  35199. cached_has_bits = _has_bits_[0];
  35200. // optional int32 group_a = 536870009;
  35201. if (cached_has_bits & 0x00000001u) {
  35202. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(536870009, this->group_a(), target);
  35203. }
  35204. if (_internal_metadata_.have_unknown_fields()) {
  35205. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  35206. _internal_metadata_.unknown_fields(), target);
  35207. }
  35208. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35209. return target;
  35210. }
  35211. size_t TestHugeFieldNumbers_OptionalGroup::ByteSizeLong() const {
  35212. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35213. size_t total_size = 0;
  35214. if (_internal_metadata_.have_unknown_fields()) {
  35215. total_size +=
  35216. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  35217. _internal_metadata_.unknown_fields());
  35218. }
  35219. // optional int32 group_a = 536870009;
  35220. if (has_group_a()) {
  35221. total_size += 5 +
  35222. ::google::protobuf::internal::WireFormatLite::Int32Size(
  35223. this->group_a());
  35224. }
  35225. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  35226. SetCachedSize(cached_size);
  35227. return total_size;
  35228. }
  35229. void TestHugeFieldNumbers_OptionalGroup::MergeFrom(const ::google::protobuf::Message& from) {
  35230. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35231. GOOGLE_DCHECK_NE(&from, this);
  35232. const TestHugeFieldNumbers_OptionalGroup* source =
  35233. ::google::protobuf::internal::DynamicCastToGenerated<const TestHugeFieldNumbers_OptionalGroup>(
  35234. &from);
  35235. if (source == NULL) {
  35236. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35237. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  35238. } else {
  35239. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35240. MergeFrom(*source);
  35241. }
  35242. }
  35243. void TestHugeFieldNumbers_OptionalGroup::MergeFrom(const TestHugeFieldNumbers_OptionalGroup& from) {
  35244. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35245. GOOGLE_DCHECK_NE(&from, this);
  35246. _internal_metadata_.MergeFrom(from._internal_metadata_);
  35247. ::google::protobuf::uint32 cached_has_bits = 0;
  35248. (void) cached_has_bits;
  35249. if (from.has_group_a()) {
  35250. set_group_a(from.group_a());
  35251. }
  35252. }
  35253. void TestHugeFieldNumbers_OptionalGroup::CopyFrom(const ::google::protobuf::Message& from) {
  35254. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35255. if (&from == this) return;
  35256. Clear();
  35257. MergeFrom(from);
  35258. }
  35259. void TestHugeFieldNumbers_OptionalGroup::CopyFrom(const TestHugeFieldNumbers_OptionalGroup& from) {
  35260. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestHugeFieldNumbers.OptionalGroup)
  35261. if (&from == this) return;
  35262. Clear();
  35263. MergeFrom(from);
  35264. }
  35265. bool TestHugeFieldNumbers_OptionalGroup::IsInitialized() const {
  35266. return true;
  35267. }
  35268. void TestHugeFieldNumbers_OptionalGroup::Swap(TestHugeFieldNumbers_OptionalGroup* other) {
  35269. if (other == this) return;
  35270. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  35271. InternalSwap(other);
  35272. } else {
  35273. TestHugeFieldNumbers_OptionalGroup* temp = New(GetArenaNoVirtual());
  35274. temp->MergeFrom(*other);
  35275. other->CopyFrom(*this);
  35276. InternalSwap(temp);
  35277. if (GetArenaNoVirtual() == NULL) {
  35278. delete temp;
  35279. }
  35280. }
  35281. }
  35282. void TestHugeFieldNumbers_OptionalGroup::UnsafeArenaSwap(TestHugeFieldNumbers_OptionalGroup* other) {
  35283. if (other == this) return;
  35284. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  35285. InternalSwap(other);
  35286. }
  35287. void TestHugeFieldNumbers_OptionalGroup::InternalSwap(TestHugeFieldNumbers_OptionalGroup* other) {
  35288. using std::swap;
  35289. swap(group_a_, other->group_a_);
  35290. swap(_has_bits_[0], other->_has_bits_[0]);
  35291. _internal_metadata_.Swap(&other->_internal_metadata_);
  35292. }
  35293. ::google::protobuf::Metadata TestHugeFieldNumbers_OptionalGroup::GetMetadata() const {
  35294. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  35295. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  35296. }
  35297. // ===================================================================
  35298. TestHugeFieldNumbers_StringStringMapEntry_DoNotUse::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse() {}
  35299. TestHugeFieldNumbers_StringStringMapEntry_DoNotUse::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  35300. void TestHugeFieldNumbers_StringStringMapEntry_DoNotUse::MergeFrom(const TestHugeFieldNumbers_StringStringMapEntry_DoNotUse& other) {
  35301. MergeFromInternal(other);
  35302. }
  35303. ::google::protobuf::Metadata TestHugeFieldNumbers_StringStringMapEntry_DoNotUse::GetMetadata() const {
  35304. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  35305. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[88];
  35306. }
  35307. void TestHugeFieldNumbers_StringStringMapEntry_DoNotUse::MergeFrom(
  35308. const ::google::protobuf::Message& other) {
  35309. ::google::protobuf::Message::MergeFrom(other);
  35310. }
  35311. // ===================================================================
  35312. void TestHugeFieldNumbers::InitAsDefaultInstance() {
  35313. ::protobuf_unittest::_TestHugeFieldNumbers_default_instance_._instance.get_mutable()->optional_message_ = const_cast< ::protobuf_unittest::ForeignMessage*>(
  35314. ::protobuf_unittest::ForeignMessage::internal_default_instance());
  35315. ::protobuf_unittest::_TestHugeFieldNumbers_default_instance_._instance.get_mutable()->optionalgroup_ = const_cast< ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup*>(
  35316. ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup::internal_default_instance());
  35317. ::protobuf_unittest::_TestHugeFieldNumbers_default_instance_.oneof_uint32_ = 0u;
  35318. ::protobuf_unittest::_TestHugeFieldNumbers_default_instance_.oneof_test_all_types_ = const_cast< ::protobuf_unittest::TestAllTypes*>(
  35319. ::protobuf_unittest::TestAllTypes::internal_default_instance());
  35320. ::protobuf_unittest::_TestHugeFieldNumbers_default_instance_.oneof_string_.UnsafeSetDefault(
  35321. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  35322. ::protobuf_unittest::_TestHugeFieldNumbers_default_instance_.oneof_bytes_.UnsafeSetDefault(
  35323. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  35324. }
  35325. void TestHugeFieldNumbers::unsafe_arena_set_allocated_optional_message(
  35326. ::protobuf_unittest::ForeignMessage* optional_message) {
  35327. if (GetArenaNoVirtual() == NULL) {
  35328. delete optional_message_;
  35329. }
  35330. optional_message_ = optional_message;
  35331. if (optional_message) {
  35332. set_has_optional_message();
  35333. } else {
  35334. clear_has_optional_message();
  35335. }
  35336. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestHugeFieldNumbers.optional_message)
  35337. }
  35338. void TestHugeFieldNumbers::unsafe_arena_set_allocated_optionalgroup(
  35339. ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup* optionalgroup) {
  35340. if (GetArenaNoVirtual() == NULL) {
  35341. delete optionalgroup_;
  35342. }
  35343. optionalgroup_ = optionalgroup;
  35344. if (optionalgroup) {
  35345. set_has_optionalgroup();
  35346. } else {
  35347. clear_has_optionalgroup();
  35348. }
  35349. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestHugeFieldNumbers.optionalgroup)
  35350. }
  35351. void TestHugeFieldNumbers::set_allocated_oneof_test_all_types(::protobuf_unittest::TestAllTypes* oneof_test_all_types) {
  35352. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  35353. clear_oneof_field();
  35354. if (oneof_test_all_types) {
  35355. ::google::protobuf::Arena* submessage_arena =
  35356. ::google::protobuf::Arena::GetArena(oneof_test_all_types);
  35357. if (message_arena != submessage_arena) {
  35358. oneof_test_all_types = ::google::protobuf::internal::GetOwnedMessage(
  35359. message_arena, oneof_test_all_types, submessage_arena);
  35360. }
  35361. set_has_oneof_test_all_types();
  35362. oneof_field_.oneof_test_all_types_ = oneof_test_all_types;
  35363. }
  35364. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest.TestHugeFieldNumbers.oneof_test_all_types)
  35365. }
  35366. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  35367. const int TestHugeFieldNumbers::kOptionalInt32FieldNumber;
  35368. const int TestHugeFieldNumbers::kFixed32FieldNumber;
  35369. const int TestHugeFieldNumbers::kRepeatedInt32FieldNumber;
  35370. const int TestHugeFieldNumbers::kPackedInt32FieldNumber;
  35371. const int TestHugeFieldNumbers::kOptionalEnumFieldNumber;
  35372. const int TestHugeFieldNumbers::kOptionalStringFieldNumber;
  35373. const int TestHugeFieldNumbers::kOptionalBytesFieldNumber;
  35374. const int TestHugeFieldNumbers::kOptionalMessageFieldNumber;
  35375. const int TestHugeFieldNumbers::kOptionalgroupFieldNumber;
  35376. const int TestHugeFieldNumbers::kStringStringMapFieldNumber;
  35377. const int TestHugeFieldNumbers::kOneofUint32FieldNumber;
  35378. const int TestHugeFieldNumbers::kOneofTestAllTypesFieldNumber;
  35379. const int TestHugeFieldNumbers::kOneofStringFieldNumber;
  35380. const int TestHugeFieldNumbers::kOneofBytesFieldNumber;
  35381. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  35382. TestHugeFieldNumbers::TestHugeFieldNumbers()
  35383. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  35384. ::google::protobuf::internal::InitSCC(
  35385. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers.base);
  35386. SharedCtor();
  35387. // @@protoc_insertion_point(constructor:protobuf_unittest.TestHugeFieldNumbers)
  35388. }
  35389. TestHugeFieldNumbers::TestHugeFieldNumbers(::google::protobuf::Arena* arena)
  35390. : ::google::protobuf::Message(),
  35391. _extensions_(arena),
  35392. _internal_metadata_(arena),
  35393. repeated_int32_(arena),
  35394. packed_int32_(arena),
  35395. string_string_map_(arena) {
  35396. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers.base);
  35397. SharedCtor();
  35398. RegisterArenaDtor(arena);
  35399. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestHugeFieldNumbers)
  35400. }
  35401. TestHugeFieldNumbers::TestHugeFieldNumbers(const TestHugeFieldNumbers& from)
  35402. : ::google::protobuf::Message(),
  35403. _internal_metadata_(NULL),
  35404. _has_bits_(from._has_bits_),
  35405. repeated_int32_(from.repeated_int32_),
  35406. packed_int32_(from.packed_int32_) {
  35407. _internal_metadata_.MergeFrom(from._internal_metadata_);
  35408. _extensions_.MergeFrom(from._extensions_);
  35409. string_string_map_.MergeFrom(from.string_string_map_);
  35410. optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  35411. if (from.has_optional_string()) {
  35412. optional_string_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string(),
  35413. GetArenaNoVirtual());
  35414. }
  35415. optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  35416. if (from.has_optional_bytes()) {
  35417. optional_bytes_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes(),
  35418. GetArenaNoVirtual());
  35419. }
  35420. if (from.has_optional_message()) {
  35421. optional_message_ = new ::protobuf_unittest::ForeignMessage(*from.optional_message_);
  35422. } else {
  35423. optional_message_ = NULL;
  35424. }
  35425. if (from.has_optionalgroup()) {
  35426. optionalgroup_ = new ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup(*from.optionalgroup_);
  35427. } else {
  35428. optionalgroup_ = NULL;
  35429. }
  35430. ::memcpy(&optional_int32_, &from.optional_int32_,
  35431. static_cast<size_t>(reinterpret_cast<char*>(&optional_enum_) -
  35432. reinterpret_cast<char*>(&optional_int32_)) + sizeof(optional_enum_));
  35433. clear_has_oneof_field();
  35434. switch (from.oneof_field_case()) {
  35435. case kOneofUint32: {
  35436. set_oneof_uint32(from.oneof_uint32());
  35437. break;
  35438. }
  35439. case kOneofTestAllTypes: {
  35440. mutable_oneof_test_all_types()->::protobuf_unittest::TestAllTypes::MergeFrom(from.oneof_test_all_types());
  35441. break;
  35442. }
  35443. case kOneofString: {
  35444. set_oneof_string(from.oneof_string());
  35445. break;
  35446. }
  35447. case kOneofBytes: {
  35448. set_oneof_bytes(from.oneof_bytes());
  35449. break;
  35450. }
  35451. case ONEOF_FIELD_NOT_SET: {
  35452. break;
  35453. }
  35454. }
  35455. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestHugeFieldNumbers)
  35456. }
  35457. void TestHugeFieldNumbers::SharedCtor() {
  35458. optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  35459. optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  35460. ::memset(&optional_message_, 0, static_cast<size_t>(
  35461. reinterpret_cast<char*>(&fixed_32_) -
  35462. reinterpret_cast<char*>(&optional_message_)) + sizeof(fixed_32_));
  35463. optional_enum_ = 4;
  35464. clear_has_oneof_field();
  35465. }
  35466. TestHugeFieldNumbers::~TestHugeFieldNumbers() {
  35467. // @@protoc_insertion_point(destructor:protobuf_unittest.TestHugeFieldNumbers)
  35468. SharedDtor();
  35469. }
  35470. void TestHugeFieldNumbers::SharedDtor() {
  35471. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  35472. optional_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  35473. optional_bytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  35474. if (this != internal_default_instance()) delete optional_message_;
  35475. if (this != internal_default_instance()) delete optionalgroup_;
  35476. if (has_oneof_field()) {
  35477. clear_oneof_field();
  35478. }
  35479. }
  35480. void TestHugeFieldNumbers::ArenaDtor(void* object) {
  35481. TestHugeFieldNumbers* _this = reinterpret_cast< TestHugeFieldNumbers* >(object);
  35482. (void)_this;
  35483. }
  35484. void TestHugeFieldNumbers::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  35485. }
  35486. void TestHugeFieldNumbers::SetCachedSize(int size) const {
  35487. _cached_size_.Set(size);
  35488. }
  35489. const ::google::protobuf::Descriptor* TestHugeFieldNumbers::descriptor() {
  35490. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  35491. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  35492. }
  35493. const TestHugeFieldNumbers& TestHugeFieldNumbers::default_instance() {
  35494. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestHugeFieldNumbers.base);
  35495. return *internal_default_instance();
  35496. }
  35497. void TestHugeFieldNumbers::clear_oneof_field() {
  35498. // @@protoc_insertion_point(one_of_clear_start:protobuf_unittest.TestHugeFieldNumbers)
  35499. switch (oneof_field_case()) {
  35500. case kOneofUint32: {
  35501. // No need to clear
  35502. break;
  35503. }
  35504. case kOneofTestAllTypes: {
  35505. if (GetArenaNoVirtual() == NULL) {
  35506. delete oneof_field_.oneof_test_all_types_;
  35507. }
  35508. break;
  35509. }
  35510. case kOneofString: {
  35511. oneof_field_.oneof_string_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  35512. GetArenaNoVirtual());
  35513. break;
  35514. }
  35515. case kOneofBytes: {
  35516. oneof_field_.oneof_bytes_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  35517. GetArenaNoVirtual());
  35518. break;
  35519. }
  35520. case ONEOF_FIELD_NOT_SET: {
  35521. break;
  35522. }
  35523. }
  35524. _oneof_case_[0] = ONEOF_FIELD_NOT_SET;
  35525. }
  35526. void TestHugeFieldNumbers::Clear() {
  35527. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestHugeFieldNumbers)
  35528. ::google::protobuf::uint32 cached_has_bits = 0;
  35529. // Prevent compiler warnings about cached_has_bits being unused
  35530. (void) cached_has_bits;
  35531. _extensions_.Clear();
  35532. repeated_int32_.Clear();
  35533. packed_int32_.Clear();
  35534. string_string_map_.Clear();
  35535. cached_has_bits = _has_bits_[0];
  35536. if (cached_has_bits & 15u) {
  35537. if (cached_has_bits & 0x00000001u) {
  35538. optional_string_.ClearNonDefaultToEmpty();
  35539. }
  35540. if (cached_has_bits & 0x00000002u) {
  35541. optional_bytes_.ClearNonDefaultToEmpty();
  35542. }
  35543. if (cached_has_bits & 0x00000004u) {
  35544. GOOGLE_DCHECK(optional_message_ != NULL);
  35545. optional_message_->Clear();
  35546. }
  35547. if (cached_has_bits & 0x00000008u) {
  35548. GOOGLE_DCHECK(optionalgroup_ != NULL);
  35549. optionalgroup_->Clear();
  35550. }
  35551. }
  35552. if (cached_has_bits & 112u) {
  35553. ::memset(&optional_int32_, 0, static_cast<size_t>(
  35554. reinterpret_cast<char*>(&fixed_32_) -
  35555. reinterpret_cast<char*>(&optional_int32_)) + sizeof(fixed_32_));
  35556. optional_enum_ = 4;
  35557. }
  35558. clear_oneof_field();
  35559. _has_bits_.Clear();
  35560. _internal_metadata_.Clear();
  35561. }
  35562. bool TestHugeFieldNumbers::MergePartialFromCodedStream(
  35563. ::google::protobuf::io::CodedInputStream* input) {
  35564. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  35565. ::google::protobuf::uint32 tag;
  35566. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestHugeFieldNumbers)
  35567. for (;;) {
  35568. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(4294960117u);
  35569. tag = p.first;
  35570. if (!p.second) goto handle_unusual;
  35571. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  35572. // optional int32 optional_int32 = 536870000;
  35573. case 536870000: {
  35574. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35575. static_cast< ::google::protobuf::uint8>(128u /* 4294960000 & 0xFF */)) {
  35576. set_has_optional_int32();
  35577. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  35578. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  35579. input, &optional_int32_)));
  35580. } else {
  35581. goto handle_unusual;
  35582. }
  35583. break;
  35584. }
  35585. // optional int32 fixed_32 = 536870001;
  35586. case 536870001: {
  35587. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35588. static_cast< ::google::protobuf::uint8>(136u /* 4294960008 & 0xFF */)) {
  35589. set_has_fixed_32();
  35590. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  35591. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  35592. input, &fixed_32_)));
  35593. } else {
  35594. goto handle_unusual;
  35595. }
  35596. break;
  35597. }
  35598. // repeated int32 repeated_int32 = 536870002 [packed = false];
  35599. case 536870002: {
  35600. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35601. static_cast< ::google::protobuf::uint8>(144u /* 4294960016 & 0xFF */)) {
  35602. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
  35603. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  35604. 5, 4294960016u, input, this->mutable_repeated_int32())));
  35605. } else if (
  35606. static_cast< ::google::protobuf::uint8>(tag) ==
  35607. static_cast< ::google::protobuf::uint8>(146u /* 4294960018 & 0xFF */)) {
  35608. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
  35609. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  35610. input, this->mutable_repeated_int32())));
  35611. } else {
  35612. goto handle_unusual;
  35613. }
  35614. break;
  35615. }
  35616. // repeated int32 packed_int32 = 536870003 [packed = true];
  35617. case 536870003: {
  35618. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35619. static_cast< ::google::protobuf::uint8>(154u /* 4294960026 & 0xFF */)) {
  35620. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  35621. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  35622. input, this->mutable_packed_int32())));
  35623. } else if (
  35624. static_cast< ::google::protobuf::uint8>(tag) ==
  35625. static_cast< ::google::protobuf::uint8>(152u /* 4294960024 & 0xFF */)) {
  35626. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  35627. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  35628. 5, 4294960026u, input, this->mutable_packed_int32())));
  35629. } else {
  35630. goto handle_unusual;
  35631. }
  35632. break;
  35633. }
  35634. // optional .protobuf_unittest.ForeignEnum optional_enum = 536870004;
  35635. case 536870004: {
  35636. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35637. static_cast< ::google::protobuf::uint8>(160u /* 4294960032 & 0xFF */)) {
  35638. int value;
  35639. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  35640. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  35641. input, &value)));
  35642. if (::protobuf_unittest::ForeignEnum_IsValid(value)) {
  35643. set_optional_enum(static_cast< ::protobuf_unittest::ForeignEnum >(value));
  35644. } else {
  35645. mutable_unknown_fields()->AddVarint(
  35646. 536870004, static_cast< ::google::protobuf::uint64>(value));
  35647. }
  35648. } else {
  35649. goto handle_unusual;
  35650. }
  35651. break;
  35652. }
  35653. // optional string optional_string = 536870005;
  35654. case 536870005: {
  35655. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35656. static_cast< ::google::protobuf::uint8>(170u /* 4294960042 & 0xFF */)) {
  35657. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  35658. input, this->mutable_optional_string()));
  35659. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  35660. this->optional_string().data(), static_cast<int>(this->optional_string().length()),
  35661. ::google::protobuf::internal::WireFormat::PARSE,
  35662. "protobuf_unittest.TestHugeFieldNumbers.optional_string");
  35663. } else {
  35664. goto handle_unusual;
  35665. }
  35666. break;
  35667. }
  35668. // optional bytes optional_bytes = 536870006;
  35669. case 536870006: {
  35670. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35671. static_cast< ::google::protobuf::uint8>(178u /* 4294960050 & 0xFF */)) {
  35672. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  35673. input, this->mutable_optional_bytes()));
  35674. } else {
  35675. goto handle_unusual;
  35676. }
  35677. break;
  35678. }
  35679. // optional .protobuf_unittest.ForeignMessage optional_message = 536870007;
  35680. case 536870007: {
  35681. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35682. static_cast< ::google::protobuf::uint8>(186u /* 4294960058 & 0xFF */)) {
  35683. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  35684. input, mutable_optional_message()));
  35685. } else {
  35686. goto handle_unusual;
  35687. }
  35688. break;
  35689. }
  35690. // optional group OptionalGroup = 536870008 { ... };
  35691. case 536870008: {
  35692. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35693. static_cast< ::google::protobuf::uint8>(195u /* 4294960067 & 0xFF */)) {
  35694. DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(
  35695. 536870008, input, mutable_optionalgroup()));
  35696. } else {
  35697. goto handle_unusual;
  35698. }
  35699. break;
  35700. }
  35701. // map<string, string> string_string_map = 536870010;
  35702. case 536870010: {
  35703. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35704. static_cast< ::google::protobuf::uint8>(210u /* 4294960082 & 0xFF */)) {
  35705. TestHugeFieldNumbers_StringStringMapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  35706. TestHugeFieldNumbers_StringStringMapEntry_DoNotUse,
  35707. ::std::string, ::std::string,
  35708. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  35709. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  35710. 0 >,
  35711. ::google::protobuf::Map< ::std::string, ::std::string > > parser(&string_string_map_);
  35712. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  35713. input, &parser));
  35714. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  35715. parser.key().data(), static_cast<int>(parser.key().length()),
  35716. ::google::protobuf::internal::WireFormat::PARSE,
  35717. "protobuf_unittest.TestHugeFieldNumbers.StringStringMapEntry.key");
  35718. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  35719. parser.value().data(), static_cast<int>(parser.value().length()),
  35720. ::google::protobuf::internal::WireFormat::PARSE,
  35721. "protobuf_unittest.TestHugeFieldNumbers.StringStringMapEntry.value");
  35722. } else {
  35723. goto handle_unusual;
  35724. }
  35725. break;
  35726. }
  35727. // optional uint32 oneof_uint32 = 536870011;
  35728. case 536870011: {
  35729. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35730. static_cast< ::google::protobuf::uint8>(216u /* 4294960088 & 0xFF */)) {
  35731. clear_oneof_field();
  35732. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  35733. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  35734. input, &oneof_field_.oneof_uint32_)));
  35735. set_has_oneof_uint32();
  35736. } else {
  35737. goto handle_unusual;
  35738. }
  35739. break;
  35740. }
  35741. // optional .protobuf_unittest.TestAllTypes oneof_test_all_types = 536870012;
  35742. case 536870012: {
  35743. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35744. static_cast< ::google::protobuf::uint8>(226u /* 4294960098 & 0xFF */)) {
  35745. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  35746. input, mutable_oneof_test_all_types()));
  35747. } else {
  35748. goto handle_unusual;
  35749. }
  35750. break;
  35751. }
  35752. // optional string oneof_string = 536870013;
  35753. case 536870013: {
  35754. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35755. static_cast< ::google::protobuf::uint8>(234u /* 4294960106 & 0xFF */)) {
  35756. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  35757. input, this->mutable_oneof_string()));
  35758. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  35759. this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
  35760. ::google::protobuf::internal::WireFormat::PARSE,
  35761. "protobuf_unittest.TestHugeFieldNumbers.oneof_string");
  35762. } else {
  35763. goto handle_unusual;
  35764. }
  35765. break;
  35766. }
  35767. // optional bytes oneof_bytes = 536870014;
  35768. case 536870014: {
  35769. if (static_cast< ::google::protobuf::uint8>(tag) ==
  35770. static_cast< ::google::protobuf::uint8>(242u /* 4294960114 & 0xFF */)) {
  35771. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  35772. input, this->mutable_oneof_bytes()));
  35773. } else {
  35774. goto handle_unusual;
  35775. }
  35776. break;
  35777. }
  35778. default: {
  35779. handle_unusual:
  35780. if (tag == 0) {
  35781. goto success;
  35782. }
  35783. if ((4294880000u <= tag && tag < 4294960000u)) {
  35784. DO_(_extensions_.ParseField(tag, input,
  35785. internal_default_instance(),
  35786. _internal_metadata_.mutable_unknown_fields()));
  35787. continue;
  35788. }
  35789. DO_(::google::protobuf::internal::WireFormat::SkipField(
  35790. input, tag, _internal_metadata_.mutable_unknown_fields()));
  35791. break;
  35792. }
  35793. }
  35794. }
  35795. success:
  35796. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestHugeFieldNumbers)
  35797. return true;
  35798. failure:
  35799. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestHugeFieldNumbers)
  35800. return false;
  35801. #undef DO_
  35802. }
  35803. void TestHugeFieldNumbers::SerializeWithCachedSizes(
  35804. ::google::protobuf::io::CodedOutputStream* output) const {
  35805. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestHugeFieldNumbers)
  35806. ::google::protobuf::uint32 cached_has_bits = 0;
  35807. (void) cached_has_bits;
  35808. // Extension range [536860000, 536870000)
  35809. _extensions_.SerializeWithCachedSizes(
  35810. 536860000, 536870000, output);
  35811. cached_has_bits = _has_bits_[0];
  35812. // optional int32 optional_int32 = 536870000;
  35813. if (cached_has_bits & 0x00000010u) {
  35814. ::google::protobuf::internal::WireFormatLite::WriteInt32(536870000, this->optional_int32(), output);
  35815. }
  35816. // optional int32 fixed_32 = 536870001;
  35817. if (cached_has_bits & 0x00000020u) {
  35818. ::google::protobuf::internal::WireFormatLite::WriteInt32(536870001, this->fixed_32(), output);
  35819. }
  35820. // repeated int32 repeated_int32 = 536870002 [packed = false];
  35821. for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
  35822. ::google::protobuf::internal::WireFormatLite::WriteInt32(
  35823. 536870002, this->repeated_int32(i), output);
  35824. }
  35825. // repeated int32 packed_int32 = 536870003 [packed = true];
  35826. if (this->packed_int32_size() > 0) {
  35827. ::google::protobuf::internal::WireFormatLite::WriteTag(536870003, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  35828. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  35829. _packed_int32_cached_byte_size_));
  35830. }
  35831. for (int i = 0, n = this->packed_int32_size(); i < n; i++) {
  35832. ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
  35833. this->packed_int32(i), output);
  35834. }
  35835. // optional .protobuf_unittest.ForeignEnum optional_enum = 536870004;
  35836. if (cached_has_bits & 0x00000040u) {
  35837. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  35838. 536870004, this->optional_enum(), output);
  35839. }
  35840. // optional string optional_string = 536870005;
  35841. if (cached_has_bits & 0x00000001u) {
  35842. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  35843. this->optional_string().data(), static_cast<int>(this->optional_string().length()),
  35844. ::google::protobuf::internal::WireFormat::SERIALIZE,
  35845. "protobuf_unittest.TestHugeFieldNumbers.optional_string");
  35846. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  35847. 536870005, this->optional_string(), output);
  35848. }
  35849. // optional bytes optional_bytes = 536870006;
  35850. if (cached_has_bits & 0x00000002u) {
  35851. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  35852. 536870006, this->optional_bytes(), output);
  35853. }
  35854. // optional .protobuf_unittest.ForeignMessage optional_message = 536870007;
  35855. if (cached_has_bits & 0x00000004u) {
  35856. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  35857. 536870007, this->_internal_optional_message(), output);
  35858. }
  35859. // optional group OptionalGroup = 536870008 { ... };
  35860. if (cached_has_bits & 0x00000008u) {
  35861. ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
  35862. 536870008, this->_internal_optionalgroup(), output);
  35863. }
  35864. // map<string, string> string_string_map = 536870010;
  35865. if (!this->string_string_map().empty()) {
  35866. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  35867. ConstPtr;
  35868. typedef ConstPtr SortItem;
  35869. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  35870. struct Utf8Check {
  35871. static void Check(ConstPtr p) {
  35872. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  35873. p->first.data(), static_cast<int>(p->first.length()),
  35874. ::google::protobuf::internal::WireFormat::SERIALIZE,
  35875. "protobuf_unittest.TestHugeFieldNumbers.StringStringMapEntry.key");
  35876. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  35877. p->second.data(), static_cast<int>(p->second.length()),
  35878. ::google::protobuf::internal::WireFormat::SERIALIZE,
  35879. "protobuf_unittest.TestHugeFieldNumbers.StringStringMapEntry.value");
  35880. }
  35881. };
  35882. if (output->IsSerializationDeterministic() &&
  35883. this->string_string_map().size() > 1) {
  35884. ::std::unique_ptr<SortItem[]> items(
  35885. new SortItem[this->string_string_map().size()]);
  35886. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  35887. size_type n = 0;
  35888. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  35889. it = this->string_string_map().begin();
  35890. it != this->string_string_map().end(); ++it, ++n) {
  35891. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  35892. }
  35893. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  35894. ::std::unique_ptr<TestHugeFieldNumbers_StringStringMapEntry_DoNotUse> entry;
  35895. for (size_type i = 0; i < n; i++) {
  35896. entry.reset(string_string_map_.NewEntryWrapper(
  35897. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  35898. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  35899. 536870010, *entry, output);
  35900. if (entry->GetArena() != NULL) {
  35901. entry.release();
  35902. }
  35903. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  35904. }
  35905. } else {
  35906. ::std::unique_ptr<TestHugeFieldNumbers_StringStringMapEntry_DoNotUse> entry;
  35907. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  35908. it = this->string_string_map().begin();
  35909. it != this->string_string_map().end(); ++it) {
  35910. entry.reset(string_string_map_.NewEntryWrapper(
  35911. it->first, it->second));
  35912. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  35913. 536870010, *entry, output);
  35914. if (entry->GetArena() != NULL) {
  35915. entry.release();
  35916. }
  35917. Utf8Check::Check(&*it);
  35918. }
  35919. }
  35920. }
  35921. switch (oneof_field_case()) {
  35922. case kOneofUint32:
  35923. ::google::protobuf::internal::WireFormatLite::WriteUInt32(536870011, this->oneof_uint32(), output);
  35924. break;
  35925. case kOneofTestAllTypes:
  35926. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  35927. 536870012, this->_internal_oneof_test_all_types(), output);
  35928. break;
  35929. case kOneofString:
  35930. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  35931. this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
  35932. ::google::protobuf::internal::WireFormat::SERIALIZE,
  35933. "protobuf_unittest.TestHugeFieldNumbers.oneof_string");
  35934. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  35935. 536870013, this->oneof_string(), output);
  35936. break;
  35937. case kOneofBytes:
  35938. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  35939. 536870014, this->oneof_bytes(), output);
  35940. break;
  35941. default: ;
  35942. }
  35943. if (_internal_metadata_.have_unknown_fields()) {
  35944. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  35945. _internal_metadata_.unknown_fields(), output);
  35946. }
  35947. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestHugeFieldNumbers)
  35948. }
  35949. ::google::protobuf::uint8* TestHugeFieldNumbers::InternalSerializeWithCachedSizesToArray(
  35950. bool deterministic, ::google::protobuf::uint8* target) const {
  35951. (void)deterministic; // Unused
  35952. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestHugeFieldNumbers)
  35953. ::google::protobuf::uint32 cached_has_bits = 0;
  35954. (void) cached_has_bits;
  35955. // Extension range [536860000, 536870000)
  35956. target = _extensions_.InternalSerializeWithCachedSizesToArray(
  35957. 536860000, 536870000, deterministic, target);
  35958. cached_has_bits = _has_bits_[0];
  35959. // optional int32 optional_int32 = 536870000;
  35960. if (cached_has_bits & 0x00000010u) {
  35961. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(536870000, this->optional_int32(), target);
  35962. }
  35963. // optional int32 fixed_32 = 536870001;
  35964. if (cached_has_bits & 0x00000020u) {
  35965. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(536870001, this->fixed_32(), target);
  35966. }
  35967. // repeated int32 repeated_int32 = 536870002 [packed = false];
  35968. target = ::google::protobuf::internal::WireFormatLite::
  35969. WriteInt32ToArray(536870002, this->repeated_int32_, target);
  35970. // repeated int32 packed_int32 = 536870003 [packed = true];
  35971. if (this->packed_int32_size() > 0) {
  35972. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  35973. 536870003,
  35974. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  35975. target);
  35976. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  35977. static_cast< ::google::protobuf::int32>(
  35978. _packed_int32_cached_byte_size_), target);
  35979. target = ::google::protobuf::internal::WireFormatLite::
  35980. WriteInt32NoTagToArray(this->packed_int32_, target);
  35981. }
  35982. // optional .protobuf_unittest.ForeignEnum optional_enum = 536870004;
  35983. if (cached_has_bits & 0x00000040u) {
  35984. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  35985. 536870004, this->optional_enum(), target);
  35986. }
  35987. // optional string optional_string = 536870005;
  35988. if (cached_has_bits & 0x00000001u) {
  35989. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  35990. this->optional_string().data(), static_cast<int>(this->optional_string().length()),
  35991. ::google::protobuf::internal::WireFormat::SERIALIZE,
  35992. "protobuf_unittest.TestHugeFieldNumbers.optional_string");
  35993. target =
  35994. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  35995. 536870005, this->optional_string(), target);
  35996. }
  35997. // optional bytes optional_bytes = 536870006;
  35998. if (cached_has_bits & 0x00000002u) {
  35999. target =
  36000. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  36001. 536870006, this->optional_bytes(), target);
  36002. }
  36003. // optional .protobuf_unittest.ForeignMessage optional_message = 536870007;
  36004. if (cached_has_bits & 0x00000004u) {
  36005. target = ::google::protobuf::internal::WireFormatLite::
  36006. InternalWriteMessageToArray(
  36007. 536870007, this->_internal_optional_message(), deterministic, target);
  36008. }
  36009. // optional group OptionalGroup = 536870008 { ... };
  36010. if (cached_has_bits & 0x00000008u) {
  36011. target = ::google::protobuf::internal::WireFormatLite::
  36012. InternalWriteGroupToArray(
  36013. 536870008, this->_internal_optionalgroup(), deterministic, target);
  36014. }
  36015. // map<string, string> string_string_map = 536870010;
  36016. if (!this->string_string_map().empty()) {
  36017. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  36018. ConstPtr;
  36019. typedef ConstPtr SortItem;
  36020. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  36021. struct Utf8Check {
  36022. static void Check(ConstPtr p) {
  36023. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  36024. p->first.data(), static_cast<int>(p->first.length()),
  36025. ::google::protobuf::internal::WireFormat::SERIALIZE,
  36026. "protobuf_unittest.TestHugeFieldNumbers.StringStringMapEntry.key");
  36027. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  36028. p->second.data(), static_cast<int>(p->second.length()),
  36029. ::google::protobuf::internal::WireFormat::SERIALIZE,
  36030. "protobuf_unittest.TestHugeFieldNumbers.StringStringMapEntry.value");
  36031. }
  36032. };
  36033. if (deterministic &&
  36034. this->string_string_map().size() > 1) {
  36035. ::std::unique_ptr<SortItem[]> items(
  36036. new SortItem[this->string_string_map().size()]);
  36037. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  36038. size_type n = 0;
  36039. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  36040. it = this->string_string_map().begin();
  36041. it != this->string_string_map().end(); ++it, ++n) {
  36042. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  36043. }
  36044. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  36045. ::std::unique_ptr<TestHugeFieldNumbers_StringStringMapEntry_DoNotUse> entry;
  36046. for (size_type i = 0; i < n; i++) {
  36047. entry.reset(string_string_map_.NewEntryWrapper(
  36048. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  36049. target = ::google::protobuf::internal::WireFormatLite::
  36050. InternalWriteMessageNoVirtualToArray(
  36051. 536870010, *entry, deterministic, target);
  36052. ;
  36053. if (entry->GetArena() != NULL) {
  36054. entry.release();
  36055. }
  36056. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  36057. }
  36058. } else {
  36059. ::std::unique_ptr<TestHugeFieldNumbers_StringStringMapEntry_DoNotUse> entry;
  36060. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  36061. it = this->string_string_map().begin();
  36062. it != this->string_string_map().end(); ++it) {
  36063. entry.reset(string_string_map_.NewEntryWrapper(
  36064. it->first, it->second));
  36065. target = ::google::protobuf::internal::WireFormatLite::
  36066. InternalWriteMessageNoVirtualToArray(
  36067. 536870010, *entry, deterministic, target);
  36068. ;
  36069. if (entry->GetArena() != NULL) {
  36070. entry.release();
  36071. }
  36072. Utf8Check::Check(&*it);
  36073. }
  36074. }
  36075. }
  36076. switch (oneof_field_case()) {
  36077. case kOneofUint32:
  36078. target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(536870011, this->oneof_uint32(), target);
  36079. break;
  36080. case kOneofTestAllTypes:
  36081. target = ::google::protobuf::internal::WireFormatLite::
  36082. InternalWriteMessageToArray(
  36083. 536870012, this->_internal_oneof_test_all_types(), deterministic, target);
  36084. break;
  36085. case kOneofString:
  36086. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  36087. this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
  36088. ::google::protobuf::internal::WireFormat::SERIALIZE,
  36089. "protobuf_unittest.TestHugeFieldNumbers.oneof_string");
  36090. target =
  36091. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  36092. 536870013, this->oneof_string(), target);
  36093. break;
  36094. case kOneofBytes:
  36095. target =
  36096. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  36097. 536870014, this->oneof_bytes(), target);
  36098. break;
  36099. default: ;
  36100. }
  36101. if (_internal_metadata_.have_unknown_fields()) {
  36102. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  36103. _internal_metadata_.unknown_fields(), target);
  36104. }
  36105. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestHugeFieldNumbers)
  36106. return target;
  36107. }
  36108. size_t TestHugeFieldNumbers::ByteSizeLong() const {
  36109. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestHugeFieldNumbers)
  36110. size_t total_size = 0;
  36111. total_size += _extensions_.ByteSize();
  36112. if (_internal_metadata_.have_unknown_fields()) {
  36113. total_size +=
  36114. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  36115. _internal_metadata_.unknown_fields());
  36116. }
  36117. // repeated int32 repeated_int32 = 536870002 [packed = false];
  36118. {
  36119. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  36120. Int32Size(this->repeated_int32_);
  36121. total_size += 5 *
  36122. ::google::protobuf::internal::FromIntSize(this->repeated_int32_size());
  36123. total_size += data_size;
  36124. }
  36125. // repeated int32 packed_int32 = 536870003 [packed = true];
  36126. {
  36127. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  36128. Int32Size(this->packed_int32_);
  36129. if (data_size > 0) {
  36130. total_size += 5 +
  36131. ::google::protobuf::internal::WireFormatLite::Int32Size(
  36132. static_cast< ::google::protobuf::int32>(data_size));
  36133. }
  36134. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  36135. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  36136. _packed_int32_cached_byte_size_ = cached_size;
  36137. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  36138. total_size += data_size;
  36139. }
  36140. // map<string, string> string_string_map = 536870010;
  36141. total_size += 5 *
  36142. ::google::protobuf::internal::FromIntSize(this->string_string_map_size());
  36143. {
  36144. ::std::unique_ptr<TestHugeFieldNumbers_StringStringMapEntry_DoNotUse> entry;
  36145. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  36146. it = this->string_string_map().begin();
  36147. it != this->string_string_map().end(); ++it) {
  36148. if (entry.get() != NULL && entry->GetArena() != NULL) {
  36149. entry.release();
  36150. }
  36151. entry.reset(string_string_map_.NewEntryWrapper(it->first, it->second));
  36152. total_size += ::google::protobuf::internal::WireFormatLite::
  36153. MessageSizeNoVirtual(*entry);
  36154. }
  36155. if (entry.get() != NULL && entry->GetArena() != NULL) {
  36156. entry.release();
  36157. }
  36158. }
  36159. if (_has_bits_[0 / 32] & 127u) {
  36160. // optional string optional_string = 536870005;
  36161. if (has_optional_string()) {
  36162. total_size += 5 +
  36163. ::google::protobuf::internal::WireFormatLite::StringSize(
  36164. this->optional_string());
  36165. }
  36166. // optional bytes optional_bytes = 536870006;
  36167. if (has_optional_bytes()) {
  36168. total_size += 5 +
  36169. ::google::protobuf::internal::WireFormatLite::BytesSize(
  36170. this->optional_bytes());
  36171. }
  36172. // optional .protobuf_unittest.ForeignMessage optional_message = 536870007;
  36173. if (has_optional_message()) {
  36174. total_size += 5 +
  36175. ::google::protobuf::internal::WireFormatLite::MessageSize(
  36176. *optional_message_);
  36177. }
  36178. // optional group OptionalGroup = 536870008 { ... };
  36179. if (has_optionalgroup()) {
  36180. total_size += 10 +
  36181. ::google::protobuf::internal::WireFormatLite::GroupSize(
  36182. *optionalgroup_);
  36183. }
  36184. // optional int32 optional_int32 = 536870000;
  36185. if (has_optional_int32()) {
  36186. total_size += 5 +
  36187. ::google::protobuf::internal::WireFormatLite::Int32Size(
  36188. this->optional_int32());
  36189. }
  36190. // optional int32 fixed_32 = 536870001;
  36191. if (has_fixed_32()) {
  36192. total_size += 5 +
  36193. ::google::protobuf::internal::WireFormatLite::Int32Size(
  36194. this->fixed_32());
  36195. }
  36196. // optional .protobuf_unittest.ForeignEnum optional_enum = 536870004;
  36197. if (has_optional_enum()) {
  36198. total_size += 5 +
  36199. ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_enum());
  36200. }
  36201. }
  36202. switch (oneof_field_case()) {
  36203. // optional uint32 oneof_uint32 = 536870011;
  36204. case kOneofUint32: {
  36205. total_size += 5 +
  36206. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  36207. this->oneof_uint32());
  36208. break;
  36209. }
  36210. // optional .protobuf_unittest.TestAllTypes oneof_test_all_types = 536870012;
  36211. case kOneofTestAllTypes: {
  36212. total_size += 5 +
  36213. ::google::protobuf::internal::WireFormatLite::MessageSize(
  36214. *oneof_field_.oneof_test_all_types_);
  36215. break;
  36216. }
  36217. // optional string oneof_string = 536870013;
  36218. case kOneofString: {
  36219. total_size += 5 +
  36220. ::google::protobuf::internal::WireFormatLite::StringSize(
  36221. this->oneof_string());
  36222. break;
  36223. }
  36224. // optional bytes oneof_bytes = 536870014;
  36225. case kOneofBytes: {
  36226. total_size += 5 +
  36227. ::google::protobuf::internal::WireFormatLite::BytesSize(
  36228. this->oneof_bytes());
  36229. break;
  36230. }
  36231. case ONEOF_FIELD_NOT_SET: {
  36232. break;
  36233. }
  36234. }
  36235. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  36236. SetCachedSize(cached_size);
  36237. return total_size;
  36238. }
  36239. void TestHugeFieldNumbers::MergeFrom(const ::google::protobuf::Message& from) {
  36240. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestHugeFieldNumbers)
  36241. GOOGLE_DCHECK_NE(&from, this);
  36242. const TestHugeFieldNumbers* source =
  36243. ::google::protobuf::internal::DynamicCastToGenerated<const TestHugeFieldNumbers>(
  36244. &from);
  36245. if (source == NULL) {
  36246. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestHugeFieldNumbers)
  36247. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  36248. } else {
  36249. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestHugeFieldNumbers)
  36250. MergeFrom(*source);
  36251. }
  36252. }
  36253. void TestHugeFieldNumbers::MergeFrom(const TestHugeFieldNumbers& from) {
  36254. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestHugeFieldNumbers)
  36255. GOOGLE_DCHECK_NE(&from, this);
  36256. _extensions_.MergeFrom(from._extensions_);
  36257. _internal_metadata_.MergeFrom(from._internal_metadata_);
  36258. ::google::protobuf::uint32 cached_has_bits = 0;
  36259. (void) cached_has_bits;
  36260. repeated_int32_.MergeFrom(from.repeated_int32_);
  36261. packed_int32_.MergeFrom(from.packed_int32_);
  36262. string_string_map_.MergeFrom(from.string_string_map_);
  36263. cached_has_bits = from._has_bits_[0];
  36264. if (cached_has_bits & 127u) {
  36265. if (cached_has_bits & 0x00000001u) {
  36266. set_optional_string(from.optional_string());
  36267. }
  36268. if (cached_has_bits & 0x00000002u) {
  36269. set_optional_bytes(from.optional_bytes());
  36270. }
  36271. if (cached_has_bits & 0x00000004u) {
  36272. mutable_optional_message()->::protobuf_unittest::ForeignMessage::MergeFrom(from.optional_message());
  36273. }
  36274. if (cached_has_bits & 0x00000008u) {
  36275. mutable_optionalgroup()->::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup::MergeFrom(from.optionalgroup());
  36276. }
  36277. if (cached_has_bits & 0x00000010u) {
  36278. optional_int32_ = from.optional_int32_;
  36279. }
  36280. if (cached_has_bits & 0x00000020u) {
  36281. fixed_32_ = from.fixed_32_;
  36282. }
  36283. if (cached_has_bits & 0x00000040u) {
  36284. optional_enum_ = from.optional_enum_;
  36285. }
  36286. _has_bits_[0] |= cached_has_bits;
  36287. }
  36288. switch (from.oneof_field_case()) {
  36289. case kOneofUint32: {
  36290. set_oneof_uint32(from.oneof_uint32());
  36291. break;
  36292. }
  36293. case kOneofTestAllTypes: {
  36294. mutable_oneof_test_all_types()->::protobuf_unittest::TestAllTypes::MergeFrom(from.oneof_test_all_types());
  36295. break;
  36296. }
  36297. case kOneofString: {
  36298. set_oneof_string(from.oneof_string());
  36299. break;
  36300. }
  36301. case kOneofBytes: {
  36302. set_oneof_bytes(from.oneof_bytes());
  36303. break;
  36304. }
  36305. case ONEOF_FIELD_NOT_SET: {
  36306. break;
  36307. }
  36308. }
  36309. }
  36310. void TestHugeFieldNumbers::CopyFrom(const ::google::protobuf::Message& from) {
  36311. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestHugeFieldNumbers)
  36312. if (&from == this) return;
  36313. Clear();
  36314. MergeFrom(from);
  36315. }
  36316. void TestHugeFieldNumbers::CopyFrom(const TestHugeFieldNumbers& from) {
  36317. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestHugeFieldNumbers)
  36318. if (&from == this) return;
  36319. Clear();
  36320. MergeFrom(from);
  36321. }
  36322. bool TestHugeFieldNumbers::IsInitialized() const {
  36323. if (!_extensions_.IsInitialized()) {
  36324. return false;
  36325. }
  36326. return true;
  36327. }
  36328. void TestHugeFieldNumbers::Swap(TestHugeFieldNumbers* other) {
  36329. if (other == this) return;
  36330. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  36331. InternalSwap(other);
  36332. } else {
  36333. TestHugeFieldNumbers* temp = New(GetArenaNoVirtual());
  36334. temp->MergeFrom(*other);
  36335. other->CopyFrom(*this);
  36336. InternalSwap(temp);
  36337. if (GetArenaNoVirtual() == NULL) {
  36338. delete temp;
  36339. }
  36340. }
  36341. }
  36342. void TestHugeFieldNumbers::UnsafeArenaSwap(TestHugeFieldNumbers* other) {
  36343. if (other == this) return;
  36344. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  36345. InternalSwap(other);
  36346. }
  36347. void TestHugeFieldNumbers::InternalSwap(TestHugeFieldNumbers* other) {
  36348. using std::swap;
  36349. repeated_int32_.InternalSwap(&other->repeated_int32_);
  36350. packed_int32_.InternalSwap(&other->packed_int32_);
  36351. string_string_map_.Swap(&other->string_string_map_);
  36352. optional_string_.Swap(&other->optional_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  36353. GetArenaNoVirtual());
  36354. optional_bytes_.Swap(&other->optional_bytes_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  36355. GetArenaNoVirtual());
  36356. swap(optional_message_, other->optional_message_);
  36357. swap(optionalgroup_, other->optionalgroup_);
  36358. swap(optional_int32_, other->optional_int32_);
  36359. swap(fixed_32_, other->fixed_32_);
  36360. swap(optional_enum_, other->optional_enum_);
  36361. swap(oneof_field_, other->oneof_field_);
  36362. swap(_oneof_case_[0], other->_oneof_case_[0]);
  36363. swap(_has_bits_[0], other->_has_bits_[0]);
  36364. _internal_metadata_.Swap(&other->_internal_metadata_);
  36365. _extensions_.Swap(&other->_extensions_);
  36366. }
  36367. ::google::protobuf::Metadata TestHugeFieldNumbers::GetMetadata() const {
  36368. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  36369. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  36370. }
  36371. // ===================================================================
  36372. void TestExtensionInsideTable::InitAsDefaultInstance() {
  36373. }
  36374. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  36375. const int TestExtensionInsideTable::kField1FieldNumber;
  36376. const int TestExtensionInsideTable::kField2FieldNumber;
  36377. const int TestExtensionInsideTable::kField3FieldNumber;
  36378. const int TestExtensionInsideTable::kField4FieldNumber;
  36379. const int TestExtensionInsideTable::kField6FieldNumber;
  36380. const int TestExtensionInsideTable::kField7FieldNumber;
  36381. const int TestExtensionInsideTable::kField8FieldNumber;
  36382. const int TestExtensionInsideTable::kField9FieldNumber;
  36383. const int TestExtensionInsideTable::kField10FieldNumber;
  36384. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  36385. TestExtensionInsideTable::TestExtensionInsideTable()
  36386. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  36387. ::google::protobuf::internal::InitSCC(
  36388. &protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionInsideTable.base);
  36389. SharedCtor();
  36390. // @@protoc_insertion_point(constructor:protobuf_unittest.TestExtensionInsideTable)
  36391. }
  36392. TestExtensionInsideTable::TestExtensionInsideTable(::google::protobuf::Arena* arena)
  36393. : ::google::protobuf::Message(),
  36394. _extensions_(arena),
  36395. _internal_metadata_(arena) {
  36396. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionInsideTable.base);
  36397. SharedCtor();
  36398. RegisterArenaDtor(arena);
  36399. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestExtensionInsideTable)
  36400. }
  36401. TestExtensionInsideTable::TestExtensionInsideTable(const TestExtensionInsideTable& from)
  36402. : ::google::protobuf::Message(),
  36403. _internal_metadata_(NULL),
  36404. _has_bits_(from._has_bits_) {
  36405. _internal_metadata_.MergeFrom(from._internal_metadata_);
  36406. _extensions_.MergeFrom(from._extensions_);
  36407. ::memcpy(&field1_, &from.field1_,
  36408. static_cast<size_t>(reinterpret_cast<char*>(&field10_) -
  36409. reinterpret_cast<char*>(&field1_)) + sizeof(field10_));
  36410. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestExtensionInsideTable)
  36411. }
  36412. void TestExtensionInsideTable::SharedCtor() {
  36413. ::memset(&field1_, 0, static_cast<size_t>(
  36414. reinterpret_cast<char*>(&field10_) -
  36415. reinterpret_cast<char*>(&field1_)) + sizeof(field10_));
  36416. }
  36417. TestExtensionInsideTable::~TestExtensionInsideTable() {
  36418. // @@protoc_insertion_point(destructor:protobuf_unittest.TestExtensionInsideTable)
  36419. SharedDtor();
  36420. }
  36421. void TestExtensionInsideTable::SharedDtor() {
  36422. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  36423. }
  36424. void TestExtensionInsideTable::ArenaDtor(void* object) {
  36425. TestExtensionInsideTable* _this = reinterpret_cast< TestExtensionInsideTable* >(object);
  36426. (void)_this;
  36427. }
  36428. void TestExtensionInsideTable::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  36429. }
  36430. void TestExtensionInsideTable::SetCachedSize(int size) const {
  36431. _cached_size_.Set(size);
  36432. }
  36433. const ::google::protobuf::Descriptor* TestExtensionInsideTable::descriptor() {
  36434. ::protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  36435. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  36436. }
  36437. const TestExtensionInsideTable& TestExtensionInsideTable::default_instance() {
  36438. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_2eproto::scc_info_TestExtensionInsideTable.base);
  36439. return *internal_default_instance();
  36440. }
  36441. void TestExtensionInsideTable::Clear() {
  36442. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestExtensionInsideTable)
  36443. ::google::protobuf::uint32 cached_has_bits = 0;
  36444. // Prevent compiler warnings about cached_has_bits being unused
  36445. (void) cached_has_bits;
  36446. _extensions_.Clear();
  36447. cached_has_bits = _has_bits_[0];
  36448. if (cached_has_bits & 255u) {
  36449. ::memset(&field1_, 0, static_cast<size_t>(
  36450. reinterpret_cast<char*>(&field9_) -
  36451. reinterpret_cast<char*>(&field1_)) + sizeof(field9_));
  36452. }
  36453. field10_ = 0;
  36454. _has_bits_.Clear();
  36455. _internal_metadata_.Clear();
  36456. }
  36457. bool TestExtensionInsideTable::MergePartialFromCodedStream(
  36458. ::google::protobuf::io::CodedInputStream* input) {
  36459. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  36460. ::google::protobuf::uint32 tag;
  36461. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestExtensionInsideTable)
  36462. for (;;) {
  36463. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  36464. tag = p.first;
  36465. if (!p.second) goto handle_unusual;
  36466. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  36467. // optional int32 field1 = 1;
  36468. case 1: {
  36469. if (static_cast< ::google::protobuf::uint8>(tag) ==
  36470. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  36471. set_has_field1();
  36472. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  36473. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  36474. input, &field1_)));
  36475. } else {
  36476. goto handle_unusual;
  36477. }
  36478. break;
  36479. }
  36480. // optional int32 field2 = 2;
  36481. case 2: {
  36482. if (static_cast< ::google::protobuf::uint8>(tag) ==
  36483. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  36484. set_has_field2();
  36485. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  36486. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  36487. input, &field2_)));
  36488. } else {
  36489. goto handle_unusual;
  36490. }
  36491. break;
  36492. }
  36493. // optional int32 field3 = 3;
  36494. case 3: {
  36495. if (static_cast< ::google::protobuf::uint8>(tag) ==
  36496. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  36497. set_has_field3();
  36498. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  36499. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  36500. input, &field3_)));
  36501. } else {
  36502. goto handle_unusual;
  36503. }
  36504. break;
  36505. }
  36506. // optional int32 field4 = 4;
  36507. case 4: {
  36508. if (static_cast< ::google::protobuf::uint8>(tag) ==
  36509. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  36510. set_has_field4();
  36511. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  36512. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  36513. input, &field4_)));
  36514. } else {
  36515. goto handle_unusual;
  36516. }
  36517. break;
  36518. }
  36519. // optional int32 field6 = 6;
  36520. case 6: {
  36521. if (static_cast< ::google::protobuf::uint8>(tag) ==
  36522. static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
  36523. set_has_field6();
  36524. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  36525. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  36526. input, &field6_)));
  36527. } else {
  36528. goto handle_unusual;
  36529. }
  36530. break;
  36531. }
  36532. // optional int32 field7 = 7;
  36533. case 7: {
  36534. if (static_cast< ::google::protobuf::uint8>(tag) ==
  36535. static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
  36536. set_has_field7();
  36537. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  36538. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  36539. input, &field7_)));
  36540. } else {
  36541. goto handle_unusual;
  36542. }
  36543. break;
  36544. }
  36545. // optional int32 field8 = 8;
  36546. case 8: {
  36547. if (static_cast< ::google::protobuf::uint8>(tag) ==
  36548. static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) {
  36549. set_has_field8();
  36550. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  36551. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  36552. input, &field8_)));
  36553. } else {
  36554. goto handle_unusual;
  36555. }
  36556. break;
  36557. }
  36558. // optional int32 field9 = 9;
  36559. case 9: {
  36560. if (static_cast< ::google::protobuf::uint8>(tag) ==
  36561. static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) {
  36562. set_has_field9();
  36563. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  36564. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  36565. input, &field9_)));
  36566. } else {
  36567. goto handle_unusual;
  36568. }
  36569. break;
  36570. }
  36571. // optional int32 field10 = 10;
  36572. case 10: {
  36573. if (static_cast< ::google::protobuf::uint8>(tag) ==
  36574. static_cast< ::google::protobuf::uint8>(80u /* 80 & 0xFF */)) {
  36575. set_has_field10();
  36576. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  36577. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  36578. input, &field10_)));
  36579. } else {
  36580. goto handle_unusual;
  36581. }
  36582. break;
  36583. }
  36584. default: {
  36585. handle_unusual:
  36586. if (tag == 0) {
  36587. goto success;
  36588. }
  36589. if ((40u <= tag && tag < 48u)) {
  36590. DO_(_extensions_.ParseField(tag, input,
  36591. internal_default_instance(),
  36592. _internal_metadata_.mutable_unknown_fields()));
  36593. continue;
  36594. }
  36595. DO_(::google::protobuf::internal::WireFormat::SkipField(
  36596. input, tag, _internal_metadata_.mutable_unknown_fields()));
  36597. break;
  36598. }
  36599. }
  36600. }
  36601. success:
  36602. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestExtensionInsideTable)
  36603. return true;
  36604. failure:
  36605. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestExtensionInsideTable)
  36606. return false;
  36607. #undef DO_
  36608. }
  36609. void TestExtensionInsideTable::SerializeWithCachedSizes(
  36610. ::google::protobuf::io::CodedOutputStream* output) const {
  36611. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestExtensionInsideTable)
  36612. ::google::protobuf::uint32 cached_has_bits = 0;
  36613. (void) cached_has_bits;
  36614. cached_has_bits = _has_bits_[0];
  36615. // optional int32 field1 = 1;
  36616. if (cached_has_bits & 0x00000001u) {
  36617. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->field1(), output);
  36618. }
  36619. // optional int32 field2 = 2;
  36620. if (cached_has_bits & 0x00000002u) {
  36621. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->field2(), output);
  36622. }
  36623. // optional int32 field3 = 3;
  36624. if (cached_has_bits & 0x00000004u) {
  36625. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->field3(), output);
  36626. }
  36627. // optional int32 field4 = 4;
  36628. if (cached_has_bits & 0x00000008u) {
  36629. ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->field4(), output);
  36630. }
  36631. // Extension range [5, 6)
  36632. _extensions_.SerializeWithCachedSizes(
  36633. 5, 6, output);
  36634. // optional int32 field6 = 6;
  36635. if (cached_has_bits & 0x00000010u) {
  36636. ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->field6(), output);
  36637. }
  36638. // optional int32 field7 = 7;
  36639. if (cached_has_bits & 0x00000020u) {
  36640. ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->field7(), output);
  36641. }
  36642. // optional int32 field8 = 8;
  36643. if (cached_has_bits & 0x00000040u) {
  36644. ::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->field8(), output);
  36645. }
  36646. // optional int32 field9 = 9;
  36647. if (cached_has_bits & 0x00000080u) {
  36648. ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->field9(), output);
  36649. }
  36650. // optional int32 field10 = 10;
  36651. if (cached_has_bits & 0x00000100u) {
  36652. ::google::protobuf::internal::WireFormatLite::WriteInt32(10, this->field10(), output);
  36653. }
  36654. if (_internal_metadata_.have_unknown_fields()) {
  36655. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  36656. _internal_metadata_.unknown_fields(), output);
  36657. }
  36658. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestExtensionInsideTable)
  36659. }
  36660. ::google::protobuf::uint8* TestExtensionInsideTable::InternalSerializeWithCachedSizesToArray(
  36661. bool deterministic, ::google::protobuf::uint8* target) const {
  36662. (void)deterministic; // Unused
  36663. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestExtensionInsideTable)
  36664. ::google::protobuf::uint32 cached_has_bits = 0;
  36665. (void) cached_has_bits;
  36666. cached_has_bits = _has_bits_[0];
  36667. // optional int32 field1 = 1;
  36668. if (cached_has_bits & 0x00000001u) {
  36669. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->field1(), target);
  36670. }
  36671. // optional int32 field2 = 2;
  36672. if (cached_has_bits & 0x00000002u) {
  36673. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->field2(), target);
  36674. }
  36675. // optional int32 field3 = 3;
  36676. if (cached_has_bits & 0x00000004u) {
  36677. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->field3(), target);
  36678. }
  36679. // optional int32 field4 = 4;
  36680. if (cached_has_bits & 0x00000008u) {
  36681. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->field4(), target);
  36682. }
  36683. // Extension range [5, 6)
  36684. target = _extensions_.InternalSerializeWithCachedSizesToArray(
  36685. 5, 6, deterministic, target);
  36686. // optional int32 field6 = 6;
  36687. if (cached_has_bits & 0x00000010u) {
  36688. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->field6(), target);
  36689. }
  36690. // optional int32 field7 = 7;
  36691. if (cached_has_bits & 0x00000020u) {
  36692. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->field7(), target);
  36693. }
  36694. // optional int32 field8 = 8;
  36695. if (cached_has_bits & 0x00000040u) {
  36696. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->field8(), target);
  36697. }
  36698. // optional int32 field9 = 9;
  36699. if (cached_has_bits & 0x00000080u) {
  36700. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->field9(), target);
  36701. }
  36702. // optional int32 field10 = 10;
  36703. if (cached_has_bits & 0x00000100u) {
  36704. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(10, this->field10(), target);
  36705. }
  36706. if (_internal_metadata_.have_unknown_fields()) {
  36707. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  36708. _internal_metadata_.unknown_fields(), target);
  36709. }
  36710. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestExtensionInsideTable)
  36711. return target;
  36712. }
  36713. size_t TestExtensionInsideTable::ByteSizeLong() const {
  36714. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestExtensionInsideTable)
  36715. size_t total_size = 0;
  36716. total_size += _extensions_.ByteSize();
  36717. if (_internal_metadata_.have_unknown_fields()) {
  36718. total_size +=
  36719. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  36720. _internal_metadata_.unknown_fields());
  36721. }
  36722. if (_has_bits_[0 / 32] & 255u) {
  36723. // optional int32 field1 = 1;
  36724. if (has_field1()) {
  36725. total_size += 1 +
  36726. ::google::protobuf::internal::WireFormatLite::Int32Size(
  36727. this->field1());
  36728. }
  36729. // optional int32 field2 = 2;
  36730. if (has_field2()) {
  36731. total_size += 1 +
  36732. ::google::protobuf::internal::WireFormatLite::Int32Size(
  36733. this->field2());
  36734. }
  36735. // optional int32 field3 = 3;
  36736. if (has_field3()) {
  36737. total_size += 1 +
  36738. ::google::protobuf::internal::WireFormatLite::Int32Size(
  36739. this->field3());
  36740. }
  36741. // optional int32 field4 = 4;
  36742. if (has_field4()) {
  36743. total_size += 1 +
  36744. ::google::protobuf::internal::WireFormatLite::Int32Size(
  36745. this->field4());
  36746. }
  36747. // optional int32 field6 = 6;
  36748. if (has_field6()) {
  36749. total_size += 1 +
  36750. ::google::protobuf::internal::WireFormatLite::Int32Size(
  36751. this->field6());
  36752. }
  36753. // optional int32 field7 = 7;
  36754. if (has_field7()) {
  36755. total_size += 1 +
  36756. ::google::protobuf::internal::WireFormatLite::Int32Size(
  36757. this->field7());
  36758. }
  36759. // optional int32 field8 = 8;
  36760. if (has_field8()) {
  36761. total_size += 1 +
  36762. ::google::protobuf::internal::WireFormatLite::Int32Size(
  36763. this->field8());
  36764. }
  36765. // optional int32 field9 = 9;
  36766. if (has_field9()) {
  36767. total_size += 1 +
  36768. ::google::protobuf::internal::WireFormatLite::Int32Size(
  36769. this->field9());
  36770. }
  36771. }
  36772. // optional int32 field10 = 10;
  36773. if (has_field10()) {
  36774. total_size += 1 +
  36775. ::google::protobuf::internal::WireFormatLite::Int32Size(
  36776. this->field10());
  36777. }
  36778. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  36779. SetCachedSize(cached_size);
  36780. return total_size;
  36781. }
  36782. void TestExtensionInsideTable::MergeFrom(const ::google::protobuf::Message& from) {
  36783. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestExtensionInsideTable)
  36784. GOOGLE_DCHECK_NE(&from, this);
  36785. const TestExtensionInsideTable* source =
  36786. ::google::protobuf::internal::DynamicCastToGenerated<const TestExtensionInsideTable>(
  36787. &from);
  36788. if (source == NULL) {
  36789. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestExtensionInsideTable)
  36790. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  36791. } else {
  36792. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestExtensionInsideTable)
  36793. MergeFrom(*source);
  36794. }
  36795. }
  36796. void TestExtensionInsideTable::MergeFrom(const TestExtensionInsideTable& from) {
  36797. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestExtensionInsideTable)
  36798. GOOGLE_DCHECK_NE(&from, this);
  36799. _extensions_.MergeFrom(from._extensions_);
  36800. _internal_metadata_.MergeFrom(from._internal_metadata_);
  36801. ::google::protobuf::uint32 cached_has_bits = 0;
  36802. (void) cached_has_bits;
  36803. cached_has_bits = from._has_bits_[0];
  36804. if (cached_has_bits & 255u) {
  36805. if (cached_has_bits & 0x00000001u) {
  36806. field1_ = from.field1_;
  36807. }
  36808. if (cached_has_bits & 0x00000002u) {
  36809. field2_ = from.field2_;
  36810. }
  36811. if (cached_has_bits & 0x00000004u) {
  36812. field3_ = from.field3_;
  36813. }
  36814. if (cached_has_bits & 0x00000008u) {
  36815. field4_ = from.field4_;
  36816. }
  36817. if (cached_has_bits & 0x00000010u) {
  36818. field6_ = from.field6_;
  36819. }
  36820. if (cached_has_bits & 0x00000020u) {
  36821. field7_ = from.field7_;
  36822. }
  36823. if (cached_has_bits & 0x00000040u) {
  36824. field8_ = from.field8_;
  36825. }
  36826. if (cached_has_bits & 0x00000080u) {
  36827. field9_ = from.field9_;
  36828. }
  36829. _has_bits_[0] |= cached_has_bits;
  36830. }
  36831. if (cached_has_bits & 0x00000100u) {
  36832. set_field10(from.field10());
  36833. }
  36834. }
  36835. void TestExtensionInsideTable::CopyFrom(const ::google::protobuf::Message& from) {
  36836. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestExtensionInsideTable)
  36837. if (&from == this) return;
  36838. Clear();
  36839. MergeFrom(from);
  36840. }
  36841. void TestExtensionInsideTable::CopyFrom(const TestExtensionInsideTable& from) {
  36842. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestExtensionInsideTable)
  36843. if (&from == this) return;
  36844. Clear();
  36845. MergeFrom(from);
  36846. }
  36847. bool TestExtensionInsideTable::IsInitialized() const {
  36848. if (!_extensions_.IsInitialized()) {
  36849. return false;
  36850. }
  36851. return true;
  36852. }
  36853. void TestExtensionInsideTable::Swap(TestExtensionInsideTable* other) {
  36854. if (other == this) return;
  36855. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  36856. InternalSwap(other);
  36857. } else {
  36858. TestExtensionInsideTable* temp = New(GetArenaNoVirtual());
  36859. temp->MergeFrom(*other);
  36860. other->CopyFrom(*this);
  36861. InternalSwap(temp);
  36862. if (GetArenaNoVirtual() == NULL) {
  36863. delete temp;
  36864. }
  36865. }
  36866. }
  36867. void TestExtensionInsideTable::UnsafeArenaSwap(TestExtensionInsideTable* other) {
  36868. if (other == this) return;
  36869. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  36870. InternalSwap(other);
  36871. }
  36872. void TestExtensionInsideTable::InternalSwap(TestExtensionInsideTable* other) {
  36873. using std::swap;
  36874. swap(field1_, other->field1_);
  36875. swap(field2_, other->field2_);
  36876. swap(field3_, other->field3_);
  36877. swap(field4_, other->field4_);
  36878. swap(field6_, other->field6_);
  36879. swap(field7_, other->field7_);
  36880. swap(field8_, other->field8_);
  36881. swap(field9_, other->field9_);
  36882. swap(field10_, other->field10_);
  36883. swap(_has_bits_[0], other->_has_bits_[0]);
  36884. _internal_metadata_.Swap(&other->_internal_metadata_);
  36885. _extensions_.Swap(&other->_extensions_);
  36886. }
  36887. ::google::protobuf::Metadata TestExtensionInsideTable::GetMetadata() const {
  36888. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  36889. return ::protobuf_google_2fprotobuf_2funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  36890. }
  36891. // ===================================================================
  36892. TestService::~TestService() {}
  36893. const ::google::protobuf::ServiceDescriptor* TestService::descriptor() {
  36894. protobuf_google_2fprotobuf_2funittest_2eproto::protobuf_AssignDescriptorsOnce();
  36895. return protobuf_google_2fprotobuf_2funittest_2eproto::file_level_service_descriptors[0];
  36896. }
  36897. const ::google::protobuf::ServiceDescriptor* TestService::GetDescriptor() {
  36898. return descriptor();
  36899. }
  36900. void TestService::Foo(::google::protobuf::RpcController* controller,
  36901. const ::protobuf_unittest::FooRequest*,
  36902. ::protobuf_unittest::FooResponse*,
  36903. ::google::protobuf::Closure* done) {
  36904. controller->SetFailed("Method Foo() not implemented.");
  36905. done->Run();
  36906. }
  36907. void TestService::Bar(::google::protobuf::RpcController* controller,
  36908. const ::protobuf_unittest::BarRequest*,
  36909. ::protobuf_unittest::BarResponse*,
  36910. ::google::protobuf::Closure* done) {
  36911. controller->SetFailed("Method Bar() not implemented.");
  36912. done->Run();
  36913. }
  36914. void TestService::CallMethod(const ::google::protobuf::MethodDescriptor* method,
  36915. ::google::protobuf::RpcController* controller,
  36916. const ::google::protobuf::Message* request,
  36917. ::google::protobuf::Message* response,
  36918. ::google::protobuf::Closure* done) {
  36919. GOOGLE_DCHECK_EQ(method->service(), protobuf_google_2fprotobuf_2funittest_2eproto::file_level_service_descriptors[0]);
  36920. switch(method->index()) {
  36921. case 0:
  36922. Foo(controller,
  36923. ::google::protobuf::down_cast<const ::protobuf_unittest::FooRequest*>(request),
  36924. ::google::protobuf::down_cast< ::protobuf_unittest::FooResponse*>(response),
  36925. done);
  36926. break;
  36927. case 1:
  36928. Bar(controller,
  36929. ::google::protobuf::down_cast<const ::protobuf_unittest::BarRequest*>(request),
  36930. ::google::protobuf::down_cast< ::protobuf_unittest::BarResponse*>(response),
  36931. done);
  36932. break;
  36933. default:
  36934. GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
  36935. break;
  36936. }
  36937. }
  36938. const ::google::protobuf::Message& TestService::GetRequestPrototype(
  36939. const ::google::protobuf::MethodDescriptor* method) const {
  36940. GOOGLE_DCHECK_EQ(method->service(), descriptor());
  36941. switch(method->index()) {
  36942. case 0:
  36943. return ::protobuf_unittest::FooRequest::default_instance();
  36944. case 1:
  36945. return ::protobuf_unittest::BarRequest::default_instance();
  36946. default:
  36947. GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
  36948. return *::google::protobuf::MessageFactory::generated_factory()
  36949. ->GetPrototype(method->input_type());
  36950. }
  36951. }
  36952. const ::google::protobuf::Message& TestService::GetResponsePrototype(
  36953. const ::google::protobuf::MethodDescriptor* method) const {
  36954. GOOGLE_DCHECK_EQ(method->service(), descriptor());
  36955. switch(method->index()) {
  36956. case 0:
  36957. return ::protobuf_unittest::FooResponse::default_instance();
  36958. case 1:
  36959. return ::protobuf_unittest::BarResponse::default_instance();
  36960. default:
  36961. GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
  36962. return *::google::protobuf::MessageFactory::generated_factory()
  36963. ->GetPrototype(method->output_type());
  36964. }
  36965. }
  36966. TestService_Stub::TestService_Stub(::google::protobuf::RpcChannel* channel)
  36967. : channel_(channel), owns_channel_(false) {}
  36968. TestService_Stub::TestService_Stub(
  36969. ::google::protobuf::RpcChannel* channel,
  36970. ::google::protobuf::Service::ChannelOwnership ownership)
  36971. : channel_(channel),
  36972. owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {}
  36973. TestService_Stub::~TestService_Stub() {
  36974. if (owns_channel_) delete channel_;
  36975. }
  36976. void TestService_Stub::Foo(::google::protobuf::RpcController* controller,
  36977. const ::protobuf_unittest::FooRequest* request,
  36978. ::protobuf_unittest::FooResponse* response,
  36979. ::google::protobuf::Closure* done) {
  36980. channel_->CallMethod(descriptor()->method(0),
  36981. controller, request, response, done);
  36982. }
  36983. void TestService_Stub::Bar(::google::protobuf::RpcController* controller,
  36984. const ::protobuf_unittest::BarRequest* request,
  36985. ::protobuf_unittest::BarResponse* response,
  36986. ::google::protobuf::Closure* done) {
  36987. channel_->CallMethod(descriptor()->method(1),
  36988. controller, request, response, done);
  36989. }
  36990. const ::std::string TestNestedExtension_test_default("test");
  36991. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  36992. const int TestNestedExtension::kTestFieldNumber;
  36993. #endif
  36994. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  36995. ::google::protobuf::internal::StringTypeTraits, 9, false >
  36996. TestNestedExtension::test(kTestFieldNumber, TestNestedExtension_test_default);
  36997. const ::std::string TestNestedExtension_nested_string_extension_default("");
  36998. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  36999. const int TestNestedExtension::kNestedStringExtensionFieldNumber;
  37000. #endif
  37001. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37002. ::google::protobuf::internal::StringTypeTraits, 9, false >
  37003. TestNestedExtension::nested_string_extension(kNestedStringExtensionFieldNumber, TestNestedExtension_nested_string_extension_default);
  37004. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  37005. const int TestNestedExtension::kOptionalgroupExtensionFieldNumber;
  37006. #endif
  37007. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestGroupExtension,
  37008. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestNestedExtension_OptionalGroup_extension >, 10, false >
  37009. TestNestedExtension::optionalgroup_extension(kOptionalgroupExtensionFieldNumber, *::protobuf_unittest::TestNestedExtension_OptionalGroup_extension::internal_default_instance());
  37010. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  37011. const int TestNestedExtension::kOptionalForeignEnumExtensionFieldNumber;
  37012. #endif
  37013. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestGroupExtension,
  37014. ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::ForeignEnum, ::protobuf_unittest::ForeignEnum_IsValid>, 14, false >
  37015. TestNestedExtension::optional_foreign_enum_extension(kOptionalForeignEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::ForeignEnum >(4));
  37016. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  37017. const int TestRequired::kSingleFieldNumber;
  37018. #endif
  37019. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37020. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestRequired >, 11, false >
  37021. TestRequired::single(kSingleFieldNumber, *::protobuf_unittest::TestRequired::internal_default_instance());
  37022. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  37023. const int TestRequired::kMultiFieldNumber;
  37024. #endif
  37025. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37026. ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::TestRequired >, 11, false >
  37027. TestRequired::multi(kMultiFieldNumber, *::protobuf_unittest::TestRequired::internal_default_instance());
  37028. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  37029. const int TestExtensionOrderings1::kTestExtOrderings1FieldNumber;
  37030. #endif
  37031. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestFieldOrderings,
  37032. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestExtensionOrderings1 >, 11, false >
  37033. TestExtensionOrderings1::test_ext_orderings1(kTestExtOrderings1FieldNumber, *::protobuf_unittest::TestExtensionOrderings1::internal_default_instance());
  37034. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  37035. const int TestExtensionOrderings2_TestExtensionOrderings3::kTestExtOrderings3FieldNumber;
  37036. #endif
  37037. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestFieldOrderings,
  37038. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3 >, 11, false >
  37039. TestExtensionOrderings2_TestExtensionOrderings3::test_ext_orderings3(kTestExtOrderings3FieldNumber, *::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3::internal_default_instance());
  37040. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  37041. const int TestExtensionOrderings2::kTestExtOrderings2FieldNumber;
  37042. #endif
  37043. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestFieldOrderings,
  37044. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestExtensionOrderings2 >, 11, false >
  37045. TestExtensionOrderings2::test_ext_orderings2(kTestExtOrderings2FieldNumber, *::protobuf_unittest::TestExtensionOrderings2::internal_default_instance());
  37046. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  37047. const int TestParsingMerge::kOptionalExtFieldNumber;
  37048. #endif
  37049. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestParsingMerge,
  37050. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypes >, 11, false >
  37051. TestParsingMerge::optional_ext(kOptionalExtFieldNumber, *::protobuf_unittest::TestAllTypes::internal_default_instance());
  37052. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  37053. const int TestParsingMerge::kRepeatedExtFieldNumber;
  37054. #endif
  37055. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestParsingMerge,
  37056. ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::TestAllTypes >, 11, false >
  37057. TestParsingMerge::repeated_ext(kRepeatedExtFieldNumber, *::protobuf_unittest::TestAllTypes::internal_default_instance());
  37058. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37059. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  37060. optional_int32_extension(kOptionalInt32ExtensionFieldNumber, 0);
  37061. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37062. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 3, false >
  37063. optional_int64_extension(kOptionalInt64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
  37064. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37065. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  37066. optional_uint32_extension(kOptionalUint32ExtensionFieldNumber, 0u);
  37067. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37068. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  37069. optional_uint64_extension(kOptionalUint64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
  37070. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37071. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 17, false >
  37072. optional_sint32_extension(kOptionalSint32ExtensionFieldNumber, 0);
  37073. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37074. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  37075. optional_sint64_extension(kOptionalSint64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
  37076. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37077. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, false >
  37078. optional_fixed32_extension(kOptionalFixed32ExtensionFieldNumber, 0u);
  37079. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37080. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  37081. optional_fixed64_extension(kOptionalFixed64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
  37082. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37083. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  37084. optional_sfixed32_extension(kOptionalSfixed32ExtensionFieldNumber, 0);
  37085. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37086. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 16, false >
  37087. optional_sfixed64_extension(kOptionalSfixed64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
  37088. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37089. ::google::protobuf::internal::PrimitiveTypeTraits< float >, 2, false >
  37090. optional_float_extension(kOptionalFloatExtensionFieldNumber, 0);
  37091. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37092. ::google::protobuf::internal::PrimitiveTypeTraits< double >, 1, false >
  37093. optional_double_extension(kOptionalDoubleExtensionFieldNumber, 0);
  37094. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37095. ::google::protobuf::internal::PrimitiveTypeTraits< bool >, 8, false >
  37096. optional_bool_extension(kOptionalBoolExtensionFieldNumber, false);
  37097. const ::std::string optional_string_extension_default("");
  37098. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37099. ::google::protobuf::internal::StringTypeTraits, 9, false >
  37100. optional_string_extension(kOptionalStringExtensionFieldNumber, optional_string_extension_default);
  37101. const ::std::string optional_bytes_extension_default("");
  37102. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37103. ::google::protobuf::internal::StringTypeTraits, 12, false >
  37104. optional_bytes_extension(kOptionalBytesExtensionFieldNumber, optional_bytes_extension_default);
  37105. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37106. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::OptionalGroup_extension >, 10, false >
  37107. optionalgroup_extension(kOptionalgroupExtensionFieldNumber, *::protobuf_unittest::OptionalGroup_extension::internal_default_instance());
  37108. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37109. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypes_NestedMessage >, 11, false >
  37110. optional_nested_message_extension(kOptionalNestedMessageExtensionFieldNumber, *::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
  37111. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37112. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::ForeignMessage >, 11, false >
  37113. optional_foreign_message_extension(kOptionalForeignMessageExtensionFieldNumber, *::protobuf_unittest::ForeignMessage::internal_default_instance());
  37114. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37115. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest_import::ImportMessage >, 11, false >
  37116. optional_import_message_extension(kOptionalImportMessageExtensionFieldNumber, *::protobuf_unittest_import::ImportMessage::internal_default_instance());
  37117. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37118. ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::TestAllTypes_NestedEnum, ::protobuf_unittest::TestAllTypes_NestedEnum_IsValid>, 14, false >
  37119. optional_nested_enum_extension(kOptionalNestedEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::TestAllTypes_NestedEnum >(1));
  37120. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37121. ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::ForeignEnum, ::protobuf_unittest::ForeignEnum_IsValid>, 14, false >
  37122. optional_foreign_enum_extension(kOptionalForeignEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::ForeignEnum >(4));
  37123. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37124. ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest_import::ImportEnum, ::protobuf_unittest_import::ImportEnum_IsValid>, 14, false >
  37125. optional_import_enum_extension(kOptionalImportEnumExtensionFieldNumber, static_cast< ::protobuf_unittest_import::ImportEnum >(7));
  37126. const ::std::string optional_string_piece_extension_default("");
  37127. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37128. ::google::protobuf::internal::StringTypeTraits, 9, false >
  37129. optional_string_piece_extension(kOptionalStringPieceExtensionFieldNumber, optional_string_piece_extension_default);
  37130. const ::std::string optional_cord_extension_default("");
  37131. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37132. ::google::protobuf::internal::StringTypeTraits, 9, false >
  37133. optional_cord_extension(kOptionalCordExtensionFieldNumber, optional_cord_extension_default);
  37134. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37135. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest_import::PublicImportMessage >, 11, false >
  37136. optional_public_import_message_extension(kOptionalPublicImportMessageExtensionFieldNumber, *::protobuf_unittest_import::PublicImportMessage::internal_default_instance());
  37137. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37138. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypes_NestedMessage >, 11, false >
  37139. optional_lazy_message_extension(kOptionalLazyMessageExtensionFieldNumber, *::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
  37140. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37141. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  37142. repeated_int32_extension(kRepeatedInt32ExtensionFieldNumber, 0);
  37143. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37144. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 3, false >
  37145. repeated_int64_extension(kRepeatedInt64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
  37146. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37147. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  37148. repeated_uint32_extension(kRepeatedUint32ExtensionFieldNumber, 0u);
  37149. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37150. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  37151. repeated_uint64_extension(kRepeatedUint64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
  37152. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37153. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 17, false >
  37154. repeated_sint32_extension(kRepeatedSint32ExtensionFieldNumber, 0);
  37155. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37156. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  37157. repeated_sint64_extension(kRepeatedSint64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
  37158. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37159. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, false >
  37160. repeated_fixed32_extension(kRepeatedFixed32ExtensionFieldNumber, 0u);
  37161. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37162. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  37163. repeated_fixed64_extension(kRepeatedFixed64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
  37164. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37165. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  37166. repeated_sfixed32_extension(kRepeatedSfixed32ExtensionFieldNumber, 0);
  37167. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37168. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 16, false >
  37169. repeated_sfixed64_extension(kRepeatedSfixed64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
  37170. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37171. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< float >, 2, false >
  37172. repeated_float_extension(kRepeatedFloatExtensionFieldNumber, 0);
  37173. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37174. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< double >, 1, false >
  37175. repeated_double_extension(kRepeatedDoubleExtensionFieldNumber, 0);
  37176. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37177. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< bool >, 8, false >
  37178. repeated_bool_extension(kRepeatedBoolExtensionFieldNumber, false);
  37179. const ::std::string repeated_string_extension_default("");
  37180. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37181. ::google::protobuf::internal::RepeatedStringTypeTraits, 9, false >
  37182. repeated_string_extension(kRepeatedStringExtensionFieldNumber, repeated_string_extension_default);
  37183. const ::std::string repeated_bytes_extension_default("");
  37184. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37185. ::google::protobuf::internal::RepeatedStringTypeTraits, 12, false >
  37186. repeated_bytes_extension(kRepeatedBytesExtensionFieldNumber, repeated_bytes_extension_default);
  37187. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37188. ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::RepeatedGroup_extension >, 10, false >
  37189. repeatedgroup_extension(kRepeatedgroupExtensionFieldNumber, *::protobuf_unittest::RepeatedGroup_extension::internal_default_instance());
  37190. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37191. ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::TestAllTypes_NestedMessage >, 11, false >
  37192. repeated_nested_message_extension(kRepeatedNestedMessageExtensionFieldNumber, *::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
  37193. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37194. ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::ForeignMessage >, 11, false >
  37195. repeated_foreign_message_extension(kRepeatedForeignMessageExtensionFieldNumber, *::protobuf_unittest::ForeignMessage::internal_default_instance());
  37196. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37197. ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest_import::ImportMessage >, 11, false >
  37198. repeated_import_message_extension(kRepeatedImportMessageExtensionFieldNumber, *::protobuf_unittest_import::ImportMessage::internal_default_instance());
  37199. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37200. ::google::protobuf::internal::RepeatedEnumTypeTraits< ::protobuf_unittest::TestAllTypes_NestedEnum, ::protobuf_unittest::TestAllTypes_NestedEnum_IsValid>, 14, false >
  37201. repeated_nested_enum_extension(kRepeatedNestedEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::TestAllTypes_NestedEnum >(1));
  37202. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37203. ::google::protobuf::internal::RepeatedEnumTypeTraits< ::protobuf_unittest::ForeignEnum, ::protobuf_unittest::ForeignEnum_IsValid>, 14, false >
  37204. repeated_foreign_enum_extension(kRepeatedForeignEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::ForeignEnum >(4));
  37205. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37206. ::google::protobuf::internal::RepeatedEnumTypeTraits< ::protobuf_unittest_import::ImportEnum, ::protobuf_unittest_import::ImportEnum_IsValid>, 14, false >
  37207. repeated_import_enum_extension(kRepeatedImportEnumExtensionFieldNumber, static_cast< ::protobuf_unittest_import::ImportEnum >(7));
  37208. const ::std::string repeated_string_piece_extension_default("");
  37209. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37210. ::google::protobuf::internal::RepeatedStringTypeTraits, 9, false >
  37211. repeated_string_piece_extension(kRepeatedStringPieceExtensionFieldNumber, repeated_string_piece_extension_default);
  37212. const ::std::string repeated_cord_extension_default("");
  37213. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37214. ::google::protobuf::internal::RepeatedStringTypeTraits, 9, false >
  37215. repeated_cord_extension(kRepeatedCordExtensionFieldNumber, repeated_cord_extension_default);
  37216. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37217. ::google::protobuf::internal::RepeatedMessageTypeTraits< ::protobuf_unittest::TestAllTypes_NestedMessage >, 11, false >
  37218. repeated_lazy_message_extension(kRepeatedLazyMessageExtensionFieldNumber, *::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
  37219. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37220. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  37221. default_int32_extension(kDefaultInt32ExtensionFieldNumber, 41);
  37222. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37223. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 3, false >
  37224. default_int64_extension(kDefaultInt64ExtensionFieldNumber, GOOGLE_LONGLONG(42));
  37225. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37226. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  37227. default_uint32_extension(kDefaultUint32ExtensionFieldNumber, 43u);
  37228. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37229. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  37230. default_uint64_extension(kDefaultUint64ExtensionFieldNumber, GOOGLE_ULONGLONG(44));
  37231. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37232. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 17, false >
  37233. default_sint32_extension(kDefaultSint32ExtensionFieldNumber, -45);
  37234. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37235. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  37236. default_sint64_extension(kDefaultSint64ExtensionFieldNumber, GOOGLE_LONGLONG(46));
  37237. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37238. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, false >
  37239. default_fixed32_extension(kDefaultFixed32ExtensionFieldNumber, 47u);
  37240. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37241. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  37242. default_fixed64_extension(kDefaultFixed64ExtensionFieldNumber, GOOGLE_ULONGLONG(48));
  37243. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37244. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  37245. default_sfixed32_extension(kDefaultSfixed32ExtensionFieldNumber, 49);
  37246. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37247. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int64 >, 16, false >
  37248. default_sfixed64_extension(kDefaultSfixed64ExtensionFieldNumber, GOOGLE_LONGLONG(-50));
  37249. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37250. ::google::protobuf::internal::PrimitiveTypeTraits< float >, 2, false >
  37251. default_float_extension(kDefaultFloatExtensionFieldNumber, 51.5f);
  37252. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37253. ::google::protobuf::internal::PrimitiveTypeTraits< double >, 1, false >
  37254. default_double_extension(kDefaultDoubleExtensionFieldNumber, 52000);
  37255. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37256. ::google::protobuf::internal::PrimitiveTypeTraits< bool >, 8, false >
  37257. default_bool_extension(kDefaultBoolExtensionFieldNumber, true);
  37258. const ::std::string default_string_extension_default("hello");
  37259. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37260. ::google::protobuf::internal::StringTypeTraits, 9, false >
  37261. default_string_extension(kDefaultStringExtensionFieldNumber, default_string_extension_default);
  37262. const ::std::string default_bytes_extension_default("world");
  37263. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37264. ::google::protobuf::internal::StringTypeTraits, 12, false >
  37265. default_bytes_extension(kDefaultBytesExtensionFieldNumber, default_bytes_extension_default);
  37266. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37267. ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::TestAllTypes_NestedEnum, ::protobuf_unittest::TestAllTypes_NestedEnum_IsValid>, 14, false >
  37268. default_nested_enum_extension(kDefaultNestedEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::TestAllTypes_NestedEnum >(2));
  37269. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37270. ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest::ForeignEnum, ::protobuf_unittest::ForeignEnum_IsValid>, 14, false >
  37271. default_foreign_enum_extension(kDefaultForeignEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::ForeignEnum >(5));
  37272. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37273. ::google::protobuf::internal::EnumTypeTraits< ::protobuf_unittest_import::ImportEnum, ::protobuf_unittest_import::ImportEnum_IsValid>, 14, false >
  37274. default_import_enum_extension(kDefaultImportEnumExtensionFieldNumber, static_cast< ::protobuf_unittest_import::ImportEnum >(8));
  37275. const ::std::string default_string_piece_extension_default("abc");
  37276. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37277. ::google::protobuf::internal::StringTypeTraits, 9, false >
  37278. default_string_piece_extension(kDefaultStringPieceExtensionFieldNumber, default_string_piece_extension_default);
  37279. const ::std::string default_cord_extension_default("123");
  37280. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37281. ::google::protobuf::internal::StringTypeTraits, 9, false >
  37282. default_cord_extension(kDefaultCordExtensionFieldNumber, default_cord_extension_default);
  37283. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37284. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  37285. oneof_uint32_extension(kOneofUint32ExtensionFieldNumber, 0u);
  37286. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37287. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypes_NestedMessage >, 11, false >
  37288. oneof_nested_message_extension(kOneofNestedMessageExtensionFieldNumber, *::protobuf_unittest::TestAllTypes_NestedMessage::internal_default_instance());
  37289. const ::std::string oneof_string_extension_default("");
  37290. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37291. ::google::protobuf::internal::StringTypeTraits, 9, false >
  37292. oneof_string_extension(kOneofStringExtensionFieldNumber, oneof_string_extension_default);
  37293. const ::std::string oneof_bytes_extension_default("");
  37294. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestAllExtensions,
  37295. ::google::protobuf::internal::StringTypeTraits, 12, false >
  37296. oneof_bytes_extension(kOneofBytesExtensionFieldNumber, oneof_bytes_extension_default);
  37297. const ::std::string my_extension_string_default("");
  37298. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestFieldOrderings,
  37299. ::google::protobuf::internal::StringTypeTraits, 9, false >
  37300. my_extension_string(kMyExtensionStringFieldNumber, my_extension_string_default);
  37301. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestFieldOrderings,
  37302. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  37303. my_extension_int(kMyExtensionIntFieldNumber, 0);
  37304. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
  37305. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 5, true >
  37306. packed_int32_extension(kPackedInt32ExtensionFieldNumber, 0);
  37307. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
  37308. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 3, true >
  37309. packed_int64_extension(kPackedInt64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
  37310. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
  37311. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, true >
  37312. packed_uint32_extension(kPackedUint32ExtensionFieldNumber, 0u);
  37313. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
  37314. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, true >
  37315. packed_uint64_extension(kPackedUint64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
  37316. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
  37317. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 17, true >
  37318. packed_sint32_extension(kPackedSint32ExtensionFieldNumber, 0);
  37319. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
  37320. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 18, true >
  37321. packed_sint64_extension(kPackedSint64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
  37322. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
  37323. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, true >
  37324. packed_fixed32_extension(kPackedFixed32ExtensionFieldNumber, 0u);
  37325. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
  37326. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, true >
  37327. packed_fixed64_extension(kPackedFixed64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
  37328. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
  37329. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 15, true >
  37330. packed_sfixed32_extension(kPackedSfixed32ExtensionFieldNumber, 0);
  37331. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
  37332. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 16, true >
  37333. packed_sfixed64_extension(kPackedSfixed64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
  37334. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
  37335. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< float >, 2, true >
  37336. packed_float_extension(kPackedFloatExtensionFieldNumber, 0);
  37337. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
  37338. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< double >, 1, true >
  37339. packed_double_extension(kPackedDoubleExtensionFieldNumber, 0);
  37340. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
  37341. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< bool >, 8, true >
  37342. packed_bool_extension(kPackedBoolExtensionFieldNumber, false);
  37343. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestPackedExtensions,
  37344. ::google::protobuf::internal::RepeatedEnumTypeTraits< ::protobuf_unittest::ForeignEnum, ::protobuf_unittest::ForeignEnum_IsValid>, 14, true >
  37345. packed_enum_extension(kPackedEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::ForeignEnum >(4));
  37346. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
  37347. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  37348. unpacked_int32_extension(kUnpackedInt32ExtensionFieldNumber, 0);
  37349. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
  37350. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 3, false >
  37351. unpacked_int64_extension(kUnpackedInt64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
  37352. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
  37353. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  37354. unpacked_uint32_extension(kUnpackedUint32ExtensionFieldNumber, 0u);
  37355. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
  37356. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 4, false >
  37357. unpacked_uint64_extension(kUnpackedUint64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
  37358. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
  37359. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 17, false >
  37360. unpacked_sint32_extension(kUnpackedSint32ExtensionFieldNumber, 0);
  37361. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
  37362. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 18, false >
  37363. unpacked_sint64_extension(kUnpackedSint64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
  37364. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
  37365. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint32 >, 7, false >
  37366. unpacked_fixed32_extension(kUnpackedFixed32ExtensionFieldNumber, 0u);
  37367. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
  37368. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::uint64 >, 6, false >
  37369. unpacked_fixed64_extension(kUnpackedFixed64ExtensionFieldNumber, GOOGLE_ULONGLONG(0));
  37370. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
  37371. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int32 >, 15, false >
  37372. unpacked_sfixed32_extension(kUnpackedSfixed32ExtensionFieldNumber, 0);
  37373. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
  37374. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< ::google::protobuf::int64 >, 16, false >
  37375. unpacked_sfixed64_extension(kUnpackedSfixed64ExtensionFieldNumber, GOOGLE_LONGLONG(0));
  37376. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
  37377. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< float >, 2, false >
  37378. unpacked_float_extension(kUnpackedFloatExtensionFieldNumber, 0);
  37379. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
  37380. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< double >, 1, false >
  37381. unpacked_double_extension(kUnpackedDoubleExtensionFieldNumber, 0);
  37382. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
  37383. ::google::protobuf::internal::RepeatedPrimitiveTypeTraits< bool >, 8, false >
  37384. unpacked_bool_extension(kUnpackedBoolExtensionFieldNumber, false);
  37385. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestUnpackedExtensions,
  37386. ::google::protobuf::internal::RepeatedEnumTypeTraits< ::protobuf_unittest::ForeignEnum, ::protobuf_unittest::ForeignEnum_IsValid>, 14, false >
  37387. unpacked_enum_extension(kUnpackedEnumExtensionFieldNumber, static_cast< ::protobuf_unittest::ForeignEnum >(4));
  37388. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestHugeFieldNumbers,
  37389. ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestAllTypes >, 11, false >
  37390. test_all_types(kTestAllTypesFieldNumber, *::protobuf_unittest::TestAllTypes::internal_default_instance());
  37391. ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestExtensionInsideTable,
  37392. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  37393. test_extension_inside_table_extension(kTestExtensionInsideTableExtensionFieldNumber, 0);
  37394. // @@protoc_insertion_point(namespace_scope)
  37395. } // namespace protobuf_unittest
  37396. namespace google {
  37397. namespace protobuf {
  37398. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllTypes_NestedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllTypes_NestedMessage >(Arena* arena) {
  37399. return Arena::CreateMessageInternal< ::protobuf_unittest::TestAllTypes_NestedMessage >(arena);
  37400. }
  37401. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllTypes_OptionalGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllTypes_OptionalGroup >(Arena* arena) {
  37402. return Arena::CreateMessageInternal< ::protobuf_unittest::TestAllTypes_OptionalGroup >(arena);
  37403. }
  37404. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllTypes_RepeatedGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllTypes_RepeatedGroup >(Arena* arena) {
  37405. return Arena::CreateMessageInternal< ::protobuf_unittest::TestAllTypes_RepeatedGroup >(arena);
  37406. }
  37407. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllTypes* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllTypes >(Arena* arena) {
  37408. return Arena::CreateMessageInternal< ::protobuf_unittest::TestAllTypes >(arena);
  37409. }
  37410. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::NestedTestAllTypes* Arena::CreateMaybeMessage< ::protobuf_unittest::NestedTestAllTypes >(Arena* arena) {
  37411. return Arena::CreateMessageInternal< ::protobuf_unittest::NestedTestAllTypes >(arena);
  37412. }
  37413. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDeprecatedFields* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDeprecatedFields >(Arena* arena) {
  37414. return Arena::CreateMessageInternal< ::protobuf_unittest::TestDeprecatedFields >(arena);
  37415. }
  37416. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDeprecatedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDeprecatedMessage >(Arena* arena) {
  37417. return Arena::CreateMessageInternal< ::protobuf_unittest::TestDeprecatedMessage >(arena);
  37418. }
  37419. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::ForeignMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::ForeignMessage >(Arena* arena) {
  37420. return Arena::CreateMessageInternal< ::protobuf_unittest::ForeignMessage >(arena);
  37421. }
  37422. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestReservedFields* Arena::CreateMaybeMessage< ::protobuf_unittest::TestReservedFields >(Arena* arena) {
  37423. return Arena::CreateMessageInternal< ::protobuf_unittest::TestReservedFields >(arena);
  37424. }
  37425. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestAllExtensions* Arena::CreateMaybeMessage< ::protobuf_unittest::TestAllExtensions >(Arena* arena) {
  37426. return Arena::CreateMessageInternal< ::protobuf_unittest::TestAllExtensions >(arena);
  37427. }
  37428. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::OptionalGroup_extension* Arena::CreateMaybeMessage< ::protobuf_unittest::OptionalGroup_extension >(Arena* arena) {
  37429. return Arena::CreateMessageInternal< ::protobuf_unittest::OptionalGroup_extension >(arena);
  37430. }
  37431. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::RepeatedGroup_extension* Arena::CreateMaybeMessage< ::protobuf_unittest::RepeatedGroup_extension >(Arena* arena) {
  37432. return Arena::CreateMessageInternal< ::protobuf_unittest::RepeatedGroup_extension >(arena);
  37433. }
  37434. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestGroup_OptionalGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestGroup_OptionalGroup >(Arena* arena) {
  37435. return Arena::CreateMessageInternal< ::protobuf_unittest::TestGroup_OptionalGroup >(arena);
  37436. }
  37437. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestGroup >(Arena* arena) {
  37438. return Arena::CreateMessageInternal< ::protobuf_unittest::TestGroup >(arena);
  37439. }
  37440. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestGroupExtension* Arena::CreateMaybeMessage< ::protobuf_unittest::TestGroupExtension >(Arena* arena) {
  37441. return Arena::CreateMessageInternal< ::protobuf_unittest::TestGroupExtension >(arena);
  37442. }
  37443. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestNestedExtension_OptionalGroup_extension* Arena::CreateMaybeMessage< ::protobuf_unittest::TestNestedExtension_OptionalGroup_extension >(Arena* arena) {
  37444. return Arena::CreateMessageInternal< ::protobuf_unittest::TestNestedExtension_OptionalGroup_extension >(arena);
  37445. }
  37446. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestNestedExtension* Arena::CreateMaybeMessage< ::protobuf_unittest::TestNestedExtension >(Arena* arena) {
  37447. return Arena::CreateMessageInternal< ::protobuf_unittest::TestNestedExtension >(arena);
  37448. }
  37449. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestRequired* Arena::CreateMaybeMessage< ::protobuf_unittest::TestRequired >(Arena* arena) {
  37450. return Arena::CreateMessageInternal< ::protobuf_unittest::TestRequired >(arena);
  37451. }
  37452. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestRequiredForeign* Arena::CreateMaybeMessage< ::protobuf_unittest::TestRequiredForeign >(Arena* arena) {
  37453. return Arena::CreateMessageInternal< ::protobuf_unittest::TestRequiredForeign >(arena);
  37454. }
  37455. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestRequiredMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestRequiredMessage >(Arena* arena) {
  37456. return Arena::CreateMessageInternal< ::protobuf_unittest::TestRequiredMessage >(arena);
  37457. }
  37458. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestForeignNested* Arena::CreateMaybeMessage< ::protobuf_unittest::TestForeignNested >(Arena* arena) {
  37459. return Arena::CreateMessageInternal< ::protobuf_unittest::TestForeignNested >(arena);
  37460. }
  37461. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestEmptyMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestEmptyMessage >(Arena* arena) {
  37462. return Arena::CreateMessageInternal< ::protobuf_unittest::TestEmptyMessage >(arena);
  37463. }
  37464. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestEmptyMessageWithExtensions* Arena::CreateMaybeMessage< ::protobuf_unittest::TestEmptyMessageWithExtensions >(Arena* arena) {
  37465. return Arena::CreateMessageInternal< ::protobuf_unittest::TestEmptyMessageWithExtensions >(arena);
  37466. }
  37467. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMultipleExtensionRanges* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMultipleExtensionRanges >(Arena* arena) {
  37468. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMultipleExtensionRanges >(arena);
  37469. }
  37470. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestReallyLargeTagNumber* Arena::CreateMaybeMessage< ::protobuf_unittest::TestReallyLargeTagNumber >(Arena* arena) {
  37471. return Arena::CreateMessageInternal< ::protobuf_unittest::TestReallyLargeTagNumber >(arena);
  37472. }
  37473. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestRecursiveMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestRecursiveMessage >(Arena* arena) {
  37474. return Arena::CreateMessageInternal< ::protobuf_unittest::TestRecursiveMessage >(arena);
  37475. }
  37476. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMutualRecursionA_SubMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMutualRecursionA_SubMessage >(Arena* arena) {
  37477. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMutualRecursionA_SubMessage >(arena);
  37478. }
  37479. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMutualRecursionA_SubGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMutualRecursionA_SubGroup >(Arena* arena) {
  37480. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMutualRecursionA_SubGroup >(arena);
  37481. }
  37482. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMutualRecursionA* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMutualRecursionA >(Arena* arena) {
  37483. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMutualRecursionA >(arena);
  37484. }
  37485. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMutualRecursionB* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMutualRecursionB >(Arena* arena) {
  37486. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMutualRecursionB >(arena);
  37487. }
  37488. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup >(Arena* arena) {
  37489. return Arena::CreateMessageInternal< ::protobuf_unittest::TestIsInitialized_SubMessage_SubGroup >(arena);
  37490. }
  37491. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestIsInitialized_SubMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestIsInitialized_SubMessage >(Arena* arena) {
  37492. return Arena::CreateMessageInternal< ::protobuf_unittest::TestIsInitialized_SubMessage >(arena);
  37493. }
  37494. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestIsInitialized* Arena::CreateMaybeMessage< ::protobuf_unittest::TestIsInitialized >(Arena* arena) {
  37495. return Arena::CreateMessageInternal< ::protobuf_unittest::TestIsInitialized >(arena);
  37496. }
  37497. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDupFieldNumber_Foo* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDupFieldNumber_Foo >(Arena* arena) {
  37498. return Arena::CreateMessageInternal< ::protobuf_unittest::TestDupFieldNumber_Foo >(arena);
  37499. }
  37500. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDupFieldNumber_Bar* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDupFieldNumber_Bar >(Arena* arena) {
  37501. return Arena::CreateMessageInternal< ::protobuf_unittest::TestDupFieldNumber_Bar >(arena);
  37502. }
  37503. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDupFieldNumber* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDupFieldNumber >(Arena* arena) {
  37504. return Arena::CreateMessageInternal< ::protobuf_unittest::TestDupFieldNumber >(arena);
  37505. }
  37506. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestEagerMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestEagerMessage >(Arena* arena) {
  37507. return Arena::CreateMessageInternal< ::protobuf_unittest::TestEagerMessage >(arena);
  37508. }
  37509. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestLazyMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestLazyMessage >(Arena* arena) {
  37510. return Arena::CreateMessageInternal< ::protobuf_unittest::TestLazyMessage >(arena);
  37511. }
  37512. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage >(Arena* arena) {
  37513. return Arena::CreateMessageInternal< ::protobuf_unittest::TestNestedMessageHasBits_NestedMessage >(arena);
  37514. }
  37515. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestNestedMessageHasBits* Arena::CreateMaybeMessage< ::protobuf_unittest::TestNestedMessageHasBits >(Arena* arena) {
  37516. return Arena::CreateMessageInternal< ::protobuf_unittest::TestNestedMessageHasBits >(arena);
  37517. }
  37518. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestCamelCaseFieldNames* Arena::CreateMaybeMessage< ::protobuf_unittest::TestCamelCaseFieldNames >(Arena* arena) {
  37519. return Arena::CreateMessageInternal< ::protobuf_unittest::TestCamelCaseFieldNames >(arena);
  37520. }
  37521. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestFieldOrderings_NestedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestFieldOrderings_NestedMessage >(Arena* arena) {
  37522. return Arena::CreateMessageInternal< ::protobuf_unittest::TestFieldOrderings_NestedMessage >(arena);
  37523. }
  37524. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestFieldOrderings* Arena::CreateMaybeMessage< ::protobuf_unittest::TestFieldOrderings >(Arena* arena) {
  37525. return Arena::CreateMessageInternal< ::protobuf_unittest::TestFieldOrderings >(arena);
  37526. }
  37527. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestExtensionOrderings1* Arena::CreateMaybeMessage< ::protobuf_unittest::TestExtensionOrderings1 >(Arena* arena) {
  37528. return Arena::CreateMessageInternal< ::protobuf_unittest::TestExtensionOrderings1 >(arena);
  37529. }
  37530. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3* Arena::CreateMaybeMessage< ::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3 >(Arena* arena) {
  37531. return Arena::CreateMessageInternal< ::protobuf_unittest::TestExtensionOrderings2_TestExtensionOrderings3 >(arena);
  37532. }
  37533. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestExtensionOrderings2* Arena::CreateMaybeMessage< ::protobuf_unittest::TestExtensionOrderings2 >(Arena* arena) {
  37534. return Arena::CreateMessageInternal< ::protobuf_unittest::TestExtensionOrderings2 >(arena);
  37535. }
  37536. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestExtremeDefaultValues* Arena::CreateMaybeMessage< ::protobuf_unittest::TestExtremeDefaultValues >(Arena* arena) {
  37537. return Arena::CreateMessageInternal< ::protobuf_unittest::TestExtremeDefaultValues >(arena);
  37538. }
  37539. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::SparseEnumMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::SparseEnumMessage >(Arena* arena) {
  37540. return Arena::CreateMessageInternal< ::protobuf_unittest::SparseEnumMessage >(arena);
  37541. }
  37542. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::OneString* Arena::CreateMaybeMessage< ::protobuf_unittest::OneString >(Arena* arena) {
  37543. return Arena::CreateMessageInternal< ::protobuf_unittest::OneString >(arena);
  37544. }
  37545. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::MoreString* Arena::CreateMaybeMessage< ::protobuf_unittest::MoreString >(Arena* arena) {
  37546. return Arena::CreateMessageInternal< ::protobuf_unittest::MoreString >(arena);
  37547. }
  37548. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::OneBytes* Arena::CreateMaybeMessage< ::protobuf_unittest::OneBytes >(Arena* arena) {
  37549. return Arena::CreateMessageInternal< ::protobuf_unittest::OneBytes >(arena);
  37550. }
  37551. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::MoreBytes* Arena::CreateMaybeMessage< ::protobuf_unittest::MoreBytes >(Arena* arena) {
  37552. return Arena::CreateMessageInternal< ::protobuf_unittest::MoreBytes >(arena);
  37553. }
  37554. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::Int32Message* Arena::CreateMaybeMessage< ::protobuf_unittest::Int32Message >(Arena* arena) {
  37555. return Arena::CreateMessageInternal< ::protobuf_unittest::Int32Message >(arena);
  37556. }
  37557. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::Uint32Message* Arena::CreateMaybeMessage< ::protobuf_unittest::Uint32Message >(Arena* arena) {
  37558. return Arena::CreateMessageInternal< ::protobuf_unittest::Uint32Message >(arena);
  37559. }
  37560. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::Int64Message* Arena::CreateMaybeMessage< ::protobuf_unittest::Int64Message >(Arena* arena) {
  37561. return Arena::CreateMessageInternal< ::protobuf_unittest::Int64Message >(arena);
  37562. }
  37563. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::Uint64Message* Arena::CreateMaybeMessage< ::protobuf_unittest::Uint64Message >(Arena* arena) {
  37564. return Arena::CreateMessageInternal< ::protobuf_unittest::Uint64Message >(arena);
  37565. }
  37566. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::BoolMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::BoolMessage >(Arena* arena) {
  37567. return Arena::CreateMessageInternal< ::protobuf_unittest::BoolMessage >(arena);
  37568. }
  37569. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneof_FooGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneof_FooGroup >(Arena* arena) {
  37570. return Arena::CreateMessageInternal< ::protobuf_unittest::TestOneof_FooGroup >(arena);
  37571. }
  37572. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneof* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneof >(Arena* arena) {
  37573. return Arena::CreateMessageInternal< ::protobuf_unittest::TestOneof >(arena);
  37574. }
  37575. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup >(Arena* arena) {
  37576. return Arena::CreateMessageInternal< ::protobuf_unittest::TestOneofBackwardsCompatible_FooGroup >(arena);
  37577. }
  37578. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneofBackwardsCompatible* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneofBackwardsCompatible >(Arena* arena) {
  37579. return Arena::CreateMessageInternal< ::protobuf_unittest::TestOneofBackwardsCompatible >(arena);
  37580. }
  37581. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneof2_FooGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneof2_FooGroup >(Arena* arena) {
  37582. return Arena::CreateMessageInternal< ::protobuf_unittest::TestOneof2_FooGroup >(arena);
  37583. }
  37584. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneof2_NestedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneof2_NestedMessage >(Arena* arena) {
  37585. return Arena::CreateMessageInternal< ::protobuf_unittest::TestOneof2_NestedMessage >(arena);
  37586. }
  37587. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestOneof2* Arena::CreateMaybeMessage< ::protobuf_unittest::TestOneof2 >(Arena* arena) {
  37588. return Arena::CreateMessageInternal< ::protobuf_unittest::TestOneof2 >(arena);
  37589. }
  37590. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestRequiredOneof_NestedMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestRequiredOneof_NestedMessage >(Arena* arena) {
  37591. return Arena::CreateMessageInternal< ::protobuf_unittest::TestRequiredOneof_NestedMessage >(arena);
  37592. }
  37593. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestRequiredOneof* Arena::CreateMaybeMessage< ::protobuf_unittest::TestRequiredOneof >(Arena* arena) {
  37594. return Arena::CreateMessageInternal< ::protobuf_unittest::TestRequiredOneof >(arena);
  37595. }
  37596. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestPackedTypes* Arena::CreateMaybeMessage< ::protobuf_unittest::TestPackedTypes >(Arena* arena) {
  37597. return Arena::CreateMessageInternal< ::protobuf_unittest::TestPackedTypes >(arena);
  37598. }
  37599. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestUnpackedTypes* Arena::CreateMaybeMessage< ::protobuf_unittest::TestUnpackedTypes >(Arena* arena) {
  37600. return Arena::CreateMessageInternal< ::protobuf_unittest::TestUnpackedTypes >(arena);
  37601. }
  37602. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestPackedExtensions* Arena::CreateMaybeMessage< ::protobuf_unittest::TestPackedExtensions >(Arena* arena) {
  37603. return Arena::CreateMessageInternal< ::protobuf_unittest::TestPackedExtensions >(arena);
  37604. }
  37605. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestUnpackedExtensions* Arena::CreateMaybeMessage< ::protobuf_unittest::TestUnpackedExtensions >(Arena* arena) {
  37606. return Arena::CreateMessageInternal< ::protobuf_unittest::TestUnpackedExtensions >(arena);
  37607. }
  37608. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType >(Arena* arena) {
  37609. return Arena::CreateMessageInternal< ::protobuf_unittest::TestDynamicExtensions_DynamicMessageType >(arena);
  37610. }
  37611. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDynamicExtensions* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDynamicExtensions >(Arena* arena) {
  37612. return Arena::CreateMessageInternal< ::protobuf_unittest::TestDynamicExtensions >(arena);
  37613. }
  37614. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestRepeatedScalarDifferentTagSizes* Arena::CreateMaybeMessage< ::protobuf_unittest::TestRepeatedScalarDifferentTagSizes >(Arena* arena) {
  37615. return Arena::CreateMessageInternal< ::protobuf_unittest::TestRepeatedScalarDifferentTagSizes >(arena);
  37616. }
  37617. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1 >(Arena* arena) {
  37618. return Arena::CreateMessageInternal< ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group1 >(arena);
  37619. }
  37620. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2 >(Arena* arena) {
  37621. return Arena::CreateMessageInternal< ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator_Group2 >(arena);
  37622. }
  37623. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator >(Arena* arena) {
  37624. return Arena::CreateMessageInternal< ::protobuf_unittest::TestParsingMerge_RepeatedFieldsGenerator >(arena);
  37625. }
  37626. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMerge_OptionalGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMerge_OptionalGroup >(Arena* arena) {
  37627. return Arena::CreateMessageInternal< ::protobuf_unittest::TestParsingMerge_OptionalGroup >(arena);
  37628. }
  37629. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMerge_RepeatedGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMerge_RepeatedGroup >(Arena* arena) {
  37630. return Arena::CreateMessageInternal< ::protobuf_unittest::TestParsingMerge_RepeatedGroup >(arena);
  37631. }
  37632. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestParsingMerge* Arena::CreateMaybeMessage< ::protobuf_unittest::TestParsingMerge >(Arena* arena) {
  37633. return Arena::CreateMessageInternal< ::protobuf_unittest::TestParsingMerge >(arena);
  37634. }
  37635. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestCommentInjectionMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestCommentInjectionMessage >(Arena* arena) {
  37636. return Arena::CreateMessageInternal< ::protobuf_unittest::TestCommentInjectionMessage >(arena);
  37637. }
  37638. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::FooRequest* Arena::CreateMaybeMessage< ::protobuf_unittest::FooRequest >(Arena* arena) {
  37639. return Arena::CreateMessageInternal< ::protobuf_unittest::FooRequest >(arena);
  37640. }
  37641. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::FooResponse* Arena::CreateMaybeMessage< ::protobuf_unittest::FooResponse >(Arena* arena) {
  37642. return Arena::CreateMessageInternal< ::protobuf_unittest::FooResponse >(arena);
  37643. }
  37644. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::FooClientMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::FooClientMessage >(Arena* arena) {
  37645. return Arena::CreateMessageInternal< ::protobuf_unittest::FooClientMessage >(arena);
  37646. }
  37647. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::FooServerMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::FooServerMessage >(Arena* arena) {
  37648. return Arena::CreateMessageInternal< ::protobuf_unittest::FooServerMessage >(arena);
  37649. }
  37650. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::BarRequest* Arena::CreateMaybeMessage< ::protobuf_unittest::BarRequest >(Arena* arena) {
  37651. return Arena::CreateMessageInternal< ::protobuf_unittest::BarRequest >(arena);
  37652. }
  37653. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::BarResponse* Arena::CreateMaybeMessage< ::protobuf_unittest::BarResponse >(Arena* arena) {
  37654. return Arena::CreateMessageInternal< ::protobuf_unittest::BarResponse >(arena);
  37655. }
  37656. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestJsonName* Arena::CreateMaybeMessage< ::protobuf_unittest::TestJsonName >(Arena* arena) {
  37657. return Arena::CreateMessageInternal< ::protobuf_unittest::TestJsonName >(arena);
  37658. }
  37659. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup* Arena::CreateMaybeMessage< ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup >(Arena* arena) {
  37660. return Arena::CreateMessageInternal< ::protobuf_unittest::TestHugeFieldNumbers_OptionalGroup >(arena);
  37661. }
  37662. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse >(Arena* arena) {
  37663. return Arena::CreateMessageInternal< ::protobuf_unittest::TestHugeFieldNumbers_StringStringMapEntry_DoNotUse >(arena);
  37664. }
  37665. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestHugeFieldNumbers* Arena::CreateMaybeMessage< ::protobuf_unittest::TestHugeFieldNumbers >(Arena* arena) {
  37666. return Arena::CreateMessageInternal< ::protobuf_unittest::TestHugeFieldNumbers >(arena);
  37667. }
  37668. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestExtensionInsideTable* Arena::CreateMaybeMessage< ::protobuf_unittest::TestExtensionInsideTable >(Arena* arena) {
  37669. return Arena::CreateMessageInternal< ::protobuf_unittest::TestExtensionInsideTable >(arena);
  37670. }
  37671. } // namespace protobuf
  37672. } // namespace google
  37673. // @@protoc_insertion_point(global_scope)