unittest_proto3_arena.pb.h 233 KB

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