wrappers.pb.cc 153 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/util/internal/testdata/wrappers.proto
  3. #include <google/protobuf/util/internal/testdata/wrappers.pb.h>
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/io/coded_stream.h>
  8. #include <google/protobuf/wire_format_lite_inl.h>
  9. #include <google/protobuf/descriptor.h>
  10. #include <google/protobuf/generated_message_reflection.h>
  11. #include <google/protobuf/reflection_ops.h>
  12. #include <google/protobuf/wire_format.h>
  13. // This is a temporary google only hack
  14. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  15. #include "third_party/protobuf/version.h"
  16. #endif
  17. // @@protoc_insertion_point(includes)
  18. namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto {
  19. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_BoolWrapper;
  20. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_BytesWrapper;
  21. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_DoubleWrapper;
  22. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_FloatWrapper;
  23. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Int32Wrapper;
  24. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Int64Wrapper;
  25. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_StringWrapper;
  26. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_UInt32Wrapper;
  27. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_UInt64Wrapper;
  28. } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto
  29. namespace protobuf_google_2fprotobuf_2fwrappers_2eproto {
  30. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_BoolValue;
  31. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_BytesValue;
  32. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_DoubleValue;
  33. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_FloatValue;
  34. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Int32Value;
  35. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Int64Value;
  36. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_StringValue;
  37. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_UInt32Value;
  38. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_UInt64Value;
  39. } // namespace protobuf_google_2fprotobuf_2fwrappers_2eproto
  40. namespace google {
  41. namespace protobuf {
  42. namespace testing {
  43. class WrappersTestCasesDefaultTypeInternal {
  44. public:
  45. ::google::protobuf::internal::ExplicitlyConstructed<WrappersTestCases>
  46. _instance;
  47. } _WrappersTestCases_default_instance_;
  48. class DoubleWrapperDefaultTypeInternal {
  49. public:
  50. ::google::protobuf::internal::ExplicitlyConstructed<DoubleWrapper>
  51. _instance;
  52. } _DoubleWrapper_default_instance_;
  53. class FloatWrapperDefaultTypeInternal {
  54. public:
  55. ::google::protobuf::internal::ExplicitlyConstructed<FloatWrapper>
  56. _instance;
  57. } _FloatWrapper_default_instance_;
  58. class Int64WrapperDefaultTypeInternal {
  59. public:
  60. ::google::protobuf::internal::ExplicitlyConstructed<Int64Wrapper>
  61. _instance;
  62. } _Int64Wrapper_default_instance_;
  63. class UInt64WrapperDefaultTypeInternal {
  64. public:
  65. ::google::protobuf::internal::ExplicitlyConstructed<UInt64Wrapper>
  66. _instance;
  67. } _UInt64Wrapper_default_instance_;
  68. class Int32WrapperDefaultTypeInternal {
  69. public:
  70. ::google::protobuf::internal::ExplicitlyConstructed<Int32Wrapper>
  71. _instance;
  72. } _Int32Wrapper_default_instance_;
  73. class UInt32WrapperDefaultTypeInternal {
  74. public:
  75. ::google::protobuf::internal::ExplicitlyConstructed<UInt32Wrapper>
  76. _instance;
  77. } _UInt32Wrapper_default_instance_;
  78. class BoolWrapperDefaultTypeInternal {
  79. public:
  80. ::google::protobuf::internal::ExplicitlyConstructed<BoolWrapper>
  81. _instance;
  82. } _BoolWrapper_default_instance_;
  83. class StringWrapperDefaultTypeInternal {
  84. public:
  85. ::google::protobuf::internal::ExplicitlyConstructed<StringWrapper>
  86. _instance;
  87. } _StringWrapper_default_instance_;
  88. class BytesWrapperDefaultTypeInternal {
  89. public:
  90. ::google::protobuf::internal::ExplicitlyConstructed<BytesWrapper>
  91. _instance;
  92. } _BytesWrapper_default_instance_;
  93. } // namespace testing
  94. } // namespace protobuf
  95. } // namespace google
  96. namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto {
  97. static void InitDefaultsWrappersTestCases() {
  98. GOOGLE_PROTOBUF_VERIFY_VERSION;
  99. {
  100. void* ptr = &::google::protobuf::testing::_WrappersTestCases_default_instance_;
  101. new (ptr) ::google::protobuf::testing::WrappersTestCases();
  102. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  103. }
  104. ::google::protobuf::testing::WrappersTestCases::InitAsDefaultInstance();
  105. }
  106. ::google::protobuf::internal::SCCInfo<9> scc_info_WrappersTestCases =
  107. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 9, InitDefaultsWrappersTestCases}, {
  108. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_DoubleWrapper.base,
  109. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_FloatWrapper.base,
  110. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_Int64Wrapper.base,
  111. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_UInt64Wrapper.base,
  112. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_Int32Wrapper.base,
  113. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_UInt32Wrapper.base,
  114. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_BoolWrapper.base,
  115. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_StringWrapper.base,
  116. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_BytesWrapper.base,}};
  117. static void InitDefaultsDoubleWrapper() {
  118. GOOGLE_PROTOBUF_VERIFY_VERSION;
  119. {
  120. void* ptr = &::google::protobuf::testing::_DoubleWrapper_default_instance_;
  121. new (ptr) ::google::protobuf::testing::DoubleWrapper();
  122. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  123. }
  124. ::google::protobuf::testing::DoubleWrapper::InitAsDefaultInstance();
  125. }
  126. ::google::protobuf::internal::SCCInfo<1> scc_info_DoubleWrapper =
  127. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsDoubleWrapper}, {
  128. &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_DoubleValue.base,}};
  129. static void InitDefaultsFloatWrapper() {
  130. GOOGLE_PROTOBUF_VERIFY_VERSION;
  131. {
  132. void* ptr = &::google::protobuf::testing::_FloatWrapper_default_instance_;
  133. new (ptr) ::google::protobuf::testing::FloatWrapper();
  134. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  135. }
  136. ::google::protobuf::testing::FloatWrapper::InitAsDefaultInstance();
  137. }
  138. ::google::protobuf::internal::SCCInfo<1> scc_info_FloatWrapper =
  139. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFloatWrapper}, {
  140. &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_FloatValue.base,}};
  141. static void InitDefaultsInt64Wrapper() {
  142. GOOGLE_PROTOBUF_VERIFY_VERSION;
  143. {
  144. void* ptr = &::google::protobuf::testing::_Int64Wrapper_default_instance_;
  145. new (ptr) ::google::protobuf::testing::Int64Wrapper();
  146. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  147. }
  148. ::google::protobuf::testing::Int64Wrapper::InitAsDefaultInstance();
  149. }
  150. ::google::protobuf::internal::SCCInfo<1> scc_info_Int64Wrapper =
  151. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsInt64Wrapper}, {
  152. &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_Int64Value.base,}};
  153. static void InitDefaultsUInt64Wrapper() {
  154. GOOGLE_PROTOBUF_VERIFY_VERSION;
  155. {
  156. void* ptr = &::google::protobuf::testing::_UInt64Wrapper_default_instance_;
  157. new (ptr) ::google::protobuf::testing::UInt64Wrapper();
  158. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  159. }
  160. ::google::protobuf::testing::UInt64Wrapper::InitAsDefaultInstance();
  161. }
  162. ::google::protobuf::internal::SCCInfo<1> scc_info_UInt64Wrapper =
  163. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsUInt64Wrapper}, {
  164. &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_UInt64Value.base,}};
  165. static void InitDefaultsInt32Wrapper() {
  166. GOOGLE_PROTOBUF_VERIFY_VERSION;
  167. {
  168. void* ptr = &::google::protobuf::testing::_Int32Wrapper_default_instance_;
  169. new (ptr) ::google::protobuf::testing::Int32Wrapper();
  170. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  171. }
  172. ::google::protobuf::testing::Int32Wrapper::InitAsDefaultInstance();
  173. }
  174. ::google::protobuf::internal::SCCInfo<1> scc_info_Int32Wrapper =
  175. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsInt32Wrapper}, {
  176. &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_Int32Value.base,}};
  177. static void InitDefaultsUInt32Wrapper() {
  178. GOOGLE_PROTOBUF_VERIFY_VERSION;
  179. {
  180. void* ptr = &::google::protobuf::testing::_UInt32Wrapper_default_instance_;
  181. new (ptr) ::google::protobuf::testing::UInt32Wrapper();
  182. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  183. }
  184. ::google::protobuf::testing::UInt32Wrapper::InitAsDefaultInstance();
  185. }
  186. ::google::protobuf::internal::SCCInfo<1> scc_info_UInt32Wrapper =
  187. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsUInt32Wrapper}, {
  188. &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_UInt32Value.base,}};
  189. static void InitDefaultsBoolWrapper() {
  190. GOOGLE_PROTOBUF_VERIFY_VERSION;
  191. {
  192. void* ptr = &::google::protobuf::testing::_BoolWrapper_default_instance_;
  193. new (ptr) ::google::protobuf::testing::BoolWrapper();
  194. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  195. }
  196. ::google::protobuf::testing::BoolWrapper::InitAsDefaultInstance();
  197. }
  198. ::google::protobuf::internal::SCCInfo<1> scc_info_BoolWrapper =
  199. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsBoolWrapper}, {
  200. &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_BoolValue.base,}};
  201. static void InitDefaultsStringWrapper() {
  202. GOOGLE_PROTOBUF_VERIFY_VERSION;
  203. {
  204. void* ptr = &::google::protobuf::testing::_StringWrapper_default_instance_;
  205. new (ptr) ::google::protobuf::testing::StringWrapper();
  206. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  207. }
  208. ::google::protobuf::testing::StringWrapper::InitAsDefaultInstance();
  209. }
  210. ::google::protobuf::internal::SCCInfo<1> scc_info_StringWrapper =
  211. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsStringWrapper}, {
  212. &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_StringValue.base,}};
  213. static void InitDefaultsBytesWrapper() {
  214. GOOGLE_PROTOBUF_VERIFY_VERSION;
  215. {
  216. void* ptr = &::google::protobuf::testing::_BytesWrapper_default_instance_;
  217. new (ptr) ::google::protobuf::testing::BytesWrapper();
  218. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  219. }
  220. ::google::protobuf::testing::BytesWrapper::InitAsDefaultInstance();
  221. }
  222. ::google::protobuf::internal::SCCInfo<1> scc_info_BytesWrapper =
  223. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsBytesWrapper}, {
  224. &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_BytesValue.base,}};
  225. void InitDefaults() {
  226. ::google::protobuf::internal::InitSCC(&scc_info_WrappersTestCases.base);
  227. ::google::protobuf::internal::InitSCC(&scc_info_DoubleWrapper.base);
  228. ::google::protobuf::internal::InitSCC(&scc_info_FloatWrapper.base);
  229. ::google::protobuf::internal::InitSCC(&scc_info_Int64Wrapper.base);
  230. ::google::protobuf::internal::InitSCC(&scc_info_UInt64Wrapper.base);
  231. ::google::protobuf::internal::InitSCC(&scc_info_Int32Wrapper.base);
  232. ::google::protobuf::internal::InitSCC(&scc_info_UInt32Wrapper.base);
  233. ::google::protobuf::internal::InitSCC(&scc_info_BoolWrapper.base);
  234. ::google::protobuf::internal::InitSCC(&scc_info_StringWrapper.base);
  235. ::google::protobuf::internal::InitSCC(&scc_info_BytesWrapper.base);
  236. }
  237. ::google::protobuf::Metadata file_level_metadata[10];
  238. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  239. ~0u, // no _has_bits_
  240. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, _internal_metadata_),
  241. ~0u, // no _extensions_
  242. ~0u, // no _oneof_case_
  243. ~0u, // no _weak_field_map_
  244. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, double_wrapper_),
  245. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, float_wrapper_),
  246. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, int64_wrapper_),
  247. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, uint64_wrapper_),
  248. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, int32_wrapper_),
  249. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, uint32_wrapper_),
  250. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, bool_wrapper_),
  251. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, string_wrapper_),
  252. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, bytes_wrapper_),
  253. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, double_wrapper_default_),
  254. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, float_wrapper_default_),
  255. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, int64_wrapper_default_),
  256. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, uint64_wrapper_default_),
  257. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, int32_wrapper_default_),
  258. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, uint32_wrapper_default_),
  259. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, bool_wrapper_default_),
  260. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, string_wrapper_default_),
  261. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::WrappersTestCases, bytes_wrapper_default_),
  262. ~0u, // no _has_bits_
  263. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DoubleWrapper, _internal_metadata_),
  264. ~0u, // no _extensions_
  265. ~0u, // no _oneof_case_
  266. ~0u, // no _weak_field_map_
  267. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::DoubleWrapper, double__),
  268. ~0u, // no _has_bits_
  269. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FloatWrapper, _internal_metadata_),
  270. ~0u, // no _extensions_
  271. ~0u, // no _oneof_case_
  272. ~0u, // no _weak_field_map_
  273. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FloatWrapper, float__),
  274. ~0u, // no _has_bits_
  275. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Int64Wrapper, _internal_metadata_),
  276. ~0u, // no _extensions_
  277. ~0u, // no _oneof_case_
  278. ~0u, // no _weak_field_map_
  279. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Int64Wrapper, int64_),
  280. ~0u, // no _has_bits_
  281. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::UInt64Wrapper, _internal_metadata_),
  282. ~0u, // no _extensions_
  283. ~0u, // no _oneof_case_
  284. ~0u, // no _weak_field_map_
  285. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::UInt64Wrapper, uint64_),
  286. ~0u, // no _has_bits_
  287. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Int32Wrapper, _internal_metadata_),
  288. ~0u, // no _extensions_
  289. ~0u, // no _oneof_case_
  290. ~0u, // no _weak_field_map_
  291. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Int32Wrapper, int32_),
  292. ~0u, // no _has_bits_
  293. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::UInt32Wrapper, _internal_metadata_),
  294. ~0u, // no _extensions_
  295. ~0u, // no _oneof_case_
  296. ~0u, // no _weak_field_map_
  297. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::UInt32Wrapper, uint32_),
  298. ~0u, // no _has_bits_
  299. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::BoolWrapper, _internal_metadata_),
  300. ~0u, // no _extensions_
  301. ~0u, // no _oneof_case_
  302. ~0u, // no _weak_field_map_
  303. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::BoolWrapper, bool__),
  304. ~0u, // no _has_bits_
  305. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StringWrapper, _internal_metadata_),
  306. ~0u, // no _extensions_
  307. ~0u, // no _oneof_case_
  308. ~0u, // no _weak_field_map_
  309. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::StringWrapper, string_),
  310. ~0u, // no _has_bits_
  311. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::BytesWrapper, _internal_metadata_),
  312. ~0u, // no _extensions_
  313. ~0u, // no _oneof_case_
  314. ~0u, // no _weak_field_map_
  315. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::BytesWrapper, bytes_),
  316. };
  317. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  318. { 0, -1, sizeof(::google::protobuf::testing::WrappersTestCases)},
  319. { 23, -1, sizeof(::google::protobuf::testing::DoubleWrapper)},
  320. { 29, -1, sizeof(::google::protobuf::testing::FloatWrapper)},
  321. { 35, -1, sizeof(::google::protobuf::testing::Int64Wrapper)},
  322. { 41, -1, sizeof(::google::protobuf::testing::UInt64Wrapper)},
  323. { 47, -1, sizeof(::google::protobuf::testing::Int32Wrapper)},
  324. { 53, -1, sizeof(::google::protobuf::testing::UInt32Wrapper)},
  325. { 59, -1, sizeof(::google::protobuf::testing::BoolWrapper)},
  326. { 65, -1, sizeof(::google::protobuf::testing::StringWrapper)},
  327. { 71, -1, sizeof(::google::protobuf::testing::BytesWrapper)},
  328. };
  329. static ::google::protobuf::Message const * const file_default_instances[] = {
  330. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_WrappersTestCases_default_instance_),
  331. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_DoubleWrapper_default_instance_),
  332. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_FloatWrapper_default_instance_),
  333. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Int64Wrapper_default_instance_),
  334. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_UInt64Wrapper_default_instance_),
  335. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Int32Wrapper_default_instance_),
  336. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_UInt32Wrapper_default_instance_),
  337. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_BoolWrapper_default_instance_),
  338. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_StringWrapper_default_instance_),
  339. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_BytesWrapper_default_instance_),
  340. };
  341. void protobuf_AssignDescriptors() {
  342. AddDescriptors();
  343. AssignDescriptors(
  344. "google/protobuf/util/internal/testdata/wrappers.proto", schemas, file_default_instances, TableStruct::offsets,
  345. file_level_metadata, NULL, NULL);
  346. }
  347. void protobuf_AssignDescriptorsOnce() {
  348. static ::google::protobuf::internal::once_flag once;
  349. ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
  350. }
  351. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  352. void protobuf_RegisterTypes(const ::std::string&) {
  353. protobuf_AssignDescriptorsOnce();
  354. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 10);
  355. }
  356. void AddDescriptorsImpl() {
  357. InitDefaults();
  358. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  359. "\n5google/protobuf/util/internal/testdata"
  360. "/wrappers.proto\022\027google.protobuf.testing"
  361. "\032\036google/protobuf/wrappers.proto\"\303\t\n\021Wra"
  362. "ppersTestCases\022>\n\016double_wrapper\030\001 \001(\0132&"
  363. ".google.protobuf.testing.DoubleWrapper\022<"
  364. "\n\rfloat_wrapper\030\002 \001(\0132%.google.protobuf."
  365. "testing.FloatWrapper\022<\n\rint64_wrapper\030\003 "
  366. "\001(\0132%.google.protobuf.testing.Int64Wrapp"
  367. "er\022>\n\016uint64_wrapper\030\004 \001(\0132&.google.prot"
  368. "obuf.testing.UInt64Wrapper\022<\n\rint32_wrap"
  369. "per\030\005 \001(\0132%.google.protobuf.testing.Int3"
  370. "2Wrapper\022>\n\016uint32_wrapper\030\006 \001(\0132&.googl"
  371. "e.protobuf.testing.UInt32Wrapper\022:\n\014bool"
  372. "_wrapper\030\007 \001(\0132$.google.protobuf.testing"
  373. ".BoolWrapper\022>\n\016string_wrapper\030\010 \001(\0132&.g"
  374. "oogle.protobuf.testing.StringWrapper\022<\n\r"
  375. "bytes_wrapper\030\t \001(\0132%.google.protobuf.te"
  376. "sting.BytesWrapper\022F\n\026double_wrapper_def"
  377. "ault\030\n \001(\0132&.google.protobuf.testing.Dou"
  378. "bleWrapper\022D\n\025float_wrapper_default\030\013 \001("
  379. "\0132%.google.protobuf.testing.FloatWrapper"
  380. "\022D\n\025int64_wrapper_default\030\014 \001(\0132%.google"
  381. ".protobuf.testing.Int64Wrapper\022F\n\026uint64"
  382. "_wrapper_default\030\r \001(\0132&.google.protobuf"
  383. ".testing.UInt64Wrapper\022D\n\025int32_wrapper_"
  384. "default\030\016 \001(\0132%.google.protobuf.testing."
  385. "Int32Wrapper\022F\n\026uint32_wrapper_default\030\017"
  386. " \001(\0132&.google.protobuf.testing.UInt32Wra"
  387. "pper\022B\n\024bool_wrapper_default\030\020 \001(\0132$.goo"
  388. "gle.protobuf.testing.BoolWrapper\022F\n\026stri"
  389. "ng_wrapper_default\030\021 \001(\0132&.google.protob"
  390. "uf.testing.StringWrapper\022D\n\025bytes_wrappe"
  391. "r_default\030\022 \001(\0132%.google.protobuf.testin"
  392. "g.BytesWrapper\"=\n\rDoubleWrapper\022,\n\006doubl"
  393. "e\030\001 \001(\0132\034.google.protobuf.DoubleValue\":\n"
  394. "\014FloatWrapper\022*\n\005float\030\001 \001(\0132\033.google.pr"
  395. "otobuf.FloatValue\":\n\014Int64Wrapper\022*\n\005int"
  396. "64\030\001 \001(\0132\033.google.protobuf.Int64Value\"=\n"
  397. "\rUInt64Wrapper\022,\n\006uint64\030\001 \001(\0132\034.google."
  398. "protobuf.UInt64Value\":\n\014Int32Wrapper\022*\n\005"
  399. "int32\030\001 \001(\0132\033.google.protobuf.Int32Value"
  400. "\"=\n\rUInt32Wrapper\022,\n\006uint32\030\001 \001(\0132\034.goog"
  401. "le.protobuf.UInt32Value\"7\n\013BoolWrapper\022("
  402. "\n\004bool\030\001 \001(\0132\032.google.protobuf.BoolValue"
  403. "\"=\n\rStringWrapper\022,\n\006string\030\001 \001(\0132\034.goog"
  404. "le.protobuf.StringValue\":\n\014BytesWrapper\022"
  405. "*\n\005bytes\030\001 \001(\0132\033.google.protobuf.BytesVa"
  406. "lue2u\n\023WrappersTestService\022^\n\004Call\022*.goo"
  407. "gle.protobuf.testing.WrappersTestCases\032*"
  408. ".google.protobuf.testing.WrappersTestCas"
  409. "esb\006proto3"
  410. };
  411. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  412. descriptor, 2010);
  413. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  414. "google/protobuf/util/internal/testdata/wrappers.proto", &protobuf_RegisterTypes);
  415. ::protobuf_google_2fprotobuf_2fwrappers_2eproto::AddDescriptors();
  416. }
  417. void AddDescriptors() {
  418. static ::google::protobuf::internal::once_flag once;
  419. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  420. }
  421. // Force AddDescriptors() to be called at dynamic initialization time.
  422. struct StaticDescriptorInitializer {
  423. StaticDescriptorInitializer() {
  424. AddDescriptors();
  425. }
  426. } static_descriptor_initializer;
  427. } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto
  428. namespace google {
  429. namespace protobuf {
  430. namespace testing {
  431. // ===================================================================
  432. void WrappersTestCases::InitAsDefaultInstance() {
  433. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->double_wrapper_ = const_cast< ::google::protobuf::testing::DoubleWrapper*>(
  434. ::google::protobuf::testing::DoubleWrapper::internal_default_instance());
  435. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->float_wrapper_ = const_cast< ::google::protobuf::testing::FloatWrapper*>(
  436. ::google::protobuf::testing::FloatWrapper::internal_default_instance());
  437. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->int64_wrapper_ = const_cast< ::google::protobuf::testing::Int64Wrapper*>(
  438. ::google::protobuf::testing::Int64Wrapper::internal_default_instance());
  439. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->uint64_wrapper_ = const_cast< ::google::protobuf::testing::UInt64Wrapper*>(
  440. ::google::protobuf::testing::UInt64Wrapper::internal_default_instance());
  441. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->int32_wrapper_ = const_cast< ::google::protobuf::testing::Int32Wrapper*>(
  442. ::google::protobuf::testing::Int32Wrapper::internal_default_instance());
  443. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->uint32_wrapper_ = const_cast< ::google::protobuf::testing::UInt32Wrapper*>(
  444. ::google::protobuf::testing::UInt32Wrapper::internal_default_instance());
  445. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->bool_wrapper_ = const_cast< ::google::protobuf::testing::BoolWrapper*>(
  446. ::google::protobuf::testing::BoolWrapper::internal_default_instance());
  447. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->string_wrapper_ = const_cast< ::google::protobuf::testing::StringWrapper*>(
  448. ::google::protobuf::testing::StringWrapper::internal_default_instance());
  449. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->bytes_wrapper_ = const_cast< ::google::protobuf::testing::BytesWrapper*>(
  450. ::google::protobuf::testing::BytesWrapper::internal_default_instance());
  451. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->double_wrapper_default_ = const_cast< ::google::protobuf::testing::DoubleWrapper*>(
  452. ::google::protobuf::testing::DoubleWrapper::internal_default_instance());
  453. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->float_wrapper_default_ = const_cast< ::google::protobuf::testing::FloatWrapper*>(
  454. ::google::protobuf::testing::FloatWrapper::internal_default_instance());
  455. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->int64_wrapper_default_ = const_cast< ::google::protobuf::testing::Int64Wrapper*>(
  456. ::google::protobuf::testing::Int64Wrapper::internal_default_instance());
  457. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->uint64_wrapper_default_ = const_cast< ::google::protobuf::testing::UInt64Wrapper*>(
  458. ::google::protobuf::testing::UInt64Wrapper::internal_default_instance());
  459. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->int32_wrapper_default_ = const_cast< ::google::protobuf::testing::Int32Wrapper*>(
  460. ::google::protobuf::testing::Int32Wrapper::internal_default_instance());
  461. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->uint32_wrapper_default_ = const_cast< ::google::protobuf::testing::UInt32Wrapper*>(
  462. ::google::protobuf::testing::UInt32Wrapper::internal_default_instance());
  463. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->bool_wrapper_default_ = const_cast< ::google::protobuf::testing::BoolWrapper*>(
  464. ::google::protobuf::testing::BoolWrapper::internal_default_instance());
  465. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->string_wrapper_default_ = const_cast< ::google::protobuf::testing::StringWrapper*>(
  466. ::google::protobuf::testing::StringWrapper::internal_default_instance());
  467. ::google::protobuf::testing::_WrappersTestCases_default_instance_._instance.get_mutable()->bytes_wrapper_default_ = const_cast< ::google::protobuf::testing::BytesWrapper*>(
  468. ::google::protobuf::testing::BytesWrapper::internal_default_instance());
  469. }
  470. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  471. const int WrappersTestCases::kDoubleWrapperFieldNumber;
  472. const int WrappersTestCases::kFloatWrapperFieldNumber;
  473. const int WrappersTestCases::kInt64WrapperFieldNumber;
  474. const int WrappersTestCases::kUint64WrapperFieldNumber;
  475. const int WrappersTestCases::kInt32WrapperFieldNumber;
  476. const int WrappersTestCases::kUint32WrapperFieldNumber;
  477. const int WrappersTestCases::kBoolWrapperFieldNumber;
  478. const int WrappersTestCases::kStringWrapperFieldNumber;
  479. const int WrappersTestCases::kBytesWrapperFieldNumber;
  480. const int WrappersTestCases::kDoubleWrapperDefaultFieldNumber;
  481. const int WrappersTestCases::kFloatWrapperDefaultFieldNumber;
  482. const int WrappersTestCases::kInt64WrapperDefaultFieldNumber;
  483. const int WrappersTestCases::kUint64WrapperDefaultFieldNumber;
  484. const int WrappersTestCases::kInt32WrapperDefaultFieldNumber;
  485. const int WrappersTestCases::kUint32WrapperDefaultFieldNumber;
  486. const int WrappersTestCases::kBoolWrapperDefaultFieldNumber;
  487. const int WrappersTestCases::kStringWrapperDefaultFieldNumber;
  488. const int WrappersTestCases::kBytesWrapperDefaultFieldNumber;
  489. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  490. WrappersTestCases::WrappersTestCases()
  491. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  492. ::google::protobuf::internal::InitSCC(
  493. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_WrappersTestCases.base);
  494. SharedCtor();
  495. // @@protoc_insertion_point(constructor:google.protobuf.testing.WrappersTestCases)
  496. }
  497. WrappersTestCases::WrappersTestCases(const WrappersTestCases& from)
  498. : ::google::protobuf::Message(),
  499. _internal_metadata_(NULL) {
  500. _internal_metadata_.MergeFrom(from._internal_metadata_);
  501. if (from.has_double_wrapper()) {
  502. double_wrapper_ = new ::google::protobuf::testing::DoubleWrapper(*from.double_wrapper_);
  503. } else {
  504. double_wrapper_ = NULL;
  505. }
  506. if (from.has_float_wrapper()) {
  507. float_wrapper_ = new ::google::protobuf::testing::FloatWrapper(*from.float_wrapper_);
  508. } else {
  509. float_wrapper_ = NULL;
  510. }
  511. if (from.has_int64_wrapper()) {
  512. int64_wrapper_ = new ::google::protobuf::testing::Int64Wrapper(*from.int64_wrapper_);
  513. } else {
  514. int64_wrapper_ = NULL;
  515. }
  516. if (from.has_uint64_wrapper()) {
  517. uint64_wrapper_ = new ::google::protobuf::testing::UInt64Wrapper(*from.uint64_wrapper_);
  518. } else {
  519. uint64_wrapper_ = NULL;
  520. }
  521. if (from.has_int32_wrapper()) {
  522. int32_wrapper_ = new ::google::protobuf::testing::Int32Wrapper(*from.int32_wrapper_);
  523. } else {
  524. int32_wrapper_ = NULL;
  525. }
  526. if (from.has_uint32_wrapper()) {
  527. uint32_wrapper_ = new ::google::protobuf::testing::UInt32Wrapper(*from.uint32_wrapper_);
  528. } else {
  529. uint32_wrapper_ = NULL;
  530. }
  531. if (from.has_bool_wrapper()) {
  532. bool_wrapper_ = new ::google::protobuf::testing::BoolWrapper(*from.bool_wrapper_);
  533. } else {
  534. bool_wrapper_ = NULL;
  535. }
  536. if (from.has_string_wrapper()) {
  537. string_wrapper_ = new ::google::protobuf::testing::StringWrapper(*from.string_wrapper_);
  538. } else {
  539. string_wrapper_ = NULL;
  540. }
  541. if (from.has_bytes_wrapper()) {
  542. bytes_wrapper_ = new ::google::protobuf::testing::BytesWrapper(*from.bytes_wrapper_);
  543. } else {
  544. bytes_wrapper_ = NULL;
  545. }
  546. if (from.has_double_wrapper_default()) {
  547. double_wrapper_default_ = new ::google::protobuf::testing::DoubleWrapper(*from.double_wrapper_default_);
  548. } else {
  549. double_wrapper_default_ = NULL;
  550. }
  551. if (from.has_float_wrapper_default()) {
  552. float_wrapper_default_ = new ::google::protobuf::testing::FloatWrapper(*from.float_wrapper_default_);
  553. } else {
  554. float_wrapper_default_ = NULL;
  555. }
  556. if (from.has_int64_wrapper_default()) {
  557. int64_wrapper_default_ = new ::google::protobuf::testing::Int64Wrapper(*from.int64_wrapper_default_);
  558. } else {
  559. int64_wrapper_default_ = NULL;
  560. }
  561. if (from.has_uint64_wrapper_default()) {
  562. uint64_wrapper_default_ = new ::google::protobuf::testing::UInt64Wrapper(*from.uint64_wrapper_default_);
  563. } else {
  564. uint64_wrapper_default_ = NULL;
  565. }
  566. if (from.has_int32_wrapper_default()) {
  567. int32_wrapper_default_ = new ::google::protobuf::testing::Int32Wrapper(*from.int32_wrapper_default_);
  568. } else {
  569. int32_wrapper_default_ = NULL;
  570. }
  571. if (from.has_uint32_wrapper_default()) {
  572. uint32_wrapper_default_ = new ::google::protobuf::testing::UInt32Wrapper(*from.uint32_wrapper_default_);
  573. } else {
  574. uint32_wrapper_default_ = NULL;
  575. }
  576. if (from.has_bool_wrapper_default()) {
  577. bool_wrapper_default_ = new ::google::protobuf::testing::BoolWrapper(*from.bool_wrapper_default_);
  578. } else {
  579. bool_wrapper_default_ = NULL;
  580. }
  581. if (from.has_string_wrapper_default()) {
  582. string_wrapper_default_ = new ::google::protobuf::testing::StringWrapper(*from.string_wrapper_default_);
  583. } else {
  584. string_wrapper_default_ = NULL;
  585. }
  586. if (from.has_bytes_wrapper_default()) {
  587. bytes_wrapper_default_ = new ::google::protobuf::testing::BytesWrapper(*from.bytes_wrapper_default_);
  588. } else {
  589. bytes_wrapper_default_ = NULL;
  590. }
  591. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.WrappersTestCases)
  592. }
  593. void WrappersTestCases::SharedCtor() {
  594. ::memset(&double_wrapper_, 0, static_cast<size_t>(
  595. reinterpret_cast<char*>(&bytes_wrapper_default_) -
  596. reinterpret_cast<char*>(&double_wrapper_)) + sizeof(bytes_wrapper_default_));
  597. }
  598. WrappersTestCases::~WrappersTestCases() {
  599. // @@protoc_insertion_point(destructor:google.protobuf.testing.WrappersTestCases)
  600. SharedDtor();
  601. }
  602. void WrappersTestCases::SharedDtor() {
  603. if (this != internal_default_instance()) delete double_wrapper_;
  604. if (this != internal_default_instance()) delete float_wrapper_;
  605. if (this != internal_default_instance()) delete int64_wrapper_;
  606. if (this != internal_default_instance()) delete uint64_wrapper_;
  607. if (this != internal_default_instance()) delete int32_wrapper_;
  608. if (this != internal_default_instance()) delete uint32_wrapper_;
  609. if (this != internal_default_instance()) delete bool_wrapper_;
  610. if (this != internal_default_instance()) delete string_wrapper_;
  611. if (this != internal_default_instance()) delete bytes_wrapper_;
  612. if (this != internal_default_instance()) delete double_wrapper_default_;
  613. if (this != internal_default_instance()) delete float_wrapper_default_;
  614. if (this != internal_default_instance()) delete int64_wrapper_default_;
  615. if (this != internal_default_instance()) delete uint64_wrapper_default_;
  616. if (this != internal_default_instance()) delete int32_wrapper_default_;
  617. if (this != internal_default_instance()) delete uint32_wrapper_default_;
  618. if (this != internal_default_instance()) delete bool_wrapper_default_;
  619. if (this != internal_default_instance()) delete string_wrapper_default_;
  620. if (this != internal_default_instance()) delete bytes_wrapper_default_;
  621. }
  622. void WrappersTestCases::SetCachedSize(int size) const {
  623. _cached_size_.Set(size);
  624. }
  625. const ::google::protobuf::Descriptor* WrappersTestCases::descriptor() {
  626. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  627. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  628. }
  629. const WrappersTestCases& WrappersTestCases::default_instance() {
  630. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_WrappersTestCases.base);
  631. return *internal_default_instance();
  632. }
  633. void WrappersTestCases::Clear() {
  634. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.WrappersTestCases)
  635. ::google::protobuf::uint32 cached_has_bits = 0;
  636. // Prevent compiler warnings about cached_has_bits being unused
  637. (void) cached_has_bits;
  638. if (GetArenaNoVirtual() == NULL && double_wrapper_ != NULL) {
  639. delete double_wrapper_;
  640. }
  641. double_wrapper_ = NULL;
  642. if (GetArenaNoVirtual() == NULL && float_wrapper_ != NULL) {
  643. delete float_wrapper_;
  644. }
  645. float_wrapper_ = NULL;
  646. if (GetArenaNoVirtual() == NULL && int64_wrapper_ != NULL) {
  647. delete int64_wrapper_;
  648. }
  649. int64_wrapper_ = NULL;
  650. if (GetArenaNoVirtual() == NULL && uint64_wrapper_ != NULL) {
  651. delete uint64_wrapper_;
  652. }
  653. uint64_wrapper_ = NULL;
  654. if (GetArenaNoVirtual() == NULL && int32_wrapper_ != NULL) {
  655. delete int32_wrapper_;
  656. }
  657. int32_wrapper_ = NULL;
  658. if (GetArenaNoVirtual() == NULL && uint32_wrapper_ != NULL) {
  659. delete uint32_wrapper_;
  660. }
  661. uint32_wrapper_ = NULL;
  662. if (GetArenaNoVirtual() == NULL && bool_wrapper_ != NULL) {
  663. delete bool_wrapper_;
  664. }
  665. bool_wrapper_ = NULL;
  666. if (GetArenaNoVirtual() == NULL && string_wrapper_ != NULL) {
  667. delete string_wrapper_;
  668. }
  669. string_wrapper_ = NULL;
  670. if (GetArenaNoVirtual() == NULL && bytes_wrapper_ != NULL) {
  671. delete bytes_wrapper_;
  672. }
  673. bytes_wrapper_ = NULL;
  674. if (GetArenaNoVirtual() == NULL && double_wrapper_default_ != NULL) {
  675. delete double_wrapper_default_;
  676. }
  677. double_wrapper_default_ = NULL;
  678. if (GetArenaNoVirtual() == NULL && float_wrapper_default_ != NULL) {
  679. delete float_wrapper_default_;
  680. }
  681. float_wrapper_default_ = NULL;
  682. if (GetArenaNoVirtual() == NULL && int64_wrapper_default_ != NULL) {
  683. delete int64_wrapper_default_;
  684. }
  685. int64_wrapper_default_ = NULL;
  686. if (GetArenaNoVirtual() == NULL && uint64_wrapper_default_ != NULL) {
  687. delete uint64_wrapper_default_;
  688. }
  689. uint64_wrapper_default_ = NULL;
  690. if (GetArenaNoVirtual() == NULL && int32_wrapper_default_ != NULL) {
  691. delete int32_wrapper_default_;
  692. }
  693. int32_wrapper_default_ = NULL;
  694. if (GetArenaNoVirtual() == NULL && uint32_wrapper_default_ != NULL) {
  695. delete uint32_wrapper_default_;
  696. }
  697. uint32_wrapper_default_ = NULL;
  698. if (GetArenaNoVirtual() == NULL && bool_wrapper_default_ != NULL) {
  699. delete bool_wrapper_default_;
  700. }
  701. bool_wrapper_default_ = NULL;
  702. if (GetArenaNoVirtual() == NULL && string_wrapper_default_ != NULL) {
  703. delete string_wrapper_default_;
  704. }
  705. string_wrapper_default_ = NULL;
  706. if (GetArenaNoVirtual() == NULL && bytes_wrapper_default_ != NULL) {
  707. delete bytes_wrapper_default_;
  708. }
  709. bytes_wrapper_default_ = NULL;
  710. _internal_metadata_.Clear();
  711. }
  712. bool WrappersTestCases::MergePartialFromCodedStream(
  713. ::google::protobuf::io::CodedInputStream* input) {
  714. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  715. ::google::protobuf::uint32 tag;
  716. // @@protoc_insertion_point(parse_start:google.protobuf.testing.WrappersTestCases)
  717. for (;;) {
  718. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  719. tag = p.first;
  720. if (!p.second) goto handle_unusual;
  721. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  722. // .google.protobuf.testing.DoubleWrapper double_wrapper = 1;
  723. case 1: {
  724. if (static_cast< ::google::protobuf::uint8>(tag) ==
  725. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  726. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  727. input, mutable_double_wrapper()));
  728. } else {
  729. goto handle_unusual;
  730. }
  731. break;
  732. }
  733. // .google.protobuf.testing.FloatWrapper float_wrapper = 2;
  734. case 2: {
  735. if (static_cast< ::google::protobuf::uint8>(tag) ==
  736. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  737. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  738. input, mutable_float_wrapper()));
  739. } else {
  740. goto handle_unusual;
  741. }
  742. break;
  743. }
  744. // .google.protobuf.testing.Int64Wrapper int64_wrapper = 3;
  745. case 3: {
  746. if (static_cast< ::google::protobuf::uint8>(tag) ==
  747. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  748. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  749. input, mutable_int64_wrapper()));
  750. } else {
  751. goto handle_unusual;
  752. }
  753. break;
  754. }
  755. // .google.protobuf.testing.UInt64Wrapper uint64_wrapper = 4;
  756. case 4: {
  757. if (static_cast< ::google::protobuf::uint8>(tag) ==
  758. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  759. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  760. input, mutable_uint64_wrapper()));
  761. } else {
  762. goto handle_unusual;
  763. }
  764. break;
  765. }
  766. // .google.protobuf.testing.Int32Wrapper int32_wrapper = 5;
  767. case 5: {
  768. if (static_cast< ::google::protobuf::uint8>(tag) ==
  769. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  770. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  771. input, mutable_int32_wrapper()));
  772. } else {
  773. goto handle_unusual;
  774. }
  775. break;
  776. }
  777. // .google.protobuf.testing.UInt32Wrapper uint32_wrapper = 6;
  778. case 6: {
  779. if (static_cast< ::google::protobuf::uint8>(tag) ==
  780. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  781. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  782. input, mutable_uint32_wrapper()));
  783. } else {
  784. goto handle_unusual;
  785. }
  786. break;
  787. }
  788. // .google.protobuf.testing.BoolWrapper bool_wrapper = 7;
  789. case 7: {
  790. if (static_cast< ::google::protobuf::uint8>(tag) ==
  791. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  792. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  793. input, mutable_bool_wrapper()));
  794. } else {
  795. goto handle_unusual;
  796. }
  797. break;
  798. }
  799. // .google.protobuf.testing.StringWrapper string_wrapper = 8;
  800. case 8: {
  801. if (static_cast< ::google::protobuf::uint8>(tag) ==
  802. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  803. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  804. input, mutable_string_wrapper()));
  805. } else {
  806. goto handle_unusual;
  807. }
  808. break;
  809. }
  810. // .google.protobuf.testing.BytesWrapper bytes_wrapper = 9;
  811. case 9: {
  812. if (static_cast< ::google::protobuf::uint8>(tag) ==
  813. static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
  814. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  815. input, mutable_bytes_wrapper()));
  816. } else {
  817. goto handle_unusual;
  818. }
  819. break;
  820. }
  821. // .google.protobuf.testing.DoubleWrapper double_wrapper_default = 10;
  822. case 10: {
  823. if (static_cast< ::google::protobuf::uint8>(tag) ==
  824. static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
  825. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  826. input, mutable_double_wrapper_default()));
  827. } else {
  828. goto handle_unusual;
  829. }
  830. break;
  831. }
  832. // .google.protobuf.testing.FloatWrapper float_wrapper_default = 11;
  833. case 11: {
  834. if (static_cast< ::google::protobuf::uint8>(tag) ==
  835. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  836. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  837. input, mutable_float_wrapper_default()));
  838. } else {
  839. goto handle_unusual;
  840. }
  841. break;
  842. }
  843. // .google.protobuf.testing.Int64Wrapper int64_wrapper_default = 12;
  844. case 12: {
  845. if (static_cast< ::google::protobuf::uint8>(tag) ==
  846. static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
  847. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  848. input, mutable_int64_wrapper_default()));
  849. } else {
  850. goto handle_unusual;
  851. }
  852. break;
  853. }
  854. // .google.protobuf.testing.UInt64Wrapper uint64_wrapper_default = 13;
  855. case 13: {
  856. if (static_cast< ::google::protobuf::uint8>(tag) ==
  857. static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
  858. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  859. input, mutable_uint64_wrapper_default()));
  860. } else {
  861. goto handle_unusual;
  862. }
  863. break;
  864. }
  865. // .google.protobuf.testing.Int32Wrapper int32_wrapper_default = 14;
  866. case 14: {
  867. if (static_cast< ::google::protobuf::uint8>(tag) ==
  868. static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
  869. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  870. input, mutable_int32_wrapper_default()));
  871. } else {
  872. goto handle_unusual;
  873. }
  874. break;
  875. }
  876. // .google.protobuf.testing.UInt32Wrapper uint32_wrapper_default = 15;
  877. case 15: {
  878. if (static_cast< ::google::protobuf::uint8>(tag) ==
  879. static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
  880. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  881. input, mutable_uint32_wrapper_default()));
  882. } else {
  883. goto handle_unusual;
  884. }
  885. break;
  886. }
  887. // .google.protobuf.testing.BoolWrapper bool_wrapper_default = 16;
  888. case 16: {
  889. if (static_cast< ::google::protobuf::uint8>(tag) ==
  890. static_cast< ::google::protobuf::uint8>(130u /* 130 & 0xFF */)) {
  891. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  892. input, mutable_bool_wrapper_default()));
  893. } else {
  894. goto handle_unusual;
  895. }
  896. break;
  897. }
  898. // .google.protobuf.testing.StringWrapper string_wrapper_default = 17;
  899. case 17: {
  900. if (static_cast< ::google::protobuf::uint8>(tag) ==
  901. static_cast< ::google::protobuf::uint8>(138u /* 138 & 0xFF */)) {
  902. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  903. input, mutable_string_wrapper_default()));
  904. } else {
  905. goto handle_unusual;
  906. }
  907. break;
  908. }
  909. // .google.protobuf.testing.BytesWrapper bytes_wrapper_default = 18;
  910. case 18: {
  911. if (static_cast< ::google::protobuf::uint8>(tag) ==
  912. static_cast< ::google::protobuf::uint8>(146u /* 146 & 0xFF */)) {
  913. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  914. input, mutable_bytes_wrapper_default()));
  915. } else {
  916. goto handle_unusual;
  917. }
  918. break;
  919. }
  920. default: {
  921. handle_unusual:
  922. if (tag == 0) {
  923. goto success;
  924. }
  925. DO_(::google::protobuf::internal::WireFormat::SkipField(
  926. input, tag, _internal_metadata_.mutable_unknown_fields()));
  927. break;
  928. }
  929. }
  930. }
  931. success:
  932. // @@protoc_insertion_point(parse_success:google.protobuf.testing.WrappersTestCases)
  933. return true;
  934. failure:
  935. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.WrappersTestCases)
  936. return false;
  937. #undef DO_
  938. }
  939. void WrappersTestCases::SerializeWithCachedSizes(
  940. ::google::protobuf::io::CodedOutputStream* output) const {
  941. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.WrappersTestCases)
  942. ::google::protobuf::uint32 cached_has_bits = 0;
  943. (void) cached_has_bits;
  944. // .google.protobuf.testing.DoubleWrapper double_wrapper = 1;
  945. if (this->has_double_wrapper()) {
  946. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  947. 1, this->_internal_double_wrapper(), output);
  948. }
  949. // .google.protobuf.testing.FloatWrapper float_wrapper = 2;
  950. if (this->has_float_wrapper()) {
  951. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  952. 2, this->_internal_float_wrapper(), output);
  953. }
  954. // .google.protobuf.testing.Int64Wrapper int64_wrapper = 3;
  955. if (this->has_int64_wrapper()) {
  956. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  957. 3, this->_internal_int64_wrapper(), output);
  958. }
  959. // .google.protobuf.testing.UInt64Wrapper uint64_wrapper = 4;
  960. if (this->has_uint64_wrapper()) {
  961. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  962. 4, this->_internal_uint64_wrapper(), output);
  963. }
  964. // .google.protobuf.testing.Int32Wrapper int32_wrapper = 5;
  965. if (this->has_int32_wrapper()) {
  966. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  967. 5, this->_internal_int32_wrapper(), output);
  968. }
  969. // .google.protobuf.testing.UInt32Wrapper uint32_wrapper = 6;
  970. if (this->has_uint32_wrapper()) {
  971. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  972. 6, this->_internal_uint32_wrapper(), output);
  973. }
  974. // .google.protobuf.testing.BoolWrapper bool_wrapper = 7;
  975. if (this->has_bool_wrapper()) {
  976. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  977. 7, this->_internal_bool_wrapper(), output);
  978. }
  979. // .google.protobuf.testing.StringWrapper string_wrapper = 8;
  980. if (this->has_string_wrapper()) {
  981. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  982. 8, this->_internal_string_wrapper(), output);
  983. }
  984. // .google.protobuf.testing.BytesWrapper bytes_wrapper = 9;
  985. if (this->has_bytes_wrapper()) {
  986. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  987. 9, this->_internal_bytes_wrapper(), output);
  988. }
  989. // .google.protobuf.testing.DoubleWrapper double_wrapper_default = 10;
  990. if (this->has_double_wrapper_default()) {
  991. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  992. 10, this->_internal_double_wrapper_default(), output);
  993. }
  994. // .google.protobuf.testing.FloatWrapper float_wrapper_default = 11;
  995. if (this->has_float_wrapper_default()) {
  996. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  997. 11, this->_internal_float_wrapper_default(), output);
  998. }
  999. // .google.protobuf.testing.Int64Wrapper int64_wrapper_default = 12;
  1000. if (this->has_int64_wrapper_default()) {
  1001. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1002. 12, this->_internal_int64_wrapper_default(), output);
  1003. }
  1004. // .google.protobuf.testing.UInt64Wrapper uint64_wrapper_default = 13;
  1005. if (this->has_uint64_wrapper_default()) {
  1006. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1007. 13, this->_internal_uint64_wrapper_default(), output);
  1008. }
  1009. // .google.protobuf.testing.Int32Wrapper int32_wrapper_default = 14;
  1010. if (this->has_int32_wrapper_default()) {
  1011. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1012. 14, this->_internal_int32_wrapper_default(), output);
  1013. }
  1014. // .google.protobuf.testing.UInt32Wrapper uint32_wrapper_default = 15;
  1015. if (this->has_uint32_wrapper_default()) {
  1016. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1017. 15, this->_internal_uint32_wrapper_default(), output);
  1018. }
  1019. // .google.protobuf.testing.BoolWrapper bool_wrapper_default = 16;
  1020. if (this->has_bool_wrapper_default()) {
  1021. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1022. 16, this->_internal_bool_wrapper_default(), output);
  1023. }
  1024. // .google.protobuf.testing.StringWrapper string_wrapper_default = 17;
  1025. if (this->has_string_wrapper_default()) {
  1026. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1027. 17, this->_internal_string_wrapper_default(), output);
  1028. }
  1029. // .google.protobuf.testing.BytesWrapper bytes_wrapper_default = 18;
  1030. if (this->has_bytes_wrapper_default()) {
  1031. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1032. 18, this->_internal_bytes_wrapper_default(), output);
  1033. }
  1034. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1035. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1036. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1037. }
  1038. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.WrappersTestCases)
  1039. }
  1040. ::google::protobuf::uint8* WrappersTestCases::InternalSerializeWithCachedSizesToArray(
  1041. bool deterministic, ::google::protobuf::uint8* target) const {
  1042. (void)deterministic; // Unused
  1043. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.WrappersTestCases)
  1044. ::google::protobuf::uint32 cached_has_bits = 0;
  1045. (void) cached_has_bits;
  1046. // .google.protobuf.testing.DoubleWrapper double_wrapper = 1;
  1047. if (this->has_double_wrapper()) {
  1048. target = ::google::protobuf::internal::WireFormatLite::
  1049. InternalWriteMessageToArray(
  1050. 1, this->_internal_double_wrapper(), deterministic, target);
  1051. }
  1052. // .google.protobuf.testing.FloatWrapper float_wrapper = 2;
  1053. if (this->has_float_wrapper()) {
  1054. target = ::google::protobuf::internal::WireFormatLite::
  1055. InternalWriteMessageToArray(
  1056. 2, this->_internal_float_wrapper(), deterministic, target);
  1057. }
  1058. // .google.protobuf.testing.Int64Wrapper int64_wrapper = 3;
  1059. if (this->has_int64_wrapper()) {
  1060. target = ::google::protobuf::internal::WireFormatLite::
  1061. InternalWriteMessageToArray(
  1062. 3, this->_internal_int64_wrapper(), deterministic, target);
  1063. }
  1064. // .google.protobuf.testing.UInt64Wrapper uint64_wrapper = 4;
  1065. if (this->has_uint64_wrapper()) {
  1066. target = ::google::protobuf::internal::WireFormatLite::
  1067. InternalWriteMessageToArray(
  1068. 4, this->_internal_uint64_wrapper(), deterministic, target);
  1069. }
  1070. // .google.protobuf.testing.Int32Wrapper int32_wrapper = 5;
  1071. if (this->has_int32_wrapper()) {
  1072. target = ::google::protobuf::internal::WireFormatLite::
  1073. InternalWriteMessageToArray(
  1074. 5, this->_internal_int32_wrapper(), deterministic, target);
  1075. }
  1076. // .google.protobuf.testing.UInt32Wrapper uint32_wrapper = 6;
  1077. if (this->has_uint32_wrapper()) {
  1078. target = ::google::protobuf::internal::WireFormatLite::
  1079. InternalWriteMessageToArray(
  1080. 6, this->_internal_uint32_wrapper(), deterministic, target);
  1081. }
  1082. // .google.protobuf.testing.BoolWrapper bool_wrapper = 7;
  1083. if (this->has_bool_wrapper()) {
  1084. target = ::google::protobuf::internal::WireFormatLite::
  1085. InternalWriteMessageToArray(
  1086. 7, this->_internal_bool_wrapper(), deterministic, target);
  1087. }
  1088. // .google.protobuf.testing.StringWrapper string_wrapper = 8;
  1089. if (this->has_string_wrapper()) {
  1090. target = ::google::protobuf::internal::WireFormatLite::
  1091. InternalWriteMessageToArray(
  1092. 8, this->_internal_string_wrapper(), deterministic, target);
  1093. }
  1094. // .google.protobuf.testing.BytesWrapper bytes_wrapper = 9;
  1095. if (this->has_bytes_wrapper()) {
  1096. target = ::google::protobuf::internal::WireFormatLite::
  1097. InternalWriteMessageToArray(
  1098. 9, this->_internal_bytes_wrapper(), deterministic, target);
  1099. }
  1100. // .google.protobuf.testing.DoubleWrapper double_wrapper_default = 10;
  1101. if (this->has_double_wrapper_default()) {
  1102. target = ::google::protobuf::internal::WireFormatLite::
  1103. InternalWriteMessageToArray(
  1104. 10, this->_internal_double_wrapper_default(), deterministic, target);
  1105. }
  1106. // .google.protobuf.testing.FloatWrapper float_wrapper_default = 11;
  1107. if (this->has_float_wrapper_default()) {
  1108. target = ::google::protobuf::internal::WireFormatLite::
  1109. InternalWriteMessageToArray(
  1110. 11, this->_internal_float_wrapper_default(), deterministic, target);
  1111. }
  1112. // .google.protobuf.testing.Int64Wrapper int64_wrapper_default = 12;
  1113. if (this->has_int64_wrapper_default()) {
  1114. target = ::google::protobuf::internal::WireFormatLite::
  1115. InternalWriteMessageToArray(
  1116. 12, this->_internal_int64_wrapper_default(), deterministic, target);
  1117. }
  1118. // .google.protobuf.testing.UInt64Wrapper uint64_wrapper_default = 13;
  1119. if (this->has_uint64_wrapper_default()) {
  1120. target = ::google::protobuf::internal::WireFormatLite::
  1121. InternalWriteMessageToArray(
  1122. 13, this->_internal_uint64_wrapper_default(), deterministic, target);
  1123. }
  1124. // .google.protobuf.testing.Int32Wrapper int32_wrapper_default = 14;
  1125. if (this->has_int32_wrapper_default()) {
  1126. target = ::google::protobuf::internal::WireFormatLite::
  1127. InternalWriteMessageToArray(
  1128. 14, this->_internal_int32_wrapper_default(), deterministic, target);
  1129. }
  1130. // .google.protobuf.testing.UInt32Wrapper uint32_wrapper_default = 15;
  1131. if (this->has_uint32_wrapper_default()) {
  1132. target = ::google::protobuf::internal::WireFormatLite::
  1133. InternalWriteMessageToArray(
  1134. 15, this->_internal_uint32_wrapper_default(), deterministic, target);
  1135. }
  1136. // .google.protobuf.testing.BoolWrapper bool_wrapper_default = 16;
  1137. if (this->has_bool_wrapper_default()) {
  1138. target = ::google::protobuf::internal::WireFormatLite::
  1139. InternalWriteMessageToArray(
  1140. 16, this->_internal_bool_wrapper_default(), deterministic, target);
  1141. }
  1142. // .google.protobuf.testing.StringWrapper string_wrapper_default = 17;
  1143. if (this->has_string_wrapper_default()) {
  1144. target = ::google::protobuf::internal::WireFormatLite::
  1145. InternalWriteMessageToArray(
  1146. 17, this->_internal_string_wrapper_default(), deterministic, target);
  1147. }
  1148. // .google.protobuf.testing.BytesWrapper bytes_wrapper_default = 18;
  1149. if (this->has_bytes_wrapper_default()) {
  1150. target = ::google::protobuf::internal::WireFormatLite::
  1151. InternalWriteMessageToArray(
  1152. 18, this->_internal_bytes_wrapper_default(), deterministic, target);
  1153. }
  1154. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1155. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1156. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1157. }
  1158. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.WrappersTestCases)
  1159. return target;
  1160. }
  1161. size_t WrappersTestCases::ByteSizeLong() const {
  1162. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.WrappersTestCases)
  1163. size_t total_size = 0;
  1164. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1165. total_size +=
  1166. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1167. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1168. }
  1169. // .google.protobuf.testing.DoubleWrapper double_wrapper = 1;
  1170. if (this->has_double_wrapper()) {
  1171. total_size += 1 +
  1172. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1173. *double_wrapper_);
  1174. }
  1175. // .google.protobuf.testing.FloatWrapper float_wrapper = 2;
  1176. if (this->has_float_wrapper()) {
  1177. total_size += 1 +
  1178. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1179. *float_wrapper_);
  1180. }
  1181. // .google.protobuf.testing.Int64Wrapper int64_wrapper = 3;
  1182. if (this->has_int64_wrapper()) {
  1183. total_size += 1 +
  1184. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1185. *int64_wrapper_);
  1186. }
  1187. // .google.protobuf.testing.UInt64Wrapper uint64_wrapper = 4;
  1188. if (this->has_uint64_wrapper()) {
  1189. total_size += 1 +
  1190. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1191. *uint64_wrapper_);
  1192. }
  1193. // .google.protobuf.testing.Int32Wrapper int32_wrapper = 5;
  1194. if (this->has_int32_wrapper()) {
  1195. total_size += 1 +
  1196. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1197. *int32_wrapper_);
  1198. }
  1199. // .google.protobuf.testing.UInt32Wrapper uint32_wrapper = 6;
  1200. if (this->has_uint32_wrapper()) {
  1201. total_size += 1 +
  1202. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1203. *uint32_wrapper_);
  1204. }
  1205. // .google.protobuf.testing.BoolWrapper bool_wrapper = 7;
  1206. if (this->has_bool_wrapper()) {
  1207. total_size += 1 +
  1208. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1209. *bool_wrapper_);
  1210. }
  1211. // .google.protobuf.testing.StringWrapper string_wrapper = 8;
  1212. if (this->has_string_wrapper()) {
  1213. total_size += 1 +
  1214. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1215. *string_wrapper_);
  1216. }
  1217. // .google.protobuf.testing.BytesWrapper bytes_wrapper = 9;
  1218. if (this->has_bytes_wrapper()) {
  1219. total_size += 1 +
  1220. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1221. *bytes_wrapper_);
  1222. }
  1223. // .google.protobuf.testing.DoubleWrapper double_wrapper_default = 10;
  1224. if (this->has_double_wrapper_default()) {
  1225. total_size += 1 +
  1226. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1227. *double_wrapper_default_);
  1228. }
  1229. // .google.protobuf.testing.FloatWrapper float_wrapper_default = 11;
  1230. if (this->has_float_wrapper_default()) {
  1231. total_size += 1 +
  1232. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1233. *float_wrapper_default_);
  1234. }
  1235. // .google.protobuf.testing.Int64Wrapper int64_wrapper_default = 12;
  1236. if (this->has_int64_wrapper_default()) {
  1237. total_size += 1 +
  1238. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1239. *int64_wrapper_default_);
  1240. }
  1241. // .google.protobuf.testing.UInt64Wrapper uint64_wrapper_default = 13;
  1242. if (this->has_uint64_wrapper_default()) {
  1243. total_size += 1 +
  1244. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1245. *uint64_wrapper_default_);
  1246. }
  1247. // .google.protobuf.testing.Int32Wrapper int32_wrapper_default = 14;
  1248. if (this->has_int32_wrapper_default()) {
  1249. total_size += 1 +
  1250. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1251. *int32_wrapper_default_);
  1252. }
  1253. // .google.protobuf.testing.UInt32Wrapper uint32_wrapper_default = 15;
  1254. if (this->has_uint32_wrapper_default()) {
  1255. total_size += 1 +
  1256. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1257. *uint32_wrapper_default_);
  1258. }
  1259. // .google.protobuf.testing.BoolWrapper bool_wrapper_default = 16;
  1260. if (this->has_bool_wrapper_default()) {
  1261. total_size += 2 +
  1262. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1263. *bool_wrapper_default_);
  1264. }
  1265. // .google.protobuf.testing.StringWrapper string_wrapper_default = 17;
  1266. if (this->has_string_wrapper_default()) {
  1267. total_size += 2 +
  1268. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1269. *string_wrapper_default_);
  1270. }
  1271. // .google.protobuf.testing.BytesWrapper bytes_wrapper_default = 18;
  1272. if (this->has_bytes_wrapper_default()) {
  1273. total_size += 2 +
  1274. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1275. *bytes_wrapper_default_);
  1276. }
  1277. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1278. SetCachedSize(cached_size);
  1279. return total_size;
  1280. }
  1281. void WrappersTestCases::MergeFrom(const ::google::protobuf::Message& from) {
  1282. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.WrappersTestCases)
  1283. GOOGLE_DCHECK_NE(&from, this);
  1284. const WrappersTestCases* source =
  1285. ::google::protobuf::internal::DynamicCastToGenerated<const WrappersTestCases>(
  1286. &from);
  1287. if (source == NULL) {
  1288. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.WrappersTestCases)
  1289. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1290. } else {
  1291. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.WrappersTestCases)
  1292. MergeFrom(*source);
  1293. }
  1294. }
  1295. void WrappersTestCases::MergeFrom(const WrappersTestCases& from) {
  1296. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.WrappersTestCases)
  1297. GOOGLE_DCHECK_NE(&from, this);
  1298. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1299. ::google::protobuf::uint32 cached_has_bits = 0;
  1300. (void) cached_has_bits;
  1301. if (from.has_double_wrapper()) {
  1302. mutable_double_wrapper()->::google::protobuf::testing::DoubleWrapper::MergeFrom(from.double_wrapper());
  1303. }
  1304. if (from.has_float_wrapper()) {
  1305. mutable_float_wrapper()->::google::protobuf::testing::FloatWrapper::MergeFrom(from.float_wrapper());
  1306. }
  1307. if (from.has_int64_wrapper()) {
  1308. mutable_int64_wrapper()->::google::protobuf::testing::Int64Wrapper::MergeFrom(from.int64_wrapper());
  1309. }
  1310. if (from.has_uint64_wrapper()) {
  1311. mutable_uint64_wrapper()->::google::protobuf::testing::UInt64Wrapper::MergeFrom(from.uint64_wrapper());
  1312. }
  1313. if (from.has_int32_wrapper()) {
  1314. mutable_int32_wrapper()->::google::protobuf::testing::Int32Wrapper::MergeFrom(from.int32_wrapper());
  1315. }
  1316. if (from.has_uint32_wrapper()) {
  1317. mutable_uint32_wrapper()->::google::protobuf::testing::UInt32Wrapper::MergeFrom(from.uint32_wrapper());
  1318. }
  1319. if (from.has_bool_wrapper()) {
  1320. mutable_bool_wrapper()->::google::protobuf::testing::BoolWrapper::MergeFrom(from.bool_wrapper());
  1321. }
  1322. if (from.has_string_wrapper()) {
  1323. mutable_string_wrapper()->::google::protobuf::testing::StringWrapper::MergeFrom(from.string_wrapper());
  1324. }
  1325. if (from.has_bytes_wrapper()) {
  1326. mutable_bytes_wrapper()->::google::protobuf::testing::BytesWrapper::MergeFrom(from.bytes_wrapper());
  1327. }
  1328. if (from.has_double_wrapper_default()) {
  1329. mutable_double_wrapper_default()->::google::protobuf::testing::DoubleWrapper::MergeFrom(from.double_wrapper_default());
  1330. }
  1331. if (from.has_float_wrapper_default()) {
  1332. mutable_float_wrapper_default()->::google::protobuf::testing::FloatWrapper::MergeFrom(from.float_wrapper_default());
  1333. }
  1334. if (from.has_int64_wrapper_default()) {
  1335. mutable_int64_wrapper_default()->::google::protobuf::testing::Int64Wrapper::MergeFrom(from.int64_wrapper_default());
  1336. }
  1337. if (from.has_uint64_wrapper_default()) {
  1338. mutable_uint64_wrapper_default()->::google::protobuf::testing::UInt64Wrapper::MergeFrom(from.uint64_wrapper_default());
  1339. }
  1340. if (from.has_int32_wrapper_default()) {
  1341. mutable_int32_wrapper_default()->::google::protobuf::testing::Int32Wrapper::MergeFrom(from.int32_wrapper_default());
  1342. }
  1343. if (from.has_uint32_wrapper_default()) {
  1344. mutable_uint32_wrapper_default()->::google::protobuf::testing::UInt32Wrapper::MergeFrom(from.uint32_wrapper_default());
  1345. }
  1346. if (from.has_bool_wrapper_default()) {
  1347. mutable_bool_wrapper_default()->::google::protobuf::testing::BoolWrapper::MergeFrom(from.bool_wrapper_default());
  1348. }
  1349. if (from.has_string_wrapper_default()) {
  1350. mutable_string_wrapper_default()->::google::protobuf::testing::StringWrapper::MergeFrom(from.string_wrapper_default());
  1351. }
  1352. if (from.has_bytes_wrapper_default()) {
  1353. mutable_bytes_wrapper_default()->::google::protobuf::testing::BytesWrapper::MergeFrom(from.bytes_wrapper_default());
  1354. }
  1355. }
  1356. void WrappersTestCases::CopyFrom(const ::google::protobuf::Message& from) {
  1357. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.WrappersTestCases)
  1358. if (&from == this) return;
  1359. Clear();
  1360. MergeFrom(from);
  1361. }
  1362. void WrappersTestCases::CopyFrom(const WrappersTestCases& from) {
  1363. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.WrappersTestCases)
  1364. if (&from == this) return;
  1365. Clear();
  1366. MergeFrom(from);
  1367. }
  1368. bool WrappersTestCases::IsInitialized() const {
  1369. return true;
  1370. }
  1371. void WrappersTestCases::Swap(WrappersTestCases* other) {
  1372. if (other == this) return;
  1373. InternalSwap(other);
  1374. }
  1375. void WrappersTestCases::InternalSwap(WrappersTestCases* other) {
  1376. using std::swap;
  1377. swap(double_wrapper_, other->double_wrapper_);
  1378. swap(float_wrapper_, other->float_wrapper_);
  1379. swap(int64_wrapper_, other->int64_wrapper_);
  1380. swap(uint64_wrapper_, other->uint64_wrapper_);
  1381. swap(int32_wrapper_, other->int32_wrapper_);
  1382. swap(uint32_wrapper_, other->uint32_wrapper_);
  1383. swap(bool_wrapper_, other->bool_wrapper_);
  1384. swap(string_wrapper_, other->string_wrapper_);
  1385. swap(bytes_wrapper_, other->bytes_wrapper_);
  1386. swap(double_wrapper_default_, other->double_wrapper_default_);
  1387. swap(float_wrapper_default_, other->float_wrapper_default_);
  1388. swap(int64_wrapper_default_, other->int64_wrapper_default_);
  1389. swap(uint64_wrapper_default_, other->uint64_wrapper_default_);
  1390. swap(int32_wrapper_default_, other->int32_wrapper_default_);
  1391. swap(uint32_wrapper_default_, other->uint32_wrapper_default_);
  1392. swap(bool_wrapper_default_, other->bool_wrapper_default_);
  1393. swap(string_wrapper_default_, other->string_wrapper_default_);
  1394. swap(bytes_wrapper_default_, other->bytes_wrapper_default_);
  1395. _internal_metadata_.Swap(&other->_internal_metadata_);
  1396. }
  1397. ::google::protobuf::Metadata WrappersTestCases::GetMetadata() const {
  1398. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  1399. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
  1400. }
  1401. // ===================================================================
  1402. void DoubleWrapper::InitAsDefaultInstance() {
  1403. ::google::protobuf::testing::_DoubleWrapper_default_instance_._instance.get_mutable()->double__ = const_cast< ::google::protobuf::DoubleValue*>(
  1404. ::google::protobuf::DoubleValue::internal_default_instance());
  1405. }
  1406. void DoubleWrapper::clear_double_() {
  1407. if (GetArenaNoVirtual() == NULL && double__ != NULL) {
  1408. delete double__;
  1409. }
  1410. double__ = NULL;
  1411. }
  1412. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1413. const int DoubleWrapper::kDoubleFieldNumber;
  1414. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1415. DoubleWrapper::DoubleWrapper()
  1416. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1417. ::google::protobuf::internal::InitSCC(
  1418. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_DoubleWrapper.base);
  1419. SharedCtor();
  1420. // @@protoc_insertion_point(constructor:google.protobuf.testing.DoubleWrapper)
  1421. }
  1422. DoubleWrapper::DoubleWrapper(const DoubleWrapper& from)
  1423. : ::google::protobuf::Message(),
  1424. _internal_metadata_(NULL) {
  1425. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1426. if (from.has_double_()) {
  1427. double__ = new ::google::protobuf::DoubleValue(*from.double__);
  1428. } else {
  1429. double__ = NULL;
  1430. }
  1431. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.DoubleWrapper)
  1432. }
  1433. void DoubleWrapper::SharedCtor() {
  1434. double__ = NULL;
  1435. }
  1436. DoubleWrapper::~DoubleWrapper() {
  1437. // @@protoc_insertion_point(destructor:google.protobuf.testing.DoubleWrapper)
  1438. SharedDtor();
  1439. }
  1440. void DoubleWrapper::SharedDtor() {
  1441. if (this != internal_default_instance()) delete double__;
  1442. }
  1443. void DoubleWrapper::SetCachedSize(int size) const {
  1444. _cached_size_.Set(size);
  1445. }
  1446. const ::google::protobuf::Descriptor* DoubleWrapper::descriptor() {
  1447. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  1448. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1449. }
  1450. const DoubleWrapper& DoubleWrapper::default_instance() {
  1451. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_DoubleWrapper.base);
  1452. return *internal_default_instance();
  1453. }
  1454. void DoubleWrapper::Clear() {
  1455. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.DoubleWrapper)
  1456. ::google::protobuf::uint32 cached_has_bits = 0;
  1457. // Prevent compiler warnings about cached_has_bits being unused
  1458. (void) cached_has_bits;
  1459. if (GetArenaNoVirtual() == NULL && double__ != NULL) {
  1460. delete double__;
  1461. }
  1462. double__ = NULL;
  1463. _internal_metadata_.Clear();
  1464. }
  1465. bool DoubleWrapper::MergePartialFromCodedStream(
  1466. ::google::protobuf::io::CodedInputStream* input) {
  1467. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1468. ::google::protobuf::uint32 tag;
  1469. // @@protoc_insertion_point(parse_start:google.protobuf.testing.DoubleWrapper)
  1470. for (;;) {
  1471. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1472. tag = p.first;
  1473. if (!p.second) goto handle_unusual;
  1474. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1475. // .google.protobuf.DoubleValue double = 1;
  1476. case 1: {
  1477. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1478. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1479. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1480. input, mutable_double_()));
  1481. } else {
  1482. goto handle_unusual;
  1483. }
  1484. break;
  1485. }
  1486. default: {
  1487. handle_unusual:
  1488. if (tag == 0) {
  1489. goto success;
  1490. }
  1491. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1492. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1493. break;
  1494. }
  1495. }
  1496. }
  1497. success:
  1498. // @@protoc_insertion_point(parse_success:google.protobuf.testing.DoubleWrapper)
  1499. return true;
  1500. failure:
  1501. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.DoubleWrapper)
  1502. return false;
  1503. #undef DO_
  1504. }
  1505. void DoubleWrapper::SerializeWithCachedSizes(
  1506. ::google::protobuf::io::CodedOutputStream* output) const {
  1507. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.DoubleWrapper)
  1508. ::google::protobuf::uint32 cached_has_bits = 0;
  1509. (void) cached_has_bits;
  1510. // .google.protobuf.DoubleValue double = 1;
  1511. if (this->has_double_()) {
  1512. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1513. 1, this->_internal_double_(), output);
  1514. }
  1515. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1516. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1517. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1518. }
  1519. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.DoubleWrapper)
  1520. }
  1521. ::google::protobuf::uint8* DoubleWrapper::InternalSerializeWithCachedSizesToArray(
  1522. bool deterministic, ::google::protobuf::uint8* target) const {
  1523. (void)deterministic; // Unused
  1524. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.DoubleWrapper)
  1525. ::google::protobuf::uint32 cached_has_bits = 0;
  1526. (void) cached_has_bits;
  1527. // .google.protobuf.DoubleValue double = 1;
  1528. if (this->has_double_()) {
  1529. target = ::google::protobuf::internal::WireFormatLite::
  1530. InternalWriteMessageToArray(
  1531. 1, this->_internal_double_(), deterministic, target);
  1532. }
  1533. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1534. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1535. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1536. }
  1537. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.DoubleWrapper)
  1538. return target;
  1539. }
  1540. size_t DoubleWrapper::ByteSizeLong() const {
  1541. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.DoubleWrapper)
  1542. size_t total_size = 0;
  1543. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1544. total_size +=
  1545. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1546. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1547. }
  1548. // .google.protobuf.DoubleValue double = 1;
  1549. if (this->has_double_()) {
  1550. total_size += 1 +
  1551. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1552. *double__);
  1553. }
  1554. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1555. SetCachedSize(cached_size);
  1556. return total_size;
  1557. }
  1558. void DoubleWrapper::MergeFrom(const ::google::protobuf::Message& from) {
  1559. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.DoubleWrapper)
  1560. GOOGLE_DCHECK_NE(&from, this);
  1561. const DoubleWrapper* source =
  1562. ::google::protobuf::internal::DynamicCastToGenerated<const DoubleWrapper>(
  1563. &from);
  1564. if (source == NULL) {
  1565. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.DoubleWrapper)
  1566. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1567. } else {
  1568. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.DoubleWrapper)
  1569. MergeFrom(*source);
  1570. }
  1571. }
  1572. void DoubleWrapper::MergeFrom(const DoubleWrapper& from) {
  1573. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.DoubleWrapper)
  1574. GOOGLE_DCHECK_NE(&from, this);
  1575. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1576. ::google::protobuf::uint32 cached_has_bits = 0;
  1577. (void) cached_has_bits;
  1578. if (from.has_double_()) {
  1579. mutable_double_()->::google::protobuf::DoubleValue::MergeFrom(from.double_());
  1580. }
  1581. }
  1582. void DoubleWrapper::CopyFrom(const ::google::protobuf::Message& from) {
  1583. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.DoubleWrapper)
  1584. if (&from == this) return;
  1585. Clear();
  1586. MergeFrom(from);
  1587. }
  1588. void DoubleWrapper::CopyFrom(const DoubleWrapper& from) {
  1589. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.DoubleWrapper)
  1590. if (&from == this) return;
  1591. Clear();
  1592. MergeFrom(from);
  1593. }
  1594. bool DoubleWrapper::IsInitialized() const {
  1595. return true;
  1596. }
  1597. void DoubleWrapper::Swap(DoubleWrapper* other) {
  1598. if (other == this) return;
  1599. InternalSwap(other);
  1600. }
  1601. void DoubleWrapper::InternalSwap(DoubleWrapper* other) {
  1602. using std::swap;
  1603. swap(double__, other->double__);
  1604. _internal_metadata_.Swap(&other->_internal_metadata_);
  1605. }
  1606. ::google::protobuf::Metadata DoubleWrapper::GetMetadata() const {
  1607. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  1608. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
  1609. }
  1610. // ===================================================================
  1611. void FloatWrapper::InitAsDefaultInstance() {
  1612. ::google::protobuf::testing::_FloatWrapper_default_instance_._instance.get_mutable()->float__ = const_cast< ::google::protobuf::FloatValue*>(
  1613. ::google::protobuf::FloatValue::internal_default_instance());
  1614. }
  1615. void FloatWrapper::clear_float_() {
  1616. if (GetArenaNoVirtual() == NULL && float__ != NULL) {
  1617. delete float__;
  1618. }
  1619. float__ = NULL;
  1620. }
  1621. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1622. const int FloatWrapper::kFloatFieldNumber;
  1623. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1624. FloatWrapper::FloatWrapper()
  1625. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1626. ::google::protobuf::internal::InitSCC(
  1627. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_FloatWrapper.base);
  1628. SharedCtor();
  1629. // @@protoc_insertion_point(constructor:google.protobuf.testing.FloatWrapper)
  1630. }
  1631. FloatWrapper::FloatWrapper(const FloatWrapper& from)
  1632. : ::google::protobuf::Message(),
  1633. _internal_metadata_(NULL) {
  1634. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1635. if (from.has_float_()) {
  1636. float__ = new ::google::protobuf::FloatValue(*from.float__);
  1637. } else {
  1638. float__ = NULL;
  1639. }
  1640. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.FloatWrapper)
  1641. }
  1642. void FloatWrapper::SharedCtor() {
  1643. float__ = NULL;
  1644. }
  1645. FloatWrapper::~FloatWrapper() {
  1646. // @@protoc_insertion_point(destructor:google.protobuf.testing.FloatWrapper)
  1647. SharedDtor();
  1648. }
  1649. void FloatWrapper::SharedDtor() {
  1650. if (this != internal_default_instance()) delete float__;
  1651. }
  1652. void FloatWrapper::SetCachedSize(int size) const {
  1653. _cached_size_.Set(size);
  1654. }
  1655. const ::google::protobuf::Descriptor* FloatWrapper::descriptor() {
  1656. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  1657. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1658. }
  1659. const FloatWrapper& FloatWrapper::default_instance() {
  1660. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_FloatWrapper.base);
  1661. return *internal_default_instance();
  1662. }
  1663. void FloatWrapper::Clear() {
  1664. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.FloatWrapper)
  1665. ::google::protobuf::uint32 cached_has_bits = 0;
  1666. // Prevent compiler warnings about cached_has_bits being unused
  1667. (void) cached_has_bits;
  1668. if (GetArenaNoVirtual() == NULL && float__ != NULL) {
  1669. delete float__;
  1670. }
  1671. float__ = NULL;
  1672. _internal_metadata_.Clear();
  1673. }
  1674. bool FloatWrapper::MergePartialFromCodedStream(
  1675. ::google::protobuf::io::CodedInputStream* input) {
  1676. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1677. ::google::protobuf::uint32 tag;
  1678. // @@protoc_insertion_point(parse_start:google.protobuf.testing.FloatWrapper)
  1679. for (;;) {
  1680. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1681. tag = p.first;
  1682. if (!p.second) goto handle_unusual;
  1683. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1684. // .google.protobuf.FloatValue float = 1;
  1685. case 1: {
  1686. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1687. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1688. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1689. input, mutable_float_()));
  1690. } else {
  1691. goto handle_unusual;
  1692. }
  1693. break;
  1694. }
  1695. default: {
  1696. handle_unusual:
  1697. if (tag == 0) {
  1698. goto success;
  1699. }
  1700. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1701. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1702. break;
  1703. }
  1704. }
  1705. }
  1706. success:
  1707. // @@protoc_insertion_point(parse_success:google.protobuf.testing.FloatWrapper)
  1708. return true;
  1709. failure:
  1710. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.FloatWrapper)
  1711. return false;
  1712. #undef DO_
  1713. }
  1714. void FloatWrapper::SerializeWithCachedSizes(
  1715. ::google::protobuf::io::CodedOutputStream* output) const {
  1716. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.FloatWrapper)
  1717. ::google::protobuf::uint32 cached_has_bits = 0;
  1718. (void) cached_has_bits;
  1719. // .google.protobuf.FloatValue float = 1;
  1720. if (this->has_float_()) {
  1721. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1722. 1, this->_internal_float_(), output);
  1723. }
  1724. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1725. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1726. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1727. }
  1728. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.FloatWrapper)
  1729. }
  1730. ::google::protobuf::uint8* FloatWrapper::InternalSerializeWithCachedSizesToArray(
  1731. bool deterministic, ::google::protobuf::uint8* target) const {
  1732. (void)deterministic; // Unused
  1733. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.FloatWrapper)
  1734. ::google::protobuf::uint32 cached_has_bits = 0;
  1735. (void) cached_has_bits;
  1736. // .google.protobuf.FloatValue float = 1;
  1737. if (this->has_float_()) {
  1738. target = ::google::protobuf::internal::WireFormatLite::
  1739. InternalWriteMessageToArray(
  1740. 1, this->_internal_float_(), deterministic, target);
  1741. }
  1742. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1743. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1744. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1745. }
  1746. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.FloatWrapper)
  1747. return target;
  1748. }
  1749. size_t FloatWrapper::ByteSizeLong() const {
  1750. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.FloatWrapper)
  1751. size_t total_size = 0;
  1752. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1753. total_size +=
  1754. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1755. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1756. }
  1757. // .google.protobuf.FloatValue float = 1;
  1758. if (this->has_float_()) {
  1759. total_size += 1 +
  1760. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1761. *float__);
  1762. }
  1763. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1764. SetCachedSize(cached_size);
  1765. return total_size;
  1766. }
  1767. void FloatWrapper::MergeFrom(const ::google::protobuf::Message& from) {
  1768. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.FloatWrapper)
  1769. GOOGLE_DCHECK_NE(&from, this);
  1770. const FloatWrapper* source =
  1771. ::google::protobuf::internal::DynamicCastToGenerated<const FloatWrapper>(
  1772. &from);
  1773. if (source == NULL) {
  1774. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.FloatWrapper)
  1775. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1776. } else {
  1777. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.FloatWrapper)
  1778. MergeFrom(*source);
  1779. }
  1780. }
  1781. void FloatWrapper::MergeFrom(const FloatWrapper& from) {
  1782. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.FloatWrapper)
  1783. GOOGLE_DCHECK_NE(&from, this);
  1784. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1785. ::google::protobuf::uint32 cached_has_bits = 0;
  1786. (void) cached_has_bits;
  1787. if (from.has_float_()) {
  1788. mutable_float_()->::google::protobuf::FloatValue::MergeFrom(from.float_());
  1789. }
  1790. }
  1791. void FloatWrapper::CopyFrom(const ::google::protobuf::Message& from) {
  1792. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.FloatWrapper)
  1793. if (&from == this) return;
  1794. Clear();
  1795. MergeFrom(from);
  1796. }
  1797. void FloatWrapper::CopyFrom(const FloatWrapper& from) {
  1798. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.FloatWrapper)
  1799. if (&from == this) return;
  1800. Clear();
  1801. MergeFrom(from);
  1802. }
  1803. bool FloatWrapper::IsInitialized() const {
  1804. return true;
  1805. }
  1806. void FloatWrapper::Swap(FloatWrapper* other) {
  1807. if (other == this) return;
  1808. InternalSwap(other);
  1809. }
  1810. void FloatWrapper::InternalSwap(FloatWrapper* other) {
  1811. using std::swap;
  1812. swap(float__, other->float__);
  1813. _internal_metadata_.Swap(&other->_internal_metadata_);
  1814. }
  1815. ::google::protobuf::Metadata FloatWrapper::GetMetadata() const {
  1816. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  1817. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
  1818. }
  1819. // ===================================================================
  1820. void Int64Wrapper::InitAsDefaultInstance() {
  1821. ::google::protobuf::testing::_Int64Wrapper_default_instance_._instance.get_mutable()->int64_ = const_cast< ::google::protobuf::Int64Value*>(
  1822. ::google::protobuf::Int64Value::internal_default_instance());
  1823. }
  1824. void Int64Wrapper::clear_int64() {
  1825. if (GetArenaNoVirtual() == NULL && int64_ != NULL) {
  1826. delete int64_;
  1827. }
  1828. int64_ = NULL;
  1829. }
  1830. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1831. const int Int64Wrapper::kInt64FieldNumber;
  1832. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1833. Int64Wrapper::Int64Wrapper()
  1834. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1835. ::google::protobuf::internal::InitSCC(
  1836. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_Int64Wrapper.base);
  1837. SharedCtor();
  1838. // @@protoc_insertion_point(constructor:google.protobuf.testing.Int64Wrapper)
  1839. }
  1840. Int64Wrapper::Int64Wrapper(const Int64Wrapper& from)
  1841. : ::google::protobuf::Message(),
  1842. _internal_metadata_(NULL) {
  1843. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1844. if (from.has_int64()) {
  1845. int64_ = new ::google::protobuf::Int64Value(*from.int64_);
  1846. } else {
  1847. int64_ = NULL;
  1848. }
  1849. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.Int64Wrapper)
  1850. }
  1851. void Int64Wrapper::SharedCtor() {
  1852. int64_ = NULL;
  1853. }
  1854. Int64Wrapper::~Int64Wrapper() {
  1855. // @@protoc_insertion_point(destructor:google.protobuf.testing.Int64Wrapper)
  1856. SharedDtor();
  1857. }
  1858. void Int64Wrapper::SharedDtor() {
  1859. if (this != internal_default_instance()) delete int64_;
  1860. }
  1861. void Int64Wrapper::SetCachedSize(int size) const {
  1862. _cached_size_.Set(size);
  1863. }
  1864. const ::google::protobuf::Descriptor* Int64Wrapper::descriptor() {
  1865. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  1866. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1867. }
  1868. const Int64Wrapper& Int64Wrapper::default_instance() {
  1869. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_Int64Wrapper.base);
  1870. return *internal_default_instance();
  1871. }
  1872. void Int64Wrapper::Clear() {
  1873. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.Int64Wrapper)
  1874. ::google::protobuf::uint32 cached_has_bits = 0;
  1875. // Prevent compiler warnings about cached_has_bits being unused
  1876. (void) cached_has_bits;
  1877. if (GetArenaNoVirtual() == NULL && int64_ != NULL) {
  1878. delete int64_;
  1879. }
  1880. int64_ = NULL;
  1881. _internal_metadata_.Clear();
  1882. }
  1883. bool Int64Wrapper::MergePartialFromCodedStream(
  1884. ::google::protobuf::io::CodedInputStream* input) {
  1885. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1886. ::google::protobuf::uint32 tag;
  1887. // @@protoc_insertion_point(parse_start:google.protobuf.testing.Int64Wrapper)
  1888. for (;;) {
  1889. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1890. tag = p.first;
  1891. if (!p.second) goto handle_unusual;
  1892. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1893. // .google.protobuf.Int64Value int64 = 1;
  1894. case 1: {
  1895. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1896. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1897. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1898. input, mutable_int64()));
  1899. } else {
  1900. goto handle_unusual;
  1901. }
  1902. break;
  1903. }
  1904. default: {
  1905. handle_unusual:
  1906. if (tag == 0) {
  1907. goto success;
  1908. }
  1909. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1910. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1911. break;
  1912. }
  1913. }
  1914. }
  1915. success:
  1916. // @@protoc_insertion_point(parse_success:google.protobuf.testing.Int64Wrapper)
  1917. return true;
  1918. failure:
  1919. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.Int64Wrapper)
  1920. return false;
  1921. #undef DO_
  1922. }
  1923. void Int64Wrapper::SerializeWithCachedSizes(
  1924. ::google::protobuf::io::CodedOutputStream* output) const {
  1925. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.Int64Wrapper)
  1926. ::google::protobuf::uint32 cached_has_bits = 0;
  1927. (void) cached_has_bits;
  1928. // .google.protobuf.Int64Value int64 = 1;
  1929. if (this->has_int64()) {
  1930. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1931. 1, this->_internal_int64(), output);
  1932. }
  1933. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1934. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1935. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1936. }
  1937. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.Int64Wrapper)
  1938. }
  1939. ::google::protobuf::uint8* Int64Wrapper::InternalSerializeWithCachedSizesToArray(
  1940. bool deterministic, ::google::protobuf::uint8* target) const {
  1941. (void)deterministic; // Unused
  1942. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.Int64Wrapper)
  1943. ::google::protobuf::uint32 cached_has_bits = 0;
  1944. (void) cached_has_bits;
  1945. // .google.protobuf.Int64Value int64 = 1;
  1946. if (this->has_int64()) {
  1947. target = ::google::protobuf::internal::WireFormatLite::
  1948. InternalWriteMessageToArray(
  1949. 1, this->_internal_int64(), deterministic, target);
  1950. }
  1951. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1952. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1953. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1954. }
  1955. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.Int64Wrapper)
  1956. return target;
  1957. }
  1958. size_t Int64Wrapper::ByteSizeLong() const {
  1959. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.Int64Wrapper)
  1960. size_t total_size = 0;
  1961. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1962. total_size +=
  1963. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1964. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1965. }
  1966. // .google.protobuf.Int64Value int64 = 1;
  1967. if (this->has_int64()) {
  1968. total_size += 1 +
  1969. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1970. *int64_);
  1971. }
  1972. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1973. SetCachedSize(cached_size);
  1974. return total_size;
  1975. }
  1976. void Int64Wrapper::MergeFrom(const ::google::protobuf::Message& from) {
  1977. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.Int64Wrapper)
  1978. GOOGLE_DCHECK_NE(&from, this);
  1979. const Int64Wrapper* source =
  1980. ::google::protobuf::internal::DynamicCastToGenerated<const Int64Wrapper>(
  1981. &from);
  1982. if (source == NULL) {
  1983. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.Int64Wrapper)
  1984. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1985. } else {
  1986. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.Int64Wrapper)
  1987. MergeFrom(*source);
  1988. }
  1989. }
  1990. void Int64Wrapper::MergeFrom(const Int64Wrapper& from) {
  1991. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.Int64Wrapper)
  1992. GOOGLE_DCHECK_NE(&from, this);
  1993. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1994. ::google::protobuf::uint32 cached_has_bits = 0;
  1995. (void) cached_has_bits;
  1996. if (from.has_int64()) {
  1997. mutable_int64()->::google::protobuf::Int64Value::MergeFrom(from.int64());
  1998. }
  1999. }
  2000. void Int64Wrapper::CopyFrom(const ::google::protobuf::Message& from) {
  2001. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.Int64Wrapper)
  2002. if (&from == this) return;
  2003. Clear();
  2004. MergeFrom(from);
  2005. }
  2006. void Int64Wrapper::CopyFrom(const Int64Wrapper& from) {
  2007. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.Int64Wrapper)
  2008. if (&from == this) return;
  2009. Clear();
  2010. MergeFrom(from);
  2011. }
  2012. bool Int64Wrapper::IsInitialized() const {
  2013. return true;
  2014. }
  2015. void Int64Wrapper::Swap(Int64Wrapper* other) {
  2016. if (other == this) return;
  2017. InternalSwap(other);
  2018. }
  2019. void Int64Wrapper::InternalSwap(Int64Wrapper* other) {
  2020. using std::swap;
  2021. swap(int64_, other->int64_);
  2022. _internal_metadata_.Swap(&other->_internal_metadata_);
  2023. }
  2024. ::google::protobuf::Metadata Int64Wrapper::GetMetadata() const {
  2025. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  2026. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
  2027. }
  2028. // ===================================================================
  2029. void UInt64Wrapper::InitAsDefaultInstance() {
  2030. ::google::protobuf::testing::_UInt64Wrapper_default_instance_._instance.get_mutable()->uint64_ = const_cast< ::google::protobuf::UInt64Value*>(
  2031. ::google::protobuf::UInt64Value::internal_default_instance());
  2032. }
  2033. void UInt64Wrapper::clear_uint64() {
  2034. if (GetArenaNoVirtual() == NULL && uint64_ != NULL) {
  2035. delete uint64_;
  2036. }
  2037. uint64_ = NULL;
  2038. }
  2039. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2040. const int UInt64Wrapper::kUint64FieldNumber;
  2041. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2042. UInt64Wrapper::UInt64Wrapper()
  2043. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2044. ::google::protobuf::internal::InitSCC(
  2045. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_UInt64Wrapper.base);
  2046. SharedCtor();
  2047. // @@protoc_insertion_point(constructor:google.protobuf.testing.UInt64Wrapper)
  2048. }
  2049. UInt64Wrapper::UInt64Wrapper(const UInt64Wrapper& from)
  2050. : ::google::protobuf::Message(),
  2051. _internal_metadata_(NULL) {
  2052. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2053. if (from.has_uint64()) {
  2054. uint64_ = new ::google::protobuf::UInt64Value(*from.uint64_);
  2055. } else {
  2056. uint64_ = NULL;
  2057. }
  2058. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.UInt64Wrapper)
  2059. }
  2060. void UInt64Wrapper::SharedCtor() {
  2061. uint64_ = NULL;
  2062. }
  2063. UInt64Wrapper::~UInt64Wrapper() {
  2064. // @@protoc_insertion_point(destructor:google.protobuf.testing.UInt64Wrapper)
  2065. SharedDtor();
  2066. }
  2067. void UInt64Wrapper::SharedDtor() {
  2068. if (this != internal_default_instance()) delete uint64_;
  2069. }
  2070. void UInt64Wrapper::SetCachedSize(int size) const {
  2071. _cached_size_.Set(size);
  2072. }
  2073. const ::google::protobuf::Descriptor* UInt64Wrapper::descriptor() {
  2074. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  2075. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2076. }
  2077. const UInt64Wrapper& UInt64Wrapper::default_instance() {
  2078. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_UInt64Wrapper.base);
  2079. return *internal_default_instance();
  2080. }
  2081. void UInt64Wrapper::Clear() {
  2082. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.UInt64Wrapper)
  2083. ::google::protobuf::uint32 cached_has_bits = 0;
  2084. // Prevent compiler warnings about cached_has_bits being unused
  2085. (void) cached_has_bits;
  2086. if (GetArenaNoVirtual() == NULL && uint64_ != NULL) {
  2087. delete uint64_;
  2088. }
  2089. uint64_ = NULL;
  2090. _internal_metadata_.Clear();
  2091. }
  2092. bool UInt64Wrapper::MergePartialFromCodedStream(
  2093. ::google::protobuf::io::CodedInputStream* input) {
  2094. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2095. ::google::protobuf::uint32 tag;
  2096. // @@protoc_insertion_point(parse_start:google.protobuf.testing.UInt64Wrapper)
  2097. for (;;) {
  2098. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2099. tag = p.first;
  2100. if (!p.second) goto handle_unusual;
  2101. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2102. // .google.protobuf.UInt64Value uint64 = 1;
  2103. case 1: {
  2104. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2105. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2106. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2107. input, mutable_uint64()));
  2108. } else {
  2109. goto handle_unusual;
  2110. }
  2111. break;
  2112. }
  2113. default: {
  2114. handle_unusual:
  2115. if (tag == 0) {
  2116. goto success;
  2117. }
  2118. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2119. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2120. break;
  2121. }
  2122. }
  2123. }
  2124. success:
  2125. // @@protoc_insertion_point(parse_success:google.protobuf.testing.UInt64Wrapper)
  2126. return true;
  2127. failure:
  2128. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.UInt64Wrapper)
  2129. return false;
  2130. #undef DO_
  2131. }
  2132. void UInt64Wrapper::SerializeWithCachedSizes(
  2133. ::google::protobuf::io::CodedOutputStream* output) const {
  2134. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.UInt64Wrapper)
  2135. ::google::protobuf::uint32 cached_has_bits = 0;
  2136. (void) cached_has_bits;
  2137. // .google.protobuf.UInt64Value uint64 = 1;
  2138. if (this->has_uint64()) {
  2139. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2140. 1, this->_internal_uint64(), output);
  2141. }
  2142. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2143. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2144. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2145. }
  2146. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.UInt64Wrapper)
  2147. }
  2148. ::google::protobuf::uint8* UInt64Wrapper::InternalSerializeWithCachedSizesToArray(
  2149. bool deterministic, ::google::protobuf::uint8* target) const {
  2150. (void)deterministic; // Unused
  2151. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.UInt64Wrapper)
  2152. ::google::protobuf::uint32 cached_has_bits = 0;
  2153. (void) cached_has_bits;
  2154. // .google.protobuf.UInt64Value uint64 = 1;
  2155. if (this->has_uint64()) {
  2156. target = ::google::protobuf::internal::WireFormatLite::
  2157. InternalWriteMessageToArray(
  2158. 1, this->_internal_uint64(), deterministic, target);
  2159. }
  2160. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2161. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2162. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2163. }
  2164. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.UInt64Wrapper)
  2165. return target;
  2166. }
  2167. size_t UInt64Wrapper::ByteSizeLong() const {
  2168. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.UInt64Wrapper)
  2169. size_t total_size = 0;
  2170. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2171. total_size +=
  2172. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2173. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2174. }
  2175. // .google.protobuf.UInt64Value uint64 = 1;
  2176. if (this->has_uint64()) {
  2177. total_size += 1 +
  2178. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2179. *uint64_);
  2180. }
  2181. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2182. SetCachedSize(cached_size);
  2183. return total_size;
  2184. }
  2185. void UInt64Wrapper::MergeFrom(const ::google::protobuf::Message& from) {
  2186. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.UInt64Wrapper)
  2187. GOOGLE_DCHECK_NE(&from, this);
  2188. const UInt64Wrapper* source =
  2189. ::google::protobuf::internal::DynamicCastToGenerated<const UInt64Wrapper>(
  2190. &from);
  2191. if (source == NULL) {
  2192. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.UInt64Wrapper)
  2193. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2194. } else {
  2195. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.UInt64Wrapper)
  2196. MergeFrom(*source);
  2197. }
  2198. }
  2199. void UInt64Wrapper::MergeFrom(const UInt64Wrapper& from) {
  2200. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.UInt64Wrapper)
  2201. GOOGLE_DCHECK_NE(&from, this);
  2202. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2203. ::google::protobuf::uint32 cached_has_bits = 0;
  2204. (void) cached_has_bits;
  2205. if (from.has_uint64()) {
  2206. mutable_uint64()->::google::protobuf::UInt64Value::MergeFrom(from.uint64());
  2207. }
  2208. }
  2209. void UInt64Wrapper::CopyFrom(const ::google::protobuf::Message& from) {
  2210. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.UInt64Wrapper)
  2211. if (&from == this) return;
  2212. Clear();
  2213. MergeFrom(from);
  2214. }
  2215. void UInt64Wrapper::CopyFrom(const UInt64Wrapper& from) {
  2216. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.UInt64Wrapper)
  2217. if (&from == this) return;
  2218. Clear();
  2219. MergeFrom(from);
  2220. }
  2221. bool UInt64Wrapper::IsInitialized() const {
  2222. return true;
  2223. }
  2224. void UInt64Wrapper::Swap(UInt64Wrapper* other) {
  2225. if (other == this) return;
  2226. InternalSwap(other);
  2227. }
  2228. void UInt64Wrapper::InternalSwap(UInt64Wrapper* other) {
  2229. using std::swap;
  2230. swap(uint64_, other->uint64_);
  2231. _internal_metadata_.Swap(&other->_internal_metadata_);
  2232. }
  2233. ::google::protobuf::Metadata UInt64Wrapper::GetMetadata() const {
  2234. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  2235. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
  2236. }
  2237. // ===================================================================
  2238. void Int32Wrapper::InitAsDefaultInstance() {
  2239. ::google::protobuf::testing::_Int32Wrapper_default_instance_._instance.get_mutable()->int32_ = const_cast< ::google::protobuf::Int32Value*>(
  2240. ::google::protobuf::Int32Value::internal_default_instance());
  2241. }
  2242. void Int32Wrapper::clear_int32() {
  2243. if (GetArenaNoVirtual() == NULL && int32_ != NULL) {
  2244. delete int32_;
  2245. }
  2246. int32_ = NULL;
  2247. }
  2248. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2249. const int Int32Wrapper::kInt32FieldNumber;
  2250. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2251. Int32Wrapper::Int32Wrapper()
  2252. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2253. ::google::protobuf::internal::InitSCC(
  2254. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_Int32Wrapper.base);
  2255. SharedCtor();
  2256. // @@protoc_insertion_point(constructor:google.protobuf.testing.Int32Wrapper)
  2257. }
  2258. Int32Wrapper::Int32Wrapper(const Int32Wrapper& from)
  2259. : ::google::protobuf::Message(),
  2260. _internal_metadata_(NULL) {
  2261. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2262. if (from.has_int32()) {
  2263. int32_ = new ::google::protobuf::Int32Value(*from.int32_);
  2264. } else {
  2265. int32_ = NULL;
  2266. }
  2267. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.Int32Wrapper)
  2268. }
  2269. void Int32Wrapper::SharedCtor() {
  2270. int32_ = NULL;
  2271. }
  2272. Int32Wrapper::~Int32Wrapper() {
  2273. // @@protoc_insertion_point(destructor:google.protobuf.testing.Int32Wrapper)
  2274. SharedDtor();
  2275. }
  2276. void Int32Wrapper::SharedDtor() {
  2277. if (this != internal_default_instance()) delete int32_;
  2278. }
  2279. void Int32Wrapper::SetCachedSize(int size) const {
  2280. _cached_size_.Set(size);
  2281. }
  2282. const ::google::protobuf::Descriptor* Int32Wrapper::descriptor() {
  2283. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  2284. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2285. }
  2286. const Int32Wrapper& Int32Wrapper::default_instance() {
  2287. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_Int32Wrapper.base);
  2288. return *internal_default_instance();
  2289. }
  2290. void Int32Wrapper::Clear() {
  2291. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.Int32Wrapper)
  2292. ::google::protobuf::uint32 cached_has_bits = 0;
  2293. // Prevent compiler warnings about cached_has_bits being unused
  2294. (void) cached_has_bits;
  2295. if (GetArenaNoVirtual() == NULL && int32_ != NULL) {
  2296. delete int32_;
  2297. }
  2298. int32_ = NULL;
  2299. _internal_metadata_.Clear();
  2300. }
  2301. bool Int32Wrapper::MergePartialFromCodedStream(
  2302. ::google::protobuf::io::CodedInputStream* input) {
  2303. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2304. ::google::protobuf::uint32 tag;
  2305. // @@protoc_insertion_point(parse_start:google.protobuf.testing.Int32Wrapper)
  2306. for (;;) {
  2307. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2308. tag = p.first;
  2309. if (!p.second) goto handle_unusual;
  2310. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2311. // .google.protobuf.Int32Value int32 = 1;
  2312. case 1: {
  2313. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2314. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2315. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2316. input, mutable_int32()));
  2317. } else {
  2318. goto handle_unusual;
  2319. }
  2320. break;
  2321. }
  2322. default: {
  2323. handle_unusual:
  2324. if (tag == 0) {
  2325. goto success;
  2326. }
  2327. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2328. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2329. break;
  2330. }
  2331. }
  2332. }
  2333. success:
  2334. // @@protoc_insertion_point(parse_success:google.protobuf.testing.Int32Wrapper)
  2335. return true;
  2336. failure:
  2337. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.Int32Wrapper)
  2338. return false;
  2339. #undef DO_
  2340. }
  2341. void Int32Wrapper::SerializeWithCachedSizes(
  2342. ::google::protobuf::io::CodedOutputStream* output) const {
  2343. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.Int32Wrapper)
  2344. ::google::protobuf::uint32 cached_has_bits = 0;
  2345. (void) cached_has_bits;
  2346. // .google.protobuf.Int32Value int32 = 1;
  2347. if (this->has_int32()) {
  2348. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2349. 1, this->_internal_int32(), output);
  2350. }
  2351. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2352. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2353. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2354. }
  2355. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.Int32Wrapper)
  2356. }
  2357. ::google::protobuf::uint8* Int32Wrapper::InternalSerializeWithCachedSizesToArray(
  2358. bool deterministic, ::google::protobuf::uint8* target) const {
  2359. (void)deterministic; // Unused
  2360. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.Int32Wrapper)
  2361. ::google::protobuf::uint32 cached_has_bits = 0;
  2362. (void) cached_has_bits;
  2363. // .google.protobuf.Int32Value int32 = 1;
  2364. if (this->has_int32()) {
  2365. target = ::google::protobuf::internal::WireFormatLite::
  2366. InternalWriteMessageToArray(
  2367. 1, this->_internal_int32(), deterministic, target);
  2368. }
  2369. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2370. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2371. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2372. }
  2373. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.Int32Wrapper)
  2374. return target;
  2375. }
  2376. size_t Int32Wrapper::ByteSizeLong() const {
  2377. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.Int32Wrapper)
  2378. size_t total_size = 0;
  2379. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2380. total_size +=
  2381. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2382. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2383. }
  2384. // .google.protobuf.Int32Value int32 = 1;
  2385. if (this->has_int32()) {
  2386. total_size += 1 +
  2387. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2388. *int32_);
  2389. }
  2390. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2391. SetCachedSize(cached_size);
  2392. return total_size;
  2393. }
  2394. void Int32Wrapper::MergeFrom(const ::google::protobuf::Message& from) {
  2395. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.Int32Wrapper)
  2396. GOOGLE_DCHECK_NE(&from, this);
  2397. const Int32Wrapper* source =
  2398. ::google::protobuf::internal::DynamicCastToGenerated<const Int32Wrapper>(
  2399. &from);
  2400. if (source == NULL) {
  2401. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.Int32Wrapper)
  2402. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2403. } else {
  2404. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.Int32Wrapper)
  2405. MergeFrom(*source);
  2406. }
  2407. }
  2408. void Int32Wrapper::MergeFrom(const Int32Wrapper& from) {
  2409. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.Int32Wrapper)
  2410. GOOGLE_DCHECK_NE(&from, this);
  2411. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2412. ::google::protobuf::uint32 cached_has_bits = 0;
  2413. (void) cached_has_bits;
  2414. if (from.has_int32()) {
  2415. mutable_int32()->::google::protobuf::Int32Value::MergeFrom(from.int32());
  2416. }
  2417. }
  2418. void Int32Wrapper::CopyFrom(const ::google::protobuf::Message& from) {
  2419. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.Int32Wrapper)
  2420. if (&from == this) return;
  2421. Clear();
  2422. MergeFrom(from);
  2423. }
  2424. void Int32Wrapper::CopyFrom(const Int32Wrapper& from) {
  2425. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.Int32Wrapper)
  2426. if (&from == this) return;
  2427. Clear();
  2428. MergeFrom(from);
  2429. }
  2430. bool Int32Wrapper::IsInitialized() const {
  2431. return true;
  2432. }
  2433. void Int32Wrapper::Swap(Int32Wrapper* other) {
  2434. if (other == this) return;
  2435. InternalSwap(other);
  2436. }
  2437. void Int32Wrapper::InternalSwap(Int32Wrapper* other) {
  2438. using std::swap;
  2439. swap(int32_, other->int32_);
  2440. _internal_metadata_.Swap(&other->_internal_metadata_);
  2441. }
  2442. ::google::protobuf::Metadata Int32Wrapper::GetMetadata() const {
  2443. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  2444. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
  2445. }
  2446. // ===================================================================
  2447. void UInt32Wrapper::InitAsDefaultInstance() {
  2448. ::google::protobuf::testing::_UInt32Wrapper_default_instance_._instance.get_mutable()->uint32_ = const_cast< ::google::protobuf::UInt32Value*>(
  2449. ::google::protobuf::UInt32Value::internal_default_instance());
  2450. }
  2451. void UInt32Wrapper::clear_uint32() {
  2452. if (GetArenaNoVirtual() == NULL && uint32_ != NULL) {
  2453. delete uint32_;
  2454. }
  2455. uint32_ = NULL;
  2456. }
  2457. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2458. const int UInt32Wrapper::kUint32FieldNumber;
  2459. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2460. UInt32Wrapper::UInt32Wrapper()
  2461. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2462. ::google::protobuf::internal::InitSCC(
  2463. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_UInt32Wrapper.base);
  2464. SharedCtor();
  2465. // @@protoc_insertion_point(constructor:google.protobuf.testing.UInt32Wrapper)
  2466. }
  2467. UInt32Wrapper::UInt32Wrapper(const UInt32Wrapper& from)
  2468. : ::google::protobuf::Message(),
  2469. _internal_metadata_(NULL) {
  2470. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2471. if (from.has_uint32()) {
  2472. uint32_ = new ::google::protobuf::UInt32Value(*from.uint32_);
  2473. } else {
  2474. uint32_ = NULL;
  2475. }
  2476. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.UInt32Wrapper)
  2477. }
  2478. void UInt32Wrapper::SharedCtor() {
  2479. uint32_ = NULL;
  2480. }
  2481. UInt32Wrapper::~UInt32Wrapper() {
  2482. // @@protoc_insertion_point(destructor:google.protobuf.testing.UInt32Wrapper)
  2483. SharedDtor();
  2484. }
  2485. void UInt32Wrapper::SharedDtor() {
  2486. if (this != internal_default_instance()) delete uint32_;
  2487. }
  2488. void UInt32Wrapper::SetCachedSize(int size) const {
  2489. _cached_size_.Set(size);
  2490. }
  2491. const ::google::protobuf::Descriptor* UInt32Wrapper::descriptor() {
  2492. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  2493. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2494. }
  2495. const UInt32Wrapper& UInt32Wrapper::default_instance() {
  2496. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_UInt32Wrapper.base);
  2497. return *internal_default_instance();
  2498. }
  2499. void UInt32Wrapper::Clear() {
  2500. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.UInt32Wrapper)
  2501. ::google::protobuf::uint32 cached_has_bits = 0;
  2502. // Prevent compiler warnings about cached_has_bits being unused
  2503. (void) cached_has_bits;
  2504. if (GetArenaNoVirtual() == NULL && uint32_ != NULL) {
  2505. delete uint32_;
  2506. }
  2507. uint32_ = NULL;
  2508. _internal_metadata_.Clear();
  2509. }
  2510. bool UInt32Wrapper::MergePartialFromCodedStream(
  2511. ::google::protobuf::io::CodedInputStream* input) {
  2512. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2513. ::google::protobuf::uint32 tag;
  2514. // @@protoc_insertion_point(parse_start:google.protobuf.testing.UInt32Wrapper)
  2515. for (;;) {
  2516. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2517. tag = p.first;
  2518. if (!p.second) goto handle_unusual;
  2519. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2520. // .google.protobuf.UInt32Value uint32 = 1;
  2521. case 1: {
  2522. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2523. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2524. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2525. input, mutable_uint32()));
  2526. } else {
  2527. goto handle_unusual;
  2528. }
  2529. break;
  2530. }
  2531. default: {
  2532. handle_unusual:
  2533. if (tag == 0) {
  2534. goto success;
  2535. }
  2536. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2537. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2538. break;
  2539. }
  2540. }
  2541. }
  2542. success:
  2543. // @@protoc_insertion_point(parse_success:google.protobuf.testing.UInt32Wrapper)
  2544. return true;
  2545. failure:
  2546. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.UInt32Wrapper)
  2547. return false;
  2548. #undef DO_
  2549. }
  2550. void UInt32Wrapper::SerializeWithCachedSizes(
  2551. ::google::protobuf::io::CodedOutputStream* output) const {
  2552. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.UInt32Wrapper)
  2553. ::google::protobuf::uint32 cached_has_bits = 0;
  2554. (void) cached_has_bits;
  2555. // .google.protobuf.UInt32Value uint32 = 1;
  2556. if (this->has_uint32()) {
  2557. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2558. 1, this->_internal_uint32(), output);
  2559. }
  2560. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2561. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2562. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2563. }
  2564. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.UInt32Wrapper)
  2565. }
  2566. ::google::protobuf::uint8* UInt32Wrapper::InternalSerializeWithCachedSizesToArray(
  2567. bool deterministic, ::google::protobuf::uint8* target) const {
  2568. (void)deterministic; // Unused
  2569. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.UInt32Wrapper)
  2570. ::google::protobuf::uint32 cached_has_bits = 0;
  2571. (void) cached_has_bits;
  2572. // .google.protobuf.UInt32Value uint32 = 1;
  2573. if (this->has_uint32()) {
  2574. target = ::google::protobuf::internal::WireFormatLite::
  2575. InternalWriteMessageToArray(
  2576. 1, this->_internal_uint32(), deterministic, target);
  2577. }
  2578. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2579. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2580. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2581. }
  2582. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.UInt32Wrapper)
  2583. return target;
  2584. }
  2585. size_t UInt32Wrapper::ByteSizeLong() const {
  2586. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.UInt32Wrapper)
  2587. size_t total_size = 0;
  2588. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2589. total_size +=
  2590. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2591. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2592. }
  2593. // .google.protobuf.UInt32Value uint32 = 1;
  2594. if (this->has_uint32()) {
  2595. total_size += 1 +
  2596. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2597. *uint32_);
  2598. }
  2599. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2600. SetCachedSize(cached_size);
  2601. return total_size;
  2602. }
  2603. void UInt32Wrapper::MergeFrom(const ::google::protobuf::Message& from) {
  2604. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.UInt32Wrapper)
  2605. GOOGLE_DCHECK_NE(&from, this);
  2606. const UInt32Wrapper* source =
  2607. ::google::protobuf::internal::DynamicCastToGenerated<const UInt32Wrapper>(
  2608. &from);
  2609. if (source == NULL) {
  2610. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.UInt32Wrapper)
  2611. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2612. } else {
  2613. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.UInt32Wrapper)
  2614. MergeFrom(*source);
  2615. }
  2616. }
  2617. void UInt32Wrapper::MergeFrom(const UInt32Wrapper& from) {
  2618. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.UInt32Wrapper)
  2619. GOOGLE_DCHECK_NE(&from, this);
  2620. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2621. ::google::protobuf::uint32 cached_has_bits = 0;
  2622. (void) cached_has_bits;
  2623. if (from.has_uint32()) {
  2624. mutable_uint32()->::google::protobuf::UInt32Value::MergeFrom(from.uint32());
  2625. }
  2626. }
  2627. void UInt32Wrapper::CopyFrom(const ::google::protobuf::Message& from) {
  2628. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.UInt32Wrapper)
  2629. if (&from == this) return;
  2630. Clear();
  2631. MergeFrom(from);
  2632. }
  2633. void UInt32Wrapper::CopyFrom(const UInt32Wrapper& from) {
  2634. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.UInt32Wrapper)
  2635. if (&from == this) return;
  2636. Clear();
  2637. MergeFrom(from);
  2638. }
  2639. bool UInt32Wrapper::IsInitialized() const {
  2640. return true;
  2641. }
  2642. void UInt32Wrapper::Swap(UInt32Wrapper* other) {
  2643. if (other == this) return;
  2644. InternalSwap(other);
  2645. }
  2646. void UInt32Wrapper::InternalSwap(UInt32Wrapper* other) {
  2647. using std::swap;
  2648. swap(uint32_, other->uint32_);
  2649. _internal_metadata_.Swap(&other->_internal_metadata_);
  2650. }
  2651. ::google::protobuf::Metadata UInt32Wrapper::GetMetadata() const {
  2652. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  2653. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
  2654. }
  2655. // ===================================================================
  2656. void BoolWrapper::InitAsDefaultInstance() {
  2657. ::google::protobuf::testing::_BoolWrapper_default_instance_._instance.get_mutable()->bool__ = const_cast< ::google::protobuf::BoolValue*>(
  2658. ::google::protobuf::BoolValue::internal_default_instance());
  2659. }
  2660. void BoolWrapper::clear_bool_() {
  2661. if (GetArenaNoVirtual() == NULL && bool__ != NULL) {
  2662. delete bool__;
  2663. }
  2664. bool__ = NULL;
  2665. }
  2666. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2667. const int BoolWrapper::kBoolFieldNumber;
  2668. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2669. BoolWrapper::BoolWrapper()
  2670. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2671. ::google::protobuf::internal::InitSCC(
  2672. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_BoolWrapper.base);
  2673. SharedCtor();
  2674. // @@protoc_insertion_point(constructor:google.protobuf.testing.BoolWrapper)
  2675. }
  2676. BoolWrapper::BoolWrapper(const BoolWrapper& from)
  2677. : ::google::protobuf::Message(),
  2678. _internal_metadata_(NULL) {
  2679. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2680. if (from.has_bool_()) {
  2681. bool__ = new ::google::protobuf::BoolValue(*from.bool__);
  2682. } else {
  2683. bool__ = NULL;
  2684. }
  2685. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.BoolWrapper)
  2686. }
  2687. void BoolWrapper::SharedCtor() {
  2688. bool__ = NULL;
  2689. }
  2690. BoolWrapper::~BoolWrapper() {
  2691. // @@protoc_insertion_point(destructor:google.protobuf.testing.BoolWrapper)
  2692. SharedDtor();
  2693. }
  2694. void BoolWrapper::SharedDtor() {
  2695. if (this != internal_default_instance()) delete bool__;
  2696. }
  2697. void BoolWrapper::SetCachedSize(int size) const {
  2698. _cached_size_.Set(size);
  2699. }
  2700. const ::google::protobuf::Descriptor* BoolWrapper::descriptor() {
  2701. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  2702. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2703. }
  2704. const BoolWrapper& BoolWrapper::default_instance() {
  2705. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_BoolWrapper.base);
  2706. return *internal_default_instance();
  2707. }
  2708. void BoolWrapper::Clear() {
  2709. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.BoolWrapper)
  2710. ::google::protobuf::uint32 cached_has_bits = 0;
  2711. // Prevent compiler warnings about cached_has_bits being unused
  2712. (void) cached_has_bits;
  2713. if (GetArenaNoVirtual() == NULL && bool__ != NULL) {
  2714. delete bool__;
  2715. }
  2716. bool__ = NULL;
  2717. _internal_metadata_.Clear();
  2718. }
  2719. bool BoolWrapper::MergePartialFromCodedStream(
  2720. ::google::protobuf::io::CodedInputStream* input) {
  2721. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2722. ::google::protobuf::uint32 tag;
  2723. // @@protoc_insertion_point(parse_start:google.protobuf.testing.BoolWrapper)
  2724. for (;;) {
  2725. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2726. tag = p.first;
  2727. if (!p.second) goto handle_unusual;
  2728. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2729. // .google.protobuf.BoolValue bool = 1;
  2730. case 1: {
  2731. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2732. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2733. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2734. input, mutable_bool_()));
  2735. } else {
  2736. goto handle_unusual;
  2737. }
  2738. break;
  2739. }
  2740. default: {
  2741. handle_unusual:
  2742. if (tag == 0) {
  2743. goto success;
  2744. }
  2745. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2746. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2747. break;
  2748. }
  2749. }
  2750. }
  2751. success:
  2752. // @@protoc_insertion_point(parse_success:google.protobuf.testing.BoolWrapper)
  2753. return true;
  2754. failure:
  2755. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.BoolWrapper)
  2756. return false;
  2757. #undef DO_
  2758. }
  2759. void BoolWrapper::SerializeWithCachedSizes(
  2760. ::google::protobuf::io::CodedOutputStream* output) const {
  2761. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.BoolWrapper)
  2762. ::google::protobuf::uint32 cached_has_bits = 0;
  2763. (void) cached_has_bits;
  2764. // .google.protobuf.BoolValue bool = 1;
  2765. if (this->has_bool_()) {
  2766. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2767. 1, this->_internal_bool_(), output);
  2768. }
  2769. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2770. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2771. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2772. }
  2773. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.BoolWrapper)
  2774. }
  2775. ::google::protobuf::uint8* BoolWrapper::InternalSerializeWithCachedSizesToArray(
  2776. bool deterministic, ::google::protobuf::uint8* target) const {
  2777. (void)deterministic; // Unused
  2778. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.BoolWrapper)
  2779. ::google::protobuf::uint32 cached_has_bits = 0;
  2780. (void) cached_has_bits;
  2781. // .google.protobuf.BoolValue bool = 1;
  2782. if (this->has_bool_()) {
  2783. target = ::google::protobuf::internal::WireFormatLite::
  2784. InternalWriteMessageToArray(
  2785. 1, this->_internal_bool_(), deterministic, target);
  2786. }
  2787. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2788. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2789. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2790. }
  2791. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.BoolWrapper)
  2792. return target;
  2793. }
  2794. size_t BoolWrapper::ByteSizeLong() const {
  2795. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.BoolWrapper)
  2796. size_t total_size = 0;
  2797. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2798. total_size +=
  2799. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2800. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2801. }
  2802. // .google.protobuf.BoolValue bool = 1;
  2803. if (this->has_bool_()) {
  2804. total_size += 1 +
  2805. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2806. *bool__);
  2807. }
  2808. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2809. SetCachedSize(cached_size);
  2810. return total_size;
  2811. }
  2812. void BoolWrapper::MergeFrom(const ::google::protobuf::Message& from) {
  2813. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.BoolWrapper)
  2814. GOOGLE_DCHECK_NE(&from, this);
  2815. const BoolWrapper* source =
  2816. ::google::protobuf::internal::DynamicCastToGenerated<const BoolWrapper>(
  2817. &from);
  2818. if (source == NULL) {
  2819. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.BoolWrapper)
  2820. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2821. } else {
  2822. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.BoolWrapper)
  2823. MergeFrom(*source);
  2824. }
  2825. }
  2826. void BoolWrapper::MergeFrom(const BoolWrapper& from) {
  2827. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.BoolWrapper)
  2828. GOOGLE_DCHECK_NE(&from, this);
  2829. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2830. ::google::protobuf::uint32 cached_has_bits = 0;
  2831. (void) cached_has_bits;
  2832. if (from.has_bool_()) {
  2833. mutable_bool_()->::google::protobuf::BoolValue::MergeFrom(from.bool_());
  2834. }
  2835. }
  2836. void BoolWrapper::CopyFrom(const ::google::protobuf::Message& from) {
  2837. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.BoolWrapper)
  2838. if (&from == this) return;
  2839. Clear();
  2840. MergeFrom(from);
  2841. }
  2842. void BoolWrapper::CopyFrom(const BoolWrapper& from) {
  2843. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.BoolWrapper)
  2844. if (&from == this) return;
  2845. Clear();
  2846. MergeFrom(from);
  2847. }
  2848. bool BoolWrapper::IsInitialized() const {
  2849. return true;
  2850. }
  2851. void BoolWrapper::Swap(BoolWrapper* other) {
  2852. if (other == this) return;
  2853. InternalSwap(other);
  2854. }
  2855. void BoolWrapper::InternalSwap(BoolWrapper* other) {
  2856. using std::swap;
  2857. swap(bool__, other->bool__);
  2858. _internal_metadata_.Swap(&other->_internal_metadata_);
  2859. }
  2860. ::google::protobuf::Metadata BoolWrapper::GetMetadata() const {
  2861. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  2862. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
  2863. }
  2864. // ===================================================================
  2865. void StringWrapper::InitAsDefaultInstance() {
  2866. ::google::protobuf::testing::_StringWrapper_default_instance_._instance.get_mutable()->string_ = const_cast< ::google::protobuf::StringValue*>(
  2867. ::google::protobuf::StringValue::internal_default_instance());
  2868. }
  2869. void StringWrapper::clear_string() {
  2870. if (GetArenaNoVirtual() == NULL && string_ != NULL) {
  2871. delete string_;
  2872. }
  2873. string_ = NULL;
  2874. }
  2875. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2876. const int StringWrapper::kStringFieldNumber;
  2877. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2878. StringWrapper::StringWrapper()
  2879. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2880. ::google::protobuf::internal::InitSCC(
  2881. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_StringWrapper.base);
  2882. SharedCtor();
  2883. // @@protoc_insertion_point(constructor:google.protobuf.testing.StringWrapper)
  2884. }
  2885. StringWrapper::StringWrapper(const StringWrapper& from)
  2886. : ::google::protobuf::Message(),
  2887. _internal_metadata_(NULL) {
  2888. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2889. if (from.has_string()) {
  2890. string_ = new ::google::protobuf::StringValue(*from.string_);
  2891. } else {
  2892. string_ = NULL;
  2893. }
  2894. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.StringWrapper)
  2895. }
  2896. void StringWrapper::SharedCtor() {
  2897. string_ = NULL;
  2898. }
  2899. StringWrapper::~StringWrapper() {
  2900. // @@protoc_insertion_point(destructor:google.protobuf.testing.StringWrapper)
  2901. SharedDtor();
  2902. }
  2903. void StringWrapper::SharedDtor() {
  2904. if (this != internal_default_instance()) delete string_;
  2905. }
  2906. void StringWrapper::SetCachedSize(int size) const {
  2907. _cached_size_.Set(size);
  2908. }
  2909. const ::google::protobuf::Descriptor* StringWrapper::descriptor() {
  2910. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  2911. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2912. }
  2913. const StringWrapper& StringWrapper::default_instance() {
  2914. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_StringWrapper.base);
  2915. return *internal_default_instance();
  2916. }
  2917. void StringWrapper::Clear() {
  2918. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.StringWrapper)
  2919. ::google::protobuf::uint32 cached_has_bits = 0;
  2920. // Prevent compiler warnings about cached_has_bits being unused
  2921. (void) cached_has_bits;
  2922. if (GetArenaNoVirtual() == NULL && string_ != NULL) {
  2923. delete string_;
  2924. }
  2925. string_ = NULL;
  2926. _internal_metadata_.Clear();
  2927. }
  2928. bool StringWrapper::MergePartialFromCodedStream(
  2929. ::google::protobuf::io::CodedInputStream* input) {
  2930. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2931. ::google::protobuf::uint32 tag;
  2932. // @@protoc_insertion_point(parse_start:google.protobuf.testing.StringWrapper)
  2933. for (;;) {
  2934. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2935. tag = p.first;
  2936. if (!p.second) goto handle_unusual;
  2937. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2938. // .google.protobuf.StringValue string = 1;
  2939. case 1: {
  2940. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2941. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2942. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2943. input, mutable_string()));
  2944. } else {
  2945. goto handle_unusual;
  2946. }
  2947. break;
  2948. }
  2949. default: {
  2950. handle_unusual:
  2951. if (tag == 0) {
  2952. goto success;
  2953. }
  2954. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2955. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2956. break;
  2957. }
  2958. }
  2959. }
  2960. success:
  2961. // @@protoc_insertion_point(parse_success:google.protobuf.testing.StringWrapper)
  2962. return true;
  2963. failure:
  2964. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.StringWrapper)
  2965. return false;
  2966. #undef DO_
  2967. }
  2968. void StringWrapper::SerializeWithCachedSizes(
  2969. ::google::protobuf::io::CodedOutputStream* output) const {
  2970. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.StringWrapper)
  2971. ::google::protobuf::uint32 cached_has_bits = 0;
  2972. (void) cached_has_bits;
  2973. // .google.protobuf.StringValue string = 1;
  2974. if (this->has_string()) {
  2975. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2976. 1, this->_internal_string(), output);
  2977. }
  2978. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2979. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2980. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2981. }
  2982. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.StringWrapper)
  2983. }
  2984. ::google::protobuf::uint8* StringWrapper::InternalSerializeWithCachedSizesToArray(
  2985. bool deterministic, ::google::protobuf::uint8* target) const {
  2986. (void)deterministic; // Unused
  2987. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.StringWrapper)
  2988. ::google::protobuf::uint32 cached_has_bits = 0;
  2989. (void) cached_has_bits;
  2990. // .google.protobuf.StringValue string = 1;
  2991. if (this->has_string()) {
  2992. target = ::google::protobuf::internal::WireFormatLite::
  2993. InternalWriteMessageToArray(
  2994. 1, this->_internal_string(), deterministic, target);
  2995. }
  2996. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2997. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2998. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2999. }
  3000. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.StringWrapper)
  3001. return target;
  3002. }
  3003. size_t StringWrapper::ByteSizeLong() const {
  3004. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.StringWrapper)
  3005. size_t total_size = 0;
  3006. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3007. total_size +=
  3008. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3009. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3010. }
  3011. // .google.protobuf.StringValue string = 1;
  3012. if (this->has_string()) {
  3013. total_size += 1 +
  3014. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3015. *string_);
  3016. }
  3017. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3018. SetCachedSize(cached_size);
  3019. return total_size;
  3020. }
  3021. void StringWrapper::MergeFrom(const ::google::protobuf::Message& from) {
  3022. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.StringWrapper)
  3023. GOOGLE_DCHECK_NE(&from, this);
  3024. const StringWrapper* source =
  3025. ::google::protobuf::internal::DynamicCastToGenerated<const StringWrapper>(
  3026. &from);
  3027. if (source == NULL) {
  3028. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.StringWrapper)
  3029. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3030. } else {
  3031. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.StringWrapper)
  3032. MergeFrom(*source);
  3033. }
  3034. }
  3035. void StringWrapper::MergeFrom(const StringWrapper& from) {
  3036. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.StringWrapper)
  3037. GOOGLE_DCHECK_NE(&from, this);
  3038. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3039. ::google::protobuf::uint32 cached_has_bits = 0;
  3040. (void) cached_has_bits;
  3041. if (from.has_string()) {
  3042. mutable_string()->::google::protobuf::StringValue::MergeFrom(from.string());
  3043. }
  3044. }
  3045. void StringWrapper::CopyFrom(const ::google::protobuf::Message& from) {
  3046. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.StringWrapper)
  3047. if (&from == this) return;
  3048. Clear();
  3049. MergeFrom(from);
  3050. }
  3051. void StringWrapper::CopyFrom(const StringWrapper& from) {
  3052. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.StringWrapper)
  3053. if (&from == this) return;
  3054. Clear();
  3055. MergeFrom(from);
  3056. }
  3057. bool StringWrapper::IsInitialized() const {
  3058. return true;
  3059. }
  3060. void StringWrapper::Swap(StringWrapper* other) {
  3061. if (other == this) return;
  3062. InternalSwap(other);
  3063. }
  3064. void StringWrapper::InternalSwap(StringWrapper* other) {
  3065. using std::swap;
  3066. swap(string_, other->string_);
  3067. _internal_metadata_.Swap(&other->_internal_metadata_);
  3068. }
  3069. ::google::protobuf::Metadata StringWrapper::GetMetadata() const {
  3070. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  3071. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
  3072. }
  3073. // ===================================================================
  3074. void BytesWrapper::InitAsDefaultInstance() {
  3075. ::google::protobuf::testing::_BytesWrapper_default_instance_._instance.get_mutable()->bytes_ = const_cast< ::google::protobuf::BytesValue*>(
  3076. ::google::protobuf::BytesValue::internal_default_instance());
  3077. }
  3078. void BytesWrapper::clear_bytes() {
  3079. if (GetArenaNoVirtual() == NULL && bytes_ != NULL) {
  3080. delete bytes_;
  3081. }
  3082. bytes_ = NULL;
  3083. }
  3084. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3085. const int BytesWrapper::kBytesFieldNumber;
  3086. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3087. BytesWrapper::BytesWrapper()
  3088. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3089. ::google::protobuf::internal::InitSCC(
  3090. &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_BytesWrapper.base);
  3091. SharedCtor();
  3092. // @@protoc_insertion_point(constructor:google.protobuf.testing.BytesWrapper)
  3093. }
  3094. BytesWrapper::BytesWrapper(const BytesWrapper& from)
  3095. : ::google::protobuf::Message(),
  3096. _internal_metadata_(NULL) {
  3097. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3098. if (from.has_bytes()) {
  3099. bytes_ = new ::google::protobuf::BytesValue(*from.bytes_);
  3100. } else {
  3101. bytes_ = NULL;
  3102. }
  3103. // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.BytesWrapper)
  3104. }
  3105. void BytesWrapper::SharedCtor() {
  3106. bytes_ = NULL;
  3107. }
  3108. BytesWrapper::~BytesWrapper() {
  3109. // @@protoc_insertion_point(destructor:google.protobuf.testing.BytesWrapper)
  3110. SharedDtor();
  3111. }
  3112. void BytesWrapper::SharedDtor() {
  3113. if (this != internal_default_instance()) delete bytes_;
  3114. }
  3115. void BytesWrapper::SetCachedSize(int size) const {
  3116. _cached_size_.Set(size);
  3117. }
  3118. const ::google::protobuf::Descriptor* BytesWrapper::descriptor() {
  3119. ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  3120. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3121. }
  3122. const BytesWrapper& BytesWrapper::default_instance() {
  3123. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::scc_info_BytesWrapper.base);
  3124. return *internal_default_instance();
  3125. }
  3126. void BytesWrapper::Clear() {
  3127. // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.BytesWrapper)
  3128. ::google::protobuf::uint32 cached_has_bits = 0;
  3129. // Prevent compiler warnings about cached_has_bits being unused
  3130. (void) cached_has_bits;
  3131. if (GetArenaNoVirtual() == NULL && bytes_ != NULL) {
  3132. delete bytes_;
  3133. }
  3134. bytes_ = NULL;
  3135. _internal_metadata_.Clear();
  3136. }
  3137. bool BytesWrapper::MergePartialFromCodedStream(
  3138. ::google::protobuf::io::CodedInputStream* input) {
  3139. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3140. ::google::protobuf::uint32 tag;
  3141. // @@protoc_insertion_point(parse_start:google.protobuf.testing.BytesWrapper)
  3142. for (;;) {
  3143. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3144. tag = p.first;
  3145. if (!p.second) goto handle_unusual;
  3146. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3147. // .google.protobuf.BytesValue bytes = 1;
  3148. case 1: {
  3149. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3150. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3151. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3152. input, mutable_bytes()));
  3153. } else {
  3154. goto handle_unusual;
  3155. }
  3156. break;
  3157. }
  3158. default: {
  3159. handle_unusual:
  3160. if (tag == 0) {
  3161. goto success;
  3162. }
  3163. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3164. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3165. break;
  3166. }
  3167. }
  3168. }
  3169. success:
  3170. // @@protoc_insertion_point(parse_success:google.protobuf.testing.BytesWrapper)
  3171. return true;
  3172. failure:
  3173. // @@protoc_insertion_point(parse_failure:google.protobuf.testing.BytesWrapper)
  3174. return false;
  3175. #undef DO_
  3176. }
  3177. void BytesWrapper::SerializeWithCachedSizes(
  3178. ::google::protobuf::io::CodedOutputStream* output) const {
  3179. // @@protoc_insertion_point(serialize_start:google.protobuf.testing.BytesWrapper)
  3180. ::google::protobuf::uint32 cached_has_bits = 0;
  3181. (void) cached_has_bits;
  3182. // .google.protobuf.BytesValue bytes = 1;
  3183. if (this->has_bytes()) {
  3184. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3185. 1, this->_internal_bytes(), output);
  3186. }
  3187. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3188. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3189. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3190. }
  3191. // @@protoc_insertion_point(serialize_end:google.protobuf.testing.BytesWrapper)
  3192. }
  3193. ::google::protobuf::uint8* BytesWrapper::InternalSerializeWithCachedSizesToArray(
  3194. bool deterministic, ::google::protobuf::uint8* target) const {
  3195. (void)deterministic; // Unused
  3196. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.BytesWrapper)
  3197. ::google::protobuf::uint32 cached_has_bits = 0;
  3198. (void) cached_has_bits;
  3199. // .google.protobuf.BytesValue bytes = 1;
  3200. if (this->has_bytes()) {
  3201. target = ::google::protobuf::internal::WireFormatLite::
  3202. InternalWriteMessageToArray(
  3203. 1, this->_internal_bytes(), deterministic, target);
  3204. }
  3205. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3206. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3207. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3208. }
  3209. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.BytesWrapper)
  3210. return target;
  3211. }
  3212. size_t BytesWrapper::ByteSizeLong() const {
  3213. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.BytesWrapper)
  3214. size_t total_size = 0;
  3215. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3216. total_size +=
  3217. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3218. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3219. }
  3220. // .google.protobuf.BytesValue bytes = 1;
  3221. if (this->has_bytes()) {
  3222. total_size += 1 +
  3223. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3224. *bytes_);
  3225. }
  3226. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3227. SetCachedSize(cached_size);
  3228. return total_size;
  3229. }
  3230. void BytesWrapper::MergeFrom(const ::google::protobuf::Message& from) {
  3231. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.BytesWrapper)
  3232. GOOGLE_DCHECK_NE(&from, this);
  3233. const BytesWrapper* source =
  3234. ::google::protobuf::internal::DynamicCastToGenerated<const BytesWrapper>(
  3235. &from);
  3236. if (source == NULL) {
  3237. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.BytesWrapper)
  3238. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3239. } else {
  3240. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.BytesWrapper)
  3241. MergeFrom(*source);
  3242. }
  3243. }
  3244. void BytesWrapper::MergeFrom(const BytesWrapper& from) {
  3245. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.BytesWrapper)
  3246. GOOGLE_DCHECK_NE(&from, this);
  3247. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3248. ::google::protobuf::uint32 cached_has_bits = 0;
  3249. (void) cached_has_bits;
  3250. if (from.has_bytes()) {
  3251. mutable_bytes()->::google::protobuf::BytesValue::MergeFrom(from.bytes());
  3252. }
  3253. }
  3254. void BytesWrapper::CopyFrom(const ::google::protobuf::Message& from) {
  3255. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.BytesWrapper)
  3256. if (&from == this) return;
  3257. Clear();
  3258. MergeFrom(from);
  3259. }
  3260. void BytesWrapper::CopyFrom(const BytesWrapper& from) {
  3261. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.BytesWrapper)
  3262. if (&from == this) return;
  3263. Clear();
  3264. MergeFrom(from);
  3265. }
  3266. bool BytesWrapper::IsInitialized() const {
  3267. return true;
  3268. }
  3269. void BytesWrapper::Swap(BytesWrapper* other) {
  3270. if (other == this) return;
  3271. InternalSwap(other);
  3272. }
  3273. void BytesWrapper::InternalSwap(BytesWrapper* other) {
  3274. using std::swap;
  3275. swap(bytes_, other->bytes_);
  3276. _internal_metadata_.Swap(&other->_internal_metadata_);
  3277. }
  3278. ::google::protobuf::Metadata BytesWrapper::GetMetadata() const {
  3279. protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
  3280. return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
  3281. }
  3282. // @@protoc_insertion_point(namespace_scope)
  3283. } // namespace testing
  3284. } // namespace protobuf
  3285. } // namespace google
  3286. namespace google {
  3287. namespace protobuf {
  3288. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::WrappersTestCases* Arena::CreateMaybeMessage< ::google::protobuf::testing::WrappersTestCases >(Arena* arena) {
  3289. return Arena::CreateInternal< ::google::protobuf::testing::WrappersTestCases >(arena);
  3290. }
  3291. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::DoubleWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::DoubleWrapper >(Arena* arena) {
  3292. return Arena::CreateInternal< ::google::protobuf::testing::DoubleWrapper >(arena);
  3293. }
  3294. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::FloatWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::FloatWrapper >(Arena* arena) {
  3295. return Arena::CreateInternal< ::google::protobuf::testing::FloatWrapper >(arena);
  3296. }
  3297. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Int64Wrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::Int64Wrapper >(Arena* arena) {
  3298. return Arena::CreateInternal< ::google::protobuf::testing::Int64Wrapper >(arena);
  3299. }
  3300. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::UInt64Wrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::UInt64Wrapper >(Arena* arena) {
  3301. return Arena::CreateInternal< ::google::protobuf::testing::UInt64Wrapper >(arena);
  3302. }
  3303. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Int32Wrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::Int32Wrapper >(Arena* arena) {
  3304. return Arena::CreateInternal< ::google::protobuf::testing::Int32Wrapper >(arena);
  3305. }
  3306. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::UInt32Wrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::UInt32Wrapper >(Arena* arena) {
  3307. return Arena::CreateInternal< ::google::protobuf::testing::UInt32Wrapper >(arena);
  3308. }
  3309. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::BoolWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::BoolWrapper >(Arena* arena) {
  3310. return Arena::CreateInternal< ::google::protobuf::testing::BoolWrapper >(arena);
  3311. }
  3312. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::StringWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::StringWrapper >(Arena* arena) {
  3313. return Arena::CreateInternal< ::google::protobuf::testing::StringWrapper >(arena);
  3314. }
  3315. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::BytesWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::BytesWrapper >(Arena* arena) {
  3316. return Arena::CreateInternal< ::google::protobuf::testing::BytesWrapper >(arena);
  3317. }
  3318. } // namespace protobuf
  3319. } // namespace google
  3320. // @@protoc_insertion_point(global_scope)