map_proto2_unittest.pb.cc 239 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/map_proto2_unittest.proto
  3. #include <google/protobuf/map_proto2_unittest.pb.h>
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/io/coded_stream.h>
  8. #include <google/protobuf/wire_format_lite_inl.h>
  9. #include <google/protobuf/descriptor.h>
  10. #include <google/protobuf/generated_message_reflection.h>
  11. #include <google/protobuf/reflection_ops.h>
  12. #include <google/protobuf/wire_format.h>
  13. // This is a temporary google only hack
  14. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  15. #include "third_party/protobuf/version.h"
  16. #endif
  17. // @@protoc_insertion_point(includes)
  18. namespace protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto {
  19. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse;
  20. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse;
  21. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestEnumMap_KnownMapFieldEntry_DoNotUse;
  22. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestEnumMap_UnknownMapFieldEntry_DoNotUse;
  23. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestImportEnumMap_ImportEnumAmpEntry_DoNotUse;
  24. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestIntIntMap_MEntry_DoNotUse;
  25. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<12> scc_info_TestMaps;
  26. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestIntIntMap;
  27. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MBoolEntry_DoNotUse;
  28. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MFixed32Entry_DoNotUse;
  29. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MFixed64Entry_DoNotUse;
  30. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MInt32Entry_DoNotUse;
  31. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MInt64Entry_DoNotUse;
  32. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MSfixed32Entry_DoNotUse;
  33. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MSfixed64Entry_DoNotUse;
  34. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MSint32Entry_DoNotUse;
  35. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MSint64Entry_DoNotUse;
  36. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MStringEntry_DoNotUse;
  37. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MUint32Entry_DoNotUse;
  38. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MUint64Entry_DoNotUse;
  39. } // namespace protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto
  40. namespace protobuf_unittest {
  41. class TestEnumMap_KnownMapFieldEntry_DoNotUseDefaultTypeInternal {
  42. public:
  43. ::google::protobuf::internal::ExplicitlyConstructed<TestEnumMap_KnownMapFieldEntry_DoNotUse>
  44. _instance;
  45. } _TestEnumMap_KnownMapFieldEntry_DoNotUse_default_instance_;
  46. class TestEnumMap_UnknownMapFieldEntry_DoNotUseDefaultTypeInternal {
  47. public:
  48. ::google::protobuf::internal::ExplicitlyConstructed<TestEnumMap_UnknownMapFieldEntry_DoNotUse>
  49. _instance;
  50. } _TestEnumMap_UnknownMapFieldEntry_DoNotUse_default_instance_;
  51. class TestEnumMapDefaultTypeInternal {
  52. public:
  53. ::google::protobuf::internal::ExplicitlyConstructed<TestEnumMap>
  54. _instance;
  55. } _TestEnumMap_default_instance_;
  56. class TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUseDefaultTypeInternal {
  57. public:
  58. ::google::protobuf::internal::ExplicitlyConstructed<TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse>
  59. _instance;
  60. } _TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse_default_instance_;
  61. class TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUseDefaultTypeInternal {
  62. public:
  63. ::google::protobuf::internal::ExplicitlyConstructed<TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse>
  64. _instance;
  65. } _TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse_default_instance_;
  66. class TestEnumMapPlusExtraDefaultTypeInternal {
  67. public:
  68. ::google::protobuf::internal::ExplicitlyConstructed<TestEnumMapPlusExtra>
  69. _instance;
  70. } _TestEnumMapPlusExtra_default_instance_;
  71. class TestImportEnumMap_ImportEnumAmpEntry_DoNotUseDefaultTypeInternal {
  72. public:
  73. ::google::protobuf::internal::ExplicitlyConstructed<TestImportEnumMap_ImportEnumAmpEntry_DoNotUse>
  74. _instance;
  75. } _TestImportEnumMap_ImportEnumAmpEntry_DoNotUse_default_instance_;
  76. class TestImportEnumMapDefaultTypeInternal {
  77. public:
  78. ::google::protobuf::internal::ExplicitlyConstructed<TestImportEnumMap>
  79. _instance;
  80. } _TestImportEnumMap_default_instance_;
  81. class TestIntIntMap_MEntry_DoNotUseDefaultTypeInternal {
  82. public:
  83. ::google::protobuf::internal::ExplicitlyConstructed<TestIntIntMap_MEntry_DoNotUse>
  84. _instance;
  85. } _TestIntIntMap_MEntry_DoNotUse_default_instance_;
  86. class TestIntIntMapDefaultTypeInternal {
  87. public:
  88. ::google::protobuf::internal::ExplicitlyConstructed<TestIntIntMap>
  89. _instance;
  90. } _TestIntIntMap_default_instance_;
  91. class TestMaps_MInt32Entry_DoNotUseDefaultTypeInternal {
  92. public:
  93. ::google::protobuf::internal::ExplicitlyConstructed<TestMaps_MInt32Entry_DoNotUse>
  94. _instance;
  95. } _TestMaps_MInt32Entry_DoNotUse_default_instance_;
  96. class TestMaps_MInt64Entry_DoNotUseDefaultTypeInternal {
  97. public:
  98. ::google::protobuf::internal::ExplicitlyConstructed<TestMaps_MInt64Entry_DoNotUse>
  99. _instance;
  100. } _TestMaps_MInt64Entry_DoNotUse_default_instance_;
  101. class TestMaps_MUint32Entry_DoNotUseDefaultTypeInternal {
  102. public:
  103. ::google::protobuf::internal::ExplicitlyConstructed<TestMaps_MUint32Entry_DoNotUse>
  104. _instance;
  105. } _TestMaps_MUint32Entry_DoNotUse_default_instance_;
  106. class TestMaps_MUint64Entry_DoNotUseDefaultTypeInternal {
  107. public:
  108. ::google::protobuf::internal::ExplicitlyConstructed<TestMaps_MUint64Entry_DoNotUse>
  109. _instance;
  110. } _TestMaps_MUint64Entry_DoNotUse_default_instance_;
  111. class TestMaps_MSint32Entry_DoNotUseDefaultTypeInternal {
  112. public:
  113. ::google::protobuf::internal::ExplicitlyConstructed<TestMaps_MSint32Entry_DoNotUse>
  114. _instance;
  115. } _TestMaps_MSint32Entry_DoNotUse_default_instance_;
  116. class TestMaps_MSint64Entry_DoNotUseDefaultTypeInternal {
  117. public:
  118. ::google::protobuf::internal::ExplicitlyConstructed<TestMaps_MSint64Entry_DoNotUse>
  119. _instance;
  120. } _TestMaps_MSint64Entry_DoNotUse_default_instance_;
  121. class TestMaps_MFixed32Entry_DoNotUseDefaultTypeInternal {
  122. public:
  123. ::google::protobuf::internal::ExplicitlyConstructed<TestMaps_MFixed32Entry_DoNotUse>
  124. _instance;
  125. } _TestMaps_MFixed32Entry_DoNotUse_default_instance_;
  126. class TestMaps_MFixed64Entry_DoNotUseDefaultTypeInternal {
  127. public:
  128. ::google::protobuf::internal::ExplicitlyConstructed<TestMaps_MFixed64Entry_DoNotUse>
  129. _instance;
  130. } _TestMaps_MFixed64Entry_DoNotUse_default_instance_;
  131. class TestMaps_MSfixed32Entry_DoNotUseDefaultTypeInternal {
  132. public:
  133. ::google::protobuf::internal::ExplicitlyConstructed<TestMaps_MSfixed32Entry_DoNotUse>
  134. _instance;
  135. } _TestMaps_MSfixed32Entry_DoNotUse_default_instance_;
  136. class TestMaps_MSfixed64Entry_DoNotUseDefaultTypeInternal {
  137. public:
  138. ::google::protobuf::internal::ExplicitlyConstructed<TestMaps_MSfixed64Entry_DoNotUse>
  139. _instance;
  140. } _TestMaps_MSfixed64Entry_DoNotUse_default_instance_;
  141. class TestMaps_MBoolEntry_DoNotUseDefaultTypeInternal {
  142. public:
  143. ::google::protobuf::internal::ExplicitlyConstructed<TestMaps_MBoolEntry_DoNotUse>
  144. _instance;
  145. } _TestMaps_MBoolEntry_DoNotUse_default_instance_;
  146. class TestMaps_MStringEntry_DoNotUseDefaultTypeInternal {
  147. public:
  148. ::google::protobuf::internal::ExplicitlyConstructed<TestMaps_MStringEntry_DoNotUse>
  149. _instance;
  150. } _TestMaps_MStringEntry_DoNotUse_default_instance_;
  151. class TestMapsDefaultTypeInternal {
  152. public:
  153. ::google::protobuf::internal::ExplicitlyConstructed<TestMaps>
  154. _instance;
  155. } _TestMaps_default_instance_;
  156. class TestSubmessageMapsDefaultTypeInternal {
  157. public:
  158. ::google::protobuf::internal::ExplicitlyConstructed<TestSubmessageMaps>
  159. _instance;
  160. } _TestSubmessageMaps_default_instance_;
  161. } // namespace protobuf_unittest
  162. namespace protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto {
  163. static void InitDefaultsTestEnumMap_KnownMapFieldEntry_DoNotUse() {
  164. GOOGLE_PROTOBUF_VERIFY_VERSION;
  165. {
  166. void* ptr = &::protobuf_unittest::_TestEnumMap_KnownMapFieldEntry_DoNotUse_default_instance_;
  167. new (ptr) ::protobuf_unittest::TestEnumMap_KnownMapFieldEntry_DoNotUse();
  168. }
  169. ::protobuf_unittest::TestEnumMap_KnownMapFieldEntry_DoNotUse::InitAsDefaultInstance();
  170. }
  171. ::google::protobuf::internal::SCCInfo<0> scc_info_TestEnumMap_KnownMapFieldEntry_DoNotUse =
  172. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestEnumMap_KnownMapFieldEntry_DoNotUse}, {}};
  173. static void InitDefaultsTestEnumMap_UnknownMapFieldEntry_DoNotUse() {
  174. GOOGLE_PROTOBUF_VERIFY_VERSION;
  175. {
  176. void* ptr = &::protobuf_unittest::_TestEnumMap_UnknownMapFieldEntry_DoNotUse_default_instance_;
  177. new (ptr) ::protobuf_unittest::TestEnumMap_UnknownMapFieldEntry_DoNotUse();
  178. }
  179. ::protobuf_unittest::TestEnumMap_UnknownMapFieldEntry_DoNotUse::InitAsDefaultInstance();
  180. }
  181. ::google::protobuf::internal::SCCInfo<0> scc_info_TestEnumMap_UnknownMapFieldEntry_DoNotUse =
  182. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestEnumMap_UnknownMapFieldEntry_DoNotUse}, {}};
  183. static void InitDefaultsTestEnumMap() {
  184. GOOGLE_PROTOBUF_VERIFY_VERSION;
  185. {
  186. void* ptr = &::protobuf_unittest::_TestEnumMap_default_instance_;
  187. new (ptr) ::protobuf_unittest::TestEnumMap();
  188. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  189. }
  190. ::protobuf_unittest::TestEnumMap::InitAsDefaultInstance();
  191. }
  192. ::google::protobuf::internal::SCCInfo<2> scc_info_TestEnumMap =
  193. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTestEnumMap}, {
  194. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestEnumMap_KnownMapFieldEntry_DoNotUse.base,
  195. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestEnumMap_UnknownMapFieldEntry_DoNotUse.base,}};
  196. static void InitDefaultsTestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse() {
  197. GOOGLE_PROTOBUF_VERIFY_VERSION;
  198. {
  199. void* ptr = &::protobuf_unittest::_TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse_default_instance_;
  200. new (ptr) ::protobuf_unittest::TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse();
  201. }
  202. ::protobuf_unittest::TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse::InitAsDefaultInstance();
  203. }
  204. ::google::protobuf::internal::SCCInfo<0> scc_info_TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse =
  205. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse}, {}};
  206. static void InitDefaultsTestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse() {
  207. GOOGLE_PROTOBUF_VERIFY_VERSION;
  208. {
  209. void* ptr = &::protobuf_unittest::_TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse_default_instance_;
  210. new (ptr) ::protobuf_unittest::TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse();
  211. }
  212. ::protobuf_unittest::TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse::InitAsDefaultInstance();
  213. }
  214. ::google::protobuf::internal::SCCInfo<0> scc_info_TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse =
  215. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse}, {}};
  216. static void InitDefaultsTestEnumMapPlusExtra() {
  217. GOOGLE_PROTOBUF_VERIFY_VERSION;
  218. {
  219. void* ptr = &::protobuf_unittest::_TestEnumMapPlusExtra_default_instance_;
  220. new (ptr) ::protobuf_unittest::TestEnumMapPlusExtra();
  221. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  222. }
  223. ::protobuf_unittest::TestEnumMapPlusExtra::InitAsDefaultInstance();
  224. }
  225. ::google::protobuf::internal::SCCInfo<2> scc_info_TestEnumMapPlusExtra =
  226. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTestEnumMapPlusExtra}, {
  227. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse.base,
  228. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse.base,}};
  229. static void InitDefaultsTestImportEnumMap_ImportEnumAmpEntry_DoNotUse() {
  230. GOOGLE_PROTOBUF_VERIFY_VERSION;
  231. {
  232. void* ptr = &::protobuf_unittest::_TestImportEnumMap_ImportEnumAmpEntry_DoNotUse_default_instance_;
  233. new (ptr) ::protobuf_unittest::TestImportEnumMap_ImportEnumAmpEntry_DoNotUse();
  234. }
  235. ::protobuf_unittest::TestImportEnumMap_ImportEnumAmpEntry_DoNotUse::InitAsDefaultInstance();
  236. }
  237. ::google::protobuf::internal::SCCInfo<0> scc_info_TestImportEnumMap_ImportEnumAmpEntry_DoNotUse =
  238. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestImportEnumMap_ImportEnumAmpEntry_DoNotUse}, {}};
  239. static void InitDefaultsTestImportEnumMap() {
  240. GOOGLE_PROTOBUF_VERIFY_VERSION;
  241. {
  242. void* ptr = &::protobuf_unittest::_TestImportEnumMap_default_instance_;
  243. new (ptr) ::protobuf_unittest::TestImportEnumMap();
  244. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  245. }
  246. ::protobuf_unittest::TestImportEnumMap::InitAsDefaultInstance();
  247. }
  248. ::google::protobuf::internal::SCCInfo<1> scc_info_TestImportEnumMap =
  249. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestImportEnumMap}, {
  250. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestImportEnumMap_ImportEnumAmpEntry_DoNotUse.base,}};
  251. static void InitDefaultsTestIntIntMap_MEntry_DoNotUse() {
  252. GOOGLE_PROTOBUF_VERIFY_VERSION;
  253. {
  254. void* ptr = &::protobuf_unittest::_TestIntIntMap_MEntry_DoNotUse_default_instance_;
  255. new (ptr) ::protobuf_unittest::TestIntIntMap_MEntry_DoNotUse();
  256. }
  257. ::protobuf_unittest::TestIntIntMap_MEntry_DoNotUse::InitAsDefaultInstance();
  258. }
  259. ::google::protobuf::internal::SCCInfo<0> scc_info_TestIntIntMap_MEntry_DoNotUse =
  260. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestIntIntMap_MEntry_DoNotUse}, {}};
  261. static void InitDefaultsTestIntIntMap() {
  262. GOOGLE_PROTOBUF_VERIFY_VERSION;
  263. {
  264. void* ptr = &::protobuf_unittest::_TestIntIntMap_default_instance_;
  265. new (ptr) ::protobuf_unittest::TestIntIntMap();
  266. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  267. }
  268. ::protobuf_unittest::TestIntIntMap::InitAsDefaultInstance();
  269. }
  270. ::google::protobuf::internal::SCCInfo<1> scc_info_TestIntIntMap =
  271. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestIntIntMap}, {
  272. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap_MEntry_DoNotUse.base,}};
  273. static void InitDefaultsTestMaps_MInt32Entry_DoNotUse() {
  274. GOOGLE_PROTOBUF_VERIFY_VERSION;
  275. {
  276. void* ptr = &::protobuf_unittest::_TestMaps_MInt32Entry_DoNotUse_default_instance_;
  277. new (ptr) ::protobuf_unittest::TestMaps_MInt32Entry_DoNotUse();
  278. }
  279. ::protobuf_unittest::TestMaps_MInt32Entry_DoNotUse::InitAsDefaultInstance();
  280. }
  281. ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MInt32Entry_DoNotUse =
  282. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestMaps_MInt32Entry_DoNotUse}, {
  283. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base,}};
  284. static void InitDefaultsTestMaps_MInt64Entry_DoNotUse() {
  285. GOOGLE_PROTOBUF_VERIFY_VERSION;
  286. {
  287. void* ptr = &::protobuf_unittest::_TestMaps_MInt64Entry_DoNotUse_default_instance_;
  288. new (ptr) ::protobuf_unittest::TestMaps_MInt64Entry_DoNotUse();
  289. }
  290. ::protobuf_unittest::TestMaps_MInt64Entry_DoNotUse::InitAsDefaultInstance();
  291. }
  292. ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MInt64Entry_DoNotUse =
  293. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestMaps_MInt64Entry_DoNotUse}, {
  294. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base,}};
  295. static void InitDefaultsTestMaps_MUint32Entry_DoNotUse() {
  296. GOOGLE_PROTOBUF_VERIFY_VERSION;
  297. {
  298. void* ptr = &::protobuf_unittest::_TestMaps_MUint32Entry_DoNotUse_default_instance_;
  299. new (ptr) ::protobuf_unittest::TestMaps_MUint32Entry_DoNotUse();
  300. }
  301. ::protobuf_unittest::TestMaps_MUint32Entry_DoNotUse::InitAsDefaultInstance();
  302. }
  303. ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MUint32Entry_DoNotUse =
  304. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestMaps_MUint32Entry_DoNotUse}, {
  305. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base,}};
  306. static void InitDefaultsTestMaps_MUint64Entry_DoNotUse() {
  307. GOOGLE_PROTOBUF_VERIFY_VERSION;
  308. {
  309. void* ptr = &::protobuf_unittest::_TestMaps_MUint64Entry_DoNotUse_default_instance_;
  310. new (ptr) ::protobuf_unittest::TestMaps_MUint64Entry_DoNotUse();
  311. }
  312. ::protobuf_unittest::TestMaps_MUint64Entry_DoNotUse::InitAsDefaultInstance();
  313. }
  314. ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MUint64Entry_DoNotUse =
  315. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestMaps_MUint64Entry_DoNotUse}, {
  316. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base,}};
  317. static void InitDefaultsTestMaps_MSint32Entry_DoNotUse() {
  318. GOOGLE_PROTOBUF_VERIFY_VERSION;
  319. {
  320. void* ptr = &::protobuf_unittest::_TestMaps_MSint32Entry_DoNotUse_default_instance_;
  321. new (ptr) ::protobuf_unittest::TestMaps_MSint32Entry_DoNotUse();
  322. }
  323. ::protobuf_unittest::TestMaps_MSint32Entry_DoNotUse::InitAsDefaultInstance();
  324. }
  325. ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MSint32Entry_DoNotUse =
  326. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestMaps_MSint32Entry_DoNotUse}, {
  327. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base,}};
  328. static void InitDefaultsTestMaps_MSint64Entry_DoNotUse() {
  329. GOOGLE_PROTOBUF_VERIFY_VERSION;
  330. {
  331. void* ptr = &::protobuf_unittest::_TestMaps_MSint64Entry_DoNotUse_default_instance_;
  332. new (ptr) ::protobuf_unittest::TestMaps_MSint64Entry_DoNotUse();
  333. }
  334. ::protobuf_unittest::TestMaps_MSint64Entry_DoNotUse::InitAsDefaultInstance();
  335. }
  336. ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MSint64Entry_DoNotUse =
  337. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestMaps_MSint64Entry_DoNotUse}, {
  338. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base,}};
  339. static void InitDefaultsTestMaps_MFixed32Entry_DoNotUse() {
  340. GOOGLE_PROTOBUF_VERIFY_VERSION;
  341. {
  342. void* ptr = &::protobuf_unittest::_TestMaps_MFixed32Entry_DoNotUse_default_instance_;
  343. new (ptr) ::protobuf_unittest::TestMaps_MFixed32Entry_DoNotUse();
  344. }
  345. ::protobuf_unittest::TestMaps_MFixed32Entry_DoNotUse::InitAsDefaultInstance();
  346. }
  347. ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MFixed32Entry_DoNotUse =
  348. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestMaps_MFixed32Entry_DoNotUse}, {
  349. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base,}};
  350. static void InitDefaultsTestMaps_MFixed64Entry_DoNotUse() {
  351. GOOGLE_PROTOBUF_VERIFY_VERSION;
  352. {
  353. void* ptr = &::protobuf_unittest::_TestMaps_MFixed64Entry_DoNotUse_default_instance_;
  354. new (ptr) ::protobuf_unittest::TestMaps_MFixed64Entry_DoNotUse();
  355. }
  356. ::protobuf_unittest::TestMaps_MFixed64Entry_DoNotUse::InitAsDefaultInstance();
  357. }
  358. ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MFixed64Entry_DoNotUse =
  359. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestMaps_MFixed64Entry_DoNotUse}, {
  360. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base,}};
  361. static void InitDefaultsTestMaps_MSfixed32Entry_DoNotUse() {
  362. GOOGLE_PROTOBUF_VERIFY_VERSION;
  363. {
  364. void* ptr = &::protobuf_unittest::_TestMaps_MSfixed32Entry_DoNotUse_default_instance_;
  365. new (ptr) ::protobuf_unittest::TestMaps_MSfixed32Entry_DoNotUse();
  366. }
  367. ::protobuf_unittest::TestMaps_MSfixed32Entry_DoNotUse::InitAsDefaultInstance();
  368. }
  369. ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MSfixed32Entry_DoNotUse =
  370. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestMaps_MSfixed32Entry_DoNotUse}, {
  371. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base,}};
  372. static void InitDefaultsTestMaps_MSfixed64Entry_DoNotUse() {
  373. GOOGLE_PROTOBUF_VERIFY_VERSION;
  374. {
  375. void* ptr = &::protobuf_unittest::_TestMaps_MSfixed64Entry_DoNotUse_default_instance_;
  376. new (ptr) ::protobuf_unittest::TestMaps_MSfixed64Entry_DoNotUse();
  377. }
  378. ::protobuf_unittest::TestMaps_MSfixed64Entry_DoNotUse::InitAsDefaultInstance();
  379. }
  380. ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MSfixed64Entry_DoNotUse =
  381. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestMaps_MSfixed64Entry_DoNotUse}, {
  382. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base,}};
  383. static void InitDefaultsTestMaps_MBoolEntry_DoNotUse() {
  384. GOOGLE_PROTOBUF_VERIFY_VERSION;
  385. {
  386. void* ptr = &::protobuf_unittest::_TestMaps_MBoolEntry_DoNotUse_default_instance_;
  387. new (ptr) ::protobuf_unittest::TestMaps_MBoolEntry_DoNotUse();
  388. }
  389. ::protobuf_unittest::TestMaps_MBoolEntry_DoNotUse::InitAsDefaultInstance();
  390. }
  391. ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MBoolEntry_DoNotUse =
  392. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestMaps_MBoolEntry_DoNotUse}, {
  393. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base,}};
  394. static void InitDefaultsTestMaps_MStringEntry_DoNotUse() {
  395. GOOGLE_PROTOBUF_VERIFY_VERSION;
  396. {
  397. void* ptr = &::protobuf_unittest::_TestMaps_MStringEntry_DoNotUse_default_instance_;
  398. new (ptr) ::protobuf_unittest::TestMaps_MStringEntry_DoNotUse();
  399. }
  400. ::protobuf_unittest::TestMaps_MStringEntry_DoNotUse::InitAsDefaultInstance();
  401. }
  402. ::google::protobuf::internal::SCCInfo<1> scc_info_TestMaps_MStringEntry_DoNotUse =
  403. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestMaps_MStringEntry_DoNotUse}, {
  404. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base,}};
  405. static void InitDefaultsTestMaps() {
  406. GOOGLE_PROTOBUF_VERIFY_VERSION;
  407. {
  408. void* ptr = &::protobuf_unittest::_TestMaps_default_instance_;
  409. new (ptr) ::protobuf_unittest::TestMaps();
  410. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  411. }
  412. ::protobuf_unittest::TestMaps::InitAsDefaultInstance();
  413. }
  414. ::google::protobuf::internal::SCCInfo<12> scc_info_TestMaps =
  415. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 12, InitDefaultsTestMaps}, {
  416. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps_MInt32Entry_DoNotUse.base,
  417. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps_MInt64Entry_DoNotUse.base,
  418. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps_MUint32Entry_DoNotUse.base,
  419. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps_MUint64Entry_DoNotUse.base,
  420. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps_MSint32Entry_DoNotUse.base,
  421. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps_MSint64Entry_DoNotUse.base,
  422. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps_MFixed32Entry_DoNotUse.base,
  423. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps_MFixed64Entry_DoNotUse.base,
  424. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps_MSfixed32Entry_DoNotUse.base,
  425. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps_MSfixed64Entry_DoNotUse.base,
  426. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps_MBoolEntry_DoNotUse.base,
  427. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps_MStringEntry_DoNotUse.base,}};
  428. static void InitDefaultsTestSubmessageMaps() {
  429. GOOGLE_PROTOBUF_VERIFY_VERSION;
  430. {
  431. void* ptr = &::protobuf_unittest::_TestSubmessageMaps_default_instance_;
  432. new (ptr) ::protobuf_unittest::TestSubmessageMaps();
  433. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  434. }
  435. ::protobuf_unittest::TestSubmessageMaps::InitAsDefaultInstance();
  436. }
  437. ::google::protobuf::internal::SCCInfo<1> scc_info_TestSubmessageMaps =
  438. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestSubmessageMaps}, {
  439. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps.base,}};
  440. void InitDefaults() {
  441. ::google::protobuf::internal::InitSCC(&scc_info_TestEnumMap_KnownMapFieldEntry_DoNotUse.base);
  442. ::google::protobuf::internal::InitSCC(&scc_info_TestEnumMap_UnknownMapFieldEntry_DoNotUse.base);
  443. ::google::protobuf::internal::InitSCC(&scc_info_TestEnumMap.base);
  444. ::google::protobuf::internal::InitSCC(&scc_info_TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse.base);
  445. ::google::protobuf::internal::InitSCC(&scc_info_TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse.base);
  446. ::google::protobuf::internal::InitSCC(&scc_info_TestEnumMapPlusExtra.base);
  447. ::google::protobuf::internal::InitSCC(&scc_info_TestImportEnumMap_ImportEnumAmpEntry_DoNotUse.base);
  448. ::google::protobuf::internal::InitSCC(&scc_info_TestImportEnumMap.base);
  449. ::google::protobuf::internal::InitSCC(&scc_info_TestIntIntMap_MEntry_DoNotUse.base);
  450. ::google::protobuf::internal::InitSCC(&scc_info_TestIntIntMap.base);
  451. ::google::protobuf::internal::InitSCC(&scc_info_TestMaps_MInt32Entry_DoNotUse.base);
  452. ::google::protobuf::internal::InitSCC(&scc_info_TestMaps_MInt64Entry_DoNotUse.base);
  453. ::google::protobuf::internal::InitSCC(&scc_info_TestMaps_MUint32Entry_DoNotUse.base);
  454. ::google::protobuf::internal::InitSCC(&scc_info_TestMaps_MUint64Entry_DoNotUse.base);
  455. ::google::protobuf::internal::InitSCC(&scc_info_TestMaps_MSint32Entry_DoNotUse.base);
  456. ::google::protobuf::internal::InitSCC(&scc_info_TestMaps_MSint64Entry_DoNotUse.base);
  457. ::google::protobuf::internal::InitSCC(&scc_info_TestMaps_MFixed32Entry_DoNotUse.base);
  458. ::google::protobuf::internal::InitSCC(&scc_info_TestMaps_MFixed64Entry_DoNotUse.base);
  459. ::google::protobuf::internal::InitSCC(&scc_info_TestMaps_MSfixed32Entry_DoNotUse.base);
  460. ::google::protobuf::internal::InitSCC(&scc_info_TestMaps_MSfixed64Entry_DoNotUse.base);
  461. ::google::protobuf::internal::InitSCC(&scc_info_TestMaps_MBoolEntry_DoNotUse.base);
  462. ::google::protobuf::internal::InitSCC(&scc_info_TestMaps_MStringEntry_DoNotUse.base);
  463. ::google::protobuf::internal::InitSCC(&scc_info_TestMaps.base);
  464. ::google::protobuf::internal::InitSCC(&scc_info_TestSubmessageMaps.base);
  465. }
  466. ::google::protobuf::Metadata file_level_metadata[24];
  467. const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[2];
  468. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  469. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMap_KnownMapFieldEntry_DoNotUse, _has_bits_),
  470. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMap_KnownMapFieldEntry_DoNotUse, _internal_metadata_),
  471. ~0u, // no _extensions_
  472. ~0u, // no _oneof_case_
  473. ~0u, // no _weak_field_map_
  474. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMap_KnownMapFieldEntry_DoNotUse, key_),
  475. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMap_KnownMapFieldEntry_DoNotUse, value_),
  476. 0,
  477. 1,
  478. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMap_UnknownMapFieldEntry_DoNotUse, _has_bits_),
  479. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMap_UnknownMapFieldEntry_DoNotUse, _internal_metadata_),
  480. ~0u, // no _extensions_
  481. ~0u, // no _oneof_case_
  482. ~0u, // no _weak_field_map_
  483. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMap_UnknownMapFieldEntry_DoNotUse, key_),
  484. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMap_UnknownMapFieldEntry_DoNotUse, value_),
  485. 0,
  486. 1,
  487. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMap, _has_bits_),
  488. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMap, _internal_metadata_),
  489. ~0u, // no _extensions_
  490. ~0u, // no _oneof_case_
  491. ~0u, // no _weak_field_map_
  492. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMap, known_map_field_),
  493. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMap, unknown_map_field_),
  494. ~0u,
  495. ~0u,
  496. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse, _has_bits_),
  497. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse, _internal_metadata_),
  498. ~0u, // no _extensions_
  499. ~0u, // no _oneof_case_
  500. ~0u, // no _weak_field_map_
  501. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse, key_),
  502. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse, value_),
  503. 0,
  504. 1,
  505. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse, _has_bits_),
  506. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse, _internal_metadata_),
  507. ~0u, // no _extensions_
  508. ~0u, // no _oneof_case_
  509. ~0u, // no _weak_field_map_
  510. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse, key_),
  511. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse, value_),
  512. 0,
  513. 1,
  514. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMapPlusExtra, _has_bits_),
  515. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMapPlusExtra, _internal_metadata_),
  516. ~0u, // no _extensions_
  517. ~0u, // no _oneof_case_
  518. ~0u, // no _weak_field_map_
  519. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMapPlusExtra, known_map_field_),
  520. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestEnumMapPlusExtra, unknown_map_field_),
  521. ~0u,
  522. ~0u,
  523. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestImportEnumMap_ImportEnumAmpEntry_DoNotUse, _has_bits_),
  524. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestImportEnumMap_ImportEnumAmpEntry_DoNotUse, _internal_metadata_),
  525. ~0u, // no _extensions_
  526. ~0u, // no _oneof_case_
  527. ~0u, // no _weak_field_map_
  528. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestImportEnumMap_ImportEnumAmpEntry_DoNotUse, key_),
  529. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestImportEnumMap_ImportEnumAmpEntry_DoNotUse, value_),
  530. 0,
  531. 1,
  532. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestImportEnumMap, _has_bits_),
  533. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestImportEnumMap, _internal_metadata_),
  534. ~0u, // no _extensions_
  535. ~0u, // no _oneof_case_
  536. ~0u, // no _weak_field_map_
  537. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestImportEnumMap, import_enum_amp_),
  538. ~0u,
  539. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIntIntMap_MEntry_DoNotUse, _has_bits_),
  540. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIntIntMap_MEntry_DoNotUse, _internal_metadata_),
  541. ~0u, // no _extensions_
  542. ~0u, // no _oneof_case_
  543. ~0u, // no _weak_field_map_
  544. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIntIntMap_MEntry_DoNotUse, key_),
  545. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIntIntMap_MEntry_DoNotUse, value_),
  546. 0,
  547. 1,
  548. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIntIntMap, _has_bits_),
  549. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIntIntMap, _internal_metadata_),
  550. ~0u, // no _extensions_
  551. ~0u, // no _oneof_case_
  552. ~0u, // no _weak_field_map_
  553. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestIntIntMap, m_),
  554. ~0u,
  555. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MInt32Entry_DoNotUse, _has_bits_),
  556. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MInt32Entry_DoNotUse, _internal_metadata_),
  557. ~0u, // no _extensions_
  558. ~0u, // no _oneof_case_
  559. ~0u, // no _weak_field_map_
  560. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MInt32Entry_DoNotUse, key_),
  561. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MInt32Entry_DoNotUse, value_),
  562. 0,
  563. 1,
  564. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MInt64Entry_DoNotUse, _has_bits_),
  565. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MInt64Entry_DoNotUse, _internal_metadata_),
  566. ~0u, // no _extensions_
  567. ~0u, // no _oneof_case_
  568. ~0u, // no _weak_field_map_
  569. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MInt64Entry_DoNotUse, key_),
  570. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MInt64Entry_DoNotUse, value_),
  571. 0,
  572. 1,
  573. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MUint32Entry_DoNotUse, _has_bits_),
  574. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MUint32Entry_DoNotUse, _internal_metadata_),
  575. ~0u, // no _extensions_
  576. ~0u, // no _oneof_case_
  577. ~0u, // no _weak_field_map_
  578. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MUint32Entry_DoNotUse, key_),
  579. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MUint32Entry_DoNotUse, value_),
  580. 0,
  581. 1,
  582. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MUint64Entry_DoNotUse, _has_bits_),
  583. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MUint64Entry_DoNotUse, _internal_metadata_),
  584. ~0u, // no _extensions_
  585. ~0u, // no _oneof_case_
  586. ~0u, // no _weak_field_map_
  587. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MUint64Entry_DoNotUse, key_),
  588. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MUint64Entry_DoNotUse, value_),
  589. 0,
  590. 1,
  591. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSint32Entry_DoNotUse, _has_bits_),
  592. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSint32Entry_DoNotUse, _internal_metadata_),
  593. ~0u, // no _extensions_
  594. ~0u, // no _oneof_case_
  595. ~0u, // no _weak_field_map_
  596. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSint32Entry_DoNotUse, key_),
  597. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSint32Entry_DoNotUse, value_),
  598. 0,
  599. 1,
  600. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSint64Entry_DoNotUse, _has_bits_),
  601. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSint64Entry_DoNotUse, _internal_metadata_),
  602. ~0u, // no _extensions_
  603. ~0u, // no _oneof_case_
  604. ~0u, // no _weak_field_map_
  605. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSint64Entry_DoNotUse, key_),
  606. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSint64Entry_DoNotUse, value_),
  607. 0,
  608. 1,
  609. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MFixed32Entry_DoNotUse, _has_bits_),
  610. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MFixed32Entry_DoNotUse, _internal_metadata_),
  611. ~0u, // no _extensions_
  612. ~0u, // no _oneof_case_
  613. ~0u, // no _weak_field_map_
  614. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MFixed32Entry_DoNotUse, key_),
  615. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MFixed32Entry_DoNotUse, value_),
  616. 0,
  617. 1,
  618. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MFixed64Entry_DoNotUse, _has_bits_),
  619. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MFixed64Entry_DoNotUse, _internal_metadata_),
  620. ~0u, // no _extensions_
  621. ~0u, // no _oneof_case_
  622. ~0u, // no _weak_field_map_
  623. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MFixed64Entry_DoNotUse, key_),
  624. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MFixed64Entry_DoNotUse, value_),
  625. 0,
  626. 1,
  627. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSfixed32Entry_DoNotUse, _has_bits_),
  628. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSfixed32Entry_DoNotUse, _internal_metadata_),
  629. ~0u, // no _extensions_
  630. ~0u, // no _oneof_case_
  631. ~0u, // no _weak_field_map_
  632. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSfixed32Entry_DoNotUse, key_),
  633. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSfixed32Entry_DoNotUse, value_),
  634. 0,
  635. 1,
  636. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSfixed64Entry_DoNotUse, _has_bits_),
  637. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSfixed64Entry_DoNotUse, _internal_metadata_),
  638. ~0u, // no _extensions_
  639. ~0u, // no _oneof_case_
  640. ~0u, // no _weak_field_map_
  641. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSfixed64Entry_DoNotUse, key_),
  642. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MSfixed64Entry_DoNotUse, value_),
  643. 0,
  644. 1,
  645. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MBoolEntry_DoNotUse, _has_bits_),
  646. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MBoolEntry_DoNotUse, _internal_metadata_),
  647. ~0u, // no _extensions_
  648. ~0u, // no _oneof_case_
  649. ~0u, // no _weak_field_map_
  650. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MBoolEntry_DoNotUse, key_),
  651. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MBoolEntry_DoNotUse, value_),
  652. 0,
  653. 1,
  654. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MStringEntry_DoNotUse, _has_bits_),
  655. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MStringEntry_DoNotUse, _internal_metadata_),
  656. ~0u, // no _extensions_
  657. ~0u, // no _oneof_case_
  658. ~0u, // no _weak_field_map_
  659. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MStringEntry_DoNotUse, key_),
  660. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps_MStringEntry_DoNotUse, value_),
  661. 0,
  662. 1,
  663. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps, _has_bits_),
  664. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps, _internal_metadata_),
  665. ~0u, // no _extensions_
  666. ~0u, // no _oneof_case_
  667. ~0u, // no _weak_field_map_
  668. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps, m_int32_),
  669. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps, m_int64_),
  670. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps, m_uint32_),
  671. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps, m_uint64_),
  672. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps, m_sint32_),
  673. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps, m_sint64_),
  674. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps, m_fixed32_),
  675. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps, m_fixed64_),
  676. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps, m_sfixed32_),
  677. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps, m_sfixed64_),
  678. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps, m_bool_),
  679. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestMaps, m_string_),
  680. ~0u,
  681. ~0u,
  682. ~0u,
  683. ~0u,
  684. ~0u,
  685. ~0u,
  686. ~0u,
  687. ~0u,
  688. ~0u,
  689. ~0u,
  690. ~0u,
  691. ~0u,
  692. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestSubmessageMaps, _has_bits_),
  693. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestSubmessageMaps, _internal_metadata_),
  694. ~0u, // no _extensions_
  695. ~0u, // no _oneof_case_
  696. ~0u, // no _weak_field_map_
  697. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestSubmessageMaps, m_),
  698. 0,
  699. };
  700. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  701. { 0, 7, sizeof(::protobuf_unittest::TestEnumMap_KnownMapFieldEntry_DoNotUse)},
  702. { 9, 16, sizeof(::protobuf_unittest::TestEnumMap_UnknownMapFieldEntry_DoNotUse)},
  703. { 18, 25, sizeof(::protobuf_unittest::TestEnumMap)},
  704. { 27, 34, sizeof(::protobuf_unittest::TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse)},
  705. { 36, 43, sizeof(::protobuf_unittest::TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse)},
  706. { 45, 52, sizeof(::protobuf_unittest::TestEnumMapPlusExtra)},
  707. { 54, 61, sizeof(::protobuf_unittest::TestImportEnumMap_ImportEnumAmpEntry_DoNotUse)},
  708. { 63, 69, sizeof(::protobuf_unittest::TestImportEnumMap)},
  709. { 70, 77, sizeof(::protobuf_unittest::TestIntIntMap_MEntry_DoNotUse)},
  710. { 79, 85, sizeof(::protobuf_unittest::TestIntIntMap)},
  711. { 86, 93, sizeof(::protobuf_unittest::TestMaps_MInt32Entry_DoNotUse)},
  712. { 95, 102, sizeof(::protobuf_unittest::TestMaps_MInt64Entry_DoNotUse)},
  713. { 104, 111, sizeof(::protobuf_unittest::TestMaps_MUint32Entry_DoNotUse)},
  714. { 113, 120, sizeof(::protobuf_unittest::TestMaps_MUint64Entry_DoNotUse)},
  715. { 122, 129, sizeof(::protobuf_unittest::TestMaps_MSint32Entry_DoNotUse)},
  716. { 131, 138, sizeof(::protobuf_unittest::TestMaps_MSint64Entry_DoNotUse)},
  717. { 140, 147, sizeof(::protobuf_unittest::TestMaps_MFixed32Entry_DoNotUse)},
  718. { 149, 156, sizeof(::protobuf_unittest::TestMaps_MFixed64Entry_DoNotUse)},
  719. { 158, 165, sizeof(::protobuf_unittest::TestMaps_MSfixed32Entry_DoNotUse)},
  720. { 167, 174, sizeof(::protobuf_unittest::TestMaps_MSfixed64Entry_DoNotUse)},
  721. { 176, 183, sizeof(::protobuf_unittest::TestMaps_MBoolEntry_DoNotUse)},
  722. { 185, 192, sizeof(::protobuf_unittest::TestMaps_MStringEntry_DoNotUse)},
  723. { 194, 211, sizeof(::protobuf_unittest::TestMaps)},
  724. { 223, 229, sizeof(::protobuf_unittest::TestSubmessageMaps)},
  725. };
  726. static ::google::protobuf::Message const * const file_default_instances[] = {
  727. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestEnumMap_KnownMapFieldEntry_DoNotUse_default_instance_),
  728. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestEnumMap_UnknownMapFieldEntry_DoNotUse_default_instance_),
  729. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestEnumMap_default_instance_),
  730. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse_default_instance_),
  731. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse_default_instance_),
  732. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestEnumMapPlusExtra_default_instance_),
  733. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestImportEnumMap_ImportEnumAmpEntry_DoNotUse_default_instance_),
  734. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestImportEnumMap_default_instance_),
  735. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestIntIntMap_MEntry_DoNotUse_default_instance_),
  736. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestIntIntMap_default_instance_),
  737. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMaps_MInt32Entry_DoNotUse_default_instance_),
  738. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMaps_MInt64Entry_DoNotUse_default_instance_),
  739. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMaps_MUint32Entry_DoNotUse_default_instance_),
  740. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMaps_MUint64Entry_DoNotUse_default_instance_),
  741. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMaps_MSint32Entry_DoNotUse_default_instance_),
  742. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMaps_MSint64Entry_DoNotUse_default_instance_),
  743. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMaps_MFixed32Entry_DoNotUse_default_instance_),
  744. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMaps_MFixed64Entry_DoNotUse_default_instance_),
  745. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMaps_MSfixed32Entry_DoNotUse_default_instance_),
  746. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMaps_MSfixed64Entry_DoNotUse_default_instance_),
  747. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMaps_MBoolEntry_DoNotUse_default_instance_),
  748. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMaps_MStringEntry_DoNotUse_default_instance_),
  749. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestMaps_default_instance_),
  750. reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestSubmessageMaps_default_instance_),
  751. };
  752. void protobuf_AssignDescriptors() {
  753. AddDescriptors();
  754. AssignDescriptors(
  755. "google/protobuf/map_proto2_unittest.proto", schemas, file_default_instances, TableStruct::offsets,
  756. file_level_metadata, file_level_enum_descriptors, NULL);
  757. }
  758. void protobuf_AssignDescriptorsOnce() {
  759. static ::google::protobuf::internal::once_flag once;
  760. ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
  761. }
  762. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  763. void protobuf_RegisterTypes(const ::std::string&) {
  764. protobuf_AssignDescriptorsOnce();
  765. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 24);
  766. }
  767. void AddDescriptorsImpl() {
  768. InitDefaults();
  769. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  770. "\n)google/protobuf/map_proto2_unittest.pr"
  771. "oto\022\021protobuf_unittest\032%google/protobuf/"
  772. "unittest_import.proto\"\333\002\n\013TestEnumMap\022J\n"
  773. "\017known_map_field\030e \003(\01321.protobuf_unitte"
  774. "st.TestEnumMap.KnownMapFieldEntry\022N\n\021unk"
  775. "nown_map_field\030f \003(\01323.protobuf_unittest"
  776. ".TestEnumMap.UnknownMapFieldEntry\032V\n\022Kno"
  777. "wnMapFieldEntry\022\013\n\003key\030\001 \001(\005\022/\n\005value\030\002 "
  778. "\001(\0162 .protobuf_unittest.Proto2MapEnum:\0028"
  779. "\001\032X\n\024UnknownMapFieldEntry\022\013\n\003key\030\001 \001(\005\022/"
  780. "\n\005value\030\002 \001(\0162 .protobuf_unittest.Proto2"
  781. "MapEnum:\0028\001\"\210\003\n\024TestEnumMapPlusExtra\022S\n\017"
  782. "known_map_field\030e \003(\0132:.protobuf_unittes"
  783. "t.TestEnumMapPlusExtra.KnownMapFieldEntr"
  784. "y\022W\n\021unknown_map_field\030f \003(\0132<.protobuf_"
  785. "unittest.TestEnumMapPlusExtra.UnknownMap"
  786. "FieldEntry\032_\n\022KnownMapFieldEntry\022\013\n\003key\030"
  787. "\001 \001(\005\0228\n\005value\030\002 \001(\0162).protobuf_unittest"
  788. ".Proto2MapEnumPlusExtra:\0028\001\032a\n\024UnknownMa"
  789. "pFieldEntry\022\013\n\003key\030\001 \001(\005\0228\n\005value\030\002 \001(\0162"
  790. ").protobuf_unittest.Proto2MapEnumPlusExt"
  791. "ra:\0028\001\"\307\001\n\021TestImportEnumMap\022P\n\017import_e"
  792. "num_amp\030\001 \003(\01327.protobuf_unittest.TestIm"
  793. "portEnumMap.ImportEnumAmpEntry\032`\n\022Import"
  794. "EnumAmpEntry\022\013\n\003key\030\001 \001(\005\0229\n\005value\030\002 \001(\016"
  795. "2*.protobuf_unittest_import.ImportEnumFo"
  796. "rMap:\0028\001\"m\n\rTestIntIntMap\0222\n\001m\030\001 \003(\0132\'.p"
  797. "rotobuf_unittest.TestIntIntMap.MEntry\032(\n"
  798. "\006MEntry\022\013\n\003key\030\001 \001(\005\022\r\n\005value\030\002 \001(\005:\0028\001\""
  799. "\270\r\n\010TestMaps\0228\n\007m_int32\030\001 \003(\0132\'.protobuf"
  800. "_unittest.TestMaps.MInt32Entry\0228\n\007m_int6"
  801. "4\030\002 \003(\0132\'.protobuf_unittest.TestMaps.MIn"
  802. "t64Entry\022:\n\010m_uint32\030\003 \003(\0132(.protobuf_un"
  803. "ittest.TestMaps.MUint32Entry\022:\n\010m_uint64"
  804. "\030\004 \003(\0132(.protobuf_unittest.TestMaps.MUin"
  805. "t64Entry\022:\n\010m_sint32\030\005 \003(\0132(.protobuf_un"
  806. "ittest.TestMaps.MSint32Entry\022:\n\010m_sint64"
  807. "\030\006 \003(\0132(.protobuf_unittest.TestMaps.MSin"
  808. "t64Entry\022<\n\tm_fixed32\030\007 \003(\0132).protobuf_u"
  809. "nittest.TestMaps.MFixed32Entry\022<\n\tm_fixe"
  810. "d64\030\010 \003(\0132).protobuf_unittest.TestMaps.M"
  811. "Fixed64Entry\022>\n\nm_sfixed32\030\t \003(\0132*.proto"
  812. "buf_unittest.TestMaps.MSfixed32Entry\022>\n\n"
  813. "m_sfixed64\030\n \003(\0132*.protobuf_unittest.Tes"
  814. "tMaps.MSfixed64Entry\0226\n\006m_bool\030\013 \003(\0132&.p"
  815. "rotobuf_unittest.TestMaps.MBoolEntry\022:\n\010"
  816. "m_string\030\014 \003(\0132(.protobuf_unittest.TestM"
  817. "aps.MStringEntry\032O\n\013MInt32Entry\022\013\n\003key\030\001"
  818. " \001(\005\022/\n\005value\030\002 \001(\0132 .protobuf_unittest."
  819. "TestIntIntMap:\0028\001\032O\n\013MInt64Entry\022\013\n\003key\030"
  820. "\001 \001(\003\022/\n\005value\030\002 \001(\0132 .protobuf_unittest"
  821. ".TestIntIntMap:\0028\001\032P\n\014MUint32Entry\022\013\n\003ke"
  822. "y\030\001 \001(\r\022/\n\005value\030\002 \001(\0132 .protobuf_unitte"
  823. "st.TestIntIntMap:\0028\001\032P\n\014MUint64Entry\022\013\n\003"
  824. "key\030\001 \001(\004\022/\n\005value\030\002 \001(\0132 .protobuf_unit"
  825. "test.TestIntIntMap:\0028\001\032P\n\014MSint32Entry\022\013"
  826. "\n\003key\030\001 \001(\021\022/\n\005value\030\002 \001(\0132 .protobuf_un"
  827. "ittest.TestIntIntMap:\0028\001\032P\n\014MSint64Entry"
  828. "\022\013\n\003key\030\001 \001(\022\022/\n\005value\030\002 \001(\0132 .protobuf_"
  829. "unittest.TestIntIntMap:\0028\001\032Q\n\rMFixed32En"
  830. "try\022\013\n\003key\030\001 \001(\007\022/\n\005value\030\002 \001(\0132 .protob"
  831. "uf_unittest.TestIntIntMap:\0028\001\032Q\n\rMFixed6"
  832. "4Entry\022\013\n\003key\030\001 \001(\006\022/\n\005value\030\002 \001(\0132 .pro"
  833. "tobuf_unittest.TestIntIntMap:\0028\001\032R\n\016MSfi"
  834. "xed32Entry\022\013\n\003key\030\001 \001(\017\022/\n\005value\030\002 \001(\0132 "
  835. ".protobuf_unittest.TestIntIntMap:\0028\001\032R\n\016"
  836. "MSfixed64Entry\022\013\n\003key\030\001 \001(\020\022/\n\005value\030\002 \001"
  837. "(\0132 .protobuf_unittest.TestIntIntMap:\0028\001"
  838. "\032N\n\nMBoolEntry\022\013\n\003key\030\001 \001(\010\022/\n\005value\030\002 \001"
  839. "(\0132 .protobuf_unittest.TestIntIntMap:\0028\001"
  840. "\032P\n\014MStringEntry\022\013\n\003key\030\001 \001(\t\022/\n\005value\030\002"
  841. " \001(\0132 .protobuf_unittest.TestIntIntMap:\002"
  842. "8\001\"<\n\022TestSubmessageMaps\022&\n\001m\030\001 \001(\0132\033.pr"
  843. "otobuf_unittest.TestMaps*Z\n\rProto2MapEnu"
  844. "m\022\027\n\023PROTO2_MAP_ENUM_FOO\020\000\022\027\n\023PROTO2_MAP"
  845. "_ENUM_BAR\020\001\022\027\n\023PROTO2_MAP_ENUM_BAZ\020\002*\206\001\n"
  846. "\026Proto2MapEnumPlusExtra\022\031\n\025E_PROTO2_MAP_"
  847. "ENUM_FOO\020\000\022\031\n\025E_PROTO2_MAP_ENUM_BAR\020\001\022\031\n"
  848. "\025E_PROTO2_MAP_ENUM_BAZ\020\002\022\033\n\027E_PROTO2_MAP"
  849. "_ENUM_EXTRA\020\003B\003\370\001\001"
  850. };
  851. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  852. descriptor, 3178);
  853. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  854. "google/protobuf/map_proto2_unittest.proto", &protobuf_RegisterTypes);
  855. ::protobuf_google_2fprotobuf_2funittest_5fimport_2eproto::AddDescriptors();
  856. }
  857. void AddDescriptors() {
  858. static ::google::protobuf::internal::once_flag once;
  859. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  860. }
  861. // Force AddDescriptors() to be called at dynamic initialization time.
  862. struct StaticDescriptorInitializer {
  863. StaticDescriptorInitializer() {
  864. AddDescriptors();
  865. }
  866. } static_descriptor_initializer;
  867. } // namespace protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto
  868. namespace protobuf_unittest {
  869. const ::google::protobuf::EnumDescriptor* Proto2MapEnum_descriptor() {
  870. protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  871. return protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_enum_descriptors[0];
  872. }
  873. bool Proto2MapEnum_IsValid(int value) {
  874. switch (value) {
  875. case 0:
  876. case 1:
  877. case 2:
  878. return true;
  879. default:
  880. return false;
  881. }
  882. }
  883. const ::google::protobuf::EnumDescriptor* Proto2MapEnumPlusExtra_descriptor() {
  884. protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  885. return protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_enum_descriptors[1];
  886. }
  887. bool Proto2MapEnumPlusExtra_IsValid(int value) {
  888. switch (value) {
  889. case 0:
  890. case 1:
  891. case 2:
  892. case 3:
  893. return true;
  894. default:
  895. return false;
  896. }
  897. }
  898. // ===================================================================
  899. TestEnumMap_KnownMapFieldEntry_DoNotUse::TestEnumMap_KnownMapFieldEntry_DoNotUse() {}
  900. TestEnumMap_KnownMapFieldEntry_DoNotUse::TestEnumMap_KnownMapFieldEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  901. void TestEnumMap_KnownMapFieldEntry_DoNotUse::MergeFrom(const TestEnumMap_KnownMapFieldEntry_DoNotUse& other) {
  902. MergeFromInternal(other);
  903. }
  904. ::google::protobuf::Metadata TestEnumMap_KnownMapFieldEntry_DoNotUse::GetMetadata() const {
  905. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  906. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[0];
  907. }
  908. void TestEnumMap_KnownMapFieldEntry_DoNotUse::MergeFrom(
  909. const ::google::protobuf::Message& other) {
  910. ::google::protobuf::Message::MergeFrom(other);
  911. }
  912. // ===================================================================
  913. TestEnumMap_UnknownMapFieldEntry_DoNotUse::TestEnumMap_UnknownMapFieldEntry_DoNotUse() {}
  914. TestEnumMap_UnknownMapFieldEntry_DoNotUse::TestEnumMap_UnknownMapFieldEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  915. void TestEnumMap_UnknownMapFieldEntry_DoNotUse::MergeFrom(const TestEnumMap_UnknownMapFieldEntry_DoNotUse& other) {
  916. MergeFromInternal(other);
  917. }
  918. ::google::protobuf::Metadata TestEnumMap_UnknownMapFieldEntry_DoNotUse::GetMetadata() const {
  919. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  920. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[1];
  921. }
  922. void TestEnumMap_UnknownMapFieldEntry_DoNotUse::MergeFrom(
  923. const ::google::protobuf::Message& other) {
  924. ::google::protobuf::Message::MergeFrom(other);
  925. }
  926. // ===================================================================
  927. void TestEnumMap::InitAsDefaultInstance() {
  928. }
  929. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  930. const int TestEnumMap::kKnownMapFieldFieldNumber;
  931. const int TestEnumMap::kUnknownMapFieldFieldNumber;
  932. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  933. TestEnumMap::TestEnumMap()
  934. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  935. ::google::protobuf::internal::InitSCC(
  936. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestEnumMap.base);
  937. SharedCtor();
  938. // @@protoc_insertion_point(constructor:protobuf_unittest.TestEnumMap)
  939. }
  940. TestEnumMap::TestEnumMap(::google::protobuf::Arena* arena)
  941. : ::google::protobuf::Message(),
  942. _internal_metadata_(arena),
  943. known_map_field_(arena),
  944. unknown_map_field_(arena) {
  945. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestEnumMap.base);
  946. SharedCtor();
  947. RegisterArenaDtor(arena);
  948. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestEnumMap)
  949. }
  950. TestEnumMap::TestEnumMap(const TestEnumMap& from)
  951. : ::google::protobuf::Message(),
  952. _internal_metadata_(NULL),
  953. _has_bits_(from._has_bits_) {
  954. _internal_metadata_.MergeFrom(from._internal_metadata_);
  955. known_map_field_.MergeFrom(from.known_map_field_);
  956. unknown_map_field_.MergeFrom(from.unknown_map_field_);
  957. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestEnumMap)
  958. }
  959. void TestEnumMap::SharedCtor() {
  960. }
  961. TestEnumMap::~TestEnumMap() {
  962. // @@protoc_insertion_point(destructor:protobuf_unittest.TestEnumMap)
  963. SharedDtor();
  964. }
  965. void TestEnumMap::SharedDtor() {
  966. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  967. }
  968. void TestEnumMap::ArenaDtor(void* object) {
  969. TestEnumMap* _this = reinterpret_cast< TestEnumMap* >(object);
  970. (void)_this;
  971. }
  972. void TestEnumMap::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  973. }
  974. void TestEnumMap::SetCachedSize(int size) const {
  975. _cached_size_.Set(size);
  976. }
  977. const ::google::protobuf::Descriptor* TestEnumMap::descriptor() {
  978. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  979. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  980. }
  981. const TestEnumMap& TestEnumMap::default_instance() {
  982. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestEnumMap.base);
  983. return *internal_default_instance();
  984. }
  985. void TestEnumMap::Clear() {
  986. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestEnumMap)
  987. ::google::protobuf::uint32 cached_has_bits = 0;
  988. // Prevent compiler warnings about cached_has_bits being unused
  989. (void) cached_has_bits;
  990. known_map_field_.Clear();
  991. unknown_map_field_.Clear();
  992. _has_bits_.Clear();
  993. _internal_metadata_.Clear();
  994. }
  995. bool TestEnumMap::MergePartialFromCodedStream(
  996. ::google::protobuf::io::CodedInputStream* input) {
  997. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  998. ::google::protobuf::uint32 tag;
  999. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestEnumMap)
  1000. for (;;) {
  1001. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  1002. tag = p.first;
  1003. if (!p.second) goto handle_unusual;
  1004. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1005. // map<int32, .protobuf_unittest.Proto2MapEnum> known_map_field = 101;
  1006. case 101: {
  1007. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1008. static_cast< ::google::protobuf::uint8>(42u /* 810 & 0xFF */)) {
  1009. ::std::unique_ptr<TestEnumMap_KnownMapFieldEntry_DoNotUse> entry(known_map_field_.NewEntry());
  1010. {
  1011. ::std::string data;
  1012. DO_(::google::protobuf::internal::WireFormatLite::ReadString(input, &data));
  1013. DO_(entry->ParseFromString(data));
  1014. if (::protobuf_unittest::Proto2MapEnum_IsValid(*entry->mutable_value())) {
  1015. (*mutable_known_map_field())[entry->key()] =
  1016. static_cast< ::protobuf_unittest::Proto2MapEnum >(*entry->mutable_value());
  1017. } else {
  1018. mutable_unknown_fields()->AddLengthDelimited(101, data);
  1019. }
  1020. }
  1021. if (entry->GetArena() != NULL) entry.release();
  1022. } else {
  1023. goto handle_unusual;
  1024. }
  1025. break;
  1026. }
  1027. // map<int32, .protobuf_unittest.Proto2MapEnum> unknown_map_field = 102;
  1028. case 102: {
  1029. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1030. static_cast< ::google::protobuf::uint8>(50u /* 818 & 0xFF */)) {
  1031. ::std::unique_ptr<TestEnumMap_UnknownMapFieldEntry_DoNotUse> entry(unknown_map_field_.NewEntry());
  1032. {
  1033. ::std::string data;
  1034. DO_(::google::protobuf::internal::WireFormatLite::ReadString(input, &data));
  1035. DO_(entry->ParseFromString(data));
  1036. if (::protobuf_unittest::Proto2MapEnum_IsValid(*entry->mutable_value())) {
  1037. (*mutable_unknown_map_field())[entry->key()] =
  1038. static_cast< ::protobuf_unittest::Proto2MapEnum >(*entry->mutable_value());
  1039. } else {
  1040. mutable_unknown_fields()->AddLengthDelimited(102, data);
  1041. }
  1042. }
  1043. if (entry->GetArena() != NULL) entry.release();
  1044. } else {
  1045. goto handle_unusual;
  1046. }
  1047. break;
  1048. }
  1049. default: {
  1050. handle_unusual:
  1051. if (tag == 0) {
  1052. goto success;
  1053. }
  1054. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1055. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1056. break;
  1057. }
  1058. }
  1059. }
  1060. success:
  1061. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestEnumMap)
  1062. return true;
  1063. failure:
  1064. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestEnumMap)
  1065. return false;
  1066. #undef DO_
  1067. }
  1068. void TestEnumMap::SerializeWithCachedSizes(
  1069. ::google::protobuf::io::CodedOutputStream* output) const {
  1070. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestEnumMap)
  1071. ::google::protobuf::uint32 cached_has_bits = 0;
  1072. (void) cached_has_bits;
  1073. // map<int32, .protobuf_unittest.Proto2MapEnum> known_map_field = 101;
  1074. if (!this->known_map_field().empty()) {
  1075. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::const_pointer
  1076. ConstPtr;
  1077. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  1078. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  1079. if (output->IsSerializationDeterministic() &&
  1080. this->known_map_field().size() > 1) {
  1081. ::std::unique_ptr<SortItem[]> items(
  1082. new SortItem[this->known_map_field().size()]);
  1083. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::size_type size_type;
  1084. size_type n = 0;
  1085. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::const_iterator
  1086. it = this->known_map_field().begin();
  1087. it != this->known_map_field().end(); ++it, ++n) {
  1088. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  1089. }
  1090. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  1091. ::std::unique_ptr<TestEnumMap_KnownMapFieldEntry_DoNotUse> entry;
  1092. for (size_type i = 0; i < n; i++) {
  1093. entry.reset(known_map_field_.NewEnumEntryWrapper(
  1094. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  1095. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1096. 101, *entry, output);
  1097. if (entry->GetArena() != NULL) {
  1098. entry.release();
  1099. }
  1100. }
  1101. } else {
  1102. ::std::unique_ptr<TestEnumMap_KnownMapFieldEntry_DoNotUse> entry;
  1103. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::const_iterator
  1104. it = this->known_map_field().begin();
  1105. it != this->known_map_field().end(); ++it) {
  1106. entry.reset(known_map_field_.NewEnumEntryWrapper(
  1107. it->first, it->second));
  1108. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1109. 101, *entry, output);
  1110. if (entry->GetArena() != NULL) {
  1111. entry.release();
  1112. }
  1113. }
  1114. }
  1115. }
  1116. // map<int32, .protobuf_unittest.Proto2MapEnum> unknown_map_field = 102;
  1117. if (!this->unknown_map_field().empty()) {
  1118. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::const_pointer
  1119. ConstPtr;
  1120. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  1121. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  1122. if (output->IsSerializationDeterministic() &&
  1123. this->unknown_map_field().size() > 1) {
  1124. ::std::unique_ptr<SortItem[]> items(
  1125. new SortItem[this->unknown_map_field().size()]);
  1126. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::size_type size_type;
  1127. size_type n = 0;
  1128. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::const_iterator
  1129. it = this->unknown_map_field().begin();
  1130. it != this->unknown_map_field().end(); ++it, ++n) {
  1131. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  1132. }
  1133. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  1134. ::std::unique_ptr<TestEnumMap_UnknownMapFieldEntry_DoNotUse> entry;
  1135. for (size_type i = 0; i < n; i++) {
  1136. entry.reset(unknown_map_field_.NewEnumEntryWrapper(
  1137. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  1138. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1139. 102, *entry, output);
  1140. if (entry->GetArena() != NULL) {
  1141. entry.release();
  1142. }
  1143. }
  1144. } else {
  1145. ::std::unique_ptr<TestEnumMap_UnknownMapFieldEntry_DoNotUse> entry;
  1146. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::const_iterator
  1147. it = this->unknown_map_field().begin();
  1148. it != this->unknown_map_field().end(); ++it) {
  1149. entry.reset(unknown_map_field_.NewEnumEntryWrapper(
  1150. it->first, it->second));
  1151. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1152. 102, *entry, output);
  1153. if (entry->GetArena() != NULL) {
  1154. entry.release();
  1155. }
  1156. }
  1157. }
  1158. }
  1159. if (_internal_metadata_.have_unknown_fields()) {
  1160. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1161. _internal_metadata_.unknown_fields(), output);
  1162. }
  1163. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestEnumMap)
  1164. }
  1165. ::google::protobuf::uint8* TestEnumMap::InternalSerializeWithCachedSizesToArray(
  1166. bool deterministic, ::google::protobuf::uint8* target) const {
  1167. (void)deterministic; // Unused
  1168. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestEnumMap)
  1169. ::google::protobuf::uint32 cached_has_bits = 0;
  1170. (void) cached_has_bits;
  1171. // map<int32, .protobuf_unittest.Proto2MapEnum> known_map_field = 101;
  1172. if (!this->known_map_field().empty()) {
  1173. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::const_pointer
  1174. ConstPtr;
  1175. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  1176. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  1177. if (deterministic &&
  1178. this->known_map_field().size() > 1) {
  1179. ::std::unique_ptr<SortItem[]> items(
  1180. new SortItem[this->known_map_field().size()]);
  1181. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::size_type size_type;
  1182. size_type n = 0;
  1183. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::const_iterator
  1184. it = this->known_map_field().begin();
  1185. it != this->known_map_field().end(); ++it, ++n) {
  1186. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  1187. }
  1188. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  1189. ::std::unique_ptr<TestEnumMap_KnownMapFieldEntry_DoNotUse> entry;
  1190. for (size_type i = 0; i < n; i++) {
  1191. entry.reset(known_map_field_.NewEnumEntryWrapper(
  1192. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  1193. target = ::google::protobuf::internal::WireFormatLite::
  1194. InternalWriteMessageNoVirtualToArray(
  1195. 101, *entry, deterministic, target);
  1196. ;
  1197. if (entry->GetArena() != NULL) {
  1198. entry.release();
  1199. }
  1200. }
  1201. } else {
  1202. ::std::unique_ptr<TestEnumMap_KnownMapFieldEntry_DoNotUse> entry;
  1203. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::const_iterator
  1204. it = this->known_map_field().begin();
  1205. it != this->known_map_field().end(); ++it) {
  1206. entry.reset(known_map_field_.NewEnumEntryWrapper(
  1207. it->first, it->second));
  1208. target = ::google::protobuf::internal::WireFormatLite::
  1209. InternalWriteMessageNoVirtualToArray(
  1210. 101, *entry, deterministic, target);
  1211. ;
  1212. if (entry->GetArena() != NULL) {
  1213. entry.release();
  1214. }
  1215. }
  1216. }
  1217. }
  1218. // map<int32, .protobuf_unittest.Proto2MapEnum> unknown_map_field = 102;
  1219. if (!this->unknown_map_field().empty()) {
  1220. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::const_pointer
  1221. ConstPtr;
  1222. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  1223. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  1224. if (deterministic &&
  1225. this->unknown_map_field().size() > 1) {
  1226. ::std::unique_ptr<SortItem[]> items(
  1227. new SortItem[this->unknown_map_field().size()]);
  1228. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::size_type size_type;
  1229. size_type n = 0;
  1230. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::const_iterator
  1231. it = this->unknown_map_field().begin();
  1232. it != this->unknown_map_field().end(); ++it, ++n) {
  1233. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  1234. }
  1235. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  1236. ::std::unique_ptr<TestEnumMap_UnknownMapFieldEntry_DoNotUse> entry;
  1237. for (size_type i = 0; i < n; i++) {
  1238. entry.reset(unknown_map_field_.NewEnumEntryWrapper(
  1239. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  1240. target = ::google::protobuf::internal::WireFormatLite::
  1241. InternalWriteMessageNoVirtualToArray(
  1242. 102, *entry, deterministic, target);
  1243. ;
  1244. if (entry->GetArena() != NULL) {
  1245. entry.release();
  1246. }
  1247. }
  1248. } else {
  1249. ::std::unique_ptr<TestEnumMap_UnknownMapFieldEntry_DoNotUse> entry;
  1250. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::const_iterator
  1251. it = this->unknown_map_field().begin();
  1252. it != this->unknown_map_field().end(); ++it) {
  1253. entry.reset(unknown_map_field_.NewEnumEntryWrapper(
  1254. it->first, it->second));
  1255. target = ::google::protobuf::internal::WireFormatLite::
  1256. InternalWriteMessageNoVirtualToArray(
  1257. 102, *entry, deterministic, target);
  1258. ;
  1259. if (entry->GetArena() != NULL) {
  1260. entry.release();
  1261. }
  1262. }
  1263. }
  1264. }
  1265. if (_internal_metadata_.have_unknown_fields()) {
  1266. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1267. _internal_metadata_.unknown_fields(), target);
  1268. }
  1269. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestEnumMap)
  1270. return target;
  1271. }
  1272. size_t TestEnumMap::ByteSizeLong() const {
  1273. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestEnumMap)
  1274. size_t total_size = 0;
  1275. if (_internal_metadata_.have_unknown_fields()) {
  1276. total_size +=
  1277. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1278. _internal_metadata_.unknown_fields());
  1279. }
  1280. // map<int32, .protobuf_unittest.Proto2MapEnum> known_map_field = 101;
  1281. total_size += 2 *
  1282. ::google::protobuf::internal::FromIntSize(this->known_map_field_size());
  1283. {
  1284. ::std::unique_ptr<TestEnumMap_KnownMapFieldEntry_DoNotUse> entry;
  1285. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::const_iterator
  1286. it = this->known_map_field().begin();
  1287. it != this->known_map_field().end(); ++it) {
  1288. if (entry.get() != NULL && entry->GetArena() != NULL) {
  1289. entry.release();
  1290. }
  1291. entry.reset(known_map_field_.NewEnumEntryWrapper(it->first, it->second));
  1292. total_size += ::google::protobuf::internal::WireFormatLite::
  1293. MessageSizeNoVirtual(*entry);
  1294. }
  1295. if (entry.get() != NULL && entry->GetArena() != NULL) {
  1296. entry.release();
  1297. }
  1298. }
  1299. // map<int32, .protobuf_unittest.Proto2MapEnum> unknown_map_field = 102;
  1300. total_size += 2 *
  1301. ::google::protobuf::internal::FromIntSize(this->unknown_map_field_size());
  1302. {
  1303. ::std::unique_ptr<TestEnumMap_UnknownMapFieldEntry_DoNotUse> entry;
  1304. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnum >::const_iterator
  1305. it = this->unknown_map_field().begin();
  1306. it != this->unknown_map_field().end(); ++it) {
  1307. if (entry.get() != NULL && entry->GetArena() != NULL) {
  1308. entry.release();
  1309. }
  1310. entry.reset(unknown_map_field_.NewEnumEntryWrapper(it->first, it->second));
  1311. total_size += ::google::protobuf::internal::WireFormatLite::
  1312. MessageSizeNoVirtual(*entry);
  1313. }
  1314. if (entry.get() != NULL && entry->GetArena() != NULL) {
  1315. entry.release();
  1316. }
  1317. }
  1318. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1319. SetCachedSize(cached_size);
  1320. return total_size;
  1321. }
  1322. void TestEnumMap::MergeFrom(const ::google::protobuf::Message& from) {
  1323. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestEnumMap)
  1324. GOOGLE_DCHECK_NE(&from, this);
  1325. const TestEnumMap* source =
  1326. ::google::protobuf::internal::DynamicCastToGenerated<const TestEnumMap>(
  1327. &from);
  1328. if (source == NULL) {
  1329. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestEnumMap)
  1330. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1331. } else {
  1332. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestEnumMap)
  1333. MergeFrom(*source);
  1334. }
  1335. }
  1336. void TestEnumMap::MergeFrom(const TestEnumMap& from) {
  1337. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestEnumMap)
  1338. GOOGLE_DCHECK_NE(&from, this);
  1339. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1340. ::google::protobuf::uint32 cached_has_bits = 0;
  1341. (void) cached_has_bits;
  1342. known_map_field_.MergeFrom(from.known_map_field_);
  1343. unknown_map_field_.MergeFrom(from.unknown_map_field_);
  1344. }
  1345. void TestEnumMap::CopyFrom(const ::google::protobuf::Message& from) {
  1346. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestEnumMap)
  1347. if (&from == this) return;
  1348. Clear();
  1349. MergeFrom(from);
  1350. }
  1351. void TestEnumMap::CopyFrom(const TestEnumMap& from) {
  1352. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestEnumMap)
  1353. if (&from == this) return;
  1354. Clear();
  1355. MergeFrom(from);
  1356. }
  1357. bool TestEnumMap::IsInitialized() const {
  1358. return true;
  1359. }
  1360. void TestEnumMap::Swap(TestEnumMap* other) {
  1361. if (other == this) return;
  1362. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  1363. InternalSwap(other);
  1364. } else {
  1365. TestEnumMap* temp = New(GetArenaNoVirtual());
  1366. temp->MergeFrom(*other);
  1367. other->CopyFrom(*this);
  1368. InternalSwap(temp);
  1369. if (GetArenaNoVirtual() == NULL) {
  1370. delete temp;
  1371. }
  1372. }
  1373. }
  1374. void TestEnumMap::UnsafeArenaSwap(TestEnumMap* other) {
  1375. if (other == this) return;
  1376. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  1377. InternalSwap(other);
  1378. }
  1379. void TestEnumMap::InternalSwap(TestEnumMap* other) {
  1380. using std::swap;
  1381. known_map_field_.Swap(&other->known_map_field_);
  1382. unknown_map_field_.Swap(&other->unknown_map_field_);
  1383. swap(_has_bits_[0], other->_has_bits_[0]);
  1384. _internal_metadata_.Swap(&other->_internal_metadata_);
  1385. }
  1386. ::google::protobuf::Metadata TestEnumMap::GetMetadata() const {
  1387. protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  1388. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  1389. }
  1390. // ===================================================================
  1391. TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse::TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse() {}
  1392. TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse::TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  1393. void TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse::MergeFrom(const TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse& other) {
  1394. MergeFromInternal(other);
  1395. }
  1396. ::google::protobuf::Metadata TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse::GetMetadata() const {
  1397. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  1398. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[3];
  1399. }
  1400. void TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse::MergeFrom(
  1401. const ::google::protobuf::Message& other) {
  1402. ::google::protobuf::Message::MergeFrom(other);
  1403. }
  1404. // ===================================================================
  1405. TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse::TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse() {}
  1406. TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse::TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  1407. void TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse::MergeFrom(const TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse& other) {
  1408. MergeFromInternal(other);
  1409. }
  1410. ::google::protobuf::Metadata TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse::GetMetadata() const {
  1411. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  1412. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[4];
  1413. }
  1414. void TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse::MergeFrom(
  1415. const ::google::protobuf::Message& other) {
  1416. ::google::protobuf::Message::MergeFrom(other);
  1417. }
  1418. // ===================================================================
  1419. void TestEnumMapPlusExtra::InitAsDefaultInstance() {
  1420. }
  1421. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1422. const int TestEnumMapPlusExtra::kKnownMapFieldFieldNumber;
  1423. const int TestEnumMapPlusExtra::kUnknownMapFieldFieldNumber;
  1424. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1425. TestEnumMapPlusExtra::TestEnumMapPlusExtra()
  1426. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1427. ::google::protobuf::internal::InitSCC(
  1428. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestEnumMapPlusExtra.base);
  1429. SharedCtor();
  1430. // @@protoc_insertion_point(constructor:protobuf_unittest.TestEnumMapPlusExtra)
  1431. }
  1432. TestEnumMapPlusExtra::TestEnumMapPlusExtra(::google::protobuf::Arena* arena)
  1433. : ::google::protobuf::Message(),
  1434. _internal_metadata_(arena),
  1435. known_map_field_(arena),
  1436. unknown_map_field_(arena) {
  1437. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestEnumMapPlusExtra.base);
  1438. SharedCtor();
  1439. RegisterArenaDtor(arena);
  1440. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestEnumMapPlusExtra)
  1441. }
  1442. TestEnumMapPlusExtra::TestEnumMapPlusExtra(const TestEnumMapPlusExtra& from)
  1443. : ::google::protobuf::Message(),
  1444. _internal_metadata_(NULL),
  1445. _has_bits_(from._has_bits_) {
  1446. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1447. known_map_field_.MergeFrom(from.known_map_field_);
  1448. unknown_map_field_.MergeFrom(from.unknown_map_field_);
  1449. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestEnumMapPlusExtra)
  1450. }
  1451. void TestEnumMapPlusExtra::SharedCtor() {
  1452. }
  1453. TestEnumMapPlusExtra::~TestEnumMapPlusExtra() {
  1454. // @@protoc_insertion_point(destructor:protobuf_unittest.TestEnumMapPlusExtra)
  1455. SharedDtor();
  1456. }
  1457. void TestEnumMapPlusExtra::SharedDtor() {
  1458. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  1459. }
  1460. void TestEnumMapPlusExtra::ArenaDtor(void* object) {
  1461. TestEnumMapPlusExtra* _this = reinterpret_cast< TestEnumMapPlusExtra* >(object);
  1462. (void)_this;
  1463. }
  1464. void TestEnumMapPlusExtra::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  1465. }
  1466. void TestEnumMapPlusExtra::SetCachedSize(int size) const {
  1467. _cached_size_.Set(size);
  1468. }
  1469. const ::google::protobuf::Descriptor* TestEnumMapPlusExtra::descriptor() {
  1470. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  1471. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1472. }
  1473. const TestEnumMapPlusExtra& TestEnumMapPlusExtra::default_instance() {
  1474. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestEnumMapPlusExtra.base);
  1475. return *internal_default_instance();
  1476. }
  1477. void TestEnumMapPlusExtra::Clear() {
  1478. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestEnumMapPlusExtra)
  1479. ::google::protobuf::uint32 cached_has_bits = 0;
  1480. // Prevent compiler warnings about cached_has_bits being unused
  1481. (void) cached_has_bits;
  1482. known_map_field_.Clear();
  1483. unknown_map_field_.Clear();
  1484. _has_bits_.Clear();
  1485. _internal_metadata_.Clear();
  1486. }
  1487. bool TestEnumMapPlusExtra::MergePartialFromCodedStream(
  1488. ::google::protobuf::io::CodedInputStream* input) {
  1489. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1490. ::google::protobuf::uint32 tag;
  1491. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestEnumMapPlusExtra)
  1492. for (;;) {
  1493. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  1494. tag = p.first;
  1495. if (!p.second) goto handle_unusual;
  1496. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1497. // map<int32, .protobuf_unittest.Proto2MapEnumPlusExtra> known_map_field = 101;
  1498. case 101: {
  1499. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1500. static_cast< ::google::protobuf::uint8>(42u /* 810 & 0xFF */)) {
  1501. ::std::unique_ptr<TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse> entry(known_map_field_.NewEntry());
  1502. {
  1503. ::std::string data;
  1504. DO_(::google::protobuf::internal::WireFormatLite::ReadString(input, &data));
  1505. DO_(entry->ParseFromString(data));
  1506. if (::protobuf_unittest::Proto2MapEnumPlusExtra_IsValid(*entry->mutable_value())) {
  1507. (*mutable_known_map_field())[entry->key()] =
  1508. static_cast< ::protobuf_unittest::Proto2MapEnumPlusExtra >(*entry->mutable_value());
  1509. } else {
  1510. mutable_unknown_fields()->AddLengthDelimited(101, data);
  1511. }
  1512. }
  1513. if (entry->GetArena() != NULL) entry.release();
  1514. } else {
  1515. goto handle_unusual;
  1516. }
  1517. break;
  1518. }
  1519. // map<int32, .protobuf_unittest.Proto2MapEnumPlusExtra> unknown_map_field = 102;
  1520. case 102: {
  1521. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1522. static_cast< ::google::protobuf::uint8>(50u /* 818 & 0xFF */)) {
  1523. ::std::unique_ptr<TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse> entry(unknown_map_field_.NewEntry());
  1524. {
  1525. ::std::string data;
  1526. DO_(::google::protobuf::internal::WireFormatLite::ReadString(input, &data));
  1527. DO_(entry->ParseFromString(data));
  1528. if (::protobuf_unittest::Proto2MapEnumPlusExtra_IsValid(*entry->mutable_value())) {
  1529. (*mutable_unknown_map_field())[entry->key()] =
  1530. static_cast< ::protobuf_unittest::Proto2MapEnumPlusExtra >(*entry->mutable_value());
  1531. } else {
  1532. mutable_unknown_fields()->AddLengthDelimited(102, data);
  1533. }
  1534. }
  1535. if (entry->GetArena() != NULL) entry.release();
  1536. } else {
  1537. goto handle_unusual;
  1538. }
  1539. break;
  1540. }
  1541. default: {
  1542. handle_unusual:
  1543. if (tag == 0) {
  1544. goto success;
  1545. }
  1546. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1547. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1548. break;
  1549. }
  1550. }
  1551. }
  1552. success:
  1553. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestEnumMapPlusExtra)
  1554. return true;
  1555. failure:
  1556. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestEnumMapPlusExtra)
  1557. return false;
  1558. #undef DO_
  1559. }
  1560. void TestEnumMapPlusExtra::SerializeWithCachedSizes(
  1561. ::google::protobuf::io::CodedOutputStream* output) const {
  1562. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestEnumMapPlusExtra)
  1563. ::google::protobuf::uint32 cached_has_bits = 0;
  1564. (void) cached_has_bits;
  1565. // map<int32, .protobuf_unittest.Proto2MapEnumPlusExtra> known_map_field = 101;
  1566. if (!this->known_map_field().empty()) {
  1567. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::const_pointer
  1568. ConstPtr;
  1569. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  1570. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  1571. if (output->IsSerializationDeterministic() &&
  1572. this->known_map_field().size() > 1) {
  1573. ::std::unique_ptr<SortItem[]> items(
  1574. new SortItem[this->known_map_field().size()]);
  1575. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::size_type size_type;
  1576. size_type n = 0;
  1577. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::const_iterator
  1578. it = this->known_map_field().begin();
  1579. it != this->known_map_field().end(); ++it, ++n) {
  1580. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  1581. }
  1582. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  1583. ::std::unique_ptr<TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse> entry;
  1584. for (size_type i = 0; i < n; i++) {
  1585. entry.reset(known_map_field_.NewEnumEntryWrapper(
  1586. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  1587. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1588. 101, *entry, output);
  1589. if (entry->GetArena() != NULL) {
  1590. entry.release();
  1591. }
  1592. }
  1593. } else {
  1594. ::std::unique_ptr<TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse> entry;
  1595. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::const_iterator
  1596. it = this->known_map_field().begin();
  1597. it != this->known_map_field().end(); ++it) {
  1598. entry.reset(known_map_field_.NewEnumEntryWrapper(
  1599. it->first, it->second));
  1600. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1601. 101, *entry, output);
  1602. if (entry->GetArena() != NULL) {
  1603. entry.release();
  1604. }
  1605. }
  1606. }
  1607. }
  1608. // map<int32, .protobuf_unittest.Proto2MapEnumPlusExtra> unknown_map_field = 102;
  1609. if (!this->unknown_map_field().empty()) {
  1610. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::const_pointer
  1611. ConstPtr;
  1612. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  1613. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  1614. if (output->IsSerializationDeterministic() &&
  1615. this->unknown_map_field().size() > 1) {
  1616. ::std::unique_ptr<SortItem[]> items(
  1617. new SortItem[this->unknown_map_field().size()]);
  1618. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::size_type size_type;
  1619. size_type n = 0;
  1620. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::const_iterator
  1621. it = this->unknown_map_field().begin();
  1622. it != this->unknown_map_field().end(); ++it, ++n) {
  1623. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  1624. }
  1625. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  1626. ::std::unique_ptr<TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse> entry;
  1627. for (size_type i = 0; i < n; i++) {
  1628. entry.reset(unknown_map_field_.NewEnumEntryWrapper(
  1629. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  1630. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1631. 102, *entry, output);
  1632. if (entry->GetArena() != NULL) {
  1633. entry.release();
  1634. }
  1635. }
  1636. } else {
  1637. ::std::unique_ptr<TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse> entry;
  1638. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::const_iterator
  1639. it = this->unknown_map_field().begin();
  1640. it != this->unknown_map_field().end(); ++it) {
  1641. entry.reset(unknown_map_field_.NewEnumEntryWrapper(
  1642. it->first, it->second));
  1643. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1644. 102, *entry, output);
  1645. if (entry->GetArena() != NULL) {
  1646. entry.release();
  1647. }
  1648. }
  1649. }
  1650. }
  1651. if (_internal_metadata_.have_unknown_fields()) {
  1652. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1653. _internal_metadata_.unknown_fields(), output);
  1654. }
  1655. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestEnumMapPlusExtra)
  1656. }
  1657. ::google::protobuf::uint8* TestEnumMapPlusExtra::InternalSerializeWithCachedSizesToArray(
  1658. bool deterministic, ::google::protobuf::uint8* target) const {
  1659. (void)deterministic; // Unused
  1660. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestEnumMapPlusExtra)
  1661. ::google::protobuf::uint32 cached_has_bits = 0;
  1662. (void) cached_has_bits;
  1663. // map<int32, .protobuf_unittest.Proto2MapEnumPlusExtra> known_map_field = 101;
  1664. if (!this->known_map_field().empty()) {
  1665. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::const_pointer
  1666. ConstPtr;
  1667. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  1668. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  1669. if (deterministic &&
  1670. this->known_map_field().size() > 1) {
  1671. ::std::unique_ptr<SortItem[]> items(
  1672. new SortItem[this->known_map_field().size()]);
  1673. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::size_type size_type;
  1674. size_type n = 0;
  1675. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::const_iterator
  1676. it = this->known_map_field().begin();
  1677. it != this->known_map_field().end(); ++it, ++n) {
  1678. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  1679. }
  1680. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  1681. ::std::unique_ptr<TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse> entry;
  1682. for (size_type i = 0; i < n; i++) {
  1683. entry.reset(known_map_field_.NewEnumEntryWrapper(
  1684. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  1685. target = ::google::protobuf::internal::WireFormatLite::
  1686. InternalWriteMessageNoVirtualToArray(
  1687. 101, *entry, deterministic, target);
  1688. ;
  1689. if (entry->GetArena() != NULL) {
  1690. entry.release();
  1691. }
  1692. }
  1693. } else {
  1694. ::std::unique_ptr<TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse> entry;
  1695. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::const_iterator
  1696. it = this->known_map_field().begin();
  1697. it != this->known_map_field().end(); ++it) {
  1698. entry.reset(known_map_field_.NewEnumEntryWrapper(
  1699. it->first, it->second));
  1700. target = ::google::protobuf::internal::WireFormatLite::
  1701. InternalWriteMessageNoVirtualToArray(
  1702. 101, *entry, deterministic, target);
  1703. ;
  1704. if (entry->GetArena() != NULL) {
  1705. entry.release();
  1706. }
  1707. }
  1708. }
  1709. }
  1710. // map<int32, .protobuf_unittest.Proto2MapEnumPlusExtra> unknown_map_field = 102;
  1711. if (!this->unknown_map_field().empty()) {
  1712. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::const_pointer
  1713. ConstPtr;
  1714. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  1715. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  1716. if (deterministic &&
  1717. this->unknown_map_field().size() > 1) {
  1718. ::std::unique_ptr<SortItem[]> items(
  1719. new SortItem[this->unknown_map_field().size()]);
  1720. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::size_type size_type;
  1721. size_type n = 0;
  1722. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::const_iterator
  1723. it = this->unknown_map_field().begin();
  1724. it != this->unknown_map_field().end(); ++it, ++n) {
  1725. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  1726. }
  1727. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  1728. ::std::unique_ptr<TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse> entry;
  1729. for (size_type i = 0; i < n; i++) {
  1730. entry.reset(unknown_map_field_.NewEnumEntryWrapper(
  1731. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  1732. target = ::google::protobuf::internal::WireFormatLite::
  1733. InternalWriteMessageNoVirtualToArray(
  1734. 102, *entry, deterministic, target);
  1735. ;
  1736. if (entry->GetArena() != NULL) {
  1737. entry.release();
  1738. }
  1739. }
  1740. } else {
  1741. ::std::unique_ptr<TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse> entry;
  1742. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::const_iterator
  1743. it = this->unknown_map_field().begin();
  1744. it != this->unknown_map_field().end(); ++it) {
  1745. entry.reset(unknown_map_field_.NewEnumEntryWrapper(
  1746. it->first, it->second));
  1747. target = ::google::protobuf::internal::WireFormatLite::
  1748. InternalWriteMessageNoVirtualToArray(
  1749. 102, *entry, deterministic, target);
  1750. ;
  1751. if (entry->GetArena() != NULL) {
  1752. entry.release();
  1753. }
  1754. }
  1755. }
  1756. }
  1757. if (_internal_metadata_.have_unknown_fields()) {
  1758. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1759. _internal_metadata_.unknown_fields(), target);
  1760. }
  1761. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestEnumMapPlusExtra)
  1762. return target;
  1763. }
  1764. size_t TestEnumMapPlusExtra::ByteSizeLong() const {
  1765. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestEnumMapPlusExtra)
  1766. size_t total_size = 0;
  1767. if (_internal_metadata_.have_unknown_fields()) {
  1768. total_size +=
  1769. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1770. _internal_metadata_.unknown_fields());
  1771. }
  1772. // map<int32, .protobuf_unittest.Proto2MapEnumPlusExtra> known_map_field = 101;
  1773. total_size += 2 *
  1774. ::google::protobuf::internal::FromIntSize(this->known_map_field_size());
  1775. {
  1776. ::std::unique_ptr<TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse> entry;
  1777. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::const_iterator
  1778. it = this->known_map_field().begin();
  1779. it != this->known_map_field().end(); ++it) {
  1780. if (entry.get() != NULL && entry->GetArena() != NULL) {
  1781. entry.release();
  1782. }
  1783. entry.reset(known_map_field_.NewEnumEntryWrapper(it->first, it->second));
  1784. total_size += ::google::protobuf::internal::WireFormatLite::
  1785. MessageSizeNoVirtual(*entry);
  1786. }
  1787. if (entry.get() != NULL && entry->GetArena() != NULL) {
  1788. entry.release();
  1789. }
  1790. }
  1791. // map<int32, .protobuf_unittest.Proto2MapEnumPlusExtra> unknown_map_field = 102;
  1792. total_size += 2 *
  1793. ::google::protobuf::internal::FromIntSize(this->unknown_map_field_size());
  1794. {
  1795. ::std::unique_ptr<TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse> entry;
  1796. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::Proto2MapEnumPlusExtra >::const_iterator
  1797. it = this->unknown_map_field().begin();
  1798. it != this->unknown_map_field().end(); ++it) {
  1799. if (entry.get() != NULL && entry->GetArena() != NULL) {
  1800. entry.release();
  1801. }
  1802. entry.reset(unknown_map_field_.NewEnumEntryWrapper(it->first, it->second));
  1803. total_size += ::google::protobuf::internal::WireFormatLite::
  1804. MessageSizeNoVirtual(*entry);
  1805. }
  1806. if (entry.get() != NULL && entry->GetArena() != NULL) {
  1807. entry.release();
  1808. }
  1809. }
  1810. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1811. SetCachedSize(cached_size);
  1812. return total_size;
  1813. }
  1814. void TestEnumMapPlusExtra::MergeFrom(const ::google::protobuf::Message& from) {
  1815. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestEnumMapPlusExtra)
  1816. GOOGLE_DCHECK_NE(&from, this);
  1817. const TestEnumMapPlusExtra* source =
  1818. ::google::protobuf::internal::DynamicCastToGenerated<const TestEnumMapPlusExtra>(
  1819. &from);
  1820. if (source == NULL) {
  1821. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestEnumMapPlusExtra)
  1822. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1823. } else {
  1824. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestEnumMapPlusExtra)
  1825. MergeFrom(*source);
  1826. }
  1827. }
  1828. void TestEnumMapPlusExtra::MergeFrom(const TestEnumMapPlusExtra& from) {
  1829. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestEnumMapPlusExtra)
  1830. GOOGLE_DCHECK_NE(&from, this);
  1831. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1832. ::google::protobuf::uint32 cached_has_bits = 0;
  1833. (void) cached_has_bits;
  1834. known_map_field_.MergeFrom(from.known_map_field_);
  1835. unknown_map_field_.MergeFrom(from.unknown_map_field_);
  1836. }
  1837. void TestEnumMapPlusExtra::CopyFrom(const ::google::protobuf::Message& from) {
  1838. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestEnumMapPlusExtra)
  1839. if (&from == this) return;
  1840. Clear();
  1841. MergeFrom(from);
  1842. }
  1843. void TestEnumMapPlusExtra::CopyFrom(const TestEnumMapPlusExtra& from) {
  1844. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestEnumMapPlusExtra)
  1845. if (&from == this) return;
  1846. Clear();
  1847. MergeFrom(from);
  1848. }
  1849. bool TestEnumMapPlusExtra::IsInitialized() const {
  1850. return true;
  1851. }
  1852. void TestEnumMapPlusExtra::Swap(TestEnumMapPlusExtra* other) {
  1853. if (other == this) return;
  1854. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  1855. InternalSwap(other);
  1856. } else {
  1857. TestEnumMapPlusExtra* temp = New(GetArenaNoVirtual());
  1858. temp->MergeFrom(*other);
  1859. other->CopyFrom(*this);
  1860. InternalSwap(temp);
  1861. if (GetArenaNoVirtual() == NULL) {
  1862. delete temp;
  1863. }
  1864. }
  1865. }
  1866. void TestEnumMapPlusExtra::UnsafeArenaSwap(TestEnumMapPlusExtra* other) {
  1867. if (other == this) return;
  1868. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  1869. InternalSwap(other);
  1870. }
  1871. void TestEnumMapPlusExtra::InternalSwap(TestEnumMapPlusExtra* other) {
  1872. using std::swap;
  1873. known_map_field_.Swap(&other->known_map_field_);
  1874. unknown_map_field_.Swap(&other->unknown_map_field_);
  1875. swap(_has_bits_[0], other->_has_bits_[0]);
  1876. _internal_metadata_.Swap(&other->_internal_metadata_);
  1877. }
  1878. ::google::protobuf::Metadata TestEnumMapPlusExtra::GetMetadata() const {
  1879. protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  1880. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  1881. }
  1882. // ===================================================================
  1883. TestImportEnumMap_ImportEnumAmpEntry_DoNotUse::TestImportEnumMap_ImportEnumAmpEntry_DoNotUse() {}
  1884. TestImportEnumMap_ImportEnumAmpEntry_DoNotUse::TestImportEnumMap_ImportEnumAmpEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  1885. void TestImportEnumMap_ImportEnumAmpEntry_DoNotUse::MergeFrom(const TestImportEnumMap_ImportEnumAmpEntry_DoNotUse& other) {
  1886. MergeFromInternal(other);
  1887. }
  1888. ::google::protobuf::Metadata TestImportEnumMap_ImportEnumAmpEntry_DoNotUse::GetMetadata() const {
  1889. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  1890. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[6];
  1891. }
  1892. void TestImportEnumMap_ImportEnumAmpEntry_DoNotUse::MergeFrom(
  1893. const ::google::protobuf::Message& other) {
  1894. ::google::protobuf::Message::MergeFrom(other);
  1895. }
  1896. // ===================================================================
  1897. void TestImportEnumMap::InitAsDefaultInstance() {
  1898. }
  1899. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1900. const int TestImportEnumMap::kImportEnumAmpFieldNumber;
  1901. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1902. TestImportEnumMap::TestImportEnumMap()
  1903. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1904. ::google::protobuf::internal::InitSCC(
  1905. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestImportEnumMap.base);
  1906. SharedCtor();
  1907. // @@protoc_insertion_point(constructor:protobuf_unittest.TestImportEnumMap)
  1908. }
  1909. TestImportEnumMap::TestImportEnumMap(::google::protobuf::Arena* arena)
  1910. : ::google::protobuf::Message(),
  1911. _internal_metadata_(arena),
  1912. import_enum_amp_(arena) {
  1913. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestImportEnumMap.base);
  1914. SharedCtor();
  1915. RegisterArenaDtor(arena);
  1916. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestImportEnumMap)
  1917. }
  1918. TestImportEnumMap::TestImportEnumMap(const TestImportEnumMap& from)
  1919. : ::google::protobuf::Message(),
  1920. _internal_metadata_(NULL),
  1921. _has_bits_(from._has_bits_) {
  1922. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1923. import_enum_amp_.MergeFrom(from.import_enum_amp_);
  1924. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestImportEnumMap)
  1925. }
  1926. void TestImportEnumMap::SharedCtor() {
  1927. }
  1928. TestImportEnumMap::~TestImportEnumMap() {
  1929. // @@protoc_insertion_point(destructor:protobuf_unittest.TestImportEnumMap)
  1930. SharedDtor();
  1931. }
  1932. void TestImportEnumMap::SharedDtor() {
  1933. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  1934. }
  1935. void TestImportEnumMap::ArenaDtor(void* object) {
  1936. TestImportEnumMap* _this = reinterpret_cast< TestImportEnumMap* >(object);
  1937. (void)_this;
  1938. }
  1939. void TestImportEnumMap::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  1940. }
  1941. void TestImportEnumMap::SetCachedSize(int size) const {
  1942. _cached_size_.Set(size);
  1943. }
  1944. const ::google::protobuf::Descriptor* TestImportEnumMap::descriptor() {
  1945. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  1946. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1947. }
  1948. const TestImportEnumMap& TestImportEnumMap::default_instance() {
  1949. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestImportEnumMap.base);
  1950. return *internal_default_instance();
  1951. }
  1952. void TestImportEnumMap::Clear() {
  1953. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestImportEnumMap)
  1954. ::google::protobuf::uint32 cached_has_bits = 0;
  1955. // Prevent compiler warnings about cached_has_bits being unused
  1956. (void) cached_has_bits;
  1957. import_enum_amp_.Clear();
  1958. _has_bits_.Clear();
  1959. _internal_metadata_.Clear();
  1960. }
  1961. bool TestImportEnumMap::MergePartialFromCodedStream(
  1962. ::google::protobuf::io::CodedInputStream* input) {
  1963. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1964. ::google::protobuf::uint32 tag;
  1965. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestImportEnumMap)
  1966. for (;;) {
  1967. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1968. tag = p.first;
  1969. if (!p.second) goto handle_unusual;
  1970. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1971. // map<int32, .protobuf_unittest_import.ImportEnumForMap> import_enum_amp = 1;
  1972. case 1: {
  1973. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1974. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1975. ::std::unique_ptr<TestImportEnumMap_ImportEnumAmpEntry_DoNotUse> entry(import_enum_amp_.NewEntry());
  1976. {
  1977. ::std::string data;
  1978. DO_(::google::protobuf::internal::WireFormatLite::ReadString(input, &data));
  1979. DO_(entry->ParseFromString(data));
  1980. if (::protobuf_unittest_import::ImportEnumForMap_IsValid(*entry->mutable_value())) {
  1981. (*mutable_import_enum_amp())[entry->key()] =
  1982. static_cast< ::protobuf_unittest_import::ImportEnumForMap >(*entry->mutable_value());
  1983. } else {
  1984. mutable_unknown_fields()->AddLengthDelimited(1, data);
  1985. }
  1986. }
  1987. if (entry->GetArena() != NULL) entry.release();
  1988. } else {
  1989. goto handle_unusual;
  1990. }
  1991. break;
  1992. }
  1993. default: {
  1994. handle_unusual:
  1995. if (tag == 0) {
  1996. goto success;
  1997. }
  1998. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1999. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2000. break;
  2001. }
  2002. }
  2003. }
  2004. success:
  2005. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestImportEnumMap)
  2006. return true;
  2007. failure:
  2008. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestImportEnumMap)
  2009. return false;
  2010. #undef DO_
  2011. }
  2012. void TestImportEnumMap::SerializeWithCachedSizes(
  2013. ::google::protobuf::io::CodedOutputStream* output) const {
  2014. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestImportEnumMap)
  2015. ::google::protobuf::uint32 cached_has_bits = 0;
  2016. (void) cached_has_bits;
  2017. // map<int32, .protobuf_unittest_import.ImportEnumForMap> import_enum_amp = 1;
  2018. if (!this->import_enum_amp().empty()) {
  2019. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest_import::ImportEnumForMap >::const_pointer
  2020. ConstPtr;
  2021. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  2022. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  2023. if (output->IsSerializationDeterministic() &&
  2024. this->import_enum_amp().size() > 1) {
  2025. ::std::unique_ptr<SortItem[]> items(
  2026. new SortItem[this->import_enum_amp().size()]);
  2027. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest_import::ImportEnumForMap >::size_type size_type;
  2028. size_type n = 0;
  2029. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest_import::ImportEnumForMap >::const_iterator
  2030. it = this->import_enum_amp().begin();
  2031. it != this->import_enum_amp().end(); ++it, ++n) {
  2032. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  2033. }
  2034. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  2035. ::std::unique_ptr<TestImportEnumMap_ImportEnumAmpEntry_DoNotUse> entry;
  2036. for (size_type i = 0; i < n; i++) {
  2037. entry.reset(import_enum_amp_.NewEnumEntryWrapper(
  2038. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  2039. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2040. 1, *entry, output);
  2041. if (entry->GetArena() != NULL) {
  2042. entry.release();
  2043. }
  2044. }
  2045. } else {
  2046. ::std::unique_ptr<TestImportEnumMap_ImportEnumAmpEntry_DoNotUse> entry;
  2047. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest_import::ImportEnumForMap >::const_iterator
  2048. it = this->import_enum_amp().begin();
  2049. it != this->import_enum_amp().end(); ++it) {
  2050. entry.reset(import_enum_amp_.NewEnumEntryWrapper(
  2051. it->first, it->second));
  2052. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2053. 1, *entry, output);
  2054. if (entry->GetArena() != NULL) {
  2055. entry.release();
  2056. }
  2057. }
  2058. }
  2059. }
  2060. if (_internal_metadata_.have_unknown_fields()) {
  2061. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2062. _internal_metadata_.unknown_fields(), output);
  2063. }
  2064. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestImportEnumMap)
  2065. }
  2066. ::google::protobuf::uint8* TestImportEnumMap::InternalSerializeWithCachedSizesToArray(
  2067. bool deterministic, ::google::protobuf::uint8* target) const {
  2068. (void)deterministic; // Unused
  2069. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestImportEnumMap)
  2070. ::google::protobuf::uint32 cached_has_bits = 0;
  2071. (void) cached_has_bits;
  2072. // map<int32, .protobuf_unittest_import.ImportEnumForMap> import_enum_amp = 1;
  2073. if (!this->import_enum_amp().empty()) {
  2074. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest_import::ImportEnumForMap >::const_pointer
  2075. ConstPtr;
  2076. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  2077. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  2078. if (deterministic &&
  2079. this->import_enum_amp().size() > 1) {
  2080. ::std::unique_ptr<SortItem[]> items(
  2081. new SortItem[this->import_enum_amp().size()]);
  2082. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest_import::ImportEnumForMap >::size_type size_type;
  2083. size_type n = 0;
  2084. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest_import::ImportEnumForMap >::const_iterator
  2085. it = this->import_enum_amp().begin();
  2086. it != this->import_enum_amp().end(); ++it, ++n) {
  2087. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  2088. }
  2089. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  2090. ::std::unique_ptr<TestImportEnumMap_ImportEnumAmpEntry_DoNotUse> entry;
  2091. for (size_type i = 0; i < n; i++) {
  2092. entry.reset(import_enum_amp_.NewEnumEntryWrapper(
  2093. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  2094. target = ::google::protobuf::internal::WireFormatLite::
  2095. InternalWriteMessageNoVirtualToArray(
  2096. 1, *entry, deterministic, target);
  2097. ;
  2098. if (entry->GetArena() != NULL) {
  2099. entry.release();
  2100. }
  2101. }
  2102. } else {
  2103. ::std::unique_ptr<TestImportEnumMap_ImportEnumAmpEntry_DoNotUse> entry;
  2104. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest_import::ImportEnumForMap >::const_iterator
  2105. it = this->import_enum_amp().begin();
  2106. it != this->import_enum_amp().end(); ++it) {
  2107. entry.reset(import_enum_amp_.NewEnumEntryWrapper(
  2108. it->first, it->second));
  2109. target = ::google::protobuf::internal::WireFormatLite::
  2110. InternalWriteMessageNoVirtualToArray(
  2111. 1, *entry, deterministic, target);
  2112. ;
  2113. if (entry->GetArena() != NULL) {
  2114. entry.release();
  2115. }
  2116. }
  2117. }
  2118. }
  2119. if (_internal_metadata_.have_unknown_fields()) {
  2120. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2121. _internal_metadata_.unknown_fields(), target);
  2122. }
  2123. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestImportEnumMap)
  2124. return target;
  2125. }
  2126. size_t TestImportEnumMap::ByteSizeLong() const {
  2127. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestImportEnumMap)
  2128. size_t total_size = 0;
  2129. if (_internal_metadata_.have_unknown_fields()) {
  2130. total_size +=
  2131. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2132. _internal_metadata_.unknown_fields());
  2133. }
  2134. // map<int32, .protobuf_unittest_import.ImportEnumForMap> import_enum_amp = 1;
  2135. total_size += 1 *
  2136. ::google::protobuf::internal::FromIntSize(this->import_enum_amp_size());
  2137. {
  2138. ::std::unique_ptr<TestImportEnumMap_ImportEnumAmpEntry_DoNotUse> entry;
  2139. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest_import::ImportEnumForMap >::const_iterator
  2140. it = this->import_enum_amp().begin();
  2141. it != this->import_enum_amp().end(); ++it) {
  2142. if (entry.get() != NULL && entry->GetArena() != NULL) {
  2143. entry.release();
  2144. }
  2145. entry.reset(import_enum_amp_.NewEnumEntryWrapper(it->first, it->second));
  2146. total_size += ::google::protobuf::internal::WireFormatLite::
  2147. MessageSizeNoVirtual(*entry);
  2148. }
  2149. if (entry.get() != NULL && entry->GetArena() != NULL) {
  2150. entry.release();
  2151. }
  2152. }
  2153. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2154. SetCachedSize(cached_size);
  2155. return total_size;
  2156. }
  2157. void TestImportEnumMap::MergeFrom(const ::google::protobuf::Message& from) {
  2158. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestImportEnumMap)
  2159. GOOGLE_DCHECK_NE(&from, this);
  2160. const TestImportEnumMap* source =
  2161. ::google::protobuf::internal::DynamicCastToGenerated<const TestImportEnumMap>(
  2162. &from);
  2163. if (source == NULL) {
  2164. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestImportEnumMap)
  2165. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2166. } else {
  2167. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestImportEnumMap)
  2168. MergeFrom(*source);
  2169. }
  2170. }
  2171. void TestImportEnumMap::MergeFrom(const TestImportEnumMap& from) {
  2172. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestImportEnumMap)
  2173. GOOGLE_DCHECK_NE(&from, this);
  2174. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2175. ::google::protobuf::uint32 cached_has_bits = 0;
  2176. (void) cached_has_bits;
  2177. import_enum_amp_.MergeFrom(from.import_enum_amp_);
  2178. }
  2179. void TestImportEnumMap::CopyFrom(const ::google::protobuf::Message& from) {
  2180. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestImportEnumMap)
  2181. if (&from == this) return;
  2182. Clear();
  2183. MergeFrom(from);
  2184. }
  2185. void TestImportEnumMap::CopyFrom(const TestImportEnumMap& from) {
  2186. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestImportEnumMap)
  2187. if (&from == this) return;
  2188. Clear();
  2189. MergeFrom(from);
  2190. }
  2191. bool TestImportEnumMap::IsInitialized() const {
  2192. return true;
  2193. }
  2194. void TestImportEnumMap::Swap(TestImportEnumMap* other) {
  2195. if (other == this) return;
  2196. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  2197. InternalSwap(other);
  2198. } else {
  2199. TestImportEnumMap* temp = New(GetArenaNoVirtual());
  2200. temp->MergeFrom(*other);
  2201. other->CopyFrom(*this);
  2202. InternalSwap(temp);
  2203. if (GetArenaNoVirtual() == NULL) {
  2204. delete temp;
  2205. }
  2206. }
  2207. }
  2208. void TestImportEnumMap::UnsafeArenaSwap(TestImportEnumMap* other) {
  2209. if (other == this) return;
  2210. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  2211. InternalSwap(other);
  2212. }
  2213. void TestImportEnumMap::InternalSwap(TestImportEnumMap* other) {
  2214. using std::swap;
  2215. import_enum_amp_.Swap(&other->import_enum_amp_);
  2216. swap(_has_bits_[0], other->_has_bits_[0]);
  2217. _internal_metadata_.Swap(&other->_internal_metadata_);
  2218. }
  2219. ::google::protobuf::Metadata TestImportEnumMap::GetMetadata() const {
  2220. protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2221. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  2222. }
  2223. // ===================================================================
  2224. TestIntIntMap_MEntry_DoNotUse::TestIntIntMap_MEntry_DoNotUse() {}
  2225. TestIntIntMap_MEntry_DoNotUse::TestIntIntMap_MEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2226. void TestIntIntMap_MEntry_DoNotUse::MergeFrom(const TestIntIntMap_MEntry_DoNotUse& other) {
  2227. MergeFromInternal(other);
  2228. }
  2229. ::google::protobuf::Metadata TestIntIntMap_MEntry_DoNotUse::GetMetadata() const {
  2230. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2231. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[8];
  2232. }
  2233. void TestIntIntMap_MEntry_DoNotUse::MergeFrom(
  2234. const ::google::protobuf::Message& other) {
  2235. ::google::protobuf::Message::MergeFrom(other);
  2236. }
  2237. // ===================================================================
  2238. void TestIntIntMap::InitAsDefaultInstance() {
  2239. }
  2240. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2241. const int TestIntIntMap::kMFieldNumber;
  2242. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2243. TestIntIntMap::TestIntIntMap()
  2244. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2245. ::google::protobuf::internal::InitSCC(
  2246. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base);
  2247. SharedCtor();
  2248. // @@protoc_insertion_point(constructor:protobuf_unittest.TestIntIntMap)
  2249. }
  2250. TestIntIntMap::TestIntIntMap(::google::protobuf::Arena* arena)
  2251. : ::google::protobuf::Message(),
  2252. _internal_metadata_(arena),
  2253. m_(arena) {
  2254. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base);
  2255. SharedCtor();
  2256. RegisterArenaDtor(arena);
  2257. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestIntIntMap)
  2258. }
  2259. TestIntIntMap::TestIntIntMap(const TestIntIntMap& from)
  2260. : ::google::protobuf::Message(),
  2261. _internal_metadata_(NULL),
  2262. _has_bits_(from._has_bits_) {
  2263. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2264. m_.MergeFrom(from.m_);
  2265. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestIntIntMap)
  2266. }
  2267. void TestIntIntMap::SharedCtor() {
  2268. }
  2269. TestIntIntMap::~TestIntIntMap() {
  2270. // @@protoc_insertion_point(destructor:protobuf_unittest.TestIntIntMap)
  2271. SharedDtor();
  2272. }
  2273. void TestIntIntMap::SharedDtor() {
  2274. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  2275. }
  2276. void TestIntIntMap::ArenaDtor(void* object) {
  2277. TestIntIntMap* _this = reinterpret_cast< TestIntIntMap* >(object);
  2278. (void)_this;
  2279. }
  2280. void TestIntIntMap::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  2281. }
  2282. void TestIntIntMap::SetCachedSize(int size) const {
  2283. _cached_size_.Set(size);
  2284. }
  2285. const ::google::protobuf::Descriptor* TestIntIntMap::descriptor() {
  2286. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2287. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2288. }
  2289. const TestIntIntMap& TestIntIntMap::default_instance() {
  2290. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestIntIntMap.base);
  2291. return *internal_default_instance();
  2292. }
  2293. void TestIntIntMap::Clear() {
  2294. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestIntIntMap)
  2295. ::google::protobuf::uint32 cached_has_bits = 0;
  2296. // Prevent compiler warnings about cached_has_bits being unused
  2297. (void) cached_has_bits;
  2298. m_.Clear();
  2299. _has_bits_.Clear();
  2300. _internal_metadata_.Clear();
  2301. }
  2302. bool TestIntIntMap::MergePartialFromCodedStream(
  2303. ::google::protobuf::io::CodedInputStream* input) {
  2304. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2305. ::google::protobuf::uint32 tag;
  2306. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestIntIntMap)
  2307. for (;;) {
  2308. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2309. tag = p.first;
  2310. if (!p.second) goto handle_unusual;
  2311. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2312. // map<int32, int32> m = 1;
  2313. case 1: {
  2314. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2315. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2316. TestIntIntMap_MEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  2317. TestIntIntMap_MEntry_DoNotUse,
  2318. ::google::protobuf::int32, ::google::protobuf::int32,
  2319. ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
  2320. ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
  2321. 0 >,
  2322. ::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 > > parser(&m_);
  2323. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  2324. input, &parser));
  2325. } else {
  2326. goto handle_unusual;
  2327. }
  2328. break;
  2329. }
  2330. default: {
  2331. handle_unusual:
  2332. if (tag == 0) {
  2333. goto success;
  2334. }
  2335. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2336. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2337. break;
  2338. }
  2339. }
  2340. }
  2341. success:
  2342. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestIntIntMap)
  2343. return true;
  2344. failure:
  2345. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestIntIntMap)
  2346. return false;
  2347. #undef DO_
  2348. }
  2349. void TestIntIntMap::SerializeWithCachedSizes(
  2350. ::google::protobuf::io::CodedOutputStream* output) const {
  2351. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestIntIntMap)
  2352. ::google::protobuf::uint32 cached_has_bits = 0;
  2353. (void) cached_has_bits;
  2354. // map<int32, int32> m = 1;
  2355. if (!this->m().empty()) {
  2356. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::const_pointer
  2357. ConstPtr;
  2358. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  2359. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  2360. if (output->IsSerializationDeterministic() &&
  2361. this->m().size() > 1) {
  2362. ::std::unique_ptr<SortItem[]> items(
  2363. new SortItem[this->m().size()]);
  2364. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::size_type size_type;
  2365. size_type n = 0;
  2366. for (::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::const_iterator
  2367. it = this->m().begin();
  2368. it != this->m().end(); ++it, ++n) {
  2369. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  2370. }
  2371. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  2372. ::std::unique_ptr<TestIntIntMap_MEntry_DoNotUse> entry;
  2373. for (size_type i = 0; i < n; i++) {
  2374. entry.reset(m_.NewEntryWrapper(
  2375. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  2376. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2377. 1, *entry, output);
  2378. if (entry->GetArena() != NULL) {
  2379. entry.release();
  2380. }
  2381. }
  2382. } else {
  2383. ::std::unique_ptr<TestIntIntMap_MEntry_DoNotUse> entry;
  2384. for (::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::const_iterator
  2385. it = this->m().begin();
  2386. it != this->m().end(); ++it) {
  2387. entry.reset(m_.NewEntryWrapper(
  2388. it->first, it->second));
  2389. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2390. 1, *entry, output);
  2391. if (entry->GetArena() != NULL) {
  2392. entry.release();
  2393. }
  2394. }
  2395. }
  2396. }
  2397. if (_internal_metadata_.have_unknown_fields()) {
  2398. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2399. _internal_metadata_.unknown_fields(), output);
  2400. }
  2401. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestIntIntMap)
  2402. }
  2403. ::google::protobuf::uint8* TestIntIntMap::InternalSerializeWithCachedSizesToArray(
  2404. bool deterministic, ::google::protobuf::uint8* target) const {
  2405. (void)deterministic; // Unused
  2406. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestIntIntMap)
  2407. ::google::protobuf::uint32 cached_has_bits = 0;
  2408. (void) cached_has_bits;
  2409. // map<int32, int32> m = 1;
  2410. if (!this->m().empty()) {
  2411. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::const_pointer
  2412. ConstPtr;
  2413. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  2414. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  2415. if (deterministic &&
  2416. this->m().size() > 1) {
  2417. ::std::unique_ptr<SortItem[]> items(
  2418. new SortItem[this->m().size()]);
  2419. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::size_type size_type;
  2420. size_type n = 0;
  2421. for (::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::const_iterator
  2422. it = this->m().begin();
  2423. it != this->m().end(); ++it, ++n) {
  2424. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  2425. }
  2426. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  2427. ::std::unique_ptr<TestIntIntMap_MEntry_DoNotUse> entry;
  2428. for (size_type i = 0; i < n; i++) {
  2429. entry.reset(m_.NewEntryWrapper(
  2430. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  2431. target = ::google::protobuf::internal::WireFormatLite::
  2432. InternalWriteMessageNoVirtualToArray(
  2433. 1, *entry, deterministic, target);
  2434. ;
  2435. if (entry->GetArena() != NULL) {
  2436. entry.release();
  2437. }
  2438. }
  2439. } else {
  2440. ::std::unique_ptr<TestIntIntMap_MEntry_DoNotUse> entry;
  2441. for (::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::const_iterator
  2442. it = this->m().begin();
  2443. it != this->m().end(); ++it) {
  2444. entry.reset(m_.NewEntryWrapper(
  2445. it->first, it->second));
  2446. target = ::google::protobuf::internal::WireFormatLite::
  2447. InternalWriteMessageNoVirtualToArray(
  2448. 1, *entry, deterministic, target);
  2449. ;
  2450. if (entry->GetArena() != NULL) {
  2451. entry.release();
  2452. }
  2453. }
  2454. }
  2455. }
  2456. if (_internal_metadata_.have_unknown_fields()) {
  2457. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2458. _internal_metadata_.unknown_fields(), target);
  2459. }
  2460. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestIntIntMap)
  2461. return target;
  2462. }
  2463. size_t TestIntIntMap::ByteSizeLong() const {
  2464. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestIntIntMap)
  2465. size_t total_size = 0;
  2466. if (_internal_metadata_.have_unknown_fields()) {
  2467. total_size +=
  2468. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2469. _internal_metadata_.unknown_fields());
  2470. }
  2471. // map<int32, int32> m = 1;
  2472. total_size += 1 *
  2473. ::google::protobuf::internal::FromIntSize(this->m_size());
  2474. {
  2475. ::std::unique_ptr<TestIntIntMap_MEntry_DoNotUse> entry;
  2476. for (::google::protobuf::Map< ::google::protobuf::int32, ::google::protobuf::int32 >::const_iterator
  2477. it = this->m().begin();
  2478. it != this->m().end(); ++it) {
  2479. if (entry.get() != NULL && entry->GetArena() != NULL) {
  2480. entry.release();
  2481. }
  2482. entry.reset(m_.NewEntryWrapper(it->first, it->second));
  2483. total_size += ::google::protobuf::internal::WireFormatLite::
  2484. MessageSizeNoVirtual(*entry);
  2485. }
  2486. if (entry.get() != NULL && entry->GetArena() != NULL) {
  2487. entry.release();
  2488. }
  2489. }
  2490. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2491. SetCachedSize(cached_size);
  2492. return total_size;
  2493. }
  2494. void TestIntIntMap::MergeFrom(const ::google::protobuf::Message& from) {
  2495. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestIntIntMap)
  2496. GOOGLE_DCHECK_NE(&from, this);
  2497. const TestIntIntMap* source =
  2498. ::google::protobuf::internal::DynamicCastToGenerated<const TestIntIntMap>(
  2499. &from);
  2500. if (source == NULL) {
  2501. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestIntIntMap)
  2502. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2503. } else {
  2504. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestIntIntMap)
  2505. MergeFrom(*source);
  2506. }
  2507. }
  2508. void TestIntIntMap::MergeFrom(const TestIntIntMap& from) {
  2509. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestIntIntMap)
  2510. GOOGLE_DCHECK_NE(&from, this);
  2511. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2512. ::google::protobuf::uint32 cached_has_bits = 0;
  2513. (void) cached_has_bits;
  2514. m_.MergeFrom(from.m_);
  2515. }
  2516. void TestIntIntMap::CopyFrom(const ::google::protobuf::Message& from) {
  2517. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestIntIntMap)
  2518. if (&from == this) return;
  2519. Clear();
  2520. MergeFrom(from);
  2521. }
  2522. void TestIntIntMap::CopyFrom(const TestIntIntMap& from) {
  2523. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestIntIntMap)
  2524. if (&from == this) return;
  2525. Clear();
  2526. MergeFrom(from);
  2527. }
  2528. bool TestIntIntMap::IsInitialized() const {
  2529. return true;
  2530. }
  2531. void TestIntIntMap::Swap(TestIntIntMap* other) {
  2532. if (other == this) return;
  2533. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  2534. InternalSwap(other);
  2535. } else {
  2536. TestIntIntMap* temp = New(GetArenaNoVirtual());
  2537. temp->MergeFrom(*other);
  2538. other->CopyFrom(*this);
  2539. InternalSwap(temp);
  2540. if (GetArenaNoVirtual() == NULL) {
  2541. delete temp;
  2542. }
  2543. }
  2544. }
  2545. void TestIntIntMap::UnsafeArenaSwap(TestIntIntMap* other) {
  2546. if (other == this) return;
  2547. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  2548. InternalSwap(other);
  2549. }
  2550. void TestIntIntMap::InternalSwap(TestIntIntMap* other) {
  2551. using std::swap;
  2552. m_.Swap(&other->m_);
  2553. swap(_has_bits_[0], other->_has_bits_[0]);
  2554. _internal_metadata_.Swap(&other->_internal_metadata_);
  2555. }
  2556. ::google::protobuf::Metadata TestIntIntMap::GetMetadata() const {
  2557. protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2558. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  2559. }
  2560. // ===================================================================
  2561. TestMaps_MInt32Entry_DoNotUse::TestMaps_MInt32Entry_DoNotUse() {}
  2562. TestMaps_MInt32Entry_DoNotUse::TestMaps_MInt32Entry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2563. void TestMaps_MInt32Entry_DoNotUse::MergeFrom(const TestMaps_MInt32Entry_DoNotUse& other) {
  2564. MergeFromInternal(other);
  2565. }
  2566. ::google::protobuf::Metadata TestMaps_MInt32Entry_DoNotUse::GetMetadata() const {
  2567. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2568. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[10];
  2569. }
  2570. void TestMaps_MInt32Entry_DoNotUse::MergeFrom(
  2571. const ::google::protobuf::Message& other) {
  2572. ::google::protobuf::Message::MergeFrom(other);
  2573. }
  2574. // ===================================================================
  2575. TestMaps_MInt64Entry_DoNotUse::TestMaps_MInt64Entry_DoNotUse() {}
  2576. TestMaps_MInt64Entry_DoNotUse::TestMaps_MInt64Entry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2577. void TestMaps_MInt64Entry_DoNotUse::MergeFrom(const TestMaps_MInt64Entry_DoNotUse& other) {
  2578. MergeFromInternal(other);
  2579. }
  2580. ::google::protobuf::Metadata TestMaps_MInt64Entry_DoNotUse::GetMetadata() const {
  2581. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2582. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[11];
  2583. }
  2584. void TestMaps_MInt64Entry_DoNotUse::MergeFrom(
  2585. const ::google::protobuf::Message& other) {
  2586. ::google::protobuf::Message::MergeFrom(other);
  2587. }
  2588. // ===================================================================
  2589. TestMaps_MUint32Entry_DoNotUse::TestMaps_MUint32Entry_DoNotUse() {}
  2590. TestMaps_MUint32Entry_DoNotUse::TestMaps_MUint32Entry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2591. void TestMaps_MUint32Entry_DoNotUse::MergeFrom(const TestMaps_MUint32Entry_DoNotUse& other) {
  2592. MergeFromInternal(other);
  2593. }
  2594. ::google::protobuf::Metadata TestMaps_MUint32Entry_DoNotUse::GetMetadata() const {
  2595. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2596. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[12];
  2597. }
  2598. void TestMaps_MUint32Entry_DoNotUse::MergeFrom(
  2599. const ::google::protobuf::Message& other) {
  2600. ::google::protobuf::Message::MergeFrom(other);
  2601. }
  2602. // ===================================================================
  2603. TestMaps_MUint64Entry_DoNotUse::TestMaps_MUint64Entry_DoNotUse() {}
  2604. TestMaps_MUint64Entry_DoNotUse::TestMaps_MUint64Entry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2605. void TestMaps_MUint64Entry_DoNotUse::MergeFrom(const TestMaps_MUint64Entry_DoNotUse& other) {
  2606. MergeFromInternal(other);
  2607. }
  2608. ::google::protobuf::Metadata TestMaps_MUint64Entry_DoNotUse::GetMetadata() const {
  2609. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2610. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[13];
  2611. }
  2612. void TestMaps_MUint64Entry_DoNotUse::MergeFrom(
  2613. const ::google::protobuf::Message& other) {
  2614. ::google::protobuf::Message::MergeFrom(other);
  2615. }
  2616. // ===================================================================
  2617. TestMaps_MSint32Entry_DoNotUse::TestMaps_MSint32Entry_DoNotUse() {}
  2618. TestMaps_MSint32Entry_DoNotUse::TestMaps_MSint32Entry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2619. void TestMaps_MSint32Entry_DoNotUse::MergeFrom(const TestMaps_MSint32Entry_DoNotUse& other) {
  2620. MergeFromInternal(other);
  2621. }
  2622. ::google::protobuf::Metadata TestMaps_MSint32Entry_DoNotUse::GetMetadata() const {
  2623. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2624. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[14];
  2625. }
  2626. void TestMaps_MSint32Entry_DoNotUse::MergeFrom(
  2627. const ::google::protobuf::Message& other) {
  2628. ::google::protobuf::Message::MergeFrom(other);
  2629. }
  2630. // ===================================================================
  2631. TestMaps_MSint64Entry_DoNotUse::TestMaps_MSint64Entry_DoNotUse() {}
  2632. TestMaps_MSint64Entry_DoNotUse::TestMaps_MSint64Entry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2633. void TestMaps_MSint64Entry_DoNotUse::MergeFrom(const TestMaps_MSint64Entry_DoNotUse& other) {
  2634. MergeFromInternal(other);
  2635. }
  2636. ::google::protobuf::Metadata TestMaps_MSint64Entry_DoNotUse::GetMetadata() const {
  2637. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2638. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[15];
  2639. }
  2640. void TestMaps_MSint64Entry_DoNotUse::MergeFrom(
  2641. const ::google::protobuf::Message& other) {
  2642. ::google::protobuf::Message::MergeFrom(other);
  2643. }
  2644. // ===================================================================
  2645. TestMaps_MFixed32Entry_DoNotUse::TestMaps_MFixed32Entry_DoNotUse() {}
  2646. TestMaps_MFixed32Entry_DoNotUse::TestMaps_MFixed32Entry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2647. void TestMaps_MFixed32Entry_DoNotUse::MergeFrom(const TestMaps_MFixed32Entry_DoNotUse& other) {
  2648. MergeFromInternal(other);
  2649. }
  2650. ::google::protobuf::Metadata TestMaps_MFixed32Entry_DoNotUse::GetMetadata() const {
  2651. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2652. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[16];
  2653. }
  2654. void TestMaps_MFixed32Entry_DoNotUse::MergeFrom(
  2655. const ::google::protobuf::Message& other) {
  2656. ::google::protobuf::Message::MergeFrom(other);
  2657. }
  2658. // ===================================================================
  2659. TestMaps_MFixed64Entry_DoNotUse::TestMaps_MFixed64Entry_DoNotUse() {}
  2660. TestMaps_MFixed64Entry_DoNotUse::TestMaps_MFixed64Entry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2661. void TestMaps_MFixed64Entry_DoNotUse::MergeFrom(const TestMaps_MFixed64Entry_DoNotUse& other) {
  2662. MergeFromInternal(other);
  2663. }
  2664. ::google::protobuf::Metadata TestMaps_MFixed64Entry_DoNotUse::GetMetadata() const {
  2665. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2666. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[17];
  2667. }
  2668. void TestMaps_MFixed64Entry_DoNotUse::MergeFrom(
  2669. const ::google::protobuf::Message& other) {
  2670. ::google::protobuf::Message::MergeFrom(other);
  2671. }
  2672. // ===================================================================
  2673. TestMaps_MSfixed32Entry_DoNotUse::TestMaps_MSfixed32Entry_DoNotUse() {}
  2674. TestMaps_MSfixed32Entry_DoNotUse::TestMaps_MSfixed32Entry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2675. void TestMaps_MSfixed32Entry_DoNotUse::MergeFrom(const TestMaps_MSfixed32Entry_DoNotUse& other) {
  2676. MergeFromInternal(other);
  2677. }
  2678. ::google::protobuf::Metadata TestMaps_MSfixed32Entry_DoNotUse::GetMetadata() const {
  2679. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2680. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[18];
  2681. }
  2682. void TestMaps_MSfixed32Entry_DoNotUse::MergeFrom(
  2683. const ::google::protobuf::Message& other) {
  2684. ::google::protobuf::Message::MergeFrom(other);
  2685. }
  2686. // ===================================================================
  2687. TestMaps_MSfixed64Entry_DoNotUse::TestMaps_MSfixed64Entry_DoNotUse() {}
  2688. TestMaps_MSfixed64Entry_DoNotUse::TestMaps_MSfixed64Entry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2689. void TestMaps_MSfixed64Entry_DoNotUse::MergeFrom(const TestMaps_MSfixed64Entry_DoNotUse& other) {
  2690. MergeFromInternal(other);
  2691. }
  2692. ::google::protobuf::Metadata TestMaps_MSfixed64Entry_DoNotUse::GetMetadata() const {
  2693. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2694. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[19];
  2695. }
  2696. void TestMaps_MSfixed64Entry_DoNotUse::MergeFrom(
  2697. const ::google::protobuf::Message& other) {
  2698. ::google::protobuf::Message::MergeFrom(other);
  2699. }
  2700. // ===================================================================
  2701. TestMaps_MBoolEntry_DoNotUse::TestMaps_MBoolEntry_DoNotUse() {}
  2702. TestMaps_MBoolEntry_DoNotUse::TestMaps_MBoolEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2703. void TestMaps_MBoolEntry_DoNotUse::MergeFrom(const TestMaps_MBoolEntry_DoNotUse& other) {
  2704. MergeFromInternal(other);
  2705. }
  2706. ::google::protobuf::Metadata TestMaps_MBoolEntry_DoNotUse::GetMetadata() const {
  2707. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2708. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[20];
  2709. }
  2710. void TestMaps_MBoolEntry_DoNotUse::MergeFrom(
  2711. const ::google::protobuf::Message& other) {
  2712. ::google::protobuf::Message::MergeFrom(other);
  2713. }
  2714. // ===================================================================
  2715. TestMaps_MStringEntry_DoNotUse::TestMaps_MStringEntry_DoNotUse() {}
  2716. TestMaps_MStringEntry_DoNotUse::TestMaps_MStringEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  2717. void TestMaps_MStringEntry_DoNotUse::MergeFrom(const TestMaps_MStringEntry_DoNotUse& other) {
  2718. MergeFromInternal(other);
  2719. }
  2720. ::google::protobuf::Metadata TestMaps_MStringEntry_DoNotUse::GetMetadata() const {
  2721. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2722. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[21];
  2723. }
  2724. void TestMaps_MStringEntry_DoNotUse::MergeFrom(
  2725. const ::google::protobuf::Message& other) {
  2726. ::google::protobuf::Message::MergeFrom(other);
  2727. }
  2728. // ===================================================================
  2729. void TestMaps::InitAsDefaultInstance() {
  2730. }
  2731. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2732. const int TestMaps::kMInt32FieldNumber;
  2733. const int TestMaps::kMInt64FieldNumber;
  2734. const int TestMaps::kMUint32FieldNumber;
  2735. const int TestMaps::kMUint64FieldNumber;
  2736. const int TestMaps::kMSint32FieldNumber;
  2737. const int TestMaps::kMSint64FieldNumber;
  2738. const int TestMaps::kMFixed32FieldNumber;
  2739. const int TestMaps::kMFixed64FieldNumber;
  2740. const int TestMaps::kMSfixed32FieldNumber;
  2741. const int TestMaps::kMSfixed64FieldNumber;
  2742. const int TestMaps::kMBoolFieldNumber;
  2743. const int TestMaps::kMStringFieldNumber;
  2744. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2745. TestMaps::TestMaps()
  2746. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2747. ::google::protobuf::internal::InitSCC(
  2748. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps.base);
  2749. SharedCtor();
  2750. // @@protoc_insertion_point(constructor:protobuf_unittest.TestMaps)
  2751. }
  2752. TestMaps::TestMaps(::google::protobuf::Arena* arena)
  2753. : ::google::protobuf::Message(),
  2754. _internal_metadata_(arena),
  2755. m_int32_(arena),
  2756. m_int64_(arena),
  2757. m_uint32_(arena),
  2758. m_uint64_(arena),
  2759. m_sint32_(arena),
  2760. m_sint64_(arena),
  2761. m_fixed32_(arena),
  2762. m_fixed64_(arena),
  2763. m_sfixed32_(arena),
  2764. m_sfixed64_(arena),
  2765. m_bool_(arena),
  2766. m_string_(arena) {
  2767. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps.base);
  2768. SharedCtor();
  2769. RegisterArenaDtor(arena);
  2770. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestMaps)
  2771. }
  2772. TestMaps::TestMaps(const TestMaps& from)
  2773. : ::google::protobuf::Message(),
  2774. _internal_metadata_(NULL),
  2775. _has_bits_(from._has_bits_) {
  2776. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2777. m_int32_.MergeFrom(from.m_int32_);
  2778. m_int64_.MergeFrom(from.m_int64_);
  2779. m_uint32_.MergeFrom(from.m_uint32_);
  2780. m_uint64_.MergeFrom(from.m_uint64_);
  2781. m_sint32_.MergeFrom(from.m_sint32_);
  2782. m_sint64_.MergeFrom(from.m_sint64_);
  2783. m_fixed32_.MergeFrom(from.m_fixed32_);
  2784. m_fixed64_.MergeFrom(from.m_fixed64_);
  2785. m_sfixed32_.MergeFrom(from.m_sfixed32_);
  2786. m_sfixed64_.MergeFrom(from.m_sfixed64_);
  2787. m_bool_.MergeFrom(from.m_bool_);
  2788. m_string_.MergeFrom(from.m_string_);
  2789. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestMaps)
  2790. }
  2791. void TestMaps::SharedCtor() {
  2792. }
  2793. TestMaps::~TestMaps() {
  2794. // @@protoc_insertion_point(destructor:protobuf_unittest.TestMaps)
  2795. SharedDtor();
  2796. }
  2797. void TestMaps::SharedDtor() {
  2798. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  2799. }
  2800. void TestMaps::ArenaDtor(void* object) {
  2801. TestMaps* _this = reinterpret_cast< TestMaps* >(object);
  2802. (void)_this;
  2803. }
  2804. void TestMaps::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  2805. }
  2806. void TestMaps::SetCachedSize(int size) const {
  2807. _cached_size_.Set(size);
  2808. }
  2809. const ::google::protobuf::Descriptor* TestMaps::descriptor() {
  2810. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  2811. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2812. }
  2813. const TestMaps& TestMaps::default_instance() {
  2814. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestMaps.base);
  2815. return *internal_default_instance();
  2816. }
  2817. void TestMaps::Clear() {
  2818. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestMaps)
  2819. ::google::protobuf::uint32 cached_has_bits = 0;
  2820. // Prevent compiler warnings about cached_has_bits being unused
  2821. (void) cached_has_bits;
  2822. m_int32_.Clear();
  2823. m_int64_.Clear();
  2824. m_uint32_.Clear();
  2825. m_uint64_.Clear();
  2826. m_sint32_.Clear();
  2827. m_sint64_.Clear();
  2828. m_fixed32_.Clear();
  2829. m_fixed64_.Clear();
  2830. m_sfixed32_.Clear();
  2831. m_sfixed64_.Clear();
  2832. m_bool_.Clear();
  2833. m_string_.Clear();
  2834. _has_bits_.Clear();
  2835. _internal_metadata_.Clear();
  2836. }
  2837. bool TestMaps::MergePartialFromCodedStream(
  2838. ::google::protobuf::io::CodedInputStream* input) {
  2839. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2840. ::google::protobuf::uint32 tag;
  2841. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestMaps)
  2842. for (;;) {
  2843. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2844. tag = p.first;
  2845. if (!p.second) goto handle_unusual;
  2846. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2847. // map<int32, .protobuf_unittest.TestIntIntMap> m_int32 = 1;
  2848. case 1: {
  2849. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2850. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2851. TestMaps_MInt32Entry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  2852. TestMaps_MInt32Entry_DoNotUse,
  2853. ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap,
  2854. ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
  2855. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  2856. 0 >,
  2857. ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap > > parser(&m_int32_);
  2858. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  2859. input, &parser));
  2860. } else {
  2861. goto handle_unusual;
  2862. }
  2863. break;
  2864. }
  2865. // map<int64, .protobuf_unittest.TestIntIntMap> m_int64 = 2;
  2866. case 2: {
  2867. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2868. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  2869. TestMaps_MInt64Entry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  2870. TestMaps_MInt64Entry_DoNotUse,
  2871. ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap,
  2872. ::google::protobuf::internal::WireFormatLite::TYPE_INT64,
  2873. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  2874. 0 >,
  2875. ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap > > parser(&m_int64_);
  2876. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  2877. input, &parser));
  2878. } else {
  2879. goto handle_unusual;
  2880. }
  2881. break;
  2882. }
  2883. // map<uint32, .protobuf_unittest.TestIntIntMap> m_uint32 = 3;
  2884. case 3: {
  2885. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2886. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  2887. TestMaps_MUint32Entry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  2888. TestMaps_MUint32Entry_DoNotUse,
  2889. ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap,
  2890. ::google::protobuf::internal::WireFormatLite::TYPE_UINT32,
  2891. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  2892. 0 >,
  2893. ::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap > > parser(&m_uint32_);
  2894. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  2895. input, &parser));
  2896. } else {
  2897. goto handle_unusual;
  2898. }
  2899. break;
  2900. }
  2901. // map<uint64, .protobuf_unittest.TestIntIntMap> m_uint64 = 4;
  2902. case 4: {
  2903. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2904. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  2905. TestMaps_MUint64Entry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  2906. TestMaps_MUint64Entry_DoNotUse,
  2907. ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap,
  2908. ::google::protobuf::internal::WireFormatLite::TYPE_UINT64,
  2909. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  2910. 0 >,
  2911. ::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap > > parser(&m_uint64_);
  2912. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  2913. input, &parser));
  2914. } else {
  2915. goto handle_unusual;
  2916. }
  2917. break;
  2918. }
  2919. // map<sint32, .protobuf_unittest.TestIntIntMap> m_sint32 = 5;
  2920. case 5: {
  2921. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2922. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  2923. TestMaps_MSint32Entry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  2924. TestMaps_MSint32Entry_DoNotUse,
  2925. ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap,
  2926. ::google::protobuf::internal::WireFormatLite::TYPE_SINT32,
  2927. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  2928. 0 >,
  2929. ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap > > parser(&m_sint32_);
  2930. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  2931. input, &parser));
  2932. } else {
  2933. goto handle_unusual;
  2934. }
  2935. break;
  2936. }
  2937. // map<sint64, .protobuf_unittest.TestIntIntMap> m_sint64 = 6;
  2938. case 6: {
  2939. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2940. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  2941. TestMaps_MSint64Entry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  2942. TestMaps_MSint64Entry_DoNotUse,
  2943. ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap,
  2944. ::google::protobuf::internal::WireFormatLite::TYPE_SINT64,
  2945. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  2946. 0 >,
  2947. ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap > > parser(&m_sint64_);
  2948. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  2949. input, &parser));
  2950. } else {
  2951. goto handle_unusual;
  2952. }
  2953. break;
  2954. }
  2955. // map<fixed32, .protobuf_unittest.TestIntIntMap> m_fixed32 = 7;
  2956. case 7: {
  2957. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2958. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  2959. TestMaps_MFixed32Entry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  2960. TestMaps_MFixed32Entry_DoNotUse,
  2961. ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap,
  2962. ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32,
  2963. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  2964. 0 >,
  2965. ::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap > > parser(&m_fixed32_);
  2966. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  2967. input, &parser));
  2968. } else {
  2969. goto handle_unusual;
  2970. }
  2971. break;
  2972. }
  2973. // map<fixed64, .protobuf_unittest.TestIntIntMap> m_fixed64 = 8;
  2974. case 8: {
  2975. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2976. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  2977. TestMaps_MFixed64Entry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  2978. TestMaps_MFixed64Entry_DoNotUse,
  2979. ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap,
  2980. ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64,
  2981. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  2982. 0 >,
  2983. ::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap > > parser(&m_fixed64_);
  2984. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  2985. input, &parser));
  2986. } else {
  2987. goto handle_unusual;
  2988. }
  2989. break;
  2990. }
  2991. // map<sfixed32, .protobuf_unittest.TestIntIntMap> m_sfixed32 = 9;
  2992. case 9: {
  2993. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2994. static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
  2995. TestMaps_MSfixed32Entry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  2996. TestMaps_MSfixed32Entry_DoNotUse,
  2997. ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap,
  2998. ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32,
  2999. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  3000. 0 >,
  3001. ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap > > parser(&m_sfixed32_);
  3002. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  3003. input, &parser));
  3004. } else {
  3005. goto handle_unusual;
  3006. }
  3007. break;
  3008. }
  3009. // map<sfixed64, .protobuf_unittest.TestIntIntMap> m_sfixed64 = 10;
  3010. case 10: {
  3011. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3012. static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
  3013. TestMaps_MSfixed64Entry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  3014. TestMaps_MSfixed64Entry_DoNotUse,
  3015. ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap,
  3016. ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64,
  3017. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  3018. 0 >,
  3019. ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap > > parser(&m_sfixed64_);
  3020. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  3021. input, &parser));
  3022. } else {
  3023. goto handle_unusual;
  3024. }
  3025. break;
  3026. }
  3027. // map<bool, .protobuf_unittest.TestIntIntMap> m_bool = 11;
  3028. case 11: {
  3029. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3030. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  3031. TestMaps_MBoolEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  3032. TestMaps_MBoolEntry_DoNotUse,
  3033. bool, ::protobuf_unittest::TestIntIntMap,
  3034. ::google::protobuf::internal::WireFormatLite::TYPE_BOOL,
  3035. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  3036. 0 >,
  3037. ::google::protobuf::Map< bool, ::protobuf_unittest::TestIntIntMap > > parser(&m_bool_);
  3038. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  3039. input, &parser));
  3040. } else {
  3041. goto handle_unusual;
  3042. }
  3043. break;
  3044. }
  3045. // map<string, .protobuf_unittest.TestIntIntMap> m_string = 12;
  3046. case 12: {
  3047. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3048. static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
  3049. TestMaps_MStringEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  3050. TestMaps_MStringEntry_DoNotUse,
  3051. ::std::string, ::protobuf_unittest::TestIntIntMap,
  3052. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  3053. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  3054. 0 >,
  3055. ::google::protobuf::Map< ::std::string, ::protobuf_unittest::TestIntIntMap > > parser(&m_string_);
  3056. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  3057. input, &parser));
  3058. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  3059. parser.key().data(), static_cast<int>(parser.key().length()),
  3060. ::google::protobuf::internal::WireFormat::PARSE,
  3061. "protobuf_unittest.TestMaps.MStringEntry.key");
  3062. } else {
  3063. goto handle_unusual;
  3064. }
  3065. break;
  3066. }
  3067. default: {
  3068. handle_unusual:
  3069. if (tag == 0) {
  3070. goto success;
  3071. }
  3072. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3073. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3074. break;
  3075. }
  3076. }
  3077. }
  3078. success:
  3079. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestMaps)
  3080. return true;
  3081. failure:
  3082. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestMaps)
  3083. return false;
  3084. #undef DO_
  3085. }
  3086. void TestMaps::SerializeWithCachedSizes(
  3087. ::google::protobuf::io::CodedOutputStream* output) const {
  3088. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestMaps)
  3089. ::google::protobuf::uint32 cached_has_bits = 0;
  3090. (void) cached_has_bits;
  3091. // map<int32, .protobuf_unittest.TestIntIntMap> m_int32 = 1;
  3092. if (!this->m_int32().empty()) {
  3093. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3094. ConstPtr;
  3095. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  3096. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3097. if (output->IsSerializationDeterministic() &&
  3098. this->m_int32().size() > 1) {
  3099. ::std::unique_ptr<SortItem[]> items(
  3100. new SortItem[this->m_int32().size()]);
  3101. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3102. size_type n = 0;
  3103. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3104. it = this->m_int32().begin();
  3105. it != this->m_int32().end(); ++it, ++n) {
  3106. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3107. }
  3108. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3109. ::std::unique_ptr<TestMaps_MInt32Entry_DoNotUse> entry;
  3110. for (size_type i = 0; i < n; i++) {
  3111. entry.reset(m_int32_.NewEntryWrapper(
  3112. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3113. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3114. 1, *entry, output);
  3115. if (entry->GetArena() != NULL) {
  3116. entry.release();
  3117. }
  3118. }
  3119. } else {
  3120. ::std::unique_ptr<TestMaps_MInt32Entry_DoNotUse> entry;
  3121. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3122. it = this->m_int32().begin();
  3123. it != this->m_int32().end(); ++it) {
  3124. entry.reset(m_int32_.NewEntryWrapper(
  3125. it->first, it->second));
  3126. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3127. 1, *entry, output);
  3128. if (entry->GetArena() != NULL) {
  3129. entry.release();
  3130. }
  3131. }
  3132. }
  3133. }
  3134. // map<int64, .protobuf_unittest.TestIntIntMap> m_int64 = 2;
  3135. if (!this->m_int64().empty()) {
  3136. typedef ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3137. ConstPtr;
  3138. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int64, ConstPtr > SortItem;
  3139. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3140. if (output->IsSerializationDeterministic() &&
  3141. this->m_int64().size() > 1) {
  3142. ::std::unique_ptr<SortItem[]> items(
  3143. new SortItem[this->m_int64().size()]);
  3144. typedef ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3145. size_type n = 0;
  3146. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3147. it = this->m_int64().begin();
  3148. it != this->m_int64().end(); ++it, ++n) {
  3149. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3150. }
  3151. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3152. ::std::unique_ptr<TestMaps_MInt64Entry_DoNotUse> entry;
  3153. for (size_type i = 0; i < n; i++) {
  3154. entry.reset(m_int64_.NewEntryWrapper(
  3155. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3156. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3157. 2, *entry, output);
  3158. if (entry->GetArena() != NULL) {
  3159. entry.release();
  3160. }
  3161. }
  3162. } else {
  3163. ::std::unique_ptr<TestMaps_MInt64Entry_DoNotUse> entry;
  3164. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3165. it = this->m_int64().begin();
  3166. it != this->m_int64().end(); ++it) {
  3167. entry.reset(m_int64_.NewEntryWrapper(
  3168. it->first, it->second));
  3169. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3170. 2, *entry, output);
  3171. if (entry->GetArena() != NULL) {
  3172. entry.release();
  3173. }
  3174. }
  3175. }
  3176. }
  3177. // map<uint32, .protobuf_unittest.TestIntIntMap> m_uint32 = 3;
  3178. if (!this->m_uint32().empty()) {
  3179. typedef ::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3180. ConstPtr;
  3181. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::uint32, ConstPtr > SortItem;
  3182. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3183. if (output->IsSerializationDeterministic() &&
  3184. this->m_uint32().size() > 1) {
  3185. ::std::unique_ptr<SortItem[]> items(
  3186. new SortItem[this->m_uint32().size()]);
  3187. typedef ::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3188. size_type n = 0;
  3189. for (::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3190. it = this->m_uint32().begin();
  3191. it != this->m_uint32().end(); ++it, ++n) {
  3192. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3193. }
  3194. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3195. ::std::unique_ptr<TestMaps_MUint32Entry_DoNotUse> entry;
  3196. for (size_type i = 0; i < n; i++) {
  3197. entry.reset(m_uint32_.NewEntryWrapper(
  3198. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3199. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3200. 3, *entry, output);
  3201. if (entry->GetArena() != NULL) {
  3202. entry.release();
  3203. }
  3204. }
  3205. } else {
  3206. ::std::unique_ptr<TestMaps_MUint32Entry_DoNotUse> entry;
  3207. for (::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3208. it = this->m_uint32().begin();
  3209. it != this->m_uint32().end(); ++it) {
  3210. entry.reset(m_uint32_.NewEntryWrapper(
  3211. it->first, it->second));
  3212. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3213. 3, *entry, output);
  3214. if (entry->GetArena() != NULL) {
  3215. entry.release();
  3216. }
  3217. }
  3218. }
  3219. }
  3220. // map<uint64, .protobuf_unittest.TestIntIntMap> m_uint64 = 4;
  3221. if (!this->m_uint64().empty()) {
  3222. typedef ::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3223. ConstPtr;
  3224. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::uint64, ConstPtr > SortItem;
  3225. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3226. if (output->IsSerializationDeterministic() &&
  3227. this->m_uint64().size() > 1) {
  3228. ::std::unique_ptr<SortItem[]> items(
  3229. new SortItem[this->m_uint64().size()]);
  3230. typedef ::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3231. size_type n = 0;
  3232. for (::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3233. it = this->m_uint64().begin();
  3234. it != this->m_uint64().end(); ++it, ++n) {
  3235. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3236. }
  3237. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3238. ::std::unique_ptr<TestMaps_MUint64Entry_DoNotUse> entry;
  3239. for (size_type i = 0; i < n; i++) {
  3240. entry.reset(m_uint64_.NewEntryWrapper(
  3241. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3242. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3243. 4, *entry, output);
  3244. if (entry->GetArena() != NULL) {
  3245. entry.release();
  3246. }
  3247. }
  3248. } else {
  3249. ::std::unique_ptr<TestMaps_MUint64Entry_DoNotUse> entry;
  3250. for (::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3251. it = this->m_uint64().begin();
  3252. it != this->m_uint64().end(); ++it) {
  3253. entry.reset(m_uint64_.NewEntryWrapper(
  3254. it->first, it->second));
  3255. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3256. 4, *entry, output);
  3257. if (entry->GetArena() != NULL) {
  3258. entry.release();
  3259. }
  3260. }
  3261. }
  3262. }
  3263. // map<sint32, .protobuf_unittest.TestIntIntMap> m_sint32 = 5;
  3264. if (!this->m_sint32().empty()) {
  3265. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3266. ConstPtr;
  3267. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  3268. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3269. if (output->IsSerializationDeterministic() &&
  3270. this->m_sint32().size() > 1) {
  3271. ::std::unique_ptr<SortItem[]> items(
  3272. new SortItem[this->m_sint32().size()]);
  3273. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3274. size_type n = 0;
  3275. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3276. it = this->m_sint32().begin();
  3277. it != this->m_sint32().end(); ++it, ++n) {
  3278. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3279. }
  3280. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3281. ::std::unique_ptr<TestMaps_MSint32Entry_DoNotUse> entry;
  3282. for (size_type i = 0; i < n; i++) {
  3283. entry.reset(m_sint32_.NewEntryWrapper(
  3284. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3285. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3286. 5, *entry, output);
  3287. if (entry->GetArena() != NULL) {
  3288. entry.release();
  3289. }
  3290. }
  3291. } else {
  3292. ::std::unique_ptr<TestMaps_MSint32Entry_DoNotUse> entry;
  3293. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3294. it = this->m_sint32().begin();
  3295. it != this->m_sint32().end(); ++it) {
  3296. entry.reset(m_sint32_.NewEntryWrapper(
  3297. it->first, it->second));
  3298. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3299. 5, *entry, output);
  3300. if (entry->GetArena() != NULL) {
  3301. entry.release();
  3302. }
  3303. }
  3304. }
  3305. }
  3306. // map<sint64, .protobuf_unittest.TestIntIntMap> m_sint64 = 6;
  3307. if (!this->m_sint64().empty()) {
  3308. typedef ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3309. ConstPtr;
  3310. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int64, ConstPtr > SortItem;
  3311. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3312. if (output->IsSerializationDeterministic() &&
  3313. this->m_sint64().size() > 1) {
  3314. ::std::unique_ptr<SortItem[]> items(
  3315. new SortItem[this->m_sint64().size()]);
  3316. typedef ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3317. size_type n = 0;
  3318. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3319. it = this->m_sint64().begin();
  3320. it != this->m_sint64().end(); ++it, ++n) {
  3321. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3322. }
  3323. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3324. ::std::unique_ptr<TestMaps_MSint64Entry_DoNotUse> entry;
  3325. for (size_type i = 0; i < n; i++) {
  3326. entry.reset(m_sint64_.NewEntryWrapper(
  3327. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3328. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3329. 6, *entry, output);
  3330. if (entry->GetArena() != NULL) {
  3331. entry.release();
  3332. }
  3333. }
  3334. } else {
  3335. ::std::unique_ptr<TestMaps_MSint64Entry_DoNotUse> entry;
  3336. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3337. it = this->m_sint64().begin();
  3338. it != this->m_sint64().end(); ++it) {
  3339. entry.reset(m_sint64_.NewEntryWrapper(
  3340. it->first, it->second));
  3341. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3342. 6, *entry, output);
  3343. if (entry->GetArena() != NULL) {
  3344. entry.release();
  3345. }
  3346. }
  3347. }
  3348. }
  3349. // map<fixed32, .protobuf_unittest.TestIntIntMap> m_fixed32 = 7;
  3350. if (!this->m_fixed32().empty()) {
  3351. typedef ::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3352. ConstPtr;
  3353. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::uint32, ConstPtr > SortItem;
  3354. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3355. if (output->IsSerializationDeterministic() &&
  3356. this->m_fixed32().size() > 1) {
  3357. ::std::unique_ptr<SortItem[]> items(
  3358. new SortItem[this->m_fixed32().size()]);
  3359. typedef ::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3360. size_type n = 0;
  3361. for (::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3362. it = this->m_fixed32().begin();
  3363. it != this->m_fixed32().end(); ++it, ++n) {
  3364. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3365. }
  3366. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3367. ::std::unique_ptr<TestMaps_MFixed32Entry_DoNotUse> entry;
  3368. for (size_type i = 0; i < n; i++) {
  3369. entry.reset(m_fixed32_.NewEntryWrapper(
  3370. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3371. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3372. 7, *entry, output);
  3373. if (entry->GetArena() != NULL) {
  3374. entry.release();
  3375. }
  3376. }
  3377. } else {
  3378. ::std::unique_ptr<TestMaps_MFixed32Entry_DoNotUse> entry;
  3379. for (::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3380. it = this->m_fixed32().begin();
  3381. it != this->m_fixed32().end(); ++it) {
  3382. entry.reset(m_fixed32_.NewEntryWrapper(
  3383. it->first, it->second));
  3384. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3385. 7, *entry, output);
  3386. if (entry->GetArena() != NULL) {
  3387. entry.release();
  3388. }
  3389. }
  3390. }
  3391. }
  3392. // map<fixed64, .protobuf_unittest.TestIntIntMap> m_fixed64 = 8;
  3393. if (!this->m_fixed64().empty()) {
  3394. typedef ::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3395. ConstPtr;
  3396. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::uint64, ConstPtr > SortItem;
  3397. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3398. if (output->IsSerializationDeterministic() &&
  3399. this->m_fixed64().size() > 1) {
  3400. ::std::unique_ptr<SortItem[]> items(
  3401. new SortItem[this->m_fixed64().size()]);
  3402. typedef ::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3403. size_type n = 0;
  3404. for (::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3405. it = this->m_fixed64().begin();
  3406. it != this->m_fixed64().end(); ++it, ++n) {
  3407. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3408. }
  3409. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3410. ::std::unique_ptr<TestMaps_MFixed64Entry_DoNotUse> entry;
  3411. for (size_type i = 0; i < n; i++) {
  3412. entry.reset(m_fixed64_.NewEntryWrapper(
  3413. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3414. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3415. 8, *entry, output);
  3416. if (entry->GetArena() != NULL) {
  3417. entry.release();
  3418. }
  3419. }
  3420. } else {
  3421. ::std::unique_ptr<TestMaps_MFixed64Entry_DoNotUse> entry;
  3422. for (::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3423. it = this->m_fixed64().begin();
  3424. it != this->m_fixed64().end(); ++it) {
  3425. entry.reset(m_fixed64_.NewEntryWrapper(
  3426. it->first, it->second));
  3427. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3428. 8, *entry, output);
  3429. if (entry->GetArena() != NULL) {
  3430. entry.release();
  3431. }
  3432. }
  3433. }
  3434. }
  3435. // map<sfixed32, .protobuf_unittest.TestIntIntMap> m_sfixed32 = 9;
  3436. if (!this->m_sfixed32().empty()) {
  3437. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3438. ConstPtr;
  3439. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  3440. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3441. if (output->IsSerializationDeterministic() &&
  3442. this->m_sfixed32().size() > 1) {
  3443. ::std::unique_ptr<SortItem[]> items(
  3444. new SortItem[this->m_sfixed32().size()]);
  3445. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3446. size_type n = 0;
  3447. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3448. it = this->m_sfixed32().begin();
  3449. it != this->m_sfixed32().end(); ++it, ++n) {
  3450. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3451. }
  3452. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3453. ::std::unique_ptr<TestMaps_MSfixed32Entry_DoNotUse> entry;
  3454. for (size_type i = 0; i < n; i++) {
  3455. entry.reset(m_sfixed32_.NewEntryWrapper(
  3456. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3457. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3458. 9, *entry, output);
  3459. if (entry->GetArena() != NULL) {
  3460. entry.release();
  3461. }
  3462. }
  3463. } else {
  3464. ::std::unique_ptr<TestMaps_MSfixed32Entry_DoNotUse> entry;
  3465. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3466. it = this->m_sfixed32().begin();
  3467. it != this->m_sfixed32().end(); ++it) {
  3468. entry.reset(m_sfixed32_.NewEntryWrapper(
  3469. it->first, it->second));
  3470. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3471. 9, *entry, output);
  3472. if (entry->GetArena() != NULL) {
  3473. entry.release();
  3474. }
  3475. }
  3476. }
  3477. }
  3478. // map<sfixed64, .protobuf_unittest.TestIntIntMap> m_sfixed64 = 10;
  3479. if (!this->m_sfixed64().empty()) {
  3480. typedef ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3481. ConstPtr;
  3482. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int64, ConstPtr > SortItem;
  3483. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3484. if (output->IsSerializationDeterministic() &&
  3485. this->m_sfixed64().size() > 1) {
  3486. ::std::unique_ptr<SortItem[]> items(
  3487. new SortItem[this->m_sfixed64().size()]);
  3488. typedef ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3489. size_type n = 0;
  3490. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3491. it = this->m_sfixed64().begin();
  3492. it != this->m_sfixed64().end(); ++it, ++n) {
  3493. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3494. }
  3495. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3496. ::std::unique_ptr<TestMaps_MSfixed64Entry_DoNotUse> entry;
  3497. for (size_type i = 0; i < n; i++) {
  3498. entry.reset(m_sfixed64_.NewEntryWrapper(
  3499. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3500. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3501. 10, *entry, output);
  3502. if (entry->GetArena() != NULL) {
  3503. entry.release();
  3504. }
  3505. }
  3506. } else {
  3507. ::std::unique_ptr<TestMaps_MSfixed64Entry_DoNotUse> entry;
  3508. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3509. it = this->m_sfixed64().begin();
  3510. it != this->m_sfixed64().end(); ++it) {
  3511. entry.reset(m_sfixed64_.NewEntryWrapper(
  3512. it->first, it->second));
  3513. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3514. 10, *entry, output);
  3515. if (entry->GetArena() != NULL) {
  3516. entry.release();
  3517. }
  3518. }
  3519. }
  3520. }
  3521. // map<bool, .protobuf_unittest.TestIntIntMap> m_bool = 11;
  3522. if (!this->m_bool().empty()) {
  3523. typedef ::google::protobuf::Map< bool, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3524. ConstPtr;
  3525. typedef ::google::protobuf::internal::SortItem< bool, ConstPtr > SortItem;
  3526. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3527. if (output->IsSerializationDeterministic() &&
  3528. this->m_bool().size() > 1) {
  3529. ::std::unique_ptr<SortItem[]> items(
  3530. new SortItem[this->m_bool().size()]);
  3531. typedef ::google::protobuf::Map< bool, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3532. size_type n = 0;
  3533. for (::google::protobuf::Map< bool, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3534. it = this->m_bool().begin();
  3535. it != this->m_bool().end(); ++it, ++n) {
  3536. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3537. }
  3538. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3539. ::std::unique_ptr<TestMaps_MBoolEntry_DoNotUse> entry;
  3540. for (size_type i = 0; i < n; i++) {
  3541. entry.reset(m_bool_.NewEntryWrapper(
  3542. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3543. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3544. 11, *entry, output);
  3545. if (entry->GetArena() != NULL) {
  3546. entry.release();
  3547. }
  3548. }
  3549. } else {
  3550. ::std::unique_ptr<TestMaps_MBoolEntry_DoNotUse> entry;
  3551. for (::google::protobuf::Map< bool, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3552. it = this->m_bool().begin();
  3553. it != this->m_bool().end(); ++it) {
  3554. entry.reset(m_bool_.NewEntryWrapper(
  3555. it->first, it->second));
  3556. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3557. 11, *entry, output);
  3558. if (entry->GetArena() != NULL) {
  3559. entry.release();
  3560. }
  3561. }
  3562. }
  3563. }
  3564. // map<string, .protobuf_unittest.TestIntIntMap> m_string = 12;
  3565. if (!this->m_string().empty()) {
  3566. typedef ::google::protobuf::Map< ::std::string, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3567. ConstPtr;
  3568. typedef ConstPtr SortItem;
  3569. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  3570. struct Utf8Check {
  3571. static void Check(ConstPtr p) {
  3572. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  3573. p->first.data(), static_cast<int>(p->first.length()),
  3574. ::google::protobuf::internal::WireFormat::SERIALIZE,
  3575. "protobuf_unittest.TestMaps.MStringEntry.key");
  3576. }
  3577. };
  3578. if (output->IsSerializationDeterministic() &&
  3579. this->m_string().size() > 1) {
  3580. ::std::unique_ptr<SortItem[]> items(
  3581. new SortItem[this->m_string().size()]);
  3582. typedef ::google::protobuf::Map< ::std::string, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3583. size_type n = 0;
  3584. for (::google::protobuf::Map< ::std::string, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3585. it = this->m_string().begin();
  3586. it != this->m_string().end(); ++it, ++n) {
  3587. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3588. }
  3589. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3590. ::std::unique_ptr<TestMaps_MStringEntry_DoNotUse> entry;
  3591. for (size_type i = 0; i < n; i++) {
  3592. entry.reset(m_string_.NewEntryWrapper(
  3593. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  3594. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3595. 12, *entry, output);
  3596. if (entry->GetArena() != NULL) {
  3597. entry.release();
  3598. }
  3599. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  3600. }
  3601. } else {
  3602. ::std::unique_ptr<TestMaps_MStringEntry_DoNotUse> entry;
  3603. for (::google::protobuf::Map< ::std::string, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3604. it = this->m_string().begin();
  3605. it != this->m_string().end(); ++it) {
  3606. entry.reset(m_string_.NewEntryWrapper(
  3607. it->first, it->second));
  3608. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3609. 12, *entry, output);
  3610. if (entry->GetArena() != NULL) {
  3611. entry.release();
  3612. }
  3613. Utf8Check::Check(&*it);
  3614. }
  3615. }
  3616. }
  3617. if (_internal_metadata_.have_unknown_fields()) {
  3618. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3619. _internal_metadata_.unknown_fields(), output);
  3620. }
  3621. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestMaps)
  3622. }
  3623. ::google::protobuf::uint8* TestMaps::InternalSerializeWithCachedSizesToArray(
  3624. bool deterministic, ::google::protobuf::uint8* target) const {
  3625. (void)deterministic; // Unused
  3626. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestMaps)
  3627. ::google::protobuf::uint32 cached_has_bits = 0;
  3628. (void) cached_has_bits;
  3629. // map<int32, .protobuf_unittest.TestIntIntMap> m_int32 = 1;
  3630. if (!this->m_int32().empty()) {
  3631. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3632. ConstPtr;
  3633. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  3634. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3635. if (deterministic &&
  3636. this->m_int32().size() > 1) {
  3637. ::std::unique_ptr<SortItem[]> items(
  3638. new SortItem[this->m_int32().size()]);
  3639. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3640. size_type n = 0;
  3641. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3642. it = this->m_int32().begin();
  3643. it != this->m_int32().end(); ++it, ++n) {
  3644. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3645. }
  3646. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3647. ::std::unique_ptr<TestMaps_MInt32Entry_DoNotUse> entry;
  3648. for (size_type i = 0; i < n; i++) {
  3649. entry.reset(m_int32_.NewEntryWrapper(
  3650. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3651. target = ::google::protobuf::internal::WireFormatLite::
  3652. InternalWriteMessageNoVirtualToArray(
  3653. 1, *entry, deterministic, target);
  3654. ;
  3655. if (entry->GetArena() != NULL) {
  3656. entry.release();
  3657. }
  3658. }
  3659. } else {
  3660. ::std::unique_ptr<TestMaps_MInt32Entry_DoNotUse> entry;
  3661. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3662. it = this->m_int32().begin();
  3663. it != this->m_int32().end(); ++it) {
  3664. entry.reset(m_int32_.NewEntryWrapper(
  3665. it->first, it->second));
  3666. target = ::google::protobuf::internal::WireFormatLite::
  3667. InternalWriteMessageNoVirtualToArray(
  3668. 1, *entry, deterministic, target);
  3669. ;
  3670. if (entry->GetArena() != NULL) {
  3671. entry.release();
  3672. }
  3673. }
  3674. }
  3675. }
  3676. // map<int64, .protobuf_unittest.TestIntIntMap> m_int64 = 2;
  3677. if (!this->m_int64().empty()) {
  3678. typedef ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3679. ConstPtr;
  3680. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int64, ConstPtr > SortItem;
  3681. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3682. if (deterministic &&
  3683. this->m_int64().size() > 1) {
  3684. ::std::unique_ptr<SortItem[]> items(
  3685. new SortItem[this->m_int64().size()]);
  3686. typedef ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3687. size_type n = 0;
  3688. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3689. it = this->m_int64().begin();
  3690. it != this->m_int64().end(); ++it, ++n) {
  3691. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3692. }
  3693. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3694. ::std::unique_ptr<TestMaps_MInt64Entry_DoNotUse> entry;
  3695. for (size_type i = 0; i < n; i++) {
  3696. entry.reset(m_int64_.NewEntryWrapper(
  3697. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3698. target = ::google::protobuf::internal::WireFormatLite::
  3699. InternalWriteMessageNoVirtualToArray(
  3700. 2, *entry, deterministic, target);
  3701. ;
  3702. if (entry->GetArena() != NULL) {
  3703. entry.release();
  3704. }
  3705. }
  3706. } else {
  3707. ::std::unique_ptr<TestMaps_MInt64Entry_DoNotUse> entry;
  3708. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3709. it = this->m_int64().begin();
  3710. it != this->m_int64().end(); ++it) {
  3711. entry.reset(m_int64_.NewEntryWrapper(
  3712. it->first, it->second));
  3713. target = ::google::protobuf::internal::WireFormatLite::
  3714. InternalWriteMessageNoVirtualToArray(
  3715. 2, *entry, deterministic, target);
  3716. ;
  3717. if (entry->GetArena() != NULL) {
  3718. entry.release();
  3719. }
  3720. }
  3721. }
  3722. }
  3723. // map<uint32, .protobuf_unittest.TestIntIntMap> m_uint32 = 3;
  3724. if (!this->m_uint32().empty()) {
  3725. typedef ::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3726. ConstPtr;
  3727. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::uint32, ConstPtr > SortItem;
  3728. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3729. if (deterministic &&
  3730. this->m_uint32().size() > 1) {
  3731. ::std::unique_ptr<SortItem[]> items(
  3732. new SortItem[this->m_uint32().size()]);
  3733. typedef ::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3734. size_type n = 0;
  3735. for (::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3736. it = this->m_uint32().begin();
  3737. it != this->m_uint32().end(); ++it, ++n) {
  3738. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3739. }
  3740. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3741. ::std::unique_ptr<TestMaps_MUint32Entry_DoNotUse> entry;
  3742. for (size_type i = 0; i < n; i++) {
  3743. entry.reset(m_uint32_.NewEntryWrapper(
  3744. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3745. target = ::google::protobuf::internal::WireFormatLite::
  3746. InternalWriteMessageNoVirtualToArray(
  3747. 3, *entry, deterministic, target);
  3748. ;
  3749. if (entry->GetArena() != NULL) {
  3750. entry.release();
  3751. }
  3752. }
  3753. } else {
  3754. ::std::unique_ptr<TestMaps_MUint32Entry_DoNotUse> entry;
  3755. for (::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3756. it = this->m_uint32().begin();
  3757. it != this->m_uint32().end(); ++it) {
  3758. entry.reset(m_uint32_.NewEntryWrapper(
  3759. it->first, it->second));
  3760. target = ::google::protobuf::internal::WireFormatLite::
  3761. InternalWriteMessageNoVirtualToArray(
  3762. 3, *entry, deterministic, target);
  3763. ;
  3764. if (entry->GetArena() != NULL) {
  3765. entry.release();
  3766. }
  3767. }
  3768. }
  3769. }
  3770. // map<uint64, .protobuf_unittest.TestIntIntMap> m_uint64 = 4;
  3771. if (!this->m_uint64().empty()) {
  3772. typedef ::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3773. ConstPtr;
  3774. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::uint64, ConstPtr > SortItem;
  3775. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3776. if (deterministic &&
  3777. this->m_uint64().size() > 1) {
  3778. ::std::unique_ptr<SortItem[]> items(
  3779. new SortItem[this->m_uint64().size()]);
  3780. typedef ::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3781. size_type n = 0;
  3782. for (::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3783. it = this->m_uint64().begin();
  3784. it != this->m_uint64().end(); ++it, ++n) {
  3785. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3786. }
  3787. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3788. ::std::unique_ptr<TestMaps_MUint64Entry_DoNotUse> entry;
  3789. for (size_type i = 0; i < n; i++) {
  3790. entry.reset(m_uint64_.NewEntryWrapper(
  3791. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3792. target = ::google::protobuf::internal::WireFormatLite::
  3793. InternalWriteMessageNoVirtualToArray(
  3794. 4, *entry, deterministic, target);
  3795. ;
  3796. if (entry->GetArena() != NULL) {
  3797. entry.release();
  3798. }
  3799. }
  3800. } else {
  3801. ::std::unique_ptr<TestMaps_MUint64Entry_DoNotUse> entry;
  3802. for (::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3803. it = this->m_uint64().begin();
  3804. it != this->m_uint64().end(); ++it) {
  3805. entry.reset(m_uint64_.NewEntryWrapper(
  3806. it->first, it->second));
  3807. target = ::google::protobuf::internal::WireFormatLite::
  3808. InternalWriteMessageNoVirtualToArray(
  3809. 4, *entry, deterministic, target);
  3810. ;
  3811. if (entry->GetArena() != NULL) {
  3812. entry.release();
  3813. }
  3814. }
  3815. }
  3816. }
  3817. // map<sint32, .protobuf_unittest.TestIntIntMap> m_sint32 = 5;
  3818. if (!this->m_sint32().empty()) {
  3819. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3820. ConstPtr;
  3821. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  3822. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3823. if (deterministic &&
  3824. this->m_sint32().size() > 1) {
  3825. ::std::unique_ptr<SortItem[]> items(
  3826. new SortItem[this->m_sint32().size()]);
  3827. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3828. size_type n = 0;
  3829. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3830. it = this->m_sint32().begin();
  3831. it != this->m_sint32().end(); ++it, ++n) {
  3832. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3833. }
  3834. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3835. ::std::unique_ptr<TestMaps_MSint32Entry_DoNotUse> entry;
  3836. for (size_type i = 0; i < n; i++) {
  3837. entry.reset(m_sint32_.NewEntryWrapper(
  3838. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3839. target = ::google::protobuf::internal::WireFormatLite::
  3840. InternalWriteMessageNoVirtualToArray(
  3841. 5, *entry, deterministic, target);
  3842. ;
  3843. if (entry->GetArena() != NULL) {
  3844. entry.release();
  3845. }
  3846. }
  3847. } else {
  3848. ::std::unique_ptr<TestMaps_MSint32Entry_DoNotUse> entry;
  3849. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3850. it = this->m_sint32().begin();
  3851. it != this->m_sint32().end(); ++it) {
  3852. entry.reset(m_sint32_.NewEntryWrapper(
  3853. it->first, it->second));
  3854. target = ::google::protobuf::internal::WireFormatLite::
  3855. InternalWriteMessageNoVirtualToArray(
  3856. 5, *entry, deterministic, target);
  3857. ;
  3858. if (entry->GetArena() != NULL) {
  3859. entry.release();
  3860. }
  3861. }
  3862. }
  3863. }
  3864. // map<sint64, .protobuf_unittest.TestIntIntMap> m_sint64 = 6;
  3865. if (!this->m_sint64().empty()) {
  3866. typedef ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3867. ConstPtr;
  3868. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int64, ConstPtr > SortItem;
  3869. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3870. if (deterministic &&
  3871. this->m_sint64().size() > 1) {
  3872. ::std::unique_ptr<SortItem[]> items(
  3873. new SortItem[this->m_sint64().size()]);
  3874. typedef ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3875. size_type n = 0;
  3876. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3877. it = this->m_sint64().begin();
  3878. it != this->m_sint64().end(); ++it, ++n) {
  3879. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3880. }
  3881. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3882. ::std::unique_ptr<TestMaps_MSint64Entry_DoNotUse> entry;
  3883. for (size_type i = 0; i < n; i++) {
  3884. entry.reset(m_sint64_.NewEntryWrapper(
  3885. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3886. target = ::google::protobuf::internal::WireFormatLite::
  3887. InternalWriteMessageNoVirtualToArray(
  3888. 6, *entry, deterministic, target);
  3889. ;
  3890. if (entry->GetArena() != NULL) {
  3891. entry.release();
  3892. }
  3893. }
  3894. } else {
  3895. ::std::unique_ptr<TestMaps_MSint64Entry_DoNotUse> entry;
  3896. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3897. it = this->m_sint64().begin();
  3898. it != this->m_sint64().end(); ++it) {
  3899. entry.reset(m_sint64_.NewEntryWrapper(
  3900. it->first, it->second));
  3901. target = ::google::protobuf::internal::WireFormatLite::
  3902. InternalWriteMessageNoVirtualToArray(
  3903. 6, *entry, deterministic, target);
  3904. ;
  3905. if (entry->GetArena() != NULL) {
  3906. entry.release();
  3907. }
  3908. }
  3909. }
  3910. }
  3911. // map<fixed32, .protobuf_unittest.TestIntIntMap> m_fixed32 = 7;
  3912. if (!this->m_fixed32().empty()) {
  3913. typedef ::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3914. ConstPtr;
  3915. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::uint32, ConstPtr > SortItem;
  3916. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3917. if (deterministic &&
  3918. this->m_fixed32().size() > 1) {
  3919. ::std::unique_ptr<SortItem[]> items(
  3920. new SortItem[this->m_fixed32().size()]);
  3921. typedef ::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3922. size_type n = 0;
  3923. for (::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3924. it = this->m_fixed32().begin();
  3925. it != this->m_fixed32().end(); ++it, ++n) {
  3926. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3927. }
  3928. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3929. ::std::unique_ptr<TestMaps_MFixed32Entry_DoNotUse> entry;
  3930. for (size_type i = 0; i < n; i++) {
  3931. entry.reset(m_fixed32_.NewEntryWrapper(
  3932. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3933. target = ::google::protobuf::internal::WireFormatLite::
  3934. InternalWriteMessageNoVirtualToArray(
  3935. 7, *entry, deterministic, target);
  3936. ;
  3937. if (entry->GetArena() != NULL) {
  3938. entry.release();
  3939. }
  3940. }
  3941. } else {
  3942. ::std::unique_ptr<TestMaps_MFixed32Entry_DoNotUse> entry;
  3943. for (::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3944. it = this->m_fixed32().begin();
  3945. it != this->m_fixed32().end(); ++it) {
  3946. entry.reset(m_fixed32_.NewEntryWrapper(
  3947. it->first, it->second));
  3948. target = ::google::protobuf::internal::WireFormatLite::
  3949. InternalWriteMessageNoVirtualToArray(
  3950. 7, *entry, deterministic, target);
  3951. ;
  3952. if (entry->GetArena() != NULL) {
  3953. entry.release();
  3954. }
  3955. }
  3956. }
  3957. }
  3958. // map<fixed64, .protobuf_unittest.TestIntIntMap> m_fixed64 = 8;
  3959. if (!this->m_fixed64().empty()) {
  3960. typedef ::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::const_pointer
  3961. ConstPtr;
  3962. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::uint64, ConstPtr > SortItem;
  3963. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  3964. if (deterministic &&
  3965. this->m_fixed64().size() > 1) {
  3966. ::std::unique_ptr<SortItem[]> items(
  3967. new SortItem[this->m_fixed64().size()]);
  3968. typedef ::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  3969. size_type n = 0;
  3970. for (::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3971. it = this->m_fixed64().begin();
  3972. it != this->m_fixed64().end(); ++it, ++n) {
  3973. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  3974. }
  3975. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  3976. ::std::unique_ptr<TestMaps_MFixed64Entry_DoNotUse> entry;
  3977. for (size_type i = 0; i < n; i++) {
  3978. entry.reset(m_fixed64_.NewEntryWrapper(
  3979. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  3980. target = ::google::protobuf::internal::WireFormatLite::
  3981. InternalWriteMessageNoVirtualToArray(
  3982. 8, *entry, deterministic, target);
  3983. ;
  3984. if (entry->GetArena() != NULL) {
  3985. entry.release();
  3986. }
  3987. }
  3988. } else {
  3989. ::std::unique_ptr<TestMaps_MFixed64Entry_DoNotUse> entry;
  3990. for (::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  3991. it = this->m_fixed64().begin();
  3992. it != this->m_fixed64().end(); ++it) {
  3993. entry.reset(m_fixed64_.NewEntryWrapper(
  3994. it->first, it->second));
  3995. target = ::google::protobuf::internal::WireFormatLite::
  3996. InternalWriteMessageNoVirtualToArray(
  3997. 8, *entry, deterministic, target);
  3998. ;
  3999. if (entry->GetArena() != NULL) {
  4000. entry.release();
  4001. }
  4002. }
  4003. }
  4004. }
  4005. // map<sfixed32, .protobuf_unittest.TestIntIntMap> m_sfixed32 = 9;
  4006. if (!this->m_sfixed32().empty()) {
  4007. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_pointer
  4008. ConstPtr;
  4009. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
  4010. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  4011. if (deterministic &&
  4012. this->m_sfixed32().size() > 1) {
  4013. ::std::unique_ptr<SortItem[]> items(
  4014. new SortItem[this->m_sfixed32().size()]);
  4015. typedef ::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  4016. size_type n = 0;
  4017. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4018. it = this->m_sfixed32().begin();
  4019. it != this->m_sfixed32().end(); ++it, ++n) {
  4020. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  4021. }
  4022. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  4023. ::std::unique_ptr<TestMaps_MSfixed32Entry_DoNotUse> entry;
  4024. for (size_type i = 0; i < n; i++) {
  4025. entry.reset(m_sfixed32_.NewEntryWrapper(
  4026. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  4027. target = ::google::protobuf::internal::WireFormatLite::
  4028. InternalWriteMessageNoVirtualToArray(
  4029. 9, *entry, deterministic, target);
  4030. ;
  4031. if (entry->GetArena() != NULL) {
  4032. entry.release();
  4033. }
  4034. }
  4035. } else {
  4036. ::std::unique_ptr<TestMaps_MSfixed32Entry_DoNotUse> entry;
  4037. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4038. it = this->m_sfixed32().begin();
  4039. it != this->m_sfixed32().end(); ++it) {
  4040. entry.reset(m_sfixed32_.NewEntryWrapper(
  4041. it->first, it->second));
  4042. target = ::google::protobuf::internal::WireFormatLite::
  4043. InternalWriteMessageNoVirtualToArray(
  4044. 9, *entry, deterministic, target);
  4045. ;
  4046. if (entry->GetArena() != NULL) {
  4047. entry.release();
  4048. }
  4049. }
  4050. }
  4051. }
  4052. // map<sfixed64, .protobuf_unittest.TestIntIntMap> m_sfixed64 = 10;
  4053. if (!this->m_sfixed64().empty()) {
  4054. typedef ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_pointer
  4055. ConstPtr;
  4056. typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int64, ConstPtr > SortItem;
  4057. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  4058. if (deterministic &&
  4059. this->m_sfixed64().size() > 1) {
  4060. ::std::unique_ptr<SortItem[]> items(
  4061. new SortItem[this->m_sfixed64().size()]);
  4062. typedef ::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  4063. size_type n = 0;
  4064. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4065. it = this->m_sfixed64().begin();
  4066. it != this->m_sfixed64().end(); ++it, ++n) {
  4067. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  4068. }
  4069. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  4070. ::std::unique_ptr<TestMaps_MSfixed64Entry_DoNotUse> entry;
  4071. for (size_type i = 0; i < n; i++) {
  4072. entry.reset(m_sfixed64_.NewEntryWrapper(
  4073. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  4074. target = ::google::protobuf::internal::WireFormatLite::
  4075. InternalWriteMessageNoVirtualToArray(
  4076. 10, *entry, deterministic, target);
  4077. ;
  4078. if (entry->GetArena() != NULL) {
  4079. entry.release();
  4080. }
  4081. }
  4082. } else {
  4083. ::std::unique_ptr<TestMaps_MSfixed64Entry_DoNotUse> entry;
  4084. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4085. it = this->m_sfixed64().begin();
  4086. it != this->m_sfixed64().end(); ++it) {
  4087. entry.reset(m_sfixed64_.NewEntryWrapper(
  4088. it->first, it->second));
  4089. target = ::google::protobuf::internal::WireFormatLite::
  4090. InternalWriteMessageNoVirtualToArray(
  4091. 10, *entry, deterministic, target);
  4092. ;
  4093. if (entry->GetArena() != NULL) {
  4094. entry.release();
  4095. }
  4096. }
  4097. }
  4098. }
  4099. // map<bool, .protobuf_unittest.TestIntIntMap> m_bool = 11;
  4100. if (!this->m_bool().empty()) {
  4101. typedef ::google::protobuf::Map< bool, ::protobuf_unittest::TestIntIntMap >::const_pointer
  4102. ConstPtr;
  4103. typedef ::google::protobuf::internal::SortItem< bool, ConstPtr > SortItem;
  4104. typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
  4105. if (deterministic &&
  4106. this->m_bool().size() > 1) {
  4107. ::std::unique_ptr<SortItem[]> items(
  4108. new SortItem[this->m_bool().size()]);
  4109. typedef ::google::protobuf::Map< bool, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  4110. size_type n = 0;
  4111. for (::google::protobuf::Map< bool, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4112. it = this->m_bool().begin();
  4113. it != this->m_bool().end(); ++it, ++n) {
  4114. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  4115. }
  4116. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  4117. ::std::unique_ptr<TestMaps_MBoolEntry_DoNotUse> entry;
  4118. for (size_type i = 0; i < n; i++) {
  4119. entry.reset(m_bool_.NewEntryWrapper(
  4120. items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
  4121. target = ::google::protobuf::internal::WireFormatLite::
  4122. InternalWriteMessageNoVirtualToArray(
  4123. 11, *entry, deterministic, target);
  4124. ;
  4125. if (entry->GetArena() != NULL) {
  4126. entry.release();
  4127. }
  4128. }
  4129. } else {
  4130. ::std::unique_ptr<TestMaps_MBoolEntry_DoNotUse> entry;
  4131. for (::google::protobuf::Map< bool, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4132. it = this->m_bool().begin();
  4133. it != this->m_bool().end(); ++it) {
  4134. entry.reset(m_bool_.NewEntryWrapper(
  4135. it->first, it->second));
  4136. target = ::google::protobuf::internal::WireFormatLite::
  4137. InternalWriteMessageNoVirtualToArray(
  4138. 11, *entry, deterministic, target);
  4139. ;
  4140. if (entry->GetArena() != NULL) {
  4141. entry.release();
  4142. }
  4143. }
  4144. }
  4145. }
  4146. // map<string, .protobuf_unittest.TestIntIntMap> m_string = 12;
  4147. if (!this->m_string().empty()) {
  4148. typedef ::google::protobuf::Map< ::std::string, ::protobuf_unittest::TestIntIntMap >::const_pointer
  4149. ConstPtr;
  4150. typedef ConstPtr SortItem;
  4151. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  4152. struct Utf8Check {
  4153. static void Check(ConstPtr p) {
  4154. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  4155. p->first.data(), static_cast<int>(p->first.length()),
  4156. ::google::protobuf::internal::WireFormat::SERIALIZE,
  4157. "protobuf_unittest.TestMaps.MStringEntry.key");
  4158. }
  4159. };
  4160. if (deterministic &&
  4161. this->m_string().size() > 1) {
  4162. ::std::unique_ptr<SortItem[]> items(
  4163. new SortItem[this->m_string().size()]);
  4164. typedef ::google::protobuf::Map< ::std::string, ::protobuf_unittest::TestIntIntMap >::size_type size_type;
  4165. size_type n = 0;
  4166. for (::google::protobuf::Map< ::std::string, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4167. it = this->m_string().begin();
  4168. it != this->m_string().end(); ++it, ++n) {
  4169. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  4170. }
  4171. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  4172. ::std::unique_ptr<TestMaps_MStringEntry_DoNotUse> entry;
  4173. for (size_type i = 0; i < n; i++) {
  4174. entry.reset(m_string_.NewEntryWrapper(
  4175. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  4176. target = ::google::protobuf::internal::WireFormatLite::
  4177. InternalWriteMessageNoVirtualToArray(
  4178. 12, *entry, deterministic, target);
  4179. ;
  4180. if (entry->GetArena() != NULL) {
  4181. entry.release();
  4182. }
  4183. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  4184. }
  4185. } else {
  4186. ::std::unique_ptr<TestMaps_MStringEntry_DoNotUse> entry;
  4187. for (::google::protobuf::Map< ::std::string, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4188. it = this->m_string().begin();
  4189. it != this->m_string().end(); ++it) {
  4190. entry.reset(m_string_.NewEntryWrapper(
  4191. it->first, it->second));
  4192. target = ::google::protobuf::internal::WireFormatLite::
  4193. InternalWriteMessageNoVirtualToArray(
  4194. 12, *entry, deterministic, target);
  4195. ;
  4196. if (entry->GetArena() != NULL) {
  4197. entry.release();
  4198. }
  4199. Utf8Check::Check(&*it);
  4200. }
  4201. }
  4202. }
  4203. if (_internal_metadata_.have_unknown_fields()) {
  4204. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4205. _internal_metadata_.unknown_fields(), target);
  4206. }
  4207. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestMaps)
  4208. return target;
  4209. }
  4210. size_t TestMaps::ByteSizeLong() const {
  4211. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestMaps)
  4212. size_t total_size = 0;
  4213. if (_internal_metadata_.have_unknown_fields()) {
  4214. total_size +=
  4215. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4216. _internal_metadata_.unknown_fields());
  4217. }
  4218. // map<int32, .protobuf_unittest.TestIntIntMap> m_int32 = 1;
  4219. total_size += 1 *
  4220. ::google::protobuf::internal::FromIntSize(this->m_int32_size());
  4221. {
  4222. ::std::unique_ptr<TestMaps_MInt32Entry_DoNotUse> entry;
  4223. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4224. it = this->m_int32().begin();
  4225. it != this->m_int32().end(); ++it) {
  4226. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4227. entry.release();
  4228. }
  4229. entry.reset(m_int32_.NewEntryWrapper(it->first, it->second));
  4230. total_size += ::google::protobuf::internal::WireFormatLite::
  4231. MessageSizeNoVirtual(*entry);
  4232. }
  4233. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4234. entry.release();
  4235. }
  4236. }
  4237. // map<int64, .protobuf_unittest.TestIntIntMap> m_int64 = 2;
  4238. total_size += 1 *
  4239. ::google::protobuf::internal::FromIntSize(this->m_int64_size());
  4240. {
  4241. ::std::unique_ptr<TestMaps_MInt64Entry_DoNotUse> entry;
  4242. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4243. it = this->m_int64().begin();
  4244. it != this->m_int64().end(); ++it) {
  4245. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4246. entry.release();
  4247. }
  4248. entry.reset(m_int64_.NewEntryWrapper(it->first, it->second));
  4249. total_size += ::google::protobuf::internal::WireFormatLite::
  4250. MessageSizeNoVirtual(*entry);
  4251. }
  4252. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4253. entry.release();
  4254. }
  4255. }
  4256. // map<uint32, .protobuf_unittest.TestIntIntMap> m_uint32 = 3;
  4257. total_size += 1 *
  4258. ::google::protobuf::internal::FromIntSize(this->m_uint32_size());
  4259. {
  4260. ::std::unique_ptr<TestMaps_MUint32Entry_DoNotUse> entry;
  4261. for (::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4262. it = this->m_uint32().begin();
  4263. it != this->m_uint32().end(); ++it) {
  4264. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4265. entry.release();
  4266. }
  4267. entry.reset(m_uint32_.NewEntryWrapper(it->first, it->second));
  4268. total_size += ::google::protobuf::internal::WireFormatLite::
  4269. MessageSizeNoVirtual(*entry);
  4270. }
  4271. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4272. entry.release();
  4273. }
  4274. }
  4275. // map<uint64, .protobuf_unittest.TestIntIntMap> m_uint64 = 4;
  4276. total_size += 1 *
  4277. ::google::protobuf::internal::FromIntSize(this->m_uint64_size());
  4278. {
  4279. ::std::unique_ptr<TestMaps_MUint64Entry_DoNotUse> entry;
  4280. for (::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4281. it = this->m_uint64().begin();
  4282. it != this->m_uint64().end(); ++it) {
  4283. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4284. entry.release();
  4285. }
  4286. entry.reset(m_uint64_.NewEntryWrapper(it->first, it->second));
  4287. total_size += ::google::protobuf::internal::WireFormatLite::
  4288. MessageSizeNoVirtual(*entry);
  4289. }
  4290. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4291. entry.release();
  4292. }
  4293. }
  4294. // map<sint32, .protobuf_unittest.TestIntIntMap> m_sint32 = 5;
  4295. total_size += 1 *
  4296. ::google::protobuf::internal::FromIntSize(this->m_sint32_size());
  4297. {
  4298. ::std::unique_ptr<TestMaps_MSint32Entry_DoNotUse> entry;
  4299. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4300. it = this->m_sint32().begin();
  4301. it != this->m_sint32().end(); ++it) {
  4302. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4303. entry.release();
  4304. }
  4305. entry.reset(m_sint32_.NewEntryWrapper(it->first, it->second));
  4306. total_size += ::google::protobuf::internal::WireFormatLite::
  4307. MessageSizeNoVirtual(*entry);
  4308. }
  4309. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4310. entry.release();
  4311. }
  4312. }
  4313. // map<sint64, .protobuf_unittest.TestIntIntMap> m_sint64 = 6;
  4314. total_size += 1 *
  4315. ::google::protobuf::internal::FromIntSize(this->m_sint64_size());
  4316. {
  4317. ::std::unique_ptr<TestMaps_MSint64Entry_DoNotUse> entry;
  4318. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4319. it = this->m_sint64().begin();
  4320. it != this->m_sint64().end(); ++it) {
  4321. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4322. entry.release();
  4323. }
  4324. entry.reset(m_sint64_.NewEntryWrapper(it->first, it->second));
  4325. total_size += ::google::protobuf::internal::WireFormatLite::
  4326. MessageSizeNoVirtual(*entry);
  4327. }
  4328. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4329. entry.release();
  4330. }
  4331. }
  4332. // map<fixed32, .protobuf_unittest.TestIntIntMap> m_fixed32 = 7;
  4333. total_size += 1 *
  4334. ::google::protobuf::internal::FromIntSize(this->m_fixed32_size());
  4335. {
  4336. ::std::unique_ptr<TestMaps_MFixed32Entry_DoNotUse> entry;
  4337. for (::google::protobuf::Map< ::google::protobuf::uint32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4338. it = this->m_fixed32().begin();
  4339. it != this->m_fixed32().end(); ++it) {
  4340. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4341. entry.release();
  4342. }
  4343. entry.reset(m_fixed32_.NewEntryWrapper(it->first, it->second));
  4344. total_size += ::google::protobuf::internal::WireFormatLite::
  4345. MessageSizeNoVirtual(*entry);
  4346. }
  4347. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4348. entry.release();
  4349. }
  4350. }
  4351. // map<fixed64, .protobuf_unittest.TestIntIntMap> m_fixed64 = 8;
  4352. total_size += 1 *
  4353. ::google::protobuf::internal::FromIntSize(this->m_fixed64_size());
  4354. {
  4355. ::std::unique_ptr<TestMaps_MFixed64Entry_DoNotUse> entry;
  4356. for (::google::protobuf::Map< ::google::protobuf::uint64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4357. it = this->m_fixed64().begin();
  4358. it != this->m_fixed64().end(); ++it) {
  4359. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4360. entry.release();
  4361. }
  4362. entry.reset(m_fixed64_.NewEntryWrapper(it->first, it->second));
  4363. total_size += ::google::protobuf::internal::WireFormatLite::
  4364. MessageSizeNoVirtual(*entry);
  4365. }
  4366. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4367. entry.release();
  4368. }
  4369. }
  4370. // map<sfixed32, .protobuf_unittest.TestIntIntMap> m_sfixed32 = 9;
  4371. total_size += 1 *
  4372. ::google::protobuf::internal::FromIntSize(this->m_sfixed32_size());
  4373. {
  4374. ::std::unique_ptr<TestMaps_MSfixed32Entry_DoNotUse> entry;
  4375. for (::google::protobuf::Map< ::google::protobuf::int32, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4376. it = this->m_sfixed32().begin();
  4377. it != this->m_sfixed32().end(); ++it) {
  4378. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4379. entry.release();
  4380. }
  4381. entry.reset(m_sfixed32_.NewEntryWrapper(it->first, it->second));
  4382. total_size += ::google::protobuf::internal::WireFormatLite::
  4383. MessageSizeNoVirtual(*entry);
  4384. }
  4385. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4386. entry.release();
  4387. }
  4388. }
  4389. // map<sfixed64, .protobuf_unittest.TestIntIntMap> m_sfixed64 = 10;
  4390. total_size += 1 *
  4391. ::google::protobuf::internal::FromIntSize(this->m_sfixed64_size());
  4392. {
  4393. ::std::unique_ptr<TestMaps_MSfixed64Entry_DoNotUse> entry;
  4394. for (::google::protobuf::Map< ::google::protobuf::int64, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4395. it = this->m_sfixed64().begin();
  4396. it != this->m_sfixed64().end(); ++it) {
  4397. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4398. entry.release();
  4399. }
  4400. entry.reset(m_sfixed64_.NewEntryWrapper(it->first, it->second));
  4401. total_size += ::google::protobuf::internal::WireFormatLite::
  4402. MessageSizeNoVirtual(*entry);
  4403. }
  4404. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4405. entry.release();
  4406. }
  4407. }
  4408. // map<bool, .protobuf_unittest.TestIntIntMap> m_bool = 11;
  4409. total_size += 1 *
  4410. ::google::protobuf::internal::FromIntSize(this->m_bool_size());
  4411. {
  4412. ::std::unique_ptr<TestMaps_MBoolEntry_DoNotUse> entry;
  4413. for (::google::protobuf::Map< bool, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4414. it = this->m_bool().begin();
  4415. it != this->m_bool().end(); ++it) {
  4416. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4417. entry.release();
  4418. }
  4419. entry.reset(m_bool_.NewEntryWrapper(it->first, it->second));
  4420. total_size += ::google::protobuf::internal::WireFormatLite::
  4421. MessageSizeNoVirtual(*entry);
  4422. }
  4423. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4424. entry.release();
  4425. }
  4426. }
  4427. // map<string, .protobuf_unittest.TestIntIntMap> m_string = 12;
  4428. total_size += 1 *
  4429. ::google::protobuf::internal::FromIntSize(this->m_string_size());
  4430. {
  4431. ::std::unique_ptr<TestMaps_MStringEntry_DoNotUse> entry;
  4432. for (::google::protobuf::Map< ::std::string, ::protobuf_unittest::TestIntIntMap >::const_iterator
  4433. it = this->m_string().begin();
  4434. it != this->m_string().end(); ++it) {
  4435. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4436. entry.release();
  4437. }
  4438. entry.reset(m_string_.NewEntryWrapper(it->first, it->second));
  4439. total_size += ::google::protobuf::internal::WireFormatLite::
  4440. MessageSizeNoVirtual(*entry);
  4441. }
  4442. if (entry.get() != NULL && entry->GetArena() != NULL) {
  4443. entry.release();
  4444. }
  4445. }
  4446. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4447. SetCachedSize(cached_size);
  4448. return total_size;
  4449. }
  4450. void TestMaps::MergeFrom(const ::google::protobuf::Message& from) {
  4451. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestMaps)
  4452. GOOGLE_DCHECK_NE(&from, this);
  4453. const TestMaps* source =
  4454. ::google::protobuf::internal::DynamicCastToGenerated<const TestMaps>(
  4455. &from);
  4456. if (source == NULL) {
  4457. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestMaps)
  4458. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4459. } else {
  4460. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestMaps)
  4461. MergeFrom(*source);
  4462. }
  4463. }
  4464. void TestMaps::MergeFrom(const TestMaps& from) {
  4465. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestMaps)
  4466. GOOGLE_DCHECK_NE(&from, this);
  4467. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4468. ::google::protobuf::uint32 cached_has_bits = 0;
  4469. (void) cached_has_bits;
  4470. m_int32_.MergeFrom(from.m_int32_);
  4471. m_int64_.MergeFrom(from.m_int64_);
  4472. m_uint32_.MergeFrom(from.m_uint32_);
  4473. m_uint64_.MergeFrom(from.m_uint64_);
  4474. m_sint32_.MergeFrom(from.m_sint32_);
  4475. m_sint64_.MergeFrom(from.m_sint64_);
  4476. m_fixed32_.MergeFrom(from.m_fixed32_);
  4477. m_fixed64_.MergeFrom(from.m_fixed64_);
  4478. m_sfixed32_.MergeFrom(from.m_sfixed32_);
  4479. m_sfixed64_.MergeFrom(from.m_sfixed64_);
  4480. m_bool_.MergeFrom(from.m_bool_);
  4481. m_string_.MergeFrom(from.m_string_);
  4482. }
  4483. void TestMaps::CopyFrom(const ::google::protobuf::Message& from) {
  4484. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestMaps)
  4485. if (&from == this) return;
  4486. Clear();
  4487. MergeFrom(from);
  4488. }
  4489. void TestMaps::CopyFrom(const TestMaps& from) {
  4490. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestMaps)
  4491. if (&from == this) return;
  4492. Clear();
  4493. MergeFrom(from);
  4494. }
  4495. bool TestMaps::IsInitialized() const {
  4496. return true;
  4497. }
  4498. void TestMaps::Swap(TestMaps* other) {
  4499. if (other == this) return;
  4500. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  4501. InternalSwap(other);
  4502. } else {
  4503. TestMaps* temp = New(GetArenaNoVirtual());
  4504. temp->MergeFrom(*other);
  4505. other->CopyFrom(*this);
  4506. InternalSwap(temp);
  4507. if (GetArenaNoVirtual() == NULL) {
  4508. delete temp;
  4509. }
  4510. }
  4511. }
  4512. void TestMaps::UnsafeArenaSwap(TestMaps* other) {
  4513. if (other == this) return;
  4514. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  4515. InternalSwap(other);
  4516. }
  4517. void TestMaps::InternalSwap(TestMaps* other) {
  4518. using std::swap;
  4519. m_int32_.Swap(&other->m_int32_);
  4520. m_int64_.Swap(&other->m_int64_);
  4521. m_uint32_.Swap(&other->m_uint32_);
  4522. m_uint64_.Swap(&other->m_uint64_);
  4523. m_sint32_.Swap(&other->m_sint32_);
  4524. m_sint64_.Swap(&other->m_sint64_);
  4525. m_fixed32_.Swap(&other->m_fixed32_);
  4526. m_fixed64_.Swap(&other->m_fixed64_);
  4527. m_sfixed32_.Swap(&other->m_sfixed32_);
  4528. m_sfixed64_.Swap(&other->m_sfixed64_);
  4529. m_bool_.Swap(&other->m_bool_);
  4530. m_string_.Swap(&other->m_string_);
  4531. swap(_has_bits_[0], other->_has_bits_[0]);
  4532. _internal_metadata_.Swap(&other->_internal_metadata_);
  4533. }
  4534. ::google::protobuf::Metadata TestMaps::GetMetadata() const {
  4535. protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  4536. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  4537. }
  4538. // ===================================================================
  4539. void TestSubmessageMaps::InitAsDefaultInstance() {
  4540. ::protobuf_unittest::_TestSubmessageMaps_default_instance_._instance.get_mutable()->m_ = const_cast< ::protobuf_unittest::TestMaps*>(
  4541. ::protobuf_unittest::TestMaps::internal_default_instance());
  4542. }
  4543. void TestSubmessageMaps::unsafe_arena_set_allocated_m(
  4544. ::protobuf_unittest::TestMaps* m) {
  4545. if (GetArenaNoVirtual() == NULL) {
  4546. delete m_;
  4547. }
  4548. m_ = m;
  4549. if (m) {
  4550. set_has_m();
  4551. } else {
  4552. clear_has_m();
  4553. }
  4554. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protobuf_unittest.TestSubmessageMaps.m)
  4555. }
  4556. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4557. const int TestSubmessageMaps::kMFieldNumber;
  4558. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4559. TestSubmessageMaps::TestSubmessageMaps()
  4560. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4561. ::google::protobuf::internal::InitSCC(
  4562. &protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestSubmessageMaps.base);
  4563. SharedCtor();
  4564. // @@protoc_insertion_point(constructor:protobuf_unittest.TestSubmessageMaps)
  4565. }
  4566. TestSubmessageMaps::TestSubmessageMaps(::google::protobuf::Arena* arena)
  4567. : ::google::protobuf::Message(),
  4568. _internal_metadata_(arena) {
  4569. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestSubmessageMaps.base);
  4570. SharedCtor();
  4571. RegisterArenaDtor(arena);
  4572. // @@protoc_insertion_point(arena_constructor:protobuf_unittest.TestSubmessageMaps)
  4573. }
  4574. TestSubmessageMaps::TestSubmessageMaps(const TestSubmessageMaps& from)
  4575. : ::google::protobuf::Message(),
  4576. _internal_metadata_(NULL),
  4577. _has_bits_(from._has_bits_) {
  4578. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4579. if (from.has_m()) {
  4580. m_ = new ::protobuf_unittest::TestMaps(*from.m_);
  4581. } else {
  4582. m_ = NULL;
  4583. }
  4584. // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestSubmessageMaps)
  4585. }
  4586. void TestSubmessageMaps::SharedCtor() {
  4587. m_ = NULL;
  4588. }
  4589. TestSubmessageMaps::~TestSubmessageMaps() {
  4590. // @@protoc_insertion_point(destructor:protobuf_unittest.TestSubmessageMaps)
  4591. SharedDtor();
  4592. }
  4593. void TestSubmessageMaps::SharedDtor() {
  4594. GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
  4595. if (this != internal_default_instance()) delete m_;
  4596. }
  4597. void TestSubmessageMaps::ArenaDtor(void* object) {
  4598. TestSubmessageMaps* _this = reinterpret_cast< TestSubmessageMaps* >(object);
  4599. (void)_this;
  4600. }
  4601. void TestSubmessageMaps::RegisterArenaDtor(::google::protobuf::Arena* arena) {
  4602. }
  4603. void TestSubmessageMaps::SetCachedSize(int size) const {
  4604. _cached_size_.Set(size);
  4605. }
  4606. const ::google::protobuf::Descriptor* TestSubmessageMaps::descriptor() {
  4607. ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  4608. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4609. }
  4610. const TestSubmessageMaps& TestSubmessageMaps::default_instance() {
  4611. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::scc_info_TestSubmessageMaps.base);
  4612. return *internal_default_instance();
  4613. }
  4614. void TestSubmessageMaps::Clear() {
  4615. // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestSubmessageMaps)
  4616. ::google::protobuf::uint32 cached_has_bits = 0;
  4617. // Prevent compiler warnings about cached_has_bits being unused
  4618. (void) cached_has_bits;
  4619. cached_has_bits = _has_bits_[0];
  4620. if (cached_has_bits & 0x00000001u) {
  4621. GOOGLE_DCHECK(m_ != NULL);
  4622. m_->Clear();
  4623. }
  4624. _has_bits_.Clear();
  4625. _internal_metadata_.Clear();
  4626. }
  4627. bool TestSubmessageMaps::MergePartialFromCodedStream(
  4628. ::google::protobuf::io::CodedInputStream* input) {
  4629. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4630. ::google::protobuf::uint32 tag;
  4631. // @@protoc_insertion_point(parse_start:protobuf_unittest.TestSubmessageMaps)
  4632. for (;;) {
  4633. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4634. tag = p.first;
  4635. if (!p.second) goto handle_unusual;
  4636. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4637. // optional .protobuf_unittest.TestMaps m = 1;
  4638. case 1: {
  4639. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4640. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4641. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4642. input, mutable_m()));
  4643. } else {
  4644. goto handle_unusual;
  4645. }
  4646. break;
  4647. }
  4648. default: {
  4649. handle_unusual:
  4650. if (tag == 0) {
  4651. goto success;
  4652. }
  4653. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4654. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4655. break;
  4656. }
  4657. }
  4658. }
  4659. success:
  4660. // @@protoc_insertion_point(parse_success:protobuf_unittest.TestSubmessageMaps)
  4661. return true;
  4662. failure:
  4663. // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestSubmessageMaps)
  4664. return false;
  4665. #undef DO_
  4666. }
  4667. void TestSubmessageMaps::SerializeWithCachedSizes(
  4668. ::google::protobuf::io::CodedOutputStream* output) const {
  4669. // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestSubmessageMaps)
  4670. ::google::protobuf::uint32 cached_has_bits = 0;
  4671. (void) cached_has_bits;
  4672. cached_has_bits = _has_bits_[0];
  4673. // optional .protobuf_unittest.TestMaps m = 1;
  4674. if (cached_has_bits & 0x00000001u) {
  4675. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4676. 1, this->_internal_m(), output);
  4677. }
  4678. if (_internal_metadata_.have_unknown_fields()) {
  4679. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4680. _internal_metadata_.unknown_fields(), output);
  4681. }
  4682. // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestSubmessageMaps)
  4683. }
  4684. ::google::protobuf::uint8* TestSubmessageMaps::InternalSerializeWithCachedSizesToArray(
  4685. bool deterministic, ::google::protobuf::uint8* target) const {
  4686. (void)deterministic; // Unused
  4687. // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestSubmessageMaps)
  4688. ::google::protobuf::uint32 cached_has_bits = 0;
  4689. (void) cached_has_bits;
  4690. cached_has_bits = _has_bits_[0];
  4691. // optional .protobuf_unittest.TestMaps m = 1;
  4692. if (cached_has_bits & 0x00000001u) {
  4693. target = ::google::protobuf::internal::WireFormatLite::
  4694. InternalWriteMessageToArray(
  4695. 1, this->_internal_m(), deterministic, target);
  4696. }
  4697. if (_internal_metadata_.have_unknown_fields()) {
  4698. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4699. _internal_metadata_.unknown_fields(), target);
  4700. }
  4701. // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestSubmessageMaps)
  4702. return target;
  4703. }
  4704. size_t TestSubmessageMaps::ByteSizeLong() const {
  4705. // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestSubmessageMaps)
  4706. size_t total_size = 0;
  4707. if (_internal_metadata_.have_unknown_fields()) {
  4708. total_size +=
  4709. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4710. _internal_metadata_.unknown_fields());
  4711. }
  4712. // optional .protobuf_unittest.TestMaps m = 1;
  4713. if (has_m()) {
  4714. total_size += 1 +
  4715. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4716. *m_);
  4717. }
  4718. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4719. SetCachedSize(cached_size);
  4720. return total_size;
  4721. }
  4722. void TestSubmessageMaps::MergeFrom(const ::google::protobuf::Message& from) {
  4723. // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestSubmessageMaps)
  4724. GOOGLE_DCHECK_NE(&from, this);
  4725. const TestSubmessageMaps* source =
  4726. ::google::protobuf::internal::DynamicCastToGenerated<const TestSubmessageMaps>(
  4727. &from);
  4728. if (source == NULL) {
  4729. // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestSubmessageMaps)
  4730. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4731. } else {
  4732. // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestSubmessageMaps)
  4733. MergeFrom(*source);
  4734. }
  4735. }
  4736. void TestSubmessageMaps::MergeFrom(const TestSubmessageMaps& from) {
  4737. // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestSubmessageMaps)
  4738. GOOGLE_DCHECK_NE(&from, this);
  4739. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4740. ::google::protobuf::uint32 cached_has_bits = 0;
  4741. (void) cached_has_bits;
  4742. if (from.has_m()) {
  4743. mutable_m()->::protobuf_unittest::TestMaps::MergeFrom(from.m());
  4744. }
  4745. }
  4746. void TestSubmessageMaps::CopyFrom(const ::google::protobuf::Message& from) {
  4747. // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestSubmessageMaps)
  4748. if (&from == this) return;
  4749. Clear();
  4750. MergeFrom(from);
  4751. }
  4752. void TestSubmessageMaps::CopyFrom(const TestSubmessageMaps& from) {
  4753. // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestSubmessageMaps)
  4754. if (&from == this) return;
  4755. Clear();
  4756. MergeFrom(from);
  4757. }
  4758. bool TestSubmessageMaps::IsInitialized() const {
  4759. return true;
  4760. }
  4761. void TestSubmessageMaps::Swap(TestSubmessageMaps* other) {
  4762. if (other == this) return;
  4763. if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
  4764. InternalSwap(other);
  4765. } else {
  4766. TestSubmessageMaps* temp = New(GetArenaNoVirtual());
  4767. temp->MergeFrom(*other);
  4768. other->CopyFrom(*this);
  4769. InternalSwap(temp);
  4770. if (GetArenaNoVirtual() == NULL) {
  4771. delete temp;
  4772. }
  4773. }
  4774. }
  4775. void TestSubmessageMaps::UnsafeArenaSwap(TestSubmessageMaps* other) {
  4776. if (other == this) return;
  4777. GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
  4778. InternalSwap(other);
  4779. }
  4780. void TestSubmessageMaps::InternalSwap(TestSubmessageMaps* other) {
  4781. using std::swap;
  4782. swap(m_, other->m_);
  4783. swap(_has_bits_[0], other->_has_bits_[0]);
  4784. _internal_metadata_.Swap(&other->_internal_metadata_);
  4785. }
  4786. ::google::protobuf::Metadata TestSubmessageMaps::GetMetadata() const {
  4787. protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
  4788. return ::protobuf_google_2fprotobuf_2fmap_5fproto2_5funittest_2eproto::file_level_metadata[kIndexInFileMessages];
  4789. }
  4790. // @@protoc_insertion_point(namespace_scope)
  4791. } // namespace protobuf_unittest
  4792. namespace google {
  4793. namespace protobuf {
  4794. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestEnumMap_KnownMapFieldEntry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestEnumMap_KnownMapFieldEntry_DoNotUse >(Arena* arena) {
  4795. return Arena::CreateMessageInternal< ::protobuf_unittest::TestEnumMap_KnownMapFieldEntry_DoNotUse >(arena);
  4796. }
  4797. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestEnumMap_UnknownMapFieldEntry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestEnumMap_UnknownMapFieldEntry_DoNotUse >(Arena* arena) {
  4798. return Arena::CreateMessageInternal< ::protobuf_unittest::TestEnumMap_UnknownMapFieldEntry_DoNotUse >(arena);
  4799. }
  4800. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestEnumMap* Arena::CreateMaybeMessage< ::protobuf_unittest::TestEnumMap >(Arena* arena) {
  4801. return Arena::CreateMessageInternal< ::protobuf_unittest::TestEnumMap >(arena);
  4802. }
  4803. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse >(Arena* arena) {
  4804. return Arena::CreateMessageInternal< ::protobuf_unittest::TestEnumMapPlusExtra_KnownMapFieldEntry_DoNotUse >(arena);
  4805. }
  4806. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse >(Arena* arena) {
  4807. return Arena::CreateMessageInternal< ::protobuf_unittest::TestEnumMapPlusExtra_UnknownMapFieldEntry_DoNotUse >(arena);
  4808. }
  4809. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestEnumMapPlusExtra* Arena::CreateMaybeMessage< ::protobuf_unittest::TestEnumMapPlusExtra >(Arena* arena) {
  4810. return Arena::CreateMessageInternal< ::protobuf_unittest::TestEnumMapPlusExtra >(arena);
  4811. }
  4812. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestImportEnumMap_ImportEnumAmpEntry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestImportEnumMap_ImportEnumAmpEntry_DoNotUse >(Arena* arena) {
  4813. return Arena::CreateMessageInternal< ::protobuf_unittest::TestImportEnumMap_ImportEnumAmpEntry_DoNotUse >(arena);
  4814. }
  4815. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestImportEnumMap* Arena::CreateMaybeMessage< ::protobuf_unittest::TestImportEnumMap >(Arena* arena) {
  4816. return Arena::CreateMessageInternal< ::protobuf_unittest::TestImportEnumMap >(arena);
  4817. }
  4818. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestIntIntMap_MEntry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestIntIntMap_MEntry_DoNotUse >(Arena* arena) {
  4819. return Arena::CreateMessageInternal< ::protobuf_unittest::TestIntIntMap_MEntry_DoNotUse >(arena);
  4820. }
  4821. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestIntIntMap* Arena::CreateMaybeMessage< ::protobuf_unittest::TestIntIntMap >(Arena* arena) {
  4822. return Arena::CreateMessageInternal< ::protobuf_unittest::TestIntIntMap >(arena);
  4823. }
  4824. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMaps_MInt32Entry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMaps_MInt32Entry_DoNotUse >(Arena* arena) {
  4825. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMaps_MInt32Entry_DoNotUse >(arena);
  4826. }
  4827. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMaps_MInt64Entry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMaps_MInt64Entry_DoNotUse >(Arena* arena) {
  4828. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMaps_MInt64Entry_DoNotUse >(arena);
  4829. }
  4830. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMaps_MUint32Entry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMaps_MUint32Entry_DoNotUse >(Arena* arena) {
  4831. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMaps_MUint32Entry_DoNotUse >(arena);
  4832. }
  4833. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMaps_MUint64Entry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMaps_MUint64Entry_DoNotUse >(Arena* arena) {
  4834. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMaps_MUint64Entry_DoNotUse >(arena);
  4835. }
  4836. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMaps_MSint32Entry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMaps_MSint32Entry_DoNotUse >(Arena* arena) {
  4837. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMaps_MSint32Entry_DoNotUse >(arena);
  4838. }
  4839. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMaps_MSint64Entry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMaps_MSint64Entry_DoNotUse >(Arena* arena) {
  4840. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMaps_MSint64Entry_DoNotUse >(arena);
  4841. }
  4842. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMaps_MFixed32Entry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMaps_MFixed32Entry_DoNotUse >(Arena* arena) {
  4843. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMaps_MFixed32Entry_DoNotUse >(arena);
  4844. }
  4845. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMaps_MFixed64Entry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMaps_MFixed64Entry_DoNotUse >(Arena* arena) {
  4846. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMaps_MFixed64Entry_DoNotUse >(arena);
  4847. }
  4848. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMaps_MSfixed32Entry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMaps_MSfixed32Entry_DoNotUse >(Arena* arena) {
  4849. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMaps_MSfixed32Entry_DoNotUse >(arena);
  4850. }
  4851. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMaps_MSfixed64Entry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMaps_MSfixed64Entry_DoNotUse >(Arena* arena) {
  4852. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMaps_MSfixed64Entry_DoNotUse >(arena);
  4853. }
  4854. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMaps_MBoolEntry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMaps_MBoolEntry_DoNotUse >(Arena* arena) {
  4855. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMaps_MBoolEntry_DoNotUse >(arena);
  4856. }
  4857. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMaps_MStringEntry_DoNotUse* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMaps_MStringEntry_DoNotUse >(Arena* arena) {
  4858. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMaps_MStringEntry_DoNotUse >(arena);
  4859. }
  4860. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestMaps* Arena::CreateMaybeMessage< ::protobuf_unittest::TestMaps >(Arena* arena) {
  4861. return Arena::CreateMessageInternal< ::protobuf_unittest::TestMaps >(arena);
  4862. }
  4863. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestSubmessageMaps* Arena::CreateMaybeMessage< ::protobuf_unittest::TestSubmessageMaps >(Arena* arena) {
  4864. return Arena::CreateMessageInternal< ::protobuf_unittest::TestSubmessageMaps >(arena);
  4865. }
  4866. } // namespace protobuf
  4867. } // namespace google
  4868. // @@protoc_insertion_point(global_scope)