| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: google/protobuf/util/internal/testdata/anys.proto
- #include <google/protobuf/util/internal/testdata/anys.pb.h>
- #include <algorithm>
- #include <google/protobuf/stubs/common.h>
- #include <google/protobuf/stubs/port.h>
- #include <google/protobuf/io/coded_stream.h>
- #include <google/protobuf/wire_format_lite_inl.h>
- #include <google/protobuf/descriptor.h>
- #include <google/protobuf/generated_message_reflection.h>
- #include <google/protobuf/reflection_ops.h>
- #include <google/protobuf/wire_format.h>
- // This is a temporary google only hack
- #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- #include "third_party/protobuf/version.h"
- #endif
- // @@protoc_insertion_point(includes)
- namespace protobuf_google_2fprotobuf_2fany_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fany_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Any;
- } // namespace protobuf_google_2fprotobuf_2fany_2eproto
- namespace protobuf_google_2fprotobuf_2fduration_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fduration_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Duration;
- } // namespace protobuf_google_2fprotobuf_2fduration_2eproto
- namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ListValue;
- } // namespace protobuf_google_2fprotobuf_2fstruct_2eproto
- namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2ftimestamp_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Timestamp;
- } // namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto
- namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Data_MapDataEntry_DoNotUse;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_AnyWrapper;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto ::google::protobuf::internal::SCCInfo<4> scc_info_Data;
- } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto
- namespace protobuf_google_2fprotobuf_2fwrappers_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_DoubleValue;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fwrappers_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Int32Value;
- } // namespace protobuf_google_2fprotobuf_2fwrappers_2eproto
- namespace google {
- namespace protobuf {
- namespace testing {
- class AnyTestCasesDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<AnyTestCases>
- _instance;
- } _AnyTestCases_default_instance_;
- class AnyWrapperDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<AnyWrapper>
- _instance;
- } _AnyWrapper_default_instance_;
- class ImportsDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Imports>
- _instance;
- } _Imports_default_instance_;
- class Data_MapDataEntry_DoNotUseDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Data_MapDataEntry_DoNotUse>
- _instance;
- } _Data_MapDataEntry_DoNotUse_default_instance_;
- class DataDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Data>
- _instance;
- } _Data_default_instance_;
- class AnyInDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<AnyIn>
- _instance;
- } _AnyIn_default_instance_;
- class AnyOutDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<AnyOut>
- _instance;
- } _AnyOut_default_instance_;
- class AnyMDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<AnyM>
- _instance;
- } _AnyM_default_instance_;
- } // namespace testing
- } // namespace protobuf
- } // namespace google
- namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto {
- static void InitDefaultsAnyTestCases() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::_AnyTestCases_default_instance_;
- new (ptr) ::google::protobuf::testing::AnyTestCases();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::AnyTestCases::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<2> scc_info_AnyTestCases =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsAnyTestCases}, {
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyWrapper.base,
- &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,}};
- static void InitDefaultsAnyWrapper() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::_AnyWrapper_default_instance_;
- new (ptr) ::google::protobuf::testing::AnyWrapper();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::AnyWrapper::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<1> scc_info_AnyWrapper =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsAnyWrapper}, {
- &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,}};
- static void InitDefaultsImports() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::_Imports_default_instance_;
- new (ptr) ::google::protobuf::testing::Imports();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::Imports::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<6> scc_info_Imports =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 6, InitDefaultsImports}, {
- &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_DoubleValue.base,
- &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,
- &protobuf_google_2fprotobuf_2ftimestamp_2eproto::scc_info_Timestamp.base,
- &protobuf_google_2fprotobuf_2fduration_2eproto::scc_info_Duration.base,
- &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_Int32Value.base,
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Data.base,}};
- static void InitDefaultsData_MapDataEntry_DoNotUse() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::_Data_MapDataEntry_DoNotUse_default_instance_;
- new (ptr) ::google::protobuf::testing::Data_MapDataEntry_DoNotUse();
- }
- ::google::protobuf::testing::Data_MapDataEntry_DoNotUse::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_Data_MapDataEntry_DoNotUse =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsData_MapDataEntry_DoNotUse}, {}};
- static void InitDefaultsData() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::_Data_default_instance_;
- new (ptr) ::google::protobuf::testing::Data();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::Data::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<4> scc_info_Data =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsData}, {
- &protobuf_google_2fprotobuf_2fwrappers_2eproto::scc_info_Int32Value.base,
- &protobuf_google_2fprotobuf_2ftimestamp_2eproto::scc_info_Timestamp.base,
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Data_MapDataEntry_DoNotUse.base,
- &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base,}};
- static void InitDefaultsAnyIn() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::_AnyIn_default_instance_;
- new (ptr) ::google::protobuf::testing::AnyIn();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::AnyIn::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<1> scc_info_AnyIn =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsAnyIn}, {
- &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,}};
- static void InitDefaultsAnyOut() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::_AnyOut_default_instance_;
- new (ptr) ::google::protobuf::testing::AnyOut();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::AnyOut::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<1> scc_info_AnyOut =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsAnyOut}, {
- &protobuf_google_2fprotobuf_2fany_2eproto::scc_info_Any.base,}};
- static void InitDefaultsAnyM() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::_AnyM_default_instance_;
- new (ptr) ::google::protobuf::testing::AnyM();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::AnyM::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_AnyM =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAnyM}, {}};
- void InitDefaults() {
- ::google::protobuf::internal::InitSCC(&scc_info_AnyTestCases.base);
- ::google::protobuf::internal::InitSCC(&scc_info_AnyWrapper.base);
- ::google::protobuf::internal::InitSCC(&scc_info_Imports.base);
- ::google::protobuf::internal::InitSCC(&scc_info_Data_MapDataEntry_DoNotUse.base);
- ::google::protobuf::internal::InitSCC(&scc_info_Data.base);
- ::google::protobuf::internal::InitSCC(&scc_info_AnyIn.base);
- ::google::protobuf::internal::InitSCC(&scc_info_AnyOut.base);
- ::google::protobuf::internal::InitSCC(&scc_info_AnyM.base);
- }
- ::google::protobuf::Metadata file_level_metadata[8];
- const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, empty_any_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, type_only_any_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, wrapper_any_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_timestamp_value_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_duration_value_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_struct_value_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, recursive_any_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_value_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_nested_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_with_wrapper_type_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_with_timestamp_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_containing_map_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_containing_struct_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, any_with_message_containing_repeated_message_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, recursive_any_with_type_field_at_end_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, top_level_any_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyTestCases, top_level_any_with_type_field_at_end_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyWrapper, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyWrapper, any_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, dbl_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, struct__),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, timestamp_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, duration_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, i32_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Imports, data_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data_MapDataEntry_DoNotUse, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data_MapDataEntry_DoNotUse, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data_MapDataEntry_DoNotUse, key_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data_MapDataEntry_DoNotUse, value_),
- 0,
- 1,
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, attr_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, str_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, msgs_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, nested_data_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, int_wrapper_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, time_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, map_data_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, struct_data_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::Data, repeated_data_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyIn, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyIn, something_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyIn, any_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyOut, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyOut, any_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyM, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::AnyM, foo_),
- };
- static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(::google::protobuf::testing::AnyTestCases)},
- { 22, -1, sizeof(::google::protobuf::testing::AnyWrapper)},
- { 28, -1, sizeof(::google::protobuf::testing::Imports)},
- { 39, 46, sizeof(::google::protobuf::testing::Data_MapDataEntry_DoNotUse)},
- { 48, -1, sizeof(::google::protobuf::testing::Data)},
- { 62, -1, sizeof(::google::protobuf::testing::AnyIn)},
- { 69, -1, sizeof(::google::protobuf::testing::AnyOut)},
- { 75, -1, sizeof(::google::protobuf::testing::AnyM)},
- };
- static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyTestCases_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyWrapper_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Imports_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Data_MapDataEntry_DoNotUse_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_Data_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyIn_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyOut_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_AnyM_default_instance_),
- };
- void protobuf_AssignDescriptors() {
- AddDescriptors();
- AssignDescriptors(
- "google/protobuf/util/internal/testdata/anys.proto", schemas, file_default_instances, TableStruct::offsets,
- file_level_metadata, NULL, NULL);
- }
- void protobuf_AssignDescriptorsOnce() {
- static ::google::protobuf::internal::once_flag once;
- ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
- }
- void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
- void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 8);
- }
- void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n1google/protobuf/util/internal/testdata"
- "/anys.proto\022\027google.protobuf.testing\032\031go"
- "ogle/protobuf/any.proto\032\034google/protobuf"
- "/struct.proto\032\037google/protobuf/timestamp"
- ".proto\032\036google/protobuf/duration.proto\032\036"
- "google/protobuf/wrappers.proto\"\261\t\n\014AnyTe"
- "stCases\0226\n\tempty_any\030\001 \001(\0132#.google.prot"
- "obuf.testing.AnyWrapper\022:\n\rtype_only_any"
- "\030\002 \001(\0132#.google.protobuf.testing.AnyWrap"
- "per\0228\n\013wrapper_any\030\003 \001(\0132#.google.protob"
- "uf.testing.AnyWrapper\022E\n\030any_with_timest"
- "amp_value\030\004 \001(\0132#.google.protobuf.testin"
- "g.AnyWrapper\022D\n\027any_with_duration_value\030"
- "\005 \001(\0132#.google.protobuf.testing.AnyWrapp"
- "er\022B\n\025any_with_struct_value\030\006 \001(\0132#.goog"
- "le.protobuf.testing.AnyWrapper\022:\n\rrecurs"
- "ive_any\030\007 \001(\0132#.google.protobuf.testing."
- "AnyWrapper\022C\n\026any_with_message_value\030\010 \001"
- "(\0132#.google.protobuf.testing.AnyWrapper\022"
- "D\n\027any_with_nested_message\030\t \001(\0132#.googl"
- "e.protobuf.testing.AnyWrapper\022O\n\"any_wit"
- "h_message_with_wrapper_type\030\n \001(\0132#.goog"
- "le.protobuf.testing.AnyWrapper\022L\n\037any_wi"
- "th_message_with_timestamp\030\013 \001(\0132#.google"
- ".protobuf.testing.AnyWrapper\022L\n\037any_with"
- "_message_containing_map\030\014 \001(\0132#.google.p"
- "rotobuf.testing.AnyWrapper\022O\n\"any_with_m"
- "essage_containing_struct\030\r \001(\0132#.google."
- "protobuf.testing.AnyWrapper\022Y\n,any_with_"
- "message_containing_repeated_message\030\016 \001("
- "\0132#.google.protobuf.testing.AnyWrapper\022Q"
- "\n$recursive_any_with_type_field_at_end\030\017"
- " \001(\0132#.google.protobuf.testing.AnyWrappe"
- "r\022+\n\rtop_level_any\0302 \001(\0132\024.google.protob"
- "uf.Any\022B\n$top_level_any_with_type_field_"
- "at_end\0303 \001(\0132\024.google.protobuf.Any\"/\n\nAn"
- "yWrapper\022!\n\003any\030\001 \001(\0132\024.google.protobuf."
- "Any\"\220\002\n\007Imports\022)\n\003dbl\030\001 \001(\0132\034.google.pr"
- "otobuf.DoubleValue\022\'\n\006struct\030\002 \001(\0132\027.goo"
- "gle.protobuf.Struct\022-\n\ttimestamp\030\003 \001(\0132\032"
- ".google.protobuf.Timestamp\022+\n\010duration\030\004"
- " \001(\0132\031.google.protobuf.Duration\022(\n\003i32\030\005"
- " \001(\0132\033.google.protobuf.Int32Value\022+\n\004dat"
- "a\030d \001(\0132\035.google.protobuf.testing.Data\"\221"
- "\003\n\004Data\022\014\n\004attr\030\001 \001(\005\022\013\n\003str\030\002 \001(\t\022\014\n\004ms"
- "gs\030\003 \003(\t\0222\n\013nested_data\030\004 \001(\0132\035.google.p"
- "rotobuf.testing.Data\0220\n\013int_wrapper\030\005 \001("
- "\0132\033.google.protobuf.Int32Value\022(\n\004time\030\006"
- " \001(\0132\032.google.protobuf.Timestamp\022<\n\010map_"
- "data\030\007 \003(\0132*.google.protobuf.testing.Dat"
- "a.MapDataEntry\022,\n\013struct_data\030\010 \001(\0132\027.go"
- "ogle.protobuf.Struct\0224\n\rrepeated_data\030\t "
- "\003(\0132\035.google.protobuf.testing.Data\032.\n\014Ma"
- "pDataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002"
- "8\001\"=\n\005AnyIn\022\021\n\tsomething\030\001 \001(\t\022!\n\003any\030\002 "
- "\001(\0132\024.google.protobuf.Any\"+\n\006AnyOut\022!\n\003a"
- "ny\030\001 \001(\0132\024.google.protobuf.Any\"\023\n\004AnyM\022\013"
- "\n\003foo\030\001 \001(\t2\263\001\n\016AnyTestService\022T\n\004Call\022%"
- ".google.protobuf.testing.AnyTestCases\032%."
- "google.protobuf.testing.AnyTestCases\022K\n\005"
- "Call1\022 .google.protobuf.testing.Imports\032"
- " .google.protobuf.testing.Importsb\006proto"
- "3"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 2481);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "google/protobuf/util/internal/testdata/anys.proto", &protobuf_RegisterTypes);
- ::protobuf_google_2fprotobuf_2fany_2eproto::AddDescriptors();
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::AddDescriptors();
- ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
- ::protobuf_google_2fprotobuf_2fduration_2eproto::AddDescriptors();
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::AddDescriptors();
- }
- void AddDescriptors() {
- static ::google::protobuf::internal::once_flag once;
- ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
- }
- // Force AddDescriptors() to be called at dynamic initialization time.
- struct StaticDescriptorInitializer {
- StaticDescriptorInitializer() {
- AddDescriptors();
- }
- } static_descriptor_initializer;
- } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto
- namespace google {
- namespace protobuf {
- namespace testing {
- // ===================================================================
- void AnyTestCases::InitAsDefaultInstance() {
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->empty_any_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->type_only_any_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->wrapper_any_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_timestamp_value_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_duration_value_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_struct_value_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->recursive_any_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_value_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_nested_message_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_with_wrapper_type_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_with_timestamp_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_containing_map_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_containing_struct_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->any_with_message_containing_repeated_message_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->recursive_any_with_type_field_at_end_ = const_cast< ::google::protobuf::testing::AnyWrapper*>(
- ::google::protobuf::testing::AnyWrapper::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->top_level_any_ = const_cast< ::google::protobuf::Any*>(
- ::google::protobuf::Any::internal_default_instance());
- ::google::protobuf::testing::_AnyTestCases_default_instance_._instance.get_mutable()->top_level_any_with_type_field_at_end_ = const_cast< ::google::protobuf::Any*>(
- ::google::protobuf::Any::internal_default_instance());
- }
- void AnyTestCases::clear_top_level_any() {
- if (GetArenaNoVirtual() == NULL && top_level_any_ != NULL) {
- delete top_level_any_;
- }
- top_level_any_ = NULL;
- }
- void AnyTestCases::clear_top_level_any_with_type_field_at_end() {
- if (GetArenaNoVirtual() == NULL && top_level_any_with_type_field_at_end_ != NULL) {
- delete top_level_any_with_type_field_at_end_;
- }
- top_level_any_with_type_field_at_end_ = NULL;
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int AnyTestCases::kEmptyAnyFieldNumber;
- const int AnyTestCases::kTypeOnlyAnyFieldNumber;
- const int AnyTestCases::kWrapperAnyFieldNumber;
- const int AnyTestCases::kAnyWithTimestampValueFieldNumber;
- const int AnyTestCases::kAnyWithDurationValueFieldNumber;
- const int AnyTestCases::kAnyWithStructValueFieldNumber;
- const int AnyTestCases::kRecursiveAnyFieldNumber;
- const int AnyTestCases::kAnyWithMessageValueFieldNumber;
- const int AnyTestCases::kAnyWithNestedMessageFieldNumber;
- const int AnyTestCases::kAnyWithMessageWithWrapperTypeFieldNumber;
- const int AnyTestCases::kAnyWithMessageWithTimestampFieldNumber;
- const int AnyTestCases::kAnyWithMessageContainingMapFieldNumber;
- const int AnyTestCases::kAnyWithMessageContainingStructFieldNumber;
- const int AnyTestCases::kAnyWithMessageContainingRepeatedMessageFieldNumber;
- const int AnyTestCases::kRecursiveAnyWithTypeFieldAtEndFieldNumber;
- const int AnyTestCases::kTopLevelAnyFieldNumber;
- const int AnyTestCases::kTopLevelAnyWithTypeFieldAtEndFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- AnyTestCases::AnyTestCases()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyTestCases.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyTestCases)
- }
- AnyTestCases::AnyTestCases(const AnyTestCases& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- if (from.has_empty_any()) {
- empty_any_ = new ::google::protobuf::testing::AnyWrapper(*from.empty_any_);
- } else {
- empty_any_ = NULL;
- }
- if (from.has_type_only_any()) {
- type_only_any_ = new ::google::protobuf::testing::AnyWrapper(*from.type_only_any_);
- } else {
- type_only_any_ = NULL;
- }
- if (from.has_wrapper_any()) {
- wrapper_any_ = new ::google::protobuf::testing::AnyWrapper(*from.wrapper_any_);
- } else {
- wrapper_any_ = NULL;
- }
- if (from.has_any_with_timestamp_value()) {
- any_with_timestamp_value_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_timestamp_value_);
- } else {
- any_with_timestamp_value_ = NULL;
- }
- if (from.has_any_with_duration_value()) {
- any_with_duration_value_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_duration_value_);
- } else {
- any_with_duration_value_ = NULL;
- }
- if (from.has_any_with_struct_value()) {
- any_with_struct_value_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_struct_value_);
- } else {
- any_with_struct_value_ = NULL;
- }
- if (from.has_recursive_any()) {
- recursive_any_ = new ::google::protobuf::testing::AnyWrapper(*from.recursive_any_);
- } else {
- recursive_any_ = NULL;
- }
- if (from.has_any_with_message_value()) {
- any_with_message_value_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_value_);
- } else {
- any_with_message_value_ = NULL;
- }
- if (from.has_any_with_nested_message()) {
- any_with_nested_message_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_nested_message_);
- } else {
- any_with_nested_message_ = NULL;
- }
- if (from.has_any_with_message_with_wrapper_type()) {
- any_with_message_with_wrapper_type_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_with_wrapper_type_);
- } else {
- any_with_message_with_wrapper_type_ = NULL;
- }
- if (from.has_any_with_message_with_timestamp()) {
- any_with_message_with_timestamp_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_with_timestamp_);
- } else {
- any_with_message_with_timestamp_ = NULL;
- }
- if (from.has_any_with_message_containing_map()) {
- any_with_message_containing_map_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_containing_map_);
- } else {
- any_with_message_containing_map_ = NULL;
- }
- if (from.has_any_with_message_containing_struct()) {
- any_with_message_containing_struct_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_containing_struct_);
- } else {
- any_with_message_containing_struct_ = NULL;
- }
- if (from.has_any_with_message_containing_repeated_message()) {
- any_with_message_containing_repeated_message_ = new ::google::protobuf::testing::AnyWrapper(*from.any_with_message_containing_repeated_message_);
- } else {
- any_with_message_containing_repeated_message_ = NULL;
- }
- if (from.has_recursive_any_with_type_field_at_end()) {
- recursive_any_with_type_field_at_end_ = new ::google::protobuf::testing::AnyWrapper(*from.recursive_any_with_type_field_at_end_);
- } else {
- recursive_any_with_type_field_at_end_ = NULL;
- }
- if (from.has_top_level_any()) {
- top_level_any_ = new ::google::protobuf::Any(*from.top_level_any_);
- } else {
- top_level_any_ = NULL;
- }
- if (from.has_top_level_any_with_type_field_at_end()) {
- top_level_any_with_type_field_at_end_ = new ::google::protobuf::Any(*from.top_level_any_with_type_field_at_end_);
- } else {
- top_level_any_with_type_field_at_end_ = NULL;
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyTestCases)
- }
- void AnyTestCases::SharedCtor() {
- ::memset(&empty_any_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&top_level_any_with_type_field_at_end_) -
- reinterpret_cast<char*>(&empty_any_)) + sizeof(top_level_any_with_type_field_at_end_));
- }
- AnyTestCases::~AnyTestCases() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.AnyTestCases)
- SharedDtor();
- }
- void AnyTestCases::SharedDtor() {
- if (this != internal_default_instance()) delete empty_any_;
- if (this != internal_default_instance()) delete type_only_any_;
- if (this != internal_default_instance()) delete wrapper_any_;
- if (this != internal_default_instance()) delete any_with_timestamp_value_;
- if (this != internal_default_instance()) delete any_with_duration_value_;
- if (this != internal_default_instance()) delete any_with_struct_value_;
- if (this != internal_default_instance()) delete recursive_any_;
- if (this != internal_default_instance()) delete any_with_message_value_;
- if (this != internal_default_instance()) delete any_with_nested_message_;
- if (this != internal_default_instance()) delete any_with_message_with_wrapper_type_;
- if (this != internal_default_instance()) delete any_with_message_with_timestamp_;
- if (this != internal_default_instance()) delete any_with_message_containing_map_;
- if (this != internal_default_instance()) delete any_with_message_containing_struct_;
- if (this != internal_default_instance()) delete any_with_message_containing_repeated_message_;
- if (this != internal_default_instance()) delete recursive_any_with_type_field_at_end_;
- if (this != internal_default_instance()) delete top_level_any_;
- if (this != internal_default_instance()) delete top_level_any_with_type_field_at_end_;
- }
- void AnyTestCases::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* AnyTestCases::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const AnyTestCases& AnyTestCases::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyTestCases.base);
- return *internal_default_instance();
- }
- void AnyTestCases::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.AnyTestCases)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- if (GetArenaNoVirtual() == NULL && empty_any_ != NULL) {
- delete empty_any_;
- }
- empty_any_ = NULL;
- if (GetArenaNoVirtual() == NULL && type_only_any_ != NULL) {
- delete type_only_any_;
- }
- type_only_any_ = NULL;
- if (GetArenaNoVirtual() == NULL && wrapper_any_ != NULL) {
- delete wrapper_any_;
- }
- wrapper_any_ = NULL;
- if (GetArenaNoVirtual() == NULL && any_with_timestamp_value_ != NULL) {
- delete any_with_timestamp_value_;
- }
- any_with_timestamp_value_ = NULL;
- if (GetArenaNoVirtual() == NULL && any_with_duration_value_ != NULL) {
- delete any_with_duration_value_;
- }
- any_with_duration_value_ = NULL;
- if (GetArenaNoVirtual() == NULL && any_with_struct_value_ != NULL) {
- delete any_with_struct_value_;
- }
- any_with_struct_value_ = NULL;
- if (GetArenaNoVirtual() == NULL && recursive_any_ != NULL) {
- delete recursive_any_;
- }
- recursive_any_ = NULL;
- if (GetArenaNoVirtual() == NULL && any_with_message_value_ != NULL) {
- delete any_with_message_value_;
- }
- any_with_message_value_ = NULL;
- if (GetArenaNoVirtual() == NULL && any_with_nested_message_ != NULL) {
- delete any_with_nested_message_;
- }
- any_with_nested_message_ = NULL;
- if (GetArenaNoVirtual() == NULL && any_with_message_with_wrapper_type_ != NULL) {
- delete any_with_message_with_wrapper_type_;
- }
- any_with_message_with_wrapper_type_ = NULL;
- if (GetArenaNoVirtual() == NULL && any_with_message_with_timestamp_ != NULL) {
- delete any_with_message_with_timestamp_;
- }
- any_with_message_with_timestamp_ = NULL;
- if (GetArenaNoVirtual() == NULL && any_with_message_containing_map_ != NULL) {
- delete any_with_message_containing_map_;
- }
- any_with_message_containing_map_ = NULL;
- if (GetArenaNoVirtual() == NULL && any_with_message_containing_struct_ != NULL) {
- delete any_with_message_containing_struct_;
- }
- any_with_message_containing_struct_ = NULL;
- if (GetArenaNoVirtual() == NULL && any_with_message_containing_repeated_message_ != NULL) {
- delete any_with_message_containing_repeated_message_;
- }
- any_with_message_containing_repeated_message_ = NULL;
- if (GetArenaNoVirtual() == NULL && recursive_any_with_type_field_at_end_ != NULL) {
- delete recursive_any_with_type_field_at_end_;
- }
- recursive_any_with_type_field_at_end_ = NULL;
- if (GetArenaNoVirtual() == NULL && top_level_any_ != NULL) {
- delete top_level_any_;
- }
- top_level_any_ = NULL;
- if (GetArenaNoVirtual() == NULL && top_level_any_with_type_field_at_end_ != NULL) {
- delete top_level_any_with_type_field_at_end_;
- }
- top_level_any_with_type_field_at_end_ = NULL;
- _internal_metadata_.Clear();
- }
- bool AnyTestCases::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.protobuf.testing.AnyTestCases)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // .google.protobuf.testing.AnyWrapper empty_any = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_empty_any()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.AnyWrapper type_only_any = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_type_only_any()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.AnyWrapper wrapper_any = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_wrapper_any()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.AnyWrapper any_with_timestamp_value = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_any_with_timestamp_value()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.AnyWrapper any_with_duration_value = 5;
- case 5: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_any_with_duration_value()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.AnyWrapper any_with_struct_value = 6;
- case 6: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_any_with_struct_value()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.AnyWrapper recursive_any = 7;
- case 7: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_recursive_any()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_value = 8;
- case 8: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_any_with_message_value()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.AnyWrapper any_with_nested_message = 9;
- case 9: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_any_with_nested_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_with_wrapper_type = 10;
- case 10: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_any_with_message_with_wrapper_type()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_with_timestamp = 11;
- case 11: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_any_with_message_with_timestamp()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_containing_map = 12;
- case 12: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_any_with_message_containing_map()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_containing_struct = 13;
- case 13: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_any_with_message_containing_struct()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_containing_repeated_message = 14;
- case 14: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_any_with_message_containing_repeated_message()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.AnyWrapper recursive_any_with_type_field_at_end = 15;
- case 15: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_recursive_any_with_type_field_at_end()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Any top_level_any = 50;
- case 50: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(146u /* 402 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_top_level_any()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Any top_level_any_with_type_field_at_end = 51;
- case 51: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(154u /* 410 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_top_level_any_with_type_field_at_end()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.protobuf.testing.AnyTestCases)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyTestCases)
- return false;
- #undef DO_
- }
- void AnyTestCases::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.AnyTestCases)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .google.protobuf.testing.AnyWrapper empty_any = 1;
- if (this->has_empty_any()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->_internal_empty_any(), output);
- }
- // .google.protobuf.testing.AnyWrapper type_only_any = 2;
- if (this->has_type_only_any()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 2, this->_internal_type_only_any(), output);
- }
- // .google.protobuf.testing.AnyWrapper wrapper_any = 3;
- if (this->has_wrapper_any()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 3, this->_internal_wrapper_any(), output);
- }
- // .google.protobuf.testing.AnyWrapper any_with_timestamp_value = 4;
- if (this->has_any_with_timestamp_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 4, this->_internal_any_with_timestamp_value(), output);
- }
- // .google.protobuf.testing.AnyWrapper any_with_duration_value = 5;
- if (this->has_any_with_duration_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, this->_internal_any_with_duration_value(), output);
- }
- // .google.protobuf.testing.AnyWrapper any_with_struct_value = 6;
- if (this->has_any_with_struct_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 6, this->_internal_any_with_struct_value(), output);
- }
- // .google.protobuf.testing.AnyWrapper recursive_any = 7;
- if (this->has_recursive_any()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 7, this->_internal_recursive_any(), output);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_value = 8;
- if (this->has_any_with_message_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 8, this->_internal_any_with_message_value(), output);
- }
- // .google.protobuf.testing.AnyWrapper any_with_nested_message = 9;
- if (this->has_any_with_nested_message()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 9, this->_internal_any_with_nested_message(), output);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_with_wrapper_type = 10;
- if (this->has_any_with_message_with_wrapper_type()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 10, this->_internal_any_with_message_with_wrapper_type(), output);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_with_timestamp = 11;
- if (this->has_any_with_message_with_timestamp()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 11, this->_internal_any_with_message_with_timestamp(), output);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_containing_map = 12;
- if (this->has_any_with_message_containing_map()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 12, this->_internal_any_with_message_containing_map(), output);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_containing_struct = 13;
- if (this->has_any_with_message_containing_struct()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 13, this->_internal_any_with_message_containing_struct(), output);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_containing_repeated_message = 14;
- if (this->has_any_with_message_containing_repeated_message()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 14, this->_internal_any_with_message_containing_repeated_message(), output);
- }
- // .google.protobuf.testing.AnyWrapper recursive_any_with_type_field_at_end = 15;
- if (this->has_recursive_any_with_type_field_at_end()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 15, this->_internal_recursive_any_with_type_field_at_end(), output);
- }
- // .google.protobuf.Any top_level_any = 50;
- if (this->has_top_level_any()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 50, this->_internal_top_level_any(), output);
- }
- // .google.protobuf.Any top_level_any_with_type_field_at_end = 51;
- if (this->has_top_level_any_with_type_field_at_end()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 51, this->_internal_top_level_any_with_type_field_at_end(), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.testing.AnyTestCases)
- }
- ::google::protobuf::uint8* AnyTestCases::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.AnyTestCases)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .google.protobuf.testing.AnyWrapper empty_any = 1;
- if (this->has_empty_any()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 1, this->_internal_empty_any(), deterministic, target);
- }
- // .google.protobuf.testing.AnyWrapper type_only_any = 2;
- if (this->has_type_only_any()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 2, this->_internal_type_only_any(), deterministic, target);
- }
- // .google.protobuf.testing.AnyWrapper wrapper_any = 3;
- if (this->has_wrapper_any()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 3, this->_internal_wrapper_any(), deterministic, target);
- }
- // .google.protobuf.testing.AnyWrapper any_with_timestamp_value = 4;
- if (this->has_any_with_timestamp_value()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 4, this->_internal_any_with_timestamp_value(), deterministic, target);
- }
- // .google.protobuf.testing.AnyWrapper any_with_duration_value = 5;
- if (this->has_any_with_duration_value()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 5, this->_internal_any_with_duration_value(), deterministic, target);
- }
- // .google.protobuf.testing.AnyWrapper any_with_struct_value = 6;
- if (this->has_any_with_struct_value()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 6, this->_internal_any_with_struct_value(), deterministic, target);
- }
- // .google.protobuf.testing.AnyWrapper recursive_any = 7;
- if (this->has_recursive_any()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 7, this->_internal_recursive_any(), deterministic, target);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_value = 8;
- if (this->has_any_with_message_value()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 8, this->_internal_any_with_message_value(), deterministic, target);
- }
- // .google.protobuf.testing.AnyWrapper any_with_nested_message = 9;
- if (this->has_any_with_nested_message()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 9, this->_internal_any_with_nested_message(), deterministic, target);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_with_wrapper_type = 10;
- if (this->has_any_with_message_with_wrapper_type()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 10, this->_internal_any_with_message_with_wrapper_type(), deterministic, target);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_with_timestamp = 11;
- if (this->has_any_with_message_with_timestamp()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 11, this->_internal_any_with_message_with_timestamp(), deterministic, target);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_containing_map = 12;
- if (this->has_any_with_message_containing_map()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 12, this->_internal_any_with_message_containing_map(), deterministic, target);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_containing_struct = 13;
- if (this->has_any_with_message_containing_struct()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 13, this->_internal_any_with_message_containing_struct(), deterministic, target);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_containing_repeated_message = 14;
- if (this->has_any_with_message_containing_repeated_message()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 14, this->_internal_any_with_message_containing_repeated_message(), deterministic, target);
- }
- // .google.protobuf.testing.AnyWrapper recursive_any_with_type_field_at_end = 15;
- if (this->has_recursive_any_with_type_field_at_end()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 15, this->_internal_recursive_any_with_type_field_at_end(), deterministic, target);
- }
- // .google.protobuf.Any top_level_any = 50;
- if (this->has_top_level_any()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 50, this->_internal_top_level_any(), deterministic, target);
- }
- // .google.protobuf.Any top_level_any_with_type_field_at_end = 51;
- if (this->has_top_level_any_with_type_field_at_end()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 51, this->_internal_top_level_any_with_type_field_at_end(), deterministic, target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.AnyTestCases)
- return target;
- }
- size_t AnyTestCases::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyTestCases)
- size_t total_size = 0;
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // .google.protobuf.testing.AnyWrapper empty_any = 1;
- if (this->has_empty_any()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *empty_any_);
- }
- // .google.protobuf.testing.AnyWrapper type_only_any = 2;
- if (this->has_type_only_any()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *type_only_any_);
- }
- // .google.protobuf.testing.AnyWrapper wrapper_any = 3;
- if (this->has_wrapper_any()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *wrapper_any_);
- }
- // .google.protobuf.testing.AnyWrapper any_with_timestamp_value = 4;
- if (this->has_any_with_timestamp_value()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *any_with_timestamp_value_);
- }
- // .google.protobuf.testing.AnyWrapper any_with_duration_value = 5;
- if (this->has_any_with_duration_value()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *any_with_duration_value_);
- }
- // .google.protobuf.testing.AnyWrapper any_with_struct_value = 6;
- if (this->has_any_with_struct_value()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *any_with_struct_value_);
- }
- // .google.protobuf.testing.AnyWrapper recursive_any = 7;
- if (this->has_recursive_any()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *recursive_any_);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_value = 8;
- if (this->has_any_with_message_value()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *any_with_message_value_);
- }
- // .google.protobuf.testing.AnyWrapper any_with_nested_message = 9;
- if (this->has_any_with_nested_message()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *any_with_nested_message_);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_with_wrapper_type = 10;
- if (this->has_any_with_message_with_wrapper_type()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *any_with_message_with_wrapper_type_);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_with_timestamp = 11;
- if (this->has_any_with_message_with_timestamp()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *any_with_message_with_timestamp_);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_containing_map = 12;
- if (this->has_any_with_message_containing_map()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *any_with_message_containing_map_);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_containing_struct = 13;
- if (this->has_any_with_message_containing_struct()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *any_with_message_containing_struct_);
- }
- // .google.protobuf.testing.AnyWrapper any_with_message_containing_repeated_message = 14;
- if (this->has_any_with_message_containing_repeated_message()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *any_with_message_containing_repeated_message_);
- }
- // .google.protobuf.testing.AnyWrapper recursive_any_with_type_field_at_end = 15;
- if (this->has_recursive_any_with_type_field_at_end()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *recursive_any_with_type_field_at_end_);
- }
- // .google.protobuf.Any top_level_any = 50;
- if (this->has_top_level_any()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *top_level_any_);
- }
- // .google.protobuf.Any top_level_any_with_type_field_at_end = 51;
- if (this->has_top_level_any_with_type_field_at_end()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *top_level_any_with_type_field_at_end_);
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void AnyTestCases::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.AnyTestCases)
- GOOGLE_DCHECK_NE(&from, this);
- const AnyTestCases* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const AnyTestCases>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.AnyTestCases)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.AnyTestCases)
- MergeFrom(*source);
- }
- }
- void AnyTestCases::MergeFrom(const AnyTestCases& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyTestCases)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.has_empty_any()) {
- mutable_empty_any()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.empty_any());
- }
- if (from.has_type_only_any()) {
- mutable_type_only_any()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.type_only_any());
- }
- if (from.has_wrapper_any()) {
- mutable_wrapper_any()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.wrapper_any());
- }
- if (from.has_any_with_timestamp_value()) {
- mutable_any_with_timestamp_value()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_timestamp_value());
- }
- if (from.has_any_with_duration_value()) {
- mutable_any_with_duration_value()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_duration_value());
- }
- if (from.has_any_with_struct_value()) {
- mutable_any_with_struct_value()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_struct_value());
- }
- if (from.has_recursive_any()) {
- mutable_recursive_any()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.recursive_any());
- }
- if (from.has_any_with_message_value()) {
- mutable_any_with_message_value()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_value());
- }
- if (from.has_any_with_nested_message()) {
- mutable_any_with_nested_message()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_nested_message());
- }
- if (from.has_any_with_message_with_wrapper_type()) {
- mutable_any_with_message_with_wrapper_type()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_with_wrapper_type());
- }
- if (from.has_any_with_message_with_timestamp()) {
- mutable_any_with_message_with_timestamp()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_with_timestamp());
- }
- if (from.has_any_with_message_containing_map()) {
- mutable_any_with_message_containing_map()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_containing_map());
- }
- if (from.has_any_with_message_containing_struct()) {
- mutable_any_with_message_containing_struct()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_containing_struct());
- }
- if (from.has_any_with_message_containing_repeated_message()) {
- mutable_any_with_message_containing_repeated_message()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.any_with_message_containing_repeated_message());
- }
- if (from.has_recursive_any_with_type_field_at_end()) {
- mutable_recursive_any_with_type_field_at_end()->::google::protobuf::testing::AnyWrapper::MergeFrom(from.recursive_any_with_type_field_at_end());
- }
- if (from.has_top_level_any()) {
- mutable_top_level_any()->::google::protobuf::Any::MergeFrom(from.top_level_any());
- }
- if (from.has_top_level_any_with_type_field_at_end()) {
- mutable_top_level_any_with_type_field_at_end()->::google::protobuf::Any::MergeFrom(from.top_level_any_with_type_field_at_end());
- }
- }
- void AnyTestCases::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.AnyTestCases)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void AnyTestCases::CopyFrom(const AnyTestCases& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.AnyTestCases)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool AnyTestCases::IsInitialized() const {
- return true;
- }
- void AnyTestCases::Swap(AnyTestCases* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void AnyTestCases::InternalSwap(AnyTestCases* other) {
- using std::swap;
- swap(empty_any_, other->empty_any_);
- swap(type_only_any_, other->type_only_any_);
- swap(wrapper_any_, other->wrapper_any_);
- swap(any_with_timestamp_value_, other->any_with_timestamp_value_);
- swap(any_with_duration_value_, other->any_with_duration_value_);
- swap(any_with_struct_value_, other->any_with_struct_value_);
- swap(recursive_any_, other->recursive_any_);
- swap(any_with_message_value_, other->any_with_message_value_);
- swap(any_with_nested_message_, other->any_with_nested_message_);
- swap(any_with_message_with_wrapper_type_, other->any_with_message_with_wrapper_type_);
- swap(any_with_message_with_timestamp_, other->any_with_message_with_timestamp_);
- swap(any_with_message_containing_map_, other->any_with_message_containing_map_);
- swap(any_with_message_containing_struct_, other->any_with_message_containing_struct_);
- swap(any_with_message_containing_repeated_message_, other->any_with_message_containing_repeated_message_);
- swap(recursive_any_with_type_field_at_end_, other->recursive_any_with_type_field_at_end_);
- swap(top_level_any_, other->top_level_any_);
- swap(top_level_any_with_type_field_at_end_, other->top_level_any_with_type_field_at_end_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata AnyTestCases::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void AnyWrapper::InitAsDefaultInstance() {
- ::google::protobuf::testing::_AnyWrapper_default_instance_._instance.get_mutable()->any_ = const_cast< ::google::protobuf::Any*>(
- ::google::protobuf::Any::internal_default_instance());
- }
- void AnyWrapper::clear_any() {
- if (GetArenaNoVirtual() == NULL && any_ != NULL) {
- delete any_;
- }
- any_ = NULL;
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int AnyWrapper::kAnyFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- AnyWrapper::AnyWrapper()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyWrapper.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyWrapper)
- }
- AnyWrapper::AnyWrapper(const AnyWrapper& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- if (from.has_any()) {
- any_ = new ::google::protobuf::Any(*from.any_);
- } else {
- any_ = NULL;
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyWrapper)
- }
- void AnyWrapper::SharedCtor() {
- any_ = NULL;
- }
- AnyWrapper::~AnyWrapper() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.AnyWrapper)
- SharedDtor();
- }
- void AnyWrapper::SharedDtor() {
- if (this != internal_default_instance()) delete any_;
- }
- void AnyWrapper::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* AnyWrapper::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const AnyWrapper& AnyWrapper::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyWrapper.base);
- return *internal_default_instance();
- }
- void AnyWrapper::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.AnyWrapper)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- if (GetArenaNoVirtual() == NULL && any_ != NULL) {
- delete any_;
- }
- any_ = NULL;
- _internal_metadata_.Clear();
- }
- bool AnyWrapper::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.protobuf.testing.AnyWrapper)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // .google.protobuf.Any any = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_any()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.protobuf.testing.AnyWrapper)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyWrapper)
- return false;
- #undef DO_
- }
- void AnyWrapper::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.AnyWrapper)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .google.protobuf.Any any = 1;
- if (this->has_any()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->_internal_any(), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.testing.AnyWrapper)
- }
- ::google::protobuf::uint8* AnyWrapper::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.AnyWrapper)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .google.protobuf.Any any = 1;
- if (this->has_any()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 1, this->_internal_any(), deterministic, target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.AnyWrapper)
- return target;
- }
- size_t AnyWrapper::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyWrapper)
- size_t total_size = 0;
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // .google.protobuf.Any any = 1;
- if (this->has_any()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *any_);
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void AnyWrapper::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.AnyWrapper)
- GOOGLE_DCHECK_NE(&from, this);
- const AnyWrapper* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const AnyWrapper>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.AnyWrapper)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.AnyWrapper)
- MergeFrom(*source);
- }
- }
- void AnyWrapper::MergeFrom(const AnyWrapper& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyWrapper)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.has_any()) {
- mutable_any()->::google::protobuf::Any::MergeFrom(from.any());
- }
- }
- void AnyWrapper::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.AnyWrapper)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void AnyWrapper::CopyFrom(const AnyWrapper& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.AnyWrapper)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool AnyWrapper::IsInitialized() const {
- return true;
- }
- void AnyWrapper::Swap(AnyWrapper* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void AnyWrapper::InternalSwap(AnyWrapper* other) {
- using std::swap;
- swap(any_, other->any_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata AnyWrapper::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void Imports::InitAsDefaultInstance() {
- ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->dbl_ = const_cast< ::google::protobuf::DoubleValue*>(
- ::google::protobuf::DoubleValue::internal_default_instance());
- ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->struct__ = const_cast< ::google::protobuf::Struct*>(
- ::google::protobuf::Struct::internal_default_instance());
- ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->timestamp_ = const_cast< ::google::protobuf::Timestamp*>(
- ::google::protobuf::Timestamp::internal_default_instance());
- ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->duration_ = const_cast< ::google::protobuf::Duration*>(
- ::google::protobuf::Duration::internal_default_instance());
- ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->i32_ = const_cast< ::google::protobuf::Int32Value*>(
- ::google::protobuf::Int32Value::internal_default_instance());
- ::google::protobuf::testing::_Imports_default_instance_._instance.get_mutable()->data_ = const_cast< ::google::protobuf::testing::Data*>(
- ::google::protobuf::testing::Data::internal_default_instance());
- }
- void Imports::clear_dbl() {
- if (GetArenaNoVirtual() == NULL && dbl_ != NULL) {
- delete dbl_;
- }
- dbl_ = NULL;
- }
- void Imports::clear_struct_() {
- if (GetArenaNoVirtual() == NULL && struct__ != NULL) {
- delete struct__;
- }
- struct__ = NULL;
- }
- void Imports::clear_timestamp() {
- if (GetArenaNoVirtual() == NULL && timestamp_ != NULL) {
- delete timestamp_;
- }
- timestamp_ = NULL;
- }
- void Imports::clear_duration() {
- if (GetArenaNoVirtual() == NULL && duration_ != NULL) {
- delete duration_;
- }
- duration_ = NULL;
- }
- void Imports::clear_i32() {
- if (GetArenaNoVirtual() == NULL && i32_ != NULL) {
- delete i32_;
- }
- i32_ = NULL;
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int Imports::kDblFieldNumber;
- const int Imports::kStructFieldNumber;
- const int Imports::kTimestampFieldNumber;
- const int Imports::kDurationFieldNumber;
- const int Imports::kI32FieldNumber;
- const int Imports::kDataFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- Imports::Imports()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Imports.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.Imports)
- }
- Imports::Imports(const Imports& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- if (from.has_dbl()) {
- dbl_ = new ::google::protobuf::DoubleValue(*from.dbl_);
- } else {
- dbl_ = NULL;
- }
- if (from.has_struct_()) {
- struct__ = new ::google::protobuf::Struct(*from.struct__);
- } else {
- struct__ = NULL;
- }
- if (from.has_timestamp()) {
- timestamp_ = new ::google::protobuf::Timestamp(*from.timestamp_);
- } else {
- timestamp_ = NULL;
- }
- if (from.has_duration()) {
- duration_ = new ::google::protobuf::Duration(*from.duration_);
- } else {
- duration_ = NULL;
- }
- if (from.has_i32()) {
- i32_ = new ::google::protobuf::Int32Value(*from.i32_);
- } else {
- i32_ = NULL;
- }
- if (from.has_data()) {
- data_ = new ::google::protobuf::testing::Data(*from.data_);
- } else {
- data_ = NULL;
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.Imports)
- }
- void Imports::SharedCtor() {
- ::memset(&dbl_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&data_) -
- reinterpret_cast<char*>(&dbl_)) + sizeof(data_));
- }
- Imports::~Imports() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.Imports)
- SharedDtor();
- }
- void Imports::SharedDtor() {
- if (this != internal_default_instance()) delete dbl_;
- if (this != internal_default_instance()) delete struct__;
- if (this != internal_default_instance()) delete timestamp_;
- if (this != internal_default_instance()) delete duration_;
- if (this != internal_default_instance()) delete i32_;
- if (this != internal_default_instance()) delete data_;
- }
- void Imports::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* Imports::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const Imports& Imports::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Imports.base);
- return *internal_default_instance();
- }
- void Imports::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.Imports)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- if (GetArenaNoVirtual() == NULL && dbl_ != NULL) {
- delete dbl_;
- }
- dbl_ = NULL;
- if (GetArenaNoVirtual() == NULL && struct__ != NULL) {
- delete struct__;
- }
- struct__ = NULL;
- if (GetArenaNoVirtual() == NULL && timestamp_ != NULL) {
- delete timestamp_;
- }
- timestamp_ = NULL;
- if (GetArenaNoVirtual() == NULL && duration_ != NULL) {
- delete duration_;
- }
- duration_ = NULL;
- if (GetArenaNoVirtual() == NULL && i32_ != NULL) {
- delete i32_;
- }
- i32_ = NULL;
- if (GetArenaNoVirtual() == NULL && data_ != NULL) {
- delete data_;
- }
- data_ = NULL;
- _internal_metadata_.Clear();
- }
- bool Imports::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.protobuf.testing.Imports)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // .google.protobuf.DoubleValue dbl = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_dbl()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Struct struct = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_struct_()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Timestamp timestamp = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_timestamp()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Duration duration = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_duration()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Int32Value i32 = 5;
- case 5: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_i32()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.Data data = 100;
- case 100: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_data()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.protobuf.testing.Imports)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.Imports)
- return false;
- #undef DO_
- }
- void Imports::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.Imports)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .google.protobuf.DoubleValue dbl = 1;
- if (this->has_dbl()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->_internal_dbl(), output);
- }
- // .google.protobuf.Struct struct = 2;
- if (this->has_struct_()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 2, this->_internal_struct_(), output);
- }
- // .google.protobuf.Timestamp timestamp = 3;
- if (this->has_timestamp()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 3, this->_internal_timestamp(), output);
- }
- // .google.protobuf.Duration duration = 4;
- if (this->has_duration()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 4, this->_internal_duration(), output);
- }
- // .google.protobuf.Int32Value i32 = 5;
- if (this->has_i32()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, this->_internal_i32(), output);
- }
- // .google.protobuf.testing.Data data = 100;
- if (this->has_data()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 100, this->_internal_data(), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.testing.Imports)
- }
- ::google::protobuf::uint8* Imports::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.Imports)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .google.protobuf.DoubleValue dbl = 1;
- if (this->has_dbl()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 1, this->_internal_dbl(), deterministic, target);
- }
- // .google.protobuf.Struct struct = 2;
- if (this->has_struct_()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 2, this->_internal_struct_(), deterministic, target);
- }
- // .google.protobuf.Timestamp timestamp = 3;
- if (this->has_timestamp()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 3, this->_internal_timestamp(), deterministic, target);
- }
- // .google.protobuf.Duration duration = 4;
- if (this->has_duration()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 4, this->_internal_duration(), deterministic, target);
- }
- // .google.protobuf.Int32Value i32 = 5;
- if (this->has_i32()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 5, this->_internal_i32(), deterministic, target);
- }
- // .google.protobuf.testing.Data data = 100;
- if (this->has_data()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 100, this->_internal_data(), deterministic, target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.Imports)
- return target;
- }
- size_t Imports::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.Imports)
- size_t total_size = 0;
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // .google.protobuf.DoubleValue dbl = 1;
- if (this->has_dbl()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *dbl_);
- }
- // .google.protobuf.Struct struct = 2;
- if (this->has_struct_()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *struct__);
- }
- // .google.protobuf.Timestamp timestamp = 3;
- if (this->has_timestamp()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *timestamp_);
- }
- // .google.protobuf.Duration duration = 4;
- if (this->has_duration()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *duration_);
- }
- // .google.protobuf.Int32Value i32 = 5;
- if (this->has_i32()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *i32_);
- }
- // .google.protobuf.testing.Data data = 100;
- if (this->has_data()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *data_);
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void Imports::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.Imports)
- GOOGLE_DCHECK_NE(&from, this);
- const Imports* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Imports>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.Imports)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.Imports)
- MergeFrom(*source);
- }
- }
- void Imports::MergeFrom(const Imports& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.Imports)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.has_dbl()) {
- mutable_dbl()->::google::protobuf::DoubleValue::MergeFrom(from.dbl());
- }
- if (from.has_struct_()) {
- mutable_struct_()->::google::protobuf::Struct::MergeFrom(from.struct_());
- }
- if (from.has_timestamp()) {
- mutable_timestamp()->::google::protobuf::Timestamp::MergeFrom(from.timestamp());
- }
- if (from.has_duration()) {
- mutable_duration()->::google::protobuf::Duration::MergeFrom(from.duration());
- }
- if (from.has_i32()) {
- mutable_i32()->::google::protobuf::Int32Value::MergeFrom(from.i32());
- }
- if (from.has_data()) {
- mutable_data()->::google::protobuf::testing::Data::MergeFrom(from.data());
- }
- }
- void Imports::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.Imports)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void Imports::CopyFrom(const Imports& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.Imports)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool Imports::IsInitialized() const {
- return true;
- }
- void Imports::Swap(Imports* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void Imports::InternalSwap(Imports* other) {
- using std::swap;
- swap(dbl_, other->dbl_);
- swap(struct__, other->struct__);
- swap(timestamp_, other->timestamp_);
- swap(duration_, other->duration_);
- swap(i32_, other->i32_);
- swap(data_, other->data_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata Imports::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- Data_MapDataEntry_DoNotUse::Data_MapDataEntry_DoNotUse() {}
- Data_MapDataEntry_DoNotUse::Data_MapDataEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
- void Data_MapDataEntry_DoNotUse::MergeFrom(const Data_MapDataEntry_DoNotUse& other) {
- MergeFromInternal(other);
- }
- ::google::protobuf::Metadata Data_MapDataEntry_DoNotUse::GetMetadata() const {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[3];
- }
- void Data_MapDataEntry_DoNotUse::MergeFrom(
- const ::google::protobuf::Message& other) {
- ::google::protobuf::Message::MergeFrom(other);
- }
- // ===================================================================
- void Data::InitAsDefaultInstance() {
- ::google::protobuf::testing::_Data_default_instance_._instance.get_mutable()->nested_data_ = const_cast< ::google::protobuf::testing::Data*>(
- ::google::protobuf::testing::Data::internal_default_instance());
- ::google::protobuf::testing::_Data_default_instance_._instance.get_mutable()->int_wrapper_ = const_cast< ::google::protobuf::Int32Value*>(
- ::google::protobuf::Int32Value::internal_default_instance());
- ::google::protobuf::testing::_Data_default_instance_._instance.get_mutable()->time_ = const_cast< ::google::protobuf::Timestamp*>(
- ::google::protobuf::Timestamp::internal_default_instance());
- ::google::protobuf::testing::_Data_default_instance_._instance.get_mutable()->struct_data_ = const_cast< ::google::protobuf::Struct*>(
- ::google::protobuf::Struct::internal_default_instance());
- }
- void Data::clear_int_wrapper() {
- if (GetArenaNoVirtual() == NULL && int_wrapper_ != NULL) {
- delete int_wrapper_;
- }
- int_wrapper_ = NULL;
- }
- void Data::clear_time() {
- if (GetArenaNoVirtual() == NULL && time_ != NULL) {
- delete time_;
- }
- time_ = NULL;
- }
- void Data::clear_struct_data() {
- if (GetArenaNoVirtual() == NULL && struct_data_ != NULL) {
- delete struct_data_;
- }
- struct_data_ = NULL;
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int Data::kAttrFieldNumber;
- const int Data::kStrFieldNumber;
- const int Data::kMsgsFieldNumber;
- const int Data::kNestedDataFieldNumber;
- const int Data::kIntWrapperFieldNumber;
- const int Data::kTimeFieldNumber;
- const int Data::kMapDataFieldNumber;
- const int Data::kStructDataFieldNumber;
- const int Data::kRepeatedDataFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- Data::Data()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Data.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.Data)
- }
- Data::Data(const Data& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- msgs_(from.msgs_),
- repeated_data_(from.repeated_data_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- map_data_.MergeFrom(from.map_data_);
- str_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.str().size() > 0) {
- str_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.str_);
- }
- if (from.has_nested_data()) {
- nested_data_ = new ::google::protobuf::testing::Data(*from.nested_data_);
- } else {
- nested_data_ = NULL;
- }
- if (from.has_int_wrapper()) {
- int_wrapper_ = new ::google::protobuf::Int32Value(*from.int_wrapper_);
- } else {
- int_wrapper_ = NULL;
- }
- if (from.has_time()) {
- time_ = new ::google::protobuf::Timestamp(*from.time_);
- } else {
- time_ = NULL;
- }
- if (from.has_struct_data()) {
- struct_data_ = new ::google::protobuf::Struct(*from.struct_data_);
- } else {
- struct_data_ = NULL;
- }
- attr_ = from.attr_;
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.Data)
- }
- void Data::SharedCtor() {
- str_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::memset(&nested_data_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&attr_) -
- reinterpret_cast<char*>(&nested_data_)) + sizeof(attr_));
- }
- Data::~Data() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.Data)
- SharedDtor();
- }
- void Data::SharedDtor() {
- str_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete nested_data_;
- if (this != internal_default_instance()) delete int_wrapper_;
- if (this != internal_default_instance()) delete time_;
- if (this != internal_default_instance()) delete struct_data_;
- }
- void Data::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* Data::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const Data& Data::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_Data.base);
- return *internal_default_instance();
- }
- void Data::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.Data)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- msgs_.Clear();
- map_data_.Clear();
- repeated_data_.Clear();
- str_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (GetArenaNoVirtual() == NULL && nested_data_ != NULL) {
- delete nested_data_;
- }
- nested_data_ = NULL;
- if (GetArenaNoVirtual() == NULL && int_wrapper_ != NULL) {
- delete int_wrapper_;
- }
- int_wrapper_ = NULL;
- if (GetArenaNoVirtual() == NULL && time_ != NULL) {
- delete time_;
- }
- time_ = NULL;
- if (GetArenaNoVirtual() == NULL && struct_data_ != NULL) {
- delete struct_data_;
- }
- struct_data_ = NULL;
- attr_ = 0;
- _internal_metadata_.Clear();
- }
- bool Data::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.protobuf.testing.Data)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // int32 attr = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &attr_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // string str = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_str()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->str().data(), static_cast<int>(this->str().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.testing.Data.str"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated string msgs = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->add_msgs()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->msgs(this->msgs_size() - 1).data(),
- static_cast<int>(this->msgs(this->msgs_size() - 1).length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.testing.Data.msgs"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.Data nested_data = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_nested_data()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Int32Value int_wrapper = 5;
- case 5: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_int_wrapper()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Timestamp time = 6;
- case 6: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_time()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // map<string, string> map_data = 7;
- case 7: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
- Data_MapDataEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
- Data_MapDataEntry_DoNotUse,
- ::std::string, ::std::string,
- ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
- ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
- 0 >,
- ::google::protobuf::Map< ::std::string, ::std::string > > parser(&map_data_);
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, &parser));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- parser.key().data(), static_cast<int>(parser.key().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.testing.Data.MapDataEntry.key"));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- parser.value().data(), static_cast<int>(parser.value().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.testing.Data.MapDataEntry.value"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Struct struct_data = 8;
- case 8: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_struct_data()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .google.protobuf.testing.Data repeated_data = 9;
- case 9: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, add_repeated_data()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.protobuf.testing.Data)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.Data)
- return false;
- #undef DO_
- }
- void Data::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.Data)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 attr = 1;
- if (this->attr() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->attr(), output);
- }
- // string str = 2;
- if (this->str().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->str().data(), static_cast<int>(this->str().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.Data.str");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->str(), output);
- }
- // repeated string msgs = 3;
- for (int i = 0, n = this->msgs_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->msgs(i).data(), static_cast<int>(this->msgs(i).length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.Data.msgs");
- ::google::protobuf::internal::WireFormatLite::WriteString(
- 3, this->msgs(i), output);
- }
- // .google.protobuf.testing.Data nested_data = 4;
- if (this->has_nested_data()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 4, this->_internal_nested_data(), output);
- }
- // .google.protobuf.Int32Value int_wrapper = 5;
- if (this->has_int_wrapper()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, this->_internal_int_wrapper(), output);
- }
- // .google.protobuf.Timestamp time = 6;
- if (this->has_time()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 6, this->_internal_time(), output);
- }
- // map<string, string> map_data = 7;
- if (!this->map_data().empty()) {
- typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
- ConstPtr;
- typedef ConstPtr SortItem;
- typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
- struct Utf8Check {
- static void Check(ConstPtr p) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- p->first.data(), static_cast<int>(p->first.length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.Data.MapDataEntry.key");
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- p->second.data(), static_cast<int>(p->second.length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.Data.MapDataEntry.value");
- }
- };
- if (output->IsSerializationDeterministic() &&
- this->map_data().size() > 1) {
- ::std::unique_ptr<SortItem[]> items(
- new SortItem[this->map_data().size()]);
- typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
- size_type n = 0;
- for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
- it = this->map_data().begin();
- it != this->map_data().end(); ++it, ++n) {
- items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
- }
- ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
- ::std::unique_ptr<Data_MapDataEntry_DoNotUse> entry;
- for (size_type i = 0; i < n; i++) {
- entry.reset(map_data_.NewEntryWrapper(
- items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 7, *entry, output);
- Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
- }
- } else {
- ::std::unique_ptr<Data_MapDataEntry_DoNotUse> entry;
- for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
- it = this->map_data().begin();
- it != this->map_data().end(); ++it) {
- entry.reset(map_data_.NewEntryWrapper(
- it->first, it->second));
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 7, *entry, output);
- Utf8Check::Check(&*it);
- }
- }
- }
- // .google.protobuf.Struct struct_data = 8;
- if (this->has_struct_data()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 8, this->_internal_struct_data(), output);
- }
- // repeated .google.protobuf.testing.Data repeated_data = 9;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_data_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 9,
- this->repeated_data(static_cast<int>(i)),
- output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.testing.Data)
- }
- ::google::protobuf::uint8* Data::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.Data)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // int32 attr = 1;
- if (this->attr() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->attr(), target);
- }
- // string str = 2;
- if (this->str().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->str().data(), static_cast<int>(this->str().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.Data.str");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->str(), target);
- }
- // repeated string msgs = 3;
- for (int i = 0, n = this->msgs_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->msgs(i).data(), static_cast<int>(this->msgs(i).length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.Data.msgs");
- target = ::google::protobuf::internal::WireFormatLite::
- WriteStringToArray(3, this->msgs(i), target);
- }
- // .google.protobuf.testing.Data nested_data = 4;
- if (this->has_nested_data()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 4, this->_internal_nested_data(), deterministic, target);
- }
- // .google.protobuf.Int32Value int_wrapper = 5;
- if (this->has_int_wrapper()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 5, this->_internal_int_wrapper(), deterministic, target);
- }
- // .google.protobuf.Timestamp time = 6;
- if (this->has_time()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 6, this->_internal_time(), deterministic, target);
- }
- // map<string, string> map_data = 7;
- if (!this->map_data().empty()) {
- typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
- ConstPtr;
- typedef ConstPtr SortItem;
- typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
- struct Utf8Check {
- static void Check(ConstPtr p) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- p->first.data(), static_cast<int>(p->first.length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.Data.MapDataEntry.key");
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- p->second.data(), static_cast<int>(p->second.length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.Data.MapDataEntry.value");
- }
- };
- if (deterministic &&
- this->map_data().size() > 1) {
- ::std::unique_ptr<SortItem[]> items(
- new SortItem[this->map_data().size()]);
- typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
- size_type n = 0;
- for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
- it = this->map_data().begin();
- it != this->map_data().end(); ++it, ++n) {
- items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
- }
- ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
- ::std::unique_ptr<Data_MapDataEntry_DoNotUse> entry;
- for (size_type i = 0; i < n; i++) {
- entry.reset(map_data_.NewEntryWrapper(
- items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 7, *entry, deterministic, target);
- ;
- Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
- }
- } else {
- ::std::unique_ptr<Data_MapDataEntry_DoNotUse> entry;
- for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
- it = this->map_data().begin();
- it != this->map_data().end(); ++it) {
- entry.reset(map_data_.NewEntryWrapper(
- it->first, it->second));
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 7, *entry, deterministic, target);
- ;
- Utf8Check::Check(&*it);
- }
- }
- }
- // .google.protobuf.Struct struct_data = 8;
- if (this->has_struct_data()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 8, this->_internal_struct_data(), deterministic, target);
- }
- // repeated .google.protobuf.testing.Data repeated_data = 9;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_data_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 9, this->repeated_data(static_cast<int>(i)), deterministic, target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.Data)
- return target;
- }
- size_t Data::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.Data)
- size_t total_size = 0;
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // repeated string msgs = 3;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->msgs_size());
- for (int i = 0, n = this->msgs_size(); i < n; i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
- this->msgs(i));
- }
- // map<string, string> map_data = 7;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->map_data_size());
- {
- ::std::unique_ptr<Data_MapDataEntry_DoNotUse> entry;
- for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
- it = this->map_data().begin();
- it != this->map_data().end(); ++it) {
- entry.reset(map_data_.NewEntryWrapper(it->first, it->second));
- total_size += ::google::protobuf::internal::WireFormatLite::
- MessageSizeNoVirtual(*entry);
- }
- }
- // repeated .google.protobuf.testing.Data repeated_data = 9;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_data_size());
- total_size += 1UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->repeated_data(static_cast<int>(i)));
- }
- }
- // string str = 2;
- if (this->str().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->str());
- }
- // .google.protobuf.testing.Data nested_data = 4;
- if (this->has_nested_data()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *nested_data_);
- }
- // .google.protobuf.Int32Value int_wrapper = 5;
- if (this->has_int_wrapper()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *int_wrapper_);
- }
- // .google.protobuf.Timestamp time = 6;
- if (this->has_time()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *time_);
- }
- // .google.protobuf.Struct struct_data = 8;
- if (this->has_struct_data()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *struct_data_);
- }
- // int32 attr = 1;
- if (this->attr() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->attr());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void Data::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.Data)
- GOOGLE_DCHECK_NE(&from, this);
- const Data* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Data>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.Data)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.Data)
- MergeFrom(*source);
- }
- }
- void Data::MergeFrom(const Data& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.Data)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- msgs_.MergeFrom(from.msgs_);
- map_data_.MergeFrom(from.map_data_);
- repeated_data_.MergeFrom(from.repeated_data_);
- if (from.str().size() > 0) {
- str_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.str_);
- }
- if (from.has_nested_data()) {
- mutable_nested_data()->::google::protobuf::testing::Data::MergeFrom(from.nested_data());
- }
- if (from.has_int_wrapper()) {
- mutable_int_wrapper()->::google::protobuf::Int32Value::MergeFrom(from.int_wrapper());
- }
- if (from.has_time()) {
- mutable_time()->::google::protobuf::Timestamp::MergeFrom(from.time());
- }
- if (from.has_struct_data()) {
- mutable_struct_data()->::google::protobuf::Struct::MergeFrom(from.struct_data());
- }
- if (from.attr() != 0) {
- set_attr(from.attr());
- }
- }
- void Data::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.Data)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void Data::CopyFrom(const Data& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.Data)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool Data::IsInitialized() const {
- return true;
- }
- void Data::Swap(Data* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void Data::InternalSwap(Data* other) {
- using std::swap;
- msgs_.InternalSwap(CastToBase(&other->msgs_));
- map_data_.Swap(&other->map_data_);
- CastToBase(&repeated_data_)->InternalSwap(CastToBase(&other->repeated_data_));
- str_.Swap(&other->str_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(nested_data_, other->nested_data_);
- swap(int_wrapper_, other->int_wrapper_);
- swap(time_, other->time_);
- swap(struct_data_, other->struct_data_);
- swap(attr_, other->attr_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata Data::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void AnyIn::InitAsDefaultInstance() {
- ::google::protobuf::testing::_AnyIn_default_instance_._instance.get_mutable()->any_ = const_cast< ::google::protobuf::Any*>(
- ::google::protobuf::Any::internal_default_instance());
- }
- void AnyIn::clear_any() {
- if (GetArenaNoVirtual() == NULL && any_ != NULL) {
- delete any_;
- }
- any_ = NULL;
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int AnyIn::kSomethingFieldNumber;
- const int AnyIn::kAnyFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- AnyIn::AnyIn()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyIn.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyIn)
- }
- AnyIn::AnyIn(const AnyIn& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- something_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.something().size() > 0) {
- something_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.something_);
- }
- if (from.has_any()) {
- any_ = new ::google::protobuf::Any(*from.any_);
- } else {
- any_ = NULL;
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyIn)
- }
- void AnyIn::SharedCtor() {
- something_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- any_ = NULL;
- }
- AnyIn::~AnyIn() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.AnyIn)
- SharedDtor();
- }
- void AnyIn::SharedDtor() {
- something_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete any_;
- }
- void AnyIn::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* AnyIn::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const AnyIn& AnyIn::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyIn.base);
- return *internal_default_instance();
- }
- void AnyIn::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.AnyIn)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- something_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (GetArenaNoVirtual() == NULL && any_ != NULL) {
- delete any_;
- }
- any_ = NULL;
- _internal_metadata_.Clear();
- }
- bool AnyIn::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.protobuf.testing.AnyIn)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string something = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_something()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->something().data(), static_cast<int>(this->something().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.testing.AnyIn.something"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Any any = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_any()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.protobuf.testing.AnyIn)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyIn)
- return false;
- #undef DO_
- }
- void AnyIn::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.AnyIn)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string something = 1;
- if (this->something().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->something().data(), static_cast<int>(this->something().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.AnyIn.something");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->something(), output);
- }
- // .google.protobuf.Any any = 2;
- if (this->has_any()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 2, this->_internal_any(), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.testing.AnyIn)
- }
- ::google::protobuf::uint8* AnyIn::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.AnyIn)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string something = 1;
- if (this->something().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->something().data(), static_cast<int>(this->something().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.AnyIn.something");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->something(), target);
- }
- // .google.protobuf.Any any = 2;
- if (this->has_any()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 2, this->_internal_any(), deterministic, target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.AnyIn)
- return target;
- }
- size_t AnyIn::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyIn)
- size_t total_size = 0;
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // string something = 1;
- if (this->something().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->something());
- }
- // .google.protobuf.Any any = 2;
- if (this->has_any()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *any_);
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void AnyIn::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.AnyIn)
- GOOGLE_DCHECK_NE(&from, this);
- const AnyIn* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const AnyIn>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.AnyIn)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.AnyIn)
- MergeFrom(*source);
- }
- }
- void AnyIn::MergeFrom(const AnyIn& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyIn)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.something().size() > 0) {
- something_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.something_);
- }
- if (from.has_any()) {
- mutable_any()->::google::protobuf::Any::MergeFrom(from.any());
- }
- }
- void AnyIn::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.AnyIn)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void AnyIn::CopyFrom(const AnyIn& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.AnyIn)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool AnyIn::IsInitialized() const {
- return true;
- }
- void AnyIn::Swap(AnyIn* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void AnyIn::InternalSwap(AnyIn* other) {
- using std::swap;
- something_.Swap(&other->something_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(any_, other->any_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata AnyIn::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void AnyOut::InitAsDefaultInstance() {
- ::google::protobuf::testing::_AnyOut_default_instance_._instance.get_mutable()->any_ = const_cast< ::google::protobuf::Any*>(
- ::google::protobuf::Any::internal_default_instance());
- }
- void AnyOut::clear_any() {
- if (GetArenaNoVirtual() == NULL && any_ != NULL) {
- delete any_;
- }
- any_ = NULL;
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int AnyOut::kAnyFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- AnyOut::AnyOut()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyOut.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyOut)
- }
- AnyOut::AnyOut(const AnyOut& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- if (from.has_any()) {
- any_ = new ::google::protobuf::Any(*from.any_);
- } else {
- any_ = NULL;
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyOut)
- }
- void AnyOut::SharedCtor() {
- any_ = NULL;
- }
- AnyOut::~AnyOut() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.AnyOut)
- SharedDtor();
- }
- void AnyOut::SharedDtor() {
- if (this != internal_default_instance()) delete any_;
- }
- void AnyOut::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* AnyOut::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const AnyOut& AnyOut::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyOut.base);
- return *internal_default_instance();
- }
- void AnyOut::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.AnyOut)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- if (GetArenaNoVirtual() == NULL && any_ != NULL) {
- delete any_;
- }
- any_ = NULL;
- _internal_metadata_.Clear();
- }
- bool AnyOut::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.protobuf.testing.AnyOut)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // .google.protobuf.Any any = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_any()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.protobuf.testing.AnyOut)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyOut)
- return false;
- #undef DO_
- }
- void AnyOut::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.AnyOut)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .google.protobuf.Any any = 1;
- if (this->has_any()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->_internal_any(), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.testing.AnyOut)
- }
- ::google::protobuf::uint8* AnyOut::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.AnyOut)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .google.protobuf.Any any = 1;
- if (this->has_any()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 1, this->_internal_any(), deterministic, target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.AnyOut)
- return target;
- }
- size_t AnyOut::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyOut)
- size_t total_size = 0;
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // .google.protobuf.Any any = 1;
- if (this->has_any()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *any_);
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void AnyOut::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.AnyOut)
- GOOGLE_DCHECK_NE(&from, this);
- const AnyOut* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const AnyOut>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.AnyOut)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.AnyOut)
- MergeFrom(*source);
- }
- }
- void AnyOut::MergeFrom(const AnyOut& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyOut)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.has_any()) {
- mutable_any()->::google::protobuf::Any::MergeFrom(from.any());
- }
- }
- void AnyOut::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.AnyOut)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void AnyOut::CopyFrom(const AnyOut& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.AnyOut)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool AnyOut::IsInitialized() const {
- return true;
- }
- void AnyOut::Swap(AnyOut* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void AnyOut::InternalSwap(AnyOut* other) {
- using std::swap;
- swap(any_, other->any_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata AnyOut::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void AnyM::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int AnyM::kFooFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- AnyM::AnyM()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyM.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.AnyM)
- }
- AnyM::AnyM(const AnyM& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- foo_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.foo().size() > 0) {
- foo_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.foo_);
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.AnyM)
- }
- void AnyM::SharedCtor() {
- foo_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- AnyM::~AnyM() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.AnyM)
- SharedDtor();
- }
- void AnyM::SharedDtor() {
- foo_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- void AnyM::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* AnyM::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const AnyM& AnyM::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::scc_info_AnyM.base);
- return *internal_default_instance();
- }
- void AnyM::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.AnyM)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- foo_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- _internal_metadata_.Clear();
- }
- bool AnyM::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:google.protobuf.testing.AnyM)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string foo = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_foo()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->foo().data(), static_cast<int>(this->foo().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.testing.AnyM.foo"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:google.protobuf.testing.AnyM)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.AnyM)
- return false;
- #undef DO_
- }
- void AnyM::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.AnyM)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string foo = 1;
- if (this->foo().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->foo().data(), static_cast<int>(this->foo().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.AnyM.foo");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->foo(), output);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.testing.AnyM)
- }
- ::google::protobuf::uint8* AnyM::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.AnyM)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string foo = 1;
- if (this->foo().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->foo().data(), static_cast<int>(this->foo().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.AnyM.foo");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->foo(), target);
- }
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.testing.AnyM)
- return target;
- }
- size_t AnyM::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.AnyM)
- size_t total_size = 0;
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // string foo = 1;
- if (this->foo().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->foo());
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void AnyM::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.AnyM)
- GOOGLE_DCHECK_NE(&from, this);
- const AnyM* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const AnyM>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.AnyM)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.AnyM)
- MergeFrom(*source);
- }
- }
- void AnyM::MergeFrom(const AnyM& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.AnyM)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.foo().size() > 0) {
- foo_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.foo_);
- }
- }
- void AnyM::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.AnyM)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void AnyM::CopyFrom(const AnyM& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.AnyM)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool AnyM::IsInitialized() const {
- return true;
- }
- void AnyM::Swap(AnyM* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void AnyM::InternalSwap(AnyM* other) {
- using std::swap;
- foo_.Swap(&other->foo_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata AnyM::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2fanys_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace testing
- } // namespace protobuf
- } // namespace google
- namespace google {
- namespace protobuf {
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyTestCases* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyTestCases >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::AnyTestCases >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyWrapper >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::AnyWrapper >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Imports* Arena::CreateMaybeMessage< ::google::protobuf::testing::Imports >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::Imports >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Data_MapDataEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::testing::Data_MapDataEntry_DoNotUse >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::Data_MapDataEntry_DoNotUse >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::Data* Arena::CreateMaybeMessage< ::google::protobuf::testing::Data >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::Data >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyIn* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyIn >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::AnyIn >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyOut* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyOut >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::AnyOut >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::AnyM* Arena::CreateMaybeMessage< ::google::protobuf::testing::AnyM >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::AnyM >(arena);
- }
- } // namespace protobuf
- } // namespace google
- // @@protoc_insertion_point(global_scope)
|