maps.pb.cc 346 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/util/internal/testdata/maps.proto
  3. #include <google/protobuf/util/internal/testdata/maps.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_2futil_2finternal_2ftestdata_2fmaps_2eproto {
  19. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_BoolToString_MapEntry_DoNotUse;
  20. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_EmptyMap_MapEntry_DoNotUse;
  21. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_IntToString_MapEntry_DoNotUse;
  22. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MapIn_MapInputEntry_DoNotUse;
  23. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MapM;
  24. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MapOfObjects_M;
  25. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MapOutWireFormat_Map3Entry;
  26. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MapOutWireFormat_Map4Entry;
  27. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MapOut_Map3Entry_DoNotUse;
  28. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MapOut_Map4Entry_DoNotUse;
  29. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Mixed1_MapEntry_DoNotUse;
  30. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Mixed2_MapEntry_DoNotUse;
  31. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_StringtoInt_MapEntry_DoNotUse;
  32. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_BoolToString;
  33. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_EmptyMap;
  34. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_IntToString;
  35. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MapOfObjects;
  36. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MapOfObjects_MapEntry_DoNotUse;
  37. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MapOutWireFormat_Map1Entry;
  38. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MapOutWireFormat_Map2Entry;
  39. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MapOut_Map1Entry_DoNotUse;
  40. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Mixed1;
  41. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Mixed2;
  42. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_StringtoInt;
  43. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto ::google::protobuf::internal::SCCInfo<3> scc_info_MapOut;
  44. } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto
  45. namespace google {
  46. namespace protobuf {
  47. namespace testing {
  48. class MapsTestCasesDefaultTypeInternal {
  49. public:
  50. ::google::protobuf::internal::ExplicitlyConstructed<MapsTestCases>
  51. _instance;
  52. } _MapsTestCases_default_instance_;
  53. class EmptyMap_MapEntry_DoNotUseDefaultTypeInternal {
  54. public:
  55. ::google::protobuf::internal::ExplicitlyConstructed<EmptyMap_MapEntry_DoNotUse>
  56. _instance;
  57. } _EmptyMap_MapEntry_DoNotUse_default_instance_;
  58. class EmptyMapDefaultTypeInternal {
  59. public:
  60. ::google::protobuf::internal::ExplicitlyConstructed<EmptyMap>
  61. _instance;
  62. } _EmptyMap_default_instance_;
  63. class StringtoInt_MapEntry_DoNotUseDefaultTypeInternal {
  64. public:
  65. ::google::protobuf::internal::ExplicitlyConstructed<StringtoInt_MapEntry_DoNotUse>
  66. _instance;
  67. } _StringtoInt_MapEntry_DoNotUse_default_instance_;
  68. class StringtoIntDefaultTypeInternal {
  69. public:
  70. ::google::protobuf::internal::ExplicitlyConstructed<StringtoInt>
  71. _instance;
  72. } _StringtoInt_default_instance_;
  73. class IntToString_MapEntry_DoNotUseDefaultTypeInternal {
  74. public:
  75. ::google::protobuf::internal::ExplicitlyConstructed<IntToString_MapEntry_DoNotUse>
  76. _instance;
  77. } _IntToString_MapEntry_DoNotUse_default_instance_;
  78. class IntToStringDefaultTypeInternal {
  79. public:
  80. ::google::protobuf::internal::ExplicitlyConstructed<IntToString>
  81. _instance;
  82. } _IntToString_default_instance_;
  83. class BoolToString_MapEntry_DoNotUseDefaultTypeInternal {
  84. public:
  85. ::google::protobuf::internal::ExplicitlyConstructed<BoolToString_MapEntry_DoNotUse>
  86. _instance;
  87. } _BoolToString_MapEntry_DoNotUse_default_instance_;
  88. class BoolToStringDefaultTypeInternal {
  89. public:
  90. ::google::protobuf::internal::ExplicitlyConstructed<BoolToString>
  91. _instance;
  92. } _BoolToString_default_instance_;
  93. class Mixed1_MapEntry_DoNotUseDefaultTypeInternal {
  94. public:
  95. ::google::protobuf::internal::ExplicitlyConstructed<Mixed1_MapEntry_DoNotUse>
  96. _instance;
  97. } _Mixed1_MapEntry_DoNotUse_default_instance_;
  98. class Mixed1DefaultTypeInternal {
  99. public:
  100. ::google::protobuf::internal::ExplicitlyConstructed<Mixed1>
  101. _instance;
  102. } _Mixed1_default_instance_;
  103. class Mixed2_MapEntry_DoNotUseDefaultTypeInternal {
  104. public:
  105. ::google::protobuf::internal::ExplicitlyConstructed<Mixed2_MapEntry_DoNotUse>
  106. _instance;
  107. } _Mixed2_MapEntry_DoNotUse_default_instance_;
  108. class Mixed2DefaultTypeInternal {
  109. public:
  110. ::google::protobuf::internal::ExplicitlyConstructed<Mixed2>
  111. _instance;
  112. } _Mixed2_default_instance_;
  113. class MapOfObjects_MDefaultTypeInternal {
  114. public:
  115. ::google::protobuf::internal::ExplicitlyConstructed<MapOfObjects_M>
  116. _instance;
  117. } _MapOfObjects_M_default_instance_;
  118. class MapOfObjects_MapEntry_DoNotUseDefaultTypeInternal {
  119. public:
  120. ::google::protobuf::internal::ExplicitlyConstructed<MapOfObjects_MapEntry_DoNotUse>
  121. _instance;
  122. } _MapOfObjects_MapEntry_DoNotUse_default_instance_;
  123. class MapOfObjectsDefaultTypeInternal {
  124. public:
  125. ::google::protobuf::internal::ExplicitlyConstructed<MapOfObjects>
  126. _instance;
  127. } _MapOfObjects_default_instance_;
  128. class DummyRequestDefaultTypeInternal {
  129. public:
  130. ::google::protobuf::internal::ExplicitlyConstructed<DummyRequest>
  131. _instance;
  132. } _DummyRequest_default_instance_;
  133. class MapIn_MapInputEntry_DoNotUseDefaultTypeInternal {
  134. public:
  135. ::google::protobuf::internal::ExplicitlyConstructed<MapIn_MapInputEntry_DoNotUse>
  136. _instance;
  137. } _MapIn_MapInputEntry_DoNotUse_default_instance_;
  138. class MapInDefaultTypeInternal {
  139. public:
  140. ::google::protobuf::internal::ExplicitlyConstructed<MapIn>
  141. _instance;
  142. } _MapIn_default_instance_;
  143. class MapOut_Map1Entry_DoNotUseDefaultTypeInternal {
  144. public:
  145. ::google::protobuf::internal::ExplicitlyConstructed<MapOut_Map1Entry_DoNotUse>
  146. _instance;
  147. } _MapOut_Map1Entry_DoNotUse_default_instance_;
  148. class MapOut_Map2Entry_DoNotUseDefaultTypeInternal {
  149. public:
  150. ::google::protobuf::internal::ExplicitlyConstructed<MapOut_Map2Entry_DoNotUse>
  151. _instance;
  152. } _MapOut_Map2Entry_DoNotUse_default_instance_;
  153. class MapOut_Map3Entry_DoNotUseDefaultTypeInternal {
  154. public:
  155. ::google::protobuf::internal::ExplicitlyConstructed<MapOut_Map3Entry_DoNotUse>
  156. _instance;
  157. } _MapOut_Map3Entry_DoNotUse_default_instance_;
  158. class MapOut_Map4Entry_DoNotUseDefaultTypeInternal {
  159. public:
  160. ::google::protobuf::internal::ExplicitlyConstructed<MapOut_Map4Entry_DoNotUse>
  161. _instance;
  162. } _MapOut_Map4Entry_DoNotUse_default_instance_;
  163. class MapOutDefaultTypeInternal {
  164. public:
  165. ::google::protobuf::internal::ExplicitlyConstructed<MapOut>
  166. _instance;
  167. } _MapOut_default_instance_;
  168. class MapOutWireFormat_Map1EntryDefaultTypeInternal {
  169. public:
  170. ::google::protobuf::internal::ExplicitlyConstructed<MapOutWireFormat_Map1Entry>
  171. _instance;
  172. } _MapOutWireFormat_Map1Entry_default_instance_;
  173. class MapOutWireFormat_Map2EntryDefaultTypeInternal {
  174. public:
  175. ::google::protobuf::internal::ExplicitlyConstructed<MapOutWireFormat_Map2Entry>
  176. _instance;
  177. } _MapOutWireFormat_Map2Entry_default_instance_;
  178. class MapOutWireFormat_Map3EntryDefaultTypeInternal {
  179. public:
  180. ::google::protobuf::internal::ExplicitlyConstructed<MapOutWireFormat_Map3Entry>
  181. _instance;
  182. } _MapOutWireFormat_Map3Entry_default_instance_;
  183. class MapOutWireFormat_Map4EntryDefaultTypeInternal {
  184. public:
  185. ::google::protobuf::internal::ExplicitlyConstructed<MapOutWireFormat_Map4Entry>
  186. _instance;
  187. } _MapOutWireFormat_Map4Entry_default_instance_;
  188. class MapOutWireFormatDefaultTypeInternal {
  189. public:
  190. ::google::protobuf::internal::ExplicitlyConstructed<MapOutWireFormat>
  191. _instance;
  192. } _MapOutWireFormat_default_instance_;
  193. class MapMDefaultTypeInternal {
  194. public:
  195. ::google::protobuf::internal::ExplicitlyConstructed<MapM>
  196. _instance;
  197. } _MapM_default_instance_;
  198. } // namespace testing
  199. } // namespace protobuf
  200. } // namespace google
  201. namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto {
  202. static void InitDefaultsMapsTestCases() {
  203. GOOGLE_PROTOBUF_VERIFY_VERSION;
  204. {
  205. void* ptr = &::google::protobuf::testing::_MapsTestCases_default_instance_;
  206. new (ptr) ::google::protobuf::testing::MapsTestCases();
  207. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  208. }
  209. ::google::protobuf::testing::MapsTestCases::InitAsDefaultInstance();
  210. }
  211. ::google::protobuf::internal::SCCInfo<7> scc_info_MapsTestCases =
  212. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 7, InitDefaultsMapsTestCases}, {
  213. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_EmptyMap.base,
  214. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_StringtoInt.base,
  215. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_IntToString.base,
  216. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_Mixed1.base,
  217. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_Mixed2.base,
  218. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOfObjects.base,
  219. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_BoolToString.base,}};
  220. static void InitDefaultsEmptyMap_MapEntry_DoNotUse() {
  221. GOOGLE_PROTOBUF_VERIFY_VERSION;
  222. {
  223. void* ptr = &::google::protobuf::testing::_EmptyMap_MapEntry_DoNotUse_default_instance_;
  224. new (ptr) ::google::protobuf::testing::EmptyMap_MapEntry_DoNotUse();
  225. }
  226. ::google::protobuf::testing::EmptyMap_MapEntry_DoNotUse::InitAsDefaultInstance();
  227. }
  228. ::google::protobuf::internal::SCCInfo<0> scc_info_EmptyMap_MapEntry_DoNotUse =
  229. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEmptyMap_MapEntry_DoNotUse}, {}};
  230. static void InitDefaultsEmptyMap() {
  231. GOOGLE_PROTOBUF_VERIFY_VERSION;
  232. {
  233. void* ptr = &::google::protobuf::testing::_EmptyMap_default_instance_;
  234. new (ptr) ::google::protobuf::testing::EmptyMap();
  235. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  236. }
  237. ::google::protobuf::testing::EmptyMap::InitAsDefaultInstance();
  238. }
  239. ::google::protobuf::internal::SCCInfo<1> scc_info_EmptyMap =
  240. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsEmptyMap}, {
  241. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_EmptyMap_MapEntry_DoNotUse.base,}};
  242. static void InitDefaultsStringtoInt_MapEntry_DoNotUse() {
  243. GOOGLE_PROTOBUF_VERIFY_VERSION;
  244. {
  245. void* ptr = &::google::protobuf::testing::_StringtoInt_MapEntry_DoNotUse_default_instance_;
  246. new (ptr) ::google::protobuf::testing::StringtoInt_MapEntry_DoNotUse();
  247. }
  248. ::google::protobuf::testing::StringtoInt_MapEntry_DoNotUse::InitAsDefaultInstance();
  249. }
  250. ::google::protobuf::internal::SCCInfo<0> scc_info_StringtoInt_MapEntry_DoNotUse =
  251. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsStringtoInt_MapEntry_DoNotUse}, {}};
  252. static void InitDefaultsStringtoInt() {
  253. GOOGLE_PROTOBUF_VERIFY_VERSION;
  254. {
  255. void* ptr = &::google::protobuf::testing::_StringtoInt_default_instance_;
  256. new (ptr) ::google::protobuf::testing::StringtoInt();
  257. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  258. }
  259. ::google::protobuf::testing::StringtoInt::InitAsDefaultInstance();
  260. }
  261. ::google::protobuf::internal::SCCInfo<1> scc_info_StringtoInt =
  262. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsStringtoInt}, {
  263. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_StringtoInt_MapEntry_DoNotUse.base,}};
  264. static void InitDefaultsIntToString_MapEntry_DoNotUse() {
  265. GOOGLE_PROTOBUF_VERIFY_VERSION;
  266. {
  267. void* ptr = &::google::protobuf::testing::_IntToString_MapEntry_DoNotUse_default_instance_;
  268. new (ptr) ::google::protobuf::testing::IntToString_MapEntry_DoNotUse();
  269. }
  270. ::google::protobuf::testing::IntToString_MapEntry_DoNotUse::InitAsDefaultInstance();
  271. }
  272. ::google::protobuf::internal::SCCInfo<0> scc_info_IntToString_MapEntry_DoNotUse =
  273. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsIntToString_MapEntry_DoNotUse}, {}};
  274. static void InitDefaultsIntToString() {
  275. GOOGLE_PROTOBUF_VERIFY_VERSION;
  276. {
  277. void* ptr = &::google::protobuf::testing::_IntToString_default_instance_;
  278. new (ptr) ::google::protobuf::testing::IntToString();
  279. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  280. }
  281. ::google::protobuf::testing::IntToString::InitAsDefaultInstance();
  282. }
  283. ::google::protobuf::internal::SCCInfo<1> scc_info_IntToString =
  284. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsIntToString}, {
  285. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_IntToString_MapEntry_DoNotUse.base,}};
  286. static void InitDefaultsBoolToString_MapEntry_DoNotUse() {
  287. GOOGLE_PROTOBUF_VERIFY_VERSION;
  288. {
  289. void* ptr = &::google::protobuf::testing::_BoolToString_MapEntry_DoNotUse_default_instance_;
  290. new (ptr) ::google::protobuf::testing::BoolToString_MapEntry_DoNotUse();
  291. }
  292. ::google::protobuf::testing::BoolToString_MapEntry_DoNotUse::InitAsDefaultInstance();
  293. }
  294. ::google::protobuf::internal::SCCInfo<0> scc_info_BoolToString_MapEntry_DoNotUse =
  295. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsBoolToString_MapEntry_DoNotUse}, {}};
  296. static void InitDefaultsBoolToString() {
  297. GOOGLE_PROTOBUF_VERIFY_VERSION;
  298. {
  299. void* ptr = &::google::protobuf::testing::_BoolToString_default_instance_;
  300. new (ptr) ::google::protobuf::testing::BoolToString();
  301. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  302. }
  303. ::google::protobuf::testing::BoolToString::InitAsDefaultInstance();
  304. }
  305. ::google::protobuf::internal::SCCInfo<1> scc_info_BoolToString =
  306. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsBoolToString}, {
  307. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_BoolToString_MapEntry_DoNotUse.base,}};
  308. static void InitDefaultsMixed1_MapEntry_DoNotUse() {
  309. GOOGLE_PROTOBUF_VERIFY_VERSION;
  310. {
  311. void* ptr = &::google::protobuf::testing::_Mixed1_MapEntry_DoNotUse_default_instance_;
  312. new (ptr) ::google::protobuf::testing::Mixed1_MapEntry_DoNotUse();
  313. }
  314. ::google::protobuf::testing::Mixed1_MapEntry_DoNotUse::InitAsDefaultInstance();
  315. }
  316. ::google::protobuf::internal::SCCInfo<0> scc_info_Mixed1_MapEntry_DoNotUse =
  317. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMixed1_MapEntry_DoNotUse}, {}};
  318. static void InitDefaultsMixed1() {
  319. GOOGLE_PROTOBUF_VERIFY_VERSION;
  320. {
  321. void* ptr = &::google::protobuf::testing::_Mixed1_default_instance_;
  322. new (ptr) ::google::protobuf::testing::Mixed1();
  323. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  324. }
  325. ::google::protobuf::testing::Mixed1::InitAsDefaultInstance();
  326. }
  327. ::google::protobuf::internal::SCCInfo<1> scc_info_Mixed1 =
  328. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMixed1}, {
  329. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_Mixed1_MapEntry_DoNotUse.base,}};
  330. static void InitDefaultsMixed2_MapEntry_DoNotUse() {
  331. GOOGLE_PROTOBUF_VERIFY_VERSION;
  332. {
  333. void* ptr = &::google::protobuf::testing::_Mixed2_MapEntry_DoNotUse_default_instance_;
  334. new (ptr) ::google::protobuf::testing::Mixed2_MapEntry_DoNotUse();
  335. }
  336. ::google::protobuf::testing::Mixed2_MapEntry_DoNotUse::InitAsDefaultInstance();
  337. }
  338. ::google::protobuf::internal::SCCInfo<0> scc_info_Mixed2_MapEntry_DoNotUse =
  339. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMixed2_MapEntry_DoNotUse}, {}};
  340. static void InitDefaultsMixed2() {
  341. GOOGLE_PROTOBUF_VERIFY_VERSION;
  342. {
  343. void* ptr = &::google::protobuf::testing::_Mixed2_default_instance_;
  344. new (ptr) ::google::protobuf::testing::Mixed2();
  345. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  346. }
  347. ::google::protobuf::testing::Mixed2::InitAsDefaultInstance();
  348. }
  349. ::google::protobuf::internal::SCCInfo<1> scc_info_Mixed2 =
  350. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMixed2}, {
  351. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_Mixed2_MapEntry_DoNotUse.base,}};
  352. static void InitDefaultsMapOfObjects_M() {
  353. GOOGLE_PROTOBUF_VERIFY_VERSION;
  354. {
  355. void* ptr = &::google::protobuf::testing::_MapOfObjects_M_default_instance_;
  356. new (ptr) ::google::protobuf::testing::MapOfObjects_M();
  357. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  358. }
  359. ::google::protobuf::testing::MapOfObjects_M::InitAsDefaultInstance();
  360. }
  361. ::google::protobuf::internal::SCCInfo<0> scc_info_MapOfObjects_M =
  362. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMapOfObjects_M}, {}};
  363. static void InitDefaultsMapOfObjects_MapEntry_DoNotUse() {
  364. GOOGLE_PROTOBUF_VERIFY_VERSION;
  365. {
  366. void* ptr = &::google::protobuf::testing::_MapOfObjects_MapEntry_DoNotUse_default_instance_;
  367. new (ptr) ::google::protobuf::testing::MapOfObjects_MapEntry_DoNotUse();
  368. }
  369. ::google::protobuf::testing::MapOfObjects_MapEntry_DoNotUse::InitAsDefaultInstance();
  370. }
  371. ::google::protobuf::internal::SCCInfo<1> scc_info_MapOfObjects_MapEntry_DoNotUse =
  372. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMapOfObjects_MapEntry_DoNotUse}, {
  373. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOfObjects_M.base,}};
  374. static void InitDefaultsMapOfObjects() {
  375. GOOGLE_PROTOBUF_VERIFY_VERSION;
  376. {
  377. void* ptr = &::google::protobuf::testing::_MapOfObjects_default_instance_;
  378. new (ptr) ::google::protobuf::testing::MapOfObjects();
  379. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  380. }
  381. ::google::protobuf::testing::MapOfObjects::InitAsDefaultInstance();
  382. }
  383. ::google::protobuf::internal::SCCInfo<1> scc_info_MapOfObjects =
  384. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMapOfObjects}, {
  385. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOfObjects_MapEntry_DoNotUse.base,}};
  386. static void InitDefaultsDummyRequest() {
  387. GOOGLE_PROTOBUF_VERIFY_VERSION;
  388. {
  389. void* ptr = &::google::protobuf::testing::_DummyRequest_default_instance_;
  390. new (ptr) ::google::protobuf::testing::DummyRequest();
  391. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  392. }
  393. ::google::protobuf::testing::DummyRequest::InitAsDefaultInstance();
  394. }
  395. ::google::protobuf::internal::SCCInfo<0> scc_info_DummyRequest =
  396. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDummyRequest}, {}};
  397. static void InitDefaultsMapIn_MapInputEntry_DoNotUse() {
  398. GOOGLE_PROTOBUF_VERIFY_VERSION;
  399. {
  400. void* ptr = &::google::protobuf::testing::_MapIn_MapInputEntry_DoNotUse_default_instance_;
  401. new (ptr) ::google::protobuf::testing::MapIn_MapInputEntry_DoNotUse();
  402. }
  403. ::google::protobuf::testing::MapIn_MapInputEntry_DoNotUse::InitAsDefaultInstance();
  404. }
  405. ::google::protobuf::internal::SCCInfo<0> scc_info_MapIn_MapInputEntry_DoNotUse =
  406. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMapIn_MapInputEntry_DoNotUse}, {}};
  407. static void InitDefaultsMapIn() {
  408. GOOGLE_PROTOBUF_VERIFY_VERSION;
  409. {
  410. void* ptr = &::google::protobuf::testing::_MapIn_default_instance_;
  411. new (ptr) ::google::protobuf::testing::MapIn();
  412. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  413. }
  414. ::google::protobuf::testing::MapIn::InitAsDefaultInstance();
  415. }
  416. ::google::protobuf::internal::SCCInfo<1> scc_info_MapIn =
  417. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMapIn}, {
  418. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapIn_MapInputEntry_DoNotUse.base,}};
  419. static void InitDefaultsMapOut_Map1Entry_DoNotUse() {
  420. GOOGLE_PROTOBUF_VERIFY_VERSION;
  421. {
  422. void* ptr = &::google::protobuf::testing::_MapOut_Map1Entry_DoNotUse_default_instance_;
  423. new (ptr) ::google::protobuf::testing::MapOut_Map1Entry_DoNotUse();
  424. }
  425. ::google::protobuf::testing::MapOut_Map1Entry_DoNotUse::InitAsDefaultInstance();
  426. }
  427. ::google::protobuf::internal::SCCInfo<1> scc_info_MapOut_Map1Entry_DoNotUse =
  428. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMapOut_Map1Entry_DoNotUse}, {
  429. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapM.base,}};
  430. static void InitDefaultsMapOut_Map3Entry_DoNotUse() {
  431. GOOGLE_PROTOBUF_VERIFY_VERSION;
  432. {
  433. void* ptr = &::google::protobuf::testing::_MapOut_Map3Entry_DoNotUse_default_instance_;
  434. new (ptr) ::google::protobuf::testing::MapOut_Map3Entry_DoNotUse();
  435. }
  436. ::google::protobuf::testing::MapOut_Map3Entry_DoNotUse::InitAsDefaultInstance();
  437. }
  438. ::google::protobuf::internal::SCCInfo<0> scc_info_MapOut_Map3Entry_DoNotUse =
  439. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMapOut_Map3Entry_DoNotUse}, {}};
  440. static void InitDefaultsMapOut_Map4Entry_DoNotUse() {
  441. GOOGLE_PROTOBUF_VERIFY_VERSION;
  442. {
  443. void* ptr = &::google::protobuf::testing::_MapOut_Map4Entry_DoNotUse_default_instance_;
  444. new (ptr) ::google::protobuf::testing::MapOut_Map4Entry_DoNotUse();
  445. }
  446. ::google::protobuf::testing::MapOut_Map4Entry_DoNotUse::InitAsDefaultInstance();
  447. }
  448. ::google::protobuf::internal::SCCInfo<0> scc_info_MapOut_Map4Entry_DoNotUse =
  449. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMapOut_Map4Entry_DoNotUse}, {}};
  450. static void InitDefaultsMapOut() {
  451. GOOGLE_PROTOBUF_VERIFY_VERSION;
  452. {
  453. void* ptr = &::google::protobuf::testing::_MapOut_Map2Entry_DoNotUse_default_instance_;
  454. new (ptr) ::google::protobuf::testing::MapOut_Map2Entry_DoNotUse();
  455. }
  456. {
  457. void* ptr = &::google::protobuf::testing::_MapOut_default_instance_;
  458. new (ptr) ::google::protobuf::testing::MapOut();
  459. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  460. }
  461. ::google::protobuf::testing::MapOut_Map2Entry_DoNotUse::InitAsDefaultInstance();
  462. ::google::protobuf::testing::MapOut::InitAsDefaultInstance();
  463. }
  464. ::google::protobuf::internal::SCCInfo<3> scc_info_MapOut =
  465. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsMapOut}, {
  466. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOut_Map1Entry_DoNotUse.base,
  467. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOut_Map3Entry_DoNotUse.base,
  468. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOut_Map4Entry_DoNotUse.base,}};
  469. static void InitDefaultsMapOutWireFormat_Map1Entry() {
  470. GOOGLE_PROTOBUF_VERIFY_VERSION;
  471. {
  472. void* ptr = &::google::protobuf::testing::_MapOutWireFormat_Map1Entry_default_instance_;
  473. new (ptr) ::google::protobuf::testing::MapOutWireFormat_Map1Entry();
  474. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  475. }
  476. ::google::protobuf::testing::MapOutWireFormat_Map1Entry::InitAsDefaultInstance();
  477. }
  478. ::google::protobuf::internal::SCCInfo<1> scc_info_MapOutWireFormat_Map1Entry =
  479. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMapOutWireFormat_Map1Entry}, {
  480. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapM.base,}};
  481. static void InitDefaultsMapOutWireFormat_Map2Entry() {
  482. GOOGLE_PROTOBUF_VERIFY_VERSION;
  483. {
  484. void* ptr = &::google::protobuf::testing::_MapOutWireFormat_Map2Entry_default_instance_;
  485. new (ptr) ::google::protobuf::testing::MapOutWireFormat_Map2Entry();
  486. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  487. }
  488. ::google::protobuf::testing::MapOutWireFormat_Map2Entry::InitAsDefaultInstance();
  489. }
  490. ::google::protobuf::internal::SCCInfo<1> scc_info_MapOutWireFormat_Map2Entry =
  491. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMapOutWireFormat_Map2Entry}, {
  492. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOut.base,}};
  493. static void InitDefaultsMapOutWireFormat_Map3Entry() {
  494. GOOGLE_PROTOBUF_VERIFY_VERSION;
  495. {
  496. void* ptr = &::google::protobuf::testing::_MapOutWireFormat_Map3Entry_default_instance_;
  497. new (ptr) ::google::protobuf::testing::MapOutWireFormat_Map3Entry();
  498. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  499. }
  500. ::google::protobuf::testing::MapOutWireFormat_Map3Entry::InitAsDefaultInstance();
  501. }
  502. ::google::protobuf::internal::SCCInfo<0> scc_info_MapOutWireFormat_Map3Entry =
  503. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMapOutWireFormat_Map3Entry}, {}};
  504. static void InitDefaultsMapOutWireFormat_Map4Entry() {
  505. GOOGLE_PROTOBUF_VERIFY_VERSION;
  506. {
  507. void* ptr = &::google::protobuf::testing::_MapOutWireFormat_Map4Entry_default_instance_;
  508. new (ptr) ::google::protobuf::testing::MapOutWireFormat_Map4Entry();
  509. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  510. }
  511. ::google::protobuf::testing::MapOutWireFormat_Map4Entry::InitAsDefaultInstance();
  512. }
  513. ::google::protobuf::internal::SCCInfo<0> scc_info_MapOutWireFormat_Map4Entry =
  514. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMapOutWireFormat_Map4Entry}, {}};
  515. static void InitDefaultsMapOutWireFormat() {
  516. GOOGLE_PROTOBUF_VERIFY_VERSION;
  517. {
  518. void* ptr = &::google::protobuf::testing::_MapOutWireFormat_default_instance_;
  519. new (ptr) ::google::protobuf::testing::MapOutWireFormat();
  520. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  521. }
  522. ::google::protobuf::testing::MapOutWireFormat::InitAsDefaultInstance();
  523. }
  524. ::google::protobuf::internal::SCCInfo<4> scc_info_MapOutWireFormat =
  525. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsMapOutWireFormat}, {
  526. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOutWireFormat_Map1Entry.base,
  527. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOutWireFormat_Map2Entry.base,
  528. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOutWireFormat_Map3Entry.base,
  529. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOutWireFormat_Map4Entry.base,}};
  530. static void InitDefaultsMapM() {
  531. GOOGLE_PROTOBUF_VERIFY_VERSION;
  532. {
  533. void* ptr = &::google::protobuf::testing::_MapM_default_instance_;
  534. new (ptr) ::google::protobuf::testing::MapM();
  535. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  536. }
  537. ::google::protobuf::testing::MapM::InitAsDefaultInstance();
  538. }
  539. ::google::protobuf::internal::SCCInfo<0> scc_info_MapM =
  540. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMapM}, {}};
  541. void InitDefaults() {
  542. ::google::protobuf::internal::InitSCC(&scc_info_MapsTestCases.base);
  543. ::google::protobuf::internal::InitSCC(&scc_info_EmptyMap_MapEntry_DoNotUse.base);
  544. ::google::protobuf::internal::InitSCC(&scc_info_EmptyMap.base);
  545. ::google::protobuf::internal::InitSCC(&scc_info_StringtoInt_MapEntry_DoNotUse.base);
  546. ::google::protobuf::internal::InitSCC(&scc_info_StringtoInt.base);
  547. ::google::protobuf::internal::InitSCC(&scc_info_IntToString_MapEntry_DoNotUse.base);
  548. ::google::protobuf::internal::InitSCC(&scc_info_IntToString.base);
  549. ::google::protobuf::internal::InitSCC(&scc_info_BoolToString_MapEntry_DoNotUse.base);
  550. ::google::protobuf::internal::InitSCC(&scc_info_BoolToString.base);
  551. ::google::protobuf::internal::InitSCC(&scc_info_Mixed1_MapEntry_DoNotUse.base);
  552. ::google::protobuf::internal::InitSCC(&scc_info_Mixed1.base);
  553. ::google::protobuf::internal::InitSCC(&scc_info_Mixed2_MapEntry_DoNotUse.base);
  554. ::google::protobuf::internal::InitSCC(&scc_info_Mixed2.base);
  555. ::google::protobuf::internal::InitSCC(&scc_info_MapOfObjects_M.base);
  556. ::google::protobuf::internal::InitSCC(&scc_info_MapOfObjects_MapEntry_DoNotUse.base);
  557. ::google::protobuf::internal::InitSCC(&scc_info_MapOfObjects.base);
  558. ::google::protobuf::internal::InitSCC(&scc_info_DummyRequest.base);
  559. ::google::protobuf::internal::InitSCC(&scc_info_MapIn_MapInputEntry_DoNotUse.base);
  560. ::google::protobuf::internal::InitSCC(&scc_info_MapIn.base);
  561. ::google::protobuf::internal::InitSCC(&scc_info_MapOut_Map1Entry_DoNotUse.base);
  562. ::google::protobuf::internal::InitSCC(&scc_info_MapOut_Map3Entry_DoNotUse.base);
  563. ::google::protobuf::internal::InitSCC(&scc_info_MapOut_Map4Entry_DoNotUse.base);
  564. ::google::protobuf::internal::InitSCC(&scc_info_MapOut.base);
  565. ::google::protobuf::internal::InitSCC(&scc_info_MapOutWireFormat_Map1Entry.base);
  566. ::google::protobuf::internal::InitSCC(&scc_info_MapOutWireFormat_Map2Entry.base);
  567. ::google::protobuf::internal::InitSCC(&scc_info_MapOutWireFormat_Map3Entry.base);
  568. ::google::protobuf::internal::InitSCC(&scc_info_MapOutWireFormat_Map4Entry.base);
  569. ::google::protobuf::internal::InitSCC(&scc_info_MapOutWireFormat.base);
  570. ::google::protobuf::internal::InitSCC(&scc_info_MapM.base);
  571. }
  572. ::google::protobuf::Metadata file_level_metadata[30];
  573. const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
  574. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  575. ~0u, // no _has_bits_
  576. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapsTestCases, _internal_metadata_),
  577. ~0u, // no _extensions_
  578. ~0u, // no _oneof_case_
  579. ~0u, // no _weak_field_map_
  580. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapsTestCases, empty_map_),
  581. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapsTestCases, string_to_int_),
  582. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapsTestCases, int_to_string_),
  583. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapsTestCases, mixed1_),
  584. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapsTestCases, mixed2_),
  585. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapsTestCases, map_of_objects_),
  586. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapsTestCases, empty_key_string_to_int1_),
  587. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapsTestCases, empty_key_string_to_int2_),
  588. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapsTestCases, empty_key_string_to_int3_),
  589. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapsTestCases, empty_key_bool_to_string_),
  590. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapsTestCases, empty_key_int_to_string_),
  591. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapsTestCases, empty_key_mixed_),
  592. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapsTestCases, empty_key_map_objects_),
  593. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::EmptyMap_MapEntry_DoNotUse, _has_bits_),
  594. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::EmptyMap_MapEntry_DoNotUse, _internal_metadata_),
  595. ~0u, // no _extensions_
  596. ~0u, // no _oneof_case_
  597. ~0u, // no _weak_field_map_
  598. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::EmptyMap_MapEntry_DoNotUse, key_),
  599. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::EmptyMap_MapEntry_DoNotUse, value_),
  600. 0,
  601. 1,
  602. ~0u, // no _has_bits_
  603. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::EmptyMap, _internal_metadata_),
  604. ~0u, // no _extensions_
  605. ~0u, // no _oneof_case_
  606. ~0u, // no _weak_field_map_
  607. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::EmptyMap, map_),
  608. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StringtoInt_MapEntry_DoNotUse, _has_bits_),
  609. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StringtoInt_MapEntry_DoNotUse, _internal_metadata_),
  610. ~0u, // no _extensions_
  611. ~0u, // no _oneof_case_
  612. ~0u, // no _weak_field_map_
  613. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StringtoInt_MapEntry_DoNotUse, key_),
  614. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StringtoInt_MapEntry_DoNotUse, value_),
  615. 0,
  616. 1,
  617. ~0u, // no _has_bits_
  618. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StringtoInt, _internal_metadata_),
  619. ~0u, // no _extensions_
  620. ~0u, // no _oneof_case_
  621. ~0u, // no _weak_field_map_
  622. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StringtoInt, map_),
  623. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::IntToString_MapEntry_DoNotUse, _has_bits_),
  624. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::IntToString_MapEntry_DoNotUse, _internal_metadata_),
  625. ~0u, // no _extensions_
  626. ~0u, // no _oneof_case_
  627. ~0u, // no _weak_field_map_
  628. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::IntToString_MapEntry_DoNotUse, key_),
  629. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::IntToString_MapEntry_DoNotUse, value_),
  630. 0,
  631. 1,
  632. ~0u, // no _has_bits_
  633. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::IntToString, _internal_metadata_),
  634. ~0u, // no _extensions_
  635. ~0u, // no _oneof_case_
  636. ~0u, // no _weak_field_map_
  637. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::IntToString, map_),
  638. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::BoolToString_MapEntry_DoNotUse, _has_bits_),
  639. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::BoolToString_MapEntry_DoNotUse, _internal_metadata_),
  640. ~0u, // no _extensions_
  641. ~0u, // no _oneof_case_
  642. ~0u, // no _weak_field_map_
  643. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::BoolToString_MapEntry_DoNotUse, key_),
  644. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::BoolToString_MapEntry_DoNotUse, value_),
  645. 0,
  646. 1,
  647. ~0u, // no _has_bits_
  648. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::BoolToString, _internal_metadata_),
  649. ~0u, // no _extensions_
  650. ~0u, // no _oneof_case_
  651. ~0u, // no _weak_field_map_
  652. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::BoolToString, map_),
  653. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Mixed1_MapEntry_DoNotUse, _has_bits_),
  654. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Mixed1_MapEntry_DoNotUse, _internal_metadata_),
  655. ~0u, // no _extensions_
  656. ~0u, // no _oneof_case_
  657. ~0u, // no _weak_field_map_
  658. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Mixed1_MapEntry_DoNotUse, key_),
  659. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Mixed1_MapEntry_DoNotUse, value_),
  660. 0,
  661. 1,
  662. ~0u, // no _has_bits_
  663. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Mixed1, _internal_metadata_),
  664. ~0u, // no _extensions_
  665. ~0u, // no _oneof_case_
  666. ~0u, // no _weak_field_map_
  667. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Mixed1, msg_),
  668. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Mixed1, map_),
  669. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Mixed2_MapEntry_DoNotUse, _has_bits_),
  670. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Mixed2_MapEntry_DoNotUse, _internal_metadata_),
  671. ~0u, // no _extensions_
  672. ~0u, // no _oneof_case_
  673. ~0u, // no _weak_field_map_
  674. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Mixed2_MapEntry_DoNotUse, key_),
  675. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Mixed2_MapEntry_DoNotUse, value_),
  676. 0,
  677. 1,
  678. ~0u, // no _has_bits_
  679. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Mixed2, _internal_metadata_),
  680. ~0u, // no _extensions_
  681. ~0u, // no _oneof_case_
  682. ~0u, // no _weak_field_map_
  683. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Mixed2, map_),
  684. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Mixed2, ee_),
  685. ~0u, // no _has_bits_
  686. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfObjects_M, _internal_metadata_),
  687. ~0u, // no _extensions_
  688. ~0u, // no _oneof_case_
  689. ~0u, // no _weak_field_map_
  690. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfObjects_M, inner_text_),
  691. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfObjects_MapEntry_DoNotUse, _has_bits_),
  692. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfObjects_MapEntry_DoNotUse, _internal_metadata_),
  693. ~0u, // no _extensions_
  694. ~0u, // no _oneof_case_
  695. ~0u, // no _weak_field_map_
  696. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfObjects_MapEntry_DoNotUse, key_),
  697. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfObjects_MapEntry_DoNotUse, value_),
  698. 0,
  699. 1,
  700. ~0u, // no _has_bits_
  701. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfObjects, _internal_metadata_),
  702. ~0u, // no _extensions_
  703. ~0u, // no _oneof_case_
  704. ~0u, // no _weak_field_map_
  705. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOfObjects, map_),
  706. ~0u, // no _has_bits_
  707. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DummyRequest, _internal_metadata_),
  708. ~0u, // no _extensions_
  709. ~0u, // no _oneof_case_
  710. ~0u, // no _weak_field_map_
  711. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapIn_MapInputEntry_DoNotUse, _has_bits_),
  712. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapIn_MapInputEntry_DoNotUse, _internal_metadata_),
  713. ~0u, // no _extensions_
  714. ~0u, // no _oneof_case_
  715. ~0u, // no _weak_field_map_
  716. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapIn_MapInputEntry_DoNotUse, key_),
  717. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapIn_MapInputEntry_DoNotUse, value_),
  718. 0,
  719. 1,
  720. ~0u, // no _has_bits_
  721. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapIn, _internal_metadata_),
  722. ~0u, // no _extensions_
  723. ~0u, // no _oneof_case_
  724. ~0u, // no _weak_field_map_
  725. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapIn, other_),
  726. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapIn, things_),
  727. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapIn, map_input_),
  728. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map1Entry_DoNotUse, _has_bits_),
  729. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map1Entry_DoNotUse, _internal_metadata_),
  730. ~0u, // no _extensions_
  731. ~0u, // no _oneof_case_
  732. ~0u, // no _weak_field_map_
  733. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map1Entry_DoNotUse, key_),
  734. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map1Entry_DoNotUse, value_),
  735. 0,
  736. 1,
  737. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map2Entry_DoNotUse, _has_bits_),
  738. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map2Entry_DoNotUse, _internal_metadata_),
  739. ~0u, // no _extensions_
  740. ~0u, // no _oneof_case_
  741. ~0u, // no _weak_field_map_
  742. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map2Entry_DoNotUse, key_),
  743. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map2Entry_DoNotUse, value_),
  744. 0,
  745. 1,
  746. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map3Entry_DoNotUse, _has_bits_),
  747. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map3Entry_DoNotUse, _internal_metadata_),
  748. ~0u, // no _extensions_
  749. ~0u, // no _oneof_case_
  750. ~0u, // no _weak_field_map_
  751. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map3Entry_DoNotUse, key_),
  752. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map3Entry_DoNotUse, value_),
  753. 0,
  754. 1,
  755. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map4Entry_DoNotUse, _has_bits_),
  756. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map4Entry_DoNotUse, _internal_metadata_),
  757. ~0u, // no _extensions_
  758. ~0u, // no _oneof_case_
  759. ~0u, // no _weak_field_map_
  760. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map4Entry_DoNotUse, key_),
  761. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut_Map4Entry_DoNotUse, value_),
  762. 0,
  763. 1,
  764. ~0u, // no _has_bits_
  765. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut, _internal_metadata_),
  766. ~0u, // no _extensions_
  767. ~0u, // no _oneof_case_
  768. ~0u, // no _weak_field_map_
  769. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut, map1_),
  770. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut, map2_),
  771. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut, map3_),
  772. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut, map4_),
  773. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOut, bar_),
  774. ~0u, // no _has_bits_
  775. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat_Map1Entry, _internal_metadata_),
  776. ~0u, // no _extensions_
  777. ~0u, // no _oneof_case_
  778. ~0u, // no _weak_field_map_
  779. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat_Map1Entry, key_),
  780. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat_Map1Entry, value_),
  781. ~0u, // no _has_bits_
  782. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat_Map2Entry, _internal_metadata_),
  783. ~0u, // no _extensions_
  784. ~0u, // no _oneof_case_
  785. ~0u, // no _weak_field_map_
  786. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat_Map2Entry, key_),
  787. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat_Map2Entry, value_),
  788. ~0u, // no _has_bits_
  789. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat_Map3Entry, _internal_metadata_),
  790. ~0u, // no _extensions_
  791. ~0u, // no _oneof_case_
  792. ~0u, // no _weak_field_map_
  793. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat_Map3Entry, key_),
  794. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat_Map3Entry, value_),
  795. ~0u, // no _has_bits_
  796. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat_Map4Entry, _internal_metadata_),
  797. ~0u, // no _extensions_
  798. ~0u, // no _oneof_case_
  799. ~0u, // no _weak_field_map_
  800. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat_Map4Entry, key_),
  801. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat_Map4Entry, value_),
  802. ~0u, // no _has_bits_
  803. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat, _internal_metadata_),
  804. ~0u, // no _extensions_
  805. ~0u, // no _oneof_case_
  806. ~0u, // no _weak_field_map_
  807. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat, map1_),
  808. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat, map2_),
  809. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat, map3_),
  810. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat, map4_),
  811. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapOutWireFormat, bar_),
  812. ~0u, // no _has_bits_
  813. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapM, _internal_metadata_),
  814. ~0u, // no _extensions_
  815. ~0u, // no _oneof_case_
  816. ~0u, // no _weak_field_map_
  817. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::MapM, foo_),
  818. };
  819. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  820. { 0, -1, sizeof(::google::protobuf::testing::MapsTestCases)},
  821. { 18, 25, sizeof(::google::protobuf::testing::EmptyMap_MapEntry_DoNotUse)},
  822. { 27, -1, sizeof(::google::protobuf::testing::EmptyMap)},
  823. { 33, 40, sizeof(::google::protobuf::testing::StringtoInt_MapEntry_DoNotUse)},
  824. { 42, -1, sizeof(::google::protobuf::testing::StringtoInt)},
  825. { 48, 55, sizeof(::google::protobuf::testing::IntToString_MapEntry_DoNotUse)},
  826. { 57, -1, sizeof(::google::protobuf::testing::IntToString)},
  827. { 63, 70, sizeof(::google::protobuf::testing::BoolToString_MapEntry_DoNotUse)},
  828. { 72, -1, sizeof(::google::protobuf::testing::BoolToString)},
  829. { 78, 85, sizeof(::google::protobuf::testing::Mixed1_MapEntry_DoNotUse)},
  830. { 87, -1, sizeof(::google::protobuf::testing::Mixed1)},
  831. { 94, 101, sizeof(::google::protobuf::testing::Mixed2_MapEntry_DoNotUse)},
  832. { 103, -1, sizeof(::google::protobuf::testing::Mixed2)},
  833. { 110, -1, sizeof(::google::protobuf::testing::MapOfObjects_M)},
  834. { 116, 123, sizeof(::google::protobuf::testing::MapOfObjects_MapEntry_DoNotUse)},
  835. { 125, -1, sizeof(::google::protobuf::testing::MapOfObjects)},
  836. { 131, -1, sizeof(::google::protobuf::testing::DummyRequest)},
  837. { 136, 143, sizeof(::google::protobuf::testing::MapIn_MapInputEntry_DoNotUse)},
  838. { 145, -1, sizeof(::google::protobuf::testing::MapIn)},
  839. { 153, 160, sizeof(::google::protobuf::testing::MapOut_Map1Entry_DoNotUse)},
  840. { 162, 169, sizeof(::google::protobuf::testing::MapOut_Map2Entry_DoNotUse)},
  841. { 171, 178, sizeof(::google::protobuf::testing::MapOut_Map3Entry_DoNotUse)},
  842. { 180, 187, sizeof(::google::protobuf::testing::MapOut_Map4Entry_DoNotUse)},
  843. { 189, -1, sizeof(::google::protobuf::testing::MapOut)},
  844. { 199, -1, sizeof(::google::protobuf::testing::MapOutWireFormat_Map1Entry)},
  845. { 206, -1, sizeof(::google::protobuf::testing::MapOutWireFormat_Map2Entry)},
  846. { 213, -1, sizeof(::google::protobuf::testing::MapOutWireFormat_Map3Entry)},
  847. { 220, -1, sizeof(::google::protobuf::testing::MapOutWireFormat_Map4Entry)},
  848. { 227, -1, sizeof(::google::protobuf::testing::MapOutWireFormat)},
  849. { 237, -1, sizeof(::google::protobuf::testing::MapM)},
  850. };
  851. static ::google::protobuf::Message const * const file_default_instances[] = {
  852. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapsTestCases_default_instance_),
  853. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_EmptyMap_MapEntry_DoNotUse_default_instance_),
  854. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_EmptyMap_default_instance_),
  855. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_StringtoInt_MapEntry_DoNotUse_default_instance_),
  856. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_StringtoInt_default_instance_),
  857. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_IntToString_MapEntry_DoNotUse_default_instance_),
  858. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_IntToString_default_instance_),
  859. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_BoolToString_MapEntry_DoNotUse_default_instance_),
  860. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_BoolToString_default_instance_),
  861. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Mixed1_MapEntry_DoNotUse_default_instance_),
  862. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Mixed1_default_instance_),
  863. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Mixed2_MapEntry_DoNotUse_default_instance_),
  864. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Mixed2_default_instance_),
  865. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOfObjects_M_default_instance_),
  866. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOfObjects_MapEntry_DoNotUse_default_instance_),
  867. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOfObjects_default_instance_),
  868. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_DummyRequest_default_instance_),
  869. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapIn_MapInputEntry_DoNotUse_default_instance_),
  870. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapIn_default_instance_),
  871. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOut_Map1Entry_DoNotUse_default_instance_),
  872. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOut_Map2Entry_DoNotUse_default_instance_),
  873. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOut_Map3Entry_DoNotUse_default_instance_),
  874. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOut_Map4Entry_DoNotUse_default_instance_),
  875. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOut_default_instance_),
  876. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOutWireFormat_Map1Entry_default_instance_),
  877. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOutWireFormat_Map2Entry_default_instance_),
  878. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOutWireFormat_Map3Entry_default_instance_),
  879. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOutWireFormat_Map4Entry_default_instance_),
  880. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapOutWireFormat_default_instance_),
  881. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_MapM_default_instance_),
  882. };
  883. void protobuf_AssignDescriptors() {
  884. AddDescriptors();
  885. AssignDescriptors(
  886. "google/protobuf/util/internal/testdata/maps.proto", schemas, file_default_instances, TableStruct::offsets,
  887. file_level_metadata, file_level_enum_descriptors, NULL);
  888. }
  889. void protobuf_AssignDescriptorsOnce() {
  890. static ::google::protobuf::internal::once_flag once;
  891. ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
  892. }
  893. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  894. void protobuf_RegisterTypes(const ::std::string&) {
  895. protobuf_AssignDescriptorsOnce();
  896. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 30);
  897. }
  898. void AddDescriptorsImpl() {
  899. InitDefaults();
  900. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  901. "\n1google/protobuf/util/internal/testdata"
  902. "/maps.proto\022\027google.protobuf.testing\"\310\006\n"
  903. "\rMapsTestCases\0224\n\tempty_map\030\001 \001(\0132!.goog"
  904. "le.protobuf.testing.EmptyMap\022;\n\rstring_t"
  905. "o_int\030\002 \001(\0132$.google.protobuf.testing.St"
  906. "ringtoInt\022;\n\rint_to_string\030\003 \001(\0132$.googl"
  907. "e.protobuf.testing.IntToString\022/\n\006mixed1"
  908. "\030\004 \001(\0132\037.google.protobuf.testing.Mixed1\022"
  909. "/\n\006mixed2\030\005 \001(\0132\037.google.protobuf.testin"
  910. "g.Mixed2\022=\n\016map_of_objects\030\006 \001(\0132%.googl"
  911. "e.protobuf.testing.MapOfObjects\022F\n\030empty"
  912. "_key_string_to_int1\030\007 \001(\0132$.google.proto"
  913. "buf.testing.StringtoInt\022F\n\030empty_key_str"
  914. "ing_to_int2\030\010 \001(\0132$.google.protobuf.test"
  915. "ing.StringtoInt\022F\n\030empty_key_string_to_i"
  916. "nt3\030\t \001(\0132$.google.protobuf.testing.Stri"
  917. "ngtoInt\022G\n\030empty_key_bool_to_string\030\n \001("
  918. "\0132%.google.protobuf.testing.BoolToString"
  919. "\022E\n\027empty_key_int_to_string\030\013 \001(\0132$.goog"
  920. "le.protobuf.testing.IntToString\0228\n\017empty"
  921. "_key_mixed\030\014 \001(\0132\037.google.protobuf.testi"
  922. "ng.Mixed1\022D\n\025empty_key_map_objects\030\r \001(\013"
  923. "2%.google.protobuf.testing.MapOfObjects\""
  924. "o\n\010EmptyMap\0227\n\003map\030\001 \003(\0132*.google.protob"
  925. "uf.testing.EmptyMap.MapEntry\032*\n\010MapEntry"
  926. "\022\013\n\003key\030\001 \001(\005\022\r\n\005value\030\002 \001(\005:\0028\001\"u\n\013Stri"
  927. "ngtoInt\022:\n\003map\030\001 \003(\0132-.google.protobuf.t"
  928. "esting.StringtoInt.MapEntry\032*\n\010MapEntry\022"
  929. "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\"u\n\013IntTo"
  930. "String\022:\n\003map\030\001 \003(\0132-.google.protobuf.te"
  931. "sting.IntToString.MapEntry\032*\n\010MapEntry\022\013"
  932. "\n\003key\030\001 \001(\005\022\r\n\005value\030\002 \001(\t:\0028\001\"w\n\014BoolTo"
  933. "String\022;\n\003map\030\001 \003(\0132..google.protobuf.te"
  934. "sting.BoolToString.MapEntry\032*\n\010MapEntry\022"
  935. "\013\n\003key\030\001 \001(\010\022\r\n\005value\030\002 \001(\t:\0028\001\"x\n\006Mixed"
  936. "1\022\013\n\003msg\030\001 \001(\t\0225\n\003map\030\002 \003(\0132(.google.pro"
  937. "tobuf.testing.Mixed1.MapEntry\032*\n\010MapEntr"
  938. "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\002:\0028\001\"\277\001\n\006Mi"
  939. "xed2\0225\n\003map\030\001 \003(\0132(.google.protobuf.test"
  940. "ing.Mixed2.MapEntry\022-\n\002ee\030\002 \001(\0162!.google"
  941. ".protobuf.testing.Mixed2.E\032*\n\010MapEntry\022\013"
  942. "\n\003key\030\001 \001(\005\022\r\n\005value\030\002 \001(\010:\0028\001\"#\n\001E\022\006\n\002E"
  943. "0\020\000\022\006\n\002E1\020\001\022\006\n\002E2\020\002\022\006\n\002E3\020\003\"\271\001\n\014MapOfObj"
  944. "ects\022;\n\003map\030\001 \003(\0132..google.protobuf.test"
  945. "ing.MapOfObjects.MapEntry\032\027\n\001M\022\022\n\ninner_"
  946. "text\030\001 \001(\t\032S\n\010MapEntry\022\013\n\003key\030\001 \001(\t\0226\n\005v"
  947. "alue\030\002 \001(\0132\'.google.protobuf.testing.Map"
  948. "OfObjects.M:\0028\001\"\016\n\014DummyRequest\"\230\001\n\005MapI"
  949. "n\022\r\n\005other\030\001 \001(\t\022\016\n\006things\030\002 \003(\t\022\?\n\tmap_"
  950. "input\030\003 \003(\0132,.google.protobuf.testing.Ma"
  951. "pIn.MapInputEntry\032/\n\rMapInputEntry\022\013\n\003ke"
  952. "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\355\003\n\006MapOut\0227\n"
  953. "\004map1\030\001 \003(\0132).google.protobuf.testing.Ma"
  954. "pOut.Map1Entry\0227\n\004map2\030\002 \003(\0132).google.pr"
  955. "otobuf.testing.MapOut.Map2Entry\0227\n\004map3\030"
  956. "\003 \003(\0132).google.protobuf.testing.MapOut.M"
  957. "ap3Entry\0227\n\004map4\030\005 \003(\0132).google.protobuf"
  958. ".testing.MapOut.Map4Entry\022\013\n\003bar\030\004 \001(\t\032J"
  959. "\n\tMap1Entry\022\013\n\003key\030\001 \001(\t\022,\n\005value\030\002 \001(\0132"
  960. "\035.google.protobuf.testing.MapM:\0028\001\032L\n\tMa"
  961. "p2Entry\022\013\n\003key\030\001 \001(\t\022.\n\005value\030\002 \001(\0132\037.go"
  962. "ogle.protobuf.testing.MapOut:\0028\001\032+\n\tMap3"
  963. "Entry\022\013\n\003key\030\001 \001(\005\022\r\n\005value\030\002 \001(\t:\0028\001\032+\n"
  964. "\tMap4Entry\022\013\n\003key\030\001 \001(\010\022\r\n\005value\030\002 \001(\t:\002"
  965. "8\001\"\217\004\n\020MapOutWireFormat\022A\n\004map1\030\001 \003(\01323."
  966. "google.protobuf.testing.MapOutWireFormat"
  967. ".Map1Entry\022A\n\004map2\030\002 \003(\01323.google.protob"
  968. "uf.testing.MapOutWireFormat.Map2Entry\022A\n"
  969. "\004map3\030\003 \003(\01323.google.protobuf.testing.Ma"
  970. "pOutWireFormat.Map3Entry\022A\n\004map4\030\005 \003(\01323"
  971. ".google.protobuf.testing.MapOutWireForma"
  972. "t.Map4Entry\022\013\n\003bar\030\004 \001(\t\032F\n\tMap1Entry\022\013\n"
  973. "\003key\030\001 \001(\t\022,\n\005value\030\002 \001(\0132\035.google.proto"
  974. "buf.testing.MapM\032H\n\tMap2Entry\022\013\n\003key\030\001 \001"
  975. "(\t\022.\n\005value\030\002 \001(\0132\037.google.protobuf.test"
  976. "ing.MapOut\032\'\n\tMap3Entry\022\013\n\003key\030\001 \001(\005\022\r\n\005"
  977. "value\030\002 \001(\t\032\'\n\tMap4Entry\022\013\n\003key\030\001 \001(\010\022\r\n"
  978. "\005value\030\002 \001(\t\"\023\n\004MapM\022\013\n\003foo\030\001 \001(\t2h\n\017Map"
  979. "sTestService\022U\n\004Call\022%.google.protobuf.t"
  980. "esting.DummyRequest\032&.google.protobuf.te"
  981. "sting.MapsTestCasesb\006proto3"
  982. };
  983. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  984. descriptor, 3227);
  985. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  986. "google/protobuf/util/internal/testdata/maps.proto", &protobuf_RegisterTypes);
  987. }
  988. void AddDescriptors() {
  989. static ::google::protobuf::internal::once_flag once;
  990. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  991. }
  992. // Force AddDescriptors() to be called at dynamic initialization time.
  993. struct StaticDescriptorInitializer {
  994. StaticDescriptorInitializer() {
  995. AddDescriptors();
  996. }
  997. } static_descriptor_initializer;
  998. } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto
  999. namespace google {
  1000. namespace protobuf {
  1001. namespace testing {
  1002. const ::google::protobuf::EnumDescriptor* Mixed2_E_descriptor() {
  1003. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  1004. return protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_enum_descriptors[0];
  1005. }
  1006. bool Mixed2_E_IsValid(int value) {
  1007. switch (value) {
  1008. case 0:
  1009. case 1:
  1010. case 2:
  1011. case 3:
  1012. return true;
  1013. default:
  1014. return false;
  1015. }
  1016. }
  1017. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1018. const Mixed2_E Mixed2::E0;
  1019. const Mixed2_E Mixed2::E1;
  1020. const Mixed2_E Mixed2::E2;
  1021. const Mixed2_E Mixed2::E3;
  1022. const Mixed2_E Mixed2::E_MIN;
  1023. const Mixed2_E Mixed2::E_MAX;
  1024. const int Mixed2::E_ARRAYSIZE;
  1025. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1026. // ===================================================================
  1027. void MapsTestCases::InitAsDefaultInstance() {
  1028. ::google::protobuf::testing::_MapsTestCases_default_instance_._instance.get_mutable()->empty_map_ = const_cast< ::google::protobuf::testing::EmptyMap*>(
  1029. ::google::protobuf::testing::EmptyMap::internal_default_instance());
  1030. ::google::protobuf::testing::_MapsTestCases_default_instance_._instance.get_mutable()->string_to_int_ = const_cast< ::google::protobuf::testing::StringtoInt*>(
  1031. ::google::protobuf::testing::StringtoInt::internal_default_instance());
  1032. ::google::protobuf::testing::_MapsTestCases_default_instance_._instance.get_mutable()->int_to_string_ = const_cast< ::google::protobuf::testing::IntToString*>(
  1033. ::google::protobuf::testing::IntToString::internal_default_instance());
  1034. ::google::protobuf::testing::_MapsTestCases_default_instance_._instance.get_mutable()->mixed1_ = const_cast< ::google::protobuf::testing::Mixed1*>(
  1035. ::google::protobuf::testing::Mixed1::internal_default_instance());
  1036. ::google::protobuf::testing::_MapsTestCases_default_instance_._instance.get_mutable()->mixed2_ = const_cast< ::google::protobuf::testing::Mixed2*>(
  1037. ::google::protobuf::testing::Mixed2::internal_default_instance());
  1038. ::google::protobuf::testing::_MapsTestCases_default_instance_._instance.get_mutable()->map_of_objects_ = const_cast< ::google::protobuf::testing::MapOfObjects*>(
  1039. ::google::protobuf::testing::MapOfObjects::internal_default_instance());
  1040. ::google::protobuf::testing::_MapsTestCases_default_instance_._instance.get_mutable()->empty_key_string_to_int1_ = const_cast< ::google::protobuf::testing::StringtoInt*>(
  1041. ::google::protobuf::testing::StringtoInt::internal_default_instance());
  1042. ::google::protobuf::testing::_MapsTestCases_default_instance_._instance.get_mutable()->empty_key_string_to_int2_ = const_cast< ::google::protobuf::testing::StringtoInt*>(
  1043. ::google::protobuf::testing::StringtoInt::internal_default_instance());
  1044. ::google::protobuf::testing::_MapsTestCases_default_instance_._instance.get_mutable()->empty_key_string_to_int3_ = const_cast< ::google::protobuf::testing::StringtoInt*>(
  1045. ::google::protobuf::testing::StringtoInt::internal_default_instance());
  1046. ::google::protobuf::testing::_MapsTestCases_default_instance_._instance.get_mutable()->empty_key_bool_to_string_ = const_cast< ::google::protobuf::testing::BoolToString*>(
  1047. ::google::protobuf::testing::BoolToString::internal_default_instance());
  1048. ::google::protobuf::testing::_MapsTestCases_default_instance_._instance.get_mutable()->empty_key_int_to_string_ = const_cast< ::google::protobuf::testing::IntToString*>(
  1049. ::google::protobuf::testing::IntToString::internal_default_instance());
  1050. ::google::protobuf::testing::_MapsTestCases_default_instance_._instance.get_mutable()->empty_key_mixed_ = const_cast< ::google::protobuf::testing::Mixed1*>(
  1051. ::google::protobuf::testing::Mixed1::internal_default_instance());
  1052. ::google::protobuf::testing::_MapsTestCases_default_instance_._instance.get_mutable()->empty_key_map_objects_ = const_cast< ::google::protobuf::testing::MapOfObjects*>(
  1053. ::google::protobuf::testing::MapOfObjects::internal_default_instance());
  1054. }
  1055. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1056. const int MapsTestCases::kEmptyMapFieldNumber;
  1057. const int MapsTestCases::kStringToIntFieldNumber;
  1058. const int MapsTestCases::kIntToStringFieldNumber;
  1059. const int MapsTestCases::kMixed1FieldNumber;
  1060. const int MapsTestCases::kMixed2FieldNumber;
  1061. const int MapsTestCases::kMapOfObjectsFieldNumber;
  1062. const int MapsTestCases::kEmptyKeyStringToInt1FieldNumber;
  1063. const int MapsTestCases::kEmptyKeyStringToInt2FieldNumber;
  1064. const int MapsTestCases::kEmptyKeyStringToInt3FieldNumber;
  1065. const int MapsTestCases::kEmptyKeyBoolToStringFieldNumber;
  1066. const int MapsTestCases::kEmptyKeyIntToStringFieldNumber;
  1067. const int MapsTestCases::kEmptyKeyMixedFieldNumber;
  1068. const int MapsTestCases::kEmptyKeyMapObjectsFieldNumber;
  1069. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1070. MapsTestCases::MapsTestCases()
  1071. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1072. ::google::protobuf::internal::InitSCC(
  1073. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapsTestCases.base);
  1074. SharedCtor();
  1075. // @@protoc_insertion_point(constructor:google.protobuf.testing.MapsTestCases)
  1076. }
  1077. MapsTestCases::MapsTestCases(const MapsTestCases& from)
  1078. : ::google::protobuf::Message(),
  1079. _internal_metadata_(NULL) {
  1080. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1081. if (from.has_empty_map()) {
  1082. empty_map_ = new ::google::protobuf::testing::EmptyMap(*from.empty_map_);
  1083. } else {
  1084. empty_map_ = NULL;
  1085. }
  1086. if (from.has_string_to_int()) {
  1087. string_to_int_ = new ::google::protobuf::testing::StringtoInt(*from.string_to_int_);
  1088. } else {
  1089. string_to_int_ = NULL;
  1090. }
  1091. if (from.has_int_to_string()) {
  1092. int_to_string_ = new ::google::protobuf::testing::IntToString(*from.int_to_string_);
  1093. } else {
  1094. int_to_string_ = NULL;
  1095. }
  1096. if (from.has_mixed1()) {
  1097. mixed1_ = new ::google::protobuf::testing::Mixed1(*from.mixed1_);
  1098. } else {
  1099. mixed1_ = NULL;
  1100. }
  1101. if (from.has_mixed2()) {
  1102. mixed2_ = new ::google::protobuf::testing::Mixed2(*from.mixed2_);
  1103. } else {
  1104. mixed2_ = NULL;
  1105. }
  1106. if (from.has_map_of_objects()) {
  1107. map_of_objects_ = new ::google::protobuf::testing::MapOfObjects(*from.map_of_objects_);
  1108. } else {
  1109. map_of_objects_ = NULL;
  1110. }
  1111. if (from.has_empty_key_string_to_int1()) {
  1112. empty_key_string_to_int1_ = new ::google::protobuf::testing::StringtoInt(*from.empty_key_string_to_int1_);
  1113. } else {
  1114. empty_key_string_to_int1_ = NULL;
  1115. }
  1116. if (from.has_empty_key_string_to_int2()) {
  1117. empty_key_string_to_int2_ = new ::google::protobuf::testing::StringtoInt(*from.empty_key_string_to_int2_);
  1118. } else {
  1119. empty_key_string_to_int2_ = NULL;
  1120. }
  1121. if (from.has_empty_key_string_to_int3()) {
  1122. empty_key_string_to_int3_ = new ::google::protobuf::testing::StringtoInt(*from.empty_key_string_to_int3_);
  1123. } else {
  1124. empty_key_string_to_int3_ = NULL;
  1125. }
  1126. if (from.has_empty_key_bool_to_string()) {
  1127. empty_key_bool_to_string_ = new ::google::protobuf::testing::BoolToString(*from.empty_key_bool_to_string_);
  1128. } else {
  1129. empty_key_bool_to_string_ = NULL;
  1130. }
  1131. if (from.has_empty_key_int_to_string()) {
  1132. empty_key_int_to_string_ = new ::google::protobuf::testing::IntToString(*from.empty_key_int_to_string_);
  1133. } else {
  1134. empty_key_int_to_string_ = NULL;
  1135. }
  1136. if (from.has_empty_key_mixed()) {
  1137. empty_key_mixed_ = new ::google::protobuf::testing::Mixed1(*from.empty_key_mixed_);
  1138. } else {
  1139. empty_key_mixed_ = NULL;
  1140. }
  1141. if (from.has_empty_key_map_objects()) {
  1142. empty_key_map_objects_ = new ::google::protobuf::testing::MapOfObjects(*from.empty_key_map_objects_);
  1143. } else {
  1144. empty_key_map_objects_ = NULL;
  1145. }
  1146. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MapsTestCases)
  1147. }
  1148. void MapsTestCases::SharedCtor() {
  1149. ::memset(&empty_map_, 0, static_cast<size_t>(
  1150. reinterpret_cast<char*>(&empty_key_map_objects_) -
  1151. reinterpret_cast<char*>(&empty_map_)) + sizeof(empty_key_map_objects_));
  1152. }
  1153. MapsTestCases::~MapsTestCases() {
  1154. // @@protoc_insertion_point(destructor:google.protobuf.testing.MapsTestCases)
  1155. SharedDtor();
  1156. }
  1157. void MapsTestCases::SharedDtor() {
  1158. if (this != internal_default_instance()) delete empty_map_;
  1159. if (this != internal_default_instance()) delete string_to_int_;
  1160. if (this != internal_default_instance()) delete int_to_string_;
  1161. if (this != internal_default_instance()) delete mixed1_;
  1162. if (this != internal_default_instance()) delete mixed2_;
  1163. if (this != internal_default_instance()) delete map_of_objects_;
  1164. if (this != internal_default_instance()) delete empty_key_string_to_int1_;
  1165. if (this != internal_default_instance()) delete empty_key_string_to_int2_;
  1166. if (this != internal_default_instance()) delete empty_key_string_to_int3_;
  1167. if (this != internal_default_instance()) delete empty_key_bool_to_string_;
  1168. if (this != internal_default_instance()) delete empty_key_int_to_string_;
  1169. if (this != internal_default_instance()) delete empty_key_mixed_;
  1170. if (this != internal_default_instance()) delete empty_key_map_objects_;
  1171. }
  1172. void MapsTestCases::SetCachedSize(int size) const {
  1173. _cached_size_.Set(size);
  1174. }
  1175. const ::google::protobuf::Descriptor* MapsTestCases::descriptor() {
  1176. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  1177. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1178. }
  1179. const MapsTestCases& MapsTestCases::default_instance() {
  1180. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapsTestCases.base);
  1181. return *internal_default_instance();
  1182. }
  1183. void MapsTestCases::Clear() {
  1184. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MapsTestCases)
  1185. ::google::protobuf::uint32 cached_has_bits = 0;
  1186. // Prevent compiler warnings about cached_has_bits being unused
  1187. (void) cached_has_bits;
  1188. if (GetArenaNoVirtual() == NULL && empty_map_ != NULL) {
  1189. delete empty_map_;
  1190. }
  1191. empty_map_ = NULL;
  1192. if (GetArenaNoVirtual() == NULL && string_to_int_ != NULL) {
  1193. delete string_to_int_;
  1194. }
  1195. string_to_int_ = NULL;
  1196. if (GetArenaNoVirtual() == NULL && int_to_string_ != NULL) {
  1197. delete int_to_string_;
  1198. }
  1199. int_to_string_ = NULL;
  1200. if (GetArenaNoVirtual() == NULL && mixed1_ != NULL) {
  1201. delete mixed1_;
  1202. }
  1203. mixed1_ = NULL;
  1204. if (GetArenaNoVirtual() == NULL && mixed2_ != NULL) {
  1205. delete mixed2_;
  1206. }
  1207. mixed2_ = NULL;
  1208. if (GetArenaNoVirtual() == NULL && map_of_objects_ != NULL) {
  1209. delete map_of_objects_;
  1210. }
  1211. map_of_objects_ = NULL;
  1212. if (GetArenaNoVirtual() == NULL && empty_key_string_to_int1_ != NULL) {
  1213. delete empty_key_string_to_int1_;
  1214. }
  1215. empty_key_string_to_int1_ = NULL;
  1216. if (GetArenaNoVirtual() == NULL && empty_key_string_to_int2_ != NULL) {
  1217. delete empty_key_string_to_int2_;
  1218. }
  1219. empty_key_string_to_int2_ = NULL;
  1220. if (GetArenaNoVirtual() == NULL && empty_key_string_to_int3_ != NULL) {
  1221. delete empty_key_string_to_int3_;
  1222. }
  1223. empty_key_string_to_int3_ = NULL;
  1224. if (GetArenaNoVirtual() == NULL && empty_key_bool_to_string_ != NULL) {
  1225. delete empty_key_bool_to_string_;
  1226. }
  1227. empty_key_bool_to_string_ = NULL;
  1228. if (GetArenaNoVirtual() == NULL && empty_key_int_to_string_ != NULL) {
  1229. delete empty_key_int_to_string_;
  1230. }
  1231. empty_key_int_to_string_ = NULL;
  1232. if (GetArenaNoVirtual() == NULL && empty_key_mixed_ != NULL) {
  1233. delete empty_key_mixed_;
  1234. }
  1235. empty_key_mixed_ = NULL;
  1236. if (GetArenaNoVirtual() == NULL && empty_key_map_objects_ != NULL) {
  1237. delete empty_key_map_objects_;
  1238. }
  1239. empty_key_map_objects_ = NULL;
  1240. _internal_metadata_.Clear();
  1241. }
  1242. bool MapsTestCases::MergePartialFromCodedStream(
  1243. ::google::protobuf::io::CodedInputStream* input) {
  1244. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1245. ::google::protobuf::uint32 tag;
  1246. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MapsTestCases)
  1247. for (;;) {
  1248. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1249. tag = p.first;
  1250. if (!p.second) goto handle_unusual;
  1251. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1252. // .google.protobuf.testing.EmptyMap empty_map = 1;
  1253. case 1: {
  1254. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1255. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1256. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1257. input, mutable_empty_map()));
  1258. } else {
  1259. goto handle_unusual;
  1260. }
  1261. break;
  1262. }
  1263. // .google.protobuf.testing.StringtoInt string_to_int = 2;
  1264. case 2: {
  1265. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1266. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1267. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1268. input, mutable_string_to_int()));
  1269. } else {
  1270. goto handle_unusual;
  1271. }
  1272. break;
  1273. }
  1274. // .google.protobuf.testing.IntToString int_to_string = 3;
  1275. case 3: {
  1276. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1277. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  1278. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1279. input, mutable_int_to_string()));
  1280. } else {
  1281. goto handle_unusual;
  1282. }
  1283. break;
  1284. }
  1285. // .google.protobuf.testing.Mixed1 mixed1 = 4;
  1286. case 4: {
  1287. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1288. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  1289. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1290. input, mutable_mixed1()));
  1291. } else {
  1292. goto handle_unusual;
  1293. }
  1294. break;
  1295. }
  1296. // .google.protobuf.testing.Mixed2 mixed2 = 5;
  1297. case 5: {
  1298. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1299. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  1300. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1301. input, mutable_mixed2()));
  1302. } else {
  1303. goto handle_unusual;
  1304. }
  1305. break;
  1306. }
  1307. // .google.protobuf.testing.MapOfObjects map_of_objects = 6;
  1308. case 6: {
  1309. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1310. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  1311. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1312. input, mutable_map_of_objects()));
  1313. } else {
  1314. goto handle_unusual;
  1315. }
  1316. break;
  1317. }
  1318. // .google.protobuf.testing.StringtoInt empty_key_string_to_int1 = 7;
  1319. case 7: {
  1320. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1321. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  1322. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1323. input, mutable_empty_key_string_to_int1()));
  1324. } else {
  1325. goto handle_unusual;
  1326. }
  1327. break;
  1328. }
  1329. // .google.protobuf.testing.StringtoInt empty_key_string_to_int2 = 8;
  1330. case 8: {
  1331. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1332. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  1333. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1334. input, mutable_empty_key_string_to_int2()));
  1335. } else {
  1336. goto handle_unusual;
  1337. }
  1338. break;
  1339. }
  1340. // .google.protobuf.testing.StringtoInt empty_key_string_to_int3 = 9;
  1341. case 9: {
  1342. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1343. static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
  1344. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1345. input, mutable_empty_key_string_to_int3()));
  1346. } else {
  1347. goto handle_unusual;
  1348. }
  1349. break;
  1350. }
  1351. // .google.protobuf.testing.BoolToString empty_key_bool_to_string = 10;
  1352. case 10: {
  1353. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1354. static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
  1355. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1356. input, mutable_empty_key_bool_to_string()));
  1357. } else {
  1358. goto handle_unusual;
  1359. }
  1360. break;
  1361. }
  1362. // .google.protobuf.testing.IntToString empty_key_int_to_string = 11;
  1363. case 11: {
  1364. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1365. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  1366. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1367. input, mutable_empty_key_int_to_string()));
  1368. } else {
  1369. goto handle_unusual;
  1370. }
  1371. break;
  1372. }
  1373. // .google.protobuf.testing.Mixed1 empty_key_mixed = 12;
  1374. case 12: {
  1375. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1376. static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
  1377. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1378. input, mutable_empty_key_mixed()));
  1379. } else {
  1380. goto handle_unusual;
  1381. }
  1382. break;
  1383. }
  1384. // .google.protobuf.testing.MapOfObjects empty_key_map_objects = 13;
  1385. case 13: {
  1386. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1387. static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
  1388. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1389. input, mutable_empty_key_map_objects()));
  1390. } else {
  1391. goto handle_unusual;
  1392. }
  1393. break;
  1394. }
  1395. default: {
  1396. handle_unusual:
  1397. if (tag == 0) {
  1398. goto success;
  1399. }
  1400. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1401. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1402. break;
  1403. }
  1404. }
  1405. }
  1406. success:
  1407. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MapsTestCases)
  1408. return true;
  1409. failure:
  1410. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MapsTestCases)
  1411. return false;
  1412. #undef DO_
  1413. }
  1414. void MapsTestCases::SerializeWithCachedSizes(
  1415. ::google::protobuf::io::CodedOutputStream* output) const {
  1416. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MapsTestCases)
  1417. ::google::protobuf::uint32 cached_has_bits = 0;
  1418. (void) cached_has_bits;
  1419. // .google.protobuf.testing.EmptyMap empty_map = 1;
  1420. if (this->has_empty_map()) {
  1421. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1422. 1, this->_internal_empty_map(), output);
  1423. }
  1424. // .google.protobuf.testing.StringtoInt string_to_int = 2;
  1425. if (this->has_string_to_int()) {
  1426. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1427. 2, this->_internal_string_to_int(), output);
  1428. }
  1429. // .google.protobuf.testing.IntToString int_to_string = 3;
  1430. if (this->has_int_to_string()) {
  1431. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1432. 3, this->_internal_int_to_string(), output);
  1433. }
  1434. // .google.protobuf.testing.Mixed1 mixed1 = 4;
  1435. if (this->has_mixed1()) {
  1436. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1437. 4, this->_internal_mixed1(), output);
  1438. }
  1439. // .google.protobuf.testing.Mixed2 mixed2 = 5;
  1440. if (this->has_mixed2()) {
  1441. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1442. 5, this->_internal_mixed2(), output);
  1443. }
  1444. // .google.protobuf.testing.MapOfObjects map_of_objects = 6;
  1445. if (this->has_map_of_objects()) {
  1446. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1447. 6, this->_internal_map_of_objects(), output);
  1448. }
  1449. // .google.protobuf.testing.StringtoInt empty_key_string_to_int1 = 7;
  1450. if (this->has_empty_key_string_to_int1()) {
  1451. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1452. 7, this->_internal_empty_key_string_to_int1(), output);
  1453. }
  1454. // .google.protobuf.testing.StringtoInt empty_key_string_to_int2 = 8;
  1455. if (this->has_empty_key_string_to_int2()) {
  1456. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1457. 8, this->_internal_empty_key_string_to_int2(), output);
  1458. }
  1459. // .google.protobuf.testing.StringtoInt empty_key_string_to_int3 = 9;
  1460. if (this->has_empty_key_string_to_int3()) {
  1461. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1462. 9, this->_internal_empty_key_string_to_int3(), output);
  1463. }
  1464. // .google.protobuf.testing.BoolToString empty_key_bool_to_string = 10;
  1465. if (this->has_empty_key_bool_to_string()) {
  1466. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1467. 10, this->_internal_empty_key_bool_to_string(), output);
  1468. }
  1469. // .google.protobuf.testing.IntToString empty_key_int_to_string = 11;
  1470. if (this->has_empty_key_int_to_string()) {
  1471. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1472. 11, this->_internal_empty_key_int_to_string(), output);
  1473. }
  1474. // .google.protobuf.testing.Mixed1 empty_key_mixed = 12;
  1475. if (this->has_empty_key_mixed()) {
  1476. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1477. 12, this->_internal_empty_key_mixed(), output);
  1478. }
  1479. // .google.protobuf.testing.MapOfObjects empty_key_map_objects = 13;
  1480. if (this->has_empty_key_map_objects()) {
  1481. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1482. 13, this->_internal_empty_key_map_objects(), output);
  1483. }
  1484. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1485. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1486. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1487. }
  1488. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MapsTestCases)
  1489. }
  1490. ::google::protobuf::uint8* MapsTestCases::InternalSerializeWithCachedSizesToArray(
  1491. bool deterministic, ::google::protobuf::uint8* target) const {
  1492. (void)deterministic; // Unused
  1493. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MapsTestCases)
  1494. ::google::protobuf::uint32 cached_has_bits = 0;
  1495. (void) cached_has_bits;
  1496. // .google.protobuf.testing.EmptyMap empty_map = 1;
  1497. if (this->has_empty_map()) {
  1498. target = ::google::protobuf::internal::WireFormatLite::
  1499. InternalWriteMessageToArray(
  1500. 1, this->_internal_empty_map(), deterministic, target);
  1501. }
  1502. // .google.protobuf.testing.StringtoInt string_to_int = 2;
  1503. if (this->has_string_to_int()) {
  1504. target = ::google::protobuf::internal::WireFormatLite::
  1505. InternalWriteMessageToArray(
  1506. 2, this->_internal_string_to_int(), deterministic, target);
  1507. }
  1508. // .google.protobuf.testing.IntToString int_to_string = 3;
  1509. if (this->has_int_to_string()) {
  1510. target = ::google::protobuf::internal::WireFormatLite::
  1511. InternalWriteMessageToArray(
  1512. 3, this->_internal_int_to_string(), deterministic, target);
  1513. }
  1514. // .google.protobuf.testing.Mixed1 mixed1 = 4;
  1515. if (this->has_mixed1()) {
  1516. target = ::google::protobuf::internal::WireFormatLite::
  1517. InternalWriteMessageToArray(
  1518. 4, this->_internal_mixed1(), deterministic, target);
  1519. }
  1520. // .google.protobuf.testing.Mixed2 mixed2 = 5;
  1521. if (this->has_mixed2()) {
  1522. target = ::google::protobuf::internal::WireFormatLite::
  1523. InternalWriteMessageToArray(
  1524. 5, this->_internal_mixed2(), deterministic, target);
  1525. }
  1526. // .google.protobuf.testing.MapOfObjects map_of_objects = 6;
  1527. if (this->has_map_of_objects()) {
  1528. target = ::google::protobuf::internal::WireFormatLite::
  1529. InternalWriteMessageToArray(
  1530. 6, this->_internal_map_of_objects(), deterministic, target);
  1531. }
  1532. // .google.protobuf.testing.StringtoInt empty_key_string_to_int1 = 7;
  1533. if (this->has_empty_key_string_to_int1()) {
  1534. target = ::google::protobuf::internal::WireFormatLite::
  1535. InternalWriteMessageToArray(
  1536. 7, this->_internal_empty_key_string_to_int1(), deterministic, target);
  1537. }
  1538. // .google.protobuf.testing.StringtoInt empty_key_string_to_int2 = 8;
  1539. if (this->has_empty_key_string_to_int2()) {
  1540. target = ::google::protobuf::internal::WireFormatLite::
  1541. InternalWriteMessageToArray(
  1542. 8, this->_internal_empty_key_string_to_int2(), deterministic, target);
  1543. }
  1544. // .google.protobuf.testing.StringtoInt empty_key_string_to_int3 = 9;
  1545. if (this->has_empty_key_string_to_int3()) {
  1546. target = ::google::protobuf::internal::WireFormatLite::
  1547. InternalWriteMessageToArray(
  1548. 9, this->_internal_empty_key_string_to_int3(), deterministic, target);
  1549. }
  1550. // .google.protobuf.testing.BoolToString empty_key_bool_to_string = 10;
  1551. if (this->has_empty_key_bool_to_string()) {
  1552. target = ::google::protobuf::internal::WireFormatLite::
  1553. InternalWriteMessageToArray(
  1554. 10, this->_internal_empty_key_bool_to_string(), deterministic, target);
  1555. }
  1556. // .google.protobuf.testing.IntToString empty_key_int_to_string = 11;
  1557. if (this->has_empty_key_int_to_string()) {
  1558. target = ::google::protobuf::internal::WireFormatLite::
  1559. InternalWriteMessageToArray(
  1560. 11, this->_internal_empty_key_int_to_string(), deterministic, target);
  1561. }
  1562. // .google.protobuf.testing.Mixed1 empty_key_mixed = 12;
  1563. if (this->has_empty_key_mixed()) {
  1564. target = ::google::protobuf::internal::WireFormatLite::
  1565. InternalWriteMessageToArray(
  1566. 12, this->_internal_empty_key_mixed(), deterministic, target);
  1567. }
  1568. // .google.protobuf.testing.MapOfObjects empty_key_map_objects = 13;
  1569. if (this->has_empty_key_map_objects()) {
  1570. target = ::google::protobuf::internal::WireFormatLite::
  1571. InternalWriteMessageToArray(
  1572. 13, this->_internal_empty_key_map_objects(), deterministic, target);
  1573. }
  1574. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1575. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1576. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1577. }
  1578. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MapsTestCases)
  1579. return target;
  1580. }
  1581. size_t MapsTestCases::ByteSizeLong() const {
  1582. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MapsTestCases)
  1583. size_t total_size = 0;
  1584. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1585. total_size +=
  1586. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1587. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1588. }
  1589. // .google.protobuf.testing.EmptyMap empty_map = 1;
  1590. if (this->has_empty_map()) {
  1591. total_size += 1 +
  1592. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1593. *empty_map_);
  1594. }
  1595. // .google.protobuf.testing.StringtoInt string_to_int = 2;
  1596. if (this->has_string_to_int()) {
  1597. total_size += 1 +
  1598. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1599. *string_to_int_);
  1600. }
  1601. // .google.protobuf.testing.IntToString int_to_string = 3;
  1602. if (this->has_int_to_string()) {
  1603. total_size += 1 +
  1604. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1605. *int_to_string_);
  1606. }
  1607. // .google.protobuf.testing.Mixed1 mixed1 = 4;
  1608. if (this->has_mixed1()) {
  1609. total_size += 1 +
  1610. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1611. *mixed1_);
  1612. }
  1613. // .google.protobuf.testing.Mixed2 mixed2 = 5;
  1614. if (this->has_mixed2()) {
  1615. total_size += 1 +
  1616. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1617. *mixed2_);
  1618. }
  1619. // .google.protobuf.testing.MapOfObjects map_of_objects = 6;
  1620. if (this->has_map_of_objects()) {
  1621. total_size += 1 +
  1622. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1623. *map_of_objects_);
  1624. }
  1625. // .google.protobuf.testing.StringtoInt empty_key_string_to_int1 = 7;
  1626. if (this->has_empty_key_string_to_int1()) {
  1627. total_size += 1 +
  1628. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1629. *empty_key_string_to_int1_);
  1630. }
  1631. // .google.protobuf.testing.StringtoInt empty_key_string_to_int2 = 8;
  1632. if (this->has_empty_key_string_to_int2()) {
  1633. total_size += 1 +
  1634. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1635. *empty_key_string_to_int2_);
  1636. }
  1637. // .google.protobuf.testing.StringtoInt empty_key_string_to_int3 = 9;
  1638. if (this->has_empty_key_string_to_int3()) {
  1639. total_size += 1 +
  1640. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1641. *empty_key_string_to_int3_);
  1642. }
  1643. // .google.protobuf.testing.BoolToString empty_key_bool_to_string = 10;
  1644. if (this->has_empty_key_bool_to_string()) {
  1645. total_size += 1 +
  1646. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1647. *empty_key_bool_to_string_);
  1648. }
  1649. // .google.protobuf.testing.IntToString empty_key_int_to_string = 11;
  1650. if (this->has_empty_key_int_to_string()) {
  1651. total_size += 1 +
  1652. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1653. *empty_key_int_to_string_);
  1654. }
  1655. // .google.protobuf.testing.Mixed1 empty_key_mixed = 12;
  1656. if (this->has_empty_key_mixed()) {
  1657. total_size += 1 +
  1658. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1659. *empty_key_mixed_);
  1660. }
  1661. // .google.protobuf.testing.MapOfObjects empty_key_map_objects = 13;
  1662. if (this->has_empty_key_map_objects()) {
  1663. total_size += 1 +
  1664. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1665. *empty_key_map_objects_);
  1666. }
  1667. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1668. SetCachedSize(cached_size);
  1669. return total_size;
  1670. }
  1671. void MapsTestCases::MergeFrom(const ::google::protobuf::Message& from) {
  1672. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MapsTestCases)
  1673. GOOGLE_DCHECK_NE(&from, this);
  1674. const MapsTestCases* source =
  1675. ::google::protobuf::internal::DynamicCastToGenerated<const MapsTestCases>(
  1676. &from);
  1677. if (source == NULL) {
  1678. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MapsTestCases)
  1679. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1680. } else {
  1681. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MapsTestCases)
  1682. MergeFrom(*source);
  1683. }
  1684. }
  1685. void MapsTestCases::MergeFrom(const MapsTestCases& from) {
  1686. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MapsTestCases)
  1687. GOOGLE_DCHECK_NE(&from, this);
  1688. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1689. ::google::protobuf::uint32 cached_has_bits = 0;
  1690. (void) cached_has_bits;
  1691. if (from.has_empty_map()) {
  1692. mutable_empty_map()->::google::protobuf::testing::EmptyMap::MergeFrom(from.empty_map());
  1693. }
  1694. if (from.has_string_to_int()) {
  1695. mutable_string_to_int()->::google::protobuf::testing::StringtoInt::MergeFrom(from.string_to_int());
  1696. }
  1697. if (from.has_int_to_string()) {
  1698. mutable_int_to_string()->::google::protobuf::testing::IntToString::MergeFrom(from.int_to_string());
  1699. }
  1700. if (from.has_mixed1()) {
  1701. mutable_mixed1()->::google::protobuf::testing::Mixed1::MergeFrom(from.mixed1());
  1702. }
  1703. if (from.has_mixed2()) {
  1704. mutable_mixed2()->::google::protobuf::testing::Mixed2::MergeFrom(from.mixed2());
  1705. }
  1706. if (from.has_map_of_objects()) {
  1707. mutable_map_of_objects()->::google::protobuf::testing::MapOfObjects::MergeFrom(from.map_of_objects());
  1708. }
  1709. if (from.has_empty_key_string_to_int1()) {
  1710. mutable_empty_key_string_to_int1()->::google::protobuf::testing::StringtoInt::MergeFrom(from.empty_key_string_to_int1());
  1711. }
  1712. if (from.has_empty_key_string_to_int2()) {
  1713. mutable_empty_key_string_to_int2()->::google::protobuf::testing::StringtoInt::MergeFrom(from.empty_key_string_to_int2());
  1714. }
  1715. if (from.has_empty_key_string_to_int3()) {
  1716. mutable_empty_key_string_to_int3()->::google::protobuf::testing::StringtoInt::MergeFrom(from.empty_key_string_to_int3());
  1717. }
  1718. if (from.has_empty_key_bool_to_string()) {
  1719. mutable_empty_key_bool_to_string()->::google::protobuf::testing::BoolToString::MergeFrom(from.empty_key_bool_to_string());
  1720. }
  1721. if (from.has_empty_key_int_to_string()) {
  1722. mutable_empty_key_int_to_string()->::google::protobuf::testing::IntToString::MergeFrom(from.empty_key_int_to_string());
  1723. }
  1724. if (from.has_empty_key_mixed()) {
  1725. mutable_empty_key_mixed()->::google::protobuf::testing::Mixed1::MergeFrom(from.empty_key_mixed());
  1726. }
  1727. if (from.has_empty_key_map_objects()) {
  1728. mutable_empty_key_map_objects()->::google::protobuf::testing::MapOfObjects::MergeFrom(from.empty_key_map_objects());
  1729. }
  1730. }
  1731. void MapsTestCases::CopyFrom(const ::google::protobuf::Message& from) {
  1732. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MapsTestCases)
  1733. if (&from == this) return;
  1734. Clear();
  1735. MergeFrom(from);
  1736. }
  1737. void MapsTestCases::CopyFrom(const MapsTestCases& from) {
  1738. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MapsTestCases)
  1739. if (&from == this) return;
  1740. Clear();
  1741. MergeFrom(from);
  1742. }
  1743. bool MapsTestCases::IsInitialized() const {
  1744. return true;
  1745. }
  1746. void MapsTestCases::Swap(MapsTestCases* other) {
  1747. if (other == this) return;
  1748. InternalSwap(other);
  1749. }
  1750. void MapsTestCases::InternalSwap(MapsTestCases* other) {
  1751. using std::swap;
  1752. swap(empty_map_, other->empty_map_);
  1753. swap(string_to_int_, other->string_to_int_);
  1754. swap(int_to_string_, other->int_to_string_);
  1755. swap(mixed1_, other->mixed1_);
  1756. swap(mixed2_, other->mixed2_);
  1757. swap(map_of_objects_, other->map_of_objects_);
  1758. swap(empty_key_string_to_int1_, other->empty_key_string_to_int1_);
  1759. swap(empty_key_string_to_int2_, other->empty_key_string_to_int2_);
  1760. swap(empty_key_string_to_int3_, other->empty_key_string_to_int3_);
  1761. swap(empty_key_bool_to_string_, other->empty_key_bool_to_string_);
  1762. swap(empty_key_int_to_string_, other->empty_key_int_to_string_);
  1763. swap(empty_key_mixed_, other->empty_key_mixed_);
  1764. swap(empty_key_map_objects_, other->empty_key_map_objects_);
  1765. _internal_metadata_.Swap(&other->_internal_metadata_);
  1766. }
  1767. ::google::protobuf::Metadata MapsTestCases::GetMetadata() const {
  1768. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  1769. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  1770. }
  1771. // ===================================================================
  1772. EmptyMap_MapEntry_DoNotUse::EmptyMap_MapEntry_DoNotUse() {}
  1773. EmptyMap_MapEntry_DoNotUse::EmptyMap_MapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  1774. void EmptyMap_MapEntry_DoNotUse::MergeFrom(const EmptyMap_MapEntry_DoNotUse& other) {
  1775. MergeFromInternal(other);
  1776. }
  1777. ::google::protobuf::Metadata EmptyMap_MapEntry_DoNotUse::GetMetadata() const {
  1778. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  1779. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[1];
  1780. }
  1781. void EmptyMap_MapEntry_DoNotUse::MergeFrom(
  1782. const ::google::protobuf::Message& other) {
  1783. ::google::protobuf::Message::MergeFrom(other);
  1784. }
  1785. // ===================================================================
  1786. void EmptyMap::InitAsDefaultInstance() {
  1787. }
  1788. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1789. const int EmptyMap::kMapFieldNumber;
  1790. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1791. EmptyMap::EmptyMap()
  1792. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1793. ::google::protobuf::internal::InitSCC(
  1794. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_EmptyMap.base);
  1795. SharedCtor();
  1796. // @@protoc_insertion_point(constructor:google.protobuf.testing.EmptyMap)
  1797. }
  1798. EmptyMap::EmptyMap(const EmptyMap& from)
  1799. : ::google::protobuf::Message(),
  1800. _internal_metadata_(NULL) {
  1801. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1802. map_.MergeFrom(from.map_);
  1803. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.EmptyMap)
  1804. }
  1805. void EmptyMap::SharedCtor() {
  1806. }
  1807. EmptyMap::~EmptyMap() {
  1808. // @@protoc_insertion_point(destructor:google.protobuf.testing.EmptyMap)
  1809. SharedDtor();
  1810. }
  1811. void EmptyMap::SharedDtor() {
  1812. }
  1813. void EmptyMap::SetCachedSize(int size) const {
  1814. _cached_size_.Set(size);
  1815. }
  1816. const ::google::protobuf::Descriptor* EmptyMap::descriptor() {
  1817. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  1818. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1819. }
  1820. const EmptyMap& EmptyMap::default_instance() {
  1821. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_EmptyMap.base);
  1822. return *internal_default_instance();
  1823. }
  1824. void EmptyMap::Clear() {
  1825. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.EmptyMap)
  1826. ::google::protobuf::uint32 cached_has_bits = 0;
  1827. // Prevent compiler warnings about cached_has_bits being unused
  1828. (void) cached_has_bits;
  1829. map_.Clear();
  1830. _internal_metadata_.Clear();
  1831. }
  1832. bool EmptyMap::MergePartialFromCodedStream(
  1833. ::google::protobuf::io::CodedInputStream* input) {
  1834. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1835. ::google::protobuf::uint32 tag;
  1836. // @@protoc_insertion_point(parse_start:google.protobuf.testing.EmptyMap)
  1837. for (;;) {
  1838. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1839. tag = p.first;
  1840. if (!p.second) goto handle_unusual;
  1841. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1842. // map<int32, int32> map = 1;
  1843. case 1: {
  1844. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1845. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1846. EmptyMap_MapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  1847. EmptyMap_MapEntry_DoNotUse,
  1848. ::google::protobuf::int32, ::google::protobuf::int32,
  1849. ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
  1850. ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
  1851. 0 >,
  1852. ::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 > > parser(&map_);
  1853. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  1854. input, &parser));
  1855. } else {
  1856. goto handle_unusual;
  1857. }
  1858. break;
  1859. }
  1860. default: {
  1861. handle_unusual:
  1862. if (tag == 0) {
  1863. goto success;
  1864. }
  1865. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1866. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1867. break;
  1868. }
  1869. }
  1870. }
  1871. success:
  1872. // @@protoc_insertion_point(parse_success:google.protobuf.testing.EmptyMap)
  1873. return true;
  1874. failure:
  1875. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.EmptyMap)
  1876. return false;
  1877. #undef DO_
  1878. }
  1879. void EmptyMap::SerializeWithCachedSizes(
  1880. ::google::protobuf::io::CodedOutputStream* output) const {
  1881. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.EmptyMap)
  1882. ::google::protobuf::uint32 cached_has_bits = 0;
  1883. (void) cached_has_bits;
  1884. // map<int32, int32> map = 1;
  1885. if (!this->map().empty()) {
  1886. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::const_pointer
  1887. ConstPtr;
  1888. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  1889. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  1890. if (output->IsSerializationDeterministic() &&
  1891. this->map().size() > 1) {
  1892. ::std::unique_ptr<SortItem[]> items(
  1893. new SortItem[this->map().size()]);
  1894. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::size_type size_type;
  1895. size_type n = 0;
  1896. for (::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::const_iterator
  1897. it = this->map().begin();
  1898. it != this->map().end(); ++it, ++n) {
  1899. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  1900. }
  1901. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  1902. ::std::unique_ptr<EmptyMap_MapEntry_DoNotUse> entry;
  1903. for (size_type i = 0; i < n; i++) {
  1904. entry.reset(map_.NewEntryWrapper(
  1905. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  1906. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1907. 1, *entry, output);
  1908. }
  1909. } else {
  1910. ::std::unique_ptr<EmptyMap_MapEntry_DoNotUse> entry;
  1911. for (::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::const_iterator
  1912. it = this->map().begin();
  1913. it != this->map().end(); ++it) {
  1914. entry.reset(map_.NewEntryWrapper(
  1915. it->first, it->second));
  1916. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1917. 1, *entry, output);
  1918. }
  1919. }
  1920. }
  1921. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1922. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1923. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1924. }
  1925. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.EmptyMap)
  1926. }
  1927. ::google::protobuf::uint8* EmptyMap::InternalSerializeWithCachedSizesToArray(
  1928. bool deterministic, ::google::protobuf::uint8* target) const {
  1929. (void)deterministic; // Unused
  1930. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.EmptyMap)
  1931. ::google::protobuf::uint32 cached_has_bits = 0;
  1932. (void) cached_has_bits;
  1933. // map<int32, int32> map = 1;
  1934. if (!this->map().empty()) {
  1935. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::const_pointer
  1936. ConstPtr;
  1937. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  1938. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  1939. if (deterministic &&
  1940. this->map().size() > 1) {
  1941. ::std::unique_ptr<SortItem[]> items(
  1942. new SortItem[this->map().size()]);
  1943. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::size_type size_type;
  1944. size_type n = 0;
  1945. for (::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::const_iterator
  1946. it = this->map().begin();
  1947. it != this->map().end(); ++it, ++n) {
  1948. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  1949. }
  1950. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  1951. ::std::unique_ptr<EmptyMap_MapEntry_DoNotUse> entry;
  1952. for (size_type i = 0; i < n; i++) {
  1953. entry.reset(map_.NewEntryWrapper(
  1954. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  1955. target = ::google::protobuf::internal::WireFormatLite::
  1956. InternalWriteMessageNoVirtualToArray(
  1957. 1, *entry, deterministic, target);
  1958. ;
  1959. }
  1960. } else {
  1961. ::std::unique_ptr<EmptyMap_MapEntry_DoNotUse> entry;
  1962. for (::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::const_iterator
  1963. it = this->map().begin();
  1964. it != this->map().end(); ++it) {
  1965. entry.reset(map_.NewEntryWrapper(
  1966. it->first, it->second));
  1967. target = ::google::protobuf::internal::WireFormatLite::
  1968. InternalWriteMessageNoVirtualToArray(
  1969. 1, *entry, deterministic, target);
  1970. ;
  1971. }
  1972. }
  1973. }
  1974. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1975. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1976. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1977. }
  1978. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.EmptyMap)
  1979. return target;
  1980. }
  1981. size_t EmptyMap::ByteSizeLong() const {
  1982. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.EmptyMap)
  1983. size_t total_size = 0;
  1984. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1985. total_size +=
  1986. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1987. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1988. }
  1989. // map<int32, int32> map = 1;
  1990. total_size += 1 *
  1991. ::google::protobuf::internal::FromIntSize(this->map_size());
  1992. {
  1993. ::std::unique_ptr<EmptyMap_MapEntry_DoNotUse> entry;
  1994. for (::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::const_iterator
  1995. it = this->map().begin();
  1996. it != this->map().end(); ++it) {
  1997. entry.reset(map_.NewEntryWrapper(it->first, it->second));
  1998. total_size += ::google::protobuf::internal::WireFormatLite::
  1999. MessageSizeNoVirtual(*entry);
  2000. }
  2001. }
  2002. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2003. SetCachedSize(cached_size);
  2004. return total_size;
  2005. }
  2006. void EmptyMap::MergeFrom(const ::google::protobuf::Message& from) {
  2007. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.EmptyMap)
  2008. GOOGLE_DCHECK_NE(&from, this);
  2009. const EmptyMap* source =
  2010. ::google::protobuf::internal::DynamicCastToGenerated<const EmptyMap>(
  2011. &from);
  2012. if (source == NULL) {
  2013. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.EmptyMap)
  2014. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2015. } else {
  2016. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.EmptyMap)
  2017. MergeFrom(*source);
  2018. }
  2019. }
  2020. void EmptyMap::MergeFrom(const EmptyMap& from) {
  2021. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.EmptyMap)
  2022. GOOGLE_DCHECK_NE(&from, this);
  2023. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2024. ::google::protobuf::uint32 cached_has_bits = 0;
  2025. (void) cached_has_bits;
  2026. map_.MergeFrom(from.map_);
  2027. }
  2028. void EmptyMap::CopyFrom(const ::google::protobuf::Message& from) {
  2029. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.EmptyMap)
  2030. if (&from == this) return;
  2031. Clear();
  2032. MergeFrom(from);
  2033. }
  2034. void EmptyMap::CopyFrom(const EmptyMap& from) {
  2035. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.EmptyMap)
  2036. if (&from == this) return;
  2037. Clear();
  2038. MergeFrom(from);
  2039. }
  2040. bool EmptyMap::IsInitialized() const {
  2041. return true;
  2042. }
  2043. void EmptyMap::Swap(EmptyMap* other) {
  2044. if (other == this) return;
  2045. InternalSwap(other);
  2046. }
  2047. void EmptyMap::InternalSwap(EmptyMap* other) {
  2048. using std::swap;
  2049. map_.Swap(&other->map_);
  2050. _internal_metadata_.Swap(&other->_internal_metadata_);
  2051. }
  2052. ::google::protobuf::Metadata EmptyMap::GetMetadata() const {
  2053. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  2054. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  2055. }
  2056. // ===================================================================
  2057. StringtoInt_MapEntry_DoNotUse::StringtoInt_MapEntry_DoNotUse() {}
  2058. StringtoInt_MapEntry_DoNotUse::StringtoInt_MapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2059. void StringtoInt_MapEntry_DoNotUse::MergeFrom(const StringtoInt_MapEntry_DoNotUse& other) {
  2060. MergeFromInternal(other);
  2061. }
  2062. ::google::protobuf::Metadata StringtoInt_MapEntry_DoNotUse::GetMetadata() const {
  2063. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  2064. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[3];
  2065. }
  2066. void StringtoInt_MapEntry_DoNotUse::MergeFrom(
  2067. const ::google::protobuf::Message& other) {
  2068. ::google::protobuf::Message::MergeFrom(other);
  2069. }
  2070. // ===================================================================
  2071. void StringtoInt::InitAsDefaultInstance() {
  2072. }
  2073. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2074. const int StringtoInt::kMapFieldNumber;
  2075. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2076. StringtoInt::StringtoInt()
  2077. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2078. ::google::protobuf::internal::InitSCC(
  2079. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_StringtoInt.base);
  2080. SharedCtor();
  2081. // @@protoc_insertion_point(constructor:google.protobuf.testing.StringtoInt)
  2082. }
  2083. StringtoInt::StringtoInt(const StringtoInt& from)
  2084. : ::google::protobuf::Message(),
  2085. _internal_metadata_(NULL) {
  2086. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2087. map_.MergeFrom(from.map_);
  2088. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.StringtoInt)
  2089. }
  2090. void StringtoInt::SharedCtor() {
  2091. }
  2092. StringtoInt::~StringtoInt() {
  2093. // @@protoc_insertion_point(destructor:google.protobuf.testing.StringtoInt)
  2094. SharedDtor();
  2095. }
  2096. void StringtoInt::SharedDtor() {
  2097. }
  2098. void StringtoInt::SetCachedSize(int size) const {
  2099. _cached_size_.Set(size);
  2100. }
  2101. const ::google::protobuf::Descriptor* StringtoInt::descriptor() {
  2102. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  2103. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2104. }
  2105. const StringtoInt& StringtoInt::default_instance() {
  2106. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_StringtoInt.base);
  2107. return *internal_default_instance();
  2108. }
  2109. void StringtoInt::Clear() {
  2110. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.StringtoInt)
  2111. ::google::protobuf::uint32 cached_has_bits = 0;
  2112. // Prevent compiler warnings about cached_has_bits being unused
  2113. (void) cached_has_bits;
  2114. map_.Clear();
  2115. _internal_metadata_.Clear();
  2116. }
  2117. bool StringtoInt::MergePartialFromCodedStream(
  2118. ::google::protobuf::io::CodedInputStream* input) {
  2119. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2120. ::google::protobuf::uint32 tag;
  2121. // @@protoc_insertion_point(parse_start:google.protobuf.testing.StringtoInt)
  2122. for (;;) {
  2123. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2124. tag = p.first;
  2125. if (!p.second) goto handle_unusual;
  2126. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2127. // map<string, int32> map = 1;
  2128. case 1: {
  2129. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2130. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2131. StringtoInt_MapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  2132. StringtoInt_MapEntry_DoNotUse,
  2133. ::std::string, ::google::protobuf::int32,
  2134. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  2135. ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
  2136. 0 >,
  2137. ::google::protobuf::Map< ::std::string, ::google::protobuf::int32 > > parser(&map_);
  2138. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  2139. input, &parser));
  2140. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2141. parser.key().data(), static_cast<int>(parser.key().length()),
  2142. ::google::protobuf::internal::WireFormatLite::PARSE,
  2143. "google.protobuf.testing.StringtoInt.MapEntry.key"));
  2144. } else {
  2145. goto handle_unusual;
  2146. }
  2147. break;
  2148. }
  2149. default: {
  2150. handle_unusual:
  2151. if (tag == 0) {
  2152. goto success;
  2153. }
  2154. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2155. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2156. break;
  2157. }
  2158. }
  2159. }
  2160. success:
  2161. // @@protoc_insertion_point(parse_success:google.protobuf.testing.StringtoInt)
  2162. return true;
  2163. failure:
  2164. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.StringtoInt)
  2165. return false;
  2166. #undef DO_
  2167. }
  2168. void StringtoInt::SerializeWithCachedSizes(
  2169. ::google::protobuf::io::CodedOutputStream* output) const {
  2170. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.StringtoInt)
  2171. ::google::protobuf::uint32 cached_has_bits = 0;
  2172. (void) cached_has_bits;
  2173. // map<string, int32> map = 1;
  2174. if (!this->map().empty()) {
  2175. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::const_pointer
  2176. ConstPtr;
  2177. typedef ConstPtr SortItem;
  2178. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  2179. struct Utf8Check {
  2180. static void Check(ConstPtr p) {
  2181. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2182. p->first.data(), static_cast<int>(p->first.length()),
  2183. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2184. "google.protobuf.testing.StringtoInt.MapEntry.key");
  2185. }
  2186. };
  2187. if (output->IsSerializationDeterministic() &&
  2188. this->map().size() > 1) {
  2189. ::std::unique_ptr<SortItem[]> items(
  2190. new SortItem[this->map().size()]);
  2191. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::size_type size_type;
  2192. size_type n = 0;
  2193. for (::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::const_iterator
  2194. it = this->map().begin();
  2195. it != this->map().end(); ++it, ++n) {
  2196. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  2197. }
  2198. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  2199. ::std::unique_ptr<StringtoInt_MapEntry_DoNotUse> entry;
  2200. for (size_type i = 0; i < n; i++) {
  2201. entry.reset(map_.NewEntryWrapper(
  2202. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  2203. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2204. 1, *entry, output);
  2205. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  2206. }
  2207. } else {
  2208. ::std::unique_ptr<StringtoInt_MapEntry_DoNotUse> entry;
  2209. for (::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::const_iterator
  2210. it = this->map().begin();
  2211. it != this->map().end(); ++it) {
  2212. entry.reset(map_.NewEntryWrapper(
  2213. it->first, it->second));
  2214. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2215. 1, *entry, output);
  2216. Utf8Check::Check(&*it);
  2217. }
  2218. }
  2219. }
  2220. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2221. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2222. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2223. }
  2224. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.StringtoInt)
  2225. }
  2226. ::google::protobuf::uint8* StringtoInt::InternalSerializeWithCachedSizesToArray(
  2227. bool deterministic, ::google::protobuf::uint8* target) const {
  2228. (void)deterministic; // Unused
  2229. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.StringtoInt)
  2230. ::google::protobuf::uint32 cached_has_bits = 0;
  2231. (void) cached_has_bits;
  2232. // map<string, int32> map = 1;
  2233. if (!this->map().empty()) {
  2234. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::const_pointer
  2235. ConstPtr;
  2236. typedef ConstPtr SortItem;
  2237. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  2238. struct Utf8Check {
  2239. static void Check(ConstPtr p) {
  2240. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2241. p->first.data(), static_cast<int>(p->first.length()),
  2242. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2243. "google.protobuf.testing.StringtoInt.MapEntry.key");
  2244. }
  2245. };
  2246. if (deterministic &&
  2247. this->map().size() > 1) {
  2248. ::std::unique_ptr<SortItem[]> items(
  2249. new SortItem[this->map().size()]);
  2250. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::size_type size_type;
  2251. size_type n = 0;
  2252. for (::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::const_iterator
  2253. it = this->map().begin();
  2254. it != this->map().end(); ++it, ++n) {
  2255. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  2256. }
  2257. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  2258. ::std::unique_ptr<StringtoInt_MapEntry_DoNotUse> entry;
  2259. for (size_type i = 0; i < n; i++) {
  2260. entry.reset(map_.NewEntryWrapper(
  2261. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  2262. target = ::google::protobuf::internal::WireFormatLite::
  2263. InternalWriteMessageNoVirtualToArray(
  2264. 1, *entry, deterministic, target);
  2265. ;
  2266. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  2267. }
  2268. } else {
  2269. ::std::unique_ptr<StringtoInt_MapEntry_DoNotUse> entry;
  2270. for (::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::const_iterator
  2271. it = this->map().begin();
  2272. it != this->map().end(); ++it) {
  2273. entry.reset(map_.NewEntryWrapper(
  2274. it->first, it->second));
  2275. target = ::google::protobuf::internal::WireFormatLite::
  2276. InternalWriteMessageNoVirtualToArray(
  2277. 1, *entry, deterministic, target);
  2278. ;
  2279. Utf8Check::Check(&*it);
  2280. }
  2281. }
  2282. }
  2283. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2284. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2285. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2286. }
  2287. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.StringtoInt)
  2288. return target;
  2289. }
  2290. size_t StringtoInt::ByteSizeLong() const {
  2291. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.StringtoInt)
  2292. size_t total_size = 0;
  2293. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2294. total_size +=
  2295. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2296. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2297. }
  2298. // map<string, int32> map = 1;
  2299. total_size += 1 *
  2300. ::google::protobuf::internal::FromIntSize(this->map_size());
  2301. {
  2302. ::std::unique_ptr<StringtoInt_MapEntry_DoNotUse> entry;
  2303. for (::google::protobuf::Map< ::std::string, ::google::protobuf::int32 >::const_iterator
  2304. it = this->map().begin();
  2305. it != this->map().end(); ++it) {
  2306. entry.reset(map_.NewEntryWrapper(it->first, it->second));
  2307. total_size += ::google::protobuf::internal::WireFormatLite::
  2308. MessageSizeNoVirtual(*entry);
  2309. }
  2310. }
  2311. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2312. SetCachedSize(cached_size);
  2313. return total_size;
  2314. }
  2315. void StringtoInt::MergeFrom(const ::google::protobuf::Message& from) {
  2316. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.StringtoInt)
  2317. GOOGLE_DCHECK_NE(&from, this);
  2318. const StringtoInt* source =
  2319. ::google::protobuf::internal::DynamicCastToGenerated<const StringtoInt>(
  2320. &from);
  2321. if (source == NULL) {
  2322. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.StringtoInt)
  2323. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2324. } else {
  2325. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.StringtoInt)
  2326. MergeFrom(*source);
  2327. }
  2328. }
  2329. void StringtoInt::MergeFrom(const StringtoInt& from) {
  2330. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.StringtoInt)
  2331. GOOGLE_DCHECK_NE(&from, this);
  2332. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2333. ::google::protobuf::uint32 cached_has_bits = 0;
  2334. (void) cached_has_bits;
  2335. map_.MergeFrom(from.map_);
  2336. }
  2337. void StringtoInt::CopyFrom(const ::google::protobuf::Message& from) {
  2338. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.StringtoInt)
  2339. if (&from == this) return;
  2340. Clear();
  2341. MergeFrom(from);
  2342. }
  2343. void StringtoInt::CopyFrom(const StringtoInt& from) {
  2344. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.StringtoInt)
  2345. if (&from == this) return;
  2346. Clear();
  2347. MergeFrom(from);
  2348. }
  2349. bool StringtoInt::IsInitialized() const {
  2350. return true;
  2351. }
  2352. void StringtoInt::Swap(StringtoInt* other) {
  2353. if (other == this) return;
  2354. InternalSwap(other);
  2355. }
  2356. void StringtoInt::InternalSwap(StringtoInt* other) {
  2357. using std::swap;
  2358. map_.Swap(&other->map_);
  2359. _internal_metadata_.Swap(&other->_internal_metadata_);
  2360. }
  2361. ::google::protobuf::Metadata StringtoInt::GetMetadata() const {
  2362. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  2363. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  2364. }
  2365. // ===================================================================
  2366. IntToString_MapEntry_DoNotUse::IntToString_MapEntry_DoNotUse() {}
  2367. IntToString_MapEntry_DoNotUse::IntToString_MapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2368. void IntToString_MapEntry_DoNotUse::MergeFrom(const IntToString_MapEntry_DoNotUse& other) {
  2369. MergeFromInternal(other);
  2370. }
  2371. ::google::protobuf::Metadata IntToString_MapEntry_DoNotUse::GetMetadata() const {
  2372. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  2373. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[5];
  2374. }
  2375. void IntToString_MapEntry_DoNotUse::MergeFrom(
  2376. const ::google::protobuf::Message& other) {
  2377. ::google::protobuf::Message::MergeFrom(other);
  2378. }
  2379. // ===================================================================
  2380. void IntToString::InitAsDefaultInstance() {
  2381. }
  2382. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2383. const int IntToString::kMapFieldNumber;
  2384. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2385. IntToString::IntToString()
  2386. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2387. ::google::protobuf::internal::InitSCC(
  2388. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_IntToString.base);
  2389. SharedCtor();
  2390. // @@protoc_insertion_point(constructor:google.protobuf.testing.IntToString)
  2391. }
  2392. IntToString::IntToString(const IntToString& from)
  2393. : ::google::protobuf::Message(),
  2394. _internal_metadata_(NULL) {
  2395. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2396. map_.MergeFrom(from.map_);
  2397. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.IntToString)
  2398. }
  2399. void IntToString::SharedCtor() {
  2400. }
  2401. IntToString::~IntToString() {
  2402. // @@protoc_insertion_point(destructor:google.protobuf.testing.IntToString)
  2403. SharedDtor();
  2404. }
  2405. void IntToString::SharedDtor() {
  2406. }
  2407. void IntToString::SetCachedSize(int size) const {
  2408. _cached_size_.Set(size);
  2409. }
  2410. const ::google::protobuf::Descriptor* IntToString::descriptor() {
  2411. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  2412. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2413. }
  2414. const IntToString& IntToString::default_instance() {
  2415. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_IntToString.base);
  2416. return *internal_default_instance();
  2417. }
  2418. void IntToString::Clear() {
  2419. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.IntToString)
  2420. ::google::protobuf::uint32 cached_has_bits = 0;
  2421. // Prevent compiler warnings about cached_has_bits being unused
  2422. (void) cached_has_bits;
  2423. map_.Clear();
  2424. _internal_metadata_.Clear();
  2425. }
  2426. bool IntToString::MergePartialFromCodedStream(
  2427. ::google::protobuf::io::CodedInputStream* input) {
  2428. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2429. ::google::protobuf::uint32 tag;
  2430. // @@protoc_insertion_point(parse_start:google.protobuf.testing.IntToString)
  2431. for (;;) {
  2432. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2433. tag = p.first;
  2434. if (!p.second) goto handle_unusual;
  2435. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2436. // map<int32, string> map = 1;
  2437. case 1: {
  2438. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2439. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2440. IntToString_MapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  2441. IntToString_MapEntry_DoNotUse,
  2442. ::google::protobuf::int32, ::std::string,
  2443. ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
  2444. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  2445. 0 >,
  2446. ::google::protobuf::Map< ::google::protobuf::int32, ::std::string > > parser(&map_);
  2447. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  2448. input, &parser));
  2449. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2450. parser.value().data(), static_cast<int>(parser.value().length()),
  2451. ::google::protobuf::internal::WireFormatLite::PARSE,
  2452. "google.protobuf.testing.IntToString.MapEntry.value"));
  2453. } else {
  2454. goto handle_unusual;
  2455. }
  2456. break;
  2457. }
  2458. default: {
  2459. handle_unusual:
  2460. if (tag == 0) {
  2461. goto success;
  2462. }
  2463. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2464. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2465. break;
  2466. }
  2467. }
  2468. }
  2469. success:
  2470. // @@protoc_insertion_point(parse_success:google.protobuf.testing.IntToString)
  2471. return true;
  2472. failure:
  2473. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.IntToString)
  2474. return false;
  2475. #undef DO_
  2476. }
  2477. void IntToString::SerializeWithCachedSizes(
  2478. ::google::protobuf::io::CodedOutputStream* output) const {
  2479. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.IntToString)
  2480. ::google::protobuf::uint32 cached_has_bits = 0;
  2481. (void) cached_has_bits;
  2482. // map<int32, string> map = 1;
  2483. if (!this->map().empty()) {
  2484. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_pointer
  2485. ConstPtr;
  2486. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  2487. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  2488. struct Utf8Check {
  2489. static void Check(ConstPtr p) {
  2490. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2491. p->second.data(), static_cast<int>(p->second.length()),
  2492. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2493. "google.protobuf.testing.IntToString.MapEntry.value");
  2494. }
  2495. };
  2496. if (output->IsSerializationDeterministic() &&
  2497. this->map().size() > 1) {
  2498. ::std::unique_ptr<SortItem[]> items(
  2499. new SortItem[this->map().size()]);
  2500. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::size_type size_type;
  2501. size_type n = 0;
  2502. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  2503. it = this->map().begin();
  2504. it != this->map().end(); ++it, ++n) {
  2505. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  2506. }
  2507. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  2508. ::std::unique_ptr<IntToString_MapEntry_DoNotUse> entry;
  2509. for (size_type i = 0; i < n; i++) {
  2510. entry.reset(map_.NewEntryWrapper(
  2511. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  2512. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2513. 1, *entry, output);
  2514. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)].second);
  2515. }
  2516. } else {
  2517. ::std::unique_ptr<IntToString_MapEntry_DoNotUse> entry;
  2518. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  2519. it = this->map().begin();
  2520. it != this->map().end(); ++it) {
  2521. entry.reset(map_.NewEntryWrapper(
  2522. it->first, it->second));
  2523. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2524. 1, *entry, output);
  2525. Utf8Check::Check(&*it);
  2526. }
  2527. }
  2528. }
  2529. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2530. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2531. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2532. }
  2533. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.IntToString)
  2534. }
  2535. ::google::protobuf::uint8* IntToString::InternalSerializeWithCachedSizesToArray(
  2536. bool deterministic, ::google::protobuf::uint8* target) const {
  2537. (void)deterministic; // Unused
  2538. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.IntToString)
  2539. ::google::protobuf::uint32 cached_has_bits = 0;
  2540. (void) cached_has_bits;
  2541. // map<int32, string> map = 1;
  2542. if (!this->map().empty()) {
  2543. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_pointer
  2544. ConstPtr;
  2545. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  2546. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  2547. struct Utf8Check {
  2548. static void Check(ConstPtr p) {
  2549. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2550. p->second.data(), static_cast<int>(p->second.length()),
  2551. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2552. "google.protobuf.testing.IntToString.MapEntry.value");
  2553. }
  2554. };
  2555. if (deterministic &&
  2556. this->map().size() > 1) {
  2557. ::std::unique_ptr<SortItem[]> items(
  2558. new SortItem[this->map().size()]);
  2559. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::size_type size_type;
  2560. size_type n = 0;
  2561. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  2562. it = this->map().begin();
  2563. it != this->map().end(); ++it, ++n) {
  2564. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  2565. }
  2566. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  2567. ::std::unique_ptr<IntToString_MapEntry_DoNotUse> entry;
  2568. for (size_type i = 0; i < n; i++) {
  2569. entry.reset(map_.NewEntryWrapper(
  2570. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  2571. target = ::google::protobuf::internal::WireFormatLite::
  2572. InternalWriteMessageNoVirtualToArray(
  2573. 1, *entry, deterministic, target);
  2574. ;
  2575. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)].second);
  2576. }
  2577. } else {
  2578. ::std::unique_ptr<IntToString_MapEntry_DoNotUse> entry;
  2579. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  2580. it = this->map().begin();
  2581. it != this->map().end(); ++it) {
  2582. entry.reset(map_.NewEntryWrapper(
  2583. it->first, it->second));
  2584. target = ::google::protobuf::internal::WireFormatLite::
  2585. InternalWriteMessageNoVirtualToArray(
  2586. 1, *entry, deterministic, target);
  2587. ;
  2588. Utf8Check::Check(&*it);
  2589. }
  2590. }
  2591. }
  2592. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2593. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2594. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2595. }
  2596. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.IntToString)
  2597. return target;
  2598. }
  2599. size_t IntToString::ByteSizeLong() const {
  2600. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.IntToString)
  2601. size_t total_size = 0;
  2602. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2603. total_size +=
  2604. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2605. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2606. }
  2607. // map<int32, string> map = 1;
  2608. total_size += 1 *
  2609. ::google::protobuf::internal::FromIntSize(this->map_size());
  2610. {
  2611. ::std::unique_ptr<IntToString_MapEntry_DoNotUse> entry;
  2612. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  2613. it = this->map().begin();
  2614. it != this->map().end(); ++it) {
  2615. entry.reset(map_.NewEntryWrapper(it->first, it->second));
  2616. total_size += ::google::protobuf::internal::WireFormatLite::
  2617. MessageSizeNoVirtual(*entry);
  2618. }
  2619. }
  2620. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2621. SetCachedSize(cached_size);
  2622. return total_size;
  2623. }
  2624. void IntToString::MergeFrom(const ::google::protobuf::Message& from) {
  2625. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.IntToString)
  2626. GOOGLE_DCHECK_NE(&from, this);
  2627. const IntToString* source =
  2628. ::google::protobuf::internal::DynamicCastToGenerated<const IntToString>(
  2629. &from);
  2630. if (source == NULL) {
  2631. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.IntToString)
  2632. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2633. } else {
  2634. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.IntToString)
  2635. MergeFrom(*source);
  2636. }
  2637. }
  2638. void IntToString::MergeFrom(const IntToString& from) {
  2639. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.IntToString)
  2640. GOOGLE_DCHECK_NE(&from, this);
  2641. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2642. ::google::protobuf::uint32 cached_has_bits = 0;
  2643. (void) cached_has_bits;
  2644. map_.MergeFrom(from.map_);
  2645. }
  2646. void IntToString::CopyFrom(const ::google::protobuf::Message& from) {
  2647. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.IntToString)
  2648. if (&from == this) return;
  2649. Clear();
  2650. MergeFrom(from);
  2651. }
  2652. void IntToString::CopyFrom(const IntToString& from) {
  2653. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.IntToString)
  2654. if (&from == this) return;
  2655. Clear();
  2656. MergeFrom(from);
  2657. }
  2658. bool IntToString::IsInitialized() const {
  2659. return true;
  2660. }
  2661. void IntToString::Swap(IntToString* other) {
  2662. if (other == this) return;
  2663. InternalSwap(other);
  2664. }
  2665. void IntToString::InternalSwap(IntToString* other) {
  2666. using std::swap;
  2667. map_.Swap(&other->map_);
  2668. _internal_metadata_.Swap(&other->_internal_metadata_);
  2669. }
  2670. ::google::protobuf::Metadata IntToString::GetMetadata() const {
  2671. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  2672. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  2673. }
  2674. // ===================================================================
  2675. BoolToString_MapEntry_DoNotUse::BoolToString_MapEntry_DoNotUse() {}
  2676. BoolToString_MapEntry_DoNotUse::BoolToString_MapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2677. void BoolToString_MapEntry_DoNotUse::MergeFrom(const BoolToString_MapEntry_DoNotUse& other) {
  2678. MergeFromInternal(other);
  2679. }
  2680. ::google::protobuf::Metadata BoolToString_MapEntry_DoNotUse::GetMetadata() const {
  2681. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  2682. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[7];
  2683. }
  2684. void BoolToString_MapEntry_DoNotUse::MergeFrom(
  2685. const ::google::protobuf::Message& other) {
  2686. ::google::protobuf::Message::MergeFrom(other);
  2687. }
  2688. // ===================================================================
  2689. void BoolToString::InitAsDefaultInstance() {
  2690. }
  2691. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2692. const int BoolToString::kMapFieldNumber;
  2693. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2694. BoolToString::BoolToString()
  2695. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2696. ::google::protobuf::internal::InitSCC(
  2697. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_BoolToString.base);
  2698. SharedCtor();
  2699. // @@protoc_insertion_point(constructor:google.protobuf.testing.BoolToString)
  2700. }
  2701. BoolToString::BoolToString(const BoolToString& from)
  2702. : ::google::protobuf::Message(),
  2703. _internal_metadata_(NULL) {
  2704. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2705. map_.MergeFrom(from.map_);
  2706. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.BoolToString)
  2707. }
  2708. void BoolToString::SharedCtor() {
  2709. }
  2710. BoolToString::~BoolToString() {
  2711. // @@protoc_insertion_point(destructor:google.protobuf.testing.BoolToString)
  2712. SharedDtor();
  2713. }
  2714. void BoolToString::SharedDtor() {
  2715. }
  2716. void BoolToString::SetCachedSize(int size) const {
  2717. _cached_size_.Set(size);
  2718. }
  2719. const ::google::protobuf::Descriptor* BoolToString::descriptor() {
  2720. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  2721. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2722. }
  2723. const BoolToString& BoolToString::default_instance() {
  2724. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_BoolToString.base);
  2725. return *internal_default_instance();
  2726. }
  2727. void BoolToString::Clear() {
  2728. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.BoolToString)
  2729. ::google::protobuf::uint32 cached_has_bits = 0;
  2730. // Prevent compiler warnings about cached_has_bits being unused
  2731. (void) cached_has_bits;
  2732. map_.Clear();
  2733. _internal_metadata_.Clear();
  2734. }
  2735. bool BoolToString::MergePartialFromCodedStream(
  2736. ::google::protobuf::io::CodedInputStream* input) {
  2737. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2738. ::google::protobuf::uint32 tag;
  2739. // @@protoc_insertion_point(parse_start:google.protobuf.testing.BoolToString)
  2740. for (;;) {
  2741. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2742. tag = p.first;
  2743. if (!p.second) goto handle_unusual;
  2744. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2745. // map<bool, string> map = 1;
  2746. case 1: {
  2747. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2748. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2749. BoolToString_MapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  2750. BoolToString_MapEntry_DoNotUse,
  2751. bool, ::std::string,
  2752. ::google::protobuf::internal::WireFormatLite::TYPE_BOOL,
  2753. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  2754. 0 >,
  2755. ::google::protobuf::Map< bool, ::std::string > > parser(&map_);
  2756. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  2757. input, &parser));
  2758. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2759. parser.value().data(), static_cast<int>(parser.value().length()),
  2760. ::google::protobuf::internal::WireFormatLite::PARSE,
  2761. "google.protobuf.testing.BoolToString.MapEntry.value"));
  2762. } else {
  2763. goto handle_unusual;
  2764. }
  2765. break;
  2766. }
  2767. default: {
  2768. handle_unusual:
  2769. if (tag == 0) {
  2770. goto success;
  2771. }
  2772. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2773. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2774. break;
  2775. }
  2776. }
  2777. }
  2778. success:
  2779. // @@protoc_insertion_point(parse_success:google.protobuf.testing.BoolToString)
  2780. return true;
  2781. failure:
  2782. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.BoolToString)
  2783. return false;
  2784. #undef DO_
  2785. }
  2786. void BoolToString::SerializeWithCachedSizes(
  2787. ::google::protobuf::io::CodedOutputStream* output) const {
  2788. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.BoolToString)
  2789. ::google::protobuf::uint32 cached_has_bits = 0;
  2790. (void) cached_has_bits;
  2791. // map<bool, string> map = 1;
  2792. if (!this->map().empty()) {
  2793. typedef ::google::protobuf::Map< bool, ::std::string >::const_pointer
  2794. ConstPtr;
  2795. typedef ::google::protobuf::internal::SortItem< bool, ConstPtr > SortItem;
  2796. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  2797. struct Utf8Check {
  2798. static void Check(ConstPtr p) {
  2799. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2800. p->second.data(), static_cast<int>(p->second.length()),
  2801. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2802. "google.protobuf.testing.BoolToString.MapEntry.value");
  2803. }
  2804. };
  2805. if (output->IsSerializationDeterministic() &&
  2806. this->map().size() > 1) {
  2807. ::std::unique_ptr<SortItem[]> items(
  2808. new SortItem[this->map().size()]);
  2809. typedef ::google::protobuf::Map< bool, ::std::string >::size_type size_type;
  2810. size_type n = 0;
  2811. for (::google::protobuf::Map< bool, ::std::string >::const_iterator
  2812. it = this->map().begin();
  2813. it != this->map().end(); ++it, ++n) {
  2814. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  2815. }
  2816. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  2817. ::std::unique_ptr<BoolToString_MapEntry_DoNotUse> entry;
  2818. for (size_type i = 0; i < n; i++) {
  2819. entry.reset(map_.NewEntryWrapper(
  2820. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  2821. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2822. 1, *entry, output);
  2823. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)].second);
  2824. }
  2825. } else {
  2826. ::std::unique_ptr<BoolToString_MapEntry_DoNotUse> entry;
  2827. for (::google::protobuf::Map< bool, ::std::string >::const_iterator
  2828. it = this->map().begin();
  2829. it != this->map().end(); ++it) {
  2830. entry.reset(map_.NewEntryWrapper(
  2831. it->first, it->second));
  2832. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2833. 1, *entry, output);
  2834. Utf8Check::Check(&*it);
  2835. }
  2836. }
  2837. }
  2838. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2839. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2840. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2841. }
  2842. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.BoolToString)
  2843. }
  2844. ::google::protobuf::uint8* BoolToString::InternalSerializeWithCachedSizesToArray(
  2845. bool deterministic, ::google::protobuf::uint8* target) const {
  2846. (void)deterministic; // Unused
  2847. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.BoolToString)
  2848. ::google::protobuf::uint32 cached_has_bits = 0;
  2849. (void) cached_has_bits;
  2850. // map<bool, string> map = 1;
  2851. if (!this->map().empty()) {
  2852. typedef ::google::protobuf::Map< bool, ::std::string >::const_pointer
  2853. ConstPtr;
  2854. typedef ::google::protobuf::internal::SortItem< bool, ConstPtr > SortItem;
  2855. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  2856. struct Utf8Check {
  2857. static void Check(ConstPtr p) {
  2858. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2859. p->second.data(), static_cast<int>(p->second.length()),
  2860. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2861. "google.protobuf.testing.BoolToString.MapEntry.value");
  2862. }
  2863. };
  2864. if (deterministic &&
  2865. this->map().size() > 1) {
  2866. ::std::unique_ptr<SortItem[]> items(
  2867. new SortItem[this->map().size()]);
  2868. typedef ::google::protobuf::Map< bool, ::std::string >::size_type size_type;
  2869. size_type n = 0;
  2870. for (::google::protobuf::Map< bool, ::std::string >::const_iterator
  2871. it = this->map().begin();
  2872. it != this->map().end(); ++it, ++n) {
  2873. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  2874. }
  2875. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  2876. ::std::unique_ptr<BoolToString_MapEntry_DoNotUse> entry;
  2877. for (size_type i = 0; i < n; i++) {
  2878. entry.reset(map_.NewEntryWrapper(
  2879. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  2880. target = ::google::protobuf::internal::WireFormatLite::
  2881. InternalWriteMessageNoVirtualToArray(
  2882. 1, *entry, deterministic, target);
  2883. ;
  2884. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)].second);
  2885. }
  2886. } else {
  2887. ::std::unique_ptr<BoolToString_MapEntry_DoNotUse> entry;
  2888. for (::google::protobuf::Map< bool, ::std::string >::const_iterator
  2889. it = this->map().begin();
  2890. it != this->map().end(); ++it) {
  2891. entry.reset(map_.NewEntryWrapper(
  2892. it->first, it->second));
  2893. target = ::google::protobuf::internal::WireFormatLite::
  2894. InternalWriteMessageNoVirtualToArray(
  2895. 1, *entry, deterministic, target);
  2896. ;
  2897. Utf8Check::Check(&*it);
  2898. }
  2899. }
  2900. }
  2901. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2902. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2903. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2904. }
  2905. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.BoolToString)
  2906. return target;
  2907. }
  2908. size_t BoolToString::ByteSizeLong() const {
  2909. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.BoolToString)
  2910. size_t total_size = 0;
  2911. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2912. total_size +=
  2913. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2914. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2915. }
  2916. // map<bool, string> map = 1;
  2917. total_size += 1 *
  2918. ::google::protobuf::internal::FromIntSize(this->map_size());
  2919. {
  2920. ::std::unique_ptr<BoolToString_MapEntry_DoNotUse> entry;
  2921. for (::google::protobuf::Map< bool, ::std::string >::const_iterator
  2922. it = this->map().begin();
  2923. it != this->map().end(); ++it) {
  2924. entry.reset(map_.NewEntryWrapper(it->first, it->second));
  2925. total_size += ::google::protobuf::internal::WireFormatLite::
  2926. MessageSizeNoVirtual(*entry);
  2927. }
  2928. }
  2929. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2930. SetCachedSize(cached_size);
  2931. return total_size;
  2932. }
  2933. void BoolToString::MergeFrom(const ::google::protobuf::Message& from) {
  2934. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.BoolToString)
  2935. GOOGLE_DCHECK_NE(&from, this);
  2936. const BoolToString* source =
  2937. ::google::protobuf::internal::DynamicCastToGenerated<const BoolToString>(
  2938. &from);
  2939. if (source == NULL) {
  2940. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.BoolToString)
  2941. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2942. } else {
  2943. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.BoolToString)
  2944. MergeFrom(*source);
  2945. }
  2946. }
  2947. void BoolToString::MergeFrom(const BoolToString& from) {
  2948. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.BoolToString)
  2949. GOOGLE_DCHECK_NE(&from, this);
  2950. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2951. ::google::protobuf::uint32 cached_has_bits = 0;
  2952. (void) cached_has_bits;
  2953. map_.MergeFrom(from.map_);
  2954. }
  2955. void BoolToString::CopyFrom(const ::google::protobuf::Message& from) {
  2956. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.BoolToString)
  2957. if (&from == this) return;
  2958. Clear();
  2959. MergeFrom(from);
  2960. }
  2961. void BoolToString::CopyFrom(const BoolToString& from) {
  2962. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.BoolToString)
  2963. if (&from == this) return;
  2964. Clear();
  2965. MergeFrom(from);
  2966. }
  2967. bool BoolToString::IsInitialized() const {
  2968. return true;
  2969. }
  2970. void BoolToString::Swap(BoolToString* other) {
  2971. if (other == this) return;
  2972. InternalSwap(other);
  2973. }
  2974. void BoolToString::InternalSwap(BoolToString* other) {
  2975. using std::swap;
  2976. map_.Swap(&other->map_);
  2977. _internal_metadata_.Swap(&other->_internal_metadata_);
  2978. }
  2979. ::google::protobuf::Metadata BoolToString::GetMetadata() const {
  2980. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  2981. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  2982. }
  2983. // ===================================================================
  2984. Mixed1_MapEntry_DoNotUse::Mixed1_MapEntry_DoNotUse() {}
  2985. Mixed1_MapEntry_DoNotUse::Mixed1_MapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2986. void Mixed1_MapEntry_DoNotUse::MergeFrom(const Mixed1_MapEntry_DoNotUse& other) {
  2987. MergeFromInternal(other);
  2988. }
  2989. ::google::protobuf::Metadata Mixed1_MapEntry_DoNotUse::GetMetadata() const {
  2990. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  2991. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[9];
  2992. }
  2993. void Mixed1_MapEntry_DoNotUse::MergeFrom(
  2994. const ::google::protobuf::Message& other) {
  2995. ::google::protobuf::Message::MergeFrom(other);
  2996. }
  2997. // ===================================================================
  2998. void Mixed1::InitAsDefaultInstance() {
  2999. }
  3000. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3001. const int Mixed1::kMsgFieldNumber;
  3002. const int Mixed1::kMapFieldNumber;
  3003. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3004. Mixed1::Mixed1()
  3005. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3006. ::google::protobuf::internal::InitSCC(
  3007. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_Mixed1.base);
  3008. SharedCtor();
  3009. // @@protoc_insertion_point(constructor:google.protobuf.testing.Mixed1)
  3010. }
  3011. Mixed1::Mixed1(const Mixed1& from)
  3012. : ::google::protobuf::Message(),
  3013. _internal_metadata_(NULL) {
  3014. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3015. map_.MergeFrom(from.map_);
  3016. msg_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3017. if (from.msg().size() > 0) {
  3018. msg_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.msg_);
  3019. }
  3020. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.Mixed1)
  3021. }
  3022. void Mixed1::SharedCtor() {
  3023. msg_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3024. }
  3025. Mixed1::~Mixed1() {
  3026. // @@protoc_insertion_point(destructor:google.protobuf.testing.Mixed1)
  3027. SharedDtor();
  3028. }
  3029. void Mixed1::SharedDtor() {
  3030. msg_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3031. }
  3032. void Mixed1::SetCachedSize(int size) const {
  3033. _cached_size_.Set(size);
  3034. }
  3035. const ::google::protobuf::Descriptor* Mixed1::descriptor() {
  3036. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  3037. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3038. }
  3039. const Mixed1& Mixed1::default_instance() {
  3040. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_Mixed1.base);
  3041. return *internal_default_instance();
  3042. }
  3043. void Mixed1::Clear() {
  3044. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.Mixed1)
  3045. ::google::protobuf::uint32 cached_has_bits = 0;
  3046. // Prevent compiler warnings about cached_has_bits being unused
  3047. (void) cached_has_bits;
  3048. map_.Clear();
  3049. msg_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3050. _internal_metadata_.Clear();
  3051. }
  3052. bool Mixed1::MergePartialFromCodedStream(
  3053. ::google::protobuf::io::CodedInputStream* input) {
  3054. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3055. ::google::protobuf::uint32 tag;
  3056. // @@protoc_insertion_point(parse_start:google.protobuf.testing.Mixed1)
  3057. for (;;) {
  3058. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3059. tag = p.first;
  3060. if (!p.second) goto handle_unusual;
  3061. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3062. // string msg = 1;
  3063. case 1: {
  3064. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3065. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3066. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  3067. input, this->mutable_msg()));
  3068. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3069. this->msg().data(), static_cast<int>(this->msg().length()),
  3070. ::google::protobuf::internal::WireFormatLite::PARSE,
  3071. "google.protobuf.testing.Mixed1.msg"));
  3072. } else {
  3073. goto handle_unusual;
  3074. }
  3075. break;
  3076. }
  3077. // map<string, float> map = 2;
  3078. case 2: {
  3079. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3080. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  3081. Mixed1_MapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  3082. Mixed1_MapEntry_DoNotUse,
  3083. ::std::string, float,
  3084. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  3085. ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT,
  3086. 0 >,
  3087. ::google::protobuf::Map< ::std::string, float > > parser(&map_);
  3088. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  3089. input, &parser));
  3090. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3091. parser.key().data(), static_cast<int>(parser.key().length()),
  3092. ::google::protobuf::internal::WireFormatLite::PARSE,
  3093. "google.protobuf.testing.Mixed1.MapEntry.key"));
  3094. } else {
  3095. goto handle_unusual;
  3096. }
  3097. break;
  3098. }
  3099. default: {
  3100. handle_unusual:
  3101. if (tag == 0) {
  3102. goto success;
  3103. }
  3104. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3105. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3106. break;
  3107. }
  3108. }
  3109. }
  3110. success:
  3111. // @@protoc_insertion_point(parse_success:google.protobuf.testing.Mixed1)
  3112. return true;
  3113. failure:
  3114. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.Mixed1)
  3115. return false;
  3116. #undef DO_
  3117. }
  3118. void Mixed1::SerializeWithCachedSizes(
  3119. ::google::protobuf::io::CodedOutputStream* output) const {
  3120. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.Mixed1)
  3121. ::google::protobuf::uint32 cached_has_bits = 0;
  3122. (void) cached_has_bits;
  3123. // string msg = 1;
  3124. if (this->msg().size() > 0) {
  3125. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3126. this->msg().data(), static_cast<int>(this->msg().length()),
  3127. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3128. "google.protobuf.testing.Mixed1.msg");
  3129. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  3130. 1, this->msg(), output);
  3131. }
  3132. // map<string, float> map = 2;
  3133. if (!this->map().empty()) {
  3134. typedef ::google::protobuf::Map< ::std::string, float >::const_pointer
  3135. ConstPtr;
  3136. typedef ConstPtr SortItem;
  3137. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  3138. struct Utf8Check {
  3139. static void Check(ConstPtr p) {
  3140. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3141. p->first.data(), static_cast<int>(p->first.length()),
  3142. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3143. "google.protobuf.testing.Mixed1.MapEntry.key");
  3144. }
  3145. };
  3146. if (output->IsSerializationDeterministic() &&
  3147. this->map().size() > 1) {
  3148. ::std::unique_ptr<SortItem[]> items(
  3149. new SortItem[this->map().size()]);
  3150. typedef ::google::protobuf::Map< ::std::string, float >::size_type size_type;
  3151. size_type n = 0;
  3152. for (::google::protobuf::Map< ::std::string, float >::const_iterator
  3153. it = this->map().begin();
  3154. it != this->map().end(); ++it, ++n) {
  3155. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3156. }
  3157. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3158. ::std::unique_ptr<Mixed1_MapEntry_DoNotUse> entry;
  3159. for (size_type i = 0; i < n; i++) {
  3160. entry.reset(map_.NewEntryWrapper(
  3161. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  3162. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3163. 2, *entry, output);
  3164. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  3165. }
  3166. } else {
  3167. ::std::unique_ptr<Mixed1_MapEntry_DoNotUse> entry;
  3168. for (::google::protobuf::Map< ::std::string, float >::const_iterator
  3169. it = this->map().begin();
  3170. it != this->map().end(); ++it) {
  3171. entry.reset(map_.NewEntryWrapper(
  3172. it->first, it->second));
  3173. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3174. 2, *entry, output);
  3175. Utf8Check::Check(&*it);
  3176. }
  3177. }
  3178. }
  3179. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3180. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3181. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3182. }
  3183. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.Mixed1)
  3184. }
  3185. ::google::protobuf::uint8* Mixed1::InternalSerializeWithCachedSizesToArray(
  3186. bool deterministic, ::google::protobuf::uint8* target) const {
  3187. (void)deterministic; // Unused
  3188. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.Mixed1)
  3189. ::google::protobuf::uint32 cached_has_bits = 0;
  3190. (void) cached_has_bits;
  3191. // string msg = 1;
  3192. if (this->msg().size() > 0) {
  3193. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3194. this->msg().data(), static_cast<int>(this->msg().length()),
  3195. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3196. "google.protobuf.testing.Mixed1.msg");
  3197. target =
  3198. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  3199. 1, this->msg(), target);
  3200. }
  3201. // map<string, float> map = 2;
  3202. if (!this->map().empty()) {
  3203. typedef ::google::protobuf::Map< ::std::string, float >::const_pointer
  3204. ConstPtr;
  3205. typedef ConstPtr SortItem;
  3206. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  3207. struct Utf8Check {
  3208. static void Check(ConstPtr p) {
  3209. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3210. p->first.data(), static_cast<int>(p->first.length()),
  3211. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3212. "google.protobuf.testing.Mixed1.MapEntry.key");
  3213. }
  3214. };
  3215. if (deterministic &&
  3216. this->map().size() > 1) {
  3217. ::std::unique_ptr<SortItem[]> items(
  3218. new SortItem[this->map().size()]);
  3219. typedef ::google::protobuf::Map< ::std::string, float >::size_type size_type;
  3220. size_type n = 0;
  3221. for (::google::protobuf::Map< ::std::string, float >::const_iterator
  3222. it = this->map().begin();
  3223. it != this->map().end(); ++it, ++n) {
  3224. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3225. }
  3226. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3227. ::std::unique_ptr<Mixed1_MapEntry_DoNotUse> entry;
  3228. for (size_type i = 0; i < n; i++) {
  3229. entry.reset(map_.NewEntryWrapper(
  3230. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  3231. target = ::google::protobuf::internal::WireFormatLite::
  3232. InternalWriteMessageNoVirtualToArray(
  3233. 2, *entry, deterministic, target);
  3234. ;
  3235. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  3236. }
  3237. } else {
  3238. ::std::unique_ptr<Mixed1_MapEntry_DoNotUse> entry;
  3239. for (::google::protobuf::Map< ::std::string, float >::const_iterator
  3240. it = this->map().begin();
  3241. it != this->map().end(); ++it) {
  3242. entry.reset(map_.NewEntryWrapper(
  3243. it->first, it->second));
  3244. target = ::google::protobuf::internal::WireFormatLite::
  3245. InternalWriteMessageNoVirtualToArray(
  3246. 2, *entry, deterministic, target);
  3247. ;
  3248. Utf8Check::Check(&*it);
  3249. }
  3250. }
  3251. }
  3252. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3253. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3254. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3255. }
  3256. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.Mixed1)
  3257. return target;
  3258. }
  3259. size_t Mixed1::ByteSizeLong() const {
  3260. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.Mixed1)
  3261. size_t total_size = 0;
  3262. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3263. total_size +=
  3264. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3265. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3266. }
  3267. // map<string, float> map = 2;
  3268. total_size += 1 *
  3269. ::google::protobuf::internal::FromIntSize(this->map_size());
  3270. {
  3271. ::std::unique_ptr<Mixed1_MapEntry_DoNotUse> entry;
  3272. for (::google::protobuf::Map< ::std::string, float >::const_iterator
  3273. it = this->map().begin();
  3274. it != this->map().end(); ++it) {
  3275. entry.reset(map_.NewEntryWrapper(it->first, it->second));
  3276. total_size += ::google::protobuf::internal::WireFormatLite::
  3277. MessageSizeNoVirtual(*entry);
  3278. }
  3279. }
  3280. // string msg = 1;
  3281. if (this->msg().size() > 0) {
  3282. total_size += 1 +
  3283. ::google::protobuf::internal::WireFormatLite::StringSize(
  3284. this->msg());
  3285. }
  3286. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3287. SetCachedSize(cached_size);
  3288. return total_size;
  3289. }
  3290. void Mixed1::MergeFrom(const ::google::protobuf::Message& from) {
  3291. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.Mixed1)
  3292. GOOGLE_DCHECK_NE(&from, this);
  3293. const Mixed1* source =
  3294. ::google::protobuf::internal::DynamicCastToGenerated<const Mixed1>(
  3295. &from);
  3296. if (source == NULL) {
  3297. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.Mixed1)
  3298. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3299. } else {
  3300. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.Mixed1)
  3301. MergeFrom(*source);
  3302. }
  3303. }
  3304. void Mixed1::MergeFrom(const Mixed1& from) {
  3305. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.Mixed1)
  3306. GOOGLE_DCHECK_NE(&from, this);
  3307. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3308. ::google::protobuf::uint32 cached_has_bits = 0;
  3309. (void) cached_has_bits;
  3310. map_.MergeFrom(from.map_);
  3311. if (from.msg().size() > 0) {
  3312. msg_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.msg_);
  3313. }
  3314. }
  3315. void Mixed1::CopyFrom(const ::google::protobuf::Message& from) {
  3316. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.Mixed1)
  3317. if (&from == this) return;
  3318. Clear();
  3319. MergeFrom(from);
  3320. }
  3321. void Mixed1::CopyFrom(const Mixed1& from) {
  3322. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.Mixed1)
  3323. if (&from == this) return;
  3324. Clear();
  3325. MergeFrom(from);
  3326. }
  3327. bool Mixed1::IsInitialized() const {
  3328. return true;
  3329. }
  3330. void Mixed1::Swap(Mixed1* other) {
  3331. if (other == this) return;
  3332. InternalSwap(other);
  3333. }
  3334. void Mixed1::InternalSwap(Mixed1* other) {
  3335. using std::swap;
  3336. map_.Swap(&other->map_);
  3337. msg_.Swap(&other->msg_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  3338. GetArenaNoVirtual());
  3339. _internal_metadata_.Swap(&other->_internal_metadata_);
  3340. }
  3341. ::google::protobuf::Metadata Mixed1::GetMetadata() const {
  3342. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  3343. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  3344. }
  3345. // ===================================================================
  3346. Mixed2_MapEntry_DoNotUse::Mixed2_MapEntry_DoNotUse() {}
  3347. Mixed2_MapEntry_DoNotUse::Mixed2_MapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  3348. void Mixed2_MapEntry_DoNotUse::MergeFrom(const Mixed2_MapEntry_DoNotUse& other) {
  3349. MergeFromInternal(other);
  3350. }
  3351. ::google::protobuf::Metadata Mixed2_MapEntry_DoNotUse::GetMetadata() const {
  3352. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  3353. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[11];
  3354. }
  3355. void Mixed2_MapEntry_DoNotUse::MergeFrom(
  3356. const ::google::protobuf::Message& other) {
  3357. ::google::protobuf::Message::MergeFrom(other);
  3358. }
  3359. // ===================================================================
  3360. void Mixed2::InitAsDefaultInstance() {
  3361. }
  3362. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3363. const int Mixed2::kMapFieldNumber;
  3364. const int Mixed2::kEeFieldNumber;
  3365. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3366. Mixed2::Mixed2()
  3367. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3368. ::google::protobuf::internal::InitSCC(
  3369. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_Mixed2.base);
  3370. SharedCtor();
  3371. // @@protoc_insertion_point(constructor:google.protobuf.testing.Mixed2)
  3372. }
  3373. Mixed2::Mixed2(const Mixed2& from)
  3374. : ::google::protobuf::Message(),
  3375. _internal_metadata_(NULL) {
  3376. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3377. map_.MergeFrom(from.map_);
  3378. ee_ = from.ee_;
  3379. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.Mixed2)
  3380. }
  3381. void Mixed2::SharedCtor() {
  3382. ee_ = 0;
  3383. }
  3384. Mixed2::~Mixed2() {
  3385. // @@protoc_insertion_point(destructor:google.protobuf.testing.Mixed2)
  3386. SharedDtor();
  3387. }
  3388. void Mixed2::SharedDtor() {
  3389. }
  3390. void Mixed2::SetCachedSize(int size) const {
  3391. _cached_size_.Set(size);
  3392. }
  3393. const ::google::protobuf::Descriptor* Mixed2::descriptor() {
  3394. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  3395. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3396. }
  3397. const Mixed2& Mixed2::default_instance() {
  3398. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_Mixed2.base);
  3399. return *internal_default_instance();
  3400. }
  3401. void Mixed2::Clear() {
  3402. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.Mixed2)
  3403. ::google::protobuf::uint32 cached_has_bits = 0;
  3404. // Prevent compiler warnings about cached_has_bits being unused
  3405. (void) cached_has_bits;
  3406. map_.Clear();
  3407. ee_ = 0;
  3408. _internal_metadata_.Clear();
  3409. }
  3410. bool Mixed2::MergePartialFromCodedStream(
  3411. ::google::protobuf::io::CodedInputStream* input) {
  3412. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3413. ::google::protobuf::uint32 tag;
  3414. // @@protoc_insertion_point(parse_start:google.protobuf.testing.Mixed2)
  3415. for (;;) {
  3416. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3417. tag = p.first;
  3418. if (!p.second) goto handle_unusual;
  3419. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3420. // map<int32, bool> map = 1;
  3421. case 1: {
  3422. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3423. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3424. Mixed2_MapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  3425. Mixed2_MapEntry_DoNotUse,
  3426. ::google::protobuf::int32, bool,
  3427. ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
  3428. ::google::protobuf::internal::WireFormatLite::TYPE_BOOL,
  3429. 0 >,
  3430. ::google::protobuf::Map< ::google::protobuf::int32, bool > > parser(&map_);
  3431. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  3432. input, &parser));
  3433. } else {
  3434. goto handle_unusual;
  3435. }
  3436. break;
  3437. }
  3438. // .google.protobuf.testing.Mixed2.E ee = 2;
  3439. case 2: {
  3440. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3441. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  3442. int value;
  3443. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  3444. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  3445. input, &value)));
  3446. set_ee(static_cast< ::google::protobuf::testing::Mixed2_E >(value));
  3447. } else {
  3448. goto handle_unusual;
  3449. }
  3450. break;
  3451. }
  3452. default: {
  3453. handle_unusual:
  3454. if (tag == 0) {
  3455. goto success;
  3456. }
  3457. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3458. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3459. break;
  3460. }
  3461. }
  3462. }
  3463. success:
  3464. // @@protoc_insertion_point(parse_success:google.protobuf.testing.Mixed2)
  3465. return true;
  3466. failure:
  3467. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.Mixed2)
  3468. return false;
  3469. #undef DO_
  3470. }
  3471. void Mixed2::SerializeWithCachedSizes(
  3472. ::google::protobuf::io::CodedOutputStream* output) const {
  3473. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.Mixed2)
  3474. ::google::protobuf::uint32 cached_has_bits = 0;
  3475. (void) cached_has_bits;
  3476. // map<int32, bool> map = 1;
  3477. if (!this->map().empty()) {
  3478. typedef ::google::protobuf::Map< ::google::protobuf::int32, bool >::const_pointer
  3479. ConstPtr;
  3480. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  3481. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3482. if (output->IsSerializationDeterministic() &&
  3483. this->map().size() > 1) {
  3484. ::std::unique_ptr<SortItem[]> items(
  3485. new SortItem[this->map().size()]);
  3486. typedef ::google::protobuf::Map< ::google::protobuf::int32, bool >::size_type size_type;
  3487. size_type n = 0;
  3488. for (::google::protobuf::Map< ::google::protobuf::int32, bool >::const_iterator
  3489. it = this->map().begin();
  3490. it != this->map().end(); ++it, ++n) {
  3491. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3492. }
  3493. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3494. ::std::unique_ptr<Mixed2_MapEntry_DoNotUse> entry;
  3495. for (size_type i = 0; i < n; i++) {
  3496. entry.reset(map_.NewEntryWrapper(
  3497. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3498. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3499. 1, *entry, output);
  3500. }
  3501. } else {
  3502. ::std::unique_ptr<Mixed2_MapEntry_DoNotUse> entry;
  3503. for (::google::protobuf::Map< ::google::protobuf::int32, bool >::const_iterator
  3504. it = this->map().begin();
  3505. it != this->map().end(); ++it) {
  3506. entry.reset(map_.NewEntryWrapper(
  3507. it->first, it->second));
  3508. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3509. 1, *entry, output);
  3510. }
  3511. }
  3512. }
  3513. // .google.protobuf.testing.Mixed2.E ee = 2;
  3514. if (this->ee() != 0) {
  3515. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  3516. 2, this->ee(), output);
  3517. }
  3518. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3519. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3520. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3521. }
  3522. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.Mixed2)
  3523. }
  3524. ::google::protobuf::uint8* Mixed2::InternalSerializeWithCachedSizesToArray(
  3525. bool deterministic, ::google::protobuf::uint8* target) const {
  3526. (void)deterministic; // Unused
  3527. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.Mixed2)
  3528. ::google::protobuf::uint32 cached_has_bits = 0;
  3529. (void) cached_has_bits;
  3530. // map<int32, bool> map = 1;
  3531. if (!this->map().empty()) {
  3532. typedef ::google::protobuf::Map< ::google::protobuf::int32, bool >::const_pointer
  3533. ConstPtr;
  3534. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  3535. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3536. if (deterministic &&
  3537. this->map().size() > 1) {
  3538. ::std::unique_ptr<SortItem[]> items(
  3539. new SortItem[this->map().size()]);
  3540. typedef ::google::protobuf::Map< ::google::protobuf::int32, bool >::size_type size_type;
  3541. size_type n = 0;
  3542. for (::google::protobuf::Map< ::google::protobuf::int32, bool >::const_iterator
  3543. it = this->map().begin();
  3544. it != this->map().end(); ++it, ++n) {
  3545. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3546. }
  3547. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3548. ::std::unique_ptr<Mixed2_MapEntry_DoNotUse> entry;
  3549. for (size_type i = 0; i < n; i++) {
  3550. entry.reset(map_.NewEntryWrapper(
  3551. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3552. target = ::google::protobuf::internal::WireFormatLite::
  3553. InternalWriteMessageNoVirtualToArray(
  3554. 1, *entry, deterministic, target);
  3555. ;
  3556. }
  3557. } else {
  3558. ::std::unique_ptr<Mixed2_MapEntry_DoNotUse> entry;
  3559. for (::google::protobuf::Map< ::google::protobuf::int32, bool >::const_iterator
  3560. it = this->map().begin();
  3561. it != this->map().end(); ++it) {
  3562. entry.reset(map_.NewEntryWrapper(
  3563. it->first, it->second));
  3564. target = ::google::protobuf::internal::WireFormatLite::
  3565. InternalWriteMessageNoVirtualToArray(
  3566. 1, *entry, deterministic, target);
  3567. ;
  3568. }
  3569. }
  3570. }
  3571. // .google.protobuf.testing.Mixed2.E ee = 2;
  3572. if (this->ee() != 0) {
  3573. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  3574. 2, this->ee(), target);
  3575. }
  3576. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3577. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3578. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3579. }
  3580. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.Mixed2)
  3581. return target;
  3582. }
  3583. size_t Mixed2::ByteSizeLong() const {
  3584. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.Mixed2)
  3585. size_t total_size = 0;
  3586. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3587. total_size +=
  3588. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3589. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3590. }
  3591. // map<int32, bool> map = 1;
  3592. total_size += 1 *
  3593. ::google::protobuf::internal::FromIntSize(this->map_size());
  3594. {
  3595. ::std::unique_ptr<Mixed2_MapEntry_DoNotUse> entry;
  3596. for (::google::protobuf::Map< ::google::protobuf::int32, bool >::const_iterator
  3597. it = this->map().begin();
  3598. it != this->map().end(); ++it) {
  3599. entry.reset(map_.NewEntryWrapper(it->first, it->second));
  3600. total_size += ::google::protobuf::internal::WireFormatLite::
  3601. MessageSizeNoVirtual(*entry);
  3602. }
  3603. }
  3604. // .google.protobuf.testing.Mixed2.E ee = 2;
  3605. if (this->ee() != 0) {
  3606. total_size += 1 +
  3607. ::google::protobuf::internal::WireFormatLite::EnumSize(this->ee());
  3608. }
  3609. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3610. SetCachedSize(cached_size);
  3611. return total_size;
  3612. }
  3613. void Mixed2::MergeFrom(const ::google::protobuf::Message& from) {
  3614. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.Mixed2)
  3615. GOOGLE_DCHECK_NE(&from, this);
  3616. const Mixed2* source =
  3617. ::google::protobuf::internal::DynamicCastToGenerated<const Mixed2>(
  3618. &from);
  3619. if (source == NULL) {
  3620. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.Mixed2)
  3621. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3622. } else {
  3623. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.Mixed2)
  3624. MergeFrom(*source);
  3625. }
  3626. }
  3627. void Mixed2::MergeFrom(const Mixed2& from) {
  3628. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.Mixed2)
  3629. GOOGLE_DCHECK_NE(&from, this);
  3630. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3631. ::google::protobuf::uint32 cached_has_bits = 0;
  3632. (void) cached_has_bits;
  3633. map_.MergeFrom(from.map_);
  3634. if (from.ee() != 0) {
  3635. set_ee(from.ee());
  3636. }
  3637. }
  3638. void Mixed2::CopyFrom(const ::google::protobuf::Message& from) {
  3639. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.Mixed2)
  3640. if (&from == this) return;
  3641. Clear();
  3642. MergeFrom(from);
  3643. }
  3644. void Mixed2::CopyFrom(const Mixed2& from) {
  3645. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.Mixed2)
  3646. if (&from == this) return;
  3647. Clear();
  3648. MergeFrom(from);
  3649. }
  3650. bool Mixed2::IsInitialized() const {
  3651. return true;
  3652. }
  3653. void Mixed2::Swap(Mixed2* other) {
  3654. if (other == this) return;
  3655. InternalSwap(other);
  3656. }
  3657. void Mixed2::InternalSwap(Mixed2* other) {
  3658. using std::swap;
  3659. map_.Swap(&other->map_);
  3660. swap(ee_, other->ee_);
  3661. _internal_metadata_.Swap(&other->_internal_metadata_);
  3662. }
  3663. ::google::protobuf::Metadata Mixed2::GetMetadata() const {
  3664. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  3665. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  3666. }
  3667. // ===================================================================
  3668. void MapOfObjects_M::InitAsDefaultInstance() {
  3669. }
  3670. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3671. const int MapOfObjects_M::kInnerTextFieldNumber;
  3672. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3673. MapOfObjects_M::MapOfObjects_M()
  3674. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3675. ::google::protobuf::internal::InitSCC(
  3676. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOfObjects_M.base);
  3677. SharedCtor();
  3678. // @@protoc_insertion_point(constructor:google.protobuf.testing.MapOfObjects.M)
  3679. }
  3680. MapOfObjects_M::MapOfObjects_M(const MapOfObjects_M& from)
  3681. : ::google::protobuf::Message(),
  3682. _internal_metadata_(NULL) {
  3683. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3684. inner_text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3685. if (from.inner_text().size() > 0) {
  3686. inner_text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.inner_text_);
  3687. }
  3688. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MapOfObjects.M)
  3689. }
  3690. void MapOfObjects_M::SharedCtor() {
  3691. inner_text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3692. }
  3693. MapOfObjects_M::~MapOfObjects_M() {
  3694. // @@protoc_insertion_point(destructor:google.protobuf.testing.MapOfObjects.M)
  3695. SharedDtor();
  3696. }
  3697. void MapOfObjects_M::SharedDtor() {
  3698. inner_text_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3699. }
  3700. void MapOfObjects_M::SetCachedSize(int size) const {
  3701. _cached_size_.Set(size);
  3702. }
  3703. const ::google::protobuf::Descriptor* MapOfObjects_M::descriptor() {
  3704. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  3705. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3706. }
  3707. const MapOfObjects_M& MapOfObjects_M::default_instance() {
  3708. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOfObjects_M.base);
  3709. return *internal_default_instance();
  3710. }
  3711. void MapOfObjects_M::Clear() {
  3712. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MapOfObjects.M)
  3713. ::google::protobuf::uint32 cached_has_bits = 0;
  3714. // Prevent compiler warnings about cached_has_bits being unused
  3715. (void) cached_has_bits;
  3716. inner_text_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3717. _internal_metadata_.Clear();
  3718. }
  3719. bool MapOfObjects_M::MergePartialFromCodedStream(
  3720. ::google::protobuf::io::CodedInputStream* input) {
  3721. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3722. ::google::protobuf::uint32 tag;
  3723. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MapOfObjects.M)
  3724. for (;;) {
  3725. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3726. tag = p.first;
  3727. if (!p.second) goto handle_unusual;
  3728. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3729. // string inner_text = 1;
  3730. case 1: {
  3731. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3732. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3733. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  3734. input, this->mutable_inner_text()));
  3735. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3736. this->inner_text().data(), static_cast<int>(this->inner_text().length()),
  3737. ::google::protobuf::internal::WireFormatLite::PARSE,
  3738. "google.protobuf.testing.MapOfObjects.M.inner_text"));
  3739. } else {
  3740. goto handle_unusual;
  3741. }
  3742. break;
  3743. }
  3744. default: {
  3745. handle_unusual:
  3746. if (tag == 0) {
  3747. goto success;
  3748. }
  3749. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3750. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3751. break;
  3752. }
  3753. }
  3754. }
  3755. success:
  3756. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MapOfObjects.M)
  3757. return true;
  3758. failure:
  3759. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MapOfObjects.M)
  3760. return false;
  3761. #undef DO_
  3762. }
  3763. void MapOfObjects_M::SerializeWithCachedSizes(
  3764. ::google::protobuf::io::CodedOutputStream* output) const {
  3765. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MapOfObjects.M)
  3766. ::google::protobuf::uint32 cached_has_bits = 0;
  3767. (void) cached_has_bits;
  3768. // string inner_text = 1;
  3769. if (this->inner_text().size() > 0) {
  3770. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3771. this->inner_text().data(), static_cast<int>(this->inner_text().length()),
  3772. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3773. "google.protobuf.testing.MapOfObjects.M.inner_text");
  3774. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  3775. 1, this->inner_text(), output);
  3776. }
  3777. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3778. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3779. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3780. }
  3781. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MapOfObjects.M)
  3782. }
  3783. ::google::protobuf::uint8* MapOfObjects_M::InternalSerializeWithCachedSizesToArray(
  3784. bool deterministic, ::google::protobuf::uint8* target) const {
  3785. (void)deterministic; // Unused
  3786. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MapOfObjects.M)
  3787. ::google::protobuf::uint32 cached_has_bits = 0;
  3788. (void) cached_has_bits;
  3789. // string inner_text = 1;
  3790. if (this->inner_text().size() > 0) {
  3791. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3792. this->inner_text().data(), static_cast<int>(this->inner_text().length()),
  3793. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3794. "google.protobuf.testing.MapOfObjects.M.inner_text");
  3795. target =
  3796. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  3797. 1, this->inner_text(), target);
  3798. }
  3799. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3800. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3801. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3802. }
  3803. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MapOfObjects.M)
  3804. return target;
  3805. }
  3806. size_t MapOfObjects_M::ByteSizeLong() const {
  3807. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MapOfObjects.M)
  3808. size_t total_size = 0;
  3809. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3810. total_size +=
  3811. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3812. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3813. }
  3814. // string inner_text = 1;
  3815. if (this->inner_text().size() > 0) {
  3816. total_size += 1 +
  3817. ::google::protobuf::internal::WireFormatLite::StringSize(
  3818. this->inner_text());
  3819. }
  3820. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3821. SetCachedSize(cached_size);
  3822. return total_size;
  3823. }
  3824. void MapOfObjects_M::MergeFrom(const ::google::protobuf::Message& from) {
  3825. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MapOfObjects.M)
  3826. GOOGLE_DCHECK_NE(&from, this);
  3827. const MapOfObjects_M* source =
  3828. ::google::protobuf::internal::DynamicCastToGenerated<const MapOfObjects_M>(
  3829. &from);
  3830. if (source == NULL) {
  3831. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MapOfObjects.M)
  3832. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3833. } else {
  3834. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MapOfObjects.M)
  3835. MergeFrom(*source);
  3836. }
  3837. }
  3838. void MapOfObjects_M::MergeFrom(const MapOfObjects_M& from) {
  3839. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MapOfObjects.M)
  3840. GOOGLE_DCHECK_NE(&from, this);
  3841. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3842. ::google::protobuf::uint32 cached_has_bits = 0;
  3843. (void) cached_has_bits;
  3844. if (from.inner_text().size() > 0) {
  3845. inner_text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.inner_text_);
  3846. }
  3847. }
  3848. void MapOfObjects_M::CopyFrom(const ::google::protobuf::Message& from) {
  3849. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MapOfObjects.M)
  3850. if (&from == this) return;
  3851. Clear();
  3852. MergeFrom(from);
  3853. }
  3854. void MapOfObjects_M::CopyFrom(const MapOfObjects_M& from) {
  3855. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MapOfObjects.M)
  3856. if (&from == this) return;
  3857. Clear();
  3858. MergeFrom(from);
  3859. }
  3860. bool MapOfObjects_M::IsInitialized() const {
  3861. return true;
  3862. }
  3863. void MapOfObjects_M::Swap(MapOfObjects_M* other) {
  3864. if (other == this) return;
  3865. InternalSwap(other);
  3866. }
  3867. void MapOfObjects_M::InternalSwap(MapOfObjects_M* other) {
  3868. using std::swap;
  3869. inner_text_.Swap(&other->inner_text_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  3870. GetArenaNoVirtual());
  3871. _internal_metadata_.Swap(&other->_internal_metadata_);
  3872. }
  3873. ::google::protobuf::Metadata MapOfObjects_M::GetMetadata() const {
  3874. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  3875. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  3876. }
  3877. // ===================================================================
  3878. MapOfObjects_MapEntry_DoNotUse::MapOfObjects_MapEntry_DoNotUse() {}
  3879. MapOfObjects_MapEntry_DoNotUse::MapOfObjects_MapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  3880. void MapOfObjects_MapEntry_DoNotUse::MergeFrom(const MapOfObjects_MapEntry_DoNotUse& other) {
  3881. MergeFromInternal(other);
  3882. }
  3883. ::google::protobuf::Metadata MapOfObjects_MapEntry_DoNotUse::GetMetadata() const {
  3884. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  3885. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[14];
  3886. }
  3887. void MapOfObjects_MapEntry_DoNotUse::MergeFrom(
  3888. const ::google::protobuf::Message& other) {
  3889. ::google::protobuf::Message::MergeFrom(other);
  3890. }
  3891. // ===================================================================
  3892. void MapOfObjects::InitAsDefaultInstance() {
  3893. }
  3894. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3895. const int MapOfObjects::kMapFieldNumber;
  3896. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3897. MapOfObjects::MapOfObjects()
  3898. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3899. ::google::protobuf::internal::InitSCC(
  3900. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOfObjects.base);
  3901. SharedCtor();
  3902. // @@protoc_insertion_point(constructor:google.protobuf.testing.MapOfObjects)
  3903. }
  3904. MapOfObjects::MapOfObjects(const MapOfObjects& from)
  3905. : ::google::protobuf::Message(),
  3906. _internal_metadata_(NULL) {
  3907. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3908. map_.MergeFrom(from.map_);
  3909. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MapOfObjects)
  3910. }
  3911. void MapOfObjects::SharedCtor() {
  3912. }
  3913. MapOfObjects::~MapOfObjects() {
  3914. // @@protoc_insertion_point(destructor:google.protobuf.testing.MapOfObjects)
  3915. SharedDtor();
  3916. }
  3917. void MapOfObjects::SharedDtor() {
  3918. }
  3919. void MapOfObjects::SetCachedSize(int size) const {
  3920. _cached_size_.Set(size);
  3921. }
  3922. const ::google::protobuf::Descriptor* MapOfObjects::descriptor() {
  3923. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  3924. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3925. }
  3926. const MapOfObjects& MapOfObjects::default_instance() {
  3927. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOfObjects.base);
  3928. return *internal_default_instance();
  3929. }
  3930. void MapOfObjects::Clear() {
  3931. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MapOfObjects)
  3932. ::google::protobuf::uint32 cached_has_bits = 0;
  3933. // Prevent compiler warnings about cached_has_bits being unused
  3934. (void) cached_has_bits;
  3935. map_.Clear();
  3936. _internal_metadata_.Clear();
  3937. }
  3938. bool MapOfObjects::MergePartialFromCodedStream(
  3939. ::google::protobuf::io::CodedInputStream* input) {
  3940. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3941. ::google::protobuf::uint32 tag;
  3942. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MapOfObjects)
  3943. for (;;) {
  3944. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3945. tag = p.first;
  3946. if (!p.second) goto handle_unusual;
  3947. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3948. // map<string, .google.protobuf.testing.MapOfObjects.M> map = 1;
  3949. case 1: {
  3950. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3951. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3952. MapOfObjects_MapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  3953. MapOfObjects_MapEntry_DoNotUse,
  3954. ::std::string, ::google::protobuf::testing::MapOfObjects_M,
  3955. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  3956. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  3957. 0 >,
  3958. ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOfObjects_M > > parser(&map_);
  3959. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  3960. input, &parser));
  3961. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3962. parser.key().data(), static_cast<int>(parser.key().length()),
  3963. ::google::protobuf::internal::WireFormatLite::PARSE,
  3964. "google.protobuf.testing.MapOfObjects.MapEntry.key"));
  3965. } else {
  3966. goto handle_unusual;
  3967. }
  3968. break;
  3969. }
  3970. default: {
  3971. handle_unusual:
  3972. if (tag == 0) {
  3973. goto success;
  3974. }
  3975. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3976. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3977. break;
  3978. }
  3979. }
  3980. }
  3981. success:
  3982. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MapOfObjects)
  3983. return true;
  3984. failure:
  3985. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MapOfObjects)
  3986. return false;
  3987. #undef DO_
  3988. }
  3989. void MapOfObjects::SerializeWithCachedSizes(
  3990. ::google::protobuf::io::CodedOutputStream* output) const {
  3991. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MapOfObjects)
  3992. ::google::protobuf::uint32 cached_has_bits = 0;
  3993. (void) cached_has_bits;
  3994. // map<string, .google.protobuf.testing.MapOfObjects.M> map = 1;
  3995. if (!this->map().empty()) {
  3996. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOfObjects_M >::const_pointer
  3997. ConstPtr;
  3998. typedef ConstPtr SortItem;
  3999. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  4000. struct Utf8Check {
  4001. static void Check(ConstPtr p) {
  4002. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4003. p->first.data(), static_cast<int>(p->first.length()),
  4004. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4005. "google.protobuf.testing.MapOfObjects.MapEntry.key");
  4006. }
  4007. };
  4008. if (output->IsSerializationDeterministic() &&
  4009. this->map().size() > 1) {
  4010. ::std::unique_ptr<SortItem[]> items(
  4011. new SortItem[this->map().size()]);
  4012. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOfObjects_M >::size_type size_type;
  4013. size_type n = 0;
  4014. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOfObjects_M >::const_iterator
  4015. it = this->map().begin();
  4016. it != this->map().end(); ++it, ++n) {
  4017. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  4018. }
  4019. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  4020. ::std::unique_ptr<MapOfObjects_MapEntry_DoNotUse> entry;
  4021. for (size_type i = 0; i < n; i++) {
  4022. entry.reset(map_.NewEntryWrapper(
  4023. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  4024. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4025. 1, *entry, output);
  4026. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  4027. }
  4028. } else {
  4029. ::std::unique_ptr<MapOfObjects_MapEntry_DoNotUse> entry;
  4030. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOfObjects_M >::const_iterator
  4031. it = this->map().begin();
  4032. it != this->map().end(); ++it) {
  4033. entry.reset(map_.NewEntryWrapper(
  4034. it->first, it->second));
  4035. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4036. 1, *entry, output);
  4037. Utf8Check::Check(&*it);
  4038. }
  4039. }
  4040. }
  4041. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4042. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4043. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4044. }
  4045. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MapOfObjects)
  4046. }
  4047. ::google::protobuf::uint8* MapOfObjects::InternalSerializeWithCachedSizesToArray(
  4048. bool deterministic, ::google::protobuf::uint8* target) const {
  4049. (void)deterministic; // Unused
  4050. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MapOfObjects)
  4051. ::google::protobuf::uint32 cached_has_bits = 0;
  4052. (void) cached_has_bits;
  4053. // map<string, .google.protobuf.testing.MapOfObjects.M> map = 1;
  4054. if (!this->map().empty()) {
  4055. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOfObjects_M >::const_pointer
  4056. ConstPtr;
  4057. typedef ConstPtr SortItem;
  4058. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  4059. struct Utf8Check {
  4060. static void Check(ConstPtr p) {
  4061. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4062. p->first.data(), static_cast<int>(p->first.length()),
  4063. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4064. "google.protobuf.testing.MapOfObjects.MapEntry.key");
  4065. }
  4066. };
  4067. if (deterministic &&
  4068. this->map().size() > 1) {
  4069. ::std::unique_ptr<SortItem[]> items(
  4070. new SortItem[this->map().size()]);
  4071. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOfObjects_M >::size_type size_type;
  4072. size_type n = 0;
  4073. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOfObjects_M >::const_iterator
  4074. it = this->map().begin();
  4075. it != this->map().end(); ++it, ++n) {
  4076. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  4077. }
  4078. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  4079. ::std::unique_ptr<MapOfObjects_MapEntry_DoNotUse> entry;
  4080. for (size_type i = 0; i < n; i++) {
  4081. entry.reset(map_.NewEntryWrapper(
  4082. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  4083. target = ::google::protobuf::internal::WireFormatLite::
  4084. InternalWriteMessageNoVirtualToArray(
  4085. 1, *entry, deterministic, target);
  4086. ;
  4087. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  4088. }
  4089. } else {
  4090. ::std::unique_ptr<MapOfObjects_MapEntry_DoNotUse> entry;
  4091. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOfObjects_M >::const_iterator
  4092. it = this->map().begin();
  4093. it != this->map().end(); ++it) {
  4094. entry.reset(map_.NewEntryWrapper(
  4095. it->first, it->second));
  4096. target = ::google::protobuf::internal::WireFormatLite::
  4097. InternalWriteMessageNoVirtualToArray(
  4098. 1, *entry, deterministic, target);
  4099. ;
  4100. Utf8Check::Check(&*it);
  4101. }
  4102. }
  4103. }
  4104. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4105. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4106. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4107. }
  4108. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MapOfObjects)
  4109. return target;
  4110. }
  4111. size_t MapOfObjects::ByteSizeLong() const {
  4112. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MapOfObjects)
  4113. size_t total_size = 0;
  4114. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4115. total_size +=
  4116. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4117. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4118. }
  4119. // map<string, .google.protobuf.testing.MapOfObjects.M> map = 1;
  4120. total_size += 1 *
  4121. ::google::protobuf::internal::FromIntSize(this->map_size());
  4122. {
  4123. ::std::unique_ptr<MapOfObjects_MapEntry_DoNotUse> entry;
  4124. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOfObjects_M >::const_iterator
  4125. it = this->map().begin();
  4126. it != this->map().end(); ++it) {
  4127. entry.reset(map_.NewEntryWrapper(it->first, it->second));
  4128. total_size += ::google::protobuf::internal::WireFormatLite::
  4129. MessageSizeNoVirtual(*entry);
  4130. }
  4131. }
  4132. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4133. SetCachedSize(cached_size);
  4134. return total_size;
  4135. }
  4136. void MapOfObjects::MergeFrom(const ::google::protobuf::Message& from) {
  4137. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MapOfObjects)
  4138. GOOGLE_DCHECK_NE(&from, this);
  4139. const MapOfObjects* source =
  4140. ::google::protobuf::internal::DynamicCastToGenerated<const MapOfObjects>(
  4141. &from);
  4142. if (source == NULL) {
  4143. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MapOfObjects)
  4144. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4145. } else {
  4146. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MapOfObjects)
  4147. MergeFrom(*source);
  4148. }
  4149. }
  4150. void MapOfObjects::MergeFrom(const MapOfObjects& from) {
  4151. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MapOfObjects)
  4152. GOOGLE_DCHECK_NE(&from, this);
  4153. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4154. ::google::protobuf::uint32 cached_has_bits = 0;
  4155. (void) cached_has_bits;
  4156. map_.MergeFrom(from.map_);
  4157. }
  4158. void MapOfObjects::CopyFrom(const ::google::protobuf::Message& from) {
  4159. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MapOfObjects)
  4160. if (&from == this) return;
  4161. Clear();
  4162. MergeFrom(from);
  4163. }
  4164. void MapOfObjects::CopyFrom(const MapOfObjects& from) {
  4165. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MapOfObjects)
  4166. if (&from == this) return;
  4167. Clear();
  4168. MergeFrom(from);
  4169. }
  4170. bool MapOfObjects::IsInitialized() const {
  4171. return true;
  4172. }
  4173. void MapOfObjects::Swap(MapOfObjects* other) {
  4174. if (other == this) return;
  4175. InternalSwap(other);
  4176. }
  4177. void MapOfObjects::InternalSwap(MapOfObjects* other) {
  4178. using std::swap;
  4179. map_.Swap(&other->map_);
  4180. _internal_metadata_.Swap(&other->_internal_metadata_);
  4181. }
  4182. ::google::protobuf::Metadata MapOfObjects::GetMetadata() const {
  4183. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  4184. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  4185. }
  4186. // ===================================================================
  4187. void DummyRequest::InitAsDefaultInstance() {
  4188. }
  4189. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4190. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4191. DummyRequest::DummyRequest()
  4192. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4193. ::google::protobuf::internal::InitSCC(
  4194. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_DummyRequest.base);
  4195. SharedCtor();
  4196. // @@protoc_insertion_point(constructor:google.protobuf.testing.DummyRequest)
  4197. }
  4198. DummyRequest::DummyRequest(const DummyRequest& from)
  4199. : ::google::protobuf::Message(),
  4200. _internal_metadata_(NULL) {
  4201. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4202. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.DummyRequest)
  4203. }
  4204. void DummyRequest::SharedCtor() {
  4205. }
  4206. DummyRequest::~DummyRequest() {
  4207. // @@protoc_insertion_point(destructor:google.protobuf.testing.DummyRequest)
  4208. SharedDtor();
  4209. }
  4210. void DummyRequest::SharedDtor() {
  4211. }
  4212. void DummyRequest::SetCachedSize(int size) const {
  4213. _cached_size_.Set(size);
  4214. }
  4215. const ::google::protobuf::Descriptor* DummyRequest::descriptor() {
  4216. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  4217. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4218. }
  4219. const DummyRequest& DummyRequest::default_instance() {
  4220. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_DummyRequest.base);
  4221. return *internal_default_instance();
  4222. }
  4223. void DummyRequest::Clear() {
  4224. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.DummyRequest)
  4225. ::google::protobuf::uint32 cached_has_bits = 0;
  4226. // Prevent compiler warnings about cached_has_bits being unused
  4227. (void) cached_has_bits;
  4228. _internal_metadata_.Clear();
  4229. }
  4230. bool DummyRequest::MergePartialFromCodedStream(
  4231. ::google::protobuf::io::CodedInputStream* input) {
  4232. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4233. ::google::protobuf::uint32 tag;
  4234. // @@protoc_insertion_point(parse_start:google.protobuf.testing.DummyRequest)
  4235. for (;;) {
  4236. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4237. tag = p.first;
  4238. if (!p.second) goto handle_unusual;
  4239. handle_unusual:
  4240. if (tag == 0) {
  4241. goto success;
  4242. }
  4243. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4244. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4245. }
  4246. success:
  4247. // @@protoc_insertion_point(parse_success:google.protobuf.testing.DummyRequest)
  4248. return true;
  4249. failure:
  4250. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.DummyRequest)
  4251. return false;
  4252. #undef DO_
  4253. }
  4254. void DummyRequest::SerializeWithCachedSizes(
  4255. ::google::protobuf::io::CodedOutputStream* output) const {
  4256. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.DummyRequest)
  4257. ::google::protobuf::uint32 cached_has_bits = 0;
  4258. (void) cached_has_bits;
  4259. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4260. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4261. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4262. }
  4263. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.DummyRequest)
  4264. }
  4265. ::google::protobuf::uint8* DummyRequest::InternalSerializeWithCachedSizesToArray(
  4266. bool deterministic, ::google::protobuf::uint8* target) const {
  4267. (void)deterministic; // Unused
  4268. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.DummyRequest)
  4269. ::google::protobuf::uint32 cached_has_bits = 0;
  4270. (void) cached_has_bits;
  4271. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4272. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4273. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4274. }
  4275. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.DummyRequest)
  4276. return target;
  4277. }
  4278. size_t DummyRequest::ByteSizeLong() const {
  4279. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.DummyRequest)
  4280. size_t total_size = 0;
  4281. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4282. total_size +=
  4283. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4284. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4285. }
  4286. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4287. SetCachedSize(cached_size);
  4288. return total_size;
  4289. }
  4290. void DummyRequest::MergeFrom(const ::google::protobuf::Message& from) {
  4291. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.DummyRequest)
  4292. GOOGLE_DCHECK_NE(&from, this);
  4293. const DummyRequest* source =
  4294. ::google::protobuf::internal::DynamicCastToGenerated<const DummyRequest>(
  4295. &from);
  4296. if (source == NULL) {
  4297. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.DummyRequest)
  4298. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4299. } else {
  4300. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.DummyRequest)
  4301. MergeFrom(*source);
  4302. }
  4303. }
  4304. void DummyRequest::MergeFrom(const DummyRequest& from) {
  4305. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.DummyRequest)
  4306. GOOGLE_DCHECK_NE(&from, this);
  4307. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4308. ::google::protobuf::uint32 cached_has_bits = 0;
  4309. (void) cached_has_bits;
  4310. }
  4311. void DummyRequest::CopyFrom(const ::google::protobuf::Message& from) {
  4312. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.DummyRequest)
  4313. if (&from == this) return;
  4314. Clear();
  4315. MergeFrom(from);
  4316. }
  4317. void DummyRequest::CopyFrom(const DummyRequest& from) {
  4318. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.DummyRequest)
  4319. if (&from == this) return;
  4320. Clear();
  4321. MergeFrom(from);
  4322. }
  4323. bool DummyRequest::IsInitialized() const {
  4324. return true;
  4325. }
  4326. void DummyRequest::Swap(DummyRequest* other) {
  4327. if (other == this) return;
  4328. InternalSwap(other);
  4329. }
  4330. void DummyRequest::InternalSwap(DummyRequest* other) {
  4331. using std::swap;
  4332. _internal_metadata_.Swap(&other->_internal_metadata_);
  4333. }
  4334. ::google::protobuf::Metadata DummyRequest::GetMetadata() const {
  4335. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  4336. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  4337. }
  4338. // ===================================================================
  4339. MapIn_MapInputEntry_DoNotUse::MapIn_MapInputEntry_DoNotUse() {}
  4340. MapIn_MapInputEntry_DoNotUse::MapIn_MapInputEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  4341. void MapIn_MapInputEntry_DoNotUse::MergeFrom(const MapIn_MapInputEntry_DoNotUse& other) {
  4342. MergeFromInternal(other);
  4343. }
  4344. ::google::protobuf::Metadata MapIn_MapInputEntry_DoNotUse::GetMetadata() const {
  4345. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  4346. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[17];
  4347. }
  4348. void MapIn_MapInputEntry_DoNotUse::MergeFrom(
  4349. const ::google::protobuf::Message& other) {
  4350. ::google::protobuf::Message::MergeFrom(other);
  4351. }
  4352. // ===================================================================
  4353. void MapIn::InitAsDefaultInstance() {
  4354. }
  4355. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4356. const int MapIn::kOtherFieldNumber;
  4357. const int MapIn::kThingsFieldNumber;
  4358. const int MapIn::kMapInputFieldNumber;
  4359. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4360. MapIn::MapIn()
  4361. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4362. ::google::protobuf::internal::InitSCC(
  4363. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapIn.base);
  4364. SharedCtor();
  4365. // @@protoc_insertion_point(constructor:google.protobuf.testing.MapIn)
  4366. }
  4367. MapIn::MapIn(const MapIn& from)
  4368. : ::google::protobuf::Message(),
  4369. _internal_metadata_(NULL),
  4370. things_(from.things_) {
  4371. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4372. map_input_.MergeFrom(from.map_input_);
  4373. other_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4374. if (from.other().size() > 0) {
  4375. other_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.other_);
  4376. }
  4377. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MapIn)
  4378. }
  4379. void MapIn::SharedCtor() {
  4380. other_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4381. }
  4382. MapIn::~MapIn() {
  4383. // @@protoc_insertion_point(destructor:google.protobuf.testing.MapIn)
  4384. SharedDtor();
  4385. }
  4386. void MapIn::SharedDtor() {
  4387. other_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4388. }
  4389. void MapIn::SetCachedSize(int size) const {
  4390. _cached_size_.Set(size);
  4391. }
  4392. const ::google::protobuf::Descriptor* MapIn::descriptor() {
  4393. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  4394. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4395. }
  4396. const MapIn& MapIn::default_instance() {
  4397. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapIn.base);
  4398. return *internal_default_instance();
  4399. }
  4400. void MapIn::Clear() {
  4401. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MapIn)
  4402. ::google::protobuf::uint32 cached_has_bits = 0;
  4403. // Prevent compiler warnings about cached_has_bits being unused
  4404. (void) cached_has_bits;
  4405. things_.Clear();
  4406. map_input_.Clear();
  4407. other_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4408. _internal_metadata_.Clear();
  4409. }
  4410. bool MapIn::MergePartialFromCodedStream(
  4411. ::google::protobuf::io::CodedInputStream* input) {
  4412. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4413. ::google::protobuf::uint32 tag;
  4414. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MapIn)
  4415. for (;;) {
  4416. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4417. tag = p.first;
  4418. if (!p.second) goto handle_unusual;
  4419. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4420. // string other = 1;
  4421. case 1: {
  4422. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4423. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4424. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  4425. input, this->mutable_other()));
  4426. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4427. this->other().data(), static_cast<int>(this->other().length()),
  4428. ::google::protobuf::internal::WireFormatLite::PARSE,
  4429. "google.protobuf.testing.MapIn.other"));
  4430. } else {
  4431. goto handle_unusual;
  4432. }
  4433. break;
  4434. }
  4435. // repeated string things = 2;
  4436. case 2: {
  4437. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4438. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  4439. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  4440. input, this->add_things()));
  4441. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4442. this->things(this->things_size() - 1).data(),
  4443. static_cast<int>(this->things(this->things_size() - 1).length()),
  4444. ::google::protobuf::internal::WireFormatLite::PARSE,
  4445. "google.protobuf.testing.MapIn.things"));
  4446. } else {
  4447. goto handle_unusual;
  4448. }
  4449. break;
  4450. }
  4451. // map<string, string> map_input = 3;
  4452. case 3: {
  4453. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4454. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  4455. MapIn_MapInputEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  4456. MapIn_MapInputEntry_DoNotUse,
  4457. ::std::string, ::std::string,
  4458. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  4459. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  4460. 0 >,
  4461. ::google::protobuf::Map< ::std::string, ::std::string > > parser(&map_input_);
  4462. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  4463. input, &parser));
  4464. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4465. parser.key().data(), static_cast<int>(parser.key().length()),
  4466. ::google::protobuf::internal::WireFormatLite::PARSE,
  4467. "google.protobuf.testing.MapIn.MapInputEntry.key"));
  4468. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4469. parser.value().data(), static_cast<int>(parser.value().length()),
  4470. ::google::protobuf::internal::WireFormatLite::PARSE,
  4471. "google.protobuf.testing.MapIn.MapInputEntry.value"));
  4472. } else {
  4473. goto handle_unusual;
  4474. }
  4475. break;
  4476. }
  4477. default: {
  4478. handle_unusual:
  4479. if (tag == 0) {
  4480. goto success;
  4481. }
  4482. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4483. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4484. break;
  4485. }
  4486. }
  4487. }
  4488. success:
  4489. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MapIn)
  4490. return true;
  4491. failure:
  4492. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MapIn)
  4493. return false;
  4494. #undef DO_
  4495. }
  4496. void MapIn::SerializeWithCachedSizes(
  4497. ::google::protobuf::io::CodedOutputStream* output) const {
  4498. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MapIn)
  4499. ::google::protobuf::uint32 cached_has_bits = 0;
  4500. (void) cached_has_bits;
  4501. // string other = 1;
  4502. if (this->other().size() > 0) {
  4503. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4504. this->other().data(), static_cast<int>(this->other().length()),
  4505. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4506. "google.protobuf.testing.MapIn.other");
  4507. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  4508. 1, this->other(), output);
  4509. }
  4510. // repeated string things = 2;
  4511. for (int i = 0, n = this->things_size(); i < n; i++) {
  4512. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4513. this->things(i).data(), static_cast<int>(this->things(i).length()),
  4514. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4515. "google.protobuf.testing.MapIn.things");
  4516. ::google::protobuf::internal::WireFormatLite::WriteString(
  4517. 2, this->things(i), output);
  4518. }
  4519. // map<string, string> map_input = 3;
  4520. if (!this->map_input().empty()) {
  4521. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  4522. ConstPtr;
  4523. typedef ConstPtr SortItem;
  4524. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  4525. struct Utf8Check {
  4526. static void Check(ConstPtr p) {
  4527. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4528. p->first.data(), static_cast<int>(p->first.length()),
  4529. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4530. "google.protobuf.testing.MapIn.MapInputEntry.key");
  4531. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4532. p->second.data(), static_cast<int>(p->second.length()),
  4533. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4534. "google.protobuf.testing.MapIn.MapInputEntry.value");
  4535. }
  4536. };
  4537. if (output->IsSerializationDeterministic() &&
  4538. this->map_input().size() > 1) {
  4539. ::std::unique_ptr<SortItem[]> items(
  4540. new SortItem[this->map_input().size()]);
  4541. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  4542. size_type n = 0;
  4543. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  4544. it = this->map_input().begin();
  4545. it != this->map_input().end(); ++it, ++n) {
  4546. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  4547. }
  4548. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  4549. ::std::unique_ptr<MapIn_MapInputEntry_DoNotUse> entry;
  4550. for (size_type i = 0; i < n; i++) {
  4551. entry.reset(map_input_.NewEntryWrapper(
  4552. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  4553. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4554. 3, *entry, output);
  4555. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  4556. }
  4557. } else {
  4558. ::std::unique_ptr<MapIn_MapInputEntry_DoNotUse> entry;
  4559. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  4560. it = this->map_input().begin();
  4561. it != this->map_input().end(); ++it) {
  4562. entry.reset(map_input_.NewEntryWrapper(
  4563. it->first, it->second));
  4564. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4565. 3, *entry, output);
  4566. Utf8Check::Check(&*it);
  4567. }
  4568. }
  4569. }
  4570. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4571. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4572. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4573. }
  4574. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MapIn)
  4575. }
  4576. ::google::protobuf::uint8* MapIn::InternalSerializeWithCachedSizesToArray(
  4577. bool deterministic, ::google::protobuf::uint8* target) const {
  4578. (void)deterministic; // Unused
  4579. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MapIn)
  4580. ::google::protobuf::uint32 cached_has_bits = 0;
  4581. (void) cached_has_bits;
  4582. // string other = 1;
  4583. if (this->other().size() > 0) {
  4584. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4585. this->other().data(), static_cast<int>(this->other().length()),
  4586. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4587. "google.protobuf.testing.MapIn.other");
  4588. target =
  4589. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  4590. 1, this->other(), target);
  4591. }
  4592. // repeated string things = 2;
  4593. for (int i = 0, n = this->things_size(); i < n; i++) {
  4594. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4595. this->things(i).data(), static_cast<int>(this->things(i).length()),
  4596. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4597. "google.protobuf.testing.MapIn.things");
  4598. target = ::google::protobuf::internal::WireFormatLite::
  4599. WriteStringToArray(2, this->things(i), target);
  4600. }
  4601. // map<string, string> map_input = 3;
  4602. if (!this->map_input().empty()) {
  4603. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  4604. ConstPtr;
  4605. typedef ConstPtr SortItem;
  4606. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  4607. struct Utf8Check {
  4608. static void Check(ConstPtr p) {
  4609. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4610. p->first.data(), static_cast<int>(p->first.length()),
  4611. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4612. "google.protobuf.testing.MapIn.MapInputEntry.key");
  4613. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4614. p->second.data(), static_cast<int>(p->second.length()),
  4615. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4616. "google.protobuf.testing.MapIn.MapInputEntry.value");
  4617. }
  4618. };
  4619. if (deterministic &&
  4620. this->map_input().size() > 1) {
  4621. ::std::unique_ptr<SortItem[]> items(
  4622. new SortItem[this->map_input().size()]);
  4623. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  4624. size_type n = 0;
  4625. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  4626. it = this->map_input().begin();
  4627. it != this->map_input().end(); ++it, ++n) {
  4628. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  4629. }
  4630. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  4631. ::std::unique_ptr<MapIn_MapInputEntry_DoNotUse> entry;
  4632. for (size_type i = 0; i < n; i++) {
  4633. entry.reset(map_input_.NewEntryWrapper(
  4634. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  4635. target = ::google::protobuf::internal::WireFormatLite::
  4636. InternalWriteMessageNoVirtualToArray(
  4637. 3, *entry, deterministic, target);
  4638. ;
  4639. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  4640. }
  4641. } else {
  4642. ::std::unique_ptr<MapIn_MapInputEntry_DoNotUse> entry;
  4643. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  4644. it = this->map_input().begin();
  4645. it != this->map_input().end(); ++it) {
  4646. entry.reset(map_input_.NewEntryWrapper(
  4647. it->first, it->second));
  4648. target = ::google::protobuf::internal::WireFormatLite::
  4649. InternalWriteMessageNoVirtualToArray(
  4650. 3, *entry, deterministic, target);
  4651. ;
  4652. Utf8Check::Check(&*it);
  4653. }
  4654. }
  4655. }
  4656. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4657. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4658. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4659. }
  4660. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MapIn)
  4661. return target;
  4662. }
  4663. size_t MapIn::ByteSizeLong() const {
  4664. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MapIn)
  4665. size_t total_size = 0;
  4666. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4667. total_size +=
  4668. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4669. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4670. }
  4671. // repeated string things = 2;
  4672. total_size += 1 *
  4673. ::google::protobuf::internal::FromIntSize(this->things_size());
  4674. for (int i = 0, n = this->things_size(); i < n; i++) {
  4675. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  4676. this->things(i));
  4677. }
  4678. // map<string, string> map_input = 3;
  4679. total_size += 1 *
  4680. ::google::protobuf::internal::FromIntSize(this->map_input_size());
  4681. {
  4682. ::std::unique_ptr<MapIn_MapInputEntry_DoNotUse> entry;
  4683. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  4684. it = this->map_input().begin();
  4685. it != this->map_input().end(); ++it) {
  4686. entry.reset(map_input_.NewEntryWrapper(it->first, it->second));
  4687. total_size += ::google::protobuf::internal::WireFormatLite::
  4688. MessageSizeNoVirtual(*entry);
  4689. }
  4690. }
  4691. // string other = 1;
  4692. if (this->other().size() > 0) {
  4693. total_size += 1 +
  4694. ::google::protobuf::internal::WireFormatLite::StringSize(
  4695. this->other());
  4696. }
  4697. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4698. SetCachedSize(cached_size);
  4699. return total_size;
  4700. }
  4701. void MapIn::MergeFrom(const ::google::protobuf::Message& from) {
  4702. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MapIn)
  4703. GOOGLE_DCHECK_NE(&from, this);
  4704. const MapIn* source =
  4705. ::google::protobuf::internal::DynamicCastToGenerated<const MapIn>(
  4706. &from);
  4707. if (source == NULL) {
  4708. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MapIn)
  4709. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4710. } else {
  4711. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MapIn)
  4712. MergeFrom(*source);
  4713. }
  4714. }
  4715. void MapIn::MergeFrom(const MapIn& from) {
  4716. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MapIn)
  4717. GOOGLE_DCHECK_NE(&from, this);
  4718. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4719. ::google::protobuf::uint32 cached_has_bits = 0;
  4720. (void) cached_has_bits;
  4721. things_.MergeFrom(from.things_);
  4722. map_input_.MergeFrom(from.map_input_);
  4723. if (from.other().size() > 0) {
  4724. other_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.other_);
  4725. }
  4726. }
  4727. void MapIn::CopyFrom(const ::google::protobuf::Message& from) {
  4728. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MapIn)
  4729. if (&from == this) return;
  4730. Clear();
  4731. MergeFrom(from);
  4732. }
  4733. void MapIn::CopyFrom(const MapIn& from) {
  4734. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MapIn)
  4735. if (&from == this) return;
  4736. Clear();
  4737. MergeFrom(from);
  4738. }
  4739. bool MapIn::IsInitialized() const {
  4740. return true;
  4741. }
  4742. void MapIn::Swap(MapIn* other) {
  4743. if (other == this) return;
  4744. InternalSwap(other);
  4745. }
  4746. void MapIn::InternalSwap(MapIn* other) {
  4747. using std::swap;
  4748. things_.InternalSwap(CastToBase(&other->things_));
  4749. map_input_.Swap(&other->map_input_);
  4750. other_.Swap(&other->other_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  4751. GetArenaNoVirtual());
  4752. _internal_metadata_.Swap(&other->_internal_metadata_);
  4753. }
  4754. ::google::protobuf::Metadata MapIn::GetMetadata() const {
  4755. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  4756. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  4757. }
  4758. // ===================================================================
  4759. MapOut_Map1Entry_DoNotUse::MapOut_Map1Entry_DoNotUse() {}
  4760. MapOut_Map1Entry_DoNotUse::MapOut_Map1Entry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  4761. void MapOut_Map1Entry_DoNotUse::MergeFrom(const MapOut_Map1Entry_DoNotUse& other) {
  4762. MergeFromInternal(other);
  4763. }
  4764. ::google::protobuf::Metadata MapOut_Map1Entry_DoNotUse::GetMetadata() const {
  4765. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  4766. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[19];
  4767. }
  4768. void MapOut_Map1Entry_DoNotUse::MergeFrom(
  4769. const ::google::protobuf::Message& other) {
  4770. ::google::protobuf::Message::MergeFrom(other);
  4771. }
  4772. // ===================================================================
  4773. MapOut_Map2Entry_DoNotUse::MapOut_Map2Entry_DoNotUse() {}
  4774. MapOut_Map2Entry_DoNotUse::MapOut_Map2Entry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  4775. void MapOut_Map2Entry_DoNotUse::MergeFrom(const MapOut_Map2Entry_DoNotUse& other) {
  4776. MergeFromInternal(other);
  4777. }
  4778. ::google::protobuf::Metadata MapOut_Map2Entry_DoNotUse::GetMetadata() const {
  4779. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  4780. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[20];
  4781. }
  4782. void MapOut_Map2Entry_DoNotUse::MergeFrom(
  4783. const ::google::protobuf::Message& other) {
  4784. ::google::protobuf::Message::MergeFrom(other);
  4785. }
  4786. // ===================================================================
  4787. MapOut_Map3Entry_DoNotUse::MapOut_Map3Entry_DoNotUse() {}
  4788. MapOut_Map3Entry_DoNotUse::MapOut_Map3Entry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  4789. void MapOut_Map3Entry_DoNotUse::MergeFrom(const MapOut_Map3Entry_DoNotUse& other) {
  4790. MergeFromInternal(other);
  4791. }
  4792. ::google::protobuf::Metadata MapOut_Map3Entry_DoNotUse::GetMetadata() const {
  4793. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  4794. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[21];
  4795. }
  4796. void MapOut_Map3Entry_DoNotUse::MergeFrom(
  4797. const ::google::protobuf::Message& other) {
  4798. ::google::protobuf::Message::MergeFrom(other);
  4799. }
  4800. // ===================================================================
  4801. MapOut_Map4Entry_DoNotUse::MapOut_Map4Entry_DoNotUse() {}
  4802. MapOut_Map4Entry_DoNotUse::MapOut_Map4Entry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  4803. void MapOut_Map4Entry_DoNotUse::MergeFrom(const MapOut_Map4Entry_DoNotUse& other) {
  4804. MergeFromInternal(other);
  4805. }
  4806. ::google::protobuf::Metadata MapOut_Map4Entry_DoNotUse::GetMetadata() const {
  4807. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  4808. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[22];
  4809. }
  4810. void MapOut_Map4Entry_DoNotUse::MergeFrom(
  4811. const ::google::protobuf::Message& other) {
  4812. ::google::protobuf::Message::MergeFrom(other);
  4813. }
  4814. // ===================================================================
  4815. void MapOut::InitAsDefaultInstance() {
  4816. }
  4817. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4818. const int MapOut::kMap1FieldNumber;
  4819. const int MapOut::kMap2FieldNumber;
  4820. const int MapOut::kMap3FieldNumber;
  4821. const int MapOut::kMap4FieldNumber;
  4822. const int MapOut::kBarFieldNumber;
  4823. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4824. MapOut::MapOut()
  4825. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4826. ::google::protobuf::internal::InitSCC(
  4827. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOut.base);
  4828. SharedCtor();
  4829. // @@protoc_insertion_point(constructor:google.protobuf.testing.MapOut)
  4830. }
  4831. MapOut::MapOut(const MapOut& from)
  4832. : ::google::protobuf::Message(),
  4833. _internal_metadata_(NULL) {
  4834. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4835. map1_.MergeFrom(from.map1_);
  4836. map2_.MergeFrom(from.map2_);
  4837. map3_.MergeFrom(from.map3_);
  4838. map4_.MergeFrom(from.map4_);
  4839. bar_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4840. if (from.bar().size() > 0) {
  4841. bar_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.bar_);
  4842. }
  4843. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MapOut)
  4844. }
  4845. void MapOut::SharedCtor() {
  4846. bar_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4847. }
  4848. MapOut::~MapOut() {
  4849. // @@protoc_insertion_point(destructor:google.protobuf.testing.MapOut)
  4850. SharedDtor();
  4851. }
  4852. void MapOut::SharedDtor() {
  4853. bar_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4854. }
  4855. void MapOut::SetCachedSize(int size) const {
  4856. _cached_size_.Set(size);
  4857. }
  4858. const ::google::protobuf::Descriptor* MapOut::descriptor() {
  4859. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  4860. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4861. }
  4862. const MapOut& MapOut::default_instance() {
  4863. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOut.base);
  4864. return *internal_default_instance();
  4865. }
  4866. void MapOut::Clear() {
  4867. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MapOut)
  4868. ::google::protobuf::uint32 cached_has_bits = 0;
  4869. // Prevent compiler warnings about cached_has_bits being unused
  4870. (void) cached_has_bits;
  4871. map1_.Clear();
  4872. map2_.Clear();
  4873. map3_.Clear();
  4874. map4_.Clear();
  4875. bar_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4876. _internal_metadata_.Clear();
  4877. }
  4878. bool MapOut::MergePartialFromCodedStream(
  4879. ::google::protobuf::io::CodedInputStream* input) {
  4880. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4881. ::google::protobuf::uint32 tag;
  4882. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MapOut)
  4883. for (;;) {
  4884. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4885. tag = p.first;
  4886. if (!p.second) goto handle_unusual;
  4887. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4888. // map<string, .google.protobuf.testing.MapM> map1 = 1;
  4889. case 1: {
  4890. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4891. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4892. MapOut_Map1Entry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  4893. MapOut_Map1Entry_DoNotUse,
  4894. ::std::string, ::google::protobuf::testing::MapM,
  4895. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  4896. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  4897. 0 >,
  4898. ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapM > > parser(&map1_);
  4899. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  4900. input, &parser));
  4901. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4902. parser.key().data(), static_cast<int>(parser.key().length()),
  4903. ::google::protobuf::internal::WireFormatLite::PARSE,
  4904. "google.protobuf.testing.MapOut.Map1Entry.key"));
  4905. } else {
  4906. goto handle_unusual;
  4907. }
  4908. break;
  4909. }
  4910. // map<string, .google.protobuf.testing.MapOut> map2 = 2;
  4911. case 2: {
  4912. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4913. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  4914. MapOut_Map2Entry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  4915. MapOut_Map2Entry_DoNotUse,
  4916. ::std::string, ::google::protobuf::testing::MapOut,
  4917. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  4918. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  4919. 0 >,
  4920. ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOut > > parser(&map2_);
  4921. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  4922. input, &parser));
  4923. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4924. parser.key().data(), static_cast<int>(parser.key().length()),
  4925. ::google::protobuf::internal::WireFormatLite::PARSE,
  4926. "google.protobuf.testing.MapOut.Map2Entry.key"));
  4927. } else {
  4928. goto handle_unusual;
  4929. }
  4930. break;
  4931. }
  4932. // map<int32, string> map3 = 3;
  4933. case 3: {
  4934. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4935. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  4936. MapOut_Map3Entry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  4937. MapOut_Map3Entry_DoNotUse,
  4938. ::google::protobuf::int32, ::std::string,
  4939. ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
  4940. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  4941. 0 >,
  4942. ::google::protobuf::Map< ::google::protobuf::int32, ::std::string > > parser(&map3_);
  4943. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  4944. input, &parser));
  4945. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4946. parser.value().data(), static_cast<int>(parser.value().length()),
  4947. ::google::protobuf::internal::WireFormatLite::PARSE,
  4948. "google.protobuf.testing.MapOut.Map3Entry.value"));
  4949. } else {
  4950. goto handle_unusual;
  4951. }
  4952. break;
  4953. }
  4954. // string bar = 4;
  4955. case 4: {
  4956. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4957. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  4958. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  4959. input, this->mutable_bar()));
  4960. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4961. this->bar().data(), static_cast<int>(this->bar().length()),
  4962. ::google::protobuf::internal::WireFormatLite::PARSE,
  4963. "google.protobuf.testing.MapOut.bar"));
  4964. } else {
  4965. goto handle_unusual;
  4966. }
  4967. break;
  4968. }
  4969. // map<bool, string> map4 = 5;
  4970. case 5: {
  4971. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4972. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  4973. MapOut_Map4Entry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  4974. MapOut_Map4Entry_DoNotUse,
  4975. bool, ::std::string,
  4976. ::google::protobuf::internal::WireFormatLite::TYPE_BOOL,
  4977. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  4978. 0 >,
  4979. ::google::protobuf::Map< bool, ::std::string > > parser(&map4_);
  4980. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  4981. input, &parser));
  4982. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4983. parser.value().data(), static_cast<int>(parser.value().length()),
  4984. ::google::protobuf::internal::WireFormatLite::PARSE,
  4985. "google.protobuf.testing.MapOut.Map4Entry.value"));
  4986. } else {
  4987. goto handle_unusual;
  4988. }
  4989. break;
  4990. }
  4991. default: {
  4992. handle_unusual:
  4993. if (tag == 0) {
  4994. goto success;
  4995. }
  4996. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4997. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4998. break;
  4999. }
  5000. }
  5001. }
  5002. success:
  5003. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MapOut)
  5004. return true;
  5005. failure:
  5006. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MapOut)
  5007. return false;
  5008. #undef DO_
  5009. }
  5010. void MapOut::SerializeWithCachedSizes(
  5011. ::google::protobuf::io::CodedOutputStream* output) const {
  5012. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MapOut)
  5013. ::google::protobuf::uint32 cached_has_bits = 0;
  5014. (void) cached_has_bits;
  5015. // map<string, .google.protobuf.testing.MapM> map1 = 1;
  5016. if (!this->map1().empty()) {
  5017. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapM >::const_pointer
  5018. ConstPtr;
  5019. typedef ConstPtr SortItem;
  5020. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  5021. struct Utf8Check {
  5022. static void Check(ConstPtr p) {
  5023. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5024. p->first.data(), static_cast<int>(p->first.length()),
  5025. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5026. "google.protobuf.testing.MapOut.Map1Entry.key");
  5027. }
  5028. };
  5029. if (output->IsSerializationDeterministic() &&
  5030. this->map1().size() > 1) {
  5031. ::std::unique_ptr<SortItem[]> items(
  5032. new SortItem[this->map1().size()]);
  5033. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapM >::size_type size_type;
  5034. size_type n = 0;
  5035. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapM >::const_iterator
  5036. it = this->map1().begin();
  5037. it != this->map1().end(); ++it, ++n) {
  5038. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  5039. }
  5040. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  5041. ::std::unique_ptr<MapOut_Map1Entry_DoNotUse> entry;
  5042. for (size_type i = 0; i < n; i++) {
  5043. entry.reset(map1_.NewEntryWrapper(
  5044. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  5045. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5046. 1, *entry, output);
  5047. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  5048. }
  5049. } else {
  5050. ::std::unique_ptr<MapOut_Map1Entry_DoNotUse> entry;
  5051. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapM >::const_iterator
  5052. it = this->map1().begin();
  5053. it != this->map1().end(); ++it) {
  5054. entry.reset(map1_.NewEntryWrapper(
  5055. it->first, it->second));
  5056. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5057. 1, *entry, output);
  5058. Utf8Check::Check(&*it);
  5059. }
  5060. }
  5061. }
  5062. // map<string, .google.protobuf.testing.MapOut> map2 = 2;
  5063. if (!this->map2().empty()) {
  5064. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOut >::const_pointer
  5065. ConstPtr;
  5066. typedef ConstPtr SortItem;
  5067. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  5068. struct Utf8Check {
  5069. static void Check(ConstPtr p) {
  5070. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5071. p->first.data(), static_cast<int>(p->first.length()),
  5072. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5073. "google.protobuf.testing.MapOut.Map2Entry.key");
  5074. }
  5075. };
  5076. if (output->IsSerializationDeterministic() &&
  5077. this->map2().size() > 1) {
  5078. ::std::unique_ptr<SortItem[]> items(
  5079. new SortItem[this->map2().size()]);
  5080. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOut >::size_type size_type;
  5081. size_type n = 0;
  5082. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOut >::const_iterator
  5083. it = this->map2().begin();
  5084. it != this->map2().end(); ++it, ++n) {
  5085. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  5086. }
  5087. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  5088. ::std::unique_ptr<MapOut_Map2Entry_DoNotUse> entry;
  5089. for (size_type i = 0; i < n; i++) {
  5090. entry.reset(map2_.NewEntryWrapper(
  5091. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  5092. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5093. 2, *entry, output);
  5094. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  5095. }
  5096. } else {
  5097. ::std::unique_ptr<MapOut_Map2Entry_DoNotUse> entry;
  5098. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOut >::const_iterator
  5099. it = this->map2().begin();
  5100. it != this->map2().end(); ++it) {
  5101. entry.reset(map2_.NewEntryWrapper(
  5102. it->first, it->second));
  5103. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5104. 2, *entry, output);
  5105. Utf8Check::Check(&*it);
  5106. }
  5107. }
  5108. }
  5109. // map<int32, string> map3 = 3;
  5110. if (!this->map3().empty()) {
  5111. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_pointer
  5112. ConstPtr;
  5113. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  5114. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  5115. struct Utf8Check {
  5116. static void Check(ConstPtr p) {
  5117. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5118. p->second.data(), static_cast<int>(p->second.length()),
  5119. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5120. "google.protobuf.testing.MapOut.Map3Entry.value");
  5121. }
  5122. };
  5123. if (output->IsSerializationDeterministic() &&
  5124. this->map3().size() > 1) {
  5125. ::std::unique_ptr<SortItem[]> items(
  5126. new SortItem[this->map3().size()]);
  5127. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::size_type size_type;
  5128. size_type n = 0;
  5129. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  5130. it = this->map3().begin();
  5131. it != this->map3().end(); ++it, ++n) {
  5132. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  5133. }
  5134. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  5135. ::std::unique_ptr<MapOut_Map3Entry_DoNotUse> entry;
  5136. for (size_type i = 0; i < n; i++) {
  5137. entry.reset(map3_.NewEntryWrapper(
  5138. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  5139. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5140. 3, *entry, output);
  5141. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)].second);
  5142. }
  5143. } else {
  5144. ::std::unique_ptr<MapOut_Map3Entry_DoNotUse> entry;
  5145. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  5146. it = this->map3().begin();
  5147. it != this->map3().end(); ++it) {
  5148. entry.reset(map3_.NewEntryWrapper(
  5149. it->first, it->second));
  5150. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5151. 3, *entry, output);
  5152. Utf8Check::Check(&*it);
  5153. }
  5154. }
  5155. }
  5156. // string bar = 4;
  5157. if (this->bar().size() > 0) {
  5158. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5159. this->bar().data(), static_cast<int>(this->bar().length()),
  5160. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5161. "google.protobuf.testing.MapOut.bar");
  5162. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  5163. 4, this->bar(), output);
  5164. }
  5165. // map<bool, string> map4 = 5;
  5166. if (!this->map4().empty()) {
  5167. typedef ::google::protobuf::Map< bool, ::std::string >::const_pointer
  5168. ConstPtr;
  5169. typedef ::google::protobuf::internal::SortItem< bool, ConstPtr > SortItem;
  5170. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  5171. struct Utf8Check {
  5172. static void Check(ConstPtr p) {
  5173. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5174. p->second.data(), static_cast<int>(p->second.length()),
  5175. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5176. "google.protobuf.testing.MapOut.Map4Entry.value");
  5177. }
  5178. };
  5179. if (output->IsSerializationDeterministic() &&
  5180. this->map4().size() > 1) {
  5181. ::std::unique_ptr<SortItem[]> items(
  5182. new SortItem[this->map4().size()]);
  5183. typedef ::google::protobuf::Map< bool, ::std::string >::size_type size_type;
  5184. size_type n = 0;
  5185. for (::google::protobuf::Map< bool, ::std::string >::const_iterator
  5186. it = this->map4().begin();
  5187. it != this->map4().end(); ++it, ++n) {
  5188. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  5189. }
  5190. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  5191. ::std::unique_ptr<MapOut_Map4Entry_DoNotUse> entry;
  5192. for (size_type i = 0; i < n; i++) {
  5193. entry.reset(map4_.NewEntryWrapper(
  5194. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  5195. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5196. 5, *entry, output);
  5197. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)].second);
  5198. }
  5199. } else {
  5200. ::std::unique_ptr<MapOut_Map4Entry_DoNotUse> entry;
  5201. for (::google::protobuf::Map< bool, ::std::string >::const_iterator
  5202. it = this->map4().begin();
  5203. it != this->map4().end(); ++it) {
  5204. entry.reset(map4_.NewEntryWrapper(
  5205. it->first, it->second));
  5206. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5207. 5, *entry, output);
  5208. Utf8Check::Check(&*it);
  5209. }
  5210. }
  5211. }
  5212. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5213. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5214. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5215. }
  5216. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MapOut)
  5217. }
  5218. ::google::protobuf::uint8* MapOut::InternalSerializeWithCachedSizesToArray(
  5219. bool deterministic, ::google::protobuf::uint8* target) const {
  5220. (void)deterministic; // Unused
  5221. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MapOut)
  5222. ::google::protobuf::uint32 cached_has_bits = 0;
  5223. (void) cached_has_bits;
  5224. // map<string, .google.protobuf.testing.MapM> map1 = 1;
  5225. if (!this->map1().empty()) {
  5226. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapM >::const_pointer
  5227. ConstPtr;
  5228. typedef ConstPtr SortItem;
  5229. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  5230. struct Utf8Check {
  5231. static void Check(ConstPtr p) {
  5232. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5233. p->first.data(), static_cast<int>(p->first.length()),
  5234. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5235. "google.protobuf.testing.MapOut.Map1Entry.key");
  5236. }
  5237. };
  5238. if (deterministic &&
  5239. this->map1().size() > 1) {
  5240. ::std::unique_ptr<SortItem[]> items(
  5241. new SortItem[this->map1().size()]);
  5242. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapM >::size_type size_type;
  5243. size_type n = 0;
  5244. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapM >::const_iterator
  5245. it = this->map1().begin();
  5246. it != this->map1().end(); ++it, ++n) {
  5247. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  5248. }
  5249. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  5250. ::std::unique_ptr<MapOut_Map1Entry_DoNotUse> entry;
  5251. for (size_type i = 0; i < n; i++) {
  5252. entry.reset(map1_.NewEntryWrapper(
  5253. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  5254. target = ::google::protobuf::internal::WireFormatLite::
  5255. InternalWriteMessageNoVirtualToArray(
  5256. 1, *entry, deterministic, target);
  5257. ;
  5258. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  5259. }
  5260. } else {
  5261. ::std::unique_ptr<MapOut_Map1Entry_DoNotUse> entry;
  5262. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapM >::const_iterator
  5263. it = this->map1().begin();
  5264. it != this->map1().end(); ++it) {
  5265. entry.reset(map1_.NewEntryWrapper(
  5266. it->first, it->second));
  5267. target = ::google::protobuf::internal::WireFormatLite::
  5268. InternalWriteMessageNoVirtualToArray(
  5269. 1, *entry, deterministic, target);
  5270. ;
  5271. Utf8Check::Check(&*it);
  5272. }
  5273. }
  5274. }
  5275. // map<string, .google.protobuf.testing.MapOut> map2 = 2;
  5276. if (!this->map2().empty()) {
  5277. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOut >::const_pointer
  5278. ConstPtr;
  5279. typedef ConstPtr SortItem;
  5280. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  5281. struct Utf8Check {
  5282. static void Check(ConstPtr p) {
  5283. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5284. p->first.data(), static_cast<int>(p->first.length()),
  5285. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5286. "google.protobuf.testing.MapOut.Map2Entry.key");
  5287. }
  5288. };
  5289. if (deterministic &&
  5290. this->map2().size() > 1) {
  5291. ::std::unique_ptr<SortItem[]> items(
  5292. new SortItem[this->map2().size()]);
  5293. typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOut >::size_type size_type;
  5294. size_type n = 0;
  5295. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOut >::const_iterator
  5296. it = this->map2().begin();
  5297. it != this->map2().end(); ++it, ++n) {
  5298. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  5299. }
  5300. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  5301. ::std::unique_ptr<MapOut_Map2Entry_DoNotUse> entry;
  5302. for (size_type i = 0; i < n; i++) {
  5303. entry.reset(map2_.NewEntryWrapper(
  5304. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  5305. target = ::google::protobuf::internal::WireFormatLite::
  5306. InternalWriteMessageNoVirtualToArray(
  5307. 2, *entry, deterministic, target);
  5308. ;
  5309. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  5310. }
  5311. } else {
  5312. ::std::unique_ptr<MapOut_Map2Entry_DoNotUse> entry;
  5313. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOut >::const_iterator
  5314. it = this->map2().begin();
  5315. it != this->map2().end(); ++it) {
  5316. entry.reset(map2_.NewEntryWrapper(
  5317. it->first, it->second));
  5318. target = ::google::protobuf::internal::WireFormatLite::
  5319. InternalWriteMessageNoVirtualToArray(
  5320. 2, *entry, deterministic, target);
  5321. ;
  5322. Utf8Check::Check(&*it);
  5323. }
  5324. }
  5325. }
  5326. // map<int32, string> map3 = 3;
  5327. if (!this->map3().empty()) {
  5328. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_pointer
  5329. ConstPtr;
  5330. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  5331. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  5332. struct Utf8Check {
  5333. static void Check(ConstPtr p) {
  5334. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5335. p->second.data(), static_cast<int>(p->second.length()),
  5336. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5337. "google.protobuf.testing.MapOut.Map3Entry.value");
  5338. }
  5339. };
  5340. if (deterministic &&
  5341. this->map3().size() > 1) {
  5342. ::std::unique_ptr<SortItem[]> items(
  5343. new SortItem[this->map3().size()]);
  5344. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::size_type size_type;
  5345. size_type n = 0;
  5346. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  5347. it = this->map3().begin();
  5348. it != this->map3().end(); ++it, ++n) {
  5349. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  5350. }
  5351. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  5352. ::std::unique_ptr<MapOut_Map3Entry_DoNotUse> entry;
  5353. for (size_type i = 0; i < n; i++) {
  5354. entry.reset(map3_.NewEntryWrapper(
  5355. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  5356. target = ::google::protobuf::internal::WireFormatLite::
  5357. InternalWriteMessageNoVirtualToArray(
  5358. 3, *entry, deterministic, target);
  5359. ;
  5360. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)].second);
  5361. }
  5362. } else {
  5363. ::std::unique_ptr<MapOut_Map3Entry_DoNotUse> entry;
  5364. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  5365. it = this->map3().begin();
  5366. it != this->map3().end(); ++it) {
  5367. entry.reset(map3_.NewEntryWrapper(
  5368. it->first, it->second));
  5369. target = ::google::protobuf::internal::WireFormatLite::
  5370. InternalWriteMessageNoVirtualToArray(
  5371. 3, *entry, deterministic, target);
  5372. ;
  5373. Utf8Check::Check(&*it);
  5374. }
  5375. }
  5376. }
  5377. // string bar = 4;
  5378. if (this->bar().size() > 0) {
  5379. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5380. this->bar().data(), static_cast<int>(this->bar().length()),
  5381. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5382. "google.protobuf.testing.MapOut.bar");
  5383. target =
  5384. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  5385. 4, this->bar(), target);
  5386. }
  5387. // map<bool, string> map4 = 5;
  5388. if (!this->map4().empty()) {
  5389. typedef ::google::protobuf::Map< bool, ::std::string >::const_pointer
  5390. ConstPtr;
  5391. typedef ::google::protobuf::internal::SortItem< bool, ConstPtr > SortItem;
  5392. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  5393. struct Utf8Check {
  5394. static void Check(ConstPtr p) {
  5395. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5396. p->second.data(), static_cast<int>(p->second.length()),
  5397. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5398. "google.protobuf.testing.MapOut.Map4Entry.value");
  5399. }
  5400. };
  5401. if (deterministic &&
  5402. this->map4().size() > 1) {
  5403. ::std::unique_ptr<SortItem[]> items(
  5404. new SortItem[this->map4().size()]);
  5405. typedef ::google::protobuf::Map< bool, ::std::string >::size_type size_type;
  5406. size_type n = 0;
  5407. for (::google::protobuf::Map< bool, ::std::string >::const_iterator
  5408. it = this->map4().begin();
  5409. it != this->map4().end(); ++it, ++n) {
  5410. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  5411. }
  5412. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  5413. ::std::unique_ptr<MapOut_Map4Entry_DoNotUse> entry;
  5414. for (size_type i = 0; i < n; i++) {
  5415. entry.reset(map4_.NewEntryWrapper(
  5416. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  5417. target = ::google::protobuf::internal::WireFormatLite::
  5418. InternalWriteMessageNoVirtualToArray(
  5419. 5, *entry, deterministic, target);
  5420. ;
  5421. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)].second);
  5422. }
  5423. } else {
  5424. ::std::unique_ptr<MapOut_Map4Entry_DoNotUse> entry;
  5425. for (::google::protobuf::Map< bool, ::std::string >::const_iterator
  5426. it = this->map4().begin();
  5427. it != this->map4().end(); ++it) {
  5428. entry.reset(map4_.NewEntryWrapper(
  5429. it->first, it->second));
  5430. target = ::google::protobuf::internal::WireFormatLite::
  5431. InternalWriteMessageNoVirtualToArray(
  5432. 5, *entry, deterministic, target);
  5433. ;
  5434. Utf8Check::Check(&*it);
  5435. }
  5436. }
  5437. }
  5438. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5439. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5440. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5441. }
  5442. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MapOut)
  5443. return target;
  5444. }
  5445. size_t MapOut::ByteSizeLong() const {
  5446. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MapOut)
  5447. size_t total_size = 0;
  5448. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5449. total_size +=
  5450. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5451. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5452. }
  5453. // map<string, .google.protobuf.testing.MapM> map1 = 1;
  5454. total_size += 1 *
  5455. ::google::protobuf::internal::FromIntSize(this->map1_size());
  5456. {
  5457. ::std::unique_ptr<MapOut_Map1Entry_DoNotUse> entry;
  5458. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapM >::const_iterator
  5459. it = this->map1().begin();
  5460. it != this->map1().end(); ++it) {
  5461. entry.reset(map1_.NewEntryWrapper(it->first, it->second));
  5462. total_size += ::google::protobuf::internal::WireFormatLite::
  5463. MessageSizeNoVirtual(*entry);
  5464. }
  5465. }
  5466. // map<string, .google.protobuf.testing.MapOut> map2 = 2;
  5467. total_size += 1 *
  5468. ::google::protobuf::internal::FromIntSize(this->map2_size());
  5469. {
  5470. ::std::unique_ptr<MapOut_Map2Entry_DoNotUse> entry;
  5471. for (::google::protobuf::Map< ::std::string, ::google::protobuf::testing::MapOut >::const_iterator
  5472. it = this->map2().begin();
  5473. it != this->map2().end(); ++it) {
  5474. entry.reset(map2_.NewEntryWrapper(it->first, it->second));
  5475. total_size += ::google::protobuf::internal::WireFormatLite::
  5476. MessageSizeNoVirtual(*entry);
  5477. }
  5478. }
  5479. // map<int32, string> map3 = 3;
  5480. total_size += 1 *
  5481. ::google::protobuf::internal::FromIntSize(this->map3_size());
  5482. {
  5483. ::std::unique_ptr<MapOut_Map3Entry_DoNotUse> entry;
  5484. for (::google::protobuf::Map< ::google::protobuf::int32, ::std::string >::const_iterator
  5485. it = this->map3().begin();
  5486. it != this->map3().end(); ++it) {
  5487. entry.reset(map3_.NewEntryWrapper(it->first, it->second));
  5488. total_size += ::google::protobuf::internal::WireFormatLite::
  5489. MessageSizeNoVirtual(*entry);
  5490. }
  5491. }
  5492. // map<bool, string> map4 = 5;
  5493. total_size += 1 *
  5494. ::google::protobuf::internal::FromIntSize(this->map4_size());
  5495. {
  5496. ::std::unique_ptr<MapOut_Map4Entry_DoNotUse> entry;
  5497. for (::google::protobuf::Map< bool, ::std::string >::const_iterator
  5498. it = this->map4().begin();
  5499. it != this->map4().end(); ++it) {
  5500. entry.reset(map4_.NewEntryWrapper(it->first, it->second));
  5501. total_size += ::google::protobuf::internal::WireFormatLite::
  5502. MessageSizeNoVirtual(*entry);
  5503. }
  5504. }
  5505. // string bar = 4;
  5506. if (this->bar().size() > 0) {
  5507. total_size += 1 +
  5508. ::google::protobuf::internal::WireFormatLite::StringSize(
  5509. this->bar());
  5510. }
  5511. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5512. SetCachedSize(cached_size);
  5513. return total_size;
  5514. }
  5515. void MapOut::MergeFrom(const ::google::protobuf::Message& from) {
  5516. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MapOut)
  5517. GOOGLE_DCHECK_NE(&from, this);
  5518. const MapOut* source =
  5519. ::google::protobuf::internal::DynamicCastToGenerated<const MapOut>(
  5520. &from);
  5521. if (source == NULL) {
  5522. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MapOut)
  5523. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5524. } else {
  5525. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MapOut)
  5526. MergeFrom(*source);
  5527. }
  5528. }
  5529. void MapOut::MergeFrom(const MapOut& from) {
  5530. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MapOut)
  5531. GOOGLE_DCHECK_NE(&from, this);
  5532. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5533. ::google::protobuf::uint32 cached_has_bits = 0;
  5534. (void) cached_has_bits;
  5535. map1_.MergeFrom(from.map1_);
  5536. map2_.MergeFrom(from.map2_);
  5537. map3_.MergeFrom(from.map3_);
  5538. map4_.MergeFrom(from.map4_);
  5539. if (from.bar().size() > 0) {
  5540. bar_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.bar_);
  5541. }
  5542. }
  5543. void MapOut::CopyFrom(const ::google::protobuf::Message& from) {
  5544. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MapOut)
  5545. if (&from == this) return;
  5546. Clear();
  5547. MergeFrom(from);
  5548. }
  5549. void MapOut::CopyFrom(const MapOut& from) {
  5550. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MapOut)
  5551. if (&from == this) return;
  5552. Clear();
  5553. MergeFrom(from);
  5554. }
  5555. bool MapOut::IsInitialized() const {
  5556. return true;
  5557. }
  5558. void MapOut::Swap(MapOut* other) {
  5559. if (other == this) return;
  5560. InternalSwap(other);
  5561. }
  5562. void MapOut::InternalSwap(MapOut* other) {
  5563. using std::swap;
  5564. map1_.Swap(&other->map1_);
  5565. map2_.Swap(&other->map2_);
  5566. map3_.Swap(&other->map3_);
  5567. map4_.Swap(&other->map4_);
  5568. bar_.Swap(&other->bar_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  5569. GetArenaNoVirtual());
  5570. _internal_metadata_.Swap(&other->_internal_metadata_);
  5571. }
  5572. ::google::protobuf::Metadata MapOut::GetMetadata() const {
  5573. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  5574. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  5575. }
  5576. // ===================================================================
  5577. void MapOutWireFormat_Map1Entry::InitAsDefaultInstance() {
  5578. ::google::protobuf::testing::_MapOutWireFormat_Map1Entry_default_instance_._instance.get_mutable()->value_ = const_cast< ::google::protobuf::testing::MapM*>(
  5579. ::google::protobuf::testing::MapM::internal_default_instance());
  5580. }
  5581. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5582. const int MapOutWireFormat_Map1Entry::kKeyFieldNumber;
  5583. const int MapOutWireFormat_Map1Entry::kValueFieldNumber;
  5584. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5585. MapOutWireFormat_Map1Entry::MapOutWireFormat_Map1Entry()
  5586. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  5587. ::google::protobuf::internal::InitSCC(
  5588. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOutWireFormat_Map1Entry.base);
  5589. SharedCtor();
  5590. // @@protoc_insertion_point(constructor:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5591. }
  5592. MapOutWireFormat_Map1Entry::MapOutWireFormat_Map1Entry(const MapOutWireFormat_Map1Entry& from)
  5593. : ::google::protobuf::Message(),
  5594. _internal_metadata_(NULL) {
  5595. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5596. key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5597. if (from.key().size() > 0) {
  5598. key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
  5599. }
  5600. if (from.has_value()) {
  5601. value_ = new ::google::protobuf::testing::MapM(*from.value_);
  5602. } else {
  5603. value_ = NULL;
  5604. }
  5605. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5606. }
  5607. void MapOutWireFormat_Map1Entry::SharedCtor() {
  5608. key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5609. value_ = NULL;
  5610. }
  5611. MapOutWireFormat_Map1Entry::~MapOutWireFormat_Map1Entry() {
  5612. // @@protoc_insertion_point(destructor:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5613. SharedDtor();
  5614. }
  5615. void MapOutWireFormat_Map1Entry::SharedDtor() {
  5616. key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5617. if (this != internal_default_instance()) delete value_;
  5618. }
  5619. void MapOutWireFormat_Map1Entry::SetCachedSize(int size) const {
  5620. _cached_size_.Set(size);
  5621. }
  5622. const ::google::protobuf::Descriptor* MapOutWireFormat_Map1Entry::descriptor() {
  5623. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  5624. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  5625. }
  5626. const MapOutWireFormat_Map1Entry& MapOutWireFormat_Map1Entry::default_instance() {
  5627. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOutWireFormat_Map1Entry.base);
  5628. return *internal_default_instance();
  5629. }
  5630. void MapOutWireFormat_Map1Entry::Clear() {
  5631. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5632. ::google::protobuf::uint32 cached_has_bits = 0;
  5633. // Prevent compiler warnings about cached_has_bits being unused
  5634. (void) cached_has_bits;
  5635. key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5636. if (GetArenaNoVirtual() == NULL && value_ != NULL) {
  5637. delete value_;
  5638. }
  5639. value_ = NULL;
  5640. _internal_metadata_.Clear();
  5641. }
  5642. bool MapOutWireFormat_Map1Entry::MergePartialFromCodedStream(
  5643. ::google::protobuf::io::CodedInputStream* input) {
  5644. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5645. ::google::protobuf::uint32 tag;
  5646. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5647. for (;;) {
  5648. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5649. tag = p.first;
  5650. if (!p.second) goto handle_unusual;
  5651. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5652. // string key = 1;
  5653. case 1: {
  5654. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5655. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  5656. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  5657. input, this->mutable_key()));
  5658. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5659. this->key().data(), static_cast<int>(this->key().length()),
  5660. ::google::protobuf::internal::WireFormatLite::PARSE,
  5661. "google.protobuf.testing.MapOutWireFormat.Map1Entry.key"));
  5662. } else {
  5663. goto handle_unusual;
  5664. }
  5665. break;
  5666. }
  5667. // .google.protobuf.testing.MapM value = 2;
  5668. case 2: {
  5669. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5670. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  5671. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5672. input, mutable_value()));
  5673. } else {
  5674. goto handle_unusual;
  5675. }
  5676. break;
  5677. }
  5678. default: {
  5679. handle_unusual:
  5680. if (tag == 0) {
  5681. goto success;
  5682. }
  5683. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5684. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5685. break;
  5686. }
  5687. }
  5688. }
  5689. success:
  5690. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5691. return true;
  5692. failure:
  5693. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5694. return false;
  5695. #undef DO_
  5696. }
  5697. void MapOutWireFormat_Map1Entry::SerializeWithCachedSizes(
  5698. ::google::protobuf::io::CodedOutputStream* output) const {
  5699. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5700. ::google::protobuf::uint32 cached_has_bits = 0;
  5701. (void) cached_has_bits;
  5702. // string key = 1;
  5703. if (this->key().size() > 0) {
  5704. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5705. this->key().data(), static_cast<int>(this->key().length()),
  5706. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5707. "google.protobuf.testing.MapOutWireFormat.Map1Entry.key");
  5708. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  5709. 1, this->key(), output);
  5710. }
  5711. // .google.protobuf.testing.MapM value = 2;
  5712. if (this->has_value()) {
  5713. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5714. 2, this->_internal_value(), output);
  5715. }
  5716. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5717. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5718. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5719. }
  5720. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5721. }
  5722. ::google::protobuf::uint8* MapOutWireFormat_Map1Entry::InternalSerializeWithCachedSizesToArray(
  5723. bool deterministic, ::google::protobuf::uint8* target) const {
  5724. (void)deterministic; // Unused
  5725. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5726. ::google::protobuf::uint32 cached_has_bits = 0;
  5727. (void) cached_has_bits;
  5728. // string key = 1;
  5729. if (this->key().size() > 0) {
  5730. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5731. this->key().data(), static_cast<int>(this->key().length()),
  5732. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5733. "google.protobuf.testing.MapOutWireFormat.Map1Entry.key");
  5734. target =
  5735. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  5736. 1, this->key(), target);
  5737. }
  5738. // .google.protobuf.testing.MapM value = 2;
  5739. if (this->has_value()) {
  5740. target = ::google::protobuf::internal::WireFormatLite::
  5741. InternalWriteMessageToArray(
  5742. 2, this->_internal_value(), deterministic, target);
  5743. }
  5744. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5745. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5746. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5747. }
  5748. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5749. return target;
  5750. }
  5751. size_t MapOutWireFormat_Map1Entry::ByteSizeLong() const {
  5752. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5753. size_t total_size = 0;
  5754. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5755. total_size +=
  5756. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5757. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5758. }
  5759. // string key = 1;
  5760. if (this->key().size() > 0) {
  5761. total_size += 1 +
  5762. ::google::protobuf::internal::WireFormatLite::StringSize(
  5763. this->key());
  5764. }
  5765. // .google.protobuf.testing.MapM value = 2;
  5766. if (this->has_value()) {
  5767. total_size += 1 +
  5768. ::google::protobuf::internal::WireFormatLite::MessageSize(
  5769. *value_);
  5770. }
  5771. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5772. SetCachedSize(cached_size);
  5773. return total_size;
  5774. }
  5775. void MapOutWireFormat_Map1Entry::MergeFrom(const ::google::protobuf::Message& from) {
  5776. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5777. GOOGLE_DCHECK_NE(&from, this);
  5778. const MapOutWireFormat_Map1Entry* source =
  5779. ::google::protobuf::internal::DynamicCastToGenerated<const MapOutWireFormat_Map1Entry>(
  5780. &from);
  5781. if (source == NULL) {
  5782. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5783. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5784. } else {
  5785. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5786. MergeFrom(*source);
  5787. }
  5788. }
  5789. void MapOutWireFormat_Map1Entry::MergeFrom(const MapOutWireFormat_Map1Entry& from) {
  5790. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5791. GOOGLE_DCHECK_NE(&from, this);
  5792. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5793. ::google::protobuf::uint32 cached_has_bits = 0;
  5794. (void) cached_has_bits;
  5795. if (from.key().size() > 0) {
  5796. key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
  5797. }
  5798. if (from.has_value()) {
  5799. mutable_value()->::google::protobuf::testing::MapM::MergeFrom(from.value());
  5800. }
  5801. }
  5802. void MapOutWireFormat_Map1Entry::CopyFrom(const ::google::protobuf::Message& from) {
  5803. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5804. if (&from == this) return;
  5805. Clear();
  5806. MergeFrom(from);
  5807. }
  5808. void MapOutWireFormat_Map1Entry::CopyFrom(const MapOutWireFormat_Map1Entry& from) {
  5809. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MapOutWireFormat.Map1Entry)
  5810. if (&from == this) return;
  5811. Clear();
  5812. MergeFrom(from);
  5813. }
  5814. bool MapOutWireFormat_Map1Entry::IsInitialized() const {
  5815. return true;
  5816. }
  5817. void MapOutWireFormat_Map1Entry::Swap(MapOutWireFormat_Map1Entry* other) {
  5818. if (other == this) return;
  5819. InternalSwap(other);
  5820. }
  5821. void MapOutWireFormat_Map1Entry::InternalSwap(MapOutWireFormat_Map1Entry* other) {
  5822. using std::swap;
  5823. key_.Swap(&other->key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  5824. GetArenaNoVirtual());
  5825. swap(value_, other->value_);
  5826. _internal_metadata_.Swap(&other->_internal_metadata_);
  5827. }
  5828. ::google::protobuf::Metadata MapOutWireFormat_Map1Entry::GetMetadata() const {
  5829. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  5830. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  5831. }
  5832. // ===================================================================
  5833. void MapOutWireFormat_Map2Entry::InitAsDefaultInstance() {
  5834. ::google::protobuf::testing::_MapOutWireFormat_Map2Entry_default_instance_._instance.get_mutable()->value_ = const_cast< ::google::protobuf::testing::MapOut*>(
  5835. ::google::protobuf::testing::MapOut::internal_default_instance());
  5836. }
  5837. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5838. const int MapOutWireFormat_Map2Entry::kKeyFieldNumber;
  5839. const int MapOutWireFormat_Map2Entry::kValueFieldNumber;
  5840. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5841. MapOutWireFormat_Map2Entry::MapOutWireFormat_Map2Entry()
  5842. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  5843. ::google::protobuf::internal::InitSCC(
  5844. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOutWireFormat_Map2Entry.base);
  5845. SharedCtor();
  5846. // @@protoc_insertion_point(constructor:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  5847. }
  5848. MapOutWireFormat_Map2Entry::MapOutWireFormat_Map2Entry(const MapOutWireFormat_Map2Entry& from)
  5849. : ::google::protobuf::Message(),
  5850. _internal_metadata_(NULL) {
  5851. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5852. key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5853. if (from.key().size() > 0) {
  5854. key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
  5855. }
  5856. if (from.has_value()) {
  5857. value_ = new ::google::protobuf::testing::MapOut(*from.value_);
  5858. } else {
  5859. value_ = NULL;
  5860. }
  5861. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  5862. }
  5863. void MapOutWireFormat_Map2Entry::SharedCtor() {
  5864. key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5865. value_ = NULL;
  5866. }
  5867. MapOutWireFormat_Map2Entry::~MapOutWireFormat_Map2Entry() {
  5868. // @@protoc_insertion_point(destructor:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  5869. SharedDtor();
  5870. }
  5871. void MapOutWireFormat_Map2Entry::SharedDtor() {
  5872. key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5873. if (this != internal_default_instance()) delete value_;
  5874. }
  5875. void MapOutWireFormat_Map2Entry::SetCachedSize(int size) const {
  5876. _cached_size_.Set(size);
  5877. }
  5878. const ::google::protobuf::Descriptor* MapOutWireFormat_Map2Entry::descriptor() {
  5879. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  5880. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  5881. }
  5882. const MapOutWireFormat_Map2Entry& MapOutWireFormat_Map2Entry::default_instance() {
  5883. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOutWireFormat_Map2Entry.base);
  5884. return *internal_default_instance();
  5885. }
  5886. void MapOutWireFormat_Map2Entry::Clear() {
  5887. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  5888. ::google::protobuf::uint32 cached_has_bits = 0;
  5889. // Prevent compiler warnings about cached_has_bits being unused
  5890. (void) cached_has_bits;
  5891. key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5892. if (GetArenaNoVirtual() == NULL && value_ != NULL) {
  5893. delete value_;
  5894. }
  5895. value_ = NULL;
  5896. _internal_metadata_.Clear();
  5897. }
  5898. bool MapOutWireFormat_Map2Entry::MergePartialFromCodedStream(
  5899. ::google::protobuf::io::CodedInputStream* input) {
  5900. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5901. ::google::protobuf::uint32 tag;
  5902. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  5903. for (;;) {
  5904. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5905. tag = p.first;
  5906. if (!p.second) goto handle_unusual;
  5907. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5908. // string key = 1;
  5909. case 1: {
  5910. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5911. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  5912. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  5913. input, this->mutable_key()));
  5914. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5915. this->key().data(), static_cast<int>(this->key().length()),
  5916. ::google::protobuf::internal::WireFormatLite::PARSE,
  5917. "google.protobuf.testing.MapOutWireFormat.Map2Entry.key"));
  5918. } else {
  5919. goto handle_unusual;
  5920. }
  5921. break;
  5922. }
  5923. // .google.protobuf.testing.MapOut value = 2;
  5924. case 2: {
  5925. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5926. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  5927. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5928. input, mutable_value()));
  5929. } else {
  5930. goto handle_unusual;
  5931. }
  5932. break;
  5933. }
  5934. default: {
  5935. handle_unusual:
  5936. if (tag == 0) {
  5937. goto success;
  5938. }
  5939. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5940. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5941. break;
  5942. }
  5943. }
  5944. }
  5945. success:
  5946. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  5947. return true;
  5948. failure:
  5949. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  5950. return false;
  5951. #undef DO_
  5952. }
  5953. void MapOutWireFormat_Map2Entry::SerializeWithCachedSizes(
  5954. ::google::protobuf::io::CodedOutputStream* output) const {
  5955. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  5956. ::google::protobuf::uint32 cached_has_bits = 0;
  5957. (void) cached_has_bits;
  5958. // string key = 1;
  5959. if (this->key().size() > 0) {
  5960. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5961. this->key().data(), static_cast<int>(this->key().length()),
  5962. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5963. "google.protobuf.testing.MapOutWireFormat.Map2Entry.key");
  5964. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  5965. 1, this->key(), output);
  5966. }
  5967. // .google.protobuf.testing.MapOut value = 2;
  5968. if (this->has_value()) {
  5969. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5970. 2, this->_internal_value(), output);
  5971. }
  5972. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5973. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5974. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5975. }
  5976. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  5977. }
  5978. ::google::protobuf::uint8* MapOutWireFormat_Map2Entry::InternalSerializeWithCachedSizesToArray(
  5979. bool deterministic, ::google::protobuf::uint8* target) const {
  5980. (void)deterministic; // Unused
  5981. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  5982. ::google::protobuf::uint32 cached_has_bits = 0;
  5983. (void) cached_has_bits;
  5984. // string key = 1;
  5985. if (this->key().size() > 0) {
  5986. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5987. this->key().data(), static_cast<int>(this->key().length()),
  5988. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5989. "google.protobuf.testing.MapOutWireFormat.Map2Entry.key");
  5990. target =
  5991. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  5992. 1, this->key(), target);
  5993. }
  5994. // .google.protobuf.testing.MapOut value = 2;
  5995. if (this->has_value()) {
  5996. target = ::google::protobuf::internal::WireFormatLite::
  5997. InternalWriteMessageToArray(
  5998. 2, this->_internal_value(), deterministic, target);
  5999. }
  6000. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6001. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  6002. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  6003. }
  6004. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  6005. return target;
  6006. }
  6007. size_t MapOutWireFormat_Map2Entry::ByteSizeLong() const {
  6008. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  6009. size_t total_size = 0;
  6010. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6011. total_size +=
  6012. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  6013. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  6014. }
  6015. // string key = 1;
  6016. if (this->key().size() > 0) {
  6017. total_size += 1 +
  6018. ::google::protobuf::internal::WireFormatLite::StringSize(
  6019. this->key());
  6020. }
  6021. // .google.protobuf.testing.MapOut value = 2;
  6022. if (this->has_value()) {
  6023. total_size += 1 +
  6024. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6025. *value_);
  6026. }
  6027. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6028. SetCachedSize(cached_size);
  6029. return total_size;
  6030. }
  6031. void MapOutWireFormat_Map2Entry::MergeFrom(const ::google::protobuf::Message& from) {
  6032. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  6033. GOOGLE_DCHECK_NE(&from, this);
  6034. const MapOutWireFormat_Map2Entry* source =
  6035. ::google::protobuf::internal::DynamicCastToGenerated<const MapOutWireFormat_Map2Entry>(
  6036. &from);
  6037. if (source == NULL) {
  6038. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  6039. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  6040. } else {
  6041. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  6042. MergeFrom(*source);
  6043. }
  6044. }
  6045. void MapOutWireFormat_Map2Entry::MergeFrom(const MapOutWireFormat_Map2Entry& from) {
  6046. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  6047. GOOGLE_DCHECK_NE(&from, this);
  6048. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6049. ::google::protobuf::uint32 cached_has_bits = 0;
  6050. (void) cached_has_bits;
  6051. if (from.key().size() > 0) {
  6052. key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
  6053. }
  6054. if (from.has_value()) {
  6055. mutable_value()->::google::protobuf::testing::MapOut::MergeFrom(from.value());
  6056. }
  6057. }
  6058. void MapOutWireFormat_Map2Entry::CopyFrom(const ::google::protobuf::Message& from) {
  6059. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  6060. if (&from == this) return;
  6061. Clear();
  6062. MergeFrom(from);
  6063. }
  6064. void MapOutWireFormat_Map2Entry::CopyFrom(const MapOutWireFormat_Map2Entry& from) {
  6065. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MapOutWireFormat.Map2Entry)
  6066. if (&from == this) return;
  6067. Clear();
  6068. MergeFrom(from);
  6069. }
  6070. bool MapOutWireFormat_Map2Entry::IsInitialized() const {
  6071. return true;
  6072. }
  6073. void MapOutWireFormat_Map2Entry::Swap(MapOutWireFormat_Map2Entry* other) {
  6074. if (other == this) return;
  6075. InternalSwap(other);
  6076. }
  6077. void MapOutWireFormat_Map2Entry::InternalSwap(MapOutWireFormat_Map2Entry* other) {
  6078. using std::swap;
  6079. key_.Swap(&other->key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  6080. GetArenaNoVirtual());
  6081. swap(value_, other->value_);
  6082. _internal_metadata_.Swap(&other->_internal_metadata_);
  6083. }
  6084. ::google::protobuf::Metadata MapOutWireFormat_Map2Entry::GetMetadata() const {
  6085. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  6086. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  6087. }
  6088. // ===================================================================
  6089. void MapOutWireFormat_Map3Entry::InitAsDefaultInstance() {
  6090. }
  6091. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6092. const int MapOutWireFormat_Map3Entry::kKeyFieldNumber;
  6093. const int MapOutWireFormat_Map3Entry::kValueFieldNumber;
  6094. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6095. MapOutWireFormat_Map3Entry::MapOutWireFormat_Map3Entry()
  6096. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  6097. ::google::protobuf::internal::InitSCC(
  6098. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOutWireFormat_Map3Entry.base);
  6099. SharedCtor();
  6100. // @@protoc_insertion_point(constructor:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6101. }
  6102. MapOutWireFormat_Map3Entry::MapOutWireFormat_Map3Entry(const MapOutWireFormat_Map3Entry& from)
  6103. : ::google::protobuf::Message(),
  6104. _internal_metadata_(NULL) {
  6105. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6106. value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6107. if (from.value().size() > 0) {
  6108. value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
  6109. }
  6110. key_ = from.key_;
  6111. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6112. }
  6113. void MapOutWireFormat_Map3Entry::SharedCtor() {
  6114. value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6115. key_ = 0;
  6116. }
  6117. MapOutWireFormat_Map3Entry::~MapOutWireFormat_Map3Entry() {
  6118. // @@protoc_insertion_point(destructor:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6119. SharedDtor();
  6120. }
  6121. void MapOutWireFormat_Map3Entry::SharedDtor() {
  6122. value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6123. }
  6124. void MapOutWireFormat_Map3Entry::SetCachedSize(int size) const {
  6125. _cached_size_.Set(size);
  6126. }
  6127. const ::google::protobuf::Descriptor* MapOutWireFormat_Map3Entry::descriptor() {
  6128. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  6129. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  6130. }
  6131. const MapOutWireFormat_Map3Entry& MapOutWireFormat_Map3Entry::default_instance() {
  6132. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOutWireFormat_Map3Entry.base);
  6133. return *internal_default_instance();
  6134. }
  6135. void MapOutWireFormat_Map3Entry::Clear() {
  6136. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6137. ::google::protobuf::uint32 cached_has_bits = 0;
  6138. // Prevent compiler warnings about cached_has_bits being unused
  6139. (void) cached_has_bits;
  6140. value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6141. key_ = 0;
  6142. _internal_metadata_.Clear();
  6143. }
  6144. bool MapOutWireFormat_Map3Entry::MergePartialFromCodedStream(
  6145. ::google::protobuf::io::CodedInputStream* input) {
  6146. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6147. ::google::protobuf::uint32 tag;
  6148. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6149. for (;;) {
  6150. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6151. tag = p.first;
  6152. if (!p.second) goto handle_unusual;
  6153. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6154. // int32 key = 1;
  6155. case 1: {
  6156. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6157. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  6158. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6159. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  6160. input, &key_)));
  6161. } else {
  6162. goto handle_unusual;
  6163. }
  6164. break;
  6165. }
  6166. // string value = 2;
  6167. case 2: {
  6168. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6169. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  6170. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6171. input, this->mutable_value()));
  6172. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6173. this->value().data(), static_cast<int>(this->value().length()),
  6174. ::google::protobuf::internal::WireFormatLite::PARSE,
  6175. "google.protobuf.testing.MapOutWireFormat.Map3Entry.value"));
  6176. } else {
  6177. goto handle_unusual;
  6178. }
  6179. break;
  6180. }
  6181. default: {
  6182. handle_unusual:
  6183. if (tag == 0) {
  6184. goto success;
  6185. }
  6186. DO_(::google::protobuf::internal::WireFormat::SkipField(
  6187. input, tag, _internal_metadata_.mutable_unknown_fields()));
  6188. break;
  6189. }
  6190. }
  6191. }
  6192. success:
  6193. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6194. return true;
  6195. failure:
  6196. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6197. return false;
  6198. #undef DO_
  6199. }
  6200. void MapOutWireFormat_Map3Entry::SerializeWithCachedSizes(
  6201. ::google::protobuf::io::CodedOutputStream* output) const {
  6202. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6203. ::google::protobuf::uint32 cached_has_bits = 0;
  6204. (void) cached_has_bits;
  6205. // int32 key = 1;
  6206. if (this->key() != 0) {
  6207. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->key(), output);
  6208. }
  6209. // string value = 2;
  6210. if (this->value().size() > 0) {
  6211. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6212. this->value().data(), static_cast<int>(this->value().length()),
  6213. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6214. "google.protobuf.testing.MapOutWireFormat.Map3Entry.value");
  6215. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6216. 2, this->value(), output);
  6217. }
  6218. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6219. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  6220. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  6221. }
  6222. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6223. }
  6224. ::google::protobuf::uint8* MapOutWireFormat_Map3Entry::InternalSerializeWithCachedSizesToArray(
  6225. bool deterministic, ::google::protobuf::uint8* target) const {
  6226. (void)deterministic; // Unused
  6227. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6228. ::google::protobuf::uint32 cached_has_bits = 0;
  6229. (void) cached_has_bits;
  6230. // int32 key = 1;
  6231. if (this->key() != 0) {
  6232. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->key(), target);
  6233. }
  6234. // string value = 2;
  6235. if (this->value().size() > 0) {
  6236. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6237. this->value().data(), static_cast<int>(this->value().length()),
  6238. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6239. "google.protobuf.testing.MapOutWireFormat.Map3Entry.value");
  6240. target =
  6241. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  6242. 2, this->value(), target);
  6243. }
  6244. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6245. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  6246. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  6247. }
  6248. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6249. return target;
  6250. }
  6251. size_t MapOutWireFormat_Map3Entry::ByteSizeLong() const {
  6252. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6253. size_t total_size = 0;
  6254. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6255. total_size +=
  6256. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  6257. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  6258. }
  6259. // string value = 2;
  6260. if (this->value().size() > 0) {
  6261. total_size += 1 +
  6262. ::google::protobuf::internal::WireFormatLite::StringSize(
  6263. this->value());
  6264. }
  6265. // int32 key = 1;
  6266. if (this->key() != 0) {
  6267. total_size += 1 +
  6268. ::google::protobuf::internal::WireFormatLite::Int32Size(
  6269. this->key());
  6270. }
  6271. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6272. SetCachedSize(cached_size);
  6273. return total_size;
  6274. }
  6275. void MapOutWireFormat_Map3Entry::MergeFrom(const ::google::protobuf::Message& from) {
  6276. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6277. GOOGLE_DCHECK_NE(&from, this);
  6278. const MapOutWireFormat_Map3Entry* source =
  6279. ::google::protobuf::internal::DynamicCastToGenerated<const MapOutWireFormat_Map3Entry>(
  6280. &from);
  6281. if (source == NULL) {
  6282. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6283. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  6284. } else {
  6285. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6286. MergeFrom(*source);
  6287. }
  6288. }
  6289. void MapOutWireFormat_Map3Entry::MergeFrom(const MapOutWireFormat_Map3Entry& from) {
  6290. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6291. GOOGLE_DCHECK_NE(&from, this);
  6292. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6293. ::google::protobuf::uint32 cached_has_bits = 0;
  6294. (void) cached_has_bits;
  6295. if (from.value().size() > 0) {
  6296. value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
  6297. }
  6298. if (from.key() != 0) {
  6299. set_key(from.key());
  6300. }
  6301. }
  6302. void MapOutWireFormat_Map3Entry::CopyFrom(const ::google::protobuf::Message& from) {
  6303. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6304. if (&from == this) return;
  6305. Clear();
  6306. MergeFrom(from);
  6307. }
  6308. void MapOutWireFormat_Map3Entry::CopyFrom(const MapOutWireFormat_Map3Entry& from) {
  6309. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MapOutWireFormat.Map3Entry)
  6310. if (&from == this) return;
  6311. Clear();
  6312. MergeFrom(from);
  6313. }
  6314. bool MapOutWireFormat_Map3Entry::IsInitialized() const {
  6315. return true;
  6316. }
  6317. void MapOutWireFormat_Map3Entry::Swap(MapOutWireFormat_Map3Entry* other) {
  6318. if (other == this) return;
  6319. InternalSwap(other);
  6320. }
  6321. void MapOutWireFormat_Map3Entry::InternalSwap(MapOutWireFormat_Map3Entry* other) {
  6322. using std::swap;
  6323. value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  6324. GetArenaNoVirtual());
  6325. swap(key_, other->key_);
  6326. _internal_metadata_.Swap(&other->_internal_metadata_);
  6327. }
  6328. ::google::protobuf::Metadata MapOutWireFormat_Map3Entry::GetMetadata() const {
  6329. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  6330. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  6331. }
  6332. // ===================================================================
  6333. void MapOutWireFormat_Map4Entry::InitAsDefaultInstance() {
  6334. }
  6335. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6336. const int MapOutWireFormat_Map4Entry::kKeyFieldNumber;
  6337. const int MapOutWireFormat_Map4Entry::kValueFieldNumber;
  6338. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6339. MapOutWireFormat_Map4Entry::MapOutWireFormat_Map4Entry()
  6340. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  6341. ::google::protobuf::internal::InitSCC(
  6342. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOutWireFormat_Map4Entry.base);
  6343. SharedCtor();
  6344. // @@protoc_insertion_point(constructor:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6345. }
  6346. MapOutWireFormat_Map4Entry::MapOutWireFormat_Map4Entry(const MapOutWireFormat_Map4Entry& from)
  6347. : ::google::protobuf::Message(),
  6348. _internal_metadata_(NULL) {
  6349. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6350. value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6351. if (from.value().size() > 0) {
  6352. value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
  6353. }
  6354. key_ = from.key_;
  6355. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6356. }
  6357. void MapOutWireFormat_Map4Entry::SharedCtor() {
  6358. value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6359. key_ = false;
  6360. }
  6361. MapOutWireFormat_Map4Entry::~MapOutWireFormat_Map4Entry() {
  6362. // @@protoc_insertion_point(destructor:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6363. SharedDtor();
  6364. }
  6365. void MapOutWireFormat_Map4Entry::SharedDtor() {
  6366. value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6367. }
  6368. void MapOutWireFormat_Map4Entry::SetCachedSize(int size) const {
  6369. _cached_size_.Set(size);
  6370. }
  6371. const ::google::protobuf::Descriptor* MapOutWireFormat_Map4Entry::descriptor() {
  6372. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  6373. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  6374. }
  6375. const MapOutWireFormat_Map4Entry& MapOutWireFormat_Map4Entry::default_instance() {
  6376. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOutWireFormat_Map4Entry.base);
  6377. return *internal_default_instance();
  6378. }
  6379. void MapOutWireFormat_Map4Entry::Clear() {
  6380. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6381. ::google::protobuf::uint32 cached_has_bits = 0;
  6382. // Prevent compiler warnings about cached_has_bits being unused
  6383. (void) cached_has_bits;
  6384. value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6385. key_ = false;
  6386. _internal_metadata_.Clear();
  6387. }
  6388. bool MapOutWireFormat_Map4Entry::MergePartialFromCodedStream(
  6389. ::google::protobuf::io::CodedInputStream* input) {
  6390. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6391. ::google::protobuf::uint32 tag;
  6392. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6393. for (;;) {
  6394. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6395. tag = p.first;
  6396. if (!p.second) goto handle_unusual;
  6397. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6398. // bool key = 1;
  6399. case 1: {
  6400. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6401. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  6402. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6403. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  6404. input, &key_)));
  6405. } else {
  6406. goto handle_unusual;
  6407. }
  6408. break;
  6409. }
  6410. // string value = 2;
  6411. case 2: {
  6412. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6413. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  6414. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6415. input, this->mutable_value()));
  6416. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6417. this->value().data(), static_cast<int>(this->value().length()),
  6418. ::google::protobuf::internal::WireFormatLite::PARSE,
  6419. "google.protobuf.testing.MapOutWireFormat.Map4Entry.value"));
  6420. } else {
  6421. goto handle_unusual;
  6422. }
  6423. break;
  6424. }
  6425. default: {
  6426. handle_unusual:
  6427. if (tag == 0) {
  6428. goto success;
  6429. }
  6430. DO_(::google::protobuf::internal::WireFormat::SkipField(
  6431. input, tag, _internal_metadata_.mutable_unknown_fields()));
  6432. break;
  6433. }
  6434. }
  6435. }
  6436. success:
  6437. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6438. return true;
  6439. failure:
  6440. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6441. return false;
  6442. #undef DO_
  6443. }
  6444. void MapOutWireFormat_Map4Entry::SerializeWithCachedSizes(
  6445. ::google::protobuf::io::CodedOutputStream* output) const {
  6446. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6447. ::google::protobuf::uint32 cached_has_bits = 0;
  6448. (void) cached_has_bits;
  6449. // bool key = 1;
  6450. if (this->key() != 0) {
  6451. ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->key(), output);
  6452. }
  6453. // string value = 2;
  6454. if (this->value().size() > 0) {
  6455. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6456. this->value().data(), static_cast<int>(this->value().length()),
  6457. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6458. "google.protobuf.testing.MapOutWireFormat.Map4Entry.value");
  6459. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6460. 2, this->value(), output);
  6461. }
  6462. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6463. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  6464. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  6465. }
  6466. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6467. }
  6468. ::google::protobuf::uint8* MapOutWireFormat_Map4Entry::InternalSerializeWithCachedSizesToArray(
  6469. bool deterministic, ::google::protobuf::uint8* target) const {
  6470. (void)deterministic; // Unused
  6471. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6472. ::google::protobuf::uint32 cached_has_bits = 0;
  6473. (void) cached_has_bits;
  6474. // bool key = 1;
  6475. if (this->key() != 0) {
  6476. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->key(), target);
  6477. }
  6478. // string value = 2;
  6479. if (this->value().size() > 0) {
  6480. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6481. this->value().data(), static_cast<int>(this->value().length()),
  6482. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6483. "google.protobuf.testing.MapOutWireFormat.Map4Entry.value");
  6484. target =
  6485. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  6486. 2, this->value(), target);
  6487. }
  6488. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6489. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  6490. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  6491. }
  6492. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6493. return target;
  6494. }
  6495. size_t MapOutWireFormat_Map4Entry::ByteSizeLong() const {
  6496. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6497. size_t total_size = 0;
  6498. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6499. total_size +=
  6500. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  6501. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  6502. }
  6503. // string value = 2;
  6504. if (this->value().size() > 0) {
  6505. total_size += 1 +
  6506. ::google::protobuf::internal::WireFormatLite::StringSize(
  6507. this->value());
  6508. }
  6509. // bool key = 1;
  6510. if (this->key() != 0) {
  6511. total_size += 1 + 1;
  6512. }
  6513. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6514. SetCachedSize(cached_size);
  6515. return total_size;
  6516. }
  6517. void MapOutWireFormat_Map4Entry::MergeFrom(const ::google::protobuf::Message& from) {
  6518. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6519. GOOGLE_DCHECK_NE(&from, this);
  6520. const MapOutWireFormat_Map4Entry* source =
  6521. ::google::protobuf::internal::DynamicCastToGenerated<const MapOutWireFormat_Map4Entry>(
  6522. &from);
  6523. if (source == NULL) {
  6524. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6525. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  6526. } else {
  6527. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6528. MergeFrom(*source);
  6529. }
  6530. }
  6531. void MapOutWireFormat_Map4Entry::MergeFrom(const MapOutWireFormat_Map4Entry& from) {
  6532. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6533. GOOGLE_DCHECK_NE(&from, this);
  6534. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6535. ::google::protobuf::uint32 cached_has_bits = 0;
  6536. (void) cached_has_bits;
  6537. if (from.value().size() > 0) {
  6538. value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
  6539. }
  6540. if (from.key() != 0) {
  6541. set_key(from.key());
  6542. }
  6543. }
  6544. void MapOutWireFormat_Map4Entry::CopyFrom(const ::google::protobuf::Message& from) {
  6545. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6546. if (&from == this) return;
  6547. Clear();
  6548. MergeFrom(from);
  6549. }
  6550. void MapOutWireFormat_Map4Entry::CopyFrom(const MapOutWireFormat_Map4Entry& from) {
  6551. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MapOutWireFormat.Map4Entry)
  6552. if (&from == this) return;
  6553. Clear();
  6554. MergeFrom(from);
  6555. }
  6556. bool MapOutWireFormat_Map4Entry::IsInitialized() const {
  6557. return true;
  6558. }
  6559. void MapOutWireFormat_Map4Entry::Swap(MapOutWireFormat_Map4Entry* other) {
  6560. if (other == this) return;
  6561. InternalSwap(other);
  6562. }
  6563. void MapOutWireFormat_Map4Entry::InternalSwap(MapOutWireFormat_Map4Entry* other) {
  6564. using std::swap;
  6565. value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  6566. GetArenaNoVirtual());
  6567. swap(key_, other->key_);
  6568. _internal_metadata_.Swap(&other->_internal_metadata_);
  6569. }
  6570. ::google::protobuf::Metadata MapOutWireFormat_Map4Entry::GetMetadata() const {
  6571. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  6572. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  6573. }
  6574. // ===================================================================
  6575. void MapOutWireFormat::InitAsDefaultInstance() {
  6576. }
  6577. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6578. const int MapOutWireFormat::kMap1FieldNumber;
  6579. const int MapOutWireFormat::kMap2FieldNumber;
  6580. const int MapOutWireFormat::kMap3FieldNumber;
  6581. const int MapOutWireFormat::kMap4FieldNumber;
  6582. const int MapOutWireFormat::kBarFieldNumber;
  6583. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6584. MapOutWireFormat::MapOutWireFormat()
  6585. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  6586. ::google::protobuf::internal::InitSCC(
  6587. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOutWireFormat.base);
  6588. SharedCtor();
  6589. // @@protoc_insertion_point(constructor:google.protobuf.testing.MapOutWireFormat)
  6590. }
  6591. MapOutWireFormat::MapOutWireFormat(const MapOutWireFormat& from)
  6592. : ::google::protobuf::Message(),
  6593. _internal_metadata_(NULL),
  6594. map1_(from.map1_),
  6595. map2_(from.map2_),
  6596. map3_(from.map3_),
  6597. map4_(from.map4_) {
  6598. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6599. bar_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6600. if (from.bar().size() > 0) {
  6601. bar_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.bar_);
  6602. }
  6603. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MapOutWireFormat)
  6604. }
  6605. void MapOutWireFormat::SharedCtor() {
  6606. bar_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6607. }
  6608. MapOutWireFormat::~MapOutWireFormat() {
  6609. // @@protoc_insertion_point(destructor:google.protobuf.testing.MapOutWireFormat)
  6610. SharedDtor();
  6611. }
  6612. void MapOutWireFormat::SharedDtor() {
  6613. bar_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6614. }
  6615. void MapOutWireFormat::SetCachedSize(int size) const {
  6616. _cached_size_.Set(size);
  6617. }
  6618. const ::google::protobuf::Descriptor* MapOutWireFormat::descriptor() {
  6619. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  6620. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  6621. }
  6622. const MapOutWireFormat& MapOutWireFormat::default_instance() {
  6623. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapOutWireFormat.base);
  6624. return *internal_default_instance();
  6625. }
  6626. void MapOutWireFormat::Clear() {
  6627. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MapOutWireFormat)
  6628. ::google::protobuf::uint32 cached_has_bits = 0;
  6629. // Prevent compiler warnings about cached_has_bits being unused
  6630. (void) cached_has_bits;
  6631. map1_.Clear();
  6632. map2_.Clear();
  6633. map3_.Clear();
  6634. map4_.Clear();
  6635. bar_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6636. _internal_metadata_.Clear();
  6637. }
  6638. bool MapOutWireFormat::MergePartialFromCodedStream(
  6639. ::google::protobuf::io::CodedInputStream* input) {
  6640. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6641. ::google::protobuf::uint32 tag;
  6642. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MapOutWireFormat)
  6643. for (;;) {
  6644. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6645. tag = p.first;
  6646. if (!p.second) goto handle_unusual;
  6647. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6648. // repeated .google.protobuf.testing.MapOutWireFormat.Map1Entry map1 = 1;
  6649. case 1: {
  6650. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6651. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  6652. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6653. input, add_map1()));
  6654. } else {
  6655. goto handle_unusual;
  6656. }
  6657. break;
  6658. }
  6659. // repeated .google.protobuf.testing.MapOutWireFormat.Map2Entry map2 = 2;
  6660. case 2: {
  6661. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6662. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  6663. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6664. input, add_map2()));
  6665. } else {
  6666. goto handle_unusual;
  6667. }
  6668. break;
  6669. }
  6670. // repeated .google.protobuf.testing.MapOutWireFormat.Map3Entry map3 = 3;
  6671. case 3: {
  6672. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6673. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  6674. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6675. input, add_map3()));
  6676. } else {
  6677. goto handle_unusual;
  6678. }
  6679. break;
  6680. }
  6681. // string bar = 4;
  6682. case 4: {
  6683. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6684. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  6685. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6686. input, this->mutable_bar()));
  6687. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6688. this->bar().data(), static_cast<int>(this->bar().length()),
  6689. ::google::protobuf::internal::WireFormatLite::PARSE,
  6690. "google.protobuf.testing.MapOutWireFormat.bar"));
  6691. } else {
  6692. goto handle_unusual;
  6693. }
  6694. break;
  6695. }
  6696. // repeated .google.protobuf.testing.MapOutWireFormat.Map4Entry map4 = 5;
  6697. case 5: {
  6698. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6699. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  6700. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6701. input, add_map4()));
  6702. } else {
  6703. goto handle_unusual;
  6704. }
  6705. break;
  6706. }
  6707. default: {
  6708. handle_unusual:
  6709. if (tag == 0) {
  6710. goto success;
  6711. }
  6712. DO_(::google::protobuf::internal::WireFormat::SkipField(
  6713. input, tag, _internal_metadata_.mutable_unknown_fields()));
  6714. break;
  6715. }
  6716. }
  6717. }
  6718. success:
  6719. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MapOutWireFormat)
  6720. return true;
  6721. failure:
  6722. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MapOutWireFormat)
  6723. return false;
  6724. #undef DO_
  6725. }
  6726. void MapOutWireFormat::SerializeWithCachedSizes(
  6727. ::google::protobuf::io::CodedOutputStream* output) const {
  6728. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MapOutWireFormat)
  6729. ::google::protobuf::uint32 cached_has_bits = 0;
  6730. (void) cached_has_bits;
  6731. // repeated .google.protobuf.testing.MapOutWireFormat.Map1Entry map1 = 1;
  6732. for (unsigned int i = 0,
  6733. n = static_cast<unsigned int>(this->map1_size()); i < n; i++) {
  6734. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6735. 1,
  6736. this->map1(static_cast<int>(i)),
  6737. output);
  6738. }
  6739. // repeated .google.protobuf.testing.MapOutWireFormat.Map2Entry map2 = 2;
  6740. for (unsigned int i = 0,
  6741. n = static_cast<unsigned int>(this->map2_size()); i < n; i++) {
  6742. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6743. 2,
  6744. this->map2(static_cast<int>(i)),
  6745. output);
  6746. }
  6747. // repeated .google.protobuf.testing.MapOutWireFormat.Map3Entry map3 = 3;
  6748. for (unsigned int i = 0,
  6749. n = static_cast<unsigned int>(this->map3_size()); i < n; i++) {
  6750. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6751. 3,
  6752. this->map3(static_cast<int>(i)),
  6753. output);
  6754. }
  6755. // string bar = 4;
  6756. if (this->bar().size() > 0) {
  6757. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6758. this->bar().data(), static_cast<int>(this->bar().length()),
  6759. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6760. "google.protobuf.testing.MapOutWireFormat.bar");
  6761. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6762. 4, this->bar(), output);
  6763. }
  6764. // repeated .google.protobuf.testing.MapOutWireFormat.Map4Entry map4 = 5;
  6765. for (unsigned int i = 0,
  6766. n = static_cast<unsigned int>(this->map4_size()); i < n; i++) {
  6767. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6768. 5,
  6769. this->map4(static_cast<int>(i)),
  6770. output);
  6771. }
  6772. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6773. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  6774. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  6775. }
  6776. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MapOutWireFormat)
  6777. }
  6778. ::google::protobuf::uint8* MapOutWireFormat::InternalSerializeWithCachedSizesToArray(
  6779. bool deterministic, ::google::protobuf::uint8* target) const {
  6780. (void)deterministic; // Unused
  6781. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MapOutWireFormat)
  6782. ::google::protobuf::uint32 cached_has_bits = 0;
  6783. (void) cached_has_bits;
  6784. // repeated .google.protobuf.testing.MapOutWireFormat.Map1Entry map1 = 1;
  6785. for (unsigned int i = 0,
  6786. n = static_cast<unsigned int>(this->map1_size()); i < n; i++) {
  6787. target = ::google::protobuf::internal::WireFormatLite::
  6788. InternalWriteMessageToArray(
  6789. 1, this->map1(static_cast<int>(i)), deterministic, target);
  6790. }
  6791. // repeated .google.protobuf.testing.MapOutWireFormat.Map2Entry map2 = 2;
  6792. for (unsigned int i = 0,
  6793. n = static_cast<unsigned int>(this->map2_size()); i < n; i++) {
  6794. target = ::google::protobuf::internal::WireFormatLite::
  6795. InternalWriteMessageToArray(
  6796. 2, this->map2(static_cast<int>(i)), deterministic, target);
  6797. }
  6798. // repeated .google.protobuf.testing.MapOutWireFormat.Map3Entry map3 = 3;
  6799. for (unsigned int i = 0,
  6800. n = static_cast<unsigned int>(this->map3_size()); i < n; i++) {
  6801. target = ::google::protobuf::internal::WireFormatLite::
  6802. InternalWriteMessageToArray(
  6803. 3, this->map3(static_cast<int>(i)), deterministic, target);
  6804. }
  6805. // string bar = 4;
  6806. if (this->bar().size() > 0) {
  6807. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6808. this->bar().data(), static_cast<int>(this->bar().length()),
  6809. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6810. "google.protobuf.testing.MapOutWireFormat.bar");
  6811. target =
  6812. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  6813. 4, this->bar(), target);
  6814. }
  6815. // repeated .google.protobuf.testing.MapOutWireFormat.Map4Entry map4 = 5;
  6816. for (unsigned int i = 0,
  6817. n = static_cast<unsigned int>(this->map4_size()); i < n; i++) {
  6818. target = ::google::protobuf::internal::WireFormatLite::
  6819. InternalWriteMessageToArray(
  6820. 5, this->map4(static_cast<int>(i)), deterministic, target);
  6821. }
  6822. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6823. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  6824. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  6825. }
  6826. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MapOutWireFormat)
  6827. return target;
  6828. }
  6829. size_t MapOutWireFormat::ByteSizeLong() const {
  6830. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MapOutWireFormat)
  6831. size_t total_size = 0;
  6832. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6833. total_size +=
  6834. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  6835. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  6836. }
  6837. // repeated .google.protobuf.testing.MapOutWireFormat.Map1Entry map1 = 1;
  6838. {
  6839. unsigned int count = static_cast<unsigned int>(this->map1_size());
  6840. total_size += 1UL * count;
  6841. for (unsigned int i = 0; i < count; i++) {
  6842. total_size +=
  6843. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6844. this->map1(static_cast<int>(i)));
  6845. }
  6846. }
  6847. // repeated .google.protobuf.testing.MapOutWireFormat.Map2Entry map2 = 2;
  6848. {
  6849. unsigned int count = static_cast<unsigned int>(this->map2_size());
  6850. total_size += 1UL * count;
  6851. for (unsigned int i = 0; i < count; i++) {
  6852. total_size +=
  6853. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6854. this->map2(static_cast<int>(i)));
  6855. }
  6856. }
  6857. // repeated .google.protobuf.testing.MapOutWireFormat.Map3Entry map3 = 3;
  6858. {
  6859. unsigned int count = static_cast<unsigned int>(this->map3_size());
  6860. total_size += 1UL * count;
  6861. for (unsigned int i = 0; i < count; i++) {
  6862. total_size +=
  6863. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6864. this->map3(static_cast<int>(i)));
  6865. }
  6866. }
  6867. // repeated .google.protobuf.testing.MapOutWireFormat.Map4Entry map4 = 5;
  6868. {
  6869. unsigned int count = static_cast<unsigned int>(this->map4_size());
  6870. total_size += 1UL * count;
  6871. for (unsigned int i = 0; i < count; i++) {
  6872. total_size +=
  6873. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6874. this->map4(static_cast<int>(i)));
  6875. }
  6876. }
  6877. // string bar = 4;
  6878. if (this->bar().size() > 0) {
  6879. total_size += 1 +
  6880. ::google::protobuf::internal::WireFormatLite::StringSize(
  6881. this->bar());
  6882. }
  6883. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6884. SetCachedSize(cached_size);
  6885. return total_size;
  6886. }
  6887. void MapOutWireFormat::MergeFrom(const ::google::protobuf::Message& from) {
  6888. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MapOutWireFormat)
  6889. GOOGLE_DCHECK_NE(&from, this);
  6890. const MapOutWireFormat* source =
  6891. ::google::protobuf::internal::DynamicCastToGenerated<const MapOutWireFormat>(
  6892. &from);
  6893. if (source == NULL) {
  6894. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MapOutWireFormat)
  6895. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  6896. } else {
  6897. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MapOutWireFormat)
  6898. MergeFrom(*source);
  6899. }
  6900. }
  6901. void MapOutWireFormat::MergeFrom(const MapOutWireFormat& from) {
  6902. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MapOutWireFormat)
  6903. GOOGLE_DCHECK_NE(&from, this);
  6904. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6905. ::google::protobuf::uint32 cached_has_bits = 0;
  6906. (void) cached_has_bits;
  6907. map1_.MergeFrom(from.map1_);
  6908. map2_.MergeFrom(from.map2_);
  6909. map3_.MergeFrom(from.map3_);
  6910. map4_.MergeFrom(from.map4_);
  6911. if (from.bar().size() > 0) {
  6912. bar_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.bar_);
  6913. }
  6914. }
  6915. void MapOutWireFormat::CopyFrom(const ::google::protobuf::Message& from) {
  6916. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MapOutWireFormat)
  6917. if (&from == this) return;
  6918. Clear();
  6919. MergeFrom(from);
  6920. }
  6921. void MapOutWireFormat::CopyFrom(const MapOutWireFormat& from) {
  6922. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MapOutWireFormat)
  6923. if (&from == this) return;
  6924. Clear();
  6925. MergeFrom(from);
  6926. }
  6927. bool MapOutWireFormat::IsInitialized() const {
  6928. return true;
  6929. }
  6930. void MapOutWireFormat::Swap(MapOutWireFormat* other) {
  6931. if (other == this) return;
  6932. InternalSwap(other);
  6933. }
  6934. void MapOutWireFormat::InternalSwap(MapOutWireFormat* other) {
  6935. using std::swap;
  6936. CastToBase(&map1_)->InternalSwap(CastToBase(&other->map1_));
  6937. CastToBase(&map2_)->InternalSwap(CastToBase(&other->map2_));
  6938. CastToBase(&map3_)->InternalSwap(CastToBase(&other->map3_));
  6939. CastToBase(&map4_)->InternalSwap(CastToBase(&other->map4_));
  6940. bar_.Swap(&other->bar_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  6941. GetArenaNoVirtual());
  6942. _internal_metadata_.Swap(&other->_internal_metadata_);
  6943. }
  6944. ::google::protobuf::Metadata MapOutWireFormat::GetMetadata() const {
  6945. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  6946. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  6947. }
  6948. // ===================================================================
  6949. void MapM::InitAsDefaultInstance() {
  6950. }
  6951. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6952. const int MapM::kFooFieldNumber;
  6953. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6954. MapM::MapM()
  6955. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  6956. ::google::protobuf::internal::InitSCC(
  6957. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapM.base);
  6958. SharedCtor();
  6959. // @@protoc_insertion_point(constructor:google.protobuf.testing.MapM)
  6960. }
  6961. MapM::MapM(const MapM& from)
  6962. : ::google::protobuf::Message(),
  6963. _internal_metadata_(NULL) {
  6964. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6965. foo_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6966. if (from.foo().size() > 0) {
  6967. foo_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.foo_);
  6968. }
  6969. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.MapM)
  6970. }
  6971. void MapM::SharedCtor() {
  6972. foo_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6973. }
  6974. MapM::~MapM() {
  6975. // @@protoc_insertion_point(destructor:google.protobuf.testing.MapM)
  6976. SharedDtor();
  6977. }
  6978. void MapM::SharedDtor() {
  6979. foo_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6980. }
  6981. void MapM::SetCachedSize(int size) const {
  6982. _cached_size_.Set(size);
  6983. }
  6984. const ::google::protobuf::Descriptor* MapM::descriptor() {
  6985. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  6986. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  6987. }
  6988. const MapM& MapM::default_instance() {
  6989. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::scc_info_MapM.base);
  6990. return *internal_default_instance();
  6991. }
  6992. void MapM::Clear() {
  6993. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.MapM)
  6994. ::google::protobuf::uint32 cached_has_bits = 0;
  6995. // Prevent compiler warnings about cached_has_bits being unused
  6996. (void) cached_has_bits;
  6997. foo_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6998. _internal_metadata_.Clear();
  6999. }
  7000. bool MapM::MergePartialFromCodedStream(
  7001. ::google::protobuf::io::CodedInputStream* input) {
  7002. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  7003. ::google::protobuf::uint32 tag;
  7004. // @@protoc_insertion_point(parse_start:google.protobuf.testing.MapM)
  7005. for (;;) {
  7006. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  7007. tag = p.first;
  7008. if (!p.second) goto handle_unusual;
  7009. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  7010. // string foo = 1;
  7011. case 1: {
  7012. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7013. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  7014. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  7015. input, this->mutable_foo()));
  7016. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7017. this->foo().data(), static_cast<int>(this->foo().length()),
  7018. ::google::protobuf::internal::WireFormatLite::PARSE,
  7019. "google.protobuf.testing.MapM.foo"));
  7020. } else {
  7021. goto handle_unusual;
  7022. }
  7023. break;
  7024. }
  7025. default: {
  7026. handle_unusual:
  7027. if (tag == 0) {
  7028. goto success;
  7029. }
  7030. DO_(::google::protobuf::internal::WireFormat::SkipField(
  7031. input, tag, _internal_metadata_.mutable_unknown_fields()));
  7032. break;
  7033. }
  7034. }
  7035. }
  7036. success:
  7037. // @@protoc_insertion_point(parse_success:google.protobuf.testing.MapM)
  7038. return true;
  7039. failure:
  7040. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.MapM)
  7041. return false;
  7042. #undef DO_
  7043. }
  7044. void MapM::SerializeWithCachedSizes(
  7045. ::google::protobuf::io::CodedOutputStream* output) const {
  7046. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.MapM)
  7047. ::google::protobuf::uint32 cached_has_bits = 0;
  7048. (void) cached_has_bits;
  7049. // string foo = 1;
  7050. if (this->foo().size() > 0) {
  7051. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7052. this->foo().data(), static_cast<int>(this->foo().length()),
  7053. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7054. "google.protobuf.testing.MapM.foo");
  7055. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  7056. 1, this->foo(), output);
  7057. }
  7058. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7059. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  7060. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  7061. }
  7062. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.MapM)
  7063. }
  7064. ::google::protobuf::uint8* MapM::InternalSerializeWithCachedSizesToArray(
  7065. bool deterministic, ::google::protobuf::uint8* target) const {
  7066. (void)deterministic; // Unused
  7067. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.MapM)
  7068. ::google::protobuf::uint32 cached_has_bits = 0;
  7069. (void) cached_has_bits;
  7070. // string foo = 1;
  7071. if (this->foo().size() > 0) {
  7072. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7073. this->foo().data(), static_cast<int>(this->foo().length()),
  7074. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7075. "google.protobuf.testing.MapM.foo");
  7076. target =
  7077. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  7078. 1, this->foo(), target);
  7079. }
  7080. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7081. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  7082. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  7083. }
  7084. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.MapM)
  7085. return target;
  7086. }
  7087. size_t MapM::ByteSizeLong() const {
  7088. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.MapM)
  7089. size_t total_size = 0;
  7090. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7091. total_size +=
  7092. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  7093. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  7094. }
  7095. // string foo = 1;
  7096. if (this->foo().size() > 0) {
  7097. total_size += 1 +
  7098. ::google::protobuf::internal::WireFormatLite::StringSize(
  7099. this->foo());
  7100. }
  7101. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  7102. SetCachedSize(cached_size);
  7103. return total_size;
  7104. }
  7105. void MapM::MergeFrom(const ::google::protobuf::Message& from) {
  7106. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.MapM)
  7107. GOOGLE_DCHECK_NE(&from, this);
  7108. const MapM* source =
  7109. ::google::protobuf::internal::DynamicCastToGenerated<const MapM>(
  7110. &from);
  7111. if (source == NULL) {
  7112. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.MapM)
  7113. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  7114. } else {
  7115. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.MapM)
  7116. MergeFrom(*source);
  7117. }
  7118. }
  7119. void MapM::MergeFrom(const MapM& from) {
  7120. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.MapM)
  7121. GOOGLE_DCHECK_NE(&from, this);
  7122. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7123. ::google::protobuf::uint32 cached_has_bits = 0;
  7124. (void) cached_has_bits;
  7125. if (from.foo().size() > 0) {
  7126. foo_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.foo_);
  7127. }
  7128. }
  7129. void MapM::CopyFrom(const ::google::protobuf::Message& from) {
  7130. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.MapM)
  7131. if (&from == this) return;
  7132. Clear();
  7133. MergeFrom(from);
  7134. }
  7135. void MapM::CopyFrom(const MapM& from) {
  7136. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.MapM)
  7137. if (&from == this) return;
  7138. Clear();
  7139. MergeFrom(from);
  7140. }
  7141. bool MapM::IsInitialized() const {
  7142. return true;
  7143. }
  7144. void MapM::Swap(MapM* other) {
  7145. if (other == this) return;
  7146. InternalSwap(other);
  7147. }
  7148. void MapM::InternalSwap(MapM* other) {
  7149. using std::swap;
  7150. foo_.Swap(&other->foo_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  7151. GetArenaNoVirtual());
  7152. _internal_metadata_.Swap(&other->_internal_metadata_);
  7153. }
  7154. ::google::protobuf::Metadata MapM::GetMetadata() const {
  7155. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::protobuf_AssignDescriptorsOnce();
  7156. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fmaps_2eproto::file_level_metadata[kIndexInFileMessages];
  7157. }
  7158. // @@protoc_insertion_point(namespace_scope)
  7159. } // namespace testing
  7160. } // namespace protobuf
  7161. } // namespace google
  7162. namespace google {
  7163. namespace protobuf {
  7164. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapsTestCases* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapsTestCases >(Arena* arena) {
  7165. return Arena::CreateInternal< ::google::protobuf::testing::MapsTestCases >(arena);
  7166. }
  7167. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::EmptyMap_MapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::EmptyMap_MapEntry_DoNotUse >(Arena* arena) {
  7168. return Arena::CreateInternal< ::google::protobuf::testing::EmptyMap_MapEntry_DoNotUse >(arena);
  7169. }
  7170. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::EmptyMap* Arena::CreateMaybeMessage< ::google::protobuf::testing::EmptyMap >(Arena* arena) {
  7171. return Arena::CreateInternal< ::google::protobuf::testing::EmptyMap >(arena);
  7172. }
  7173. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::StringtoInt_MapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::StringtoInt_MapEntry_DoNotUse >(Arena* arena) {
  7174. return Arena::CreateInternal< ::google::protobuf::testing::StringtoInt_MapEntry_DoNotUse >(arena);
  7175. }
  7176. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::StringtoInt* Arena::CreateMaybeMessage< ::google::protobuf::testing::StringtoInt >(Arena* arena) {
  7177. return Arena::CreateInternal< ::google::protobuf::testing::StringtoInt >(arena);
  7178. }
  7179. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::IntToString_MapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::IntToString_MapEntry_DoNotUse >(Arena* arena) {
  7180. return Arena::CreateInternal< ::google::protobuf::testing::IntToString_MapEntry_DoNotUse >(arena);
  7181. }
  7182. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::IntToString* Arena::CreateMaybeMessage< ::google::protobuf::testing::IntToString >(Arena* arena) {
  7183. return Arena::CreateInternal< ::google::protobuf::testing::IntToString >(arena);
  7184. }
  7185. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::BoolToString_MapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::BoolToString_MapEntry_DoNotUse >(Arena* arena) {
  7186. return Arena::CreateInternal< ::google::protobuf::testing::BoolToString_MapEntry_DoNotUse >(arena);
  7187. }
  7188. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::BoolToString* Arena::CreateMaybeMessage< ::google::protobuf::testing::BoolToString >(Arena* arena) {
  7189. return Arena::CreateInternal< ::google::protobuf::testing::BoolToString >(arena);
  7190. }
  7191. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Mixed1_MapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::Mixed1_MapEntry_DoNotUse >(Arena* arena) {
  7192. return Arena::CreateInternal< ::google::protobuf::testing::Mixed1_MapEntry_DoNotUse >(arena);
  7193. }
  7194. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Mixed1* Arena::CreateMaybeMessage< ::google::protobuf::testing::Mixed1 >(Arena* arena) {
  7195. return Arena::CreateInternal< ::google::protobuf::testing::Mixed1 >(arena);
  7196. }
  7197. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Mixed2_MapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::Mixed2_MapEntry_DoNotUse >(Arena* arena) {
  7198. return Arena::CreateInternal< ::google::protobuf::testing::Mixed2_MapEntry_DoNotUse >(arena);
  7199. }
  7200. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Mixed2* Arena::CreateMaybeMessage< ::google::protobuf::testing::Mixed2 >(Arena* arena) {
  7201. return Arena::CreateInternal< ::google::protobuf::testing::Mixed2 >(arena);
  7202. }
  7203. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOfObjects_M* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOfObjects_M >(Arena* arena) {
  7204. return Arena::CreateInternal< ::google::protobuf::testing::MapOfObjects_M >(arena);
  7205. }
  7206. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOfObjects_MapEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOfObjects_MapEntry_DoNotUse >(Arena* arena) {
  7207. return Arena::CreateInternal< ::google::protobuf::testing::MapOfObjects_MapEntry_DoNotUse >(arena);
  7208. }
  7209. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOfObjects* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOfObjects >(Arena* arena) {
  7210. return Arena::CreateInternal< ::google::protobuf::testing::MapOfObjects >(arena);
  7211. }
  7212. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::DummyRequest* Arena::CreateMaybeMessage< ::google::protobuf::testing::DummyRequest >(Arena* arena) {
  7213. return Arena::CreateInternal< ::google::protobuf::testing::DummyRequest >(arena);
  7214. }
  7215. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapIn_MapInputEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapIn_MapInputEntry_DoNotUse >(Arena* arena) {
  7216. return Arena::CreateInternal< ::google::protobuf::testing::MapIn_MapInputEntry_DoNotUse >(arena);
  7217. }
  7218. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapIn* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapIn >(Arena* arena) {
  7219. return Arena::CreateInternal< ::google::protobuf::testing::MapIn >(arena);
  7220. }
  7221. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOut_Map1Entry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOut_Map1Entry_DoNotUse >(Arena* arena) {
  7222. return Arena::CreateInternal< ::google::protobuf::testing::MapOut_Map1Entry_DoNotUse >(arena);
  7223. }
  7224. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOut_Map2Entry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOut_Map2Entry_DoNotUse >(Arena* arena) {
  7225. return Arena::CreateInternal< ::google::protobuf::testing::MapOut_Map2Entry_DoNotUse >(arena);
  7226. }
  7227. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOut_Map3Entry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOut_Map3Entry_DoNotUse >(Arena* arena) {
  7228. return Arena::CreateInternal< ::google::protobuf::testing::MapOut_Map3Entry_DoNotUse >(arena);
  7229. }
  7230. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOut_Map4Entry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOut_Map4Entry_DoNotUse >(Arena* arena) {
  7231. return Arena::CreateInternal< ::google::protobuf::testing::MapOut_Map4Entry_DoNotUse >(arena);
  7232. }
  7233. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOut* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOut >(Arena* arena) {
  7234. return Arena::CreateInternal< ::google::protobuf::testing::MapOut >(arena);
  7235. }
  7236. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOutWireFormat_Map1Entry* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOutWireFormat_Map1Entry >(Arena* arena) {
  7237. return Arena::CreateInternal< ::google::protobuf::testing::MapOutWireFormat_Map1Entry >(arena);
  7238. }
  7239. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOutWireFormat_Map2Entry* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOutWireFormat_Map2Entry >(Arena* arena) {
  7240. return Arena::CreateInternal< ::google::protobuf::testing::MapOutWireFormat_Map2Entry >(arena);
  7241. }
  7242. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOutWireFormat_Map3Entry* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOutWireFormat_Map3Entry >(Arena* arena) {
  7243. return Arena::CreateInternal< ::google::protobuf::testing::MapOutWireFormat_Map3Entry >(arena);
  7244. }
  7245. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOutWireFormat_Map4Entry* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOutWireFormat_Map4Entry >(Arena* arena) {
  7246. return Arena::CreateInternal< ::google::protobuf::testing::MapOutWireFormat_Map4Entry >(arena);
  7247. }
  7248. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapOutWireFormat* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapOutWireFormat >(Arena* arena) {
  7249. return Arena::CreateInternal< ::google::protobuf::testing::MapOutWireFormat >(arena);
  7250. }
  7251. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::MapM* Arena::CreateMaybeMessage< ::google::protobuf::testing::MapM >(Arena* arena) {
  7252. return Arena::CreateInternal< ::google::protobuf::testing::MapM >(arena);
  7253. }
  7254. } // namespace protobuf
  7255. } // namespace google
  7256. // @@protoc_insertion_point(global_scope)