| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: google/protobuf/util/internal/testdata/field_mask.proto
- #include <google/protobuf/util/internal/testdata/field_mask.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_2ffield_5fmask_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2ffield_5fmask_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_FieldMask;
- } // namespace protobuf_google_2fprotobuf_2ffield_5fmask_2eproto
- namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_FieldMaskWrapper;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_NestedFieldMask;
- } // namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto
- namespace google {
- namespace protobuf {
- namespace testing {
- class NestedFieldMaskDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<NestedFieldMask>
- _instance;
- } _NestedFieldMask_default_instance_;
- class FieldMaskTestDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<FieldMaskTest>
- _instance;
- } _FieldMaskTest_default_instance_;
- class FieldMaskTestCasesDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<FieldMaskTestCases>
- _instance;
- } _FieldMaskTestCases_default_instance_;
- class FieldMaskWrapperDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<FieldMaskWrapper>
- _instance;
- } _FieldMaskWrapper_default_instance_;
- } // namespace testing
- } // namespace protobuf
- } // namespace google
- namespace protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto {
- static void InitDefaultsNestedFieldMask() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::_NestedFieldMask_default_instance_;
- new (ptr) ::google::protobuf::testing::NestedFieldMask();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::NestedFieldMask::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<1> scc_info_NestedFieldMask =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsNestedFieldMask}, {
- &protobuf_google_2fprotobuf_2ffield_5fmask_2eproto::scc_info_FieldMask.base,}};
- static void InitDefaultsFieldMaskTest() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::_FieldMaskTest_default_instance_;
- new (ptr) ::google::protobuf::testing::FieldMaskTest();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::FieldMaskTest::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<2> scc_info_FieldMaskTest =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsFieldMaskTest}, {
- &protobuf_google_2fprotobuf_2ffield_5fmask_2eproto::scc_info_FieldMask.base,
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::scc_info_NestedFieldMask.base,}};
- static void InitDefaultsFieldMaskTestCases() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::_FieldMaskTestCases_default_instance_;
- new (ptr) ::google::protobuf::testing::FieldMaskTestCases();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::FieldMaskTestCases::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<1> scc_info_FieldMaskTestCases =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFieldMaskTestCases}, {
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::scc_info_FieldMaskWrapper.base,}};
- static void InitDefaultsFieldMaskWrapper() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::google::protobuf::testing::_FieldMaskWrapper_default_instance_;
- new (ptr) ::google::protobuf::testing::FieldMaskWrapper();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::testing::FieldMaskWrapper::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<1> scc_info_FieldMaskWrapper =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFieldMaskWrapper}, {
- &protobuf_google_2fprotobuf_2ffield_5fmask_2eproto::scc_info_FieldMask.base,}};
- void InitDefaults() {
- ::google::protobuf::internal::InitSCC(&scc_info_NestedFieldMask.base);
- ::google::protobuf::internal::InitSCC(&scc_info_FieldMaskTest.base);
- ::google::protobuf::internal::InitSCC(&scc_info_FieldMaskTestCases.base);
- ::google::protobuf::internal::InitSCC(&scc_info_FieldMaskWrapper.base);
- }
- ::google::protobuf::Metadata file_level_metadata[4];
- 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::NestedFieldMask, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::NestedFieldMask, data_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::NestedFieldMask, single_mask_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::NestedFieldMask, repeated_mask_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTest, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTest, id_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTest, single_mask_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTest, repeated_mask_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTest, nested_mask_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTestCases, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTestCases, single_mask_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTestCases, multiple_mask_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTestCases, snake_camel_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTestCases, empty_field_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTestCases, apiary_format1_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTestCases, apiary_format2_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTestCases, apiary_format3_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTestCases, map_key1_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTestCases, map_key2_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTestCases, map_key3_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTestCases, map_key4_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskTestCases, map_key5_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskWrapper, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::testing::FieldMaskWrapper, mask_),
- };
- static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(::google::protobuf::testing::NestedFieldMask)},
- { 8, -1, sizeof(::google::protobuf::testing::FieldMaskTest)},
- { 17, -1, sizeof(::google::protobuf::testing::FieldMaskTestCases)},
- { 34, -1, sizeof(::google::protobuf::testing::FieldMaskWrapper)},
- };
- static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_NestedFieldMask_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_FieldMaskTest_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_FieldMaskTestCases_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::testing::_FieldMaskWrapper_default_instance_),
- };
- void protobuf_AssignDescriptors() {
- AddDescriptors();
- AssignDescriptors(
- "google/protobuf/util/internal/testdata/field_mask.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, 4);
- }
- void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n7google/protobuf/util/internal/testdata"
- "/field_mask.proto\022\027google.protobuf.testi"
- "ng\032 google/protobuf/field_mask.proto\"\203\001\n"
- "\017NestedFieldMask\022\014\n\004data\030\001 \001(\t\022/\n\013single"
- "_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\022"
- "1\n\rrepeated_mask\030\003 \003(\0132\032.google.protobuf"
- ".FieldMask\"\276\001\n\rFieldMaskTest\022\n\n\002id\030\001 \001(\t"
- "\022/\n\013single_mask\030\002 \001(\0132\032.google.protobuf."
- "FieldMask\0221\n\rrepeated_mask\030\003 \003(\0132\032.googl"
- "e.protobuf.FieldMask\022=\n\013nested_mask\030\004 \003("
- "\0132(.google.protobuf.testing.NestedFieldM"
- "ask\"\220\006\n\022FieldMaskTestCases\022>\n\013single_mas"
- "k\030\001 \001(\0132).google.protobuf.testing.FieldM"
- "askWrapper\022@\n\rmultiple_mask\030\002 \001(\0132).goog"
- "le.protobuf.testing.FieldMaskWrapper\022>\n\013"
- "snake_camel\030\003 \001(\0132).google.protobuf.test"
- "ing.FieldMaskWrapper\022>\n\013empty_field\030\004 \001("
- "\0132).google.protobuf.testing.FieldMaskWra"
- "pper\022A\n\016apiary_format1\030\005 \001(\0132).google.pr"
- "otobuf.testing.FieldMaskWrapper\022A\n\016apiar"
- "y_format2\030\006 \001(\0132).google.protobuf.testin"
- "g.FieldMaskWrapper\022A\n\016apiary_format3\030\007 \001"
- "(\0132).google.protobuf.testing.FieldMaskWr"
- "apper\022;\n\010map_key1\030\010 \001(\0132).google.protobu"
- "f.testing.FieldMaskWrapper\022;\n\010map_key2\030\t"
- " \001(\0132).google.protobuf.testing.FieldMask"
- "Wrapper\022;\n\010map_key3\030\n \001(\0132).google.proto"
- "buf.testing.FieldMaskWrapper\022;\n\010map_key4"
- "\030\013 \001(\0132).google.protobuf.testing.FieldMa"
- "skWrapper\022;\n\010map_key5\030\014 \001(\0132).google.pro"
- "tobuf.testing.FieldMaskWrapper\"<\n\020FieldM"
- "askWrapper\022(\n\004mask\030\001 \001(\0132\032.google.protob"
- "uf.FieldMask2x\n\024FieldMaskTestService\022`\n\004"
- "Call\022+.google.protobuf.testing.FieldMask"
- "TestCases\032+.google.protobuf.testing.Fiel"
- "dMaskTestCasesb\006proto3"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 1422);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "google/protobuf/util/internal/testdata/field_mask.proto", &protobuf_RegisterTypes);
- ::protobuf_google_2fprotobuf_2ffield_5fmask_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_2ffield_5fmask_2eproto
- namespace google {
- namespace protobuf {
- namespace testing {
- // ===================================================================
- void NestedFieldMask::InitAsDefaultInstance() {
- ::google::protobuf::testing::_NestedFieldMask_default_instance_._instance.get_mutable()->single_mask_ = const_cast< ::google::protobuf::FieldMask*>(
- ::google::protobuf::FieldMask::internal_default_instance());
- }
- void NestedFieldMask::clear_single_mask() {
- if (GetArenaNoVirtual() == NULL && single_mask_ != NULL) {
- delete single_mask_;
- }
- single_mask_ = NULL;
- }
- void NestedFieldMask::clear_repeated_mask() {
- repeated_mask_.Clear();
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int NestedFieldMask::kDataFieldNumber;
- const int NestedFieldMask::kSingleMaskFieldNumber;
- const int NestedFieldMask::kRepeatedMaskFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- NestedFieldMask::NestedFieldMask()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::scc_info_NestedFieldMask.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.NestedFieldMask)
- }
- NestedFieldMask::NestedFieldMask(const NestedFieldMask& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- repeated_mask_(from.repeated_mask_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.data().size() > 0) {
- data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_);
- }
- if (from.has_single_mask()) {
- single_mask_ = new ::google::protobuf::FieldMask(*from.single_mask_);
- } else {
- single_mask_ = NULL;
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.NestedFieldMask)
- }
- void NestedFieldMask::SharedCtor() {
- data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- single_mask_ = NULL;
- }
- NestedFieldMask::~NestedFieldMask() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.NestedFieldMask)
- SharedDtor();
- }
- void NestedFieldMask::SharedDtor() {
- data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete single_mask_;
- }
- void NestedFieldMask::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* NestedFieldMask::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const NestedFieldMask& NestedFieldMask::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::scc_info_NestedFieldMask.base);
- return *internal_default_instance();
- }
- void NestedFieldMask::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.NestedFieldMask)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- repeated_mask_.Clear();
- data_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (GetArenaNoVirtual() == NULL && single_mask_ != NULL) {
- delete single_mask_;
- }
- single_mask_ = NULL;
- _internal_metadata_.Clear();
- }
- bool NestedFieldMask::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.NestedFieldMask)
- 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 data = 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_data()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->data().data(), static_cast<int>(this->data().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.testing.NestedFieldMask.data"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.FieldMask single_mask = 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_single_mask()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .google.protobuf.FieldMask repeated_mask = 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, add_repeated_mask()));
- } 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.NestedFieldMask)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.NestedFieldMask)
- return false;
- #undef DO_
- }
- void NestedFieldMask::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.NestedFieldMask)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string data = 1;
- if (this->data().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->data().data(), static_cast<int>(this->data().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.NestedFieldMask.data");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->data(), output);
- }
- // .google.protobuf.FieldMask single_mask = 2;
- if (this->has_single_mask()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 2, this->_internal_single_mask(), output);
- }
- // repeated .google.protobuf.FieldMask repeated_mask = 3;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_mask_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 3,
- this->repeated_mask(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.NestedFieldMask)
- }
- ::google::protobuf::uint8* NestedFieldMask::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.NestedFieldMask)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string data = 1;
- if (this->data().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->data().data(), static_cast<int>(this->data().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.NestedFieldMask.data");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->data(), target);
- }
- // .google.protobuf.FieldMask single_mask = 2;
- if (this->has_single_mask()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 2, this->_internal_single_mask(), deterministic, target);
- }
- // repeated .google.protobuf.FieldMask repeated_mask = 3;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_mask_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 3, this->repeated_mask(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.NestedFieldMask)
- return target;
- }
- size_t NestedFieldMask::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.NestedFieldMask)
- 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 .google.protobuf.FieldMask repeated_mask = 3;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_mask_size());
- total_size += 1UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->repeated_mask(static_cast<int>(i)));
- }
- }
- // string data = 1;
- if (this->data().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->data());
- }
- // .google.protobuf.FieldMask single_mask = 2;
- if (this->has_single_mask()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *single_mask_);
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void NestedFieldMask::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.NestedFieldMask)
- GOOGLE_DCHECK_NE(&from, this);
- const NestedFieldMask* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const NestedFieldMask>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.NestedFieldMask)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.NestedFieldMask)
- MergeFrom(*source);
- }
- }
- void NestedFieldMask::MergeFrom(const NestedFieldMask& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.NestedFieldMask)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- repeated_mask_.MergeFrom(from.repeated_mask_);
- if (from.data().size() > 0) {
- data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_);
- }
- if (from.has_single_mask()) {
- mutable_single_mask()->::google::protobuf::FieldMask::MergeFrom(from.single_mask());
- }
- }
- void NestedFieldMask::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.NestedFieldMask)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void NestedFieldMask::CopyFrom(const NestedFieldMask& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.NestedFieldMask)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool NestedFieldMask::IsInitialized() const {
- return true;
- }
- void NestedFieldMask::Swap(NestedFieldMask* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void NestedFieldMask::InternalSwap(NestedFieldMask* other) {
- using std::swap;
- CastToBase(&repeated_mask_)->InternalSwap(CastToBase(&other->repeated_mask_));
- data_.Swap(&other->data_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(single_mask_, other->single_mask_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata NestedFieldMask::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void FieldMaskTest::InitAsDefaultInstance() {
- ::google::protobuf::testing::_FieldMaskTest_default_instance_._instance.get_mutable()->single_mask_ = const_cast< ::google::protobuf::FieldMask*>(
- ::google::protobuf::FieldMask::internal_default_instance());
- }
- void FieldMaskTest::clear_single_mask() {
- if (GetArenaNoVirtual() == NULL && single_mask_ != NULL) {
- delete single_mask_;
- }
- single_mask_ = NULL;
- }
- void FieldMaskTest::clear_repeated_mask() {
- repeated_mask_.Clear();
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int FieldMaskTest::kIdFieldNumber;
- const int FieldMaskTest::kSingleMaskFieldNumber;
- const int FieldMaskTest::kRepeatedMaskFieldNumber;
- const int FieldMaskTest::kNestedMaskFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- FieldMaskTest::FieldMaskTest()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::scc_info_FieldMaskTest.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.FieldMaskTest)
- }
- FieldMaskTest::FieldMaskTest(const FieldMaskTest& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- repeated_mask_(from.repeated_mask_),
- nested_mask_(from.nested_mask_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.id().size() > 0) {
- id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.id_);
- }
- if (from.has_single_mask()) {
- single_mask_ = new ::google::protobuf::FieldMask(*from.single_mask_);
- } else {
- single_mask_ = NULL;
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.FieldMaskTest)
- }
- void FieldMaskTest::SharedCtor() {
- id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- single_mask_ = NULL;
- }
- FieldMaskTest::~FieldMaskTest() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.FieldMaskTest)
- SharedDtor();
- }
- void FieldMaskTest::SharedDtor() {
- id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete single_mask_;
- }
- void FieldMaskTest::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* FieldMaskTest::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const FieldMaskTest& FieldMaskTest::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::scc_info_FieldMaskTest.base);
- return *internal_default_instance();
- }
- void FieldMaskTest::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.FieldMaskTest)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- repeated_mask_.Clear();
- nested_mask_.Clear();
- id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (GetArenaNoVirtual() == NULL && single_mask_ != NULL) {
- delete single_mask_;
- }
- single_mask_ = NULL;
- _internal_metadata_.Clear();
- }
- bool FieldMaskTest::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.FieldMaskTest)
- 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 id = 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_id()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->id().data(), static_cast<int>(this->id().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.testing.FieldMaskTest.id"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.FieldMask single_mask = 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_single_mask()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .google.protobuf.FieldMask repeated_mask = 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, add_repeated_mask()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .google.protobuf.testing.NestedFieldMask nested_mask = 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, add_nested_mask()));
- } 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.FieldMaskTest)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.FieldMaskTest)
- return false;
- #undef DO_
- }
- void FieldMaskTest::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.FieldMaskTest)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string id = 1;
- if (this->id().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->id().data(), static_cast<int>(this->id().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.FieldMaskTest.id");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->id(), output);
- }
- // .google.protobuf.FieldMask single_mask = 2;
- if (this->has_single_mask()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 2, this->_internal_single_mask(), output);
- }
- // repeated .google.protobuf.FieldMask repeated_mask = 3;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_mask_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 3,
- this->repeated_mask(static_cast<int>(i)),
- output);
- }
- // repeated .google.protobuf.testing.NestedFieldMask nested_mask = 4;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->nested_mask_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 4,
- this->nested_mask(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.FieldMaskTest)
- }
- ::google::protobuf::uint8* FieldMaskTest::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.FieldMaskTest)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string id = 1;
- if (this->id().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->id().data(), static_cast<int>(this->id().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.testing.FieldMaskTest.id");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->id(), target);
- }
- // .google.protobuf.FieldMask single_mask = 2;
- if (this->has_single_mask()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 2, this->_internal_single_mask(), deterministic, target);
- }
- // repeated .google.protobuf.FieldMask repeated_mask = 3;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->repeated_mask_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 3, this->repeated_mask(static_cast<int>(i)), deterministic, target);
- }
- // repeated .google.protobuf.testing.NestedFieldMask nested_mask = 4;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->nested_mask_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 4, this->nested_mask(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.FieldMaskTest)
- return target;
- }
- size_t FieldMaskTest::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.FieldMaskTest)
- 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 .google.protobuf.FieldMask repeated_mask = 3;
- {
- unsigned int count = static_cast<unsigned int>(this->repeated_mask_size());
- total_size += 1UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->repeated_mask(static_cast<int>(i)));
- }
- }
- // repeated .google.protobuf.testing.NestedFieldMask nested_mask = 4;
- {
- unsigned int count = static_cast<unsigned int>(this->nested_mask_size());
- total_size += 1UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->nested_mask(static_cast<int>(i)));
- }
- }
- // string id = 1;
- if (this->id().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->id());
- }
- // .google.protobuf.FieldMask single_mask = 2;
- if (this->has_single_mask()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *single_mask_);
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void FieldMaskTest::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.FieldMaskTest)
- GOOGLE_DCHECK_NE(&from, this);
- const FieldMaskTest* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const FieldMaskTest>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.FieldMaskTest)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.FieldMaskTest)
- MergeFrom(*source);
- }
- }
- void FieldMaskTest::MergeFrom(const FieldMaskTest& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.FieldMaskTest)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- repeated_mask_.MergeFrom(from.repeated_mask_);
- nested_mask_.MergeFrom(from.nested_mask_);
- if (from.id().size() > 0) {
- id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.id_);
- }
- if (from.has_single_mask()) {
- mutable_single_mask()->::google::protobuf::FieldMask::MergeFrom(from.single_mask());
- }
- }
- void FieldMaskTest::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.FieldMaskTest)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void FieldMaskTest::CopyFrom(const FieldMaskTest& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.FieldMaskTest)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool FieldMaskTest::IsInitialized() const {
- return true;
- }
- void FieldMaskTest::Swap(FieldMaskTest* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void FieldMaskTest::InternalSwap(FieldMaskTest* other) {
- using std::swap;
- CastToBase(&repeated_mask_)->InternalSwap(CastToBase(&other->repeated_mask_));
- CastToBase(&nested_mask_)->InternalSwap(CastToBase(&other->nested_mask_));
- id_.Swap(&other->id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(single_mask_, other->single_mask_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata FieldMaskTest::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void FieldMaskTestCases::InitAsDefaultInstance() {
- ::google::protobuf::testing::_FieldMaskTestCases_default_instance_._instance.get_mutable()->single_mask_ = const_cast< ::google::protobuf::testing::FieldMaskWrapper*>(
- ::google::protobuf::testing::FieldMaskWrapper::internal_default_instance());
- ::google::protobuf::testing::_FieldMaskTestCases_default_instance_._instance.get_mutable()->multiple_mask_ = const_cast< ::google::protobuf::testing::FieldMaskWrapper*>(
- ::google::protobuf::testing::FieldMaskWrapper::internal_default_instance());
- ::google::protobuf::testing::_FieldMaskTestCases_default_instance_._instance.get_mutable()->snake_camel_ = const_cast< ::google::protobuf::testing::FieldMaskWrapper*>(
- ::google::protobuf::testing::FieldMaskWrapper::internal_default_instance());
- ::google::protobuf::testing::_FieldMaskTestCases_default_instance_._instance.get_mutable()->empty_field_ = const_cast< ::google::protobuf::testing::FieldMaskWrapper*>(
- ::google::protobuf::testing::FieldMaskWrapper::internal_default_instance());
- ::google::protobuf::testing::_FieldMaskTestCases_default_instance_._instance.get_mutable()->apiary_format1_ = const_cast< ::google::protobuf::testing::FieldMaskWrapper*>(
- ::google::protobuf::testing::FieldMaskWrapper::internal_default_instance());
- ::google::protobuf::testing::_FieldMaskTestCases_default_instance_._instance.get_mutable()->apiary_format2_ = const_cast< ::google::protobuf::testing::FieldMaskWrapper*>(
- ::google::protobuf::testing::FieldMaskWrapper::internal_default_instance());
- ::google::protobuf::testing::_FieldMaskTestCases_default_instance_._instance.get_mutable()->apiary_format3_ = const_cast< ::google::protobuf::testing::FieldMaskWrapper*>(
- ::google::protobuf::testing::FieldMaskWrapper::internal_default_instance());
- ::google::protobuf::testing::_FieldMaskTestCases_default_instance_._instance.get_mutable()->map_key1_ = const_cast< ::google::protobuf::testing::FieldMaskWrapper*>(
- ::google::protobuf::testing::FieldMaskWrapper::internal_default_instance());
- ::google::protobuf::testing::_FieldMaskTestCases_default_instance_._instance.get_mutable()->map_key2_ = const_cast< ::google::protobuf::testing::FieldMaskWrapper*>(
- ::google::protobuf::testing::FieldMaskWrapper::internal_default_instance());
- ::google::protobuf::testing::_FieldMaskTestCases_default_instance_._instance.get_mutable()->map_key3_ = const_cast< ::google::protobuf::testing::FieldMaskWrapper*>(
- ::google::protobuf::testing::FieldMaskWrapper::internal_default_instance());
- ::google::protobuf::testing::_FieldMaskTestCases_default_instance_._instance.get_mutable()->map_key4_ = const_cast< ::google::protobuf::testing::FieldMaskWrapper*>(
- ::google::protobuf::testing::FieldMaskWrapper::internal_default_instance());
- ::google::protobuf::testing::_FieldMaskTestCases_default_instance_._instance.get_mutable()->map_key5_ = const_cast< ::google::protobuf::testing::FieldMaskWrapper*>(
- ::google::protobuf::testing::FieldMaskWrapper::internal_default_instance());
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int FieldMaskTestCases::kSingleMaskFieldNumber;
- const int FieldMaskTestCases::kMultipleMaskFieldNumber;
- const int FieldMaskTestCases::kSnakeCamelFieldNumber;
- const int FieldMaskTestCases::kEmptyFieldFieldNumber;
- const int FieldMaskTestCases::kApiaryFormat1FieldNumber;
- const int FieldMaskTestCases::kApiaryFormat2FieldNumber;
- const int FieldMaskTestCases::kApiaryFormat3FieldNumber;
- const int FieldMaskTestCases::kMapKey1FieldNumber;
- const int FieldMaskTestCases::kMapKey2FieldNumber;
- const int FieldMaskTestCases::kMapKey3FieldNumber;
- const int FieldMaskTestCases::kMapKey4FieldNumber;
- const int FieldMaskTestCases::kMapKey5FieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- FieldMaskTestCases::FieldMaskTestCases()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::scc_info_FieldMaskTestCases.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.FieldMaskTestCases)
- }
- FieldMaskTestCases::FieldMaskTestCases(const FieldMaskTestCases& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- if (from.has_single_mask()) {
- single_mask_ = new ::google::protobuf::testing::FieldMaskWrapper(*from.single_mask_);
- } else {
- single_mask_ = NULL;
- }
- if (from.has_multiple_mask()) {
- multiple_mask_ = new ::google::protobuf::testing::FieldMaskWrapper(*from.multiple_mask_);
- } else {
- multiple_mask_ = NULL;
- }
- if (from.has_snake_camel()) {
- snake_camel_ = new ::google::protobuf::testing::FieldMaskWrapper(*from.snake_camel_);
- } else {
- snake_camel_ = NULL;
- }
- if (from.has_empty_field()) {
- empty_field_ = new ::google::protobuf::testing::FieldMaskWrapper(*from.empty_field_);
- } else {
- empty_field_ = NULL;
- }
- if (from.has_apiary_format1()) {
- apiary_format1_ = new ::google::protobuf::testing::FieldMaskWrapper(*from.apiary_format1_);
- } else {
- apiary_format1_ = NULL;
- }
- if (from.has_apiary_format2()) {
- apiary_format2_ = new ::google::protobuf::testing::FieldMaskWrapper(*from.apiary_format2_);
- } else {
- apiary_format2_ = NULL;
- }
- if (from.has_apiary_format3()) {
- apiary_format3_ = new ::google::protobuf::testing::FieldMaskWrapper(*from.apiary_format3_);
- } else {
- apiary_format3_ = NULL;
- }
- if (from.has_map_key1()) {
- map_key1_ = new ::google::protobuf::testing::FieldMaskWrapper(*from.map_key1_);
- } else {
- map_key1_ = NULL;
- }
- if (from.has_map_key2()) {
- map_key2_ = new ::google::protobuf::testing::FieldMaskWrapper(*from.map_key2_);
- } else {
- map_key2_ = NULL;
- }
- if (from.has_map_key3()) {
- map_key3_ = new ::google::protobuf::testing::FieldMaskWrapper(*from.map_key3_);
- } else {
- map_key3_ = NULL;
- }
- if (from.has_map_key4()) {
- map_key4_ = new ::google::protobuf::testing::FieldMaskWrapper(*from.map_key4_);
- } else {
- map_key4_ = NULL;
- }
- if (from.has_map_key5()) {
- map_key5_ = new ::google::protobuf::testing::FieldMaskWrapper(*from.map_key5_);
- } else {
- map_key5_ = NULL;
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.FieldMaskTestCases)
- }
- void FieldMaskTestCases::SharedCtor() {
- ::memset(&single_mask_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&map_key5_) -
- reinterpret_cast<char*>(&single_mask_)) + sizeof(map_key5_));
- }
- FieldMaskTestCases::~FieldMaskTestCases() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.FieldMaskTestCases)
- SharedDtor();
- }
- void FieldMaskTestCases::SharedDtor() {
- if (this != internal_default_instance()) delete single_mask_;
- if (this != internal_default_instance()) delete multiple_mask_;
- if (this != internal_default_instance()) delete snake_camel_;
- if (this != internal_default_instance()) delete empty_field_;
- if (this != internal_default_instance()) delete apiary_format1_;
- if (this != internal_default_instance()) delete apiary_format2_;
- if (this != internal_default_instance()) delete apiary_format3_;
- if (this != internal_default_instance()) delete map_key1_;
- if (this != internal_default_instance()) delete map_key2_;
- if (this != internal_default_instance()) delete map_key3_;
- if (this != internal_default_instance()) delete map_key4_;
- if (this != internal_default_instance()) delete map_key5_;
- }
- void FieldMaskTestCases::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* FieldMaskTestCases::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const FieldMaskTestCases& FieldMaskTestCases::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::scc_info_FieldMaskTestCases.base);
- return *internal_default_instance();
- }
- void FieldMaskTestCases::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.FieldMaskTestCases)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- if (GetArenaNoVirtual() == NULL && single_mask_ != NULL) {
- delete single_mask_;
- }
- single_mask_ = NULL;
- if (GetArenaNoVirtual() == NULL && multiple_mask_ != NULL) {
- delete multiple_mask_;
- }
- multiple_mask_ = NULL;
- if (GetArenaNoVirtual() == NULL && snake_camel_ != NULL) {
- delete snake_camel_;
- }
- snake_camel_ = NULL;
- if (GetArenaNoVirtual() == NULL && empty_field_ != NULL) {
- delete empty_field_;
- }
- empty_field_ = NULL;
- if (GetArenaNoVirtual() == NULL && apiary_format1_ != NULL) {
- delete apiary_format1_;
- }
- apiary_format1_ = NULL;
- if (GetArenaNoVirtual() == NULL && apiary_format2_ != NULL) {
- delete apiary_format2_;
- }
- apiary_format2_ = NULL;
- if (GetArenaNoVirtual() == NULL && apiary_format3_ != NULL) {
- delete apiary_format3_;
- }
- apiary_format3_ = NULL;
- if (GetArenaNoVirtual() == NULL && map_key1_ != NULL) {
- delete map_key1_;
- }
- map_key1_ = NULL;
- if (GetArenaNoVirtual() == NULL && map_key2_ != NULL) {
- delete map_key2_;
- }
- map_key2_ = NULL;
- if (GetArenaNoVirtual() == NULL && map_key3_ != NULL) {
- delete map_key3_;
- }
- map_key3_ = NULL;
- if (GetArenaNoVirtual() == NULL && map_key4_ != NULL) {
- delete map_key4_;
- }
- map_key4_ = NULL;
- if (GetArenaNoVirtual() == NULL && map_key5_ != NULL) {
- delete map_key5_;
- }
- map_key5_ = NULL;
- _internal_metadata_.Clear();
- }
- bool FieldMaskTestCases::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.FieldMaskTestCases)
- 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.testing.FieldMaskWrapper single_mask = 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_single_mask()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.FieldMaskWrapper multiple_mask = 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_multiple_mask()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.FieldMaskWrapper snake_camel = 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_snake_camel()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.FieldMaskWrapper empty_field = 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_empty_field()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.FieldMaskWrapper apiary_format1 = 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_apiary_format1()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.FieldMaskWrapper apiary_format2 = 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_apiary_format2()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.FieldMaskWrapper apiary_format3 = 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_apiary_format3()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key1 = 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_map_key1()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key2 = 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_map_key2()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key3 = 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_map_key3()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key4 = 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_map_key4()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key5 = 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_map_key5()));
- } 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.FieldMaskTestCases)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.FieldMaskTestCases)
- return false;
- #undef DO_
- }
- void FieldMaskTestCases::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.FieldMaskTestCases)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .google.protobuf.testing.FieldMaskWrapper single_mask = 1;
- if (this->has_single_mask()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->_internal_single_mask(), output);
- }
- // .google.protobuf.testing.FieldMaskWrapper multiple_mask = 2;
- if (this->has_multiple_mask()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 2, this->_internal_multiple_mask(), output);
- }
- // .google.protobuf.testing.FieldMaskWrapper snake_camel = 3;
- if (this->has_snake_camel()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 3, this->_internal_snake_camel(), output);
- }
- // .google.protobuf.testing.FieldMaskWrapper empty_field = 4;
- if (this->has_empty_field()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 4, this->_internal_empty_field(), output);
- }
- // .google.protobuf.testing.FieldMaskWrapper apiary_format1 = 5;
- if (this->has_apiary_format1()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, this->_internal_apiary_format1(), output);
- }
- // .google.protobuf.testing.FieldMaskWrapper apiary_format2 = 6;
- if (this->has_apiary_format2()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 6, this->_internal_apiary_format2(), output);
- }
- // .google.protobuf.testing.FieldMaskWrapper apiary_format3 = 7;
- if (this->has_apiary_format3()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 7, this->_internal_apiary_format3(), output);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key1 = 8;
- if (this->has_map_key1()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 8, this->_internal_map_key1(), output);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key2 = 9;
- if (this->has_map_key2()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 9, this->_internal_map_key2(), output);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key3 = 10;
- if (this->has_map_key3()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 10, this->_internal_map_key3(), output);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key4 = 11;
- if (this->has_map_key4()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 11, this->_internal_map_key4(), output);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key5 = 12;
- if (this->has_map_key5()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 12, this->_internal_map_key5(), 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.FieldMaskTestCases)
- }
- ::google::protobuf::uint8* FieldMaskTestCases::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.FieldMaskTestCases)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .google.protobuf.testing.FieldMaskWrapper single_mask = 1;
- if (this->has_single_mask()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 1, this->_internal_single_mask(), deterministic, target);
- }
- // .google.protobuf.testing.FieldMaskWrapper multiple_mask = 2;
- if (this->has_multiple_mask()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 2, this->_internal_multiple_mask(), deterministic, target);
- }
- // .google.protobuf.testing.FieldMaskWrapper snake_camel = 3;
- if (this->has_snake_camel()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 3, this->_internal_snake_camel(), deterministic, target);
- }
- // .google.protobuf.testing.FieldMaskWrapper empty_field = 4;
- if (this->has_empty_field()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 4, this->_internal_empty_field(), deterministic, target);
- }
- // .google.protobuf.testing.FieldMaskWrapper apiary_format1 = 5;
- if (this->has_apiary_format1()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 5, this->_internal_apiary_format1(), deterministic, target);
- }
- // .google.protobuf.testing.FieldMaskWrapper apiary_format2 = 6;
- if (this->has_apiary_format2()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 6, this->_internal_apiary_format2(), deterministic, target);
- }
- // .google.protobuf.testing.FieldMaskWrapper apiary_format3 = 7;
- if (this->has_apiary_format3()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 7, this->_internal_apiary_format3(), deterministic, target);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key1 = 8;
- if (this->has_map_key1()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 8, this->_internal_map_key1(), deterministic, target);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key2 = 9;
- if (this->has_map_key2()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 9, this->_internal_map_key2(), deterministic, target);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key3 = 10;
- if (this->has_map_key3()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 10, this->_internal_map_key3(), deterministic, target);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key4 = 11;
- if (this->has_map_key4()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 11, this->_internal_map_key4(), deterministic, target);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key5 = 12;
- if (this->has_map_key5()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 12, this->_internal_map_key5(), 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.FieldMaskTestCases)
- return target;
- }
- size_t FieldMaskTestCases::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.FieldMaskTestCases)
- 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.FieldMaskWrapper single_mask = 1;
- if (this->has_single_mask()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *single_mask_);
- }
- // .google.protobuf.testing.FieldMaskWrapper multiple_mask = 2;
- if (this->has_multiple_mask()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *multiple_mask_);
- }
- // .google.protobuf.testing.FieldMaskWrapper snake_camel = 3;
- if (this->has_snake_camel()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *snake_camel_);
- }
- // .google.protobuf.testing.FieldMaskWrapper empty_field = 4;
- if (this->has_empty_field()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *empty_field_);
- }
- // .google.protobuf.testing.FieldMaskWrapper apiary_format1 = 5;
- if (this->has_apiary_format1()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *apiary_format1_);
- }
- // .google.protobuf.testing.FieldMaskWrapper apiary_format2 = 6;
- if (this->has_apiary_format2()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *apiary_format2_);
- }
- // .google.protobuf.testing.FieldMaskWrapper apiary_format3 = 7;
- if (this->has_apiary_format3()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *apiary_format3_);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key1 = 8;
- if (this->has_map_key1()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *map_key1_);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key2 = 9;
- if (this->has_map_key2()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *map_key2_);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key3 = 10;
- if (this->has_map_key3()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *map_key3_);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key4 = 11;
- if (this->has_map_key4()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *map_key4_);
- }
- // .google.protobuf.testing.FieldMaskWrapper map_key5 = 12;
- if (this->has_map_key5()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *map_key5_);
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void FieldMaskTestCases::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.FieldMaskTestCases)
- GOOGLE_DCHECK_NE(&from, this);
- const FieldMaskTestCases* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const FieldMaskTestCases>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.FieldMaskTestCases)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.FieldMaskTestCases)
- MergeFrom(*source);
- }
- }
- void FieldMaskTestCases::MergeFrom(const FieldMaskTestCases& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.FieldMaskTestCases)
- 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_single_mask()) {
- mutable_single_mask()->::google::protobuf::testing::FieldMaskWrapper::MergeFrom(from.single_mask());
- }
- if (from.has_multiple_mask()) {
- mutable_multiple_mask()->::google::protobuf::testing::FieldMaskWrapper::MergeFrom(from.multiple_mask());
- }
- if (from.has_snake_camel()) {
- mutable_snake_camel()->::google::protobuf::testing::FieldMaskWrapper::MergeFrom(from.snake_camel());
- }
- if (from.has_empty_field()) {
- mutable_empty_field()->::google::protobuf::testing::FieldMaskWrapper::MergeFrom(from.empty_field());
- }
- if (from.has_apiary_format1()) {
- mutable_apiary_format1()->::google::protobuf::testing::FieldMaskWrapper::MergeFrom(from.apiary_format1());
- }
- if (from.has_apiary_format2()) {
- mutable_apiary_format2()->::google::protobuf::testing::FieldMaskWrapper::MergeFrom(from.apiary_format2());
- }
- if (from.has_apiary_format3()) {
- mutable_apiary_format3()->::google::protobuf::testing::FieldMaskWrapper::MergeFrom(from.apiary_format3());
- }
- if (from.has_map_key1()) {
- mutable_map_key1()->::google::protobuf::testing::FieldMaskWrapper::MergeFrom(from.map_key1());
- }
- if (from.has_map_key2()) {
- mutable_map_key2()->::google::protobuf::testing::FieldMaskWrapper::MergeFrom(from.map_key2());
- }
- if (from.has_map_key3()) {
- mutable_map_key3()->::google::protobuf::testing::FieldMaskWrapper::MergeFrom(from.map_key3());
- }
- if (from.has_map_key4()) {
- mutable_map_key4()->::google::protobuf::testing::FieldMaskWrapper::MergeFrom(from.map_key4());
- }
- if (from.has_map_key5()) {
- mutable_map_key5()->::google::protobuf::testing::FieldMaskWrapper::MergeFrom(from.map_key5());
- }
- }
- void FieldMaskTestCases::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.FieldMaskTestCases)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void FieldMaskTestCases::CopyFrom(const FieldMaskTestCases& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.FieldMaskTestCases)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool FieldMaskTestCases::IsInitialized() const {
- return true;
- }
- void FieldMaskTestCases::Swap(FieldMaskTestCases* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void FieldMaskTestCases::InternalSwap(FieldMaskTestCases* other) {
- using std::swap;
- swap(single_mask_, other->single_mask_);
- swap(multiple_mask_, other->multiple_mask_);
- swap(snake_camel_, other->snake_camel_);
- swap(empty_field_, other->empty_field_);
- swap(apiary_format1_, other->apiary_format1_);
- swap(apiary_format2_, other->apiary_format2_);
- swap(apiary_format3_, other->apiary_format3_);
- swap(map_key1_, other->map_key1_);
- swap(map_key2_, other->map_key2_);
- swap(map_key3_, other->map_key3_);
- swap(map_key4_, other->map_key4_);
- swap(map_key5_, other->map_key5_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata FieldMaskTestCases::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void FieldMaskWrapper::InitAsDefaultInstance() {
- ::google::protobuf::testing::_FieldMaskWrapper_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::protobuf::FieldMask*>(
- ::google::protobuf::FieldMask::internal_default_instance());
- }
- void FieldMaskWrapper::clear_mask() {
- if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
- delete mask_;
- }
- mask_ = NULL;
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int FieldMaskWrapper::kMaskFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- FieldMaskWrapper::FieldMaskWrapper()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::scc_info_FieldMaskWrapper.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.testing.FieldMaskWrapper)
- }
- FieldMaskWrapper::FieldMaskWrapper(const FieldMaskWrapper& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- if (from.has_mask()) {
- mask_ = new ::google::protobuf::FieldMask(*from.mask_);
- } else {
- mask_ = NULL;
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.testing.FieldMaskWrapper)
- }
- void FieldMaskWrapper::SharedCtor() {
- mask_ = NULL;
- }
- FieldMaskWrapper::~FieldMaskWrapper() {
- // @@protoc_insertion_point(destructor:google.protobuf.testing.FieldMaskWrapper)
- SharedDtor();
- }
- void FieldMaskWrapper::SharedDtor() {
- if (this != internal_default_instance()) delete mask_;
- }
- void FieldMaskWrapper::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* FieldMaskWrapper::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const FieldMaskWrapper& FieldMaskWrapper::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::scc_info_FieldMaskWrapper.base);
- return *internal_default_instance();
- }
- void FieldMaskWrapper::Clear() {
- // @@protoc_insertion_point(message_clear_start:google.protobuf.testing.FieldMaskWrapper)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
- delete mask_;
- }
- mask_ = NULL;
- _internal_metadata_.Clear();
- }
- bool FieldMaskWrapper::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.FieldMaskWrapper)
- 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.FieldMask mask = 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_mask()));
- } 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.FieldMaskWrapper)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.testing.FieldMaskWrapper)
- return false;
- #undef DO_
- }
- void FieldMaskWrapper::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.testing.FieldMaskWrapper)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .google.protobuf.FieldMask mask = 1;
- if (this->has_mask()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->_internal_mask(), 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.FieldMaskWrapper)
- }
- ::google::protobuf::uint8* FieldMaskWrapper::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.testing.FieldMaskWrapper)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .google.protobuf.FieldMask mask = 1;
- if (this->has_mask()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 1, this->_internal_mask(), 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.FieldMaskWrapper)
- return target;
- }
- size_t FieldMaskWrapper::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:google.protobuf.testing.FieldMaskWrapper)
- 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.FieldMask mask = 1;
- if (this->has_mask()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *mask_);
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void FieldMaskWrapper::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.testing.FieldMaskWrapper)
- GOOGLE_DCHECK_NE(&from, this);
- const FieldMaskWrapper* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const FieldMaskWrapper>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.testing.FieldMaskWrapper)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.testing.FieldMaskWrapper)
- MergeFrom(*source);
- }
- }
- void FieldMaskWrapper::MergeFrom(const FieldMaskWrapper& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.testing.FieldMaskWrapper)
- 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_mask()) {
- mutable_mask()->::google::protobuf::FieldMask::MergeFrom(from.mask());
- }
- }
- void FieldMaskWrapper::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.testing.FieldMaskWrapper)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void FieldMaskWrapper::CopyFrom(const FieldMaskWrapper& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.testing.FieldMaskWrapper)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool FieldMaskWrapper::IsInitialized() const {
- return true;
- }
- void FieldMaskWrapper::Swap(FieldMaskWrapper* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void FieldMaskWrapper::InternalSwap(FieldMaskWrapper* other) {
- using std::swap;
- swap(mask_, other->mask_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata FieldMaskWrapper::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2finternal_2ftestdata_2ffield_5fmask_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::NestedFieldMask* Arena::CreateMaybeMessage< ::google::protobuf::testing::NestedFieldMask >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::NestedFieldMask >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::FieldMaskTest* Arena::CreateMaybeMessage< ::google::protobuf::testing::FieldMaskTest >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::FieldMaskTest >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::FieldMaskTestCases* Arena::CreateMaybeMessage< ::google::protobuf::testing::FieldMaskTestCases >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::FieldMaskTestCases >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::testing::FieldMaskWrapper* Arena::CreateMaybeMessage< ::google::protobuf::testing::FieldMaskWrapper >(Arena* arena) {
- return Arena::CreateInternal< ::google::protobuf::testing::FieldMaskWrapper >(arena);
- }
- } // namespace protobuf
- } // namespace google
- // @@protoc_insertion_point(global_scope)
|