1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: google/protobuf/unittest_proto3_arena_lite.proto
- #include <google/protobuf/unittest_proto3_arena_lite.pb.h>
- #include <algorithm>
- #include <google/protobuf/stubs/common.h>
- #include <google/protobuf/stubs/port.h>
- #include <google/protobuf/io/coded_stream.h>
- #include <google/protobuf/wire_format_lite_inl.h>
- #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
- // This is a temporary google only hack
- #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- #include "third_party/protobuf/version.h"
- #endif
- // @@protoc_insertion_point(includes)
- namespace protobuf_google_2fprotobuf_2funittest_5fimport_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fimport_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ImportMessage;
- } // namespace protobuf_google_2fprotobuf_2funittest_5fimport_2eproto
- namespace protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PublicImportMessage;
- } // namespace protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto
- namespace protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ForeignMessage;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_NestedMessage;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_NestedTestAllTypes;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto ::google::protobuf::internal::SCCInfo<4> scc_info_TestAllTypes;
- } // namespace protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto
- namespace proto3_arena_lite_unittest {
- class TestAllTypes_NestedMessageDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes_NestedMessage>
- _instance;
- } _TestAllTypes_NestedMessage_default_instance_;
- class TestAllTypesDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes>
- _instance;
- ::google::protobuf::uint32 oneof_uint32_;
- const ::proto3_arena_lite_unittest::TestAllTypes_NestedMessage* oneof_nested_message_;
- ::google::protobuf::internal::ArenaStringPtr oneof_string_;
- ::google::protobuf::internal::ArenaStringPtr oneof_bytes_;
- } _TestAllTypes_default_instance_;
- class TestPackedTypesDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestPackedTypes>
- _instance;
- } _TestPackedTypes_default_instance_;
- class TestUnpackedTypesDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestUnpackedTypes>
- _instance;
- } _TestUnpackedTypes_default_instance_;
- class NestedTestAllTypesDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<NestedTestAllTypes>
- _instance;
- } _NestedTestAllTypes_default_instance_;
- class ForeignMessageDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<ForeignMessage>
- _instance;
- } _ForeignMessage_default_instance_;
- class TestEmptyMessageDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestEmptyMessage>
- _instance;
- } _TestEmptyMessage_default_instance_;
- } // namespace proto3_arena_lite_unittest
- namespace protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto {
- static void InitDefaultsTestAllTypes_NestedMessage() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::proto3_arena_lite_unittest::_TestAllTypes_NestedMessage_default_instance_;
- new (ptr) ::proto3_arena_lite_unittest::TestAllTypes_NestedMessage();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::proto3_arena_lite_unittest::TestAllTypes_NestedMessage::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_TestAllTypes_NestedMessage =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestAllTypes_NestedMessage}, {}};
- static void InitDefaultsTestAllTypes() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::proto3_arena_lite_unittest::_TestAllTypes_default_instance_;
- new (ptr) ::proto3_arena_lite_unittest::TestAllTypes();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::proto3_arena_lite_unittest::TestAllTypes::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<4> scc_info_TestAllTypes =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsTestAllTypes}, {
- &protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestAllTypes_NestedMessage.base,
- &protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_ForeignMessage.base,
- &protobuf_google_2fprotobuf_2funittest_5fimport_2eproto::scc_info_ImportMessage.base,
- &protobuf_google_2fprotobuf_2funittest_5fimport_5fpublic_2eproto::scc_info_PublicImportMessage.base,}};
- static void InitDefaultsTestPackedTypes() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::proto3_arena_lite_unittest::_TestPackedTypes_default_instance_;
- new (ptr) ::proto3_arena_lite_unittest::TestPackedTypes();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::proto3_arena_lite_unittest::TestPackedTypes::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_TestPackedTypes =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestPackedTypes}, {}};
- static void InitDefaultsTestUnpackedTypes() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::proto3_arena_lite_unittest::_TestUnpackedTypes_default_instance_;
- new (ptr) ::proto3_arena_lite_unittest::TestUnpackedTypes();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::proto3_arena_lite_unittest::TestUnpackedTypes::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_TestUnpackedTypes =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestUnpackedTypes}, {}};
- static void InitDefaultsNestedTestAllTypes() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::proto3_arena_lite_unittest::_NestedTestAllTypes_default_instance_;
- new (ptr) ::proto3_arena_lite_unittest::NestedTestAllTypes();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::proto3_arena_lite_unittest::NestedTestAllTypes::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<1> scc_info_NestedTestAllTypes =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsNestedTestAllTypes}, {
- &protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestAllTypes.base,}};
- static void InitDefaultsForeignMessage() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::proto3_arena_lite_unittest::_ForeignMessage_default_instance_;
- new (ptr) ::proto3_arena_lite_unittest::ForeignMessage();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::proto3_arena_lite_unittest::ForeignMessage::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_ForeignMessage =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsForeignMessage}, {}};
- static void InitDefaultsTestEmptyMessage() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::proto3_arena_lite_unittest::_TestEmptyMessage_default_instance_;
- new (ptr) ::proto3_arena_lite_unittest::TestEmptyMessage();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::proto3_arena_lite_unittest::TestEmptyMessage::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_TestEmptyMessage =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestEmptyMessage}, {}};
- void InitDefaults() {
- ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes_NestedMessage.base);
- ::google::protobuf::internal::InitSCC(&scc_info_TestAllTypes.base);
- ::google::protobuf::internal::InitSCC(&scc_info_TestPackedTypes.base);
- ::google::protobuf::internal::InitSCC(&scc_info_TestUnpackedTypes.base);
- ::google::protobuf::internal::InitSCC(&scc_info_NestedTestAllTypes.base);
- ::google::protobuf::internal::InitSCC(&scc_info_ForeignMessage.base);
- ::google::protobuf::internal::InitSCC(&scc_info_TestEmptyMessage.base);
- }
- } // namespace protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto
- namespace proto3_arena_lite_unittest {
- bool TestAllTypes_NestedEnum_IsValid(int value) {
- switch (value) {
- case -1:
- case 0:
- case 1:
- case 2:
- case 3:
- return true;
- default:
- return false;
- }
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const TestAllTypes_NestedEnum TestAllTypes::ZERO;
- const TestAllTypes_NestedEnum TestAllTypes::FOO;
- const TestAllTypes_NestedEnum TestAllTypes::BAR;
- const TestAllTypes_NestedEnum TestAllTypes::BAZ;
- const TestAllTypes_NestedEnum TestAllTypes::NEG;
- const TestAllTypes_NestedEnum TestAllTypes::NestedEnum_MIN;
- const TestAllTypes_NestedEnum TestAllTypes::NestedEnum_MAX;
- const int TestAllTypes::NestedEnum_ARRAYSIZE;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- bool ForeignEnum_IsValid(int value) {
- switch (value) {
- case 0:
- case 4:
- case 5:
- case 6:
- return true;
- default:
- return false;
- }
- }
- // ===================================================================
- void TestAllTypes_NestedMessage::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int TestAllTypes_NestedMessage::kBbFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestAllTypes_NestedMessage::TestAllTypes_NestedMessage()
- : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestAllTypes_NestedMessage.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:proto3_arena_lite_unittest.TestAllTypes.NestedMessage)
- }
- TestAllTypes_NestedMessage::TestAllTypes_NestedMessage(::google::protobuf::Arena* arena)
- : ::google::protobuf::MessageLite(),
- _internal_metadata_(arena) {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestAllTypes_NestedMessage.base);
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:proto3_arena_lite_unittest.TestAllTypes.NestedMessage)
- }
- TestAllTypes_NestedMessage::TestAllTypes_NestedMessage(const TestAllTypes_NestedMessage& from)
- : ::google::protobuf::MessageLite(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- bb_ = from.bb_;
- // @@protoc_insertion_point(copy_constructor:proto3_arena_lite_unittest.TestAllTypes.NestedMessage)
- }
- void TestAllTypes_NestedMessage::SharedCtor() {
- bb_ = 0;
- }
- TestAllTypes_NestedMessage::~TestAllTypes_NestedMessage() {
- // @@protoc_insertion_point(destructor:proto3_arena_lite_unittest.TestAllTypes.NestedMessage)
- SharedDtor();
- }
- void TestAllTypes_NestedMessage::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
- }
- void TestAllTypes_NestedMessage::ArenaDtor(void* object) {
- TestAllTypes_NestedMessage* _this = reinterpret_cast< TestAllTypes_NestedMessage* >(object);
- (void)_this;
- }
- void TestAllTypes_NestedMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
- }
- void TestAllTypes_NestedMessage::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const TestAllTypes_NestedMessage& TestAllTypes_NestedMessage::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestAllTypes_NestedMessage.base);
- return *internal_default_instance();
- }
- void TestAllTypes_NestedMessage::Clear() {
- // @@protoc_insertion_point(message_clear_start:proto3_arena_lite_unittest.TestAllTypes.NestedMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- bb_ = 0;
- _internal_metadata_.Clear();
- }
- bool TestAllTypes_NestedMessage::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
- &_internal_metadata_);
- ::google::protobuf::io::StringOutputStream unknown_fields_output(
- unknown_fields_setter.buffer());
- ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
- &unknown_fields_output, false);
- // @@protoc_insertion_point(parse_start:proto3_arena_lite_unittest.TestAllTypes.NestedMessage)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // int32 bb = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &bb_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(
- input, tag, &unknown_fields_stream));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:proto3_arena_lite_unittest.TestAllTypes.NestedMessage)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:proto3_arena_lite_unittest.TestAllTypes.NestedMessage)
- return false;
- #undef DO_
- }
- void TestAllTypes_NestedMessage::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:proto3_arena_lite_unittest.TestAllTypes.NestedMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 bb = 1;
- if (this->bb() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->bb(), output);
- }
- output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).data(),
- static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size()));
- // @@protoc_insertion_point(serialize_end:proto3_arena_lite_unittest.TestAllTypes.NestedMessage)
- }
- size_t TestAllTypes_NestedMessage::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:proto3_arena_lite_unittest.TestAllTypes.NestedMessage)
- size_t total_size = 0;
- total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size();
- // int32 bb = 1;
- if (this->bb() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->bb());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void TestAllTypes_NestedMessage::CheckTypeAndMergeFrom(
- const ::google::protobuf::MessageLite& from) {
- MergeFrom(*::google::protobuf::down_cast<const TestAllTypes_NestedMessage*>(&from));
- }
- void TestAllTypes_NestedMessage::MergeFrom(const TestAllTypes_NestedMessage& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:proto3_arena_lite_unittest.TestAllTypes.NestedMessage)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.bb() != 0) {
- set_bb(from.bb());
- }
- }
- void TestAllTypes_NestedMessage::CopyFrom(const TestAllTypes_NestedMessage& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:proto3_arena_lite_unittest.TestAllTypes.NestedMessage)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TestAllTypes_NestedMessage::IsInitialized() const {
- return true;
- }
- void TestAllTypes_NestedMessage::Swap(TestAllTypes_NestedMessage* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- TestAllTypes_NestedMessage* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
- }
- void TestAllTypes_NestedMessage::UnsafeArenaSwap(TestAllTypes_NestedMessage* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
- }
- void TestAllTypes_NestedMessage::InternalSwap(TestAllTypes_NestedMessage* other) {
- using std::swap;
- swap(bb_, other->bb_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::std::string TestAllTypes_NestedMessage::GetTypeName() const {
- return "proto3_arena_lite_unittest.TestAllTypes.NestedMessage";
- }
- // ===================================================================
- void TestAllTypes::InitAsDefaultInstance() {
- ::proto3_arena_lite_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_nested_message_ = const_cast< ::proto3_arena_lite_unittest::TestAllTypes_NestedMessage*>(
- ::proto3_arena_lite_unittest::TestAllTypes_NestedMessage::internal_default_instance());
- ::proto3_arena_lite_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_foreign_message_ = const_cast< ::proto3_arena_lite_unittest::ForeignMessage*>(
- ::proto3_arena_lite_unittest::ForeignMessage::internal_default_instance());
- ::proto3_arena_lite_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_import_message_ = const_cast< ::protobuf_unittest_import::ImportMessage*>(
- ::protobuf_unittest_import::ImportMessage::internal_default_instance());
- ::proto3_arena_lite_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_public_import_message_ = const_cast< ::protobuf_unittest_import::PublicImportMessage*>(
- ::protobuf_unittest_import::PublicImportMessage::internal_default_instance());
- ::proto3_arena_lite_unittest::_TestAllTypes_default_instance_._instance.get_mutable()->optional_lazy_message_ = const_cast< ::proto3_arena_lite_unittest::TestAllTypes_NestedMessage*>(
- ::proto3_arena_lite_unittest::TestAllTypes_NestedMessage::internal_default_instance());
- }
- void TestAllTypes::unsafe_arena_set_allocated_optional_nested_message(
- ::proto3_arena_lite_unittest::TestAllTypes_NestedMessage* optional_nested_message) {
- if (GetArenaNoVirtual() == NULL) {
- delete optional_nested_message_;
- }
- optional_nested_message_ = optional_nested_message;
- if (optional_nested_message) {
-
- } else {
-
- }
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:proto3_arena_lite_unittest.TestAllTypes.optional_nested_message)
- }
- void TestAllTypes::unsafe_arena_set_allocated_optional_foreign_message(
- ::proto3_arena_lite_unittest::ForeignMessage* optional_foreign_message) {
- if (GetArenaNoVirtual() == NULL) {
- delete optional_foreign_message_;
- }
- optional_foreign_message_ = optional_foreign_message;
- if (optional_foreign_message) {
-
- } else {
-
- }
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:proto3_arena_lite_unittest.TestAllTypes.optional_foreign_message)
- }
- void TestAllTypes::unsafe_arena_set_allocated_optional_import_message(
- ::protobuf_unittest_import::ImportMessage* optional_import_message) {
- if (GetArenaNoVirtual() == NULL) {
- delete optional_import_message_;
- }
- optional_import_message_ = optional_import_message;
- if (optional_import_message) {
-
- } else {
-
- }
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:proto3_arena_lite_unittest.TestAllTypes.optional_import_message)
- }
- void TestAllTypes::clear_optional_import_message() {
- if (GetArenaNoVirtual() == NULL && optional_import_message_ != NULL) {
- delete optional_import_message_;
- }
- optional_import_message_ = NULL;
- }
- void TestAllTypes::unsafe_arena_set_allocated_optional_public_import_message(
- ::protobuf_unittest_import::PublicImportMessage* optional_public_import_message) {
- if (GetArenaNoVirtual() == NULL) {
- delete optional_public_import_message_;
- }
- optional_public_import_message_ = optional_public_import_message;
- if (optional_public_import_message) {
-
- } else {
-
- }
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:proto3_arena_lite_unittest.TestAllTypes.optional_public_import_message)
- }
- void TestAllTypes::clear_optional_public_import_message() {
- if (GetArenaNoVirtual() == NULL && optional_public_import_message_ != NULL) {
- delete optional_public_import_message_;
- }
- optional_public_import_message_ = NULL;
- }
- void TestAllTypes::unsafe_arena_set_allocated_optional_lazy_message(
- ::proto3_arena_lite_unittest::TestAllTypes_NestedMessage* optional_lazy_message) {
- if (GetArenaNoVirtual() == NULL) {
- delete optional_lazy_message_;
- }
- optional_lazy_message_ = optional_lazy_message;
- if (optional_lazy_message) {
-
- } else {
-
- }
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:proto3_arena_lite_unittest.TestAllTypes.optional_lazy_message)
- }
- void TestAllTypes::clear_repeated_import_message() {
- repeated_import_message_.Clear();
- }
- void TestAllTypes::set_allocated_oneof_nested_message(::proto3_arena_lite_unittest::TestAllTypes_NestedMessage* oneof_nested_message) {
- ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
- clear_oneof_field();
- if (oneof_nested_message) {
- ::google::protobuf::Arena* submessage_arena =
- ::google::protobuf::Arena::GetArena(oneof_nested_message);
- if (message_arena != submessage_arena) {
- oneof_nested_message = ::google::protobuf::internal::GetOwnedMessage(
- message_arena, oneof_nested_message, submessage_arena);
- }
- set_has_oneof_nested_message();
- oneof_field_.oneof_nested_message_ = oneof_nested_message;
- }
- // @@protoc_insertion_point(field_set_allocated:proto3_arena_lite_unittest.TestAllTypes.oneof_nested_message)
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int TestAllTypes::kOptionalInt32FieldNumber;
- const int TestAllTypes::kOptionalInt64FieldNumber;
- const int TestAllTypes::kOptionalUint32FieldNumber;
- const int TestAllTypes::kOptionalUint64FieldNumber;
- const int TestAllTypes::kOptionalSint32FieldNumber;
- const int TestAllTypes::kOptionalSint64FieldNumber;
- const int TestAllTypes::kOptionalFixed32FieldNumber;
- const int TestAllTypes::kOptionalFixed64FieldNumber;
- const int TestAllTypes::kOptionalSfixed32FieldNumber;
- const int TestAllTypes::kOptionalSfixed64FieldNumber;
- const int TestAllTypes::kOptionalFloatFieldNumber;
- const int TestAllTypes::kOptionalDoubleFieldNumber;
- const int TestAllTypes::kOptionalBoolFieldNumber;
- const int TestAllTypes::kOptionalStringFieldNumber;
- const int TestAllTypes::kOptionalBytesFieldNumber;
- const int TestAllTypes::kOptionalNestedMessageFieldNumber;
- const int TestAllTypes::kOptionalForeignMessageFieldNumber;
- const int TestAllTypes::kOptionalImportMessageFieldNumber;
- const int TestAllTypes::kOptionalNestedEnumFieldNumber;
- const int TestAllTypes::kOptionalForeignEnumFieldNumber;
- const int TestAllTypes::kOptionalStringPieceFieldNumber;
- const int TestAllTypes::kOptionalCordFieldNumber;
- const int TestAllTypes::kOptionalPublicImportMessageFieldNumber;
- const int TestAllTypes::kOptionalLazyMessageFieldNumber;
- const int TestAllTypes::kRepeatedInt32FieldNumber;
- const int TestAllTypes::kRepeatedInt64FieldNumber;
- const int TestAllTypes::kRepeatedUint32FieldNumber;
- const int TestAllTypes::kRepeatedUint64FieldNumber;
- const int TestAllTypes::kRepeatedSint32FieldNumber;
- const int TestAllTypes::kRepeatedSint64FieldNumber;
- const int TestAllTypes::kRepeatedFixed32FieldNumber;
- const int TestAllTypes::kRepeatedFixed64FieldNumber;
- const int TestAllTypes::kRepeatedSfixed32FieldNumber;
- const int TestAllTypes::kRepeatedSfixed64FieldNumber;
- const int TestAllTypes::kRepeatedFloatFieldNumber;
- const int TestAllTypes::kRepeatedDoubleFieldNumber;
- const int TestAllTypes::kRepeatedBoolFieldNumber;
- const int TestAllTypes::kRepeatedStringFieldNumber;
- const int TestAllTypes::kRepeatedBytesFieldNumber;
- const int TestAllTypes::kRepeatedNestedMessageFieldNumber;
- const int TestAllTypes::kRepeatedForeignMessageFieldNumber;
- const int TestAllTypes::kRepeatedImportMessageFieldNumber;
- const int TestAllTypes::kRepeatedNestedEnumFieldNumber;
- const int TestAllTypes::kRepeatedForeignEnumFieldNumber;
- const int TestAllTypes::kRepeatedStringPieceFieldNumber;
- const int TestAllTypes::kRepeatedCordFieldNumber;
- const int TestAllTypes::kRepeatedLazyMessageFieldNumber;
- const int TestAllTypes::kOneofUint32FieldNumber;
- const int TestAllTypes::kOneofNestedMessageFieldNumber;
- const int TestAllTypes::kOneofStringFieldNumber;
- const int TestAllTypes::kOneofBytesFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestAllTypes::TestAllTypes()
- : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestAllTypes.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:proto3_arena_lite_unittest.TestAllTypes)
- }
- TestAllTypes::TestAllTypes(::google::protobuf::Arena* arena)
- : ::google::protobuf::MessageLite(),
- _internal_metadata_(arena),
- repeated_int32_(arena),
- repeated_int64_(arena),
- repeated_uint32_(arena),
- repeated_uint64_(arena),
- repeated_sint32_(arena),
- repeated_sint64_(arena),
- repeated_fixed32_(arena),
- repeated_fixed64_(arena),
- repeated_sfixed32_(arena),
- repeated_sfixed64_(arena),
- repeated_float_(arena),
- repeated_double_(arena),
- repeated_bool_(arena),
- repeated_string_(arena),
- repeated_bytes_(arena),
- repeated_nested_message_(arena),
- repeated_foreign_message_(arena),
- repeated_import_message_(arena),
- repeated_nested_enum_(arena),
- repeated_foreign_enum_(arena),
- repeated_string_piece_(arena),
- repeated_cord_(arena),
- repeated_lazy_message_(arena) {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestAllTypes.base);
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:proto3_arena_lite_unittest.TestAllTypes)
- }
- TestAllTypes::TestAllTypes(const TestAllTypes& from)
- : ::google::protobuf::MessageLite(),
- _internal_metadata_(NULL),
- repeated_int32_(from.repeated_int32_),
- repeated_int64_(from.repeated_int64_),
- repeated_uint32_(from.repeated_uint32_),
- repeated_uint64_(from.repeated_uint64_),
- repeated_sint32_(from.repeated_sint32_),
- repeated_sint64_(from.repeated_sint64_),
- repeated_fixed32_(from.repeated_fixed32_),
- repeated_fixed64_(from.repeated_fixed64_),
- repeated_sfixed32_(from.repeated_sfixed32_),
- repeated_sfixed64_(from.repeated_sfixed64_),
- repeated_float_(from.repeated_float_),
- repeated_double_(from.repeated_double_),
- repeated_bool_(from.repeated_bool_),
- repeated_string_(from.repeated_string_),
- repeated_bytes_(from.repeated_bytes_),
- repeated_nested_message_(from.repeated_nested_message_),
- repeated_foreign_message_(from.repeated_foreign_message_),
- repeated_import_message_(from.repeated_import_message_),
- repeated_nested_enum_(from.repeated_nested_enum_),
- repeated_foreign_enum_(from.repeated_foreign_enum_),
- repeated_string_piece_(from.repeated_string_piece_),
- repeated_cord_(from.repeated_cord_),
- repeated_lazy_message_(from.repeated_lazy_message_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.optional_string().size() > 0) {
- optional_string_.SetLite(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string(),
- GetArenaNoVirtual());
- }
- optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.optional_bytes().size() > 0) {
- optional_bytes_.SetLite(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes(),
- GetArenaNoVirtual());
- }
- optional_string_piece_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.optional_string_piece().size() > 0) {
- optional_string_piece_.SetLite(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_piece(),
- GetArenaNoVirtual());
- }
- optional_cord_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.optional_cord().size() > 0) {
- optional_cord_.SetLite(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_cord(),
- GetArenaNoVirtual());
- }
- if (from.has_optional_nested_message()) {
- optional_nested_message_ = new ::proto3_arena_lite_unittest::TestAllTypes_NestedMessage(*from.optional_nested_message_);
- } else {
- optional_nested_message_ = NULL;
- }
- if (from.has_optional_foreign_message()) {
- optional_foreign_message_ = new ::proto3_arena_lite_unittest::ForeignMessage(*from.optional_foreign_message_);
- } else {
- optional_foreign_message_ = NULL;
- }
- if (from.has_optional_import_message()) {
- optional_import_message_ = new ::protobuf_unittest_import::ImportMessage(*from.optional_import_message_);
- } else {
- optional_import_message_ = NULL;
- }
- if (from.has_optional_public_import_message()) {
- optional_public_import_message_ = new ::protobuf_unittest_import::PublicImportMessage(*from.optional_public_import_message_);
- } else {
- optional_public_import_message_ = NULL;
- }
- if (from.has_optional_lazy_message()) {
- optional_lazy_message_ = new ::proto3_arena_lite_unittest::TestAllTypes_NestedMessage(*from.optional_lazy_message_);
- } else {
- optional_lazy_message_ = NULL;
- }
- ::memcpy(&optional_int64_, &from.optional_int64_,
- static_cast<size_t>(reinterpret_cast<char*>(&optional_foreign_enum_) -
- reinterpret_cast<char*>(&optional_int64_)) + sizeof(optional_foreign_enum_));
- clear_has_oneof_field();
- switch (from.oneof_field_case()) {
- case kOneofUint32: {
- set_oneof_uint32(from.oneof_uint32());
- break;
- }
- case kOneofNestedMessage: {
- mutable_oneof_nested_message()->::proto3_arena_lite_unittest::TestAllTypes_NestedMessage::MergeFrom(from.oneof_nested_message());
- break;
- }
- case kOneofString: {
- set_oneof_string(from.oneof_string());
- break;
- }
- case kOneofBytes: {
- set_oneof_bytes(from.oneof_bytes());
- break;
- }
- case ONEOF_FIELD_NOT_SET: {
- break;
- }
- }
- // @@protoc_insertion_point(copy_constructor:proto3_arena_lite_unittest.TestAllTypes)
- }
- void TestAllTypes::SharedCtor() {
- optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_string_piece_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_cord_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::memset(&optional_nested_message_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&optional_foreign_enum_) -
- reinterpret_cast<char*>(&optional_nested_message_)) + sizeof(optional_foreign_enum_));
- clear_has_oneof_field();
- }
- TestAllTypes::~TestAllTypes() {
- // @@protoc_insertion_point(destructor:proto3_arena_lite_unittest.TestAllTypes)
- SharedDtor();
- }
- void TestAllTypes::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
- optional_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_bytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_string_piece_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- optional_cord_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete optional_nested_message_;
- if (this != internal_default_instance()) delete optional_foreign_message_;
- if (this != internal_default_instance()) delete optional_import_message_;
- if (this != internal_default_instance()) delete optional_public_import_message_;
- if (this != internal_default_instance()) delete optional_lazy_message_;
- if (has_oneof_field()) {
- clear_oneof_field();
- }
- }
- void TestAllTypes::ArenaDtor(void* object) {
- TestAllTypes* _this = reinterpret_cast< TestAllTypes* >(object);
- (void)_this;
- }
- void TestAllTypes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
- }
- void TestAllTypes::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const TestAllTypes& TestAllTypes::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestAllTypes.base);
- return *internal_default_instance();
- }
- void TestAllTypes::clear_oneof_field() {
- // @@protoc_insertion_point(one_of_clear_start:proto3_arena_lite_unittest.TestAllTypes)
- switch (oneof_field_case()) {
- case kOneofUint32: {
- // No need to clear
- break;
- }
- case kOneofNestedMessage: {
- if (GetArenaNoVirtual() == NULL) {
- delete oneof_field_.oneof_nested_message_;
- }
- break;
- }
- case kOneofString: {
- oneof_field_.oneof_string_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- break;
- }
- case kOneofBytes: {
- oneof_field_.oneof_bytes_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- break;
- }
- case ONEOF_FIELD_NOT_SET: {
- break;
- }
- }
- _oneof_case_[0] = ONEOF_FIELD_NOT_SET;
- }
- void TestAllTypes::Clear() {
- // @@protoc_insertion_point(message_clear_start:proto3_arena_lite_unittest.TestAllTypes)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- repeated_int32_.Clear();
- repeated_int64_.Clear();
- repeated_uint32_.Clear();
- repeated_uint64_.Clear();
- repeated_sint32_.Clear();
- repeated_sint64_.Clear();
- repeated_fixed32_.Clear();
- repeated_fixed64_.Clear();
- repeated_sfixed32_.Clear();
- repeated_sfixed64_.Clear();
- repeated_float_.Clear();
- repeated_double_.Clear();
- repeated_bool_.Clear();
- repeated_string_.Clear();
- repeated_bytes_.Clear();
- repeated_nested_message_.Clear();
- repeated_foreign_message_.Clear();
- repeated_import_message_.Clear();
- repeated_nested_enum_.Clear();
- repeated_foreign_enum_.Clear();
- repeated_string_piece_.Clear();
- repeated_cord_.Clear();
- repeated_lazy_message_.Clear();
- optional_string_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- optional_bytes_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- optional_string_piece_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- optional_cord_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- if (GetArenaNoVirtual() == NULL && optional_nested_message_ != NULL) {
- delete optional_nested_message_;
- }
- optional_nested_message_ = NULL;
- if (GetArenaNoVirtual() == NULL && optional_foreign_message_ != NULL) {
- delete optional_foreign_message_;
- }
- optional_foreign_message_ = NULL;
- if (GetArenaNoVirtual() == NULL && optional_import_message_ != NULL) {
- delete optional_import_message_;
- }
- optional_import_message_ = NULL;
- if (GetArenaNoVirtual() == NULL && optional_public_import_message_ != NULL) {
- delete optional_public_import_message_;
- }
- optional_public_import_message_ = NULL;
- if (GetArenaNoVirtual() == NULL && optional_lazy_message_ != NULL) {
- delete optional_lazy_message_;
- }
- optional_lazy_message_ = NULL;
- ::memset(&optional_int64_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&optional_foreign_enum_) -
- reinterpret_cast<char*>(&optional_int64_)) + sizeof(optional_foreign_enum_));
- clear_oneof_field();
- _internal_metadata_.Clear();
- }
- bool TestAllTypes::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
- &_internal_metadata_);
- ::google::protobuf::io::StringOutputStream unknown_fields_output(
- unknown_fields_setter.buffer());
- ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
- &unknown_fields_output, false);
- // @@protoc_insertion_point(parse_start:proto3_arena_lite_unittest.TestAllTypes)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // int32 optional_int32 = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &optional_int32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // int64 optional_int64 = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, &optional_int64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // uint32 optional_uint32 = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, &optional_uint32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // uint64 optional_uint64 = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, &optional_uint64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // sint32 optional_sint32 = 5;
- case 5: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- input, &optional_sint32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // sint64 optional_sint64 = 6;
- case 6: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- input, &optional_sint64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // fixed32 optional_fixed32 = 7;
- case 7: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
- input, &optional_fixed32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // fixed64 optional_fixed64 = 8;
- case 8: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(65u /* 65 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
- input, &optional_fixed64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // sfixed32 optional_sfixed32 = 9;
- case 9: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(77u /* 77 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
- input, &optional_sfixed32_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // sfixed64 optional_sfixed64 = 10;
- case 10: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(81u /* 81 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
- input, &optional_sfixed64_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // float optional_float = 11;
- case 11: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(93u /* 93 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- input, &optional_float_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // double optional_double = 12;
- case 12: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(97u /* 97 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &optional_double_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // bool optional_bool = 13;
- case 13: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, &optional_bool_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string optional_string = 14;
- case 14: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_optional_string()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_string().data(), static_cast<int>(this->optional_string().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "proto3_arena_lite_unittest.TestAllTypes.optional_string"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // bytes optional_bytes = 15;
- case 15: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->mutable_optional_bytes()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .proto3_arena_lite_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
- case 18: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(146u /* 146 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_optional_nested_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .proto3_arena_lite_unittest.ForeignMessage optional_foreign_message = 19;
- case 19: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(154u /* 154 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_optional_foreign_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .protobuf_unittest_import.ImportMessage optional_import_message = 20;
- case 20: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(162u /* 162 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_optional_import_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .proto3_arena_lite_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
- case 21: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(168u /* 168 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- set_optional_nested_enum(static_cast< ::proto3_arena_lite_unittest::TestAllTypes_NestedEnum >(value));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .proto3_arena_lite_unittest.ForeignEnum optional_foreign_enum = 22;
- case 22: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(176u /* 176 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- set_optional_foreign_enum(static_cast< ::proto3_arena_lite_unittest::ForeignEnum >(value));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string optional_string_piece = 24 [ctype = STRING_PIECE];
- case 24: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(194u /* 194 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_optional_string_piece()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_string_piece().data(), static_cast<int>(this->optional_string_piece().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "proto3_arena_lite_unittest.TestAllTypes.optional_string_piece"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string optional_cord = 25 [ctype = CORD];
- case 25: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(202u /* 202 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_optional_cord()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_cord().data(), static_cast<int>(this->optional_cord().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "proto3_arena_lite_unittest.TestAllTypes.optional_cord"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
- case 26: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(210u /* 210 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_optional_public_import_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .proto3_arena_lite_unittest.TestAllTypes.NestedMessage optional_lazy_message = 27 [lazy = true];
- case 27: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(218u /* 218 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_optional_lazy_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated int32 repeated_int32 = 31;
- case 31: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(250u /* 250 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, this->mutable_repeated_int32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(248u /* 248 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- 2, 250u, input, this->mutable_repeated_int32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated int64 repeated_int64 = 32;
- case 32: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(2u /* 258 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, this->mutable_repeated_int64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(0u /* 256 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- 2, 258u, input, this->mutable_repeated_int64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated uint32 repeated_uint32 = 33;
- case 33: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 266 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, this->mutable_repeated_uint32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 264 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- 2, 266u, input, this->mutable_repeated_uint32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated uint64 repeated_uint64 = 34;
- case 34: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 274 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, this->mutable_repeated_uint64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(16u /* 272 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- 2, 274u, input, this->mutable_repeated_uint64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sint32 repeated_sint32 = 35;
- case 35: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u /* 282 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- input, this->mutable_repeated_sint32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(24u /* 280 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- 2, 282u, input, this->mutable_repeated_sint32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sint64 repeated_sint64 = 36;
- case 36: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 290 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- input, this->mutable_repeated_sint64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(32u /* 288 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- 2, 290u, input, this->mutable_repeated_sint64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated fixed32 repeated_fixed32 = 37;
- case 37: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u /* 298 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
- input, this->mutable_repeated_fixed32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(45u /* 301 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
- 2, 298u, input, this->mutable_repeated_fixed32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated fixed64 repeated_fixed64 = 38;
- case 38: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(50u /* 306 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
- input, this->mutable_repeated_fixed64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(49u /* 305 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
- 2, 306u, input, this->mutable_repeated_fixed64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sfixed32 repeated_sfixed32 = 39;
- case 39: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(58u /* 314 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
- input, this->mutable_repeated_sfixed32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(61u /* 317 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
- 2, 314u, input, this->mutable_repeated_sfixed32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sfixed64 repeated_sfixed64 = 40;
- case 40: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(66u /* 322 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
- input, this->mutable_repeated_sfixed64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(65u /* 321 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
- 2, 322u, input, this->mutable_repeated_sfixed64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated float repeated_float = 41;
- case 41: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(74u /* 330 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- input, this->mutable_repeated_float())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(77u /* 333 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- 2, 330u, input, this->mutable_repeated_float())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated double repeated_double = 42;
- case 42: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(82u /* 338 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, this->mutable_repeated_double())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(81u /* 337 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- 2, 338u, input, this->mutable_repeated_double())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated bool repeated_bool = 43;
- case 43: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(90u /* 346 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, this->mutable_repeated_bool())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(88u /* 344 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- 2, 346u, input, this->mutable_repeated_bool())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated string repeated_string = 44;
- case 44: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(98u /* 354 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->add_repeated_string()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_string(this->repeated_string_size() - 1).data(),
- static_cast<int>(this->repeated_string(this->repeated_string_size() - 1).length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "proto3_arena_lite_unittest.TestAllTypes.repeated_string"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated bytes repeated_bytes = 45;
- case 45: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(106u /* 362 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->add_repeated_bytes()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .proto3_arena_lite_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
- case 48: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(130u /* 386 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, add_repeated_nested_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .proto3_arena_lite_unittest.ForeignMessage repeated_foreign_message = 49;
- case 49: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(138u /* 394 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, add_repeated_foreign_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
- case 50: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(146u /* 402 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, add_repeated_import_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .proto3_arena_lite_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
- case 51: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(154u /* 410 & 0xFF */)) {
- ::google::protobuf::uint32 length;
- DO_(input->ReadVarint32(&length));
- ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(static_cast<int>(length));
- while (input->BytesUntilLimit() > 0) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- add_repeated_nested_enum(static_cast< ::proto3_arena_lite_unittest::TestAllTypes_NestedEnum >(value));
- }
- input->PopLimit(limit);
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(152u /* 408 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- add_repeated_nested_enum(static_cast< ::proto3_arena_lite_unittest::TestAllTypes_NestedEnum >(value));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .proto3_arena_lite_unittest.ForeignEnum repeated_foreign_enum = 52;
- case 52: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(162u /* 418 & 0xFF */)) {
- ::google::protobuf::uint32 length;
- DO_(input->ReadVarint32(&length));
- ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(static_cast<int>(length));
- while (input->BytesUntilLimit() > 0) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- add_repeated_foreign_enum(static_cast< ::proto3_arena_lite_unittest::ForeignEnum >(value));
- }
- input->PopLimit(limit);
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(160u /* 416 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- add_repeated_foreign_enum(static_cast< ::proto3_arena_lite_unittest::ForeignEnum >(value));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
- case 54: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(178u /* 434 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->add_repeated_string_piece()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_string_piece(this->repeated_string_piece_size() - 1).data(),
- static_cast<int>(this->repeated_string_piece(this->repeated_string_piece_size() - 1).length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "proto3_arena_lite_unittest.TestAllTypes.repeated_string_piece"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated string repeated_cord = 55 [ctype = CORD];
- case 55: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(186u /* 442 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->add_repeated_cord()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_cord(this->repeated_cord_size() - 1).data(),
- static_cast<int>(this->repeated_cord(this->repeated_cord_size() - 1).length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "proto3_arena_lite_unittest.TestAllTypes.repeated_cord"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .proto3_arena_lite_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
- case 57: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(202u /* 458 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, add_repeated_lazy_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // uint32 oneof_uint32 = 111;
- case 111: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(120u /* 888 & 0xFF */)) {
- clear_oneof_field();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, &oneof_field_.oneof_uint32_)));
- set_has_oneof_uint32();
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .proto3_arena_lite_unittest.TestAllTypes.NestedMessage oneof_nested_message = 112;
- case 112: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(130u /* 898 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_oneof_nested_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string oneof_string = 113;
- case 113: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(138u /* 906 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_oneof_string()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "proto3_arena_lite_unittest.TestAllTypes.oneof_string"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // bytes oneof_bytes = 114;
- case 114: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(146u /* 914 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->mutable_oneof_bytes()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(
- input, tag, &unknown_fields_stream));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:proto3_arena_lite_unittest.TestAllTypes)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:proto3_arena_lite_unittest.TestAllTypes)
- return false;
- #undef DO_
- }
- void TestAllTypes::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:proto3_arena_lite_unittest.TestAllTypes)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 optional_int32 = 1;
- if (this->optional_int32() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->optional_int32(), output);
- }
- // int64 optional_int64 = 2;
- if (this->optional_int64() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->optional_int64(), output);
- }
- // uint32 optional_uint32 = 3;
- if (this->optional_uint32() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->optional_uint32(), output);
- }
- // uint64 optional_uint64 = 4;
- if (this->optional_uint64() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->optional_uint64(), output);
- }
- // sint32 optional_sint32 = 5;
- if (this->optional_sint32() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt32(5, this->optional_sint32(), output);
- }
- // sint64 optional_sint64 = 6;
- if (this->optional_sint64() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt64(6, this->optional_sint64(), output);
- }
- // fixed32 optional_fixed32 = 7;
- if (this->optional_fixed32() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteFixed32(7, this->optional_fixed32(), output);
- }
- // fixed64 optional_fixed64 = 8;
- if (this->optional_fixed64() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteFixed64(8, this->optional_fixed64(), output);
- }
- // sfixed32 optional_sfixed32 = 9;
- if (this->optional_sfixed32() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteSFixed32(9, this->optional_sfixed32(), output);
- }
- // sfixed64 optional_sfixed64 = 10;
- if (this->optional_sfixed64() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteSFixed64(10, this->optional_sfixed64(), output);
- }
- // float optional_float = 11;
- if (this->optional_float() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteFloat(11, this->optional_float(), output);
- }
- // double optional_double = 12;
- if (this->optional_double() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(12, this->optional_double(), output);
- }
- // bool optional_bool = 13;
- if (this->optional_bool() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteBool(13, this->optional_bool(), output);
- }
- // string optional_string = 14;
- if (this->optional_string().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_string().data(), static_cast<int>(this->optional_string().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto3_arena_lite_unittest.TestAllTypes.optional_string");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 14, this->optional_string(), output);
- }
- // bytes optional_bytes = 15;
- if (this->optional_bytes().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
- 15, this->optional_bytes(), output);
- }
- // .proto3_arena_lite_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
- if (this->has_optional_nested_message()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessage(
- 18, this->_internal_optional_nested_message(), output);
- }
- // .proto3_arena_lite_unittest.ForeignMessage optional_foreign_message = 19;
- if (this->has_optional_foreign_message()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessage(
- 19, this->_internal_optional_foreign_message(), output);
- }
- // .protobuf_unittest_import.ImportMessage optional_import_message = 20;
- if (this->has_optional_import_message()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 20, this->_internal_optional_import_message(), output);
- }
- // .proto3_arena_lite_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
- if (this->optional_nested_enum() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 21, this->optional_nested_enum(), output);
- }
- // .proto3_arena_lite_unittest.ForeignEnum optional_foreign_enum = 22;
- if (this->optional_foreign_enum() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 22, this->optional_foreign_enum(), output);
- }
- // string optional_string_piece = 24 [ctype = STRING_PIECE];
- if (this->optional_string_piece().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_string_piece().data(), static_cast<int>(this->optional_string_piece().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto3_arena_lite_unittest.TestAllTypes.optional_string_piece");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 24, this->optional_string_piece(), output);
- }
- // string optional_cord = 25 [ctype = CORD];
- if (this->optional_cord().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->optional_cord().data(), static_cast<int>(this->optional_cord().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto3_arena_lite_unittest.TestAllTypes.optional_cord");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 25, this->optional_cord(), output);
- }
- // .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
- if (this->has_optional_public_import_message()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 26, this->_internal_optional_public_import_message(), output);
- }
- // .proto3_arena_lite_unittest.TestAllTypes.NestedMessage optional_lazy_message = 27 [lazy = true];
- if (this->has_optional_lazy_message()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessage(
- 27, this->_internal_optional_lazy_message(), output);
- }
- // repeated int32 repeated_int32 = 31;
- if (this->repeated_int32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(31, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_int32_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
- this->repeated_int32(i), output);
- }
- // repeated int64 repeated_int64 = 32;
- if (this->repeated_int64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(32, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_int64_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_int64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag(
- this->repeated_int64(i), output);
- }
- // repeated uint32 repeated_uint32 = 33;
- if (this->repeated_uint32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(33, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_uint32_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_uint32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32NoTag(
- this->repeated_uint32(i), output);
- }
- // repeated uint64 repeated_uint64 = 34;
- if (this->repeated_uint64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(34, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_uint64_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_uint64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64NoTag(
- this->repeated_uint64(i), output);
- }
- // repeated sint32 repeated_sint32 = 35;
- if (this->repeated_sint32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(35, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_sint32_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_sint32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt32NoTag(
- this->repeated_sint32(i), output);
- }
- // repeated sint64 repeated_sint64 = 36;
- if (this->repeated_sint64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(36, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_sint64_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_sint64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt64NoTag(
- this->repeated_sint64(i), output);
- }
- // repeated fixed32 repeated_fixed32 = 37;
- if (this->repeated_fixed32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(37, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_fixed32_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteFixed32Array(
- this->repeated_fixed32().data(), this->repeated_fixed32_size(), output);
- }
- // repeated fixed64 repeated_fixed64 = 38;
- if (this->repeated_fixed64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(38, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_fixed64_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteFixed64Array(
- this->repeated_fixed64().data(), this->repeated_fixed64_size(), output);
- }
- // repeated sfixed32 repeated_sfixed32 = 39;
- if (this->repeated_sfixed32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(39, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_sfixed32_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteSFixed32Array(
- this->repeated_sfixed32().data(), this->repeated_sfixed32_size(), output);
- }
- // repeated sfixed64 repeated_sfixed64 = 40;
- if (this->repeated_sfixed64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(40, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_sfixed64_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteSFixed64Array(
- this->repeated_sfixed64().data(), this->repeated_sfixed64_size(), output);
- }
- // repeated float repeated_float = 41;
- if (this->repeated_float_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(41, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_float_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteFloatArray(
- this->repeated_float().data(), this->repeated_float_size(), output);
- }
- // repeated double repeated_double = 42;
- if (this->repeated_double_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(42, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_double_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteDoubleArray(
- this->repeated_double().data(), this->repeated_double_size(), output);
- }
- // repeated bool repeated_bool = 43;
- if (this->repeated_bool_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(43, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _repeated_bool_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteBoolArray(
- this->repeated_bool().data(), this->repeated_bool_size(), output);
- }
- // repeated string repeated_string = 44;
- for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_string(i).data(), static_cast<int>(this->repeated_string(i).length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto3_arena_lite_unittest.TestAllTypes.repeated_string");
- ::google::protobuf::internal::WireFormatLite::WriteString(
- 44, this->repeated_string(i), output);
- }
- // repeated bytes repeated_bytes = 45;
- for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteBytes(
- 45, this->repeated_bytes(i), output);
- }
- // repeated .proto3_arena_lite_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_nested_message_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessage(
- 48,
- this->repeated_nested_message(static_cast<int>(i)),
- output);
- }
- // repeated .proto3_arena_lite_unittest.ForeignMessage repeated_foreign_message = 49;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_foreign_message_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessage(
- 49,
- this->repeated_foreign_message(static_cast<int>(i)),
- output);
- }
- // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_import_message_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 50,
- this->repeated_import_message(static_cast<int>(i)),
- output);
- }
- // repeated .proto3_arena_lite_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
- if (this->repeated_nested_enum_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(
- 51,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- output);
- output->WriteVarint32(
- static_cast< ::google::protobuf::uint32>(_repeated_nested_enum_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_nested_enum_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteEnumNoTag(
- this->repeated_nested_enum(i), output);
- }
- // repeated .proto3_arena_lite_unittest.ForeignEnum repeated_foreign_enum = 52;
- if (this->repeated_foreign_enum_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(
- 52,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- output);
- output->WriteVarint32(
- static_cast< ::google::protobuf::uint32>(_repeated_foreign_enum_cached_byte_size_));
- }
- for (int i = 0, n = this->repeated_foreign_enum_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteEnumNoTag(
- this->repeated_foreign_enum(i), output);
- }
- // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
- for (int i = 0, n = this->repeated_string_piece_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_string_piece(i).data(), static_cast<int>(this->repeated_string_piece(i).length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto3_arena_lite_unittest.TestAllTypes.repeated_string_piece");
- ::google::protobuf::internal::WireFormatLite::WriteString(
- 54, this->repeated_string_piece(i), output);
- }
- // repeated string repeated_cord = 55 [ctype = CORD];
- for (int i = 0, n = this->repeated_cord_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->repeated_cord(i).data(), static_cast<int>(this->repeated_cord(i).length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto3_arena_lite_unittest.TestAllTypes.repeated_cord");
- ::google::protobuf::internal::WireFormatLite::WriteString(
- 55, this->repeated_cord(i), output);
- }
- // repeated .proto3_arena_lite_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_lazy_message_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessage(
- 57,
- this->repeated_lazy_message(static_cast<int>(i)),
- output);
- }
- // uint32 oneof_uint32 = 111;
- if (has_oneof_uint32()) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(111, this->oneof_uint32(), output);
- }
- // .proto3_arena_lite_unittest.TestAllTypes.NestedMessage oneof_nested_message = 112;
- if (has_oneof_nested_message()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessage(
- 112, this->_internal_oneof_nested_message(), output);
- }
- // string oneof_string = 113;
- if (has_oneof_string()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->oneof_string().data(), static_cast<int>(this->oneof_string().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "proto3_arena_lite_unittest.TestAllTypes.oneof_string");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 113, this->oneof_string(), output);
- }
- // bytes oneof_bytes = 114;
- if (has_oneof_bytes()) {
- ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
- 114, this->oneof_bytes(), output);
- }
- output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).data(),
- static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size()));
- // @@protoc_insertion_point(serialize_end:proto3_arena_lite_unittest.TestAllTypes)
- }
- size_t TestAllTypes::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:proto3_arena_lite_unittest.TestAllTypes)
- size_t total_size = 0;
- total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size();
- // repeated int32 repeated_int32 = 31;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- Int32Size(this->repeated_int32_);
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_int32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated int64 repeated_int64 = 32;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- Int64Size(this->repeated_int64_);
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_int64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated uint32 repeated_uint32 = 33;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- UInt32Size(this->repeated_uint32_);
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_uint32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated uint64 repeated_uint64 = 34;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- UInt64Size(this->repeated_uint64_);
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_uint64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated sint32 repeated_sint32 = 35;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- SInt32Size(this->repeated_sint32_);
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_sint32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated sint64 repeated_sint64 = 36;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- SInt64Size(this->repeated_sint64_);
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_sint64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated fixed32 repeated_fixed32 = 37;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_fixed32_size());
- size_t data_size = 4UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_fixed32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated fixed64 repeated_fixed64 = 38;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_fixed64_size());
- size_t data_size = 8UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_fixed64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated sfixed32 repeated_sfixed32 = 39;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_sfixed32_size());
- size_t data_size = 4UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_sfixed32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated sfixed64 repeated_sfixed64 = 40;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_sfixed64_size());
- size_t data_size = 8UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_sfixed64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated float repeated_float = 41;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_float_size());
- size_t data_size = 4UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_float_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated double repeated_double = 42;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_double_size());
- size_t data_size = 8UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_double_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated bool repeated_bool = 43;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_bool_size());
- size_t data_size = 1UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_bool_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated string repeated_string = 44;
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_string_size());
- for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
- this->repeated_string(i));
- }
- // repeated bytes repeated_bytes = 45;
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_bytes_size());
- for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->repeated_bytes(i));
- }
- // repeated .proto3_arena_lite_unittest.TestAllTypes.NestedMessage repeated_nested_message = 48;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_nested_message_size());
- total_size += 2UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->repeated_nested_message(static_cast<int>(i)));
- }
- }
- // repeated .proto3_arena_lite_unittest.ForeignMessage repeated_foreign_message = 49;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_foreign_message_size());
- total_size += 2UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->repeated_foreign_message(static_cast<int>(i)));
- }
- }
- // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_import_message_size());
- total_size += 2UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->repeated_import_message(static_cast<int>(i)));
- }
- }
- // repeated .proto3_arena_lite_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 51;
- {
- size_t data_size = 0;
- unsigned int count = static_cast<unsigned int>(this->repeated_nested_enum_size());for (unsigned int i = 0; i < count; i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
- this->repeated_nested_enum(static_cast<int>(i)));
- }
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_nested_enum_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated .proto3_arena_lite_unittest.ForeignEnum repeated_foreign_enum = 52;
- {
- size_t data_size = 0;
- unsigned int count = static_cast<unsigned int>(this->repeated_foreign_enum_size());for (unsigned int i = 0; i < count; i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
- this->repeated_foreign_enum(static_cast<int>(i)));
- }
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _repeated_foreign_enum_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_string_piece_size());
- for (int i = 0, n = this->repeated_string_piece_size(); i < n; i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
- this->repeated_string_piece(i));
- }
- // repeated string repeated_cord = 55 [ctype = CORD];
- total_size += 2 *
- ::google::protobuf::internal::FromIntSize(this->repeated_cord_size());
- for (int i = 0, n = this->repeated_cord_size(); i < n; i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
- this->repeated_cord(i));
- }
- // repeated .proto3_arena_lite_unittest.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_lazy_message_size());
- total_size += 2UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->repeated_lazy_message(static_cast<int>(i)));
- }
- }
- // string optional_string = 14;
- if (this->optional_string().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->optional_string());
- }
- // bytes optional_bytes = 15;
- if (this->optional_bytes().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->optional_bytes());
- }
- // string optional_string_piece = 24 [ctype = STRING_PIECE];
- if (this->optional_string_piece().size() > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->optional_string_piece());
- }
- // string optional_cord = 25 [ctype = CORD];
- if (this->optional_cord().size() > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->optional_cord());
- }
- // .proto3_arena_lite_unittest.TestAllTypes.NestedMessage optional_nested_message = 18;
- if (this->has_optional_nested_message()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *optional_nested_message_);
- }
- // .proto3_arena_lite_unittest.ForeignMessage optional_foreign_message = 19;
- if (this->has_optional_foreign_message()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *optional_foreign_message_);
- }
- // .protobuf_unittest_import.ImportMessage optional_import_message = 20;
- if (this->has_optional_import_message()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *optional_import_message_);
- }
- // .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
- if (this->has_optional_public_import_message()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *optional_public_import_message_);
- }
- // .proto3_arena_lite_unittest.TestAllTypes.NestedMessage optional_lazy_message = 27 [lazy = true];
- if (this->has_optional_lazy_message()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *optional_lazy_message_);
- }
- // int64 optional_int64 = 2;
- if (this->optional_int64() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int64Size(
- this->optional_int64());
- }
- // int32 optional_int32 = 1;
- if (this->optional_int32() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->optional_int32());
- }
- // uint32 optional_uint32 = 3;
- if (this->optional_uint32() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt32Size(
- this->optional_uint32());
- }
- // uint64 optional_uint64 = 4;
- if (this->optional_uint64() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt64Size(
- this->optional_uint64());
- }
- // sint64 optional_sint64 = 6;
- if (this->optional_sint64() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::SInt64Size(
- this->optional_sint64());
- }
- // sint32 optional_sint32 = 5;
- if (this->optional_sint32() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::SInt32Size(
- this->optional_sint32());
- }
- // fixed32 optional_fixed32 = 7;
- if (this->optional_fixed32() != 0) {
- total_size += 1 + 4;
- }
- // fixed64 optional_fixed64 = 8;
- if (this->optional_fixed64() != 0) {
- total_size += 1 + 8;
- }
- // sfixed64 optional_sfixed64 = 10;
- if (this->optional_sfixed64() != 0) {
- total_size += 1 + 8;
- }
- // sfixed32 optional_sfixed32 = 9;
- if (this->optional_sfixed32() != 0) {
- total_size += 1 + 4;
- }
- // float optional_float = 11;
- if (this->optional_float() != 0) {
- total_size += 1 + 4;
- }
- // double optional_double = 12;
- if (this->optional_double() != 0) {
- total_size += 1 + 8;
- }
- // bool optional_bool = 13;
- if (this->optional_bool() != 0) {
- total_size += 1 + 1;
- }
- // .proto3_arena_lite_unittest.TestAllTypes.NestedEnum optional_nested_enum = 21;
- if (this->optional_nested_enum() != 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_nested_enum());
- }
- // .proto3_arena_lite_unittest.ForeignEnum optional_foreign_enum = 22;
- if (this->optional_foreign_enum() != 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_foreign_enum());
- }
- switch (oneof_field_case()) {
- // uint32 oneof_uint32 = 111;
- case kOneofUint32: {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::UInt32Size(
- this->oneof_uint32());
- break;
- }
- // .proto3_arena_lite_unittest.TestAllTypes.NestedMessage oneof_nested_message = 112;
- case kOneofNestedMessage: {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *oneof_field_.oneof_nested_message_);
- break;
- }
- // string oneof_string = 113;
- case kOneofString: {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->oneof_string());
- break;
- }
- // bytes oneof_bytes = 114;
- case kOneofBytes: {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->oneof_bytes());
- break;
- }
- case ONEOF_FIELD_NOT_SET: {
- break;
- }
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void TestAllTypes::CheckTypeAndMergeFrom(
- const ::google::protobuf::MessageLite& from) {
- MergeFrom(*::google::protobuf::down_cast<const TestAllTypes*>(&from));
- }
- void TestAllTypes::MergeFrom(const TestAllTypes& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:proto3_arena_lite_unittest.TestAllTypes)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- repeated_int32_.MergeFrom(from.repeated_int32_);
- repeated_int64_.MergeFrom(from.repeated_int64_);
- repeated_uint32_.MergeFrom(from.repeated_uint32_);
- repeated_uint64_.MergeFrom(from.repeated_uint64_);
- repeated_sint32_.MergeFrom(from.repeated_sint32_);
- repeated_sint64_.MergeFrom(from.repeated_sint64_);
- repeated_fixed32_.MergeFrom(from.repeated_fixed32_);
- repeated_fixed64_.MergeFrom(from.repeated_fixed64_);
- repeated_sfixed32_.MergeFrom(from.repeated_sfixed32_);
- repeated_sfixed64_.MergeFrom(from.repeated_sfixed64_);
- repeated_float_.MergeFrom(from.repeated_float_);
- repeated_double_.MergeFrom(from.repeated_double_);
- repeated_bool_.MergeFrom(from.repeated_bool_);
- repeated_string_.MergeFrom(from.repeated_string_);
- repeated_bytes_.MergeFrom(from.repeated_bytes_);
- repeated_nested_message_.MergeFrom(from.repeated_nested_message_);
- repeated_foreign_message_.MergeFrom(from.repeated_foreign_message_);
- repeated_import_message_.MergeFrom(from.repeated_import_message_);
- repeated_nested_enum_.MergeFrom(from.repeated_nested_enum_);
- repeated_foreign_enum_.MergeFrom(from.repeated_foreign_enum_);
- repeated_string_piece_.MergeFrom(from.repeated_string_piece_);
- repeated_cord_.MergeFrom(from.repeated_cord_);
- repeated_lazy_message_.MergeFrom(from.repeated_lazy_message_);
- if (from.optional_string().size() > 0) {
- set_optional_string(from.optional_string());
- }
- if (from.optional_bytes().size() > 0) {
- set_optional_bytes(from.optional_bytes());
- }
- if (from.optional_string_piece().size() > 0) {
- set_optional_string_piece(from.optional_string_piece());
- }
- if (from.optional_cord().size() > 0) {
- set_optional_cord(from.optional_cord());
- }
- if (from.has_optional_nested_message()) {
- mutable_optional_nested_message()->::proto3_arena_lite_unittest::TestAllTypes_NestedMessage::MergeFrom(from.optional_nested_message());
- }
- if (from.has_optional_foreign_message()) {
- mutable_optional_foreign_message()->::proto3_arena_lite_unittest::ForeignMessage::MergeFrom(from.optional_foreign_message());
- }
- if (from.has_optional_import_message()) {
- mutable_optional_import_message()->::protobuf_unittest_import::ImportMessage::MergeFrom(from.optional_import_message());
- }
- if (from.has_optional_public_import_message()) {
- mutable_optional_public_import_message()->::protobuf_unittest_import::PublicImportMessage::MergeFrom(from.optional_public_import_message());
- }
- if (from.has_optional_lazy_message()) {
- mutable_optional_lazy_message()->::proto3_arena_lite_unittest::TestAllTypes_NestedMessage::MergeFrom(from.optional_lazy_message());
- }
- if (from.optional_int64() != 0) {
- set_optional_int64(from.optional_int64());
- }
- if (from.optional_int32() != 0) {
- set_optional_int32(from.optional_int32());
- }
- if (from.optional_uint32() != 0) {
- set_optional_uint32(from.optional_uint32());
- }
- if (from.optional_uint64() != 0) {
- set_optional_uint64(from.optional_uint64());
- }
- if (from.optional_sint64() != 0) {
- set_optional_sint64(from.optional_sint64());
- }
- if (from.optional_sint32() != 0) {
- set_optional_sint32(from.optional_sint32());
- }
- if (from.optional_fixed32() != 0) {
- set_optional_fixed32(from.optional_fixed32());
- }
- if (from.optional_fixed64() != 0) {
- set_optional_fixed64(from.optional_fixed64());
- }
- if (from.optional_sfixed64() != 0) {
- set_optional_sfixed64(from.optional_sfixed64());
- }
- if (from.optional_sfixed32() != 0) {
- set_optional_sfixed32(from.optional_sfixed32());
- }
- if (from.optional_float() != 0) {
- set_optional_float(from.optional_float());
- }
- if (from.optional_double() != 0) {
- set_optional_double(from.optional_double());
- }
- if (from.optional_bool() != 0) {
- set_optional_bool(from.optional_bool());
- }
- if (from.optional_nested_enum() != 0) {
- set_optional_nested_enum(from.optional_nested_enum());
- }
- if (from.optional_foreign_enum() != 0) {
- set_optional_foreign_enum(from.optional_foreign_enum());
- }
- switch (from.oneof_field_case()) {
- case kOneofUint32: {
- set_oneof_uint32(from.oneof_uint32());
- break;
- }
- case kOneofNestedMessage: {
- mutable_oneof_nested_message()->::proto3_arena_lite_unittest::TestAllTypes_NestedMessage::MergeFrom(from.oneof_nested_message());
- break;
- }
- case kOneofString: {
- set_oneof_string(from.oneof_string());
- break;
- }
- case kOneofBytes: {
- set_oneof_bytes(from.oneof_bytes());
- break;
- }
- case ONEOF_FIELD_NOT_SET: {
- break;
- }
- }
- }
- void TestAllTypes::CopyFrom(const TestAllTypes& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:proto3_arena_lite_unittest.TestAllTypes)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TestAllTypes::IsInitialized() const {
- return true;
- }
- void TestAllTypes::Swap(TestAllTypes* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- TestAllTypes* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
- }
- void TestAllTypes::UnsafeArenaSwap(TestAllTypes* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
- }
- void TestAllTypes::InternalSwap(TestAllTypes* other) {
- using std::swap;
- repeated_int32_.InternalSwap(&other->repeated_int32_);
- repeated_int64_.InternalSwap(&other->repeated_int64_);
- repeated_uint32_.InternalSwap(&other->repeated_uint32_);
- repeated_uint64_.InternalSwap(&other->repeated_uint64_);
- repeated_sint32_.InternalSwap(&other->repeated_sint32_);
- repeated_sint64_.InternalSwap(&other->repeated_sint64_);
- repeated_fixed32_.InternalSwap(&other->repeated_fixed32_);
- repeated_fixed64_.InternalSwap(&other->repeated_fixed64_);
- repeated_sfixed32_.InternalSwap(&other->repeated_sfixed32_);
- repeated_sfixed64_.InternalSwap(&other->repeated_sfixed64_);
- repeated_float_.InternalSwap(&other->repeated_float_);
- repeated_double_.InternalSwap(&other->repeated_double_);
- repeated_bool_.InternalSwap(&other->repeated_bool_);
- repeated_string_.InternalSwap(CastToBase(&other->repeated_string_));
- repeated_bytes_.InternalSwap(CastToBase(&other->repeated_bytes_));
- CastToBase(&repeated_nested_message_)->InternalSwap(CastToBase(&other->repeated_nested_message_));
- CastToBase(&repeated_foreign_message_)->InternalSwap(CastToBase(&other->repeated_foreign_message_));
- CastToBase(&repeated_import_message_)->InternalSwap(CastToBase(&other->repeated_import_message_));
- repeated_nested_enum_.InternalSwap(&other->repeated_nested_enum_);
- repeated_foreign_enum_.InternalSwap(&other->repeated_foreign_enum_);
- repeated_string_piece_.InternalSwap(CastToBase(&other->repeated_string_piece_));
- repeated_cord_.InternalSwap(CastToBase(&other->repeated_cord_));
- CastToBase(&repeated_lazy_message_)->InternalSwap(CastToBase(&other->repeated_lazy_message_));
- optional_string_.Swap(&other->optional_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- optional_bytes_.Swap(&other->optional_bytes_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- optional_string_piece_.Swap(&other->optional_string_piece_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- optional_cord_.Swap(&other->optional_cord_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(optional_nested_message_, other->optional_nested_message_);
- swap(optional_foreign_message_, other->optional_foreign_message_);
- swap(optional_import_message_, other->optional_import_message_);
- swap(optional_public_import_message_, other->optional_public_import_message_);
- swap(optional_lazy_message_, other->optional_lazy_message_);
- swap(optional_int64_, other->optional_int64_);
- swap(optional_int32_, other->optional_int32_);
- swap(optional_uint32_, other->optional_uint32_);
- swap(optional_uint64_, other->optional_uint64_);
- swap(optional_sint64_, other->optional_sint64_);
- swap(optional_sint32_, other->optional_sint32_);
- swap(optional_fixed32_, other->optional_fixed32_);
- swap(optional_fixed64_, other->optional_fixed64_);
- swap(optional_sfixed64_, other->optional_sfixed64_);
- swap(optional_sfixed32_, other->optional_sfixed32_);
- swap(optional_float_, other->optional_float_);
- swap(optional_double_, other->optional_double_);
- swap(optional_bool_, other->optional_bool_);
- swap(optional_nested_enum_, other->optional_nested_enum_);
- swap(optional_foreign_enum_, other->optional_foreign_enum_);
- swap(oneof_field_, other->oneof_field_);
- swap(_oneof_case_[0], other->_oneof_case_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::std::string TestAllTypes::GetTypeName() const {
- return "proto3_arena_lite_unittest.TestAllTypes";
- }
- // ===================================================================
- void TestPackedTypes::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int TestPackedTypes::kPackedInt32FieldNumber;
- const int TestPackedTypes::kPackedInt64FieldNumber;
- const int TestPackedTypes::kPackedUint32FieldNumber;
- const int TestPackedTypes::kPackedUint64FieldNumber;
- const int TestPackedTypes::kPackedSint32FieldNumber;
- const int TestPackedTypes::kPackedSint64FieldNumber;
- const int TestPackedTypes::kPackedFixed32FieldNumber;
- const int TestPackedTypes::kPackedFixed64FieldNumber;
- const int TestPackedTypes::kPackedSfixed32FieldNumber;
- const int TestPackedTypes::kPackedSfixed64FieldNumber;
- const int TestPackedTypes::kPackedFloatFieldNumber;
- const int TestPackedTypes::kPackedDoubleFieldNumber;
- const int TestPackedTypes::kPackedBoolFieldNumber;
- const int TestPackedTypes::kPackedEnumFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestPackedTypes::TestPackedTypes()
- : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestPackedTypes.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:proto3_arena_lite_unittest.TestPackedTypes)
- }
- TestPackedTypes::TestPackedTypes(::google::protobuf::Arena* arena)
- : ::google::protobuf::MessageLite(),
- _internal_metadata_(arena),
- packed_int32_(arena),
- packed_int64_(arena),
- packed_uint32_(arena),
- packed_uint64_(arena),
- packed_sint32_(arena),
- packed_sint64_(arena),
- packed_fixed32_(arena),
- packed_fixed64_(arena),
- packed_sfixed32_(arena),
- packed_sfixed64_(arena),
- packed_float_(arena),
- packed_double_(arena),
- packed_bool_(arena),
- packed_enum_(arena) {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestPackedTypes.base);
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:proto3_arena_lite_unittest.TestPackedTypes)
- }
- TestPackedTypes::TestPackedTypes(const TestPackedTypes& from)
- : ::google::protobuf::MessageLite(),
- _internal_metadata_(NULL),
- packed_int32_(from.packed_int32_),
- packed_int64_(from.packed_int64_),
- packed_uint32_(from.packed_uint32_),
- packed_uint64_(from.packed_uint64_),
- packed_sint32_(from.packed_sint32_),
- packed_sint64_(from.packed_sint64_),
- packed_fixed32_(from.packed_fixed32_),
- packed_fixed64_(from.packed_fixed64_),
- packed_sfixed32_(from.packed_sfixed32_),
- packed_sfixed64_(from.packed_sfixed64_),
- packed_float_(from.packed_float_),
- packed_double_(from.packed_double_),
- packed_bool_(from.packed_bool_),
- packed_enum_(from.packed_enum_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- // @@protoc_insertion_point(copy_constructor:proto3_arena_lite_unittest.TestPackedTypes)
- }
- void TestPackedTypes::SharedCtor() {
- }
- TestPackedTypes::~TestPackedTypes() {
- // @@protoc_insertion_point(destructor:proto3_arena_lite_unittest.TestPackedTypes)
- SharedDtor();
- }
- void TestPackedTypes::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
- }
- void TestPackedTypes::ArenaDtor(void* object) {
- TestPackedTypes* _this = reinterpret_cast< TestPackedTypes* >(object);
- (void)_this;
- }
- void TestPackedTypes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
- }
- void TestPackedTypes::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const TestPackedTypes& TestPackedTypes::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestPackedTypes.base);
- return *internal_default_instance();
- }
- void TestPackedTypes::Clear() {
- // @@protoc_insertion_point(message_clear_start:proto3_arena_lite_unittest.TestPackedTypes)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- packed_int32_.Clear();
- packed_int64_.Clear();
- packed_uint32_.Clear();
- packed_uint64_.Clear();
- packed_sint32_.Clear();
- packed_sint64_.Clear();
- packed_fixed32_.Clear();
- packed_fixed64_.Clear();
- packed_sfixed32_.Clear();
- packed_sfixed64_.Clear();
- packed_float_.Clear();
- packed_double_.Clear();
- packed_bool_.Clear();
- packed_enum_.Clear();
- _internal_metadata_.Clear();
- }
- bool TestPackedTypes::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
- &_internal_metadata_);
- ::google::protobuf::io::StringOutputStream unknown_fields_output(
- unknown_fields_setter.buffer());
- ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
- &unknown_fields_output, false);
- // @@protoc_insertion_point(parse_start:proto3_arena_lite_unittest.TestPackedTypes)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // repeated int32 packed_int32 = 90 [packed = true];
- case 90: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(210u /* 722 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, this->mutable_packed_int32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(208u /* 720 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- 2, 722u, input, this->mutable_packed_int32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated int64 packed_int64 = 91 [packed = true];
- case 91: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(218u /* 730 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, this->mutable_packed_int64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(216u /* 728 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- 2, 730u, input, this->mutable_packed_int64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated uint32 packed_uint32 = 92 [packed = true];
- case 92: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(226u /* 738 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, this->mutable_packed_uint32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(224u /* 736 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- 2, 738u, input, this->mutable_packed_uint32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated uint64 packed_uint64 = 93 [packed = true];
- case 93: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(234u /* 746 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, this->mutable_packed_uint64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(232u /* 744 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- 2, 746u, input, this->mutable_packed_uint64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sint32 packed_sint32 = 94 [packed = true];
- case 94: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(242u /* 754 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- input, this->mutable_packed_sint32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(240u /* 752 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- 2, 754u, input, this->mutable_packed_sint32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sint64 packed_sint64 = 95 [packed = true];
- case 95: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(250u /* 762 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- input, this->mutable_packed_sint64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(248u /* 760 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- 2, 762u, input, this->mutable_packed_sint64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated fixed32 packed_fixed32 = 96 [packed = true];
- case 96: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(2u /* 770 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
- input, this->mutable_packed_fixed32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(5u /* 773 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
- 2, 770u, input, this->mutable_packed_fixed32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated fixed64 packed_fixed64 = 97 [packed = true];
- case 97: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 778 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
- input, this->mutable_packed_fixed64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(9u /* 777 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
- 2, 778u, input, this->mutable_packed_fixed64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
- case 98: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 786 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
- input, this->mutable_packed_sfixed32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(21u /* 789 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
- 2, 786u, input, this->mutable_packed_sfixed32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
- case 99: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u /* 794 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
- input, this->mutable_packed_sfixed64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(25u /* 793 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
- 2, 794u, input, this->mutable_packed_sfixed64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated float packed_float = 100 [packed = true];
- case 100: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- input, this->mutable_packed_float())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(37u /* 805 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- 2, 802u, input, this->mutable_packed_float())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated double packed_double = 101 [packed = true];
- case 101: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u /* 810 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, this->mutable_packed_double())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(41u /* 809 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- 2, 810u, input, this->mutable_packed_double())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated bool packed_bool = 102 [packed = true];
- case 102: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(50u /* 818 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, this->mutable_packed_bool())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(48u /* 816 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- 2, 818u, input, this->mutable_packed_bool())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .proto3_arena_lite_unittest.ForeignEnum packed_enum = 103 [packed = true];
- case 103: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(58u /* 826 & 0xFF */)) {
- ::google::protobuf::uint32 length;
- DO_(input->ReadVarint32(&length));
- ::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(static_cast<int>(length));
- while (input->BytesUntilLimit() > 0) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- add_packed_enum(static_cast< ::proto3_arena_lite_unittest::ForeignEnum >(value));
- }
- input->PopLimit(limit);
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(56u /* 824 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- add_packed_enum(static_cast< ::proto3_arena_lite_unittest::ForeignEnum >(value));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(
- input, tag, &unknown_fields_stream));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:proto3_arena_lite_unittest.TestPackedTypes)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:proto3_arena_lite_unittest.TestPackedTypes)
- return false;
- #undef DO_
- }
- void TestPackedTypes::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:proto3_arena_lite_unittest.TestPackedTypes)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // repeated int32 packed_int32 = 90 [packed = true];
- if (this->packed_int32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(90, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _packed_int32_cached_byte_size_));
- }
- for (int i = 0, n = this->packed_int32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
- this->packed_int32(i), output);
- }
- // repeated int64 packed_int64 = 91 [packed = true];
- if (this->packed_int64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(91, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _packed_int64_cached_byte_size_));
- }
- for (int i = 0, n = this->packed_int64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag(
- this->packed_int64(i), output);
- }
- // repeated uint32 packed_uint32 = 92 [packed = true];
- if (this->packed_uint32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(92, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _packed_uint32_cached_byte_size_));
- }
- for (int i = 0, n = this->packed_uint32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32NoTag(
- this->packed_uint32(i), output);
- }
- // repeated uint64 packed_uint64 = 93 [packed = true];
- if (this->packed_uint64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(93, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _packed_uint64_cached_byte_size_));
- }
- for (int i = 0, n = this->packed_uint64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64NoTag(
- this->packed_uint64(i), output);
- }
- // repeated sint32 packed_sint32 = 94 [packed = true];
- if (this->packed_sint32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(94, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _packed_sint32_cached_byte_size_));
- }
- for (int i = 0, n = this->packed_sint32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt32NoTag(
- this->packed_sint32(i), output);
- }
- // repeated sint64 packed_sint64 = 95 [packed = true];
- if (this->packed_sint64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(95, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _packed_sint64_cached_byte_size_));
- }
- for (int i = 0, n = this->packed_sint64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt64NoTag(
- this->packed_sint64(i), output);
- }
- // repeated fixed32 packed_fixed32 = 96 [packed = true];
- if (this->packed_fixed32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(96, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _packed_fixed32_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteFixed32Array(
- this->packed_fixed32().data(), this->packed_fixed32_size(), output);
- }
- // repeated fixed64 packed_fixed64 = 97 [packed = true];
- if (this->packed_fixed64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(97, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _packed_fixed64_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteFixed64Array(
- this->packed_fixed64().data(), this->packed_fixed64_size(), output);
- }
- // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
- if (this->packed_sfixed32_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(98, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _packed_sfixed32_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteSFixed32Array(
- this->packed_sfixed32().data(), this->packed_sfixed32_size(), output);
- }
- // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
- if (this->packed_sfixed64_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(99, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _packed_sfixed64_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteSFixed64Array(
- this->packed_sfixed64().data(), this->packed_sfixed64_size(), output);
- }
- // repeated float packed_float = 100 [packed = true];
- if (this->packed_float_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(100, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _packed_float_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteFloatArray(
- this->packed_float().data(), this->packed_float_size(), output);
- }
- // repeated double packed_double = 101 [packed = true];
- if (this->packed_double_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(101, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _packed_double_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteDoubleArray(
- this->packed_double().data(), this->packed_double_size(), output);
- }
- // repeated bool packed_bool = 102 [packed = true];
- if (this->packed_bool_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(102, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
- output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
- _packed_bool_cached_byte_size_));
- ::google::protobuf::internal::WireFormatLite::WriteBoolArray(
- this->packed_bool().data(), this->packed_bool_size(), output);
- }
- // repeated .proto3_arena_lite_unittest.ForeignEnum packed_enum = 103 [packed = true];
- if (this->packed_enum_size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteTag(
- 103,
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
- output);
- output->WriteVarint32(
- static_cast< ::google::protobuf::uint32>(_packed_enum_cached_byte_size_));
- }
- for (int i = 0, n = this->packed_enum_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteEnumNoTag(
- this->packed_enum(i), output);
- }
- output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).data(),
- static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size()));
- // @@protoc_insertion_point(serialize_end:proto3_arena_lite_unittest.TestPackedTypes)
- }
- size_t TestPackedTypes::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:proto3_arena_lite_unittest.TestPackedTypes)
- size_t total_size = 0;
- total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size();
- // repeated int32 packed_int32 = 90 [packed = true];
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- Int32Size(this->packed_int32_);
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _packed_int32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated int64 packed_int64 = 91 [packed = true];
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- Int64Size(this->packed_int64_);
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _packed_int64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated uint32 packed_uint32 = 92 [packed = true];
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- UInt32Size(this->packed_uint32_);
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _packed_uint32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated uint64 packed_uint64 = 93 [packed = true];
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- UInt64Size(this->packed_uint64_);
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _packed_uint64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated sint32 packed_sint32 = 94 [packed = true];
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- SInt32Size(this->packed_sint32_);
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _packed_sint32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated sint64 packed_sint64 = 95 [packed = true];
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- SInt64Size(this->packed_sint64_);
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _packed_sint64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated fixed32 packed_fixed32 = 96 [packed = true];
- {
- unsigned int count = static_cast<unsigned int>(this->packed_fixed32_size());
- size_t data_size = 4UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _packed_fixed32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated fixed64 packed_fixed64 = 97 [packed = true];
- {
- unsigned int count = static_cast<unsigned int>(this->packed_fixed64_size());
- size_t data_size = 8UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _packed_fixed64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated sfixed32 packed_sfixed32 = 98 [packed = true];
- {
- unsigned int count = static_cast<unsigned int>(this->packed_sfixed32_size());
- size_t data_size = 4UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _packed_sfixed32_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated sfixed64 packed_sfixed64 = 99 [packed = true];
- {
- unsigned int count = static_cast<unsigned int>(this->packed_sfixed64_size());
- size_t data_size = 8UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _packed_sfixed64_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated float packed_float = 100 [packed = true];
- {
- unsigned int count = static_cast<unsigned int>(this->packed_float_size());
- size_t data_size = 4UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _packed_float_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated double packed_double = 101 [packed = true];
- {
- unsigned int count = static_cast<unsigned int>(this->packed_double_size());
- size_t data_size = 8UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _packed_double_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated bool packed_bool = 102 [packed = true];
- {
- unsigned int count = static_cast<unsigned int>(this->packed_bool_size());
- size_t data_size = 1UL * count;
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _packed_bool_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- // repeated .proto3_arena_lite_unittest.ForeignEnum packed_enum = 103 [packed = true];
- {
- size_t data_size = 0;
- unsigned int count = static_cast<unsigned int>(this->packed_enum_size());for (unsigned int i = 0; i < count; i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
- this->packed_enum(static_cast<int>(i)));
- }
- if (data_size > 0) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- static_cast< ::google::protobuf::int32>(data_size));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _packed_enum_cached_byte_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- total_size += data_size;
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void TestPackedTypes::CheckTypeAndMergeFrom(
- const ::google::protobuf::MessageLite& from) {
- MergeFrom(*::google::protobuf::down_cast<const TestPackedTypes*>(&from));
- }
- void TestPackedTypes::MergeFrom(const TestPackedTypes& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:proto3_arena_lite_unittest.TestPackedTypes)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- packed_int32_.MergeFrom(from.packed_int32_);
- packed_int64_.MergeFrom(from.packed_int64_);
- packed_uint32_.MergeFrom(from.packed_uint32_);
- packed_uint64_.MergeFrom(from.packed_uint64_);
- packed_sint32_.MergeFrom(from.packed_sint32_);
- packed_sint64_.MergeFrom(from.packed_sint64_);
- packed_fixed32_.MergeFrom(from.packed_fixed32_);
- packed_fixed64_.MergeFrom(from.packed_fixed64_);
- packed_sfixed32_.MergeFrom(from.packed_sfixed32_);
- packed_sfixed64_.MergeFrom(from.packed_sfixed64_);
- packed_float_.MergeFrom(from.packed_float_);
- packed_double_.MergeFrom(from.packed_double_);
- packed_bool_.MergeFrom(from.packed_bool_);
- packed_enum_.MergeFrom(from.packed_enum_);
- }
- void TestPackedTypes::CopyFrom(const TestPackedTypes& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:proto3_arena_lite_unittest.TestPackedTypes)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TestPackedTypes::IsInitialized() const {
- return true;
- }
- void TestPackedTypes::Swap(TestPackedTypes* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- TestPackedTypes* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
- }
- void TestPackedTypes::UnsafeArenaSwap(TestPackedTypes* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
- }
- void TestPackedTypes::InternalSwap(TestPackedTypes* other) {
- using std::swap;
- packed_int32_.InternalSwap(&other->packed_int32_);
- packed_int64_.InternalSwap(&other->packed_int64_);
- packed_uint32_.InternalSwap(&other->packed_uint32_);
- packed_uint64_.InternalSwap(&other->packed_uint64_);
- packed_sint32_.InternalSwap(&other->packed_sint32_);
- packed_sint64_.InternalSwap(&other->packed_sint64_);
- packed_fixed32_.InternalSwap(&other->packed_fixed32_);
- packed_fixed64_.InternalSwap(&other->packed_fixed64_);
- packed_sfixed32_.InternalSwap(&other->packed_sfixed32_);
- packed_sfixed64_.InternalSwap(&other->packed_sfixed64_);
- packed_float_.InternalSwap(&other->packed_float_);
- packed_double_.InternalSwap(&other->packed_double_);
- packed_bool_.InternalSwap(&other->packed_bool_);
- packed_enum_.InternalSwap(&other->packed_enum_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::std::string TestPackedTypes::GetTypeName() const {
- return "proto3_arena_lite_unittest.TestPackedTypes";
- }
- // ===================================================================
- void TestUnpackedTypes::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int TestUnpackedTypes::kRepeatedInt32FieldNumber;
- const int TestUnpackedTypes::kRepeatedInt64FieldNumber;
- const int TestUnpackedTypes::kRepeatedUint32FieldNumber;
- const int TestUnpackedTypes::kRepeatedUint64FieldNumber;
- const int TestUnpackedTypes::kRepeatedSint32FieldNumber;
- const int TestUnpackedTypes::kRepeatedSint64FieldNumber;
- const int TestUnpackedTypes::kRepeatedFixed32FieldNumber;
- const int TestUnpackedTypes::kRepeatedFixed64FieldNumber;
- const int TestUnpackedTypes::kRepeatedSfixed32FieldNumber;
- const int TestUnpackedTypes::kRepeatedSfixed64FieldNumber;
- const int TestUnpackedTypes::kRepeatedFloatFieldNumber;
- const int TestUnpackedTypes::kRepeatedDoubleFieldNumber;
- const int TestUnpackedTypes::kRepeatedBoolFieldNumber;
- const int TestUnpackedTypes::kRepeatedNestedEnumFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestUnpackedTypes::TestUnpackedTypes()
- : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestUnpackedTypes.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:proto3_arena_lite_unittest.TestUnpackedTypes)
- }
- TestUnpackedTypes::TestUnpackedTypes(::google::protobuf::Arena* arena)
- : ::google::protobuf::MessageLite(),
- _internal_metadata_(arena),
- repeated_int32_(arena),
- repeated_int64_(arena),
- repeated_uint32_(arena),
- repeated_uint64_(arena),
- repeated_sint32_(arena),
- repeated_sint64_(arena),
- repeated_fixed32_(arena),
- repeated_fixed64_(arena),
- repeated_sfixed32_(arena),
- repeated_sfixed64_(arena),
- repeated_float_(arena),
- repeated_double_(arena),
- repeated_bool_(arena),
- repeated_nested_enum_(arena) {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestUnpackedTypes.base);
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:proto3_arena_lite_unittest.TestUnpackedTypes)
- }
- TestUnpackedTypes::TestUnpackedTypes(const TestUnpackedTypes& from)
- : ::google::protobuf::MessageLite(),
- _internal_metadata_(NULL),
- repeated_int32_(from.repeated_int32_),
- repeated_int64_(from.repeated_int64_),
- repeated_uint32_(from.repeated_uint32_),
- repeated_uint64_(from.repeated_uint64_),
- repeated_sint32_(from.repeated_sint32_),
- repeated_sint64_(from.repeated_sint64_),
- repeated_fixed32_(from.repeated_fixed32_),
- repeated_fixed64_(from.repeated_fixed64_),
- repeated_sfixed32_(from.repeated_sfixed32_),
- repeated_sfixed64_(from.repeated_sfixed64_),
- repeated_float_(from.repeated_float_),
- repeated_double_(from.repeated_double_),
- repeated_bool_(from.repeated_bool_),
- repeated_nested_enum_(from.repeated_nested_enum_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- // @@protoc_insertion_point(copy_constructor:proto3_arena_lite_unittest.TestUnpackedTypes)
- }
- void TestUnpackedTypes::SharedCtor() {
- }
- TestUnpackedTypes::~TestUnpackedTypes() {
- // @@protoc_insertion_point(destructor:proto3_arena_lite_unittest.TestUnpackedTypes)
- SharedDtor();
- }
- void TestUnpackedTypes::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
- }
- void TestUnpackedTypes::ArenaDtor(void* object) {
- TestUnpackedTypes* _this = reinterpret_cast< TestUnpackedTypes* >(object);
- (void)_this;
- }
- void TestUnpackedTypes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
- }
- void TestUnpackedTypes::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const TestUnpackedTypes& TestUnpackedTypes::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestUnpackedTypes.base);
- return *internal_default_instance();
- }
- void TestUnpackedTypes::Clear() {
- // @@protoc_insertion_point(message_clear_start:proto3_arena_lite_unittest.TestUnpackedTypes)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- repeated_int32_.Clear();
- repeated_int64_.Clear();
- repeated_uint32_.Clear();
- repeated_uint64_.Clear();
- repeated_sint32_.Clear();
- repeated_sint64_.Clear();
- repeated_fixed32_.Clear();
- repeated_fixed64_.Clear();
- repeated_sfixed32_.Clear();
- repeated_sfixed64_.Clear();
- repeated_float_.Clear();
- repeated_double_.Clear();
- repeated_bool_.Clear();
- repeated_nested_enum_.Clear();
- _internal_metadata_.Clear();
- }
- bool TestUnpackedTypes::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
- &_internal_metadata_);
- ::google::protobuf::io::StringOutputStream unknown_fields_output(
- unknown_fields_setter.buffer());
- ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
- &unknown_fields_output, false);
- // @@protoc_insertion_point(parse_start:proto3_arena_lite_unittest.TestUnpackedTypes)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // repeated int32 repeated_int32 = 1 [packed = false];
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- 1, 8u, input, this->mutable_repeated_int32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, this->mutable_repeated_int32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated int64 repeated_int64 = 2 [packed = false];
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- 1, 16u, input, this->mutable_repeated_int64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, this->mutable_repeated_int64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated uint32 repeated_uint32 = 3 [packed = false];
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- 1, 24u, input, this->mutable_repeated_uint32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, this->mutable_repeated_uint32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated uint64 repeated_uint64 = 4 [packed = false];
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- 1, 32u, input, this->mutable_repeated_uint64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, this->mutable_repeated_uint64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sint32 repeated_sint32 = 5 [packed = false];
- case 5: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- 1, 40u, input, this->mutable_repeated_sint32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
- input, this->mutable_repeated_sint32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sint64 repeated_sint64 = 6 [packed = false];
- case 6: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- 1, 48u, input, this->mutable_repeated_sint64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
- input, this->mutable_repeated_sint64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated fixed32 repeated_fixed32 = 7 [packed = false];
- case 7: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
- 1, 61u, input, this->mutable_repeated_fixed32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
- input, this->mutable_repeated_fixed32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated fixed64 repeated_fixed64 = 8 [packed = false];
- case 8: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(65u /* 65 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
- 1, 65u, input, this->mutable_repeated_fixed64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
- input, this->mutable_repeated_fixed64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sfixed32 repeated_sfixed32 = 9 [packed = false];
- case 9: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(77u /* 77 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
- 1, 77u, input, this->mutable_repeated_sfixed32())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
- input, this->mutable_repeated_sfixed32())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated sfixed64 repeated_sfixed64 = 10 [packed = false];
- case 10: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(81u /* 81 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
- 1, 81u, input, this->mutable_repeated_sfixed64())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
- input, this->mutable_repeated_sfixed64())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated float repeated_float = 11 [packed = false];
- case 11: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(93u /* 93 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- 1, 93u, input, this->mutable_repeated_float())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- input, this->mutable_repeated_float())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated double repeated_double = 12 [packed = false];
- case 12: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(97u /* 97 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- 1, 97u, input, this->mutable_repeated_double())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, this->mutable_repeated_double())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated bool repeated_bool = 13 [packed = false];
- case 13: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- 1, 104u, input, this->mutable_repeated_bool())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, this->mutable_repeated_bool())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .proto3_arena_lite_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 14 [packed = false];
- case 14: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(112u /* 112 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- add_repeated_nested_enum(static_cast< ::proto3_arena_lite_unittest::TestAllTypes_NestedEnum >(value));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedEnumPreserveUnknowns(
- input,
- 14,
- NULL,
- NULL,
- this->mutable_repeated_nested_enum())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(
- input, tag, &unknown_fields_stream));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:proto3_arena_lite_unittest.TestUnpackedTypes)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:proto3_arena_lite_unittest.TestUnpackedTypes)
- return false;
- #undef DO_
- }
- void TestUnpackedTypes::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:proto3_arena_lite_unittest.TestUnpackedTypes)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // repeated int32 repeated_int32 = 1 [packed = false];
- for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(
- 1, this->repeated_int32(i), output);
- }
- // repeated int64 repeated_int64 = 2 [packed = false];
- for (int i = 0, n = this->repeated_int64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(
- 2, this->repeated_int64(i), output);
- }
- // repeated uint32 repeated_uint32 = 3 [packed = false];
- for (int i = 0, n = this->repeated_uint32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(
- 3, this->repeated_uint32(i), output);
- }
- // repeated uint64 repeated_uint64 = 4 [packed = false];
- for (int i = 0, n = this->repeated_uint64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(
- 4, this->repeated_uint64(i), output);
- }
- // repeated sint32 repeated_sint32 = 5 [packed = false];
- for (int i = 0, n = this->repeated_sint32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt32(
- 5, this->repeated_sint32(i), output);
- }
- // repeated sint64 repeated_sint64 = 6 [packed = false];
- for (int i = 0, n = this->repeated_sint64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSInt64(
- 6, this->repeated_sint64(i), output);
- }
- // repeated fixed32 repeated_fixed32 = 7 [packed = false];
- for (int i = 0, n = this->repeated_fixed32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteFixed32(
- 7, this->repeated_fixed32(i), output);
- }
- // repeated fixed64 repeated_fixed64 = 8 [packed = false];
- for (int i = 0, n = this->repeated_fixed64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteFixed64(
- 8, this->repeated_fixed64(i), output);
- }
- // repeated sfixed32 repeated_sfixed32 = 9 [packed = false];
- for (int i = 0, n = this->repeated_sfixed32_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSFixed32(
- 9, this->repeated_sfixed32(i), output);
- }
- // repeated sfixed64 repeated_sfixed64 = 10 [packed = false];
- for (int i = 0, n = this->repeated_sfixed64_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteSFixed64(
- 10, this->repeated_sfixed64(i), output);
- }
- // repeated float repeated_float = 11 [packed = false];
- for (int i = 0, n = this->repeated_float_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteFloat(
- 11, this->repeated_float(i), output);
- }
- // repeated double repeated_double = 12 [packed = false];
- for (int i = 0, n = this->repeated_double_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(
- 12, this->repeated_double(i), output);
- }
- // repeated bool repeated_bool = 13 [packed = false];
- for (int i = 0, n = this->repeated_bool_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteBool(
- 13, this->repeated_bool(i), output);
- }
- // repeated .proto3_arena_lite_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 14 [packed = false];
- for (int i = 0, n = this->repeated_nested_enum_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 14, this->repeated_nested_enum(i), output);
- }
- output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).data(),
- static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size()));
- // @@protoc_insertion_point(serialize_end:proto3_arena_lite_unittest.TestUnpackedTypes)
- }
- size_t TestUnpackedTypes::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:proto3_arena_lite_unittest.TestUnpackedTypes)
- size_t total_size = 0;
- total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size();
- // repeated int32 repeated_int32 = 1 [packed = false];
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- Int32Size(this->repeated_int32_);
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->repeated_int32_size());
- total_size += data_size;
- }
- // repeated int64 repeated_int64 = 2 [packed = false];
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- Int64Size(this->repeated_int64_);
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->repeated_int64_size());
- total_size += data_size;
- }
- // repeated uint32 repeated_uint32 = 3 [packed = false];
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- UInt32Size(this->repeated_uint32_);
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->repeated_uint32_size());
- total_size += data_size;
- }
- // repeated uint64 repeated_uint64 = 4 [packed = false];
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- UInt64Size(this->repeated_uint64_);
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->repeated_uint64_size());
- total_size += data_size;
- }
- // repeated sint32 repeated_sint32 = 5 [packed = false];
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- SInt32Size(this->repeated_sint32_);
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->repeated_sint32_size());
- total_size += data_size;
- }
- // repeated sint64 repeated_sint64 = 6 [packed = false];
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- SInt64Size(this->repeated_sint64_);
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->repeated_sint64_size());
- total_size += data_size;
- }
- // repeated fixed32 repeated_fixed32 = 7 [packed = false];
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_fixed32_size());
- size_t data_size = 4UL * count;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->repeated_fixed32_size());
- total_size += data_size;
- }
- // repeated fixed64 repeated_fixed64 = 8 [packed = false];
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_fixed64_size());
- size_t data_size = 8UL * count;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->repeated_fixed64_size());
- total_size += data_size;
- }
- // repeated sfixed32 repeated_sfixed32 = 9 [packed = false];
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_sfixed32_size());
- size_t data_size = 4UL * count;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->repeated_sfixed32_size());
- total_size += data_size;
- }
- // repeated sfixed64 repeated_sfixed64 = 10 [packed = false];
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_sfixed64_size());
- size_t data_size = 8UL * count;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->repeated_sfixed64_size());
- total_size += data_size;
- }
- // repeated float repeated_float = 11 [packed = false];
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_float_size());
- size_t data_size = 4UL * count;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->repeated_float_size());
- total_size += data_size;
- }
- // repeated double repeated_double = 12 [packed = false];
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_double_size());
- size_t data_size = 8UL * count;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->repeated_double_size());
- total_size += data_size;
- }
- // repeated bool repeated_bool = 13 [packed = false];
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_bool_size());
- size_t data_size = 1UL * count;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->repeated_bool_size());
- total_size += data_size;
- }
- // repeated .proto3_arena_lite_unittest.TestAllTypes.NestedEnum repeated_nested_enum = 14 [packed = false];
- {
- size_t data_size = 0;
- unsigned int count = static_cast<unsigned int>(this->repeated_nested_enum_size());for (unsigned int i = 0; i < count; i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
- this->repeated_nested_enum(static_cast<int>(i)));
- }
- total_size += (1UL * count) + data_size;
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void TestUnpackedTypes::CheckTypeAndMergeFrom(
- const ::google::protobuf::MessageLite& from) {
- MergeFrom(*::google::protobuf::down_cast<const TestUnpackedTypes*>(&from));
- }
- void TestUnpackedTypes::MergeFrom(const TestUnpackedTypes& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:proto3_arena_lite_unittest.TestUnpackedTypes)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- repeated_int32_.MergeFrom(from.repeated_int32_);
- repeated_int64_.MergeFrom(from.repeated_int64_);
- repeated_uint32_.MergeFrom(from.repeated_uint32_);
- repeated_uint64_.MergeFrom(from.repeated_uint64_);
- repeated_sint32_.MergeFrom(from.repeated_sint32_);
- repeated_sint64_.MergeFrom(from.repeated_sint64_);
- repeated_fixed32_.MergeFrom(from.repeated_fixed32_);
- repeated_fixed64_.MergeFrom(from.repeated_fixed64_);
- repeated_sfixed32_.MergeFrom(from.repeated_sfixed32_);
- repeated_sfixed64_.MergeFrom(from.repeated_sfixed64_);
- repeated_float_.MergeFrom(from.repeated_float_);
- repeated_double_.MergeFrom(from.repeated_double_);
- repeated_bool_.MergeFrom(from.repeated_bool_);
- repeated_nested_enum_.MergeFrom(from.repeated_nested_enum_);
- }
- void TestUnpackedTypes::CopyFrom(const TestUnpackedTypes& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:proto3_arena_lite_unittest.TestUnpackedTypes)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TestUnpackedTypes::IsInitialized() const {
- return true;
- }
- void TestUnpackedTypes::Swap(TestUnpackedTypes* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- TestUnpackedTypes* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
- }
- void TestUnpackedTypes::UnsafeArenaSwap(TestUnpackedTypes* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
- }
- void TestUnpackedTypes::InternalSwap(TestUnpackedTypes* other) {
- using std::swap;
- repeated_int32_.InternalSwap(&other->repeated_int32_);
- repeated_int64_.InternalSwap(&other->repeated_int64_);
- repeated_uint32_.InternalSwap(&other->repeated_uint32_);
- repeated_uint64_.InternalSwap(&other->repeated_uint64_);
- repeated_sint32_.InternalSwap(&other->repeated_sint32_);
- repeated_sint64_.InternalSwap(&other->repeated_sint64_);
- repeated_fixed32_.InternalSwap(&other->repeated_fixed32_);
- repeated_fixed64_.InternalSwap(&other->repeated_fixed64_);
- repeated_sfixed32_.InternalSwap(&other->repeated_sfixed32_);
- repeated_sfixed64_.InternalSwap(&other->repeated_sfixed64_);
- repeated_float_.InternalSwap(&other->repeated_float_);
- repeated_double_.InternalSwap(&other->repeated_double_);
- repeated_bool_.InternalSwap(&other->repeated_bool_);
- repeated_nested_enum_.InternalSwap(&other->repeated_nested_enum_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::std::string TestUnpackedTypes::GetTypeName() const {
- return "proto3_arena_lite_unittest.TestUnpackedTypes";
- }
- // ===================================================================
- void NestedTestAllTypes::InitAsDefaultInstance() {
- ::proto3_arena_lite_unittest::_NestedTestAllTypes_default_instance_._instance.get_mutable()->child_ = const_cast< ::proto3_arena_lite_unittest::NestedTestAllTypes*>(
- ::proto3_arena_lite_unittest::NestedTestAllTypes::internal_default_instance());
- ::proto3_arena_lite_unittest::_NestedTestAllTypes_default_instance_._instance.get_mutable()->payload_ = const_cast< ::proto3_arena_lite_unittest::TestAllTypes*>(
- ::proto3_arena_lite_unittest::TestAllTypes::internal_default_instance());
- }
- void NestedTestAllTypes::unsafe_arena_set_allocated_child(
- ::proto3_arena_lite_unittest::NestedTestAllTypes* child) {
- if (GetArenaNoVirtual() == NULL) {
- delete child_;
- }
- child_ = child;
- if (child) {
-
- } else {
-
- }
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:proto3_arena_lite_unittest.NestedTestAllTypes.child)
- }
- void NestedTestAllTypes::unsafe_arena_set_allocated_payload(
- ::proto3_arena_lite_unittest::TestAllTypes* payload) {
- if (GetArenaNoVirtual() == NULL) {
- delete payload_;
- }
- payload_ = payload;
- if (payload) {
-
- } else {
-
- }
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:proto3_arena_lite_unittest.NestedTestAllTypes.payload)
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int NestedTestAllTypes::kChildFieldNumber;
- const int NestedTestAllTypes::kPayloadFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- NestedTestAllTypes::NestedTestAllTypes()
- : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_NestedTestAllTypes.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:proto3_arena_lite_unittest.NestedTestAllTypes)
- }
- NestedTestAllTypes::NestedTestAllTypes(::google::protobuf::Arena* arena)
- : ::google::protobuf::MessageLite(),
- _internal_metadata_(arena) {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_NestedTestAllTypes.base);
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:proto3_arena_lite_unittest.NestedTestAllTypes)
- }
- NestedTestAllTypes::NestedTestAllTypes(const NestedTestAllTypes& from)
- : ::google::protobuf::MessageLite(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- if (from.has_child()) {
- child_ = new ::proto3_arena_lite_unittest::NestedTestAllTypes(*from.child_);
- } else {
- child_ = NULL;
- }
- if (from.has_payload()) {
- payload_ = new ::proto3_arena_lite_unittest::TestAllTypes(*from.payload_);
- } else {
- payload_ = NULL;
- }
- // @@protoc_insertion_point(copy_constructor:proto3_arena_lite_unittest.NestedTestAllTypes)
- }
- void NestedTestAllTypes::SharedCtor() {
- ::memset(&child_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&payload_) -
- reinterpret_cast<char*>(&child_)) + sizeof(payload_));
- }
- NestedTestAllTypes::~NestedTestAllTypes() {
- // @@protoc_insertion_point(destructor:proto3_arena_lite_unittest.NestedTestAllTypes)
- SharedDtor();
- }
- void NestedTestAllTypes::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
- if (this != internal_default_instance()) delete child_;
- if (this != internal_default_instance()) delete payload_;
- }
- void NestedTestAllTypes::ArenaDtor(void* object) {
- NestedTestAllTypes* _this = reinterpret_cast< NestedTestAllTypes* >(object);
- (void)_this;
- }
- void NestedTestAllTypes::RegisterArenaDtor(::google::protobuf::Arena* arena) {
- }
- void NestedTestAllTypes::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const NestedTestAllTypes& NestedTestAllTypes::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_NestedTestAllTypes.base);
- return *internal_default_instance();
- }
- void NestedTestAllTypes::Clear() {
- // @@protoc_insertion_point(message_clear_start:proto3_arena_lite_unittest.NestedTestAllTypes)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- if (GetArenaNoVirtual() == NULL && child_ != NULL) {
- delete child_;
- }
- child_ = NULL;
- if (GetArenaNoVirtual() == NULL && payload_ != NULL) {
- delete payload_;
- }
- payload_ = NULL;
- _internal_metadata_.Clear();
- }
- bool NestedTestAllTypes::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
- &_internal_metadata_);
- ::google::protobuf::io::StringOutputStream unknown_fields_output(
- unknown_fields_setter.buffer());
- ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
- &unknown_fields_output, false);
- // @@protoc_insertion_point(parse_start:proto3_arena_lite_unittest.NestedTestAllTypes)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // .proto3_arena_lite_unittest.NestedTestAllTypes child = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_child()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .proto3_arena_lite_unittest.TestAllTypes payload = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_payload()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(
- input, tag, &unknown_fields_stream));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:proto3_arena_lite_unittest.NestedTestAllTypes)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:proto3_arena_lite_unittest.NestedTestAllTypes)
- return false;
- #undef DO_
- }
- void NestedTestAllTypes::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:proto3_arena_lite_unittest.NestedTestAllTypes)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .proto3_arena_lite_unittest.NestedTestAllTypes child = 1;
- if (this->has_child()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessage(
- 1, this->_internal_child(), output);
- }
- // .proto3_arena_lite_unittest.TestAllTypes payload = 2;
- if (this->has_payload()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessage(
- 2, this->_internal_payload(), output);
- }
- output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).data(),
- static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size()));
- // @@protoc_insertion_point(serialize_end:proto3_arena_lite_unittest.NestedTestAllTypes)
- }
- size_t NestedTestAllTypes::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:proto3_arena_lite_unittest.NestedTestAllTypes)
- size_t total_size = 0;
- total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size();
- // .proto3_arena_lite_unittest.NestedTestAllTypes child = 1;
- if (this->has_child()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *child_);
- }
- // .proto3_arena_lite_unittest.TestAllTypes payload = 2;
- if (this->has_payload()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *payload_);
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void NestedTestAllTypes::CheckTypeAndMergeFrom(
- const ::google::protobuf::MessageLite& from) {
- MergeFrom(*::google::protobuf::down_cast<const NestedTestAllTypes*>(&from));
- }
- void NestedTestAllTypes::MergeFrom(const NestedTestAllTypes& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:proto3_arena_lite_unittest.NestedTestAllTypes)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.has_child()) {
- mutable_child()->::proto3_arena_lite_unittest::NestedTestAllTypes::MergeFrom(from.child());
- }
- if (from.has_payload()) {
- mutable_payload()->::proto3_arena_lite_unittest::TestAllTypes::MergeFrom(from.payload());
- }
- }
- void NestedTestAllTypes::CopyFrom(const NestedTestAllTypes& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:proto3_arena_lite_unittest.NestedTestAllTypes)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool NestedTestAllTypes::IsInitialized() const {
- return true;
- }
- void NestedTestAllTypes::Swap(NestedTestAllTypes* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- NestedTestAllTypes* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
- }
- void NestedTestAllTypes::UnsafeArenaSwap(NestedTestAllTypes* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
- }
- void NestedTestAllTypes::InternalSwap(NestedTestAllTypes* other) {
- using std::swap;
- swap(child_, other->child_);
- swap(payload_, other->payload_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::std::string NestedTestAllTypes::GetTypeName() const {
- return "proto3_arena_lite_unittest.NestedTestAllTypes";
- }
- // ===================================================================
- void ForeignMessage::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int ForeignMessage::kCFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- ForeignMessage::ForeignMessage()
- : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_ForeignMessage.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:proto3_arena_lite_unittest.ForeignMessage)
- }
- ForeignMessage::ForeignMessage(::google::protobuf::Arena* arena)
- : ::google::protobuf::MessageLite(),
- _internal_metadata_(arena) {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_ForeignMessage.base);
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:proto3_arena_lite_unittest.ForeignMessage)
- }
- ForeignMessage::ForeignMessage(const ForeignMessage& from)
- : ::google::protobuf::MessageLite(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- c_ = from.c_;
- // @@protoc_insertion_point(copy_constructor:proto3_arena_lite_unittest.ForeignMessage)
- }
- void ForeignMessage::SharedCtor() {
- c_ = 0;
- }
- ForeignMessage::~ForeignMessage() {
- // @@protoc_insertion_point(destructor:proto3_arena_lite_unittest.ForeignMessage)
- SharedDtor();
- }
- void ForeignMessage::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
- }
- void ForeignMessage::ArenaDtor(void* object) {
- ForeignMessage* _this = reinterpret_cast< ForeignMessage* >(object);
- (void)_this;
- }
- void ForeignMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
- }
- void ForeignMessage::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ForeignMessage& ForeignMessage::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_ForeignMessage.base);
- return *internal_default_instance();
- }
- void ForeignMessage::Clear() {
- // @@protoc_insertion_point(message_clear_start:proto3_arena_lite_unittest.ForeignMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- c_ = 0;
- _internal_metadata_.Clear();
- }
- bool ForeignMessage::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
- &_internal_metadata_);
- ::google::protobuf::io::StringOutputStream unknown_fields_output(
- unknown_fields_setter.buffer());
- ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
- &unknown_fields_output, false);
- // @@protoc_insertion_point(parse_start:proto3_arena_lite_unittest.ForeignMessage)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // int32 c = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &c_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(
- input, tag, &unknown_fields_stream));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:proto3_arena_lite_unittest.ForeignMessage)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:proto3_arena_lite_unittest.ForeignMessage)
- return false;
- #undef DO_
- }
- void ForeignMessage::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:proto3_arena_lite_unittest.ForeignMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 c = 1;
- if (this->c() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->c(), output);
- }
- output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).data(),
- static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size()));
- // @@protoc_insertion_point(serialize_end:proto3_arena_lite_unittest.ForeignMessage)
- }
- size_t ForeignMessage::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:proto3_arena_lite_unittest.ForeignMessage)
- size_t total_size = 0;
- total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size();
- // int32 c = 1;
- if (this->c() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->c());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void ForeignMessage::CheckTypeAndMergeFrom(
- const ::google::protobuf::MessageLite& from) {
- MergeFrom(*::google::protobuf::down_cast<const ForeignMessage*>(&from));
- }
- void ForeignMessage::MergeFrom(const ForeignMessage& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:proto3_arena_lite_unittest.ForeignMessage)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.c() != 0) {
- set_c(from.c());
- }
- }
- void ForeignMessage::CopyFrom(const ForeignMessage& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:proto3_arena_lite_unittest.ForeignMessage)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool ForeignMessage::IsInitialized() const {
- return true;
- }
- void ForeignMessage::Swap(ForeignMessage* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- ForeignMessage* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
- }
- void ForeignMessage::UnsafeArenaSwap(ForeignMessage* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
- }
- void ForeignMessage::InternalSwap(ForeignMessage* other) {
- using std::swap;
- swap(c_, other->c_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::std::string ForeignMessage::GetTypeName() const {
- return "proto3_arena_lite_unittest.ForeignMessage";
- }
- // ===================================================================
- void TestEmptyMessage::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestEmptyMessage::TestEmptyMessage()
- : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestEmptyMessage.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:proto3_arena_lite_unittest.TestEmptyMessage)
- }
- TestEmptyMessage::TestEmptyMessage(::google::protobuf::Arena* arena)
- : ::google::protobuf::MessageLite(),
- _internal_metadata_(arena) {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestEmptyMessage.base);
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:proto3_arena_lite_unittest.TestEmptyMessage)
- }
- TestEmptyMessage::TestEmptyMessage(const TestEmptyMessage& from)
- : ::google::protobuf::MessageLite(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- // @@protoc_insertion_point(copy_constructor:proto3_arena_lite_unittest.TestEmptyMessage)
- }
- void TestEmptyMessage::SharedCtor() {
- }
- TestEmptyMessage::~TestEmptyMessage() {
- // @@protoc_insertion_point(destructor:proto3_arena_lite_unittest.TestEmptyMessage)
- SharedDtor();
- }
- void TestEmptyMessage::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
- }
- void TestEmptyMessage::ArenaDtor(void* object) {
- TestEmptyMessage* _this = reinterpret_cast< TestEmptyMessage* >(object);
- (void)_this;
- }
- void TestEmptyMessage::RegisterArenaDtor(::google::protobuf::Arena* arena) {
- }
- void TestEmptyMessage::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const TestEmptyMessage& TestEmptyMessage::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2funittest_5fproto3_5farena_5flite_2eproto::scc_info_TestEmptyMessage.base);
- return *internal_default_instance();
- }
- void TestEmptyMessage::Clear() {
- // @@protoc_insertion_point(message_clear_start:proto3_arena_lite_unittest.TestEmptyMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- _internal_metadata_.Clear();
- }
- bool TestEmptyMessage::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
- &_internal_metadata_);
- ::google::protobuf::io::StringOutputStream unknown_fields_output(
- unknown_fields_setter.buffer());
- ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
- &unknown_fields_output, false);
- // @@protoc_insertion_point(parse_start:proto3_arena_lite_unittest.TestEmptyMessage)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(
- input, tag, &unknown_fields_stream));
- }
- success:
- // @@protoc_insertion_point(parse_success:proto3_arena_lite_unittest.TestEmptyMessage)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:proto3_arena_lite_unittest.TestEmptyMessage)
- return false;
- #undef DO_
- }
- void TestEmptyMessage::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:proto3_arena_lite_unittest.TestEmptyMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).data(),
- static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size()));
- // @@protoc_insertion_point(serialize_end:proto3_arena_lite_unittest.TestEmptyMessage)
- }
- size_t TestEmptyMessage::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:proto3_arena_lite_unittest.TestEmptyMessage)
- size_t total_size = 0;
- total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size();
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void TestEmptyMessage::CheckTypeAndMergeFrom(
- const ::google::protobuf::MessageLite& from) {
- MergeFrom(*::google::protobuf::down_cast<const TestEmptyMessage*>(&from));
- }
- void TestEmptyMessage::MergeFrom(const TestEmptyMessage& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:proto3_arena_lite_unittest.TestEmptyMessage)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- }
- void TestEmptyMessage::CopyFrom(const TestEmptyMessage& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:proto3_arena_lite_unittest.TestEmptyMessage)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TestEmptyMessage::IsInitialized() const {
- return true;
- }
- void TestEmptyMessage::Swap(TestEmptyMessage* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- TestEmptyMessage* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
- }
- void TestEmptyMessage::UnsafeArenaSwap(TestEmptyMessage* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
- }
- void TestEmptyMessage::InternalSwap(TestEmptyMessage* other) {
- using std::swap;
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::std::string TestEmptyMessage::GetTypeName() const {
- return "proto3_arena_lite_unittest.TestEmptyMessage";
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace proto3_arena_lite_unittest
- namespace google {
- namespace protobuf {
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::proto3_arena_lite_unittest::TestAllTypes_NestedMessage* Arena::CreateMaybeMessage< ::proto3_arena_lite_unittest::TestAllTypes_NestedMessage >(Arena* arena) {
- return Arena::CreateMessageInternal< ::proto3_arena_lite_unittest::TestAllTypes_NestedMessage >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::proto3_arena_lite_unittest::TestAllTypes* Arena::CreateMaybeMessage< ::proto3_arena_lite_unittest::TestAllTypes >(Arena* arena) {
- return Arena::CreateMessageInternal< ::proto3_arena_lite_unittest::TestAllTypes >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::proto3_arena_lite_unittest::TestPackedTypes* Arena::CreateMaybeMessage< ::proto3_arena_lite_unittest::TestPackedTypes >(Arena* arena) {
- return Arena::CreateMessageInternal< ::proto3_arena_lite_unittest::TestPackedTypes >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::proto3_arena_lite_unittest::TestUnpackedTypes* Arena::CreateMaybeMessage< ::proto3_arena_lite_unittest::TestUnpackedTypes >(Arena* arena) {
- return Arena::CreateMessageInternal< ::proto3_arena_lite_unittest::TestUnpackedTypes >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::proto3_arena_lite_unittest::NestedTestAllTypes* Arena::CreateMaybeMessage< ::proto3_arena_lite_unittest::NestedTestAllTypes >(Arena* arena) {
- return Arena::CreateMessageInternal< ::proto3_arena_lite_unittest::NestedTestAllTypes >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::proto3_arena_lite_unittest::ForeignMessage* Arena::CreateMaybeMessage< ::proto3_arena_lite_unittest::ForeignMessage >(Arena* arena) {
- return Arena::CreateMessageInternal< ::proto3_arena_lite_unittest::ForeignMessage >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::proto3_arena_lite_unittest::TestEmptyMessage* Arena::CreateMaybeMessage< ::proto3_arena_lite_unittest::TestEmptyMessage >(Arena* arena) {
- return Arena::CreateMessageInternal< ::proto3_arena_lite_unittest::TestEmptyMessage >(arena);
- }
- } // namespace protobuf
- } // namespace google
- // @@protoc_insertion_point(global_scope)
|