unittest_no_arena.pb.h 215 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/unittest_no_arena.proto
  3. #ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fno_5farena_2eproto
  4. #define PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fno_5farena_2eproto
  5. #include <string>
  6. #include <google/protobuf/stubs/common.h>
  7. #if GOOGLE_PROTOBUF_VERSION < 3006001
  8. #error This file was generated by a newer version of protoc which is
  9. #error incompatible with your Protocol Buffer headers. Please update
  10. #error your headers.
  11. #endif
  12. #if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
  13. #error This file was generated by an older version of protoc which is
  14. #error incompatible with your Protocol Buffer headers. Please
  15. #error regenerate this file with a newer version of protoc.
  16. #endif
  17. #include <google/protobuf/io/coded_stream.h>
  18. #include <google/protobuf/arena.h>
  19. #include <google/protobuf/arenastring.h>
  20. #include <google/protobuf/generated_message_table_driven.h>
  21. #include <google/protobuf/generated_message_util.h>
  22. #include <google/protobuf/inlined_string_field.h>
  23. #include <google/protobuf/metadata.h>
  24. #include <google/protobuf/message.h>
  25. #include <google/protobuf/repeated_field.h> // IWYU pragma: export
  26. #include <google/protobuf/extension_set.h> // IWYU pragma: export
  27. #include <google/protobuf/generated_enum_reflection.h>
  28. #include <google/protobuf/unknown_field_set.h>
  29. #include <google/protobuf/unittest_import.pb.h>
  30. #include <google/protobuf/unittest_arena.pb.h>
  31. // @@protoc_insertion_point(includes)
  32. #define PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto
  33. namespace protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto {
  34. // Internal implementation detail -- do not use these members.
  35. struct TableStruct {
  36. static const ::google::protobuf::internal::ParseTableField entries[];
  37. static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
  38. static const ::google::protobuf::internal::ParseTable schema[6];
  39. static const ::google::protobuf::internal::FieldMetadata field_metadata[];
  40. static const ::google::protobuf::internal::SerializationTable serialization_table[];
  41. static const ::google::protobuf::uint32 offsets[];
  42. };
  43. void AddDescriptors();
  44. } // namespace protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto
  45. namespace protobuf_unittest_no_arena {
  46. class ForeignMessage;
  47. class ForeignMessageDefaultTypeInternal;
  48. extern ForeignMessageDefaultTypeInternal _ForeignMessage_default_instance_;
  49. class TestAllTypes;
  50. class TestAllTypesDefaultTypeInternal;
  51. extern TestAllTypesDefaultTypeInternal _TestAllTypes_default_instance_;
  52. class TestAllTypes_NestedMessage;
  53. class TestAllTypes_NestedMessageDefaultTypeInternal;
  54. extern TestAllTypes_NestedMessageDefaultTypeInternal _TestAllTypes_NestedMessage_default_instance_;
  55. class TestAllTypes_OptionalGroup;
  56. class TestAllTypes_OptionalGroupDefaultTypeInternal;
  57. extern TestAllTypes_OptionalGroupDefaultTypeInternal _TestAllTypes_OptionalGroup_default_instance_;
  58. class TestAllTypes_RepeatedGroup;
  59. class TestAllTypes_RepeatedGroupDefaultTypeInternal;
  60. extern TestAllTypes_RepeatedGroupDefaultTypeInternal _TestAllTypes_RepeatedGroup_default_instance_;
  61. class TestNoArenaMessage;
  62. class TestNoArenaMessageDefaultTypeInternal;
  63. extern TestNoArenaMessageDefaultTypeInternal _TestNoArenaMessage_default_instance_;
  64. } // namespace protobuf_unittest_no_arena
  65. namespace google {
  66. namespace protobuf {
  67. template<> ::protobuf_unittest_no_arena::ForeignMessage* Arena::CreateMaybeMessage<::protobuf_unittest_no_arena::ForeignMessage>(Arena*);
  68. template<> ::protobuf_unittest_no_arena::TestAllTypes* Arena::CreateMaybeMessage<::protobuf_unittest_no_arena::TestAllTypes>(Arena*);
  69. template<> ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* Arena::CreateMaybeMessage<::protobuf_unittest_no_arena::TestAllTypes_NestedMessage>(Arena*);
  70. template<> ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup* Arena::CreateMaybeMessage<::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup>(Arena*);
  71. template<> ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup* Arena::CreateMaybeMessage<::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup>(Arena*);
  72. template<> ::protobuf_unittest_no_arena::TestNoArenaMessage* Arena::CreateMaybeMessage<::protobuf_unittest_no_arena::TestNoArenaMessage>(Arena*);
  73. } // namespace protobuf
  74. } // namespace google
  75. namespace protobuf_unittest_no_arena {
  76. enum TestAllTypes_NestedEnum {
  77. TestAllTypes_NestedEnum_FOO = 1,
  78. TestAllTypes_NestedEnum_BAR = 2,
  79. TestAllTypes_NestedEnum_BAZ = 3,
  80. TestAllTypes_NestedEnum_NEG = -1
  81. };
  82. bool TestAllTypes_NestedEnum_IsValid(int value);
  83. const TestAllTypes_NestedEnum TestAllTypes_NestedEnum_NestedEnum_MIN = TestAllTypes_NestedEnum_NEG;
  84. const TestAllTypes_NestedEnum TestAllTypes_NestedEnum_NestedEnum_MAX = TestAllTypes_NestedEnum_BAZ;
  85. const int TestAllTypes_NestedEnum_NestedEnum_ARRAYSIZE = TestAllTypes_NestedEnum_NestedEnum_MAX + 1;
  86. const ::google::protobuf::EnumDescriptor* TestAllTypes_NestedEnum_descriptor();
  87. inline const ::std::string& TestAllTypes_NestedEnum_Name(TestAllTypes_NestedEnum value) {
  88. return ::google::protobuf::internal::NameOfEnum(
  89. TestAllTypes_NestedEnum_descriptor(), value);
  90. }
  91. inline bool TestAllTypes_NestedEnum_Parse(
  92. const ::std::string& name, TestAllTypes_NestedEnum* value) {
  93. return ::google::protobuf::internal::ParseNamedEnum<TestAllTypes_NestedEnum>(
  94. TestAllTypes_NestedEnum_descriptor(), name, value);
  95. }
  96. enum ForeignEnum {
  97. FOREIGN_FOO = 4,
  98. FOREIGN_BAR = 5,
  99. FOREIGN_BAZ = 6
  100. };
  101. bool ForeignEnum_IsValid(int value);
  102. const ForeignEnum ForeignEnum_MIN = FOREIGN_FOO;
  103. const ForeignEnum ForeignEnum_MAX = FOREIGN_BAZ;
  104. const int ForeignEnum_ARRAYSIZE = ForeignEnum_MAX + 1;
  105. const ::google::protobuf::EnumDescriptor* ForeignEnum_descriptor();
  106. inline const ::std::string& ForeignEnum_Name(ForeignEnum value) {
  107. return ::google::protobuf::internal::NameOfEnum(
  108. ForeignEnum_descriptor(), value);
  109. }
  110. inline bool ForeignEnum_Parse(
  111. const ::std::string& name, ForeignEnum* value) {
  112. return ::google::protobuf::internal::ParseNamedEnum<ForeignEnum>(
  113. ForeignEnum_descriptor(), name, value);
  114. }
  115. // ===================================================================
  116. class TestAllTypes_NestedMessage : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest_no_arena.TestAllTypes.NestedMessage) */ {
  117. public:
  118. TestAllTypes_NestedMessage();
  119. virtual ~TestAllTypes_NestedMessage();
  120. TestAllTypes_NestedMessage(const TestAllTypes_NestedMessage& from);
  121. inline TestAllTypes_NestedMessage& operator=(const TestAllTypes_NestedMessage& from) {
  122. CopyFrom(from);
  123. return *this;
  124. }
  125. #if LANG_CXX11
  126. TestAllTypes_NestedMessage(TestAllTypes_NestedMessage&& from) noexcept
  127. : TestAllTypes_NestedMessage() {
  128. *this = ::std::move(from);
  129. }
  130. inline TestAllTypes_NestedMessage& operator=(TestAllTypes_NestedMessage&& from) noexcept {
  131. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  132. if (this != &from) InternalSwap(&from);
  133. } else {
  134. CopyFrom(from);
  135. }
  136. return *this;
  137. }
  138. #endif
  139. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  140. return _internal_metadata_.unknown_fields();
  141. }
  142. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  143. return _internal_metadata_.mutable_unknown_fields();
  144. }
  145. static const ::google::protobuf::Descriptor* descriptor();
  146. static const TestAllTypes_NestedMessage& default_instance();
  147. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  148. static inline const TestAllTypes_NestedMessage* internal_default_instance() {
  149. return reinterpret_cast<const TestAllTypes_NestedMessage*>(
  150. &_TestAllTypes_NestedMessage_default_instance_);
  151. }
  152. static constexpr int kIndexInFileMessages =
  153. 0;
  154. void Swap(TestAllTypes_NestedMessage* other);
  155. friend void swap(TestAllTypes_NestedMessage& a, TestAllTypes_NestedMessage& b) {
  156. a.Swap(&b);
  157. }
  158. // implements Message ----------------------------------------------
  159. inline TestAllTypes_NestedMessage* New() const final {
  160. return CreateMaybeMessage<TestAllTypes_NestedMessage>(NULL);
  161. }
  162. TestAllTypes_NestedMessage* New(::google::protobuf::Arena* arena) const final {
  163. return CreateMaybeMessage<TestAllTypes_NestedMessage>(arena);
  164. }
  165. void CopyFrom(const ::google::protobuf::Message& from) final;
  166. void MergeFrom(const ::google::protobuf::Message& from) final;
  167. void CopyFrom(const TestAllTypes_NestedMessage& from);
  168. void MergeFrom(const TestAllTypes_NestedMessage& from);
  169. void Clear() final;
  170. bool IsInitialized() const final;
  171. size_t ByteSizeLong() const final;
  172. bool MergePartialFromCodedStream(
  173. ::google::protobuf::io::CodedInputStream* input) final;
  174. void SerializeWithCachedSizes(
  175. ::google::protobuf::io::CodedOutputStream* output) const final;
  176. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  177. bool deterministic, ::google::protobuf::uint8* target) const final;
  178. int GetCachedSize() const final { return _cached_size_.Get(); }
  179. private:
  180. void SharedCtor();
  181. void SharedDtor();
  182. void SetCachedSize(int size) const final;
  183. void InternalSwap(TestAllTypes_NestedMessage* other);
  184. private:
  185. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  186. return NULL;
  187. }
  188. inline void* MaybeArenaPtr() const {
  189. return NULL;
  190. }
  191. public:
  192. ::google::protobuf::Metadata GetMetadata() const final;
  193. // nested types ----------------------------------------------------
  194. // accessors -------------------------------------------------------
  195. // optional int32 bb = 1;
  196. bool has_bb() const;
  197. void clear_bb();
  198. static const int kBbFieldNumber = 1;
  199. ::google::protobuf::int32 bb() const;
  200. void set_bb(::google::protobuf::int32 value);
  201. // @@protoc_insertion_point(class_scope:protobuf_unittest_no_arena.TestAllTypes.NestedMessage)
  202. private:
  203. void set_has_bb();
  204. void clear_has_bb();
  205. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  206. ::google::protobuf::internal::HasBits<1> _has_bits_;
  207. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  208. ::google::protobuf::int32 bb_;
  209. friend struct ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::TableStruct;
  210. };
  211. // -------------------------------------------------------------------
  212. class TestAllTypes_OptionalGroup : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup) */ {
  213. public:
  214. TestAllTypes_OptionalGroup();
  215. virtual ~TestAllTypes_OptionalGroup();
  216. TestAllTypes_OptionalGroup(const TestAllTypes_OptionalGroup& from);
  217. inline TestAllTypes_OptionalGroup& operator=(const TestAllTypes_OptionalGroup& from) {
  218. CopyFrom(from);
  219. return *this;
  220. }
  221. #if LANG_CXX11
  222. TestAllTypes_OptionalGroup(TestAllTypes_OptionalGroup&& from) noexcept
  223. : TestAllTypes_OptionalGroup() {
  224. *this = ::std::move(from);
  225. }
  226. inline TestAllTypes_OptionalGroup& operator=(TestAllTypes_OptionalGroup&& from) noexcept {
  227. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  228. if (this != &from) InternalSwap(&from);
  229. } else {
  230. CopyFrom(from);
  231. }
  232. return *this;
  233. }
  234. #endif
  235. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  236. return _internal_metadata_.unknown_fields();
  237. }
  238. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  239. return _internal_metadata_.mutable_unknown_fields();
  240. }
  241. static const ::google::protobuf::Descriptor* descriptor();
  242. static const TestAllTypes_OptionalGroup& default_instance();
  243. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  244. static inline const TestAllTypes_OptionalGroup* internal_default_instance() {
  245. return reinterpret_cast<const TestAllTypes_OptionalGroup*>(
  246. &_TestAllTypes_OptionalGroup_default_instance_);
  247. }
  248. static constexpr int kIndexInFileMessages =
  249. 1;
  250. void Swap(TestAllTypes_OptionalGroup* other);
  251. friend void swap(TestAllTypes_OptionalGroup& a, TestAllTypes_OptionalGroup& b) {
  252. a.Swap(&b);
  253. }
  254. // implements Message ----------------------------------------------
  255. inline TestAllTypes_OptionalGroup* New() const final {
  256. return CreateMaybeMessage<TestAllTypes_OptionalGroup>(NULL);
  257. }
  258. TestAllTypes_OptionalGroup* New(::google::protobuf::Arena* arena) const final {
  259. return CreateMaybeMessage<TestAllTypes_OptionalGroup>(arena);
  260. }
  261. void CopyFrom(const ::google::protobuf::Message& from) final;
  262. void MergeFrom(const ::google::protobuf::Message& from) final;
  263. void CopyFrom(const TestAllTypes_OptionalGroup& from);
  264. void MergeFrom(const TestAllTypes_OptionalGroup& from);
  265. void Clear() final;
  266. bool IsInitialized() const final;
  267. size_t ByteSizeLong() const final;
  268. bool MergePartialFromCodedStream(
  269. ::google::protobuf::io::CodedInputStream* input) final;
  270. void SerializeWithCachedSizes(
  271. ::google::protobuf::io::CodedOutputStream* output) const final;
  272. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  273. bool deterministic, ::google::protobuf::uint8* target) const final;
  274. int GetCachedSize() const final { return _cached_size_.Get(); }
  275. private:
  276. void SharedCtor();
  277. void SharedDtor();
  278. void SetCachedSize(int size) const final;
  279. void InternalSwap(TestAllTypes_OptionalGroup* other);
  280. private:
  281. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  282. return NULL;
  283. }
  284. inline void* MaybeArenaPtr() const {
  285. return NULL;
  286. }
  287. public:
  288. ::google::protobuf::Metadata GetMetadata() const final;
  289. // nested types ----------------------------------------------------
  290. // accessors -------------------------------------------------------
  291. // optional int32 a = 17;
  292. bool has_a() const;
  293. void clear_a();
  294. static const int kAFieldNumber = 17;
  295. ::google::protobuf::int32 a() const;
  296. void set_a(::google::protobuf::int32 value);
  297. // @@protoc_insertion_point(class_scope:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup)
  298. private:
  299. void set_has_a();
  300. void clear_has_a();
  301. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  302. ::google::protobuf::internal::HasBits<1> _has_bits_;
  303. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  304. ::google::protobuf::int32 a_;
  305. friend struct ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::TableStruct;
  306. };
  307. // -------------------------------------------------------------------
  308. class TestAllTypes_RepeatedGroup : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup) */ {
  309. public:
  310. TestAllTypes_RepeatedGroup();
  311. virtual ~TestAllTypes_RepeatedGroup();
  312. TestAllTypes_RepeatedGroup(const TestAllTypes_RepeatedGroup& from);
  313. inline TestAllTypes_RepeatedGroup& operator=(const TestAllTypes_RepeatedGroup& from) {
  314. CopyFrom(from);
  315. return *this;
  316. }
  317. #if LANG_CXX11
  318. TestAllTypes_RepeatedGroup(TestAllTypes_RepeatedGroup&& from) noexcept
  319. : TestAllTypes_RepeatedGroup() {
  320. *this = ::std::move(from);
  321. }
  322. inline TestAllTypes_RepeatedGroup& operator=(TestAllTypes_RepeatedGroup&& from) noexcept {
  323. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  324. if (this != &from) InternalSwap(&from);
  325. } else {
  326. CopyFrom(from);
  327. }
  328. return *this;
  329. }
  330. #endif
  331. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  332. return _internal_metadata_.unknown_fields();
  333. }
  334. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  335. return _internal_metadata_.mutable_unknown_fields();
  336. }
  337. static const ::google::protobuf::Descriptor* descriptor();
  338. static const TestAllTypes_RepeatedGroup& default_instance();
  339. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  340. static inline const TestAllTypes_RepeatedGroup* internal_default_instance() {
  341. return reinterpret_cast<const TestAllTypes_RepeatedGroup*>(
  342. &_TestAllTypes_RepeatedGroup_default_instance_);
  343. }
  344. static constexpr int kIndexInFileMessages =
  345. 2;
  346. void Swap(TestAllTypes_RepeatedGroup* other);
  347. friend void swap(TestAllTypes_RepeatedGroup& a, TestAllTypes_RepeatedGroup& b) {
  348. a.Swap(&b);
  349. }
  350. // implements Message ----------------------------------------------
  351. inline TestAllTypes_RepeatedGroup* New() const final {
  352. return CreateMaybeMessage<TestAllTypes_RepeatedGroup>(NULL);
  353. }
  354. TestAllTypes_RepeatedGroup* New(::google::protobuf::Arena* arena) const final {
  355. return CreateMaybeMessage<TestAllTypes_RepeatedGroup>(arena);
  356. }
  357. void CopyFrom(const ::google::protobuf::Message& from) final;
  358. void MergeFrom(const ::google::protobuf::Message& from) final;
  359. void CopyFrom(const TestAllTypes_RepeatedGroup& from);
  360. void MergeFrom(const TestAllTypes_RepeatedGroup& from);
  361. void Clear() final;
  362. bool IsInitialized() const final;
  363. size_t ByteSizeLong() const final;
  364. bool MergePartialFromCodedStream(
  365. ::google::protobuf::io::CodedInputStream* input) final;
  366. void SerializeWithCachedSizes(
  367. ::google::protobuf::io::CodedOutputStream* output) const final;
  368. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  369. bool deterministic, ::google::protobuf::uint8* target) const final;
  370. int GetCachedSize() const final { return _cached_size_.Get(); }
  371. private:
  372. void SharedCtor();
  373. void SharedDtor();
  374. void SetCachedSize(int size) const final;
  375. void InternalSwap(TestAllTypes_RepeatedGroup* other);
  376. private:
  377. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  378. return NULL;
  379. }
  380. inline void* MaybeArenaPtr() const {
  381. return NULL;
  382. }
  383. public:
  384. ::google::protobuf::Metadata GetMetadata() const final;
  385. // nested types ----------------------------------------------------
  386. // accessors -------------------------------------------------------
  387. // optional int32 a = 47;
  388. bool has_a() const;
  389. void clear_a();
  390. static const int kAFieldNumber = 47;
  391. ::google::protobuf::int32 a() const;
  392. void set_a(::google::protobuf::int32 value);
  393. // @@protoc_insertion_point(class_scope:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup)
  394. private:
  395. void set_has_a();
  396. void clear_has_a();
  397. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  398. ::google::protobuf::internal::HasBits<1> _has_bits_;
  399. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  400. ::google::protobuf::int32 a_;
  401. friend struct ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::TableStruct;
  402. };
  403. // -------------------------------------------------------------------
  404. class TestAllTypes : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest_no_arena.TestAllTypes) */ {
  405. public:
  406. TestAllTypes();
  407. virtual ~TestAllTypes();
  408. TestAllTypes(const TestAllTypes& from);
  409. inline TestAllTypes& operator=(const TestAllTypes& from) {
  410. CopyFrom(from);
  411. return *this;
  412. }
  413. #if LANG_CXX11
  414. TestAllTypes(TestAllTypes&& from) noexcept
  415. : TestAllTypes() {
  416. *this = ::std::move(from);
  417. }
  418. inline TestAllTypes& operator=(TestAllTypes&& from) noexcept {
  419. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  420. if (this != &from) InternalSwap(&from);
  421. } else {
  422. CopyFrom(from);
  423. }
  424. return *this;
  425. }
  426. #endif
  427. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  428. return _internal_metadata_.unknown_fields();
  429. }
  430. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  431. return _internal_metadata_.mutable_unknown_fields();
  432. }
  433. static const ::google::protobuf::Descriptor* descriptor();
  434. static const TestAllTypes& default_instance();
  435. enum OneofFieldCase {
  436. kOneofUint32 = 111,
  437. kOneofNestedMessage = 112,
  438. kOneofString = 113,
  439. kOneofBytes = 114,
  440. kLazyOneofNestedMessage = 115,
  441. ONEOF_FIELD_NOT_SET = 0,
  442. };
  443. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  444. static inline const TestAllTypes* internal_default_instance() {
  445. return reinterpret_cast<const TestAllTypes*>(
  446. &_TestAllTypes_default_instance_);
  447. }
  448. static constexpr int kIndexInFileMessages =
  449. 3;
  450. void Swap(TestAllTypes* other);
  451. friend void swap(TestAllTypes& a, TestAllTypes& b) {
  452. a.Swap(&b);
  453. }
  454. // implements Message ----------------------------------------------
  455. inline TestAllTypes* New() const final {
  456. return CreateMaybeMessage<TestAllTypes>(NULL);
  457. }
  458. TestAllTypes* New(::google::protobuf::Arena* arena) const final {
  459. return CreateMaybeMessage<TestAllTypes>(arena);
  460. }
  461. void CopyFrom(const ::google::protobuf::Message& from) final;
  462. void MergeFrom(const ::google::protobuf::Message& from) final;
  463. void CopyFrom(const TestAllTypes& from);
  464. void MergeFrom(const TestAllTypes& from);
  465. void Clear() final;
  466. bool IsInitialized() const final;
  467. size_t ByteSizeLong() const final;
  468. bool MergePartialFromCodedStream(
  469. ::google::protobuf::io::CodedInputStream* input) final;
  470. void SerializeWithCachedSizes(
  471. ::google::protobuf::io::CodedOutputStream* output) const final;
  472. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  473. bool deterministic, ::google::protobuf::uint8* target) const final;
  474. int GetCachedSize() const final { return _cached_size_.Get(); }
  475. private:
  476. void SharedCtor();
  477. void SharedDtor();
  478. void SetCachedSize(int size) const final;
  479. void InternalSwap(TestAllTypes* other);
  480. private:
  481. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  482. return NULL;
  483. }
  484. inline void* MaybeArenaPtr() const {
  485. return NULL;
  486. }
  487. public:
  488. ::google::protobuf::Metadata GetMetadata() const final;
  489. // nested types ----------------------------------------------------
  490. typedef TestAllTypes_NestedMessage NestedMessage;
  491. typedef TestAllTypes_OptionalGroup OptionalGroup;
  492. typedef TestAllTypes_RepeatedGroup RepeatedGroup;
  493. typedef TestAllTypes_NestedEnum NestedEnum;
  494. static const NestedEnum FOO =
  495. TestAllTypes_NestedEnum_FOO;
  496. static const NestedEnum BAR =
  497. TestAllTypes_NestedEnum_BAR;
  498. static const NestedEnum BAZ =
  499. TestAllTypes_NestedEnum_BAZ;
  500. static const NestedEnum NEG =
  501. TestAllTypes_NestedEnum_NEG;
  502. static inline bool NestedEnum_IsValid(int value) {
  503. return TestAllTypes_NestedEnum_IsValid(value);
  504. }
  505. static const NestedEnum NestedEnum_MIN =
  506. TestAllTypes_NestedEnum_NestedEnum_MIN;
  507. static const NestedEnum NestedEnum_MAX =
  508. TestAllTypes_NestedEnum_NestedEnum_MAX;
  509. static const int NestedEnum_ARRAYSIZE =
  510. TestAllTypes_NestedEnum_NestedEnum_ARRAYSIZE;
  511. static inline const ::google::protobuf::EnumDescriptor*
  512. NestedEnum_descriptor() {
  513. return TestAllTypes_NestedEnum_descriptor();
  514. }
  515. static inline const ::std::string& NestedEnum_Name(NestedEnum value) {
  516. return TestAllTypes_NestedEnum_Name(value);
  517. }
  518. static inline bool NestedEnum_Parse(const ::std::string& name,
  519. NestedEnum* value) {
  520. return TestAllTypes_NestedEnum_Parse(name, value);
  521. }
  522. // accessors -------------------------------------------------------
  523. // repeated int32 repeated_int32 = 31;
  524. int repeated_int32_size() const;
  525. void clear_repeated_int32();
  526. static const int kRepeatedInt32FieldNumber = 31;
  527. ::google::protobuf::int32 repeated_int32(int index) const;
  528. void set_repeated_int32(int index, ::google::protobuf::int32 value);
  529. void add_repeated_int32(::google::protobuf::int32 value);
  530. const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
  531. repeated_int32() const;
  532. ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
  533. mutable_repeated_int32();
  534. // repeated int64 repeated_int64 = 32;
  535. int repeated_int64_size() const;
  536. void clear_repeated_int64();
  537. static const int kRepeatedInt64FieldNumber = 32;
  538. ::google::protobuf::int64 repeated_int64(int index) const;
  539. void set_repeated_int64(int index, ::google::protobuf::int64 value);
  540. void add_repeated_int64(::google::protobuf::int64 value);
  541. const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >&
  542. repeated_int64() const;
  543. ::google::protobuf::RepeatedField< ::google::protobuf::int64 >*
  544. mutable_repeated_int64();
  545. // repeated uint32 repeated_uint32 = 33;
  546. int repeated_uint32_size() const;
  547. void clear_repeated_uint32();
  548. static const int kRepeatedUint32FieldNumber = 33;
  549. ::google::protobuf::uint32 repeated_uint32(int index) const;
  550. void set_repeated_uint32(int index, ::google::protobuf::uint32 value);
  551. void add_repeated_uint32(::google::protobuf::uint32 value);
  552. const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
  553. repeated_uint32() const;
  554. ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
  555. mutable_repeated_uint32();
  556. // repeated uint64 repeated_uint64 = 34;
  557. int repeated_uint64_size() const;
  558. void clear_repeated_uint64();
  559. static const int kRepeatedUint64FieldNumber = 34;
  560. ::google::protobuf::uint64 repeated_uint64(int index) const;
  561. void set_repeated_uint64(int index, ::google::protobuf::uint64 value);
  562. void add_repeated_uint64(::google::protobuf::uint64 value);
  563. const ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >&
  564. repeated_uint64() const;
  565. ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >*
  566. mutable_repeated_uint64();
  567. // repeated sint32 repeated_sint32 = 35;
  568. int repeated_sint32_size() const;
  569. void clear_repeated_sint32();
  570. static const int kRepeatedSint32FieldNumber = 35;
  571. ::google::protobuf::int32 repeated_sint32(int index) const;
  572. void set_repeated_sint32(int index, ::google::protobuf::int32 value);
  573. void add_repeated_sint32(::google::protobuf::int32 value);
  574. const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
  575. repeated_sint32() const;
  576. ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
  577. mutable_repeated_sint32();
  578. // repeated sint64 repeated_sint64 = 36;
  579. int repeated_sint64_size() const;
  580. void clear_repeated_sint64();
  581. static const int kRepeatedSint64FieldNumber = 36;
  582. ::google::protobuf::int64 repeated_sint64(int index) const;
  583. void set_repeated_sint64(int index, ::google::protobuf::int64 value);
  584. void add_repeated_sint64(::google::protobuf::int64 value);
  585. const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >&
  586. repeated_sint64() const;
  587. ::google::protobuf::RepeatedField< ::google::protobuf::int64 >*
  588. mutable_repeated_sint64();
  589. // repeated fixed32 repeated_fixed32 = 37;
  590. int repeated_fixed32_size() const;
  591. void clear_repeated_fixed32();
  592. static const int kRepeatedFixed32FieldNumber = 37;
  593. ::google::protobuf::uint32 repeated_fixed32(int index) const;
  594. void set_repeated_fixed32(int index, ::google::protobuf::uint32 value);
  595. void add_repeated_fixed32(::google::protobuf::uint32 value);
  596. const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
  597. repeated_fixed32() const;
  598. ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
  599. mutable_repeated_fixed32();
  600. // repeated fixed64 repeated_fixed64 = 38;
  601. int repeated_fixed64_size() const;
  602. void clear_repeated_fixed64();
  603. static const int kRepeatedFixed64FieldNumber = 38;
  604. ::google::protobuf::uint64 repeated_fixed64(int index) const;
  605. void set_repeated_fixed64(int index, ::google::protobuf::uint64 value);
  606. void add_repeated_fixed64(::google::protobuf::uint64 value);
  607. const ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >&
  608. repeated_fixed64() const;
  609. ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >*
  610. mutable_repeated_fixed64();
  611. // repeated sfixed32 repeated_sfixed32 = 39;
  612. int repeated_sfixed32_size() const;
  613. void clear_repeated_sfixed32();
  614. static const int kRepeatedSfixed32FieldNumber = 39;
  615. ::google::protobuf::int32 repeated_sfixed32(int index) const;
  616. void set_repeated_sfixed32(int index, ::google::protobuf::int32 value);
  617. void add_repeated_sfixed32(::google::protobuf::int32 value);
  618. const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
  619. repeated_sfixed32() const;
  620. ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
  621. mutable_repeated_sfixed32();
  622. // repeated sfixed64 repeated_sfixed64 = 40;
  623. int repeated_sfixed64_size() const;
  624. void clear_repeated_sfixed64();
  625. static const int kRepeatedSfixed64FieldNumber = 40;
  626. ::google::protobuf::int64 repeated_sfixed64(int index) const;
  627. void set_repeated_sfixed64(int index, ::google::protobuf::int64 value);
  628. void add_repeated_sfixed64(::google::protobuf::int64 value);
  629. const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >&
  630. repeated_sfixed64() const;
  631. ::google::protobuf::RepeatedField< ::google::protobuf::int64 >*
  632. mutable_repeated_sfixed64();
  633. // repeated float repeated_float = 41;
  634. int repeated_float_size() const;
  635. void clear_repeated_float();
  636. static const int kRepeatedFloatFieldNumber = 41;
  637. float repeated_float(int index) const;
  638. void set_repeated_float(int index, float value);
  639. void add_repeated_float(float value);
  640. const ::google::protobuf::RepeatedField< float >&
  641. repeated_float() const;
  642. ::google::protobuf::RepeatedField< float >*
  643. mutable_repeated_float();
  644. // repeated double repeated_double = 42;
  645. int repeated_double_size() const;
  646. void clear_repeated_double();
  647. static const int kRepeatedDoubleFieldNumber = 42;
  648. double repeated_double(int index) const;
  649. void set_repeated_double(int index, double value);
  650. void add_repeated_double(double value);
  651. const ::google::protobuf::RepeatedField< double >&
  652. repeated_double() const;
  653. ::google::protobuf::RepeatedField< double >*
  654. mutable_repeated_double();
  655. // repeated bool repeated_bool = 43;
  656. int repeated_bool_size() const;
  657. void clear_repeated_bool();
  658. static const int kRepeatedBoolFieldNumber = 43;
  659. bool repeated_bool(int index) const;
  660. void set_repeated_bool(int index, bool value);
  661. void add_repeated_bool(bool value);
  662. const ::google::protobuf::RepeatedField< bool >&
  663. repeated_bool() const;
  664. ::google::protobuf::RepeatedField< bool >*
  665. mutable_repeated_bool();
  666. // repeated string repeated_string = 44;
  667. int repeated_string_size() const;
  668. void clear_repeated_string();
  669. static const int kRepeatedStringFieldNumber = 44;
  670. const ::std::string& repeated_string(int index) const;
  671. ::std::string* mutable_repeated_string(int index);
  672. void set_repeated_string(int index, const ::std::string& value);
  673. #if LANG_CXX11
  674. void set_repeated_string(int index, ::std::string&& value);
  675. #endif
  676. void set_repeated_string(int index, const char* value);
  677. void set_repeated_string(int index, const char* value, size_t size);
  678. ::std::string* add_repeated_string();
  679. void add_repeated_string(const ::std::string& value);
  680. #if LANG_CXX11
  681. void add_repeated_string(::std::string&& value);
  682. #endif
  683. void add_repeated_string(const char* value);
  684. void add_repeated_string(const char* value, size_t size);
  685. const ::google::protobuf::RepeatedPtrField< ::std::string>& repeated_string() const;
  686. ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_repeated_string();
  687. // repeated bytes repeated_bytes = 45;
  688. int repeated_bytes_size() const;
  689. void clear_repeated_bytes();
  690. static const int kRepeatedBytesFieldNumber = 45;
  691. const ::std::string& repeated_bytes(int index) const;
  692. ::std::string* mutable_repeated_bytes(int index);
  693. void set_repeated_bytes(int index, const ::std::string& value);
  694. #if LANG_CXX11
  695. void set_repeated_bytes(int index, ::std::string&& value);
  696. #endif
  697. void set_repeated_bytes(int index, const char* value);
  698. void set_repeated_bytes(int index, const void* value, size_t size);
  699. ::std::string* add_repeated_bytes();
  700. void add_repeated_bytes(const ::std::string& value);
  701. #if LANG_CXX11
  702. void add_repeated_bytes(::std::string&& value);
  703. #endif
  704. void add_repeated_bytes(const char* value);
  705. void add_repeated_bytes(const void* value, size_t size);
  706. const ::google::protobuf::RepeatedPtrField< ::std::string>& repeated_bytes() const;
  707. ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_repeated_bytes();
  708. // repeated group RepeatedGroup = 46 { ... };
  709. int repeatedgroup_size() const;
  710. void clear_repeatedgroup();
  711. static const int kRepeatedgroupFieldNumber = 46;
  712. ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup* mutable_repeatedgroup(int index);
  713. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup >*
  714. mutable_repeatedgroup();
  715. const ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup& repeatedgroup(int index) const;
  716. ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup* add_repeatedgroup();
  717. const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup >&
  718. repeatedgroup() const;
  719. // repeated .protobuf_unittest_no_arena.TestAllTypes.NestedMessage repeated_nested_message = 48;
  720. int repeated_nested_message_size() const;
  721. void clear_repeated_nested_message();
  722. static const int kRepeatedNestedMessageFieldNumber = 48;
  723. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* mutable_repeated_nested_message(int index);
  724. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage >*
  725. mutable_repeated_nested_message();
  726. const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& repeated_nested_message(int index) const;
  727. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* add_repeated_nested_message();
  728. const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage >&
  729. repeated_nested_message() const;
  730. // repeated .protobuf_unittest_no_arena.ForeignMessage repeated_foreign_message = 49;
  731. int repeated_foreign_message_size() const;
  732. void clear_repeated_foreign_message();
  733. static const int kRepeatedForeignMessageFieldNumber = 49;
  734. ::protobuf_unittest_no_arena::ForeignMessage* mutable_repeated_foreign_message(int index);
  735. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::ForeignMessage >*
  736. mutable_repeated_foreign_message();
  737. const ::protobuf_unittest_no_arena::ForeignMessage& repeated_foreign_message(int index) const;
  738. ::protobuf_unittest_no_arena::ForeignMessage* add_repeated_foreign_message();
  739. const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::ForeignMessage >&
  740. repeated_foreign_message() const;
  741. // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
  742. int repeated_import_message_size() const;
  743. void clear_repeated_import_message();
  744. static const int kRepeatedImportMessageFieldNumber = 50;
  745. ::protobuf_unittest_import::ImportMessage* mutable_repeated_import_message(int index);
  746. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_import::ImportMessage >*
  747. mutable_repeated_import_message();
  748. const ::protobuf_unittest_import::ImportMessage& repeated_import_message(int index) const;
  749. ::protobuf_unittest_import::ImportMessage* add_repeated_import_message();
  750. const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_import::ImportMessage >&
  751. repeated_import_message() const;
  752. // repeated .protobuf_unittest_no_arena.TestAllTypes.NestedEnum repeated_nested_enum = 51;
  753. int repeated_nested_enum_size() const;
  754. void clear_repeated_nested_enum();
  755. static const int kRepeatedNestedEnumFieldNumber = 51;
  756. ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum repeated_nested_enum(int index) const;
  757. void set_repeated_nested_enum(int index, ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum value);
  758. void add_repeated_nested_enum(::protobuf_unittest_no_arena::TestAllTypes_NestedEnum value);
  759. const ::google::protobuf::RepeatedField<int>& repeated_nested_enum() const;
  760. ::google::protobuf::RepeatedField<int>* mutable_repeated_nested_enum();
  761. // repeated .protobuf_unittest_no_arena.ForeignEnum repeated_foreign_enum = 52;
  762. int repeated_foreign_enum_size() const;
  763. void clear_repeated_foreign_enum();
  764. static const int kRepeatedForeignEnumFieldNumber = 52;
  765. ::protobuf_unittest_no_arena::ForeignEnum repeated_foreign_enum(int index) const;
  766. void set_repeated_foreign_enum(int index, ::protobuf_unittest_no_arena::ForeignEnum value);
  767. void add_repeated_foreign_enum(::protobuf_unittest_no_arena::ForeignEnum value);
  768. const ::google::protobuf::RepeatedField<int>& repeated_foreign_enum() const;
  769. ::google::protobuf::RepeatedField<int>* mutable_repeated_foreign_enum();
  770. // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
  771. int repeated_import_enum_size() const;
  772. void clear_repeated_import_enum();
  773. static const int kRepeatedImportEnumFieldNumber = 53;
  774. ::protobuf_unittest_import::ImportEnum repeated_import_enum(int index) const;
  775. void set_repeated_import_enum(int index, ::protobuf_unittest_import::ImportEnum value);
  776. void add_repeated_import_enum(::protobuf_unittest_import::ImportEnum value);
  777. const ::google::protobuf::RepeatedField<int>& repeated_import_enum() const;
  778. ::google::protobuf::RepeatedField<int>* mutable_repeated_import_enum();
  779. // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
  780. int repeated_string_piece_size() const;
  781. void clear_repeated_string_piece();
  782. static const int kRepeatedStringPieceFieldNumber = 54;
  783. private:
  784. // Hidden due to unknown ctype option.
  785. const ::std::string& repeated_string_piece(int index) const;
  786. ::std::string* mutable_repeated_string_piece(int index);
  787. void set_repeated_string_piece(int index, const ::std::string& value);
  788. #if LANG_CXX11
  789. void set_repeated_string_piece(int index, ::std::string&& value);
  790. #endif
  791. void set_repeated_string_piece(int index, const char* value);
  792. void set_repeated_string_piece(int index, const char* value, size_t size);
  793. ::std::string* add_repeated_string_piece();
  794. void add_repeated_string_piece(const ::std::string& value);
  795. #if LANG_CXX11
  796. void add_repeated_string_piece(::std::string&& value);
  797. #endif
  798. void add_repeated_string_piece(const char* value);
  799. void add_repeated_string_piece(const char* value, size_t size);
  800. const ::google::protobuf::RepeatedPtrField< ::std::string>& repeated_string_piece() const;
  801. ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_repeated_string_piece();
  802. public:
  803. // repeated string repeated_cord = 55 [ctype = CORD];
  804. int repeated_cord_size() const;
  805. void clear_repeated_cord();
  806. static const int kRepeatedCordFieldNumber = 55;
  807. private:
  808. // Hidden due to unknown ctype option.
  809. const ::std::string& repeated_cord(int index) const;
  810. ::std::string* mutable_repeated_cord(int index);
  811. void set_repeated_cord(int index, const ::std::string& value);
  812. #if LANG_CXX11
  813. void set_repeated_cord(int index, ::std::string&& value);
  814. #endif
  815. void set_repeated_cord(int index, const char* value);
  816. void set_repeated_cord(int index, const char* value, size_t size);
  817. ::std::string* add_repeated_cord();
  818. void add_repeated_cord(const ::std::string& value);
  819. #if LANG_CXX11
  820. void add_repeated_cord(::std::string&& value);
  821. #endif
  822. void add_repeated_cord(const char* value);
  823. void add_repeated_cord(const char* value, size_t size);
  824. const ::google::protobuf::RepeatedPtrField< ::std::string>& repeated_cord() const;
  825. ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_repeated_cord();
  826. public:
  827. // repeated .protobuf_unittest_no_arena.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
  828. int repeated_lazy_message_size() const;
  829. void clear_repeated_lazy_message();
  830. static const int kRepeatedLazyMessageFieldNumber = 57;
  831. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* mutable_repeated_lazy_message(int index);
  832. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage >*
  833. mutable_repeated_lazy_message();
  834. const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& repeated_lazy_message(int index) const;
  835. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* add_repeated_lazy_message();
  836. const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage >&
  837. repeated_lazy_message() const;
  838. // optional string optional_string = 14;
  839. bool has_optional_string() const;
  840. void clear_optional_string();
  841. static const int kOptionalStringFieldNumber = 14;
  842. const ::std::string& optional_string() const;
  843. void set_optional_string(const ::std::string& value);
  844. #if LANG_CXX11
  845. void set_optional_string(::std::string&& value);
  846. #endif
  847. void set_optional_string(const char* value);
  848. void set_optional_string(const char* value, size_t size);
  849. ::std::string* mutable_optional_string();
  850. ::std::string* release_optional_string();
  851. void set_allocated_optional_string(::std::string* optional_string);
  852. // optional bytes optional_bytes = 15;
  853. bool has_optional_bytes() const;
  854. void clear_optional_bytes();
  855. static const int kOptionalBytesFieldNumber = 15;
  856. const ::std::string& optional_bytes() const;
  857. void set_optional_bytes(const ::std::string& value);
  858. #if LANG_CXX11
  859. void set_optional_bytes(::std::string&& value);
  860. #endif
  861. void set_optional_bytes(const char* value);
  862. void set_optional_bytes(const void* value, size_t size);
  863. ::std::string* mutable_optional_bytes();
  864. ::std::string* release_optional_bytes();
  865. void set_allocated_optional_bytes(::std::string* optional_bytes);
  866. // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
  867. bool has_optional_string_piece() const;
  868. void clear_optional_string_piece();
  869. static const int kOptionalStringPieceFieldNumber = 24;
  870. private:
  871. // Hidden due to unknown ctype option.
  872. const ::std::string& optional_string_piece() const;
  873. void set_optional_string_piece(const ::std::string& value);
  874. #if LANG_CXX11
  875. void set_optional_string_piece(::std::string&& value);
  876. #endif
  877. void set_optional_string_piece(const char* value);
  878. void set_optional_string_piece(const char* value, size_t size);
  879. ::std::string* mutable_optional_string_piece();
  880. ::std::string* release_optional_string_piece();
  881. void set_allocated_optional_string_piece(::std::string* optional_string_piece);
  882. public:
  883. // optional string optional_cord = 25 [ctype = CORD];
  884. bool has_optional_cord() const;
  885. void clear_optional_cord();
  886. static const int kOptionalCordFieldNumber = 25;
  887. private:
  888. // Hidden due to unknown ctype option.
  889. const ::std::string& optional_cord() const;
  890. void set_optional_cord(const ::std::string& value);
  891. #if LANG_CXX11
  892. void set_optional_cord(::std::string&& value);
  893. #endif
  894. void set_optional_cord(const char* value);
  895. void set_optional_cord(const char* value, size_t size);
  896. ::std::string* mutable_optional_cord();
  897. ::std::string* release_optional_cord();
  898. void set_allocated_optional_cord(::std::string* optional_cord);
  899. public:
  900. // optional string default_string = 74 [default = "hello"];
  901. bool has_default_string() const;
  902. void clear_default_string();
  903. static const int kDefaultStringFieldNumber = 74;
  904. const ::std::string& default_string() const;
  905. void set_default_string(const ::std::string& value);
  906. #if LANG_CXX11
  907. void set_default_string(::std::string&& value);
  908. #endif
  909. void set_default_string(const char* value);
  910. void set_default_string(const char* value, size_t size);
  911. ::std::string* mutable_default_string();
  912. ::std::string* release_default_string();
  913. void set_allocated_default_string(::std::string* default_string);
  914. // optional bytes default_bytes = 75 [default = "world"];
  915. bool has_default_bytes() const;
  916. void clear_default_bytes();
  917. static const int kDefaultBytesFieldNumber = 75;
  918. const ::std::string& default_bytes() const;
  919. void set_default_bytes(const ::std::string& value);
  920. #if LANG_CXX11
  921. void set_default_bytes(::std::string&& value);
  922. #endif
  923. void set_default_bytes(const char* value);
  924. void set_default_bytes(const void* value, size_t size);
  925. ::std::string* mutable_default_bytes();
  926. ::std::string* release_default_bytes();
  927. void set_allocated_default_bytes(::std::string* default_bytes);
  928. // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
  929. bool has_default_string_piece() const;
  930. void clear_default_string_piece();
  931. static const int kDefaultStringPieceFieldNumber = 84;
  932. private:
  933. // Hidden due to unknown ctype option.
  934. const ::std::string& default_string_piece() const;
  935. void set_default_string_piece(const ::std::string& value);
  936. #if LANG_CXX11
  937. void set_default_string_piece(::std::string&& value);
  938. #endif
  939. void set_default_string_piece(const char* value);
  940. void set_default_string_piece(const char* value, size_t size);
  941. ::std::string* mutable_default_string_piece();
  942. ::std::string* release_default_string_piece();
  943. void set_allocated_default_string_piece(::std::string* default_string_piece);
  944. public:
  945. // optional string default_cord = 85 [default = "123", ctype = CORD];
  946. bool has_default_cord() const;
  947. void clear_default_cord();
  948. static const int kDefaultCordFieldNumber = 85;
  949. private:
  950. // Hidden due to unknown ctype option.
  951. const ::std::string& default_cord() const;
  952. void set_default_cord(const ::std::string& value);
  953. #if LANG_CXX11
  954. void set_default_cord(::std::string&& value);
  955. #endif
  956. void set_default_cord(const char* value);
  957. void set_default_cord(const char* value, size_t size);
  958. ::std::string* mutable_default_cord();
  959. ::std::string* release_default_cord();
  960. void set_allocated_default_cord(::std::string* default_cord);
  961. public:
  962. // optional group OptionalGroup = 16 { ... };
  963. bool has_optionalgroup() const;
  964. void clear_optionalgroup();
  965. static const int kOptionalgroupFieldNumber = 16;
  966. private:
  967. const ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup& _internal_optionalgroup() const;
  968. public:
  969. const ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup& optionalgroup() const;
  970. ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup* release_optionalgroup();
  971. ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup* mutable_optionalgroup();
  972. void set_allocated_optionalgroup(::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup* optionalgroup);
  973. // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage optional_nested_message = 18;
  974. bool has_optional_nested_message() const;
  975. void clear_optional_nested_message();
  976. static const int kOptionalNestedMessageFieldNumber = 18;
  977. private:
  978. const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& _internal_optional_nested_message() const;
  979. public:
  980. const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& optional_nested_message() const;
  981. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* release_optional_nested_message();
  982. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* mutable_optional_nested_message();
  983. void set_allocated_optional_nested_message(::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* optional_nested_message);
  984. // optional .protobuf_unittest_no_arena.ForeignMessage optional_foreign_message = 19;
  985. bool has_optional_foreign_message() const;
  986. void clear_optional_foreign_message();
  987. static const int kOptionalForeignMessageFieldNumber = 19;
  988. private:
  989. const ::protobuf_unittest_no_arena::ForeignMessage& _internal_optional_foreign_message() const;
  990. public:
  991. const ::protobuf_unittest_no_arena::ForeignMessage& optional_foreign_message() const;
  992. ::protobuf_unittest_no_arena::ForeignMessage* release_optional_foreign_message();
  993. ::protobuf_unittest_no_arena::ForeignMessage* mutable_optional_foreign_message();
  994. void set_allocated_optional_foreign_message(::protobuf_unittest_no_arena::ForeignMessage* optional_foreign_message);
  995. // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
  996. bool has_optional_import_message() const;
  997. void clear_optional_import_message();
  998. static const int kOptionalImportMessageFieldNumber = 20;
  999. private:
  1000. const ::protobuf_unittest_import::ImportMessage& _internal_optional_import_message() const;
  1001. public:
  1002. const ::protobuf_unittest_import::ImportMessage& optional_import_message() const;
  1003. ::protobuf_unittest_import::ImportMessage* release_optional_import_message();
  1004. ::protobuf_unittest_import::ImportMessage* mutable_optional_import_message();
  1005. void set_allocated_optional_import_message(::protobuf_unittest_import::ImportMessage* optional_import_message);
  1006. // optional .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
  1007. bool has_optional_public_import_message() const;
  1008. void clear_optional_public_import_message();
  1009. static const int kOptionalPublicImportMessageFieldNumber = 26;
  1010. private:
  1011. const ::protobuf_unittest_import::PublicImportMessage& _internal_optional_public_import_message() const;
  1012. public:
  1013. const ::protobuf_unittest_import::PublicImportMessage& optional_public_import_message() const;
  1014. ::protobuf_unittest_import::PublicImportMessage* release_optional_public_import_message();
  1015. ::protobuf_unittest_import::PublicImportMessage* mutable_optional_public_import_message();
  1016. void set_allocated_optional_public_import_message(::protobuf_unittest_import::PublicImportMessage* optional_public_import_message);
  1017. // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage optional_message = 27 [lazy = true];
  1018. bool has_optional_message() const;
  1019. void clear_optional_message();
  1020. static const int kOptionalMessageFieldNumber = 27;
  1021. private:
  1022. const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& _internal_optional_message() const;
  1023. public:
  1024. const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& optional_message() const;
  1025. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* release_optional_message();
  1026. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* mutable_optional_message();
  1027. void set_allocated_optional_message(::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* optional_message);
  1028. // optional int64 optional_int64 = 2;
  1029. bool has_optional_int64() const;
  1030. void clear_optional_int64();
  1031. static const int kOptionalInt64FieldNumber = 2;
  1032. ::google::protobuf::int64 optional_int64() const;
  1033. void set_optional_int64(::google::protobuf::int64 value);
  1034. // optional int32 optional_int32 = 1;
  1035. bool has_optional_int32() const;
  1036. void clear_optional_int32();
  1037. static const int kOptionalInt32FieldNumber = 1;
  1038. ::google::protobuf::int32 optional_int32() const;
  1039. void set_optional_int32(::google::protobuf::int32 value);
  1040. // optional uint32 optional_uint32 = 3;
  1041. bool has_optional_uint32() const;
  1042. void clear_optional_uint32();
  1043. static const int kOptionalUint32FieldNumber = 3;
  1044. ::google::protobuf::uint32 optional_uint32() const;
  1045. void set_optional_uint32(::google::protobuf::uint32 value);
  1046. // optional uint64 optional_uint64 = 4;
  1047. bool has_optional_uint64() const;
  1048. void clear_optional_uint64();
  1049. static const int kOptionalUint64FieldNumber = 4;
  1050. ::google::protobuf::uint64 optional_uint64() const;
  1051. void set_optional_uint64(::google::protobuf::uint64 value);
  1052. // optional sint64 optional_sint64 = 6;
  1053. bool has_optional_sint64() const;
  1054. void clear_optional_sint64();
  1055. static const int kOptionalSint64FieldNumber = 6;
  1056. ::google::protobuf::int64 optional_sint64() const;
  1057. void set_optional_sint64(::google::protobuf::int64 value);
  1058. // optional sint32 optional_sint32 = 5;
  1059. bool has_optional_sint32() const;
  1060. void clear_optional_sint32();
  1061. static const int kOptionalSint32FieldNumber = 5;
  1062. ::google::protobuf::int32 optional_sint32() const;
  1063. void set_optional_sint32(::google::protobuf::int32 value);
  1064. // optional fixed32 optional_fixed32 = 7;
  1065. bool has_optional_fixed32() const;
  1066. void clear_optional_fixed32();
  1067. static const int kOptionalFixed32FieldNumber = 7;
  1068. ::google::protobuf::uint32 optional_fixed32() const;
  1069. void set_optional_fixed32(::google::protobuf::uint32 value);
  1070. // optional fixed64 optional_fixed64 = 8;
  1071. bool has_optional_fixed64() const;
  1072. void clear_optional_fixed64();
  1073. static const int kOptionalFixed64FieldNumber = 8;
  1074. ::google::protobuf::uint64 optional_fixed64() const;
  1075. void set_optional_fixed64(::google::protobuf::uint64 value);
  1076. // optional sfixed64 optional_sfixed64 = 10;
  1077. bool has_optional_sfixed64() const;
  1078. void clear_optional_sfixed64();
  1079. static const int kOptionalSfixed64FieldNumber = 10;
  1080. ::google::protobuf::int64 optional_sfixed64() const;
  1081. void set_optional_sfixed64(::google::protobuf::int64 value);
  1082. // optional sfixed32 optional_sfixed32 = 9;
  1083. bool has_optional_sfixed32() const;
  1084. void clear_optional_sfixed32();
  1085. static const int kOptionalSfixed32FieldNumber = 9;
  1086. ::google::protobuf::int32 optional_sfixed32() const;
  1087. void set_optional_sfixed32(::google::protobuf::int32 value);
  1088. // optional float optional_float = 11;
  1089. bool has_optional_float() const;
  1090. void clear_optional_float();
  1091. static const int kOptionalFloatFieldNumber = 11;
  1092. float optional_float() const;
  1093. void set_optional_float(float value);
  1094. // optional double optional_double = 12;
  1095. bool has_optional_double() const;
  1096. void clear_optional_double();
  1097. static const int kOptionalDoubleFieldNumber = 12;
  1098. double optional_double() const;
  1099. void set_optional_double(double value);
  1100. // optional bool optional_bool = 13;
  1101. bool has_optional_bool() const;
  1102. void clear_optional_bool();
  1103. static const int kOptionalBoolFieldNumber = 13;
  1104. bool optional_bool() const;
  1105. void set_optional_bool(bool value);
  1106. // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
  1107. bool has_default_import_enum() const;
  1108. void clear_default_import_enum();
  1109. static const int kDefaultImportEnumFieldNumber = 83;
  1110. ::protobuf_unittest_import::ImportEnum default_import_enum() const;
  1111. void set_default_import_enum(::protobuf_unittest_import::ImportEnum value);
  1112. // optional .protobuf_unittest_no_arena.TestAllTypes.NestedEnum optional_nested_enum = 21;
  1113. bool has_optional_nested_enum() const;
  1114. void clear_optional_nested_enum();
  1115. static const int kOptionalNestedEnumFieldNumber = 21;
  1116. ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum optional_nested_enum() const;
  1117. void set_optional_nested_enum(::protobuf_unittest_no_arena::TestAllTypes_NestedEnum value);
  1118. // optional .protobuf_unittest_no_arena.ForeignEnum optional_foreign_enum = 22;
  1119. bool has_optional_foreign_enum() const;
  1120. void clear_optional_foreign_enum();
  1121. static const int kOptionalForeignEnumFieldNumber = 22;
  1122. ::protobuf_unittest_no_arena::ForeignEnum optional_foreign_enum() const;
  1123. void set_optional_foreign_enum(::protobuf_unittest_no_arena::ForeignEnum value);
  1124. // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
  1125. bool has_optional_import_enum() const;
  1126. void clear_optional_import_enum();
  1127. static const int kOptionalImportEnumFieldNumber = 23;
  1128. ::protobuf_unittest_import::ImportEnum optional_import_enum() const;
  1129. void set_optional_import_enum(::protobuf_unittest_import::ImportEnum value);
  1130. // optional int32 default_int32 = 61 [default = 41];
  1131. bool has_default_int32() const;
  1132. void clear_default_int32();
  1133. static const int kDefaultInt32FieldNumber = 61;
  1134. ::google::protobuf::int32 default_int32() const;
  1135. void set_default_int32(::google::protobuf::int32 value);
  1136. // optional int64 default_int64 = 62 [default = 42];
  1137. bool has_default_int64() const;
  1138. void clear_default_int64();
  1139. static const int kDefaultInt64FieldNumber = 62;
  1140. ::google::protobuf::int64 default_int64() const;
  1141. void set_default_int64(::google::protobuf::int64 value);
  1142. // optional uint64 default_uint64 = 64 [default = 44];
  1143. bool has_default_uint64() const;
  1144. void clear_default_uint64();
  1145. static const int kDefaultUint64FieldNumber = 64;
  1146. ::google::protobuf::uint64 default_uint64() const;
  1147. void set_default_uint64(::google::protobuf::uint64 value);
  1148. // optional uint32 default_uint32 = 63 [default = 43];
  1149. bool has_default_uint32() const;
  1150. void clear_default_uint32();
  1151. static const int kDefaultUint32FieldNumber = 63;
  1152. ::google::protobuf::uint32 default_uint32() const;
  1153. void set_default_uint32(::google::protobuf::uint32 value);
  1154. // optional sint32 default_sint32 = 65 [default = -45];
  1155. bool has_default_sint32() const;
  1156. void clear_default_sint32();
  1157. static const int kDefaultSint32FieldNumber = 65;
  1158. ::google::protobuf::int32 default_sint32() const;
  1159. void set_default_sint32(::google::protobuf::int32 value);
  1160. // optional sint64 default_sint64 = 66 [default = 46];
  1161. bool has_default_sint64() const;
  1162. void clear_default_sint64();
  1163. static const int kDefaultSint64FieldNumber = 66;
  1164. ::google::protobuf::int64 default_sint64() const;
  1165. void set_default_sint64(::google::protobuf::int64 value);
  1166. // optional fixed64 default_fixed64 = 68 [default = 48];
  1167. bool has_default_fixed64() const;
  1168. void clear_default_fixed64();
  1169. static const int kDefaultFixed64FieldNumber = 68;
  1170. ::google::protobuf::uint64 default_fixed64() const;
  1171. void set_default_fixed64(::google::protobuf::uint64 value);
  1172. // optional fixed32 default_fixed32 = 67 [default = 47];
  1173. bool has_default_fixed32() const;
  1174. void clear_default_fixed32();
  1175. static const int kDefaultFixed32FieldNumber = 67;
  1176. ::google::protobuf::uint32 default_fixed32() const;
  1177. void set_default_fixed32(::google::protobuf::uint32 value);
  1178. // optional sfixed32 default_sfixed32 = 69 [default = 49];
  1179. bool has_default_sfixed32() const;
  1180. void clear_default_sfixed32();
  1181. static const int kDefaultSfixed32FieldNumber = 69;
  1182. ::google::protobuf::int32 default_sfixed32() const;
  1183. void set_default_sfixed32(::google::protobuf::int32 value);
  1184. // optional sfixed64 default_sfixed64 = 70 [default = -50];
  1185. bool has_default_sfixed64() const;
  1186. void clear_default_sfixed64();
  1187. static const int kDefaultSfixed64FieldNumber = 70;
  1188. ::google::protobuf::int64 default_sfixed64() const;
  1189. void set_default_sfixed64(::google::protobuf::int64 value);
  1190. // optional double default_double = 72 [default = 52000];
  1191. bool has_default_double() const;
  1192. void clear_default_double();
  1193. static const int kDefaultDoubleFieldNumber = 72;
  1194. double default_double() const;
  1195. void set_default_double(double value);
  1196. // optional float default_float = 71 [default = 51.5];
  1197. bool has_default_float() const;
  1198. void clear_default_float();
  1199. static const int kDefaultFloatFieldNumber = 71;
  1200. float default_float() const;
  1201. void set_default_float(float value);
  1202. // optional bool default_bool = 73 [default = true];
  1203. bool has_default_bool() const;
  1204. void clear_default_bool();
  1205. static const int kDefaultBoolFieldNumber = 73;
  1206. bool default_bool() const;
  1207. void set_default_bool(bool value);
  1208. // optional .protobuf_unittest_no_arena.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
  1209. bool has_default_nested_enum() const;
  1210. void clear_default_nested_enum();
  1211. static const int kDefaultNestedEnumFieldNumber = 81;
  1212. ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum default_nested_enum() const;
  1213. void set_default_nested_enum(::protobuf_unittest_no_arena::TestAllTypes_NestedEnum value);
  1214. // optional .protobuf_unittest_no_arena.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
  1215. bool has_default_foreign_enum() const;
  1216. void clear_default_foreign_enum();
  1217. static const int kDefaultForeignEnumFieldNumber = 82;
  1218. ::protobuf_unittest_no_arena::ForeignEnum default_foreign_enum() const;
  1219. void set_default_foreign_enum(::protobuf_unittest_no_arena::ForeignEnum value);
  1220. // optional uint32 oneof_uint32 = 111;
  1221. bool has_oneof_uint32() const;
  1222. void clear_oneof_uint32();
  1223. static const int kOneofUint32FieldNumber = 111;
  1224. ::google::protobuf::uint32 oneof_uint32() const;
  1225. void set_oneof_uint32(::google::protobuf::uint32 value);
  1226. // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage oneof_nested_message = 112;
  1227. bool has_oneof_nested_message() const;
  1228. void clear_oneof_nested_message();
  1229. static const int kOneofNestedMessageFieldNumber = 112;
  1230. private:
  1231. const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& _internal_oneof_nested_message() const;
  1232. public:
  1233. const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& oneof_nested_message() const;
  1234. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* release_oneof_nested_message();
  1235. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* mutable_oneof_nested_message();
  1236. void set_allocated_oneof_nested_message(::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* oneof_nested_message);
  1237. // optional string oneof_string = 113;
  1238. bool has_oneof_string() const;
  1239. void clear_oneof_string();
  1240. static const int kOneofStringFieldNumber = 113;
  1241. const ::std::string& oneof_string() const;
  1242. void set_oneof_string(const ::std::string& value);
  1243. #if LANG_CXX11
  1244. void set_oneof_string(::std::string&& value);
  1245. #endif
  1246. void set_oneof_string(const char* value);
  1247. void set_oneof_string(const char* value, size_t size);
  1248. ::std::string* mutable_oneof_string();
  1249. ::std::string* release_oneof_string();
  1250. void set_allocated_oneof_string(::std::string* oneof_string);
  1251. // optional bytes oneof_bytes = 114;
  1252. bool has_oneof_bytes() const;
  1253. void clear_oneof_bytes();
  1254. static const int kOneofBytesFieldNumber = 114;
  1255. const ::std::string& oneof_bytes() const;
  1256. void set_oneof_bytes(const ::std::string& value);
  1257. #if LANG_CXX11
  1258. void set_oneof_bytes(::std::string&& value);
  1259. #endif
  1260. void set_oneof_bytes(const char* value);
  1261. void set_oneof_bytes(const void* value, size_t size);
  1262. ::std::string* mutable_oneof_bytes();
  1263. ::std::string* release_oneof_bytes();
  1264. void set_allocated_oneof_bytes(::std::string* oneof_bytes);
  1265. // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage lazy_oneof_nested_message = 115 [lazy = true];
  1266. bool has_lazy_oneof_nested_message() const;
  1267. void clear_lazy_oneof_nested_message();
  1268. static const int kLazyOneofNestedMessageFieldNumber = 115;
  1269. private:
  1270. const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& _internal_lazy_oneof_nested_message() const;
  1271. public:
  1272. const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& lazy_oneof_nested_message() const;
  1273. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* release_lazy_oneof_nested_message();
  1274. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* mutable_lazy_oneof_nested_message();
  1275. void set_allocated_lazy_oneof_nested_message(::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* lazy_oneof_nested_message);
  1276. void clear_oneof_field();
  1277. OneofFieldCase oneof_field_case() const;
  1278. // @@protoc_insertion_point(class_scope:protobuf_unittest_no_arena.TestAllTypes)
  1279. private:
  1280. void set_has_optional_int32();
  1281. void clear_has_optional_int32();
  1282. void set_has_optional_int64();
  1283. void clear_has_optional_int64();
  1284. void set_has_optional_uint32();
  1285. void clear_has_optional_uint32();
  1286. void set_has_optional_uint64();
  1287. void clear_has_optional_uint64();
  1288. void set_has_optional_sint32();
  1289. void clear_has_optional_sint32();
  1290. void set_has_optional_sint64();
  1291. void clear_has_optional_sint64();
  1292. void set_has_optional_fixed32();
  1293. void clear_has_optional_fixed32();
  1294. void set_has_optional_fixed64();
  1295. void clear_has_optional_fixed64();
  1296. void set_has_optional_sfixed32();
  1297. void clear_has_optional_sfixed32();
  1298. void set_has_optional_sfixed64();
  1299. void clear_has_optional_sfixed64();
  1300. void set_has_optional_float();
  1301. void clear_has_optional_float();
  1302. void set_has_optional_double();
  1303. void clear_has_optional_double();
  1304. void set_has_optional_bool();
  1305. void clear_has_optional_bool();
  1306. void set_has_optional_string();
  1307. void clear_has_optional_string();
  1308. void set_has_optional_bytes();
  1309. void clear_has_optional_bytes();
  1310. void set_has_optionalgroup();
  1311. void clear_has_optionalgroup();
  1312. void set_has_optional_nested_message();
  1313. void clear_has_optional_nested_message();
  1314. void set_has_optional_foreign_message();
  1315. void clear_has_optional_foreign_message();
  1316. void set_has_optional_import_message();
  1317. void clear_has_optional_import_message();
  1318. void set_has_optional_nested_enum();
  1319. void clear_has_optional_nested_enum();
  1320. void set_has_optional_foreign_enum();
  1321. void clear_has_optional_foreign_enum();
  1322. void set_has_optional_import_enum();
  1323. void clear_has_optional_import_enum();
  1324. void set_has_optional_string_piece();
  1325. void clear_has_optional_string_piece();
  1326. void set_has_optional_cord();
  1327. void clear_has_optional_cord();
  1328. void set_has_optional_public_import_message();
  1329. void clear_has_optional_public_import_message();
  1330. void set_has_optional_message();
  1331. void clear_has_optional_message();
  1332. void set_has_default_int32();
  1333. void clear_has_default_int32();
  1334. void set_has_default_int64();
  1335. void clear_has_default_int64();
  1336. void set_has_default_uint32();
  1337. void clear_has_default_uint32();
  1338. void set_has_default_uint64();
  1339. void clear_has_default_uint64();
  1340. void set_has_default_sint32();
  1341. void clear_has_default_sint32();
  1342. void set_has_default_sint64();
  1343. void clear_has_default_sint64();
  1344. void set_has_default_fixed32();
  1345. void clear_has_default_fixed32();
  1346. void set_has_default_fixed64();
  1347. void clear_has_default_fixed64();
  1348. void set_has_default_sfixed32();
  1349. void clear_has_default_sfixed32();
  1350. void set_has_default_sfixed64();
  1351. void clear_has_default_sfixed64();
  1352. void set_has_default_float();
  1353. void clear_has_default_float();
  1354. void set_has_default_double();
  1355. void clear_has_default_double();
  1356. void set_has_default_bool();
  1357. void clear_has_default_bool();
  1358. void set_has_default_string();
  1359. void clear_has_default_string();
  1360. void set_has_default_bytes();
  1361. void clear_has_default_bytes();
  1362. void set_has_default_nested_enum();
  1363. void clear_has_default_nested_enum();
  1364. void set_has_default_foreign_enum();
  1365. void clear_has_default_foreign_enum();
  1366. void set_has_default_import_enum();
  1367. void clear_has_default_import_enum();
  1368. void set_has_default_string_piece();
  1369. void clear_has_default_string_piece();
  1370. void set_has_default_cord();
  1371. void clear_has_default_cord();
  1372. void set_has_oneof_uint32();
  1373. void set_has_oneof_nested_message();
  1374. void set_has_oneof_string();
  1375. void set_has_oneof_bytes();
  1376. void set_has_lazy_oneof_nested_message();
  1377. inline bool has_oneof_field() const;
  1378. inline void clear_has_oneof_field();
  1379. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  1380. ::google::protobuf::internal::HasBits<2> _has_bits_;
  1381. ::google::protobuf::RepeatedField< ::google::protobuf::int32 > repeated_int32_;
  1382. ::google::protobuf::RepeatedField< ::google::protobuf::int64 > repeated_int64_;
  1383. ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > repeated_uint32_;
  1384. ::google::protobuf::RepeatedField< ::google::protobuf::uint64 > repeated_uint64_;
  1385. ::google::protobuf::RepeatedField< ::google::protobuf::int32 > repeated_sint32_;
  1386. ::google::protobuf::RepeatedField< ::google::protobuf::int64 > repeated_sint64_;
  1387. ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > repeated_fixed32_;
  1388. ::google::protobuf::RepeatedField< ::google::protobuf::uint64 > repeated_fixed64_;
  1389. ::google::protobuf::RepeatedField< ::google::protobuf::int32 > repeated_sfixed32_;
  1390. ::google::protobuf::RepeatedField< ::google::protobuf::int64 > repeated_sfixed64_;
  1391. ::google::protobuf::RepeatedField< float > repeated_float_;
  1392. ::google::protobuf::RepeatedField< double > repeated_double_;
  1393. ::google::protobuf::RepeatedField< bool > repeated_bool_;
  1394. ::google::protobuf::RepeatedPtrField< ::std::string> repeated_string_;
  1395. ::google::protobuf::RepeatedPtrField< ::std::string> repeated_bytes_;
  1396. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup > repeatedgroup_;
  1397. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage > repeated_nested_message_;
  1398. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::ForeignMessage > repeated_foreign_message_;
  1399. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_import::ImportMessage > repeated_import_message_;
  1400. ::google::protobuf::RepeatedField<int> repeated_nested_enum_;
  1401. ::google::protobuf::RepeatedField<int> repeated_foreign_enum_;
  1402. ::google::protobuf::RepeatedField<int> repeated_import_enum_;
  1403. ::google::protobuf::RepeatedPtrField< ::std::string> repeated_string_piece_;
  1404. ::google::protobuf::RepeatedPtrField< ::std::string> repeated_cord_;
  1405. ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage > repeated_lazy_message_;
  1406. ::google::protobuf::internal::ArenaStringPtr optional_string_;
  1407. ::google::protobuf::internal::ArenaStringPtr optional_bytes_;
  1408. ::google::protobuf::internal::ArenaStringPtr optional_string_piece_;
  1409. ::google::protobuf::internal::ArenaStringPtr optional_cord_;
  1410. public:
  1411. static ::google::protobuf::internal::ExplicitlyConstructed< ::std::string> _i_give_permission_to_break_this_code_default_default_string_;
  1412. private:
  1413. ::google::protobuf::internal::ArenaStringPtr default_string_;
  1414. public:
  1415. static ::google::protobuf::internal::ExplicitlyConstructed< ::std::string> _i_give_permission_to_break_this_code_default_default_bytes_;
  1416. private:
  1417. ::google::protobuf::internal::ArenaStringPtr default_bytes_;
  1418. public:
  1419. static ::google::protobuf::internal::ExplicitlyConstructed< ::std::string> _i_give_permission_to_break_this_code_default_default_string_piece_;
  1420. private:
  1421. ::google::protobuf::internal::ArenaStringPtr default_string_piece_;
  1422. public:
  1423. static ::google::protobuf::internal::ExplicitlyConstructed< ::std::string> _i_give_permission_to_break_this_code_default_default_cord_;
  1424. private:
  1425. ::google::protobuf::internal::ArenaStringPtr default_cord_;
  1426. ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup* optionalgroup_;
  1427. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* optional_nested_message_;
  1428. ::protobuf_unittest_no_arena::ForeignMessage* optional_foreign_message_;
  1429. ::protobuf_unittest_import::ImportMessage* optional_import_message_;
  1430. ::protobuf_unittest_import::PublicImportMessage* optional_public_import_message_;
  1431. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* optional_message_;
  1432. ::google::protobuf::int64 optional_int64_;
  1433. ::google::protobuf::int32 optional_int32_;
  1434. ::google::protobuf::uint32 optional_uint32_;
  1435. ::google::protobuf::uint64 optional_uint64_;
  1436. ::google::protobuf::int64 optional_sint64_;
  1437. ::google::protobuf::int32 optional_sint32_;
  1438. ::google::protobuf::uint32 optional_fixed32_;
  1439. ::google::protobuf::uint64 optional_fixed64_;
  1440. ::google::protobuf::int64 optional_sfixed64_;
  1441. ::google::protobuf::int32 optional_sfixed32_;
  1442. float optional_float_;
  1443. double optional_double_;
  1444. bool optional_bool_;
  1445. int default_import_enum_;
  1446. int optional_nested_enum_;
  1447. int optional_foreign_enum_;
  1448. int optional_import_enum_;
  1449. ::google::protobuf::int32 default_int32_;
  1450. ::google::protobuf::int64 default_int64_;
  1451. ::google::protobuf::uint64 default_uint64_;
  1452. ::google::protobuf::uint32 default_uint32_;
  1453. ::google::protobuf::int32 default_sint32_;
  1454. ::google::protobuf::int64 default_sint64_;
  1455. ::google::protobuf::uint64 default_fixed64_;
  1456. ::google::protobuf::uint32 default_fixed32_;
  1457. ::google::protobuf::int32 default_sfixed32_;
  1458. ::google::protobuf::int64 default_sfixed64_;
  1459. double default_double_;
  1460. float default_float_;
  1461. bool default_bool_;
  1462. int default_nested_enum_;
  1463. int default_foreign_enum_;
  1464. union OneofFieldUnion {
  1465. OneofFieldUnion() {}
  1466. ::google::protobuf::uint32 oneof_uint32_;
  1467. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* oneof_nested_message_;
  1468. ::google::protobuf::internal::ArenaStringPtr oneof_string_;
  1469. ::google::protobuf::internal::ArenaStringPtr oneof_bytes_;
  1470. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* lazy_oneof_nested_message_;
  1471. } oneof_field_;
  1472. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  1473. ::google::protobuf::uint32 _oneof_case_[1];
  1474. friend struct ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::TableStruct;
  1475. };
  1476. // -------------------------------------------------------------------
  1477. class ForeignMessage : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest_no_arena.ForeignMessage) */ {
  1478. public:
  1479. ForeignMessage();
  1480. virtual ~ForeignMessage();
  1481. ForeignMessage(const ForeignMessage& from);
  1482. inline ForeignMessage& operator=(const ForeignMessage& from) {
  1483. CopyFrom(from);
  1484. return *this;
  1485. }
  1486. #if LANG_CXX11
  1487. ForeignMessage(ForeignMessage&& from) noexcept
  1488. : ForeignMessage() {
  1489. *this = ::std::move(from);
  1490. }
  1491. inline ForeignMessage& operator=(ForeignMessage&& from) noexcept {
  1492. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  1493. if (this != &from) InternalSwap(&from);
  1494. } else {
  1495. CopyFrom(from);
  1496. }
  1497. return *this;
  1498. }
  1499. #endif
  1500. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  1501. return _internal_metadata_.unknown_fields();
  1502. }
  1503. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  1504. return _internal_metadata_.mutable_unknown_fields();
  1505. }
  1506. static const ::google::protobuf::Descriptor* descriptor();
  1507. static const ForeignMessage& default_instance();
  1508. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  1509. static inline const ForeignMessage* internal_default_instance() {
  1510. return reinterpret_cast<const ForeignMessage*>(
  1511. &_ForeignMessage_default_instance_);
  1512. }
  1513. static constexpr int kIndexInFileMessages =
  1514. 4;
  1515. void Swap(ForeignMessage* other);
  1516. friend void swap(ForeignMessage& a, ForeignMessage& b) {
  1517. a.Swap(&b);
  1518. }
  1519. // implements Message ----------------------------------------------
  1520. inline ForeignMessage* New() const final {
  1521. return CreateMaybeMessage<ForeignMessage>(NULL);
  1522. }
  1523. ForeignMessage* New(::google::protobuf::Arena* arena) const final {
  1524. return CreateMaybeMessage<ForeignMessage>(arena);
  1525. }
  1526. void CopyFrom(const ::google::protobuf::Message& from) final;
  1527. void MergeFrom(const ::google::protobuf::Message& from) final;
  1528. void CopyFrom(const ForeignMessage& from);
  1529. void MergeFrom(const ForeignMessage& from);
  1530. void Clear() final;
  1531. bool IsInitialized() const final;
  1532. size_t ByteSizeLong() const final;
  1533. bool MergePartialFromCodedStream(
  1534. ::google::protobuf::io::CodedInputStream* input) final;
  1535. void SerializeWithCachedSizes(
  1536. ::google::protobuf::io::CodedOutputStream* output) const final;
  1537. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  1538. bool deterministic, ::google::protobuf::uint8* target) const final;
  1539. int GetCachedSize() const final { return _cached_size_.Get(); }
  1540. private:
  1541. void SharedCtor();
  1542. void SharedDtor();
  1543. void SetCachedSize(int size) const final;
  1544. void InternalSwap(ForeignMessage* other);
  1545. private:
  1546. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  1547. return NULL;
  1548. }
  1549. inline void* MaybeArenaPtr() const {
  1550. return NULL;
  1551. }
  1552. public:
  1553. ::google::protobuf::Metadata GetMetadata() const final;
  1554. // nested types ----------------------------------------------------
  1555. // accessors -------------------------------------------------------
  1556. // optional int32 c = 1;
  1557. bool has_c() const;
  1558. void clear_c();
  1559. static const int kCFieldNumber = 1;
  1560. ::google::protobuf::int32 c() const;
  1561. void set_c(::google::protobuf::int32 value);
  1562. // @@protoc_insertion_point(class_scope:protobuf_unittest_no_arena.ForeignMessage)
  1563. private:
  1564. void set_has_c();
  1565. void clear_has_c();
  1566. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  1567. ::google::protobuf::internal::HasBits<1> _has_bits_;
  1568. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  1569. ::google::protobuf::int32 c_;
  1570. friend struct ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::TableStruct;
  1571. };
  1572. // -------------------------------------------------------------------
  1573. class TestNoArenaMessage : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:protobuf_unittest_no_arena.TestNoArenaMessage) */ {
  1574. public:
  1575. TestNoArenaMessage();
  1576. virtual ~TestNoArenaMessage();
  1577. TestNoArenaMessage(const TestNoArenaMessage& from);
  1578. inline TestNoArenaMessage& operator=(const TestNoArenaMessage& from) {
  1579. CopyFrom(from);
  1580. return *this;
  1581. }
  1582. #if LANG_CXX11
  1583. TestNoArenaMessage(TestNoArenaMessage&& from) noexcept
  1584. : TestNoArenaMessage() {
  1585. *this = ::std::move(from);
  1586. }
  1587. inline TestNoArenaMessage& operator=(TestNoArenaMessage&& from) noexcept {
  1588. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  1589. if (this != &from) InternalSwap(&from);
  1590. } else {
  1591. CopyFrom(from);
  1592. }
  1593. return *this;
  1594. }
  1595. #endif
  1596. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  1597. return _internal_metadata_.unknown_fields();
  1598. }
  1599. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  1600. return _internal_metadata_.mutable_unknown_fields();
  1601. }
  1602. static const ::google::protobuf::Descriptor* descriptor();
  1603. static const TestNoArenaMessage& default_instance();
  1604. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  1605. static inline const TestNoArenaMessage* internal_default_instance() {
  1606. return reinterpret_cast<const TestNoArenaMessage*>(
  1607. &_TestNoArenaMessage_default_instance_);
  1608. }
  1609. static constexpr int kIndexInFileMessages =
  1610. 5;
  1611. void Swap(TestNoArenaMessage* other);
  1612. friend void swap(TestNoArenaMessage& a, TestNoArenaMessage& b) {
  1613. a.Swap(&b);
  1614. }
  1615. // implements Message ----------------------------------------------
  1616. inline TestNoArenaMessage* New() const final {
  1617. return CreateMaybeMessage<TestNoArenaMessage>(NULL);
  1618. }
  1619. TestNoArenaMessage* New(::google::protobuf::Arena* arena) const final {
  1620. return CreateMaybeMessage<TestNoArenaMessage>(arena);
  1621. }
  1622. void CopyFrom(const ::google::protobuf::Message& from) final;
  1623. void MergeFrom(const ::google::protobuf::Message& from) final;
  1624. void CopyFrom(const TestNoArenaMessage& from);
  1625. void MergeFrom(const TestNoArenaMessage& from);
  1626. void Clear() final;
  1627. bool IsInitialized() const final;
  1628. size_t ByteSizeLong() const final;
  1629. bool MergePartialFromCodedStream(
  1630. ::google::protobuf::io::CodedInputStream* input) final;
  1631. void SerializeWithCachedSizes(
  1632. ::google::protobuf::io::CodedOutputStream* output) const final;
  1633. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  1634. bool deterministic, ::google::protobuf::uint8* target) const final;
  1635. int GetCachedSize() const final { return _cached_size_.Get(); }
  1636. private:
  1637. void SharedCtor();
  1638. void SharedDtor();
  1639. void SetCachedSize(int size) const final;
  1640. void InternalSwap(TestNoArenaMessage* other);
  1641. private:
  1642. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  1643. return NULL;
  1644. }
  1645. inline void* MaybeArenaPtr() const {
  1646. return NULL;
  1647. }
  1648. public:
  1649. ::google::protobuf::Metadata GetMetadata() const final;
  1650. // nested types ----------------------------------------------------
  1651. // accessors -------------------------------------------------------
  1652. // optional .proto2_arena_unittest.ArenaMessage arena_message = 1;
  1653. bool has_arena_message() const;
  1654. void clear_arena_message();
  1655. static const int kArenaMessageFieldNumber = 1;
  1656. private:
  1657. const ::proto2_arena_unittest::ArenaMessage& _internal_arena_message() const;
  1658. public:
  1659. const ::proto2_arena_unittest::ArenaMessage& arena_message() const;
  1660. ::proto2_arena_unittest::ArenaMessage* release_arena_message();
  1661. ::proto2_arena_unittest::ArenaMessage* mutable_arena_message();
  1662. void set_allocated_arena_message(::proto2_arena_unittest::ArenaMessage* arena_message);
  1663. // @@protoc_insertion_point(class_scope:protobuf_unittest_no_arena.TestNoArenaMessage)
  1664. private:
  1665. void set_has_arena_message();
  1666. void clear_has_arena_message();
  1667. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  1668. ::google::protobuf::internal::HasBits<1> _has_bits_;
  1669. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  1670. ::proto2_arena_unittest::ArenaMessage* arena_message_;
  1671. friend struct ::protobuf_google_2fprotobuf_2funittest_5fno_5farena_2eproto::TableStruct;
  1672. };
  1673. // ===================================================================
  1674. // ===================================================================
  1675. #ifdef __GNUC__
  1676. #pragma GCC diagnostic push
  1677. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  1678. #endif // __GNUC__
  1679. // TestAllTypes_NestedMessage
  1680. // optional int32 bb = 1;
  1681. inline bool TestAllTypes_NestedMessage::has_bb() const {
  1682. return (_has_bits_[0] & 0x00000001u) != 0;
  1683. }
  1684. inline void TestAllTypes_NestedMessage::set_has_bb() {
  1685. _has_bits_[0] |= 0x00000001u;
  1686. }
  1687. inline void TestAllTypes_NestedMessage::clear_has_bb() {
  1688. _has_bits_[0] &= ~0x00000001u;
  1689. }
  1690. inline void TestAllTypes_NestedMessage::clear_bb() {
  1691. bb_ = 0;
  1692. clear_has_bb();
  1693. }
  1694. inline ::google::protobuf::int32 TestAllTypes_NestedMessage::bb() const {
  1695. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.NestedMessage.bb)
  1696. return bb_;
  1697. }
  1698. inline void TestAllTypes_NestedMessage::set_bb(::google::protobuf::int32 value) {
  1699. set_has_bb();
  1700. bb_ = value;
  1701. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.NestedMessage.bb)
  1702. }
  1703. // -------------------------------------------------------------------
  1704. // TestAllTypes_OptionalGroup
  1705. // optional int32 a = 17;
  1706. inline bool TestAllTypes_OptionalGroup::has_a() const {
  1707. return (_has_bits_[0] & 0x00000001u) != 0;
  1708. }
  1709. inline void TestAllTypes_OptionalGroup::set_has_a() {
  1710. _has_bits_[0] |= 0x00000001u;
  1711. }
  1712. inline void TestAllTypes_OptionalGroup::clear_has_a() {
  1713. _has_bits_[0] &= ~0x00000001u;
  1714. }
  1715. inline void TestAllTypes_OptionalGroup::clear_a() {
  1716. a_ = 0;
  1717. clear_has_a();
  1718. }
  1719. inline ::google::protobuf::int32 TestAllTypes_OptionalGroup::a() const {
  1720. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup.a)
  1721. return a_;
  1722. }
  1723. inline void TestAllTypes_OptionalGroup::set_a(::google::protobuf::int32 value) {
  1724. set_has_a();
  1725. a_ = value;
  1726. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.OptionalGroup.a)
  1727. }
  1728. // -------------------------------------------------------------------
  1729. // TestAllTypes_RepeatedGroup
  1730. // optional int32 a = 47;
  1731. inline bool TestAllTypes_RepeatedGroup::has_a() const {
  1732. return (_has_bits_[0] & 0x00000001u) != 0;
  1733. }
  1734. inline void TestAllTypes_RepeatedGroup::set_has_a() {
  1735. _has_bits_[0] |= 0x00000001u;
  1736. }
  1737. inline void TestAllTypes_RepeatedGroup::clear_has_a() {
  1738. _has_bits_[0] &= ~0x00000001u;
  1739. }
  1740. inline void TestAllTypes_RepeatedGroup::clear_a() {
  1741. a_ = 0;
  1742. clear_has_a();
  1743. }
  1744. inline ::google::protobuf::int32 TestAllTypes_RepeatedGroup::a() const {
  1745. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup.a)
  1746. return a_;
  1747. }
  1748. inline void TestAllTypes_RepeatedGroup::set_a(::google::protobuf::int32 value) {
  1749. set_has_a();
  1750. a_ = value;
  1751. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.RepeatedGroup.a)
  1752. }
  1753. // -------------------------------------------------------------------
  1754. // TestAllTypes
  1755. // optional int32 optional_int32 = 1;
  1756. inline bool TestAllTypes::has_optional_int32() const {
  1757. return (_has_bits_[0] & 0x00008000u) != 0;
  1758. }
  1759. inline void TestAllTypes::set_has_optional_int32() {
  1760. _has_bits_[0] |= 0x00008000u;
  1761. }
  1762. inline void TestAllTypes::clear_has_optional_int32() {
  1763. _has_bits_[0] &= ~0x00008000u;
  1764. }
  1765. inline void TestAllTypes::clear_optional_int32() {
  1766. optional_int32_ = 0;
  1767. clear_has_optional_int32();
  1768. }
  1769. inline ::google::protobuf::int32 TestAllTypes::optional_int32() const {
  1770. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_int32)
  1771. return optional_int32_;
  1772. }
  1773. inline void TestAllTypes::set_optional_int32(::google::protobuf::int32 value) {
  1774. set_has_optional_int32();
  1775. optional_int32_ = value;
  1776. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_int32)
  1777. }
  1778. // optional int64 optional_int64 = 2;
  1779. inline bool TestAllTypes::has_optional_int64() const {
  1780. return (_has_bits_[0] & 0x00004000u) != 0;
  1781. }
  1782. inline void TestAllTypes::set_has_optional_int64() {
  1783. _has_bits_[0] |= 0x00004000u;
  1784. }
  1785. inline void TestAllTypes::clear_has_optional_int64() {
  1786. _has_bits_[0] &= ~0x00004000u;
  1787. }
  1788. inline void TestAllTypes::clear_optional_int64() {
  1789. optional_int64_ = GOOGLE_LONGLONG(0);
  1790. clear_has_optional_int64();
  1791. }
  1792. inline ::google::protobuf::int64 TestAllTypes::optional_int64() const {
  1793. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_int64)
  1794. return optional_int64_;
  1795. }
  1796. inline void TestAllTypes::set_optional_int64(::google::protobuf::int64 value) {
  1797. set_has_optional_int64();
  1798. optional_int64_ = value;
  1799. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_int64)
  1800. }
  1801. // optional uint32 optional_uint32 = 3;
  1802. inline bool TestAllTypes::has_optional_uint32() const {
  1803. return (_has_bits_[0] & 0x00010000u) != 0;
  1804. }
  1805. inline void TestAllTypes::set_has_optional_uint32() {
  1806. _has_bits_[0] |= 0x00010000u;
  1807. }
  1808. inline void TestAllTypes::clear_has_optional_uint32() {
  1809. _has_bits_[0] &= ~0x00010000u;
  1810. }
  1811. inline void TestAllTypes::clear_optional_uint32() {
  1812. optional_uint32_ = 0u;
  1813. clear_has_optional_uint32();
  1814. }
  1815. inline ::google::protobuf::uint32 TestAllTypes::optional_uint32() const {
  1816. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_uint32)
  1817. return optional_uint32_;
  1818. }
  1819. inline void TestAllTypes::set_optional_uint32(::google::protobuf::uint32 value) {
  1820. set_has_optional_uint32();
  1821. optional_uint32_ = value;
  1822. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_uint32)
  1823. }
  1824. // optional uint64 optional_uint64 = 4;
  1825. inline bool TestAllTypes::has_optional_uint64() const {
  1826. return (_has_bits_[0] & 0x00020000u) != 0;
  1827. }
  1828. inline void TestAllTypes::set_has_optional_uint64() {
  1829. _has_bits_[0] |= 0x00020000u;
  1830. }
  1831. inline void TestAllTypes::clear_has_optional_uint64() {
  1832. _has_bits_[0] &= ~0x00020000u;
  1833. }
  1834. inline void TestAllTypes::clear_optional_uint64() {
  1835. optional_uint64_ = GOOGLE_ULONGLONG(0);
  1836. clear_has_optional_uint64();
  1837. }
  1838. inline ::google::protobuf::uint64 TestAllTypes::optional_uint64() const {
  1839. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_uint64)
  1840. return optional_uint64_;
  1841. }
  1842. inline void TestAllTypes::set_optional_uint64(::google::protobuf::uint64 value) {
  1843. set_has_optional_uint64();
  1844. optional_uint64_ = value;
  1845. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_uint64)
  1846. }
  1847. // optional sint32 optional_sint32 = 5;
  1848. inline bool TestAllTypes::has_optional_sint32() const {
  1849. return (_has_bits_[0] & 0x00080000u) != 0;
  1850. }
  1851. inline void TestAllTypes::set_has_optional_sint32() {
  1852. _has_bits_[0] |= 0x00080000u;
  1853. }
  1854. inline void TestAllTypes::clear_has_optional_sint32() {
  1855. _has_bits_[0] &= ~0x00080000u;
  1856. }
  1857. inline void TestAllTypes::clear_optional_sint32() {
  1858. optional_sint32_ = 0;
  1859. clear_has_optional_sint32();
  1860. }
  1861. inline ::google::protobuf::int32 TestAllTypes::optional_sint32() const {
  1862. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_sint32)
  1863. return optional_sint32_;
  1864. }
  1865. inline void TestAllTypes::set_optional_sint32(::google::protobuf::int32 value) {
  1866. set_has_optional_sint32();
  1867. optional_sint32_ = value;
  1868. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_sint32)
  1869. }
  1870. // optional sint64 optional_sint64 = 6;
  1871. inline bool TestAllTypes::has_optional_sint64() const {
  1872. return (_has_bits_[0] & 0x00040000u) != 0;
  1873. }
  1874. inline void TestAllTypes::set_has_optional_sint64() {
  1875. _has_bits_[0] |= 0x00040000u;
  1876. }
  1877. inline void TestAllTypes::clear_has_optional_sint64() {
  1878. _has_bits_[0] &= ~0x00040000u;
  1879. }
  1880. inline void TestAllTypes::clear_optional_sint64() {
  1881. optional_sint64_ = GOOGLE_LONGLONG(0);
  1882. clear_has_optional_sint64();
  1883. }
  1884. inline ::google::protobuf::int64 TestAllTypes::optional_sint64() const {
  1885. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_sint64)
  1886. return optional_sint64_;
  1887. }
  1888. inline void TestAllTypes::set_optional_sint64(::google::protobuf::int64 value) {
  1889. set_has_optional_sint64();
  1890. optional_sint64_ = value;
  1891. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_sint64)
  1892. }
  1893. // optional fixed32 optional_fixed32 = 7;
  1894. inline bool TestAllTypes::has_optional_fixed32() const {
  1895. return (_has_bits_[0] & 0x00100000u) != 0;
  1896. }
  1897. inline void TestAllTypes::set_has_optional_fixed32() {
  1898. _has_bits_[0] |= 0x00100000u;
  1899. }
  1900. inline void TestAllTypes::clear_has_optional_fixed32() {
  1901. _has_bits_[0] &= ~0x00100000u;
  1902. }
  1903. inline void TestAllTypes::clear_optional_fixed32() {
  1904. optional_fixed32_ = 0u;
  1905. clear_has_optional_fixed32();
  1906. }
  1907. inline ::google::protobuf::uint32 TestAllTypes::optional_fixed32() const {
  1908. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_fixed32)
  1909. return optional_fixed32_;
  1910. }
  1911. inline void TestAllTypes::set_optional_fixed32(::google::protobuf::uint32 value) {
  1912. set_has_optional_fixed32();
  1913. optional_fixed32_ = value;
  1914. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_fixed32)
  1915. }
  1916. // optional fixed64 optional_fixed64 = 8;
  1917. inline bool TestAllTypes::has_optional_fixed64() const {
  1918. return (_has_bits_[0] & 0x00200000u) != 0;
  1919. }
  1920. inline void TestAllTypes::set_has_optional_fixed64() {
  1921. _has_bits_[0] |= 0x00200000u;
  1922. }
  1923. inline void TestAllTypes::clear_has_optional_fixed64() {
  1924. _has_bits_[0] &= ~0x00200000u;
  1925. }
  1926. inline void TestAllTypes::clear_optional_fixed64() {
  1927. optional_fixed64_ = GOOGLE_ULONGLONG(0);
  1928. clear_has_optional_fixed64();
  1929. }
  1930. inline ::google::protobuf::uint64 TestAllTypes::optional_fixed64() const {
  1931. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_fixed64)
  1932. return optional_fixed64_;
  1933. }
  1934. inline void TestAllTypes::set_optional_fixed64(::google::protobuf::uint64 value) {
  1935. set_has_optional_fixed64();
  1936. optional_fixed64_ = value;
  1937. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_fixed64)
  1938. }
  1939. // optional sfixed32 optional_sfixed32 = 9;
  1940. inline bool TestAllTypes::has_optional_sfixed32() const {
  1941. return (_has_bits_[0] & 0x00800000u) != 0;
  1942. }
  1943. inline void TestAllTypes::set_has_optional_sfixed32() {
  1944. _has_bits_[0] |= 0x00800000u;
  1945. }
  1946. inline void TestAllTypes::clear_has_optional_sfixed32() {
  1947. _has_bits_[0] &= ~0x00800000u;
  1948. }
  1949. inline void TestAllTypes::clear_optional_sfixed32() {
  1950. optional_sfixed32_ = 0;
  1951. clear_has_optional_sfixed32();
  1952. }
  1953. inline ::google::protobuf::int32 TestAllTypes::optional_sfixed32() const {
  1954. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_sfixed32)
  1955. return optional_sfixed32_;
  1956. }
  1957. inline void TestAllTypes::set_optional_sfixed32(::google::protobuf::int32 value) {
  1958. set_has_optional_sfixed32();
  1959. optional_sfixed32_ = value;
  1960. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_sfixed32)
  1961. }
  1962. // optional sfixed64 optional_sfixed64 = 10;
  1963. inline bool TestAllTypes::has_optional_sfixed64() const {
  1964. return (_has_bits_[0] & 0x00400000u) != 0;
  1965. }
  1966. inline void TestAllTypes::set_has_optional_sfixed64() {
  1967. _has_bits_[0] |= 0x00400000u;
  1968. }
  1969. inline void TestAllTypes::clear_has_optional_sfixed64() {
  1970. _has_bits_[0] &= ~0x00400000u;
  1971. }
  1972. inline void TestAllTypes::clear_optional_sfixed64() {
  1973. optional_sfixed64_ = GOOGLE_LONGLONG(0);
  1974. clear_has_optional_sfixed64();
  1975. }
  1976. inline ::google::protobuf::int64 TestAllTypes::optional_sfixed64() const {
  1977. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_sfixed64)
  1978. return optional_sfixed64_;
  1979. }
  1980. inline void TestAllTypes::set_optional_sfixed64(::google::protobuf::int64 value) {
  1981. set_has_optional_sfixed64();
  1982. optional_sfixed64_ = value;
  1983. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_sfixed64)
  1984. }
  1985. // optional float optional_float = 11;
  1986. inline bool TestAllTypes::has_optional_float() const {
  1987. return (_has_bits_[0] & 0x01000000u) != 0;
  1988. }
  1989. inline void TestAllTypes::set_has_optional_float() {
  1990. _has_bits_[0] |= 0x01000000u;
  1991. }
  1992. inline void TestAllTypes::clear_has_optional_float() {
  1993. _has_bits_[0] &= ~0x01000000u;
  1994. }
  1995. inline void TestAllTypes::clear_optional_float() {
  1996. optional_float_ = 0;
  1997. clear_has_optional_float();
  1998. }
  1999. inline float TestAllTypes::optional_float() const {
  2000. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_float)
  2001. return optional_float_;
  2002. }
  2003. inline void TestAllTypes::set_optional_float(float value) {
  2004. set_has_optional_float();
  2005. optional_float_ = value;
  2006. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_float)
  2007. }
  2008. // optional double optional_double = 12;
  2009. inline bool TestAllTypes::has_optional_double() const {
  2010. return (_has_bits_[0] & 0x02000000u) != 0;
  2011. }
  2012. inline void TestAllTypes::set_has_optional_double() {
  2013. _has_bits_[0] |= 0x02000000u;
  2014. }
  2015. inline void TestAllTypes::clear_has_optional_double() {
  2016. _has_bits_[0] &= ~0x02000000u;
  2017. }
  2018. inline void TestAllTypes::clear_optional_double() {
  2019. optional_double_ = 0;
  2020. clear_has_optional_double();
  2021. }
  2022. inline double TestAllTypes::optional_double() const {
  2023. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_double)
  2024. return optional_double_;
  2025. }
  2026. inline void TestAllTypes::set_optional_double(double value) {
  2027. set_has_optional_double();
  2028. optional_double_ = value;
  2029. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_double)
  2030. }
  2031. // optional bool optional_bool = 13;
  2032. inline bool TestAllTypes::has_optional_bool() const {
  2033. return (_has_bits_[0] & 0x04000000u) != 0;
  2034. }
  2035. inline void TestAllTypes::set_has_optional_bool() {
  2036. _has_bits_[0] |= 0x04000000u;
  2037. }
  2038. inline void TestAllTypes::clear_has_optional_bool() {
  2039. _has_bits_[0] &= ~0x04000000u;
  2040. }
  2041. inline void TestAllTypes::clear_optional_bool() {
  2042. optional_bool_ = false;
  2043. clear_has_optional_bool();
  2044. }
  2045. inline bool TestAllTypes::optional_bool() const {
  2046. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_bool)
  2047. return optional_bool_;
  2048. }
  2049. inline void TestAllTypes::set_optional_bool(bool value) {
  2050. set_has_optional_bool();
  2051. optional_bool_ = value;
  2052. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_bool)
  2053. }
  2054. // optional string optional_string = 14;
  2055. inline bool TestAllTypes::has_optional_string() const {
  2056. return (_has_bits_[0] & 0x00000001u) != 0;
  2057. }
  2058. inline void TestAllTypes::set_has_optional_string() {
  2059. _has_bits_[0] |= 0x00000001u;
  2060. }
  2061. inline void TestAllTypes::clear_has_optional_string() {
  2062. _has_bits_[0] &= ~0x00000001u;
  2063. }
  2064. inline void TestAllTypes::clear_optional_string() {
  2065. optional_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2066. clear_has_optional_string();
  2067. }
  2068. inline const ::std::string& TestAllTypes::optional_string() const {
  2069. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_string)
  2070. return optional_string_.GetNoArena();
  2071. }
  2072. inline void TestAllTypes::set_optional_string(const ::std::string& value) {
  2073. set_has_optional_string();
  2074. optional_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  2075. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_string)
  2076. }
  2077. #if LANG_CXX11
  2078. inline void TestAllTypes::set_optional_string(::std::string&& value) {
  2079. set_has_optional_string();
  2080. optional_string_.SetNoArena(
  2081. &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  2082. // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest_no_arena.TestAllTypes.optional_string)
  2083. }
  2084. #endif
  2085. inline void TestAllTypes::set_optional_string(const char* value) {
  2086. GOOGLE_DCHECK(value != NULL);
  2087. set_has_optional_string();
  2088. optional_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  2089. // @@protoc_insertion_point(field_set_char:protobuf_unittest_no_arena.TestAllTypes.optional_string)
  2090. }
  2091. inline void TestAllTypes::set_optional_string(const char* value, size_t size) {
  2092. set_has_optional_string();
  2093. optional_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  2094. ::std::string(reinterpret_cast<const char*>(value), size));
  2095. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest_no_arena.TestAllTypes.optional_string)
  2096. }
  2097. inline ::std::string* TestAllTypes::mutable_optional_string() {
  2098. set_has_optional_string();
  2099. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.optional_string)
  2100. return optional_string_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2101. }
  2102. inline ::std::string* TestAllTypes::release_optional_string() {
  2103. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.optional_string)
  2104. if (!has_optional_string()) {
  2105. return NULL;
  2106. }
  2107. clear_has_optional_string();
  2108. return optional_string_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2109. }
  2110. inline void TestAllTypes::set_allocated_optional_string(::std::string* optional_string) {
  2111. if (optional_string != NULL) {
  2112. set_has_optional_string();
  2113. } else {
  2114. clear_has_optional_string();
  2115. }
  2116. optional_string_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), optional_string);
  2117. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.optional_string)
  2118. }
  2119. // optional bytes optional_bytes = 15;
  2120. inline bool TestAllTypes::has_optional_bytes() const {
  2121. return (_has_bits_[0] & 0x00000002u) != 0;
  2122. }
  2123. inline void TestAllTypes::set_has_optional_bytes() {
  2124. _has_bits_[0] |= 0x00000002u;
  2125. }
  2126. inline void TestAllTypes::clear_has_optional_bytes() {
  2127. _has_bits_[0] &= ~0x00000002u;
  2128. }
  2129. inline void TestAllTypes::clear_optional_bytes() {
  2130. optional_bytes_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2131. clear_has_optional_bytes();
  2132. }
  2133. inline const ::std::string& TestAllTypes::optional_bytes() const {
  2134. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_bytes)
  2135. return optional_bytes_.GetNoArena();
  2136. }
  2137. inline void TestAllTypes::set_optional_bytes(const ::std::string& value) {
  2138. set_has_optional_bytes();
  2139. optional_bytes_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  2140. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_bytes)
  2141. }
  2142. #if LANG_CXX11
  2143. inline void TestAllTypes::set_optional_bytes(::std::string&& value) {
  2144. set_has_optional_bytes();
  2145. optional_bytes_.SetNoArena(
  2146. &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  2147. // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest_no_arena.TestAllTypes.optional_bytes)
  2148. }
  2149. #endif
  2150. inline void TestAllTypes::set_optional_bytes(const char* value) {
  2151. GOOGLE_DCHECK(value != NULL);
  2152. set_has_optional_bytes();
  2153. optional_bytes_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  2154. // @@protoc_insertion_point(field_set_char:protobuf_unittest_no_arena.TestAllTypes.optional_bytes)
  2155. }
  2156. inline void TestAllTypes::set_optional_bytes(const void* value, size_t size) {
  2157. set_has_optional_bytes();
  2158. optional_bytes_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  2159. ::std::string(reinterpret_cast<const char*>(value), size));
  2160. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest_no_arena.TestAllTypes.optional_bytes)
  2161. }
  2162. inline ::std::string* TestAllTypes::mutable_optional_bytes() {
  2163. set_has_optional_bytes();
  2164. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.optional_bytes)
  2165. return optional_bytes_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2166. }
  2167. inline ::std::string* TestAllTypes::release_optional_bytes() {
  2168. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.optional_bytes)
  2169. if (!has_optional_bytes()) {
  2170. return NULL;
  2171. }
  2172. clear_has_optional_bytes();
  2173. return optional_bytes_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2174. }
  2175. inline void TestAllTypes::set_allocated_optional_bytes(::std::string* optional_bytes) {
  2176. if (optional_bytes != NULL) {
  2177. set_has_optional_bytes();
  2178. } else {
  2179. clear_has_optional_bytes();
  2180. }
  2181. optional_bytes_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), optional_bytes);
  2182. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.optional_bytes)
  2183. }
  2184. // optional group OptionalGroup = 16 { ... };
  2185. inline bool TestAllTypes::has_optionalgroup() const {
  2186. return (_has_bits_[0] & 0x00000100u) != 0;
  2187. }
  2188. inline void TestAllTypes::set_has_optionalgroup() {
  2189. _has_bits_[0] |= 0x00000100u;
  2190. }
  2191. inline void TestAllTypes::clear_has_optionalgroup() {
  2192. _has_bits_[0] &= ~0x00000100u;
  2193. }
  2194. inline void TestAllTypes::clear_optionalgroup() {
  2195. if (optionalgroup_ != NULL) optionalgroup_->Clear();
  2196. clear_has_optionalgroup();
  2197. }
  2198. inline const ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup& TestAllTypes::_internal_optionalgroup() const {
  2199. return *optionalgroup_;
  2200. }
  2201. inline const ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup& TestAllTypes::optionalgroup() const {
  2202. const ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup* p = optionalgroup_;
  2203. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optionalgroup)
  2204. return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup*>(
  2205. &::protobuf_unittest_no_arena::_TestAllTypes_OptionalGroup_default_instance_);
  2206. }
  2207. inline ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup* TestAllTypes::release_optionalgroup() {
  2208. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.optionalgroup)
  2209. clear_has_optionalgroup();
  2210. ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup* temp = optionalgroup_;
  2211. optionalgroup_ = NULL;
  2212. return temp;
  2213. }
  2214. inline ::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup* TestAllTypes::mutable_optionalgroup() {
  2215. set_has_optionalgroup();
  2216. if (optionalgroup_ == NULL) {
  2217. auto* p = CreateMaybeMessage<::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup>(GetArenaNoVirtual());
  2218. optionalgroup_ = p;
  2219. }
  2220. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.optionalgroup)
  2221. return optionalgroup_;
  2222. }
  2223. inline void TestAllTypes::set_allocated_optionalgroup(::protobuf_unittest_no_arena::TestAllTypes_OptionalGroup* optionalgroup) {
  2224. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  2225. if (message_arena == NULL) {
  2226. delete optionalgroup_;
  2227. }
  2228. if (optionalgroup) {
  2229. ::google::protobuf::Arena* submessage_arena = NULL;
  2230. if (message_arena != submessage_arena) {
  2231. optionalgroup = ::google::protobuf::internal::GetOwnedMessage(
  2232. message_arena, optionalgroup, submessage_arena);
  2233. }
  2234. set_has_optionalgroup();
  2235. } else {
  2236. clear_has_optionalgroup();
  2237. }
  2238. optionalgroup_ = optionalgroup;
  2239. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.optionalgroup)
  2240. }
  2241. // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage optional_nested_message = 18;
  2242. inline bool TestAllTypes::has_optional_nested_message() const {
  2243. return (_has_bits_[0] & 0x00000200u) != 0;
  2244. }
  2245. inline void TestAllTypes::set_has_optional_nested_message() {
  2246. _has_bits_[0] |= 0x00000200u;
  2247. }
  2248. inline void TestAllTypes::clear_has_optional_nested_message() {
  2249. _has_bits_[0] &= ~0x00000200u;
  2250. }
  2251. inline void TestAllTypes::clear_optional_nested_message() {
  2252. if (optional_nested_message_ != NULL) optional_nested_message_->Clear();
  2253. clear_has_optional_nested_message();
  2254. }
  2255. inline const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& TestAllTypes::_internal_optional_nested_message() const {
  2256. return *optional_nested_message_;
  2257. }
  2258. inline const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& TestAllTypes::optional_nested_message() const {
  2259. const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* p = optional_nested_message_;
  2260. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_nested_message)
  2261. return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage*>(
  2262. &::protobuf_unittest_no_arena::_TestAllTypes_NestedMessage_default_instance_);
  2263. }
  2264. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* TestAllTypes::release_optional_nested_message() {
  2265. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.optional_nested_message)
  2266. clear_has_optional_nested_message();
  2267. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* temp = optional_nested_message_;
  2268. optional_nested_message_ = NULL;
  2269. return temp;
  2270. }
  2271. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* TestAllTypes::mutable_optional_nested_message() {
  2272. set_has_optional_nested_message();
  2273. if (optional_nested_message_ == NULL) {
  2274. auto* p = CreateMaybeMessage<::protobuf_unittest_no_arena::TestAllTypes_NestedMessage>(GetArenaNoVirtual());
  2275. optional_nested_message_ = p;
  2276. }
  2277. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.optional_nested_message)
  2278. return optional_nested_message_;
  2279. }
  2280. inline void TestAllTypes::set_allocated_optional_nested_message(::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* optional_nested_message) {
  2281. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  2282. if (message_arena == NULL) {
  2283. delete optional_nested_message_;
  2284. }
  2285. if (optional_nested_message) {
  2286. ::google::protobuf::Arena* submessage_arena = NULL;
  2287. if (message_arena != submessage_arena) {
  2288. optional_nested_message = ::google::protobuf::internal::GetOwnedMessage(
  2289. message_arena, optional_nested_message, submessage_arena);
  2290. }
  2291. set_has_optional_nested_message();
  2292. } else {
  2293. clear_has_optional_nested_message();
  2294. }
  2295. optional_nested_message_ = optional_nested_message;
  2296. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.optional_nested_message)
  2297. }
  2298. // optional .protobuf_unittest_no_arena.ForeignMessage optional_foreign_message = 19;
  2299. inline bool TestAllTypes::has_optional_foreign_message() const {
  2300. return (_has_bits_[0] & 0x00000400u) != 0;
  2301. }
  2302. inline void TestAllTypes::set_has_optional_foreign_message() {
  2303. _has_bits_[0] |= 0x00000400u;
  2304. }
  2305. inline void TestAllTypes::clear_has_optional_foreign_message() {
  2306. _has_bits_[0] &= ~0x00000400u;
  2307. }
  2308. inline void TestAllTypes::clear_optional_foreign_message() {
  2309. if (optional_foreign_message_ != NULL) optional_foreign_message_->Clear();
  2310. clear_has_optional_foreign_message();
  2311. }
  2312. inline const ::protobuf_unittest_no_arena::ForeignMessage& TestAllTypes::_internal_optional_foreign_message() const {
  2313. return *optional_foreign_message_;
  2314. }
  2315. inline const ::protobuf_unittest_no_arena::ForeignMessage& TestAllTypes::optional_foreign_message() const {
  2316. const ::protobuf_unittest_no_arena::ForeignMessage* p = optional_foreign_message_;
  2317. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_foreign_message)
  2318. return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest_no_arena::ForeignMessage*>(
  2319. &::protobuf_unittest_no_arena::_ForeignMessage_default_instance_);
  2320. }
  2321. inline ::protobuf_unittest_no_arena::ForeignMessage* TestAllTypes::release_optional_foreign_message() {
  2322. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.optional_foreign_message)
  2323. clear_has_optional_foreign_message();
  2324. ::protobuf_unittest_no_arena::ForeignMessage* temp = optional_foreign_message_;
  2325. optional_foreign_message_ = NULL;
  2326. return temp;
  2327. }
  2328. inline ::protobuf_unittest_no_arena::ForeignMessage* TestAllTypes::mutable_optional_foreign_message() {
  2329. set_has_optional_foreign_message();
  2330. if (optional_foreign_message_ == NULL) {
  2331. auto* p = CreateMaybeMessage<::protobuf_unittest_no_arena::ForeignMessage>(GetArenaNoVirtual());
  2332. optional_foreign_message_ = p;
  2333. }
  2334. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.optional_foreign_message)
  2335. return optional_foreign_message_;
  2336. }
  2337. inline void TestAllTypes::set_allocated_optional_foreign_message(::protobuf_unittest_no_arena::ForeignMessage* optional_foreign_message) {
  2338. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  2339. if (message_arena == NULL) {
  2340. delete optional_foreign_message_;
  2341. }
  2342. if (optional_foreign_message) {
  2343. ::google::protobuf::Arena* submessage_arena = NULL;
  2344. if (message_arena != submessage_arena) {
  2345. optional_foreign_message = ::google::protobuf::internal::GetOwnedMessage(
  2346. message_arena, optional_foreign_message, submessage_arena);
  2347. }
  2348. set_has_optional_foreign_message();
  2349. } else {
  2350. clear_has_optional_foreign_message();
  2351. }
  2352. optional_foreign_message_ = optional_foreign_message;
  2353. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.optional_foreign_message)
  2354. }
  2355. // optional .protobuf_unittest_import.ImportMessage optional_import_message = 20;
  2356. inline bool TestAllTypes::has_optional_import_message() const {
  2357. return (_has_bits_[0] & 0x00000800u) != 0;
  2358. }
  2359. inline void TestAllTypes::set_has_optional_import_message() {
  2360. _has_bits_[0] |= 0x00000800u;
  2361. }
  2362. inline void TestAllTypes::clear_has_optional_import_message() {
  2363. _has_bits_[0] &= ~0x00000800u;
  2364. }
  2365. inline const ::protobuf_unittest_import::ImportMessage& TestAllTypes::_internal_optional_import_message() const {
  2366. return *optional_import_message_;
  2367. }
  2368. inline const ::protobuf_unittest_import::ImportMessage& TestAllTypes::optional_import_message() const {
  2369. const ::protobuf_unittest_import::ImportMessage* p = optional_import_message_;
  2370. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_import_message)
  2371. return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest_import::ImportMessage*>(
  2372. &::protobuf_unittest_import::_ImportMessage_default_instance_);
  2373. }
  2374. inline ::protobuf_unittest_import::ImportMessage* TestAllTypes::release_optional_import_message() {
  2375. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.optional_import_message)
  2376. clear_has_optional_import_message();
  2377. ::protobuf_unittest_import::ImportMessage* temp = optional_import_message_;
  2378. optional_import_message_ = NULL;
  2379. return temp;
  2380. }
  2381. inline ::protobuf_unittest_import::ImportMessage* TestAllTypes::mutable_optional_import_message() {
  2382. set_has_optional_import_message();
  2383. if (optional_import_message_ == NULL) {
  2384. auto* p = CreateMaybeMessage<::protobuf_unittest_import::ImportMessage>(GetArenaNoVirtual());
  2385. optional_import_message_ = p;
  2386. }
  2387. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.optional_import_message)
  2388. return optional_import_message_;
  2389. }
  2390. inline void TestAllTypes::set_allocated_optional_import_message(::protobuf_unittest_import::ImportMessage* optional_import_message) {
  2391. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  2392. if (message_arena == NULL) {
  2393. delete reinterpret_cast< ::google::protobuf::MessageLite*>(optional_import_message_);
  2394. }
  2395. if (optional_import_message) {
  2396. ::google::protobuf::Arena* submessage_arena =
  2397. reinterpret_cast<::google::protobuf::MessageLite*>(optional_import_message)->GetArena();
  2398. if (message_arena != submessage_arena) {
  2399. optional_import_message = ::google::protobuf::internal::GetOwnedMessage(
  2400. message_arena, optional_import_message, submessage_arena);
  2401. }
  2402. set_has_optional_import_message();
  2403. } else {
  2404. clear_has_optional_import_message();
  2405. }
  2406. optional_import_message_ = optional_import_message;
  2407. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.optional_import_message)
  2408. }
  2409. // optional .protobuf_unittest_no_arena.TestAllTypes.NestedEnum optional_nested_enum = 21;
  2410. inline bool TestAllTypes::has_optional_nested_enum() const {
  2411. return (_has_bits_[0] & 0x10000000u) != 0;
  2412. }
  2413. inline void TestAllTypes::set_has_optional_nested_enum() {
  2414. _has_bits_[0] |= 0x10000000u;
  2415. }
  2416. inline void TestAllTypes::clear_has_optional_nested_enum() {
  2417. _has_bits_[0] &= ~0x10000000u;
  2418. }
  2419. inline void TestAllTypes::clear_optional_nested_enum() {
  2420. optional_nested_enum_ = 1;
  2421. clear_has_optional_nested_enum();
  2422. }
  2423. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum TestAllTypes::optional_nested_enum() const {
  2424. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_nested_enum)
  2425. return static_cast< ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum >(optional_nested_enum_);
  2426. }
  2427. inline void TestAllTypes::set_optional_nested_enum(::protobuf_unittest_no_arena::TestAllTypes_NestedEnum value) {
  2428. assert(::protobuf_unittest_no_arena::TestAllTypes_NestedEnum_IsValid(value));
  2429. set_has_optional_nested_enum();
  2430. optional_nested_enum_ = value;
  2431. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_nested_enum)
  2432. }
  2433. // optional .protobuf_unittest_no_arena.ForeignEnum optional_foreign_enum = 22;
  2434. inline bool TestAllTypes::has_optional_foreign_enum() const {
  2435. return (_has_bits_[0] & 0x20000000u) != 0;
  2436. }
  2437. inline void TestAllTypes::set_has_optional_foreign_enum() {
  2438. _has_bits_[0] |= 0x20000000u;
  2439. }
  2440. inline void TestAllTypes::clear_has_optional_foreign_enum() {
  2441. _has_bits_[0] &= ~0x20000000u;
  2442. }
  2443. inline void TestAllTypes::clear_optional_foreign_enum() {
  2444. optional_foreign_enum_ = 4;
  2445. clear_has_optional_foreign_enum();
  2446. }
  2447. inline ::protobuf_unittest_no_arena::ForeignEnum TestAllTypes::optional_foreign_enum() const {
  2448. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_foreign_enum)
  2449. return static_cast< ::protobuf_unittest_no_arena::ForeignEnum >(optional_foreign_enum_);
  2450. }
  2451. inline void TestAllTypes::set_optional_foreign_enum(::protobuf_unittest_no_arena::ForeignEnum value) {
  2452. assert(::protobuf_unittest_no_arena::ForeignEnum_IsValid(value));
  2453. set_has_optional_foreign_enum();
  2454. optional_foreign_enum_ = value;
  2455. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_foreign_enum)
  2456. }
  2457. // optional .protobuf_unittest_import.ImportEnum optional_import_enum = 23;
  2458. inline bool TestAllTypes::has_optional_import_enum() const {
  2459. return (_has_bits_[0] & 0x40000000u) != 0;
  2460. }
  2461. inline void TestAllTypes::set_has_optional_import_enum() {
  2462. _has_bits_[0] |= 0x40000000u;
  2463. }
  2464. inline void TestAllTypes::clear_has_optional_import_enum() {
  2465. _has_bits_[0] &= ~0x40000000u;
  2466. }
  2467. inline void TestAllTypes::clear_optional_import_enum() {
  2468. optional_import_enum_ = 7;
  2469. clear_has_optional_import_enum();
  2470. }
  2471. inline ::protobuf_unittest_import::ImportEnum TestAllTypes::optional_import_enum() const {
  2472. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_import_enum)
  2473. return static_cast< ::protobuf_unittest_import::ImportEnum >(optional_import_enum_);
  2474. }
  2475. inline void TestAllTypes::set_optional_import_enum(::protobuf_unittest_import::ImportEnum value) {
  2476. assert(::protobuf_unittest_import::ImportEnum_IsValid(value));
  2477. set_has_optional_import_enum();
  2478. optional_import_enum_ = value;
  2479. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_import_enum)
  2480. }
  2481. // optional string optional_string_piece = 24 [ctype = STRING_PIECE];
  2482. inline bool TestAllTypes::has_optional_string_piece() const {
  2483. return (_has_bits_[0] & 0x00000004u) != 0;
  2484. }
  2485. inline void TestAllTypes::set_has_optional_string_piece() {
  2486. _has_bits_[0] |= 0x00000004u;
  2487. }
  2488. inline void TestAllTypes::clear_has_optional_string_piece() {
  2489. _has_bits_[0] &= ~0x00000004u;
  2490. }
  2491. inline void TestAllTypes::clear_optional_string_piece() {
  2492. optional_string_piece_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2493. clear_has_optional_string_piece();
  2494. }
  2495. inline const ::std::string& TestAllTypes::optional_string_piece() const {
  2496. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_string_piece)
  2497. return optional_string_piece_.GetNoArena();
  2498. }
  2499. inline void TestAllTypes::set_optional_string_piece(const ::std::string& value) {
  2500. set_has_optional_string_piece();
  2501. optional_string_piece_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  2502. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_string_piece)
  2503. }
  2504. #if LANG_CXX11
  2505. inline void TestAllTypes::set_optional_string_piece(::std::string&& value) {
  2506. set_has_optional_string_piece();
  2507. optional_string_piece_.SetNoArena(
  2508. &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  2509. // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest_no_arena.TestAllTypes.optional_string_piece)
  2510. }
  2511. #endif
  2512. inline void TestAllTypes::set_optional_string_piece(const char* value) {
  2513. GOOGLE_DCHECK(value != NULL);
  2514. set_has_optional_string_piece();
  2515. optional_string_piece_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  2516. // @@protoc_insertion_point(field_set_char:protobuf_unittest_no_arena.TestAllTypes.optional_string_piece)
  2517. }
  2518. inline void TestAllTypes::set_optional_string_piece(const char* value, size_t size) {
  2519. set_has_optional_string_piece();
  2520. optional_string_piece_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  2521. ::std::string(reinterpret_cast<const char*>(value), size));
  2522. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest_no_arena.TestAllTypes.optional_string_piece)
  2523. }
  2524. inline ::std::string* TestAllTypes::mutable_optional_string_piece() {
  2525. set_has_optional_string_piece();
  2526. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.optional_string_piece)
  2527. return optional_string_piece_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2528. }
  2529. inline ::std::string* TestAllTypes::release_optional_string_piece() {
  2530. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.optional_string_piece)
  2531. if (!has_optional_string_piece()) {
  2532. return NULL;
  2533. }
  2534. clear_has_optional_string_piece();
  2535. return optional_string_piece_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2536. }
  2537. inline void TestAllTypes::set_allocated_optional_string_piece(::std::string* optional_string_piece) {
  2538. if (optional_string_piece != NULL) {
  2539. set_has_optional_string_piece();
  2540. } else {
  2541. clear_has_optional_string_piece();
  2542. }
  2543. optional_string_piece_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), optional_string_piece);
  2544. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.optional_string_piece)
  2545. }
  2546. // optional string optional_cord = 25 [ctype = CORD];
  2547. inline bool TestAllTypes::has_optional_cord() const {
  2548. return (_has_bits_[0] & 0x00000008u) != 0;
  2549. }
  2550. inline void TestAllTypes::set_has_optional_cord() {
  2551. _has_bits_[0] |= 0x00000008u;
  2552. }
  2553. inline void TestAllTypes::clear_has_optional_cord() {
  2554. _has_bits_[0] &= ~0x00000008u;
  2555. }
  2556. inline void TestAllTypes::clear_optional_cord() {
  2557. optional_cord_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2558. clear_has_optional_cord();
  2559. }
  2560. inline const ::std::string& TestAllTypes::optional_cord() const {
  2561. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_cord)
  2562. return optional_cord_.GetNoArena();
  2563. }
  2564. inline void TestAllTypes::set_optional_cord(const ::std::string& value) {
  2565. set_has_optional_cord();
  2566. optional_cord_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  2567. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.optional_cord)
  2568. }
  2569. #if LANG_CXX11
  2570. inline void TestAllTypes::set_optional_cord(::std::string&& value) {
  2571. set_has_optional_cord();
  2572. optional_cord_.SetNoArena(
  2573. &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  2574. // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest_no_arena.TestAllTypes.optional_cord)
  2575. }
  2576. #endif
  2577. inline void TestAllTypes::set_optional_cord(const char* value) {
  2578. GOOGLE_DCHECK(value != NULL);
  2579. set_has_optional_cord();
  2580. optional_cord_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  2581. // @@protoc_insertion_point(field_set_char:protobuf_unittest_no_arena.TestAllTypes.optional_cord)
  2582. }
  2583. inline void TestAllTypes::set_optional_cord(const char* value, size_t size) {
  2584. set_has_optional_cord();
  2585. optional_cord_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  2586. ::std::string(reinterpret_cast<const char*>(value), size));
  2587. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest_no_arena.TestAllTypes.optional_cord)
  2588. }
  2589. inline ::std::string* TestAllTypes::mutable_optional_cord() {
  2590. set_has_optional_cord();
  2591. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.optional_cord)
  2592. return optional_cord_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2593. }
  2594. inline ::std::string* TestAllTypes::release_optional_cord() {
  2595. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.optional_cord)
  2596. if (!has_optional_cord()) {
  2597. return NULL;
  2598. }
  2599. clear_has_optional_cord();
  2600. return optional_cord_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2601. }
  2602. inline void TestAllTypes::set_allocated_optional_cord(::std::string* optional_cord) {
  2603. if (optional_cord != NULL) {
  2604. set_has_optional_cord();
  2605. } else {
  2606. clear_has_optional_cord();
  2607. }
  2608. optional_cord_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), optional_cord);
  2609. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.optional_cord)
  2610. }
  2611. // optional .protobuf_unittest_import.PublicImportMessage optional_public_import_message = 26;
  2612. inline bool TestAllTypes::has_optional_public_import_message() const {
  2613. return (_has_bits_[0] & 0x00001000u) != 0;
  2614. }
  2615. inline void TestAllTypes::set_has_optional_public_import_message() {
  2616. _has_bits_[0] |= 0x00001000u;
  2617. }
  2618. inline void TestAllTypes::clear_has_optional_public_import_message() {
  2619. _has_bits_[0] &= ~0x00001000u;
  2620. }
  2621. inline const ::protobuf_unittest_import::PublicImportMessage& TestAllTypes::_internal_optional_public_import_message() const {
  2622. return *optional_public_import_message_;
  2623. }
  2624. inline const ::protobuf_unittest_import::PublicImportMessage& TestAllTypes::optional_public_import_message() const {
  2625. const ::protobuf_unittest_import::PublicImportMessage* p = optional_public_import_message_;
  2626. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_public_import_message)
  2627. return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest_import::PublicImportMessage*>(
  2628. &::protobuf_unittest_import::_PublicImportMessage_default_instance_);
  2629. }
  2630. inline ::protobuf_unittest_import::PublicImportMessage* TestAllTypes::release_optional_public_import_message() {
  2631. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.optional_public_import_message)
  2632. clear_has_optional_public_import_message();
  2633. ::protobuf_unittest_import::PublicImportMessage* temp = optional_public_import_message_;
  2634. optional_public_import_message_ = NULL;
  2635. return temp;
  2636. }
  2637. inline ::protobuf_unittest_import::PublicImportMessage* TestAllTypes::mutable_optional_public_import_message() {
  2638. set_has_optional_public_import_message();
  2639. if (optional_public_import_message_ == NULL) {
  2640. auto* p = CreateMaybeMessage<::protobuf_unittest_import::PublicImportMessage>(GetArenaNoVirtual());
  2641. optional_public_import_message_ = p;
  2642. }
  2643. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.optional_public_import_message)
  2644. return optional_public_import_message_;
  2645. }
  2646. inline void TestAllTypes::set_allocated_optional_public_import_message(::protobuf_unittest_import::PublicImportMessage* optional_public_import_message) {
  2647. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  2648. if (message_arena == NULL) {
  2649. delete reinterpret_cast< ::google::protobuf::MessageLite*>(optional_public_import_message_);
  2650. }
  2651. if (optional_public_import_message) {
  2652. ::google::protobuf::Arena* submessage_arena = NULL;
  2653. if (message_arena != submessage_arena) {
  2654. optional_public_import_message = ::google::protobuf::internal::GetOwnedMessage(
  2655. message_arena, optional_public_import_message, submessage_arena);
  2656. }
  2657. set_has_optional_public_import_message();
  2658. } else {
  2659. clear_has_optional_public_import_message();
  2660. }
  2661. optional_public_import_message_ = optional_public_import_message;
  2662. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.optional_public_import_message)
  2663. }
  2664. // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage optional_message = 27 [lazy = true];
  2665. inline bool TestAllTypes::has_optional_message() const {
  2666. return (_has_bits_[0] & 0x00002000u) != 0;
  2667. }
  2668. inline void TestAllTypes::set_has_optional_message() {
  2669. _has_bits_[0] |= 0x00002000u;
  2670. }
  2671. inline void TestAllTypes::clear_has_optional_message() {
  2672. _has_bits_[0] &= ~0x00002000u;
  2673. }
  2674. inline void TestAllTypes::clear_optional_message() {
  2675. if (optional_message_ != NULL) optional_message_->Clear();
  2676. clear_has_optional_message();
  2677. }
  2678. inline const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& TestAllTypes::_internal_optional_message() const {
  2679. return *optional_message_;
  2680. }
  2681. inline const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& TestAllTypes::optional_message() const {
  2682. const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* p = optional_message_;
  2683. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.optional_message)
  2684. return p != NULL ? *p : *reinterpret_cast<const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage*>(
  2685. &::protobuf_unittest_no_arena::_TestAllTypes_NestedMessage_default_instance_);
  2686. }
  2687. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* TestAllTypes::release_optional_message() {
  2688. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.optional_message)
  2689. clear_has_optional_message();
  2690. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* temp = optional_message_;
  2691. optional_message_ = NULL;
  2692. return temp;
  2693. }
  2694. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* TestAllTypes::mutable_optional_message() {
  2695. set_has_optional_message();
  2696. if (optional_message_ == NULL) {
  2697. auto* p = CreateMaybeMessage<::protobuf_unittest_no_arena::TestAllTypes_NestedMessage>(GetArenaNoVirtual());
  2698. optional_message_ = p;
  2699. }
  2700. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.optional_message)
  2701. return optional_message_;
  2702. }
  2703. inline void TestAllTypes::set_allocated_optional_message(::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* optional_message) {
  2704. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  2705. if (message_arena == NULL) {
  2706. delete optional_message_;
  2707. }
  2708. if (optional_message) {
  2709. ::google::protobuf::Arena* submessage_arena = NULL;
  2710. if (message_arena != submessage_arena) {
  2711. optional_message = ::google::protobuf::internal::GetOwnedMessage(
  2712. message_arena, optional_message, submessage_arena);
  2713. }
  2714. set_has_optional_message();
  2715. } else {
  2716. clear_has_optional_message();
  2717. }
  2718. optional_message_ = optional_message;
  2719. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.optional_message)
  2720. }
  2721. // repeated int32 repeated_int32 = 31;
  2722. inline int TestAllTypes::repeated_int32_size() const {
  2723. return repeated_int32_.size();
  2724. }
  2725. inline void TestAllTypes::clear_repeated_int32() {
  2726. repeated_int32_.Clear();
  2727. }
  2728. inline ::google::protobuf::int32 TestAllTypes::repeated_int32(int index) const {
  2729. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_int32)
  2730. return repeated_int32_.Get(index);
  2731. }
  2732. inline void TestAllTypes::set_repeated_int32(int index, ::google::protobuf::int32 value) {
  2733. repeated_int32_.Set(index, value);
  2734. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_int32)
  2735. }
  2736. inline void TestAllTypes::add_repeated_int32(::google::protobuf::int32 value) {
  2737. repeated_int32_.Add(value);
  2738. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_int32)
  2739. }
  2740. inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
  2741. TestAllTypes::repeated_int32() const {
  2742. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_int32)
  2743. return repeated_int32_;
  2744. }
  2745. inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
  2746. TestAllTypes::mutable_repeated_int32() {
  2747. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_int32)
  2748. return &repeated_int32_;
  2749. }
  2750. // repeated int64 repeated_int64 = 32;
  2751. inline int TestAllTypes::repeated_int64_size() const {
  2752. return repeated_int64_.size();
  2753. }
  2754. inline void TestAllTypes::clear_repeated_int64() {
  2755. repeated_int64_.Clear();
  2756. }
  2757. inline ::google::protobuf::int64 TestAllTypes::repeated_int64(int index) const {
  2758. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_int64)
  2759. return repeated_int64_.Get(index);
  2760. }
  2761. inline void TestAllTypes::set_repeated_int64(int index, ::google::protobuf::int64 value) {
  2762. repeated_int64_.Set(index, value);
  2763. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_int64)
  2764. }
  2765. inline void TestAllTypes::add_repeated_int64(::google::protobuf::int64 value) {
  2766. repeated_int64_.Add(value);
  2767. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_int64)
  2768. }
  2769. inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >&
  2770. TestAllTypes::repeated_int64() const {
  2771. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_int64)
  2772. return repeated_int64_;
  2773. }
  2774. inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >*
  2775. TestAllTypes::mutable_repeated_int64() {
  2776. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_int64)
  2777. return &repeated_int64_;
  2778. }
  2779. // repeated uint32 repeated_uint32 = 33;
  2780. inline int TestAllTypes::repeated_uint32_size() const {
  2781. return repeated_uint32_.size();
  2782. }
  2783. inline void TestAllTypes::clear_repeated_uint32() {
  2784. repeated_uint32_.Clear();
  2785. }
  2786. inline ::google::protobuf::uint32 TestAllTypes::repeated_uint32(int index) const {
  2787. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_uint32)
  2788. return repeated_uint32_.Get(index);
  2789. }
  2790. inline void TestAllTypes::set_repeated_uint32(int index, ::google::protobuf::uint32 value) {
  2791. repeated_uint32_.Set(index, value);
  2792. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_uint32)
  2793. }
  2794. inline void TestAllTypes::add_repeated_uint32(::google::protobuf::uint32 value) {
  2795. repeated_uint32_.Add(value);
  2796. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_uint32)
  2797. }
  2798. inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
  2799. TestAllTypes::repeated_uint32() const {
  2800. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_uint32)
  2801. return repeated_uint32_;
  2802. }
  2803. inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
  2804. TestAllTypes::mutable_repeated_uint32() {
  2805. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_uint32)
  2806. return &repeated_uint32_;
  2807. }
  2808. // repeated uint64 repeated_uint64 = 34;
  2809. inline int TestAllTypes::repeated_uint64_size() const {
  2810. return repeated_uint64_.size();
  2811. }
  2812. inline void TestAllTypes::clear_repeated_uint64() {
  2813. repeated_uint64_.Clear();
  2814. }
  2815. inline ::google::protobuf::uint64 TestAllTypes::repeated_uint64(int index) const {
  2816. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_uint64)
  2817. return repeated_uint64_.Get(index);
  2818. }
  2819. inline void TestAllTypes::set_repeated_uint64(int index, ::google::protobuf::uint64 value) {
  2820. repeated_uint64_.Set(index, value);
  2821. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_uint64)
  2822. }
  2823. inline void TestAllTypes::add_repeated_uint64(::google::protobuf::uint64 value) {
  2824. repeated_uint64_.Add(value);
  2825. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_uint64)
  2826. }
  2827. inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >&
  2828. TestAllTypes::repeated_uint64() const {
  2829. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_uint64)
  2830. return repeated_uint64_;
  2831. }
  2832. inline ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >*
  2833. TestAllTypes::mutable_repeated_uint64() {
  2834. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_uint64)
  2835. return &repeated_uint64_;
  2836. }
  2837. // repeated sint32 repeated_sint32 = 35;
  2838. inline int TestAllTypes::repeated_sint32_size() const {
  2839. return repeated_sint32_.size();
  2840. }
  2841. inline void TestAllTypes::clear_repeated_sint32() {
  2842. repeated_sint32_.Clear();
  2843. }
  2844. inline ::google::protobuf::int32 TestAllTypes::repeated_sint32(int index) const {
  2845. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_sint32)
  2846. return repeated_sint32_.Get(index);
  2847. }
  2848. inline void TestAllTypes::set_repeated_sint32(int index, ::google::protobuf::int32 value) {
  2849. repeated_sint32_.Set(index, value);
  2850. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_sint32)
  2851. }
  2852. inline void TestAllTypes::add_repeated_sint32(::google::protobuf::int32 value) {
  2853. repeated_sint32_.Add(value);
  2854. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_sint32)
  2855. }
  2856. inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
  2857. TestAllTypes::repeated_sint32() const {
  2858. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_sint32)
  2859. return repeated_sint32_;
  2860. }
  2861. inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
  2862. TestAllTypes::mutable_repeated_sint32() {
  2863. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_sint32)
  2864. return &repeated_sint32_;
  2865. }
  2866. // repeated sint64 repeated_sint64 = 36;
  2867. inline int TestAllTypes::repeated_sint64_size() const {
  2868. return repeated_sint64_.size();
  2869. }
  2870. inline void TestAllTypes::clear_repeated_sint64() {
  2871. repeated_sint64_.Clear();
  2872. }
  2873. inline ::google::protobuf::int64 TestAllTypes::repeated_sint64(int index) const {
  2874. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_sint64)
  2875. return repeated_sint64_.Get(index);
  2876. }
  2877. inline void TestAllTypes::set_repeated_sint64(int index, ::google::protobuf::int64 value) {
  2878. repeated_sint64_.Set(index, value);
  2879. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_sint64)
  2880. }
  2881. inline void TestAllTypes::add_repeated_sint64(::google::protobuf::int64 value) {
  2882. repeated_sint64_.Add(value);
  2883. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_sint64)
  2884. }
  2885. inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >&
  2886. TestAllTypes::repeated_sint64() const {
  2887. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_sint64)
  2888. return repeated_sint64_;
  2889. }
  2890. inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >*
  2891. TestAllTypes::mutable_repeated_sint64() {
  2892. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_sint64)
  2893. return &repeated_sint64_;
  2894. }
  2895. // repeated fixed32 repeated_fixed32 = 37;
  2896. inline int TestAllTypes::repeated_fixed32_size() const {
  2897. return repeated_fixed32_.size();
  2898. }
  2899. inline void TestAllTypes::clear_repeated_fixed32() {
  2900. repeated_fixed32_.Clear();
  2901. }
  2902. inline ::google::protobuf::uint32 TestAllTypes::repeated_fixed32(int index) const {
  2903. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_fixed32)
  2904. return repeated_fixed32_.Get(index);
  2905. }
  2906. inline void TestAllTypes::set_repeated_fixed32(int index, ::google::protobuf::uint32 value) {
  2907. repeated_fixed32_.Set(index, value);
  2908. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_fixed32)
  2909. }
  2910. inline void TestAllTypes::add_repeated_fixed32(::google::protobuf::uint32 value) {
  2911. repeated_fixed32_.Add(value);
  2912. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_fixed32)
  2913. }
  2914. inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
  2915. TestAllTypes::repeated_fixed32() const {
  2916. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_fixed32)
  2917. return repeated_fixed32_;
  2918. }
  2919. inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
  2920. TestAllTypes::mutable_repeated_fixed32() {
  2921. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_fixed32)
  2922. return &repeated_fixed32_;
  2923. }
  2924. // repeated fixed64 repeated_fixed64 = 38;
  2925. inline int TestAllTypes::repeated_fixed64_size() const {
  2926. return repeated_fixed64_.size();
  2927. }
  2928. inline void TestAllTypes::clear_repeated_fixed64() {
  2929. repeated_fixed64_.Clear();
  2930. }
  2931. inline ::google::protobuf::uint64 TestAllTypes::repeated_fixed64(int index) const {
  2932. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_fixed64)
  2933. return repeated_fixed64_.Get(index);
  2934. }
  2935. inline void TestAllTypes::set_repeated_fixed64(int index, ::google::protobuf::uint64 value) {
  2936. repeated_fixed64_.Set(index, value);
  2937. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_fixed64)
  2938. }
  2939. inline void TestAllTypes::add_repeated_fixed64(::google::protobuf::uint64 value) {
  2940. repeated_fixed64_.Add(value);
  2941. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_fixed64)
  2942. }
  2943. inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >&
  2944. TestAllTypes::repeated_fixed64() const {
  2945. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_fixed64)
  2946. return repeated_fixed64_;
  2947. }
  2948. inline ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >*
  2949. TestAllTypes::mutable_repeated_fixed64() {
  2950. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_fixed64)
  2951. return &repeated_fixed64_;
  2952. }
  2953. // repeated sfixed32 repeated_sfixed32 = 39;
  2954. inline int TestAllTypes::repeated_sfixed32_size() const {
  2955. return repeated_sfixed32_.size();
  2956. }
  2957. inline void TestAllTypes::clear_repeated_sfixed32() {
  2958. repeated_sfixed32_.Clear();
  2959. }
  2960. inline ::google::protobuf::int32 TestAllTypes::repeated_sfixed32(int index) const {
  2961. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_sfixed32)
  2962. return repeated_sfixed32_.Get(index);
  2963. }
  2964. inline void TestAllTypes::set_repeated_sfixed32(int index, ::google::protobuf::int32 value) {
  2965. repeated_sfixed32_.Set(index, value);
  2966. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_sfixed32)
  2967. }
  2968. inline void TestAllTypes::add_repeated_sfixed32(::google::protobuf::int32 value) {
  2969. repeated_sfixed32_.Add(value);
  2970. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_sfixed32)
  2971. }
  2972. inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
  2973. TestAllTypes::repeated_sfixed32() const {
  2974. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_sfixed32)
  2975. return repeated_sfixed32_;
  2976. }
  2977. inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
  2978. TestAllTypes::mutable_repeated_sfixed32() {
  2979. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_sfixed32)
  2980. return &repeated_sfixed32_;
  2981. }
  2982. // repeated sfixed64 repeated_sfixed64 = 40;
  2983. inline int TestAllTypes::repeated_sfixed64_size() const {
  2984. return repeated_sfixed64_.size();
  2985. }
  2986. inline void TestAllTypes::clear_repeated_sfixed64() {
  2987. repeated_sfixed64_.Clear();
  2988. }
  2989. inline ::google::protobuf::int64 TestAllTypes::repeated_sfixed64(int index) const {
  2990. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_sfixed64)
  2991. return repeated_sfixed64_.Get(index);
  2992. }
  2993. inline void TestAllTypes::set_repeated_sfixed64(int index, ::google::protobuf::int64 value) {
  2994. repeated_sfixed64_.Set(index, value);
  2995. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_sfixed64)
  2996. }
  2997. inline void TestAllTypes::add_repeated_sfixed64(::google::protobuf::int64 value) {
  2998. repeated_sfixed64_.Add(value);
  2999. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_sfixed64)
  3000. }
  3001. inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >&
  3002. TestAllTypes::repeated_sfixed64() const {
  3003. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_sfixed64)
  3004. return repeated_sfixed64_;
  3005. }
  3006. inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >*
  3007. TestAllTypes::mutable_repeated_sfixed64() {
  3008. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_sfixed64)
  3009. return &repeated_sfixed64_;
  3010. }
  3011. // repeated float repeated_float = 41;
  3012. inline int TestAllTypes::repeated_float_size() const {
  3013. return repeated_float_.size();
  3014. }
  3015. inline void TestAllTypes::clear_repeated_float() {
  3016. repeated_float_.Clear();
  3017. }
  3018. inline float TestAllTypes::repeated_float(int index) const {
  3019. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_float)
  3020. return repeated_float_.Get(index);
  3021. }
  3022. inline void TestAllTypes::set_repeated_float(int index, float value) {
  3023. repeated_float_.Set(index, value);
  3024. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_float)
  3025. }
  3026. inline void TestAllTypes::add_repeated_float(float value) {
  3027. repeated_float_.Add(value);
  3028. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_float)
  3029. }
  3030. inline const ::google::protobuf::RepeatedField< float >&
  3031. TestAllTypes::repeated_float() const {
  3032. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_float)
  3033. return repeated_float_;
  3034. }
  3035. inline ::google::protobuf::RepeatedField< float >*
  3036. TestAllTypes::mutable_repeated_float() {
  3037. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_float)
  3038. return &repeated_float_;
  3039. }
  3040. // repeated double repeated_double = 42;
  3041. inline int TestAllTypes::repeated_double_size() const {
  3042. return repeated_double_.size();
  3043. }
  3044. inline void TestAllTypes::clear_repeated_double() {
  3045. repeated_double_.Clear();
  3046. }
  3047. inline double TestAllTypes::repeated_double(int index) const {
  3048. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_double)
  3049. return repeated_double_.Get(index);
  3050. }
  3051. inline void TestAllTypes::set_repeated_double(int index, double value) {
  3052. repeated_double_.Set(index, value);
  3053. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_double)
  3054. }
  3055. inline void TestAllTypes::add_repeated_double(double value) {
  3056. repeated_double_.Add(value);
  3057. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_double)
  3058. }
  3059. inline const ::google::protobuf::RepeatedField< double >&
  3060. TestAllTypes::repeated_double() const {
  3061. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_double)
  3062. return repeated_double_;
  3063. }
  3064. inline ::google::protobuf::RepeatedField< double >*
  3065. TestAllTypes::mutable_repeated_double() {
  3066. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_double)
  3067. return &repeated_double_;
  3068. }
  3069. // repeated bool repeated_bool = 43;
  3070. inline int TestAllTypes::repeated_bool_size() const {
  3071. return repeated_bool_.size();
  3072. }
  3073. inline void TestAllTypes::clear_repeated_bool() {
  3074. repeated_bool_.Clear();
  3075. }
  3076. inline bool TestAllTypes::repeated_bool(int index) const {
  3077. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_bool)
  3078. return repeated_bool_.Get(index);
  3079. }
  3080. inline void TestAllTypes::set_repeated_bool(int index, bool value) {
  3081. repeated_bool_.Set(index, value);
  3082. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_bool)
  3083. }
  3084. inline void TestAllTypes::add_repeated_bool(bool value) {
  3085. repeated_bool_.Add(value);
  3086. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_bool)
  3087. }
  3088. inline const ::google::protobuf::RepeatedField< bool >&
  3089. TestAllTypes::repeated_bool() const {
  3090. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_bool)
  3091. return repeated_bool_;
  3092. }
  3093. inline ::google::protobuf::RepeatedField< bool >*
  3094. TestAllTypes::mutable_repeated_bool() {
  3095. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_bool)
  3096. return &repeated_bool_;
  3097. }
  3098. // repeated string repeated_string = 44;
  3099. inline int TestAllTypes::repeated_string_size() const {
  3100. return repeated_string_.size();
  3101. }
  3102. inline void TestAllTypes::clear_repeated_string() {
  3103. repeated_string_.Clear();
  3104. }
  3105. inline const ::std::string& TestAllTypes::repeated_string(int index) const {
  3106. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_string)
  3107. return repeated_string_.Get(index);
  3108. }
  3109. inline ::std::string* TestAllTypes::mutable_repeated_string(int index) {
  3110. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.repeated_string)
  3111. return repeated_string_.Mutable(index);
  3112. }
  3113. inline void TestAllTypes::set_repeated_string(int index, const ::std::string& value) {
  3114. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_string)
  3115. repeated_string_.Mutable(index)->assign(value);
  3116. }
  3117. #if LANG_CXX11
  3118. inline void TestAllTypes::set_repeated_string(int index, ::std::string&& value) {
  3119. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_string)
  3120. repeated_string_.Mutable(index)->assign(std::move(value));
  3121. }
  3122. #endif
  3123. inline void TestAllTypes::set_repeated_string(int index, const char* value) {
  3124. GOOGLE_DCHECK(value != NULL);
  3125. repeated_string_.Mutable(index)->assign(value);
  3126. // @@protoc_insertion_point(field_set_char:protobuf_unittest_no_arena.TestAllTypes.repeated_string)
  3127. }
  3128. inline void TestAllTypes::set_repeated_string(int index, const char* value, size_t size) {
  3129. repeated_string_.Mutable(index)->assign(
  3130. reinterpret_cast<const char*>(value), size);
  3131. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest_no_arena.TestAllTypes.repeated_string)
  3132. }
  3133. inline ::std::string* TestAllTypes::add_repeated_string() {
  3134. // @@protoc_insertion_point(field_add_mutable:protobuf_unittest_no_arena.TestAllTypes.repeated_string)
  3135. return repeated_string_.Add();
  3136. }
  3137. inline void TestAllTypes::add_repeated_string(const ::std::string& value) {
  3138. repeated_string_.Add()->assign(value);
  3139. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_string)
  3140. }
  3141. #if LANG_CXX11
  3142. inline void TestAllTypes::add_repeated_string(::std::string&& value) {
  3143. repeated_string_.Add(std::move(value));
  3144. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_string)
  3145. }
  3146. #endif
  3147. inline void TestAllTypes::add_repeated_string(const char* value) {
  3148. GOOGLE_DCHECK(value != NULL);
  3149. repeated_string_.Add()->assign(value);
  3150. // @@protoc_insertion_point(field_add_char:protobuf_unittest_no_arena.TestAllTypes.repeated_string)
  3151. }
  3152. inline void TestAllTypes::add_repeated_string(const char* value, size_t size) {
  3153. repeated_string_.Add()->assign(reinterpret_cast<const char*>(value), size);
  3154. // @@protoc_insertion_point(field_add_pointer:protobuf_unittest_no_arena.TestAllTypes.repeated_string)
  3155. }
  3156. inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
  3157. TestAllTypes::repeated_string() const {
  3158. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_string)
  3159. return repeated_string_;
  3160. }
  3161. inline ::google::protobuf::RepeatedPtrField< ::std::string>*
  3162. TestAllTypes::mutable_repeated_string() {
  3163. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_string)
  3164. return &repeated_string_;
  3165. }
  3166. // repeated bytes repeated_bytes = 45;
  3167. inline int TestAllTypes::repeated_bytes_size() const {
  3168. return repeated_bytes_.size();
  3169. }
  3170. inline void TestAllTypes::clear_repeated_bytes() {
  3171. repeated_bytes_.Clear();
  3172. }
  3173. inline const ::std::string& TestAllTypes::repeated_bytes(int index) const {
  3174. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_bytes)
  3175. return repeated_bytes_.Get(index);
  3176. }
  3177. inline ::std::string* TestAllTypes::mutable_repeated_bytes(int index) {
  3178. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.repeated_bytes)
  3179. return repeated_bytes_.Mutable(index);
  3180. }
  3181. inline void TestAllTypes::set_repeated_bytes(int index, const ::std::string& value) {
  3182. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_bytes)
  3183. repeated_bytes_.Mutable(index)->assign(value);
  3184. }
  3185. #if LANG_CXX11
  3186. inline void TestAllTypes::set_repeated_bytes(int index, ::std::string&& value) {
  3187. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_bytes)
  3188. repeated_bytes_.Mutable(index)->assign(std::move(value));
  3189. }
  3190. #endif
  3191. inline void TestAllTypes::set_repeated_bytes(int index, const char* value) {
  3192. GOOGLE_DCHECK(value != NULL);
  3193. repeated_bytes_.Mutable(index)->assign(value);
  3194. // @@protoc_insertion_point(field_set_char:protobuf_unittest_no_arena.TestAllTypes.repeated_bytes)
  3195. }
  3196. inline void TestAllTypes::set_repeated_bytes(int index, const void* value, size_t size) {
  3197. repeated_bytes_.Mutable(index)->assign(
  3198. reinterpret_cast<const char*>(value), size);
  3199. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest_no_arena.TestAllTypes.repeated_bytes)
  3200. }
  3201. inline ::std::string* TestAllTypes::add_repeated_bytes() {
  3202. // @@protoc_insertion_point(field_add_mutable:protobuf_unittest_no_arena.TestAllTypes.repeated_bytes)
  3203. return repeated_bytes_.Add();
  3204. }
  3205. inline void TestAllTypes::add_repeated_bytes(const ::std::string& value) {
  3206. repeated_bytes_.Add()->assign(value);
  3207. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_bytes)
  3208. }
  3209. #if LANG_CXX11
  3210. inline void TestAllTypes::add_repeated_bytes(::std::string&& value) {
  3211. repeated_bytes_.Add(std::move(value));
  3212. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_bytes)
  3213. }
  3214. #endif
  3215. inline void TestAllTypes::add_repeated_bytes(const char* value) {
  3216. GOOGLE_DCHECK(value != NULL);
  3217. repeated_bytes_.Add()->assign(value);
  3218. // @@protoc_insertion_point(field_add_char:protobuf_unittest_no_arena.TestAllTypes.repeated_bytes)
  3219. }
  3220. inline void TestAllTypes::add_repeated_bytes(const void* value, size_t size) {
  3221. repeated_bytes_.Add()->assign(reinterpret_cast<const char*>(value), size);
  3222. // @@protoc_insertion_point(field_add_pointer:protobuf_unittest_no_arena.TestAllTypes.repeated_bytes)
  3223. }
  3224. inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
  3225. TestAllTypes::repeated_bytes() const {
  3226. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_bytes)
  3227. return repeated_bytes_;
  3228. }
  3229. inline ::google::protobuf::RepeatedPtrField< ::std::string>*
  3230. TestAllTypes::mutable_repeated_bytes() {
  3231. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_bytes)
  3232. return &repeated_bytes_;
  3233. }
  3234. // repeated group RepeatedGroup = 46 { ... };
  3235. inline int TestAllTypes::repeatedgroup_size() const {
  3236. return repeatedgroup_.size();
  3237. }
  3238. inline void TestAllTypes::clear_repeatedgroup() {
  3239. repeatedgroup_.Clear();
  3240. }
  3241. inline ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup* TestAllTypes::mutable_repeatedgroup(int index) {
  3242. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.repeatedgroup)
  3243. return repeatedgroup_.Mutable(index);
  3244. }
  3245. inline ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup >*
  3246. TestAllTypes::mutable_repeatedgroup() {
  3247. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeatedgroup)
  3248. return &repeatedgroup_;
  3249. }
  3250. inline const ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup& TestAllTypes::repeatedgroup(int index) const {
  3251. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeatedgroup)
  3252. return repeatedgroup_.Get(index);
  3253. }
  3254. inline ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup* TestAllTypes::add_repeatedgroup() {
  3255. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeatedgroup)
  3256. return repeatedgroup_.Add();
  3257. }
  3258. inline const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_RepeatedGroup >&
  3259. TestAllTypes::repeatedgroup() const {
  3260. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeatedgroup)
  3261. return repeatedgroup_;
  3262. }
  3263. // repeated .protobuf_unittest_no_arena.TestAllTypes.NestedMessage repeated_nested_message = 48;
  3264. inline int TestAllTypes::repeated_nested_message_size() const {
  3265. return repeated_nested_message_.size();
  3266. }
  3267. inline void TestAllTypes::clear_repeated_nested_message() {
  3268. repeated_nested_message_.Clear();
  3269. }
  3270. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* TestAllTypes::mutable_repeated_nested_message(int index) {
  3271. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.repeated_nested_message)
  3272. return repeated_nested_message_.Mutable(index);
  3273. }
  3274. inline ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage >*
  3275. TestAllTypes::mutable_repeated_nested_message() {
  3276. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_nested_message)
  3277. return &repeated_nested_message_;
  3278. }
  3279. inline const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& TestAllTypes::repeated_nested_message(int index) const {
  3280. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_nested_message)
  3281. return repeated_nested_message_.Get(index);
  3282. }
  3283. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* TestAllTypes::add_repeated_nested_message() {
  3284. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_nested_message)
  3285. return repeated_nested_message_.Add();
  3286. }
  3287. inline const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage >&
  3288. TestAllTypes::repeated_nested_message() const {
  3289. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_nested_message)
  3290. return repeated_nested_message_;
  3291. }
  3292. // repeated .protobuf_unittest_no_arena.ForeignMessage repeated_foreign_message = 49;
  3293. inline int TestAllTypes::repeated_foreign_message_size() const {
  3294. return repeated_foreign_message_.size();
  3295. }
  3296. inline void TestAllTypes::clear_repeated_foreign_message() {
  3297. repeated_foreign_message_.Clear();
  3298. }
  3299. inline ::protobuf_unittest_no_arena::ForeignMessage* TestAllTypes::mutable_repeated_foreign_message(int index) {
  3300. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.repeated_foreign_message)
  3301. return repeated_foreign_message_.Mutable(index);
  3302. }
  3303. inline ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::ForeignMessage >*
  3304. TestAllTypes::mutable_repeated_foreign_message() {
  3305. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_foreign_message)
  3306. return &repeated_foreign_message_;
  3307. }
  3308. inline const ::protobuf_unittest_no_arena::ForeignMessage& TestAllTypes::repeated_foreign_message(int index) const {
  3309. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_foreign_message)
  3310. return repeated_foreign_message_.Get(index);
  3311. }
  3312. inline ::protobuf_unittest_no_arena::ForeignMessage* TestAllTypes::add_repeated_foreign_message() {
  3313. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_foreign_message)
  3314. return repeated_foreign_message_.Add();
  3315. }
  3316. inline const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::ForeignMessage >&
  3317. TestAllTypes::repeated_foreign_message() const {
  3318. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_foreign_message)
  3319. return repeated_foreign_message_;
  3320. }
  3321. // repeated .protobuf_unittest_import.ImportMessage repeated_import_message = 50;
  3322. inline int TestAllTypes::repeated_import_message_size() const {
  3323. return repeated_import_message_.size();
  3324. }
  3325. inline ::protobuf_unittest_import::ImportMessage* TestAllTypes::mutable_repeated_import_message(int index) {
  3326. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.repeated_import_message)
  3327. return repeated_import_message_.Mutable(index);
  3328. }
  3329. inline ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_import::ImportMessage >*
  3330. TestAllTypes::mutable_repeated_import_message() {
  3331. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_import_message)
  3332. return &repeated_import_message_;
  3333. }
  3334. inline const ::protobuf_unittest_import::ImportMessage& TestAllTypes::repeated_import_message(int index) const {
  3335. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_import_message)
  3336. return repeated_import_message_.Get(index);
  3337. }
  3338. inline ::protobuf_unittest_import::ImportMessage* TestAllTypes::add_repeated_import_message() {
  3339. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_import_message)
  3340. return repeated_import_message_.Add();
  3341. }
  3342. inline const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_import::ImportMessage >&
  3343. TestAllTypes::repeated_import_message() const {
  3344. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_import_message)
  3345. return repeated_import_message_;
  3346. }
  3347. // repeated .protobuf_unittest_no_arena.TestAllTypes.NestedEnum repeated_nested_enum = 51;
  3348. inline int TestAllTypes::repeated_nested_enum_size() const {
  3349. return repeated_nested_enum_.size();
  3350. }
  3351. inline void TestAllTypes::clear_repeated_nested_enum() {
  3352. repeated_nested_enum_.Clear();
  3353. }
  3354. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum TestAllTypes::repeated_nested_enum(int index) const {
  3355. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_nested_enum)
  3356. return static_cast< ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum >(repeated_nested_enum_.Get(index));
  3357. }
  3358. inline void TestAllTypes::set_repeated_nested_enum(int index, ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum value) {
  3359. assert(::protobuf_unittest_no_arena::TestAllTypes_NestedEnum_IsValid(value));
  3360. repeated_nested_enum_.Set(index, value);
  3361. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_nested_enum)
  3362. }
  3363. inline void TestAllTypes::add_repeated_nested_enum(::protobuf_unittest_no_arena::TestAllTypes_NestedEnum value) {
  3364. assert(::protobuf_unittest_no_arena::TestAllTypes_NestedEnum_IsValid(value));
  3365. repeated_nested_enum_.Add(value);
  3366. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_nested_enum)
  3367. }
  3368. inline const ::google::protobuf::RepeatedField<int>&
  3369. TestAllTypes::repeated_nested_enum() const {
  3370. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_nested_enum)
  3371. return repeated_nested_enum_;
  3372. }
  3373. inline ::google::protobuf::RepeatedField<int>*
  3374. TestAllTypes::mutable_repeated_nested_enum() {
  3375. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_nested_enum)
  3376. return &repeated_nested_enum_;
  3377. }
  3378. // repeated .protobuf_unittest_no_arena.ForeignEnum repeated_foreign_enum = 52;
  3379. inline int TestAllTypes::repeated_foreign_enum_size() const {
  3380. return repeated_foreign_enum_.size();
  3381. }
  3382. inline void TestAllTypes::clear_repeated_foreign_enum() {
  3383. repeated_foreign_enum_.Clear();
  3384. }
  3385. inline ::protobuf_unittest_no_arena::ForeignEnum TestAllTypes::repeated_foreign_enum(int index) const {
  3386. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_foreign_enum)
  3387. return static_cast< ::protobuf_unittest_no_arena::ForeignEnum >(repeated_foreign_enum_.Get(index));
  3388. }
  3389. inline void TestAllTypes::set_repeated_foreign_enum(int index, ::protobuf_unittest_no_arena::ForeignEnum value) {
  3390. assert(::protobuf_unittest_no_arena::ForeignEnum_IsValid(value));
  3391. repeated_foreign_enum_.Set(index, value);
  3392. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_foreign_enum)
  3393. }
  3394. inline void TestAllTypes::add_repeated_foreign_enum(::protobuf_unittest_no_arena::ForeignEnum value) {
  3395. assert(::protobuf_unittest_no_arena::ForeignEnum_IsValid(value));
  3396. repeated_foreign_enum_.Add(value);
  3397. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_foreign_enum)
  3398. }
  3399. inline const ::google::protobuf::RepeatedField<int>&
  3400. TestAllTypes::repeated_foreign_enum() const {
  3401. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_foreign_enum)
  3402. return repeated_foreign_enum_;
  3403. }
  3404. inline ::google::protobuf::RepeatedField<int>*
  3405. TestAllTypes::mutable_repeated_foreign_enum() {
  3406. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_foreign_enum)
  3407. return &repeated_foreign_enum_;
  3408. }
  3409. // repeated .protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
  3410. inline int TestAllTypes::repeated_import_enum_size() const {
  3411. return repeated_import_enum_.size();
  3412. }
  3413. inline void TestAllTypes::clear_repeated_import_enum() {
  3414. repeated_import_enum_.Clear();
  3415. }
  3416. inline ::protobuf_unittest_import::ImportEnum TestAllTypes::repeated_import_enum(int index) const {
  3417. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_import_enum)
  3418. return static_cast< ::protobuf_unittest_import::ImportEnum >(repeated_import_enum_.Get(index));
  3419. }
  3420. inline void TestAllTypes::set_repeated_import_enum(int index, ::protobuf_unittest_import::ImportEnum value) {
  3421. assert(::protobuf_unittest_import::ImportEnum_IsValid(value));
  3422. repeated_import_enum_.Set(index, value);
  3423. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_import_enum)
  3424. }
  3425. inline void TestAllTypes::add_repeated_import_enum(::protobuf_unittest_import::ImportEnum value) {
  3426. assert(::protobuf_unittest_import::ImportEnum_IsValid(value));
  3427. repeated_import_enum_.Add(value);
  3428. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_import_enum)
  3429. }
  3430. inline const ::google::protobuf::RepeatedField<int>&
  3431. TestAllTypes::repeated_import_enum() const {
  3432. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_import_enum)
  3433. return repeated_import_enum_;
  3434. }
  3435. inline ::google::protobuf::RepeatedField<int>*
  3436. TestAllTypes::mutable_repeated_import_enum() {
  3437. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_import_enum)
  3438. return &repeated_import_enum_;
  3439. }
  3440. // repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
  3441. inline int TestAllTypes::repeated_string_piece_size() const {
  3442. return repeated_string_piece_.size();
  3443. }
  3444. inline void TestAllTypes::clear_repeated_string_piece() {
  3445. repeated_string_piece_.Clear();
  3446. }
  3447. inline const ::std::string& TestAllTypes::repeated_string_piece(int index) const {
  3448. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_string_piece)
  3449. return repeated_string_piece_.Get(index);
  3450. }
  3451. inline ::std::string* TestAllTypes::mutable_repeated_string_piece(int index) {
  3452. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.repeated_string_piece)
  3453. return repeated_string_piece_.Mutable(index);
  3454. }
  3455. inline void TestAllTypes::set_repeated_string_piece(int index, const ::std::string& value) {
  3456. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_string_piece)
  3457. repeated_string_piece_.Mutable(index)->assign(value);
  3458. }
  3459. #if LANG_CXX11
  3460. inline void TestAllTypes::set_repeated_string_piece(int index, ::std::string&& value) {
  3461. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_string_piece)
  3462. repeated_string_piece_.Mutable(index)->assign(std::move(value));
  3463. }
  3464. #endif
  3465. inline void TestAllTypes::set_repeated_string_piece(int index, const char* value) {
  3466. GOOGLE_DCHECK(value != NULL);
  3467. repeated_string_piece_.Mutable(index)->assign(value);
  3468. // @@protoc_insertion_point(field_set_char:protobuf_unittest_no_arena.TestAllTypes.repeated_string_piece)
  3469. }
  3470. inline void TestAllTypes::set_repeated_string_piece(int index, const char* value, size_t size) {
  3471. repeated_string_piece_.Mutable(index)->assign(
  3472. reinterpret_cast<const char*>(value), size);
  3473. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest_no_arena.TestAllTypes.repeated_string_piece)
  3474. }
  3475. inline ::std::string* TestAllTypes::add_repeated_string_piece() {
  3476. // @@protoc_insertion_point(field_add_mutable:protobuf_unittest_no_arena.TestAllTypes.repeated_string_piece)
  3477. return repeated_string_piece_.Add();
  3478. }
  3479. inline void TestAllTypes::add_repeated_string_piece(const ::std::string& value) {
  3480. repeated_string_piece_.Add()->assign(value);
  3481. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_string_piece)
  3482. }
  3483. #if LANG_CXX11
  3484. inline void TestAllTypes::add_repeated_string_piece(::std::string&& value) {
  3485. repeated_string_piece_.Add(std::move(value));
  3486. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_string_piece)
  3487. }
  3488. #endif
  3489. inline void TestAllTypes::add_repeated_string_piece(const char* value) {
  3490. GOOGLE_DCHECK(value != NULL);
  3491. repeated_string_piece_.Add()->assign(value);
  3492. // @@protoc_insertion_point(field_add_char:protobuf_unittest_no_arena.TestAllTypes.repeated_string_piece)
  3493. }
  3494. inline void TestAllTypes::add_repeated_string_piece(const char* value, size_t size) {
  3495. repeated_string_piece_.Add()->assign(reinterpret_cast<const char*>(value), size);
  3496. // @@protoc_insertion_point(field_add_pointer:protobuf_unittest_no_arena.TestAllTypes.repeated_string_piece)
  3497. }
  3498. inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
  3499. TestAllTypes::repeated_string_piece() const {
  3500. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_string_piece)
  3501. return repeated_string_piece_;
  3502. }
  3503. inline ::google::protobuf::RepeatedPtrField< ::std::string>*
  3504. TestAllTypes::mutable_repeated_string_piece() {
  3505. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_string_piece)
  3506. return &repeated_string_piece_;
  3507. }
  3508. // repeated string repeated_cord = 55 [ctype = CORD];
  3509. inline int TestAllTypes::repeated_cord_size() const {
  3510. return repeated_cord_.size();
  3511. }
  3512. inline void TestAllTypes::clear_repeated_cord() {
  3513. repeated_cord_.Clear();
  3514. }
  3515. inline const ::std::string& TestAllTypes::repeated_cord(int index) const {
  3516. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_cord)
  3517. return repeated_cord_.Get(index);
  3518. }
  3519. inline ::std::string* TestAllTypes::mutable_repeated_cord(int index) {
  3520. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.repeated_cord)
  3521. return repeated_cord_.Mutable(index);
  3522. }
  3523. inline void TestAllTypes::set_repeated_cord(int index, const ::std::string& value) {
  3524. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_cord)
  3525. repeated_cord_.Mutable(index)->assign(value);
  3526. }
  3527. #if LANG_CXX11
  3528. inline void TestAllTypes::set_repeated_cord(int index, ::std::string&& value) {
  3529. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.repeated_cord)
  3530. repeated_cord_.Mutable(index)->assign(std::move(value));
  3531. }
  3532. #endif
  3533. inline void TestAllTypes::set_repeated_cord(int index, const char* value) {
  3534. GOOGLE_DCHECK(value != NULL);
  3535. repeated_cord_.Mutable(index)->assign(value);
  3536. // @@protoc_insertion_point(field_set_char:protobuf_unittest_no_arena.TestAllTypes.repeated_cord)
  3537. }
  3538. inline void TestAllTypes::set_repeated_cord(int index, const char* value, size_t size) {
  3539. repeated_cord_.Mutable(index)->assign(
  3540. reinterpret_cast<const char*>(value), size);
  3541. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest_no_arena.TestAllTypes.repeated_cord)
  3542. }
  3543. inline ::std::string* TestAllTypes::add_repeated_cord() {
  3544. // @@protoc_insertion_point(field_add_mutable:protobuf_unittest_no_arena.TestAllTypes.repeated_cord)
  3545. return repeated_cord_.Add();
  3546. }
  3547. inline void TestAllTypes::add_repeated_cord(const ::std::string& value) {
  3548. repeated_cord_.Add()->assign(value);
  3549. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_cord)
  3550. }
  3551. #if LANG_CXX11
  3552. inline void TestAllTypes::add_repeated_cord(::std::string&& value) {
  3553. repeated_cord_.Add(std::move(value));
  3554. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_cord)
  3555. }
  3556. #endif
  3557. inline void TestAllTypes::add_repeated_cord(const char* value) {
  3558. GOOGLE_DCHECK(value != NULL);
  3559. repeated_cord_.Add()->assign(value);
  3560. // @@protoc_insertion_point(field_add_char:protobuf_unittest_no_arena.TestAllTypes.repeated_cord)
  3561. }
  3562. inline void TestAllTypes::add_repeated_cord(const char* value, size_t size) {
  3563. repeated_cord_.Add()->assign(reinterpret_cast<const char*>(value), size);
  3564. // @@protoc_insertion_point(field_add_pointer:protobuf_unittest_no_arena.TestAllTypes.repeated_cord)
  3565. }
  3566. inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
  3567. TestAllTypes::repeated_cord() const {
  3568. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_cord)
  3569. return repeated_cord_;
  3570. }
  3571. inline ::google::protobuf::RepeatedPtrField< ::std::string>*
  3572. TestAllTypes::mutable_repeated_cord() {
  3573. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_cord)
  3574. return &repeated_cord_;
  3575. }
  3576. // repeated .protobuf_unittest_no_arena.TestAllTypes.NestedMessage repeated_lazy_message = 57 [lazy = true];
  3577. inline int TestAllTypes::repeated_lazy_message_size() const {
  3578. return repeated_lazy_message_.size();
  3579. }
  3580. inline void TestAllTypes::clear_repeated_lazy_message() {
  3581. repeated_lazy_message_.Clear();
  3582. }
  3583. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* TestAllTypes::mutable_repeated_lazy_message(int index) {
  3584. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.repeated_lazy_message)
  3585. return repeated_lazy_message_.Mutable(index);
  3586. }
  3587. inline ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage >*
  3588. TestAllTypes::mutable_repeated_lazy_message() {
  3589. // @@protoc_insertion_point(field_mutable_list:protobuf_unittest_no_arena.TestAllTypes.repeated_lazy_message)
  3590. return &repeated_lazy_message_;
  3591. }
  3592. inline const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& TestAllTypes::repeated_lazy_message(int index) const {
  3593. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.repeated_lazy_message)
  3594. return repeated_lazy_message_.Get(index);
  3595. }
  3596. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* TestAllTypes::add_repeated_lazy_message() {
  3597. // @@protoc_insertion_point(field_add:protobuf_unittest_no_arena.TestAllTypes.repeated_lazy_message)
  3598. return repeated_lazy_message_.Add();
  3599. }
  3600. inline const ::google::protobuf::RepeatedPtrField< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage >&
  3601. TestAllTypes::repeated_lazy_message() const {
  3602. // @@protoc_insertion_point(field_list:protobuf_unittest_no_arena.TestAllTypes.repeated_lazy_message)
  3603. return repeated_lazy_message_;
  3604. }
  3605. // optional int32 default_int32 = 61 [default = 41];
  3606. inline bool TestAllTypes::has_default_int32() const {
  3607. return (_has_bits_[0] & 0x80000000u) != 0;
  3608. }
  3609. inline void TestAllTypes::set_has_default_int32() {
  3610. _has_bits_[0] |= 0x80000000u;
  3611. }
  3612. inline void TestAllTypes::clear_has_default_int32() {
  3613. _has_bits_[0] &= ~0x80000000u;
  3614. }
  3615. inline void TestAllTypes::clear_default_int32() {
  3616. default_int32_ = 41;
  3617. clear_has_default_int32();
  3618. }
  3619. inline ::google::protobuf::int32 TestAllTypes::default_int32() const {
  3620. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_int32)
  3621. return default_int32_;
  3622. }
  3623. inline void TestAllTypes::set_default_int32(::google::protobuf::int32 value) {
  3624. set_has_default_int32();
  3625. default_int32_ = value;
  3626. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_int32)
  3627. }
  3628. // optional int64 default_int64 = 62 [default = 42];
  3629. inline bool TestAllTypes::has_default_int64() const {
  3630. return (_has_bits_[1] & 0x00000001u) != 0;
  3631. }
  3632. inline void TestAllTypes::set_has_default_int64() {
  3633. _has_bits_[1] |= 0x00000001u;
  3634. }
  3635. inline void TestAllTypes::clear_has_default_int64() {
  3636. _has_bits_[1] &= ~0x00000001u;
  3637. }
  3638. inline void TestAllTypes::clear_default_int64() {
  3639. default_int64_ = GOOGLE_LONGLONG(42);
  3640. clear_has_default_int64();
  3641. }
  3642. inline ::google::protobuf::int64 TestAllTypes::default_int64() const {
  3643. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_int64)
  3644. return default_int64_;
  3645. }
  3646. inline void TestAllTypes::set_default_int64(::google::protobuf::int64 value) {
  3647. set_has_default_int64();
  3648. default_int64_ = value;
  3649. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_int64)
  3650. }
  3651. // optional uint32 default_uint32 = 63 [default = 43];
  3652. inline bool TestAllTypes::has_default_uint32() const {
  3653. return (_has_bits_[1] & 0x00000004u) != 0;
  3654. }
  3655. inline void TestAllTypes::set_has_default_uint32() {
  3656. _has_bits_[1] |= 0x00000004u;
  3657. }
  3658. inline void TestAllTypes::clear_has_default_uint32() {
  3659. _has_bits_[1] &= ~0x00000004u;
  3660. }
  3661. inline void TestAllTypes::clear_default_uint32() {
  3662. default_uint32_ = 43u;
  3663. clear_has_default_uint32();
  3664. }
  3665. inline ::google::protobuf::uint32 TestAllTypes::default_uint32() const {
  3666. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_uint32)
  3667. return default_uint32_;
  3668. }
  3669. inline void TestAllTypes::set_default_uint32(::google::protobuf::uint32 value) {
  3670. set_has_default_uint32();
  3671. default_uint32_ = value;
  3672. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_uint32)
  3673. }
  3674. // optional uint64 default_uint64 = 64 [default = 44];
  3675. inline bool TestAllTypes::has_default_uint64() const {
  3676. return (_has_bits_[1] & 0x00000002u) != 0;
  3677. }
  3678. inline void TestAllTypes::set_has_default_uint64() {
  3679. _has_bits_[1] |= 0x00000002u;
  3680. }
  3681. inline void TestAllTypes::clear_has_default_uint64() {
  3682. _has_bits_[1] &= ~0x00000002u;
  3683. }
  3684. inline void TestAllTypes::clear_default_uint64() {
  3685. default_uint64_ = GOOGLE_ULONGLONG(44);
  3686. clear_has_default_uint64();
  3687. }
  3688. inline ::google::protobuf::uint64 TestAllTypes::default_uint64() const {
  3689. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_uint64)
  3690. return default_uint64_;
  3691. }
  3692. inline void TestAllTypes::set_default_uint64(::google::protobuf::uint64 value) {
  3693. set_has_default_uint64();
  3694. default_uint64_ = value;
  3695. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_uint64)
  3696. }
  3697. // optional sint32 default_sint32 = 65 [default = -45];
  3698. inline bool TestAllTypes::has_default_sint32() const {
  3699. return (_has_bits_[1] & 0x00000008u) != 0;
  3700. }
  3701. inline void TestAllTypes::set_has_default_sint32() {
  3702. _has_bits_[1] |= 0x00000008u;
  3703. }
  3704. inline void TestAllTypes::clear_has_default_sint32() {
  3705. _has_bits_[1] &= ~0x00000008u;
  3706. }
  3707. inline void TestAllTypes::clear_default_sint32() {
  3708. default_sint32_ = -45;
  3709. clear_has_default_sint32();
  3710. }
  3711. inline ::google::protobuf::int32 TestAllTypes::default_sint32() const {
  3712. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_sint32)
  3713. return default_sint32_;
  3714. }
  3715. inline void TestAllTypes::set_default_sint32(::google::protobuf::int32 value) {
  3716. set_has_default_sint32();
  3717. default_sint32_ = value;
  3718. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_sint32)
  3719. }
  3720. // optional sint64 default_sint64 = 66 [default = 46];
  3721. inline bool TestAllTypes::has_default_sint64() const {
  3722. return (_has_bits_[1] & 0x00000010u) != 0;
  3723. }
  3724. inline void TestAllTypes::set_has_default_sint64() {
  3725. _has_bits_[1] |= 0x00000010u;
  3726. }
  3727. inline void TestAllTypes::clear_has_default_sint64() {
  3728. _has_bits_[1] &= ~0x00000010u;
  3729. }
  3730. inline void TestAllTypes::clear_default_sint64() {
  3731. default_sint64_ = GOOGLE_LONGLONG(46);
  3732. clear_has_default_sint64();
  3733. }
  3734. inline ::google::protobuf::int64 TestAllTypes::default_sint64() const {
  3735. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_sint64)
  3736. return default_sint64_;
  3737. }
  3738. inline void TestAllTypes::set_default_sint64(::google::protobuf::int64 value) {
  3739. set_has_default_sint64();
  3740. default_sint64_ = value;
  3741. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_sint64)
  3742. }
  3743. // optional fixed32 default_fixed32 = 67 [default = 47];
  3744. inline bool TestAllTypes::has_default_fixed32() const {
  3745. return (_has_bits_[1] & 0x00000040u) != 0;
  3746. }
  3747. inline void TestAllTypes::set_has_default_fixed32() {
  3748. _has_bits_[1] |= 0x00000040u;
  3749. }
  3750. inline void TestAllTypes::clear_has_default_fixed32() {
  3751. _has_bits_[1] &= ~0x00000040u;
  3752. }
  3753. inline void TestAllTypes::clear_default_fixed32() {
  3754. default_fixed32_ = 47u;
  3755. clear_has_default_fixed32();
  3756. }
  3757. inline ::google::protobuf::uint32 TestAllTypes::default_fixed32() const {
  3758. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_fixed32)
  3759. return default_fixed32_;
  3760. }
  3761. inline void TestAllTypes::set_default_fixed32(::google::protobuf::uint32 value) {
  3762. set_has_default_fixed32();
  3763. default_fixed32_ = value;
  3764. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_fixed32)
  3765. }
  3766. // optional fixed64 default_fixed64 = 68 [default = 48];
  3767. inline bool TestAllTypes::has_default_fixed64() const {
  3768. return (_has_bits_[1] & 0x00000020u) != 0;
  3769. }
  3770. inline void TestAllTypes::set_has_default_fixed64() {
  3771. _has_bits_[1] |= 0x00000020u;
  3772. }
  3773. inline void TestAllTypes::clear_has_default_fixed64() {
  3774. _has_bits_[1] &= ~0x00000020u;
  3775. }
  3776. inline void TestAllTypes::clear_default_fixed64() {
  3777. default_fixed64_ = GOOGLE_ULONGLONG(48);
  3778. clear_has_default_fixed64();
  3779. }
  3780. inline ::google::protobuf::uint64 TestAllTypes::default_fixed64() const {
  3781. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_fixed64)
  3782. return default_fixed64_;
  3783. }
  3784. inline void TestAllTypes::set_default_fixed64(::google::protobuf::uint64 value) {
  3785. set_has_default_fixed64();
  3786. default_fixed64_ = value;
  3787. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_fixed64)
  3788. }
  3789. // optional sfixed32 default_sfixed32 = 69 [default = 49];
  3790. inline bool TestAllTypes::has_default_sfixed32() const {
  3791. return (_has_bits_[1] & 0x00000080u) != 0;
  3792. }
  3793. inline void TestAllTypes::set_has_default_sfixed32() {
  3794. _has_bits_[1] |= 0x00000080u;
  3795. }
  3796. inline void TestAllTypes::clear_has_default_sfixed32() {
  3797. _has_bits_[1] &= ~0x00000080u;
  3798. }
  3799. inline void TestAllTypes::clear_default_sfixed32() {
  3800. default_sfixed32_ = 49;
  3801. clear_has_default_sfixed32();
  3802. }
  3803. inline ::google::protobuf::int32 TestAllTypes::default_sfixed32() const {
  3804. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_sfixed32)
  3805. return default_sfixed32_;
  3806. }
  3807. inline void TestAllTypes::set_default_sfixed32(::google::protobuf::int32 value) {
  3808. set_has_default_sfixed32();
  3809. default_sfixed32_ = value;
  3810. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_sfixed32)
  3811. }
  3812. // optional sfixed64 default_sfixed64 = 70 [default = -50];
  3813. inline bool TestAllTypes::has_default_sfixed64() const {
  3814. return (_has_bits_[1] & 0x00000100u) != 0;
  3815. }
  3816. inline void TestAllTypes::set_has_default_sfixed64() {
  3817. _has_bits_[1] |= 0x00000100u;
  3818. }
  3819. inline void TestAllTypes::clear_has_default_sfixed64() {
  3820. _has_bits_[1] &= ~0x00000100u;
  3821. }
  3822. inline void TestAllTypes::clear_default_sfixed64() {
  3823. default_sfixed64_ = GOOGLE_LONGLONG(-50);
  3824. clear_has_default_sfixed64();
  3825. }
  3826. inline ::google::protobuf::int64 TestAllTypes::default_sfixed64() const {
  3827. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_sfixed64)
  3828. return default_sfixed64_;
  3829. }
  3830. inline void TestAllTypes::set_default_sfixed64(::google::protobuf::int64 value) {
  3831. set_has_default_sfixed64();
  3832. default_sfixed64_ = value;
  3833. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_sfixed64)
  3834. }
  3835. // optional float default_float = 71 [default = 51.5];
  3836. inline bool TestAllTypes::has_default_float() const {
  3837. return (_has_bits_[1] & 0x00000400u) != 0;
  3838. }
  3839. inline void TestAllTypes::set_has_default_float() {
  3840. _has_bits_[1] |= 0x00000400u;
  3841. }
  3842. inline void TestAllTypes::clear_has_default_float() {
  3843. _has_bits_[1] &= ~0x00000400u;
  3844. }
  3845. inline void TestAllTypes::clear_default_float() {
  3846. default_float_ = 51.5f;
  3847. clear_has_default_float();
  3848. }
  3849. inline float TestAllTypes::default_float() const {
  3850. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_float)
  3851. return default_float_;
  3852. }
  3853. inline void TestAllTypes::set_default_float(float value) {
  3854. set_has_default_float();
  3855. default_float_ = value;
  3856. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_float)
  3857. }
  3858. // optional double default_double = 72 [default = 52000];
  3859. inline bool TestAllTypes::has_default_double() const {
  3860. return (_has_bits_[1] & 0x00000200u) != 0;
  3861. }
  3862. inline void TestAllTypes::set_has_default_double() {
  3863. _has_bits_[1] |= 0x00000200u;
  3864. }
  3865. inline void TestAllTypes::clear_has_default_double() {
  3866. _has_bits_[1] &= ~0x00000200u;
  3867. }
  3868. inline void TestAllTypes::clear_default_double() {
  3869. default_double_ = 52000;
  3870. clear_has_default_double();
  3871. }
  3872. inline double TestAllTypes::default_double() const {
  3873. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_double)
  3874. return default_double_;
  3875. }
  3876. inline void TestAllTypes::set_default_double(double value) {
  3877. set_has_default_double();
  3878. default_double_ = value;
  3879. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_double)
  3880. }
  3881. // optional bool default_bool = 73 [default = true];
  3882. inline bool TestAllTypes::has_default_bool() const {
  3883. return (_has_bits_[1] & 0x00000800u) != 0;
  3884. }
  3885. inline void TestAllTypes::set_has_default_bool() {
  3886. _has_bits_[1] |= 0x00000800u;
  3887. }
  3888. inline void TestAllTypes::clear_has_default_bool() {
  3889. _has_bits_[1] &= ~0x00000800u;
  3890. }
  3891. inline void TestAllTypes::clear_default_bool() {
  3892. default_bool_ = true;
  3893. clear_has_default_bool();
  3894. }
  3895. inline bool TestAllTypes::default_bool() const {
  3896. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_bool)
  3897. return default_bool_;
  3898. }
  3899. inline void TestAllTypes::set_default_bool(bool value) {
  3900. set_has_default_bool();
  3901. default_bool_ = value;
  3902. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_bool)
  3903. }
  3904. // optional string default_string = 74 [default = "hello"];
  3905. inline bool TestAllTypes::has_default_string() const {
  3906. return (_has_bits_[0] & 0x00000010u) != 0;
  3907. }
  3908. inline void TestAllTypes::set_has_default_string() {
  3909. _has_bits_[0] |= 0x00000010u;
  3910. }
  3911. inline void TestAllTypes::clear_has_default_string() {
  3912. _has_bits_[0] &= ~0x00000010u;
  3913. }
  3914. inline void TestAllTypes::clear_default_string() {
  3915. default_string_.ClearToDefaultNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get());
  3916. clear_has_default_string();
  3917. }
  3918. inline const ::std::string& TestAllTypes::default_string() const {
  3919. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_string)
  3920. return default_string_.GetNoArena();
  3921. }
  3922. inline void TestAllTypes::set_default_string(const ::std::string& value) {
  3923. set_has_default_string();
  3924. default_string_.SetNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get(), value);
  3925. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_string)
  3926. }
  3927. #if LANG_CXX11
  3928. inline void TestAllTypes::set_default_string(::std::string&& value) {
  3929. set_has_default_string();
  3930. default_string_.SetNoArena(
  3931. &::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get(), ::std::move(value));
  3932. // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest_no_arena.TestAllTypes.default_string)
  3933. }
  3934. #endif
  3935. inline void TestAllTypes::set_default_string(const char* value) {
  3936. GOOGLE_DCHECK(value != NULL);
  3937. set_has_default_string();
  3938. default_string_.SetNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get(), ::std::string(value));
  3939. // @@protoc_insertion_point(field_set_char:protobuf_unittest_no_arena.TestAllTypes.default_string)
  3940. }
  3941. inline void TestAllTypes::set_default_string(const char* value, size_t size) {
  3942. set_has_default_string();
  3943. default_string_.SetNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get(),
  3944. ::std::string(reinterpret_cast<const char*>(value), size));
  3945. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest_no_arena.TestAllTypes.default_string)
  3946. }
  3947. inline ::std::string* TestAllTypes::mutable_default_string() {
  3948. set_has_default_string();
  3949. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.default_string)
  3950. return default_string_.MutableNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get());
  3951. }
  3952. inline ::std::string* TestAllTypes::release_default_string() {
  3953. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.default_string)
  3954. if (!has_default_string()) {
  3955. return NULL;
  3956. }
  3957. clear_has_default_string();
  3958. return default_string_.ReleaseNonDefaultNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get());
  3959. }
  3960. inline void TestAllTypes::set_allocated_default_string(::std::string* default_string) {
  3961. if (default_string != NULL) {
  3962. set_has_default_string();
  3963. } else {
  3964. clear_has_default_string();
  3965. }
  3966. default_string_.SetAllocatedNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_.get(), default_string);
  3967. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.default_string)
  3968. }
  3969. // optional bytes default_bytes = 75 [default = "world"];
  3970. inline bool TestAllTypes::has_default_bytes() const {
  3971. return (_has_bits_[0] & 0x00000020u) != 0;
  3972. }
  3973. inline void TestAllTypes::set_has_default_bytes() {
  3974. _has_bits_[0] |= 0x00000020u;
  3975. }
  3976. inline void TestAllTypes::clear_has_default_bytes() {
  3977. _has_bits_[0] &= ~0x00000020u;
  3978. }
  3979. inline void TestAllTypes::clear_default_bytes() {
  3980. default_bytes_.ClearToDefaultNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get());
  3981. clear_has_default_bytes();
  3982. }
  3983. inline const ::std::string& TestAllTypes::default_bytes() const {
  3984. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_bytes)
  3985. return default_bytes_.GetNoArena();
  3986. }
  3987. inline void TestAllTypes::set_default_bytes(const ::std::string& value) {
  3988. set_has_default_bytes();
  3989. default_bytes_.SetNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get(), value);
  3990. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_bytes)
  3991. }
  3992. #if LANG_CXX11
  3993. inline void TestAllTypes::set_default_bytes(::std::string&& value) {
  3994. set_has_default_bytes();
  3995. default_bytes_.SetNoArena(
  3996. &::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get(), ::std::move(value));
  3997. // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest_no_arena.TestAllTypes.default_bytes)
  3998. }
  3999. #endif
  4000. inline void TestAllTypes::set_default_bytes(const char* value) {
  4001. GOOGLE_DCHECK(value != NULL);
  4002. set_has_default_bytes();
  4003. default_bytes_.SetNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get(), ::std::string(value));
  4004. // @@protoc_insertion_point(field_set_char:protobuf_unittest_no_arena.TestAllTypes.default_bytes)
  4005. }
  4006. inline void TestAllTypes::set_default_bytes(const void* value, size_t size) {
  4007. set_has_default_bytes();
  4008. default_bytes_.SetNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get(),
  4009. ::std::string(reinterpret_cast<const char*>(value), size));
  4010. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest_no_arena.TestAllTypes.default_bytes)
  4011. }
  4012. inline ::std::string* TestAllTypes::mutable_default_bytes() {
  4013. set_has_default_bytes();
  4014. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.default_bytes)
  4015. return default_bytes_.MutableNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get());
  4016. }
  4017. inline ::std::string* TestAllTypes::release_default_bytes() {
  4018. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.default_bytes)
  4019. if (!has_default_bytes()) {
  4020. return NULL;
  4021. }
  4022. clear_has_default_bytes();
  4023. return default_bytes_.ReleaseNonDefaultNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get());
  4024. }
  4025. inline void TestAllTypes::set_allocated_default_bytes(::std::string* default_bytes) {
  4026. if (default_bytes != NULL) {
  4027. set_has_default_bytes();
  4028. } else {
  4029. clear_has_default_bytes();
  4030. }
  4031. default_bytes_.SetAllocatedNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_bytes_.get(), default_bytes);
  4032. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.default_bytes)
  4033. }
  4034. // optional .protobuf_unittest_no_arena.TestAllTypes.NestedEnum default_nested_enum = 81 [default = BAR];
  4035. inline bool TestAllTypes::has_default_nested_enum() const {
  4036. return (_has_bits_[1] & 0x00001000u) != 0;
  4037. }
  4038. inline void TestAllTypes::set_has_default_nested_enum() {
  4039. _has_bits_[1] |= 0x00001000u;
  4040. }
  4041. inline void TestAllTypes::clear_has_default_nested_enum() {
  4042. _has_bits_[1] &= ~0x00001000u;
  4043. }
  4044. inline void TestAllTypes::clear_default_nested_enum() {
  4045. default_nested_enum_ = 2;
  4046. clear_has_default_nested_enum();
  4047. }
  4048. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum TestAllTypes::default_nested_enum() const {
  4049. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_nested_enum)
  4050. return static_cast< ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum >(default_nested_enum_);
  4051. }
  4052. inline void TestAllTypes::set_default_nested_enum(::protobuf_unittest_no_arena::TestAllTypes_NestedEnum value) {
  4053. assert(::protobuf_unittest_no_arena::TestAllTypes_NestedEnum_IsValid(value));
  4054. set_has_default_nested_enum();
  4055. default_nested_enum_ = value;
  4056. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_nested_enum)
  4057. }
  4058. // optional .protobuf_unittest_no_arena.ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
  4059. inline bool TestAllTypes::has_default_foreign_enum() const {
  4060. return (_has_bits_[1] & 0x00002000u) != 0;
  4061. }
  4062. inline void TestAllTypes::set_has_default_foreign_enum() {
  4063. _has_bits_[1] |= 0x00002000u;
  4064. }
  4065. inline void TestAllTypes::clear_has_default_foreign_enum() {
  4066. _has_bits_[1] &= ~0x00002000u;
  4067. }
  4068. inline void TestAllTypes::clear_default_foreign_enum() {
  4069. default_foreign_enum_ = 5;
  4070. clear_has_default_foreign_enum();
  4071. }
  4072. inline ::protobuf_unittest_no_arena::ForeignEnum TestAllTypes::default_foreign_enum() const {
  4073. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_foreign_enum)
  4074. return static_cast< ::protobuf_unittest_no_arena::ForeignEnum >(default_foreign_enum_);
  4075. }
  4076. inline void TestAllTypes::set_default_foreign_enum(::protobuf_unittest_no_arena::ForeignEnum value) {
  4077. assert(::protobuf_unittest_no_arena::ForeignEnum_IsValid(value));
  4078. set_has_default_foreign_enum();
  4079. default_foreign_enum_ = value;
  4080. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_foreign_enum)
  4081. }
  4082. // optional .protobuf_unittest_import.ImportEnum default_import_enum = 83 [default = IMPORT_BAR];
  4083. inline bool TestAllTypes::has_default_import_enum() const {
  4084. return (_has_bits_[0] & 0x08000000u) != 0;
  4085. }
  4086. inline void TestAllTypes::set_has_default_import_enum() {
  4087. _has_bits_[0] |= 0x08000000u;
  4088. }
  4089. inline void TestAllTypes::clear_has_default_import_enum() {
  4090. _has_bits_[0] &= ~0x08000000u;
  4091. }
  4092. inline void TestAllTypes::clear_default_import_enum() {
  4093. default_import_enum_ = 8;
  4094. clear_has_default_import_enum();
  4095. }
  4096. inline ::protobuf_unittest_import::ImportEnum TestAllTypes::default_import_enum() const {
  4097. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_import_enum)
  4098. return static_cast< ::protobuf_unittest_import::ImportEnum >(default_import_enum_);
  4099. }
  4100. inline void TestAllTypes::set_default_import_enum(::protobuf_unittest_import::ImportEnum value) {
  4101. assert(::protobuf_unittest_import::ImportEnum_IsValid(value));
  4102. set_has_default_import_enum();
  4103. default_import_enum_ = value;
  4104. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_import_enum)
  4105. }
  4106. // optional string default_string_piece = 84 [default = "abc", ctype = STRING_PIECE];
  4107. inline bool TestAllTypes::has_default_string_piece() const {
  4108. return (_has_bits_[0] & 0x00000040u) != 0;
  4109. }
  4110. inline void TestAllTypes::set_has_default_string_piece() {
  4111. _has_bits_[0] |= 0x00000040u;
  4112. }
  4113. inline void TestAllTypes::clear_has_default_string_piece() {
  4114. _has_bits_[0] &= ~0x00000040u;
  4115. }
  4116. inline void TestAllTypes::clear_default_string_piece() {
  4117. default_string_piece_.ClearToDefaultNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
  4118. clear_has_default_string_piece();
  4119. }
  4120. inline const ::std::string& TestAllTypes::default_string_piece() const {
  4121. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_string_piece)
  4122. return default_string_piece_.GetNoArena();
  4123. }
  4124. inline void TestAllTypes::set_default_string_piece(const ::std::string& value) {
  4125. set_has_default_string_piece();
  4126. default_string_piece_.SetNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get(), value);
  4127. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_string_piece)
  4128. }
  4129. #if LANG_CXX11
  4130. inline void TestAllTypes::set_default_string_piece(::std::string&& value) {
  4131. set_has_default_string_piece();
  4132. default_string_piece_.SetNoArena(
  4133. &::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get(), ::std::move(value));
  4134. // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest_no_arena.TestAllTypes.default_string_piece)
  4135. }
  4136. #endif
  4137. inline void TestAllTypes::set_default_string_piece(const char* value) {
  4138. GOOGLE_DCHECK(value != NULL);
  4139. set_has_default_string_piece();
  4140. default_string_piece_.SetNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get(), ::std::string(value));
  4141. // @@protoc_insertion_point(field_set_char:protobuf_unittest_no_arena.TestAllTypes.default_string_piece)
  4142. }
  4143. inline void TestAllTypes::set_default_string_piece(const char* value, size_t size) {
  4144. set_has_default_string_piece();
  4145. default_string_piece_.SetNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get(),
  4146. ::std::string(reinterpret_cast<const char*>(value), size));
  4147. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest_no_arena.TestAllTypes.default_string_piece)
  4148. }
  4149. inline ::std::string* TestAllTypes::mutable_default_string_piece() {
  4150. set_has_default_string_piece();
  4151. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.default_string_piece)
  4152. return default_string_piece_.MutableNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
  4153. }
  4154. inline ::std::string* TestAllTypes::release_default_string_piece() {
  4155. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.default_string_piece)
  4156. if (!has_default_string_piece()) {
  4157. return NULL;
  4158. }
  4159. clear_has_default_string_piece();
  4160. return default_string_piece_.ReleaseNonDefaultNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get());
  4161. }
  4162. inline void TestAllTypes::set_allocated_default_string_piece(::std::string* default_string_piece) {
  4163. if (default_string_piece != NULL) {
  4164. set_has_default_string_piece();
  4165. } else {
  4166. clear_has_default_string_piece();
  4167. }
  4168. default_string_piece_.SetAllocatedNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_string_piece_.get(), default_string_piece);
  4169. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.default_string_piece)
  4170. }
  4171. // optional string default_cord = 85 [default = "123", ctype = CORD];
  4172. inline bool TestAllTypes::has_default_cord() const {
  4173. return (_has_bits_[0] & 0x00000080u) != 0;
  4174. }
  4175. inline void TestAllTypes::set_has_default_cord() {
  4176. _has_bits_[0] |= 0x00000080u;
  4177. }
  4178. inline void TestAllTypes::clear_has_default_cord() {
  4179. _has_bits_[0] &= ~0x00000080u;
  4180. }
  4181. inline void TestAllTypes::clear_default_cord() {
  4182. default_cord_.ClearToDefaultNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get());
  4183. clear_has_default_cord();
  4184. }
  4185. inline const ::std::string& TestAllTypes::default_cord() const {
  4186. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.default_cord)
  4187. return default_cord_.GetNoArena();
  4188. }
  4189. inline void TestAllTypes::set_default_cord(const ::std::string& value) {
  4190. set_has_default_cord();
  4191. default_cord_.SetNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get(), value);
  4192. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.default_cord)
  4193. }
  4194. #if LANG_CXX11
  4195. inline void TestAllTypes::set_default_cord(::std::string&& value) {
  4196. set_has_default_cord();
  4197. default_cord_.SetNoArena(
  4198. &::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get(), ::std::move(value));
  4199. // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest_no_arena.TestAllTypes.default_cord)
  4200. }
  4201. #endif
  4202. inline void TestAllTypes::set_default_cord(const char* value) {
  4203. GOOGLE_DCHECK(value != NULL);
  4204. set_has_default_cord();
  4205. default_cord_.SetNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get(), ::std::string(value));
  4206. // @@protoc_insertion_point(field_set_char:protobuf_unittest_no_arena.TestAllTypes.default_cord)
  4207. }
  4208. inline void TestAllTypes::set_default_cord(const char* value, size_t size) {
  4209. set_has_default_cord();
  4210. default_cord_.SetNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get(),
  4211. ::std::string(reinterpret_cast<const char*>(value), size));
  4212. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest_no_arena.TestAllTypes.default_cord)
  4213. }
  4214. inline ::std::string* TestAllTypes::mutable_default_cord() {
  4215. set_has_default_cord();
  4216. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.default_cord)
  4217. return default_cord_.MutableNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get());
  4218. }
  4219. inline ::std::string* TestAllTypes::release_default_cord() {
  4220. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.default_cord)
  4221. if (!has_default_cord()) {
  4222. return NULL;
  4223. }
  4224. clear_has_default_cord();
  4225. return default_cord_.ReleaseNonDefaultNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get());
  4226. }
  4227. inline void TestAllTypes::set_allocated_default_cord(::std::string* default_cord) {
  4228. if (default_cord != NULL) {
  4229. set_has_default_cord();
  4230. } else {
  4231. clear_has_default_cord();
  4232. }
  4233. default_cord_.SetAllocatedNoArena(&::protobuf_unittest_no_arena::TestAllTypes::_i_give_permission_to_break_this_code_default_default_cord_.get(), default_cord);
  4234. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.default_cord)
  4235. }
  4236. // optional uint32 oneof_uint32 = 111;
  4237. inline bool TestAllTypes::has_oneof_uint32() const {
  4238. return oneof_field_case() == kOneofUint32;
  4239. }
  4240. inline void TestAllTypes::set_has_oneof_uint32() {
  4241. _oneof_case_[0] = kOneofUint32;
  4242. }
  4243. inline void TestAllTypes::clear_oneof_uint32() {
  4244. if (has_oneof_uint32()) {
  4245. oneof_field_.oneof_uint32_ = 0u;
  4246. clear_has_oneof_field();
  4247. }
  4248. }
  4249. inline ::google::protobuf::uint32 TestAllTypes::oneof_uint32() const {
  4250. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.oneof_uint32)
  4251. if (has_oneof_uint32()) {
  4252. return oneof_field_.oneof_uint32_;
  4253. }
  4254. return 0u;
  4255. }
  4256. inline void TestAllTypes::set_oneof_uint32(::google::protobuf::uint32 value) {
  4257. if (!has_oneof_uint32()) {
  4258. clear_oneof_field();
  4259. set_has_oneof_uint32();
  4260. }
  4261. oneof_field_.oneof_uint32_ = value;
  4262. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.oneof_uint32)
  4263. }
  4264. // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage oneof_nested_message = 112;
  4265. inline bool TestAllTypes::has_oneof_nested_message() const {
  4266. return oneof_field_case() == kOneofNestedMessage;
  4267. }
  4268. inline void TestAllTypes::set_has_oneof_nested_message() {
  4269. _oneof_case_[0] = kOneofNestedMessage;
  4270. }
  4271. inline void TestAllTypes::clear_oneof_nested_message() {
  4272. if (has_oneof_nested_message()) {
  4273. delete oneof_field_.oneof_nested_message_;
  4274. clear_has_oneof_field();
  4275. }
  4276. }
  4277. inline const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& TestAllTypes::_internal_oneof_nested_message() const {
  4278. return *oneof_field_.oneof_nested_message_;
  4279. }
  4280. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* TestAllTypes::release_oneof_nested_message() {
  4281. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.oneof_nested_message)
  4282. if (has_oneof_nested_message()) {
  4283. clear_has_oneof_field();
  4284. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* temp = oneof_field_.oneof_nested_message_;
  4285. oneof_field_.oneof_nested_message_ = NULL;
  4286. return temp;
  4287. } else {
  4288. return NULL;
  4289. }
  4290. }
  4291. inline const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& TestAllTypes::oneof_nested_message() const {
  4292. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.oneof_nested_message)
  4293. return has_oneof_nested_message()
  4294. ? *oneof_field_.oneof_nested_message_
  4295. : *reinterpret_cast< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage*>(&::protobuf_unittest_no_arena::_TestAllTypes_NestedMessage_default_instance_);
  4296. }
  4297. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* TestAllTypes::mutable_oneof_nested_message() {
  4298. if (!has_oneof_nested_message()) {
  4299. clear_oneof_field();
  4300. set_has_oneof_nested_message();
  4301. oneof_field_.oneof_nested_message_ = CreateMaybeMessage< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage >(
  4302. GetArenaNoVirtual());
  4303. }
  4304. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.oneof_nested_message)
  4305. return oneof_field_.oneof_nested_message_;
  4306. }
  4307. // optional string oneof_string = 113;
  4308. inline bool TestAllTypes::has_oneof_string() const {
  4309. return oneof_field_case() == kOneofString;
  4310. }
  4311. inline void TestAllTypes::set_has_oneof_string() {
  4312. _oneof_case_[0] = kOneofString;
  4313. }
  4314. inline void TestAllTypes::clear_oneof_string() {
  4315. if (has_oneof_string()) {
  4316. oneof_field_.oneof_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4317. clear_has_oneof_field();
  4318. }
  4319. }
  4320. inline const ::std::string& TestAllTypes::oneof_string() const {
  4321. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.oneof_string)
  4322. if (has_oneof_string()) {
  4323. return oneof_field_.oneof_string_.GetNoArena();
  4324. }
  4325. return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
  4326. }
  4327. inline void TestAllTypes::set_oneof_string(const ::std::string& value) {
  4328. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.oneof_string)
  4329. if (!has_oneof_string()) {
  4330. clear_oneof_field();
  4331. set_has_oneof_string();
  4332. oneof_field_.oneof_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4333. }
  4334. oneof_field_.oneof_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  4335. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.oneof_string)
  4336. }
  4337. #if LANG_CXX11
  4338. inline void TestAllTypes::set_oneof_string(::std::string&& value) {
  4339. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.oneof_string)
  4340. if (!has_oneof_string()) {
  4341. clear_oneof_field();
  4342. set_has_oneof_string();
  4343. oneof_field_.oneof_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4344. }
  4345. oneof_field_.oneof_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  4346. // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest_no_arena.TestAllTypes.oneof_string)
  4347. }
  4348. #endif
  4349. inline void TestAllTypes::set_oneof_string(const char* value) {
  4350. GOOGLE_DCHECK(value != NULL);
  4351. if (!has_oneof_string()) {
  4352. clear_oneof_field();
  4353. set_has_oneof_string();
  4354. oneof_field_.oneof_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4355. }
  4356. oneof_field_.oneof_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  4357. ::std::string(value));
  4358. // @@protoc_insertion_point(field_set_char:protobuf_unittest_no_arena.TestAllTypes.oneof_string)
  4359. }
  4360. inline void TestAllTypes::set_oneof_string(const char* value, size_t size) {
  4361. if (!has_oneof_string()) {
  4362. clear_oneof_field();
  4363. set_has_oneof_string();
  4364. oneof_field_.oneof_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4365. }
  4366. oneof_field_.oneof_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
  4367. reinterpret_cast<const char*>(value), size));
  4368. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest_no_arena.TestAllTypes.oneof_string)
  4369. }
  4370. inline ::std::string* TestAllTypes::mutable_oneof_string() {
  4371. if (!has_oneof_string()) {
  4372. clear_oneof_field();
  4373. set_has_oneof_string();
  4374. oneof_field_.oneof_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4375. }
  4376. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.oneof_string)
  4377. return oneof_field_.oneof_string_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4378. }
  4379. inline ::std::string* TestAllTypes::release_oneof_string() {
  4380. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.oneof_string)
  4381. if (has_oneof_string()) {
  4382. clear_has_oneof_field();
  4383. return oneof_field_.oneof_string_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4384. } else {
  4385. return NULL;
  4386. }
  4387. }
  4388. inline void TestAllTypes::set_allocated_oneof_string(::std::string* oneof_string) {
  4389. if (!has_oneof_string()) {
  4390. oneof_field_.oneof_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4391. }
  4392. clear_oneof_field();
  4393. if (oneof_string != NULL) {
  4394. set_has_oneof_string();
  4395. oneof_field_.oneof_string_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), oneof_string);
  4396. }
  4397. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.oneof_string)
  4398. }
  4399. // optional bytes oneof_bytes = 114;
  4400. inline bool TestAllTypes::has_oneof_bytes() const {
  4401. return oneof_field_case() == kOneofBytes;
  4402. }
  4403. inline void TestAllTypes::set_has_oneof_bytes() {
  4404. _oneof_case_[0] = kOneofBytes;
  4405. }
  4406. inline void TestAllTypes::clear_oneof_bytes() {
  4407. if (has_oneof_bytes()) {
  4408. oneof_field_.oneof_bytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4409. clear_has_oneof_field();
  4410. }
  4411. }
  4412. inline const ::std::string& TestAllTypes::oneof_bytes() const {
  4413. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.oneof_bytes)
  4414. if (has_oneof_bytes()) {
  4415. return oneof_field_.oneof_bytes_.GetNoArena();
  4416. }
  4417. return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
  4418. }
  4419. inline void TestAllTypes::set_oneof_bytes(const ::std::string& value) {
  4420. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.oneof_bytes)
  4421. if (!has_oneof_bytes()) {
  4422. clear_oneof_field();
  4423. set_has_oneof_bytes();
  4424. oneof_field_.oneof_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4425. }
  4426. oneof_field_.oneof_bytes_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  4427. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.oneof_bytes)
  4428. }
  4429. #if LANG_CXX11
  4430. inline void TestAllTypes::set_oneof_bytes(::std::string&& value) {
  4431. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.TestAllTypes.oneof_bytes)
  4432. if (!has_oneof_bytes()) {
  4433. clear_oneof_field();
  4434. set_has_oneof_bytes();
  4435. oneof_field_.oneof_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4436. }
  4437. oneof_field_.oneof_bytes_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  4438. // @@protoc_insertion_point(field_set_rvalue:protobuf_unittest_no_arena.TestAllTypes.oneof_bytes)
  4439. }
  4440. #endif
  4441. inline void TestAllTypes::set_oneof_bytes(const char* value) {
  4442. GOOGLE_DCHECK(value != NULL);
  4443. if (!has_oneof_bytes()) {
  4444. clear_oneof_field();
  4445. set_has_oneof_bytes();
  4446. oneof_field_.oneof_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4447. }
  4448. oneof_field_.oneof_bytes_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  4449. ::std::string(value));
  4450. // @@protoc_insertion_point(field_set_char:protobuf_unittest_no_arena.TestAllTypes.oneof_bytes)
  4451. }
  4452. inline void TestAllTypes::set_oneof_bytes(const void* value, size_t size) {
  4453. if (!has_oneof_bytes()) {
  4454. clear_oneof_field();
  4455. set_has_oneof_bytes();
  4456. oneof_field_.oneof_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4457. }
  4458. oneof_field_.oneof_bytes_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
  4459. reinterpret_cast<const char*>(value), size));
  4460. // @@protoc_insertion_point(field_set_pointer:protobuf_unittest_no_arena.TestAllTypes.oneof_bytes)
  4461. }
  4462. inline ::std::string* TestAllTypes::mutable_oneof_bytes() {
  4463. if (!has_oneof_bytes()) {
  4464. clear_oneof_field();
  4465. set_has_oneof_bytes();
  4466. oneof_field_.oneof_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4467. }
  4468. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.oneof_bytes)
  4469. return oneof_field_.oneof_bytes_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4470. }
  4471. inline ::std::string* TestAllTypes::release_oneof_bytes() {
  4472. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.oneof_bytes)
  4473. if (has_oneof_bytes()) {
  4474. clear_has_oneof_field();
  4475. return oneof_field_.oneof_bytes_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4476. } else {
  4477. return NULL;
  4478. }
  4479. }
  4480. inline void TestAllTypes::set_allocated_oneof_bytes(::std::string* oneof_bytes) {
  4481. if (!has_oneof_bytes()) {
  4482. oneof_field_.oneof_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4483. }
  4484. clear_oneof_field();
  4485. if (oneof_bytes != NULL) {
  4486. set_has_oneof_bytes();
  4487. oneof_field_.oneof_bytes_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), oneof_bytes);
  4488. }
  4489. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestAllTypes.oneof_bytes)
  4490. }
  4491. // optional .protobuf_unittest_no_arena.TestAllTypes.NestedMessage lazy_oneof_nested_message = 115 [lazy = true];
  4492. inline bool TestAllTypes::has_lazy_oneof_nested_message() const {
  4493. return oneof_field_case() == kLazyOneofNestedMessage;
  4494. }
  4495. inline void TestAllTypes::set_has_lazy_oneof_nested_message() {
  4496. _oneof_case_[0] = kLazyOneofNestedMessage;
  4497. }
  4498. inline void TestAllTypes::clear_lazy_oneof_nested_message() {
  4499. if (has_lazy_oneof_nested_message()) {
  4500. delete oneof_field_.lazy_oneof_nested_message_;
  4501. clear_has_oneof_field();
  4502. }
  4503. }
  4504. inline const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& TestAllTypes::_internal_lazy_oneof_nested_message() const {
  4505. return *oneof_field_.lazy_oneof_nested_message_;
  4506. }
  4507. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* TestAllTypes::release_lazy_oneof_nested_message() {
  4508. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestAllTypes.lazy_oneof_nested_message)
  4509. if (has_lazy_oneof_nested_message()) {
  4510. clear_has_oneof_field();
  4511. ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* temp = oneof_field_.lazy_oneof_nested_message_;
  4512. oneof_field_.lazy_oneof_nested_message_ = NULL;
  4513. return temp;
  4514. } else {
  4515. return NULL;
  4516. }
  4517. }
  4518. inline const ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage& TestAllTypes::lazy_oneof_nested_message() const {
  4519. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestAllTypes.lazy_oneof_nested_message)
  4520. return has_lazy_oneof_nested_message()
  4521. ? *oneof_field_.lazy_oneof_nested_message_
  4522. : *reinterpret_cast< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage*>(&::protobuf_unittest_no_arena::_TestAllTypes_NestedMessage_default_instance_);
  4523. }
  4524. inline ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage* TestAllTypes::mutable_lazy_oneof_nested_message() {
  4525. if (!has_lazy_oneof_nested_message()) {
  4526. clear_oneof_field();
  4527. set_has_lazy_oneof_nested_message();
  4528. oneof_field_.lazy_oneof_nested_message_ = CreateMaybeMessage< ::protobuf_unittest_no_arena::TestAllTypes_NestedMessage >(
  4529. GetArenaNoVirtual());
  4530. }
  4531. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestAllTypes.lazy_oneof_nested_message)
  4532. return oneof_field_.lazy_oneof_nested_message_;
  4533. }
  4534. inline bool TestAllTypes::has_oneof_field() const {
  4535. return oneof_field_case() != ONEOF_FIELD_NOT_SET;
  4536. }
  4537. inline void TestAllTypes::clear_has_oneof_field() {
  4538. _oneof_case_[0] = ONEOF_FIELD_NOT_SET;
  4539. }
  4540. inline TestAllTypes::OneofFieldCase TestAllTypes::oneof_field_case() const {
  4541. return TestAllTypes::OneofFieldCase(_oneof_case_[0]);
  4542. }
  4543. // -------------------------------------------------------------------
  4544. // ForeignMessage
  4545. // optional int32 c = 1;
  4546. inline bool ForeignMessage::has_c() const {
  4547. return (_has_bits_[0] & 0x00000001u) != 0;
  4548. }
  4549. inline void ForeignMessage::set_has_c() {
  4550. _has_bits_[0] |= 0x00000001u;
  4551. }
  4552. inline void ForeignMessage::clear_has_c() {
  4553. _has_bits_[0] &= ~0x00000001u;
  4554. }
  4555. inline void ForeignMessage::clear_c() {
  4556. c_ = 0;
  4557. clear_has_c();
  4558. }
  4559. inline ::google::protobuf::int32 ForeignMessage::c() const {
  4560. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.ForeignMessage.c)
  4561. return c_;
  4562. }
  4563. inline void ForeignMessage::set_c(::google::protobuf::int32 value) {
  4564. set_has_c();
  4565. c_ = value;
  4566. // @@protoc_insertion_point(field_set:protobuf_unittest_no_arena.ForeignMessage.c)
  4567. }
  4568. // -------------------------------------------------------------------
  4569. // TestNoArenaMessage
  4570. // optional .proto2_arena_unittest.ArenaMessage arena_message = 1;
  4571. inline bool TestNoArenaMessage::has_arena_message() const {
  4572. return (_has_bits_[0] & 0x00000001u) != 0;
  4573. }
  4574. inline void TestNoArenaMessage::set_has_arena_message() {
  4575. _has_bits_[0] |= 0x00000001u;
  4576. }
  4577. inline void TestNoArenaMessage::clear_has_arena_message() {
  4578. _has_bits_[0] &= ~0x00000001u;
  4579. }
  4580. inline const ::proto2_arena_unittest::ArenaMessage& TestNoArenaMessage::_internal_arena_message() const {
  4581. return *arena_message_;
  4582. }
  4583. inline const ::proto2_arena_unittest::ArenaMessage& TestNoArenaMessage::arena_message() const {
  4584. const ::proto2_arena_unittest::ArenaMessage* p = arena_message_;
  4585. // @@protoc_insertion_point(field_get:protobuf_unittest_no_arena.TestNoArenaMessage.arena_message)
  4586. return p != NULL ? *p : *reinterpret_cast<const ::proto2_arena_unittest::ArenaMessage*>(
  4587. &::proto2_arena_unittest::_ArenaMessage_default_instance_);
  4588. }
  4589. inline ::proto2_arena_unittest::ArenaMessage* TestNoArenaMessage::release_arena_message() {
  4590. // @@protoc_insertion_point(field_release:protobuf_unittest_no_arena.TestNoArenaMessage.arena_message)
  4591. clear_has_arena_message();
  4592. ::proto2_arena_unittest::ArenaMessage* temp = arena_message_;
  4593. arena_message_ = NULL;
  4594. return temp;
  4595. }
  4596. inline ::proto2_arena_unittest::ArenaMessage* TestNoArenaMessage::mutable_arena_message() {
  4597. set_has_arena_message();
  4598. if (arena_message_ == NULL) {
  4599. auto* p = CreateMaybeMessage<::proto2_arena_unittest::ArenaMessage>(GetArenaNoVirtual());
  4600. arena_message_ = p;
  4601. }
  4602. // @@protoc_insertion_point(field_mutable:protobuf_unittest_no_arena.TestNoArenaMessage.arena_message)
  4603. return arena_message_;
  4604. }
  4605. inline void TestNoArenaMessage::set_allocated_arena_message(::proto2_arena_unittest::ArenaMessage* arena_message) {
  4606. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  4607. if (message_arena == NULL) {
  4608. delete reinterpret_cast< ::google::protobuf::MessageLite*>(arena_message_);
  4609. }
  4610. if (arena_message) {
  4611. ::google::protobuf::Arena* submessage_arena =
  4612. reinterpret_cast<::google::protobuf::MessageLite*>(arena_message)->GetArena();
  4613. if (message_arena != submessage_arena) {
  4614. arena_message = ::google::protobuf::internal::GetOwnedMessage(
  4615. message_arena, arena_message, submessage_arena);
  4616. }
  4617. set_has_arena_message();
  4618. } else {
  4619. clear_has_arena_message();
  4620. }
  4621. arena_message_ = arena_message;
  4622. // @@protoc_insertion_point(field_set_allocated:protobuf_unittest_no_arena.TestNoArenaMessage.arena_message)
  4623. }
  4624. #ifdef __GNUC__
  4625. #pragma GCC diagnostic pop
  4626. #endif // __GNUC__
  4627. // -------------------------------------------------------------------
  4628. // -------------------------------------------------------------------
  4629. // -------------------------------------------------------------------
  4630. // -------------------------------------------------------------------
  4631. // -------------------------------------------------------------------
  4632. // @@protoc_insertion_point(namespace_scope)
  4633. } // namespace protobuf_unittest_no_arena
  4634. namespace google {
  4635. namespace protobuf {
  4636. template <> struct is_proto_enum< ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum> : ::std::true_type {};
  4637. template <>
  4638. inline const EnumDescriptor* GetEnumDescriptor< ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum>() {
  4639. return ::protobuf_unittest_no_arena::TestAllTypes_NestedEnum_descriptor();
  4640. }
  4641. template <> struct is_proto_enum< ::protobuf_unittest_no_arena::ForeignEnum> : ::std::true_type {};
  4642. template <>
  4643. inline const EnumDescriptor* GetEnumDescriptor< ::protobuf_unittest_no_arena::ForeignEnum>() {
  4644. return ::protobuf_unittest_no_arena::ForeignEnum_descriptor();
  4645. }
  4646. } // namespace protobuf
  4647. } // namespace google
  4648. // @@protoc_insertion_point(global_scope)
  4649. #endif // PROTOBUF_INCLUDED_google_2fprotobuf_2funittest_5fno_5farena_2eproto