unittest_custom_options.pb.cc 332 KB

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