| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: google/protobuf/util/message_differencer_unittest.proto
- #include <google/protobuf/util/message_differencer_unittest.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_2futil_2fmessage_5fdifferencer_5funittest_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TestField;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TestDiffMessage_Item;
- } // namespace protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto
- namespace protobuf_unittest {
- class TestFieldDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestField>
- _instance;
- } _TestField_default_instance_;
- class TestDiffMessage_ItemDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestDiffMessage_Item>
- _instance;
- } _TestDiffMessage_Item_default_instance_;
- class TestDiffMessageDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<TestDiffMessage>
- _instance;
- } _TestDiffMessage_default_instance_;
- } // namespace protobuf_unittest
- namespace protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto {
- static void InitDefaultsTestField() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::protobuf_unittest::_TestField_default_instance_;
- new (ptr) ::protobuf_unittest::TestField();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::protobuf_unittest::TestField::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_TestField =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTestField}, {}};
- static void InitDefaultsTestDiffMessage_Item() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::protobuf_unittest::_TestDiffMessage_Item_default_instance_;
- new (ptr) ::protobuf_unittest::TestDiffMessage_Item();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::protobuf_unittest::TestDiffMessage_Item::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<1> scc_info_TestDiffMessage_Item =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsTestDiffMessage_Item}, {
- &protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::scc_info_TestField.base,}};
- static void InitDefaultsTestDiffMessage() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::protobuf_unittest::_TestDiffMessage_default_instance_;
- new (ptr) ::protobuf_unittest::TestDiffMessage();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::protobuf_unittest::TestDiffMessage::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<2> scc_info_TestDiffMessage =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsTestDiffMessage}, {
- &protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::scc_info_TestDiffMessage_Item.base,
- &protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::scc_info_TestField.base,}};
- void InitDefaults() {
- ::google::protobuf::internal::InitSCC(&scc_info_TestField.base);
- ::google::protobuf::internal::InitSCC(&scc_info_TestDiffMessage_Item.base);
- ::google::protobuf::internal::InitSCC(&scc_info_TestDiffMessage.base);
- }
- ::google::protobuf::Metadata file_level_metadata[3];
- const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestField, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestField, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestField, a_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestField, b_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestField, c_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestField, rc_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestField, m_),
- 2,
- 3,
- 1,
- ~0u,
- 0,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage_Item, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage_Item, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage_Item, a_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage_Item, b_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage_Item, ra_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage_Item, rb_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage_Item, m_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage_Item, rm_),
- 2,
- 0,
- ~0u,
- ~0u,
- 1,
- ~0u,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage, _internal_metadata_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage, _extensions_),
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage, item_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage, v_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage, w_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage, m_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage, rv_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage, rw_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::protobuf_unittest::TestDiffMessage, rm_),
- ~0u,
- 2,
- 0,
- 1,
- ~0u,
- ~0u,
- ~0u,
- };
- static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, 10, sizeof(::protobuf_unittest::TestField)},
- { 15, 26, sizeof(::protobuf_unittest::TestDiffMessage_Item)},
- { 32, 44, sizeof(::protobuf_unittest::TestDiffMessage)},
- };
- static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestField_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDiffMessage_Item_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::protobuf_unittest::_TestDiffMessage_default_instance_),
- };
- void protobuf_AssignDescriptors() {
- AddDescriptors();
- AssignDescriptors(
- "google/protobuf/util/message_differencer_unittest.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, 3);
- }
- void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n7google/protobuf/util/message_differenc"
- "er_unittest.proto\022\021protobuf_unittest\"\257\001\n"
- "\tTestField\022\t\n\001a\030\003 \001(\005\022\t\n\001b\030\004 \001(\005\022\t\n\001c\030\001 "
- "\001(\005\022\n\n\002rc\030\002 \003(\005\022\'\n\001m\030\005 \001(\0132\034.protobuf_un"
- "ittest.TestField2L\n\002tf\022\".protobuf_unitte"
- "st.TestDiffMessage\030d \001(\0132\034.protobuf_unit"
- "test.TestField\"\342\002\n\017TestDiffMessage\0225\n\004it"
- "em\030\001 \003(\n2\'.protobuf_unittest.TestDiffMes"
- "sage.Item\022\r\n\001v\030\r \001(\005B\002\030\001\022\t\n\001w\030\016 \001(\t\022\'\n\001m"
- "\030\017 \001(\0132\034.protobuf_unittest.TestField\022\n\n\002"
- "rv\030\013 \003(\005\022\n\n\002rw\030\n \003(\t\022,\n\002rm\030\014 \003(\0132\034.proto"
- "buf_unittest.TestFieldB\002\030\001\032\207\001\n\004Item\022\t\n\001a"
- "\030\002 \001(\005\022\t\n\001b\030\004 \001(\t\022\n\n\002ra\030\003 \003(\005\022\n\n\002rb\030\005 \003("
- "\t\022\'\n\001m\030\006 \001(\0132\034.protobuf_unittest.TestFie"
- "ld\022(\n\002rm\030\007 \003(\0132\034.protobuf_unittest.TestF"
- "ield*\005\010d\020\310\001B\002H\001"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 615);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "google/protobuf/util/message_differencer_unittest.proto", &protobuf_RegisterTypes);
- }
- 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_2fmessage_5fdifferencer_5funittest_2eproto
- namespace protobuf_unittest {
- // ===================================================================
- void TestField::InitAsDefaultInstance() {
- ::protobuf_unittest::_TestField_default_instance_._instance.get_mutable()->m_ = const_cast< ::protobuf_unittest::TestField*>(
- ::protobuf_unittest::TestField::internal_default_instance());
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int TestField::kAFieldNumber;
- const int TestField::kBFieldNumber;
- const int TestField::kCFieldNumber;
- const int TestField::kRcFieldNumber;
- const int TestField::kMFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestField::TestField()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::scc_info_TestField.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:protobuf_unittest.TestField)
- }
- TestField::TestField(const TestField& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_),
- rc_(from.rc_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- if (from.has_m()) {
- m_ = new ::protobuf_unittest::TestField(*from.m_);
- } else {
- m_ = NULL;
- }
- ::memcpy(&c_, &from.c_,
- static_cast<size_t>(reinterpret_cast<char*>(&b_) -
- reinterpret_cast<char*>(&c_)) + sizeof(b_));
- // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestField)
- }
- void TestField::SharedCtor() {
- ::memset(&m_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&b_) -
- reinterpret_cast<char*>(&m_)) + sizeof(b_));
- }
- TestField::~TestField() {
- // @@protoc_insertion_point(destructor:protobuf_unittest.TestField)
- SharedDtor();
- }
- void TestField::SharedDtor() {
- if (this != internal_default_instance()) delete m_;
- }
- void TestField::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* TestField::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const TestField& TestField::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::scc_info_TestField.base);
- return *internal_default_instance();
- }
- void TestField::Clear() {
- // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestField)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- rc_.Clear();
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- GOOGLE_DCHECK(m_ != NULL);
- m_->Clear();
- }
- if (cached_has_bits & 14u) {
- ::memset(&c_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&b_) -
- reinterpret_cast<char*>(&c_)) + sizeof(b_));
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear();
- }
- bool TestField::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:protobuf_unittest.TestField)
- 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)) {
- // optional int32 c = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
- set_has_c();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &c_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated int32 rc = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- 1, 16u, input, this->mutable_rc())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, this->mutable_rc())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional int32 a = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
- set_has_a();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &a_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional int32 b = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
- set_has_b();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &b_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional .protobuf_unittest.TestField m = 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_m()));
- } 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:protobuf_unittest.TestField)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestField)
- return false;
- #undef DO_
- }
- void TestField::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestField)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 c = 1;
- if (cached_has_bits & 0x00000002u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->c(), output);
- }
- // repeated int32 rc = 2;
- for (int i = 0, n = this->rc_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(
- 2, this->rc(i), output);
- }
- // optional int32 a = 3;
- if (cached_has_bits & 0x00000004u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->a(), output);
- }
- // optional int32 b = 4;
- if (cached_has_bits & 0x00000008u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->b(), output);
- }
- // optional .protobuf_unittest.TestField m = 5;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, this->_internal_m(), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestField)
- }
- ::google::protobuf::uint8* TestField::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestField)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 c = 1;
- if (cached_has_bits & 0x00000002u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->c(), target);
- }
- // repeated int32 rc = 2;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32ToArray(2, this->rc_, target);
- // optional int32 a = 3;
- if (cached_has_bits & 0x00000004u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->a(), target);
- }
- // optional int32 b = 4;
- if (cached_has_bits & 0x00000008u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->b(), target);
- }
- // optional .protobuf_unittest.TestField m = 5;
- if (cached_has_bits & 0x00000001u) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 5, this->_internal_m(), deterministic, target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestField)
- return target;
- }
- size_t TestField::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestField)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- // repeated int32 rc = 2;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- Int32Size(this->rc_);
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->rc_size());
- total_size += data_size;
- }
- if (_has_bits_[0 / 32] & 15u) {
- // optional .protobuf_unittest.TestField m = 5;
- if (has_m()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *m_);
- }
- // optional int32 c = 1;
- if (has_c()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->c());
- }
- // optional int32 a = 3;
- if (has_a()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->a());
- }
- // optional int32 b = 4;
- if (has_b()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->b());
- }
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void TestField::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestField)
- GOOGLE_DCHECK_NE(&from, this);
- const TestField* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const TestField>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestField)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestField)
- MergeFrom(*source);
- }
- }
- void TestField::MergeFrom(const TestField& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestField)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- rc_.MergeFrom(from.rc_);
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 15u) {
- if (cached_has_bits & 0x00000001u) {
- mutable_m()->::protobuf_unittest::TestField::MergeFrom(from.m());
- }
- if (cached_has_bits & 0x00000002u) {
- c_ = from.c_;
- }
- if (cached_has_bits & 0x00000004u) {
- a_ = from.a_;
- }
- if (cached_has_bits & 0x00000008u) {
- b_ = from.b_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- }
- void TestField::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestField)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void TestField::CopyFrom(const TestField& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestField)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TestField::IsInitialized() const {
- return true;
- }
- void TestField::Swap(TestField* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void TestField::InternalSwap(TestField* other) {
- using std::swap;
- rc_.InternalSwap(&other->rc_);
- swap(m_, other->m_);
- swap(c_, other->c_);
- swap(a_, other->a_);
- swap(b_, other->b_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata TestField::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void TestDiffMessage_Item::InitAsDefaultInstance() {
- ::protobuf_unittest::_TestDiffMessage_Item_default_instance_._instance.get_mutable()->m_ = const_cast< ::protobuf_unittest::TestField*>(
- ::protobuf_unittest::TestField::internal_default_instance());
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int TestDiffMessage_Item::kAFieldNumber;
- const int TestDiffMessage_Item::kBFieldNumber;
- const int TestDiffMessage_Item::kRaFieldNumber;
- const int TestDiffMessage_Item::kRbFieldNumber;
- const int TestDiffMessage_Item::kMFieldNumber;
- const int TestDiffMessage_Item::kRmFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestDiffMessage_Item::TestDiffMessage_Item()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::scc_info_TestDiffMessage_Item.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:protobuf_unittest.TestDiffMessage.Item)
- }
- TestDiffMessage_Item::TestDiffMessage_Item(const TestDiffMessage_Item& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_),
- ra_(from.ra_),
- rb_(from.rb_),
- rm_(from.rm_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- b_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_b()) {
- b_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.b_);
- }
- if (from.has_m()) {
- m_ = new ::protobuf_unittest::TestField(*from.m_);
- } else {
- m_ = NULL;
- }
- a_ = from.a_;
- // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDiffMessage.Item)
- }
- void TestDiffMessage_Item::SharedCtor() {
- b_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::memset(&m_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&a_) -
- reinterpret_cast<char*>(&m_)) + sizeof(a_));
- }
- TestDiffMessage_Item::~TestDiffMessage_Item() {
- // @@protoc_insertion_point(destructor:protobuf_unittest.TestDiffMessage.Item)
- SharedDtor();
- }
- void TestDiffMessage_Item::SharedDtor() {
- b_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete m_;
- }
- void TestDiffMessage_Item::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* TestDiffMessage_Item::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const TestDiffMessage_Item& TestDiffMessage_Item::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::scc_info_TestDiffMessage_Item.base);
- return *internal_default_instance();
- }
- void TestDiffMessage_Item::Clear() {
- // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestDiffMessage.Item)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- ra_.Clear();
- rb_.Clear();
- rm_.Clear();
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 3u) {
- if (cached_has_bits & 0x00000001u) {
- b_.ClearNonDefaultToEmptyNoArena();
- }
- if (cached_has_bits & 0x00000002u) {
- GOOGLE_DCHECK(m_ != NULL);
- m_->Clear();
- }
- }
- a_ = 0;
- _has_bits_.Clear();
- _internal_metadata_.Clear();
- }
- bool TestDiffMessage_Item::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:protobuf_unittest.TestDiffMessage.Item)
- 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)) {
- // optional int32 a = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
- set_has_a();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &a_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated int32 ra = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- 1, 24u, input, this->mutable_ra())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, this->mutable_ra())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional string b = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_b()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->b().data(), static_cast<int>(this->b().length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "protobuf_unittest.TestDiffMessage.Item.b");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated string rb = 5;
- case 5: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->add_rb()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->rb(this->rb_size() - 1).data(),
- static_cast<int>(this->rb(this->rb_size() - 1).length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "protobuf_unittest.TestDiffMessage.Item.rb");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional .protobuf_unittest.TestField m = 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_m()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .protobuf_unittest.TestField rm = 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, add_rm()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- input->SetLastTag(tag);
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:protobuf_unittest.TestDiffMessage.Item)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDiffMessage.Item)
- return false;
- #undef DO_
- }
- void TestDiffMessage_Item::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestDiffMessage.Item)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 a = 2;
- if (cached_has_bits & 0x00000004u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->a(), output);
- }
- // repeated int32 ra = 3;
- for (int i = 0, n = this->ra_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(
- 3, this->ra(i), output);
- }
- // optional string b = 4;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->b().data(), static_cast<int>(this->b().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest.TestDiffMessage.Item.b");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 4, this->b(), output);
- }
- // repeated string rb = 5;
- for (int i = 0, n = this->rb_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->rb(i).data(), static_cast<int>(this->rb(i).length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest.TestDiffMessage.Item.rb");
- ::google::protobuf::internal::WireFormatLite::WriteString(
- 5, this->rb(i), output);
- }
- // optional .protobuf_unittest.TestField m = 6;
- if (cached_has_bits & 0x00000002u) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 6, this->_internal_m(), output);
- }
- // repeated .protobuf_unittest.TestField rm = 7;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->rm_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 7,
- this->rm(static_cast<int>(i)),
- output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDiffMessage.Item)
- }
- ::google::protobuf::uint8* TestDiffMessage_Item::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestDiffMessage.Item)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int32 a = 2;
- if (cached_has_bits & 0x00000004u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->a(), target);
- }
- // repeated int32 ra = 3;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32ToArray(3, this->ra_, target);
- // optional string b = 4;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->b().data(), static_cast<int>(this->b().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest.TestDiffMessage.Item.b");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 4, this->b(), target);
- }
- // repeated string rb = 5;
- for (int i = 0, n = this->rb_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->rb(i).data(), static_cast<int>(this->rb(i).length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest.TestDiffMessage.Item.rb");
- target = ::google::protobuf::internal::WireFormatLite::
- WriteStringToArray(5, this->rb(i), target);
- }
- // optional .protobuf_unittest.TestField m = 6;
- if (cached_has_bits & 0x00000002u) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 6, this->_internal_m(), deterministic, target);
- }
- // repeated .protobuf_unittest.TestField rm = 7;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->rm_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 7, this->rm(static_cast<int>(i)), deterministic, target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDiffMessage.Item)
- return target;
- }
- size_t TestDiffMessage_Item::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDiffMessage.Item)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- // repeated int32 ra = 3;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- Int32Size(this->ra_);
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->ra_size());
- total_size += data_size;
- }
- // repeated string rb = 5;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->rb_size());
- for (int i = 0, n = this->rb_size(); i < n; i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
- this->rb(i));
- }
- // repeated .protobuf_unittest.TestField rm = 7;
- {
- unsigned int count = static_cast<unsigned int>(this->rm_size());
- total_size += 1UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->rm(static_cast<int>(i)));
- }
- }
- if (_has_bits_[0 / 32] & 7u) {
- // optional string b = 4;
- if (has_b()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->b());
- }
- // optional .protobuf_unittest.TestField m = 6;
- if (has_m()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *m_);
- }
- // optional int32 a = 2;
- if (has_a()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->a());
- }
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void TestDiffMessage_Item::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestDiffMessage.Item)
- GOOGLE_DCHECK_NE(&from, this);
- const TestDiffMessage_Item* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const TestDiffMessage_Item>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestDiffMessage.Item)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestDiffMessage.Item)
- MergeFrom(*source);
- }
- }
- void TestDiffMessage_Item::MergeFrom(const TestDiffMessage_Item& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestDiffMessage.Item)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- ra_.MergeFrom(from.ra_);
- rb_.MergeFrom(from.rb_);
- rm_.MergeFrom(from.rm_);
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 7u) {
- if (cached_has_bits & 0x00000001u) {
- set_has_b();
- b_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.b_);
- }
- if (cached_has_bits & 0x00000002u) {
- mutable_m()->::protobuf_unittest::TestField::MergeFrom(from.m());
- }
- if (cached_has_bits & 0x00000004u) {
- a_ = from.a_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- }
- void TestDiffMessage_Item::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestDiffMessage.Item)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void TestDiffMessage_Item::CopyFrom(const TestDiffMessage_Item& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDiffMessage.Item)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TestDiffMessage_Item::IsInitialized() const {
- return true;
- }
- void TestDiffMessage_Item::Swap(TestDiffMessage_Item* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void TestDiffMessage_Item::InternalSwap(TestDiffMessage_Item* other) {
- using std::swap;
- ra_.InternalSwap(&other->ra_);
- rb_.InternalSwap(CastToBase(&other->rb_));
- CastToBase(&rm_)->InternalSwap(CastToBase(&other->rm_));
- b_.Swap(&other->b_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(m_, other->m_);
- swap(a_, other->a_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata TestDiffMessage_Item::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void TestDiffMessage::InitAsDefaultInstance() {
- ::protobuf_unittest::_TestDiffMessage_default_instance_._instance.get_mutable()->m_ = const_cast< ::protobuf_unittest::TestField*>(
- ::protobuf_unittest::TestField::internal_default_instance());
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int TestDiffMessage::kItemFieldNumber;
- const int TestDiffMessage::kVFieldNumber;
- const int TestDiffMessage::kWFieldNumber;
- const int TestDiffMessage::kMFieldNumber;
- const int TestDiffMessage::kRvFieldNumber;
- const int TestDiffMessage::kRwFieldNumber;
- const int TestDiffMessage::kRmFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- TestDiffMessage::TestDiffMessage()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::scc_info_TestDiffMessage.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:protobuf_unittest.TestDiffMessage)
- }
- TestDiffMessage::TestDiffMessage(const TestDiffMessage& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_),
- item_(from.item_),
- rw_(from.rw_),
- rv_(from.rv_),
- rm_(from.rm_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- _extensions_.MergeFrom(from._extensions_);
- w_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_w()) {
- w_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.w_);
- }
- if (from.has_m()) {
- m_ = new ::protobuf_unittest::TestField(*from.m_);
- } else {
- m_ = NULL;
- }
- v_ = from.v_;
- // @@protoc_insertion_point(copy_constructor:protobuf_unittest.TestDiffMessage)
- }
- void TestDiffMessage::SharedCtor() {
- w_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::memset(&m_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&v_) -
- reinterpret_cast<char*>(&m_)) + sizeof(v_));
- }
- TestDiffMessage::~TestDiffMessage() {
- // @@protoc_insertion_point(destructor:protobuf_unittest.TestDiffMessage)
- SharedDtor();
- }
- void TestDiffMessage::SharedDtor() {
- w_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete m_;
- }
- void TestDiffMessage::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* TestDiffMessage::descriptor() {
- ::protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const TestDiffMessage& TestDiffMessage::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::scc_info_TestDiffMessage.base);
- return *internal_default_instance();
- }
- void TestDiffMessage::Clear() {
- // @@protoc_insertion_point(message_clear_start:protobuf_unittest.TestDiffMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- _extensions_.Clear();
- item_.Clear();
- rw_.Clear();
- rv_.Clear();
- rm_.Clear();
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 3u) {
- if (cached_has_bits & 0x00000001u) {
- w_.ClearNonDefaultToEmptyNoArena();
- }
- if (cached_has_bits & 0x00000002u) {
- GOOGLE_DCHECK(m_ != NULL);
- m_->Clear();
- }
- }
- v_ = 0;
- _has_bits_.Clear();
- _internal_metadata_.Clear();
- }
- bool TestDiffMessage::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:protobuf_unittest.TestDiffMessage)
- 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)) {
- // repeated group Item = 1 { ... };
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(11u /* 11 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadGroup(1, input, add_item()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated string rw = 10;
- case 10: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->add_rw()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->rw(this->rw_size() - 1).data(),
- static_cast<int>(this->rw(this->rw_size() - 1).length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "protobuf_unittest.TestDiffMessage.rw");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated int32 rv = 11;
- case 11: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(88u /* 88 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- 1, 88u, input, this->mutable_rv())));
- } else if (
- static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, this->mutable_rv())));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // repeated .protobuf_unittest.TestField rm = 12 [deprecated = true];
- case 12: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, add_rm()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional int32 v = 13 [deprecated = true];
- case 13: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
- set_has_v();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &v_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional string w = 14;
- case 14: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_w()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->w().data(), static_cast<int>(this->w().length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "protobuf_unittest.TestDiffMessage.w");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional .protobuf_unittest.TestField m = 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_m()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- if ((800u <= tag && tag < 1600u)) {
- DO_(_extensions_.ParseField(tag, input,
- internal_default_instance(),
- _internal_metadata_.mutable_unknown_fields()));
- continue;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:protobuf_unittest.TestDiffMessage)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:protobuf_unittest.TestDiffMessage)
- return false;
- #undef DO_
- }
- void TestDiffMessage::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:protobuf_unittest.TestDiffMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // repeated group Item = 1 { ... };
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->item_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(
- 1,
- this->item(static_cast<int>(i)),
- output);
- }
- // repeated string rw = 10;
- for (int i = 0, n = this->rw_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->rw(i).data(), static_cast<int>(this->rw(i).length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest.TestDiffMessage.rw");
- ::google::protobuf::internal::WireFormatLite::WriteString(
- 10, this->rw(i), output);
- }
- // repeated int32 rv = 11;
- for (int i = 0, n = this->rv_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(
- 11, this->rv(i), output);
- }
- // repeated .protobuf_unittest.TestField rm = 12 [deprecated = true];
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->rm_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 12,
- this->rm(static_cast<int>(i)),
- output);
- }
- cached_has_bits = _has_bits_[0];
- // optional int32 v = 13 [deprecated = true];
- if (cached_has_bits & 0x00000004u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(13, this->v(), output);
- }
- // optional string w = 14;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->w().data(), static_cast<int>(this->w().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest.TestDiffMessage.w");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 14, this->w(), output);
- }
- // optional .protobuf_unittest.TestField m = 15;
- if (cached_has_bits & 0x00000002u) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 15, this->_internal_m(), output);
- }
- // Extension range [100, 200)
- _extensions_.SerializeWithCachedSizes(
- 100, 200, output);
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:protobuf_unittest.TestDiffMessage)
- }
- ::google::protobuf::uint8* TestDiffMessage::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:protobuf_unittest.TestDiffMessage)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // repeated group Item = 1 { ... };
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->item_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteGroupToArray(
- 1, this->item(static_cast<int>(i)), deterministic, target);
- }
- // repeated string rw = 10;
- for (int i = 0, n = this->rw_size(); i < n; i++) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->rw(i).data(), static_cast<int>(this->rw(i).length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest.TestDiffMessage.rw");
- target = ::google::protobuf::internal::WireFormatLite::
- WriteStringToArray(10, this->rw(i), target);
- }
- // repeated int32 rv = 11;
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32ToArray(11, this->rv_, target);
- // repeated .protobuf_unittest.TestField rm = 12 [deprecated = true];
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->rm_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 12, this->rm(static_cast<int>(i)), deterministic, target);
- }
- cached_has_bits = _has_bits_[0];
- // optional int32 v = 13 [deprecated = true];
- if (cached_has_bits & 0x00000004u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(13, this->v(), target);
- }
- // optional string w = 14;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->w().data(), static_cast<int>(this->w().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "protobuf_unittest.TestDiffMessage.w");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 14, this->w(), target);
- }
- // optional .protobuf_unittest.TestField m = 15;
- if (cached_has_bits & 0x00000002u) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 15, this->_internal_m(), deterministic, target);
- }
- // Extension range [100, 200)
- target = _extensions_.InternalSerializeWithCachedSizesToArray(
- 100, 200, deterministic, target);
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf_unittest.TestDiffMessage)
- return target;
- }
- size_t TestDiffMessage::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:protobuf_unittest.TestDiffMessage)
- size_t total_size = 0;
- total_size += _extensions_.ByteSize();
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- // repeated group Item = 1 { ... };
- {
- unsigned int count = static_cast<unsigned int>(this->item_size());
- total_size += 2UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::GroupSize(
- this->item(static_cast<int>(i)));
- }
- }
- // repeated string rw = 10;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->rw_size());
- for (int i = 0, n = this->rw_size(); i < n; i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
- this->rw(i));
- }
- // repeated int32 rv = 11;
- {
- size_t data_size = ::google::protobuf::internal::WireFormatLite::
- Int32Size(this->rv_);
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->rv_size());
- total_size += data_size;
- }
- // repeated .protobuf_unittest.TestField rm = 12 [deprecated = true];
- {
- unsigned int count = static_cast<unsigned int>(this->rm_size());
- total_size += 1UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->rm(static_cast<int>(i)));
- }
- }
- if (_has_bits_[0 / 32] & 7u) {
- // optional string w = 14;
- if (has_w()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->w());
- }
- // optional .protobuf_unittest.TestField m = 15;
- if (has_m()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *m_);
- }
- // optional int32 v = 13 [deprecated = true];
- if (has_v()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->v());
- }
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void TestDiffMessage::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:protobuf_unittest.TestDiffMessage)
- GOOGLE_DCHECK_NE(&from, this);
- const TestDiffMessage* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const TestDiffMessage>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:protobuf_unittest.TestDiffMessage)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:protobuf_unittest.TestDiffMessage)
- MergeFrom(*source);
- }
- }
- void TestDiffMessage::MergeFrom(const TestDiffMessage& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf_unittest.TestDiffMessage)
- GOOGLE_DCHECK_NE(&from, this);
- _extensions_.MergeFrom(from._extensions_);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- item_.MergeFrom(from.item_);
- rw_.MergeFrom(from.rw_);
- rv_.MergeFrom(from.rv_);
- rm_.MergeFrom(from.rm_);
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 7u) {
- if (cached_has_bits & 0x00000001u) {
- set_has_w();
- w_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.w_);
- }
- if (cached_has_bits & 0x00000002u) {
- mutable_m()->::protobuf_unittest::TestField::MergeFrom(from.m());
- }
- if (cached_has_bits & 0x00000004u) {
- v_ = from.v_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- }
- void TestDiffMessage::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:protobuf_unittest.TestDiffMessage)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void TestDiffMessage::CopyFrom(const TestDiffMessage& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:protobuf_unittest.TestDiffMessage)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TestDiffMessage::IsInitialized() const {
- if (!_extensions_.IsInitialized()) {
- return false;
- }
- return true;
- }
- void TestDiffMessage::Swap(TestDiffMessage* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void TestDiffMessage::InternalSwap(TestDiffMessage* other) {
- using std::swap;
- CastToBase(&item_)->InternalSwap(CastToBase(&other->item_));
- rw_.InternalSwap(CastToBase(&other->rw_));
- rv_.InternalSwap(&other->rv_);
- CastToBase(&rm_)->InternalSwap(CastToBase(&other->rm_));
- w_.Swap(&other->w_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(m_, other->m_);
- swap(v_, other->v_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- _extensions_.Swap(&other->_extensions_);
- }
- ::google::protobuf::Metadata TestDiffMessage::GetMetadata() const {
- protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2futil_2fmessage_5fdifferencer_5funittest_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int TestField::kTfFieldNumber;
- #endif
- ::google::protobuf::internal::ExtensionIdentifier< ::protobuf_unittest::TestDiffMessage,
- ::google::protobuf::internal::MessageTypeTraits< ::protobuf_unittest::TestField >, 11, false >
- TestField::tf(kTfFieldNumber, *::protobuf_unittest::TestField::internal_default_instance());
- // @@protoc_insertion_point(namespace_scope)
- } // namespace protobuf_unittest
- namespace google {
- namespace protobuf {
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestField* Arena::CreateMaybeMessage< ::protobuf_unittest::TestField >(Arena* arena) {
- return Arena::CreateInternal< ::protobuf_unittest::TestField >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDiffMessage_Item* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDiffMessage_Item >(Arena* arena) {
- return Arena::CreateInternal< ::protobuf_unittest::TestDiffMessage_Item >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::protobuf_unittest::TestDiffMessage* Arena::CreateMaybeMessage< ::protobuf_unittest::TestDiffMessage >(Arena* arena) {
- return Arena::CreateInternal< ::protobuf_unittest::TestDiffMessage >(arena);
- }
- } // namespace protobuf
- } // namespace google
- // @@protoc_insertion_point(global_scope)
|