|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: Message2Server.proto
-
- #include "Message2Server.pb.h"
-
- #include <algorithm>
-
- #include <google/protobuf/io/coded_stream.h>
- #include <google/protobuf/extension_set.h>
- #include <google/protobuf/wire_format_lite.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>
- // @@protoc_insertion_point(includes)
- #include <google/protobuf/port_def.inc>
-
- PROTOBUF_PRAGMA_INIT_SEG
- namespace protobuf
- {
- constexpr PlayerMsg::PlayerMsg(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized
- ) :
- player_id_(int64_t{0}),
- player_type_(0)
-
- ,
- _oneof_case_{}
- {
- }
- struct PlayerMsgDefaultTypeInternal
- {
- constexpr PlayerMsgDefaultTypeInternal() :
- _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{})
- {
- }
- ~PlayerMsgDefaultTypeInternal()
- {
- }
- union
- {
- PlayerMsg _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PlayerMsgDefaultTypeInternal _PlayerMsg_default_instance_;
- constexpr MoveMsg::MoveMsg(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized
- ) :
- player_id_(int64_t{0}),
- angle_(0),
- time_in_milliseconds_(int64_t{0})
- {
- }
- struct MoveMsgDefaultTypeInternal
- {
- constexpr MoveMsgDefaultTypeInternal() :
- _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{})
- {
- }
- ~MoveMsgDefaultTypeInternal()
- {
- }
- union
- {
- MoveMsg _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MoveMsgDefaultTypeInternal _MoveMsg_default_instance_;
- constexpr PickMsg::PickMsg(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized
- ) :
- player_id_(int64_t{0}),
- prop_type_(0)
- {
- }
- struct PickMsgDefaultTypeInternal
- {
- constexpr PickMsgDefaultTypeInternal() :
- _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{})
- {
- }
- ~PickMsgDefaultTypeInternal()
- {
- }
- union
- {
- PickMsg _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PickMsgDefaultTypeInternal _PickMsg_default_instance_;
- constexpr SendMsg::SendMsg(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized
- ) :
- message_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string),
- player_id_(int64_t{0}),
- to_player_id_(int64_t{0})
- {
- }
- struct SendMsgDefaultTypeInternal
- {
- constexpr SendMsgDefaultTypeInternal() :
- _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{})
- {
- }
- ~SendMsgDefaultTypeInternal()
- {
- }
- union
- {
- SendMsg _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SendMsgDefaultTypeInternal _SendMsg_default_instance_;
- constexpr AttackMsg::AttackMsg(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized
- ) :
- player_id_(int64_t{0}),
- angle_(0)
- {
- }
- struct AttackMsgDefaultTypeInternal
- {
- constexpr AttackMsgDefaultTypeInternal() :
- _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{})
- {
- }
- ~AttackMsgDefaultTypeInternal()
- {
- }
- union
- {
- AttackMsg _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AttackMsgDefaultTypeInternal _AttackMsg_default_instance_;
- constexpr IDMsg::IDMsg(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized
- ) :
- playerid_(int64_t{0})
- {
- }
- struct IDMsgDefaultTypeInternal
- {
- constexpr IDMsgDefaultTypeInternal() :
- _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{})
- {
- }
- ~IDMsgDefaultTypeInternal()
- {
- }
- union
- {
- IDMsg _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT IDMsgDefaultTypeInternal _IDMsg_default_instance_;
- } // namespace protobuf
- static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_Message2Server_2eproto[6];
- static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_Message2Server_2eproto = nullptr;
- static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_Message2Server_2eproto = nullptr;
-
- const uint32_t TableStruct_Message2Server_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _internal_metadata_),
- ~0u, // no _extensions_
- PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, _oneof_case_[0]),
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, player_id_),
- PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, player_type_),
- ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
- ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
- PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, job_type_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, player_id_),
- PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, angle_),
- PROTOBUF_FIELD_OFFSET(::protobuf::MoveMsg, time_in_milliseconds_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::protobuf::PickMsg, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::protobuf::PickMsg, player_id_),
- PROTOBUF_FIELD_OFFSET(::protobuf::PickMsg, prop_type_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, player_id_),
- PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, to_player_id_),
- PROTOBUF_FIELD_OFFSET(::protobuf::SendMsg, message_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::protobuf::AttackMsg, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::protobuf::AttackMsg, player_id_),
- PROTOBUF_FIELD_OFFSET(::protobuf::AttackMsg, angle_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::protobuf::IDMsg, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::protobuf::IDMsg, playerid_),
- };
- static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- {0, -1, -1, sizeof(::protobuf::PlayerMsg)},
- {11, -1, -1, sizeof(::protobuf::MoveMsg)},
- {20, -1, -1, sizeof(::protobuf::PickMsg)},
- {28, -1, -1, sizeof(::protobuf::SendMsg)},
- {37, -1, -1, sizeof(::protobuf::AttackMsg)},
- {45, -1, -1, sizeof(::protobuf::IDMsg)},
- };
-
- static ::PROTOBUF_NAMESPACE_ID::Message const* const file_default_instances[] = {
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::protobuf::_PlayerMsg_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::protobuf::_MoveMsg_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::protobuf::_PickMsg_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::protobuf::_SendMsg_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::protobuf::_AttackMsg_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::protobuf::_IDMsg_default_instance_),
- };
-
- const char descriptor_table_protodef_Message2Server_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
- "\n\024Message2Server.proto\022\010protobuf\032\021Messag"
- "eType.proto\"\257\001\n\tPlayerMsg\022\021\n\tplayer_id\030\001"
- " \001(\003\022)\n\013player_type\030\002 \001(\0162\024.protobuf.Pla"
- "yerType\022)\n\nhuman_type\030\003 \001(\0162\023.protobuf.H"
- "umanTypeH\000\022-\n\014butcher_type\030\004 \001(\0162\025.proto"
- "buf.ButcherTypeH\000B\n\n\010job_type\"I\n\007MoveMsg"
- "\022\021\n\tplayer_id\030\001 \001(\003\022\r\n\005angle\030\002 \001(\001\022\034\n\024ti"
- "me_in_milliseconds\030\003 \001(\003\"C\n\007PickMsg\022\021\n\tp"
- "layer_id\030\001 \001(\003\022%\n\tprop_type\030\002 \001(\0162\022.prot"
- "obuf.PropType\"C\n\007SendMsg\022\021\n\tplayer_id\030\001 "
- "\001(\003\022\024\n\014to_player_id\030\002 \001(\003\022\017\n\007message\030\003 \001"
- "(\t\"-\n\tAttackMsg\022\021\n\tplayer_id\030\001 \001(\003\022\r\n\005an"
- "gle\030\002 \001(\001\"\031\n\005IDMsg\022\020\n\010playerID\030\001 \001(\003b\006pr"
- "oto3";
- static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* const descriptor_table_Message2Server_2eproto_deps[1] = {
- &::descriptor_table_MessageType_2eproto,
- };
- static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_Message2Server_2eproto_once;
- const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_Message2Server_2eproto = {
- false,
- false,
- 524,
- descriptor_table_protodef_Message2Server_2eproto,
- "Message2Server.proto",
- &descriptor_table_Message2Server_2eproto_once,
- descriptor_table_Message2Server_2eproto_deps,
- 1,
- 6,
- schemas,
- file_default_instances,
- TableStruct_Message2Server_2eproto::offsets,
- file_level_metadata_Message2Server_2eproto,
- file_level_enum_descriptors_Message2Server_2eproto,
- file_level_service_descriptors_Message2Server_2eproto,
- };
- PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_Message2Server_2eproto_getter()
- {
- return &descriptor_table_Message2Server_2eproto;
- }
-
- // Force running AddDescriptors() at dynamic initialization time.
- PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_Message2Server_2eproto(&descriptor_table_Message2Server_2eproto);
- namespace protobuf
- {
-
- // ===================================================================
-
- class PlayerMsg::_Internal
- {
- public:
- };
-
- PlayerMsg::PlayerMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
- ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
- {
- SharedCtor();
- if (!is_message_owned)
- {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:protobuf.PlayerMsg)
- }
- PlayerMsg::PlayerMsg(const PlayerMsg& from) :
- ::PROTOBUF_NAMESPACE_ID::Message()
- {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- ::memcpy(&player_id_, &from.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&player_type_) - reinterpret_cast<char*>(&player_id_)) + sizeof(player_type_));
- clear_has_job_type();
- switch (from.job_type_case())
- {
- case kHumanType:
- {
- _internal_set_human_type(from._internal_human_type());
- break;
- }
- case kButcherType:
- {
- _internal_set_butcher_type(from._internal_butcher_type());
- break;
- }
- case JOB_TYPE_NOT_SET:
- {
- break;
- }
- }
- // @@protoc_insertion_point(copy_constructor:protobuf.PlayerMsg)
- }
-
- inline void PlayerMsg::SharedCtor()
- {
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(reinterpret_cast<char*>(&player_id_) - reinterpret_cast<char*>(this)), 0, static_cast<size_t>(reinterpret_cast<char*>(&player_type_) - reinterpret_cast<char*>(&player_id_)) + sizeof(player_type_));
- clear_has_job_type();
- }
-
- PlayerMsg::~PlayerMsg()
- {
- // @@protoc_insertion_point(destructor:protobuf.PlayerMsg)
- if (GetArenaForAllocation() != nullptr)
- return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
-
- inline void PlayerMsg::SharedDtor()
- {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- if (has_job_type())
- {
- clear_job_type();
- }
- }
-
- void PlayerMsg::ArenaDtor(void* object)
- {
- PlayerMsg* _this = reinterpret_cast<PlayerMsg*>(object);
- (void)_this;
- }
- void PlayerMsg::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*)
- {
- }
- void PlayerMsg::SetCachedSize(int size) const
- {
- _cached_size_.Set(size);
- }
-
- void PlayerMsg::clear_job_type()
- {
- // @@protoc_insertion_point(one_of_clear_start:protobuf.PlayerMsg)
- switch (job_type_case())
- {
- case kHumanType:
- {
- // No need to clear
- break;
- }
- case kButcherType:
- {
- // No need to clear
- break;
- }
- case JOB_TYPE_NOT_SET:
- {
- break;
- }
- }
- _oneof_case_[0] = JOB_TYPE_NOT_SET;
- }
-
- void PlayerMsg::Clear()
- {
- // @@protoc_insertion_point(message_clear_start:protobuf.PlayerMsg)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void)cached_has_bits;
-
- ::memset(&player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&player_type_) - reinterpret_cast<char*>(&player_id_)) + sizeof(player_type_));
- clear_job_type();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
-
- const char* PlayerMsg::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx)
- {
- #define CHK_(x) \
- if (PROTOBUF_PREDICT_FALSE(!(x))) \
- goto failure
- while (!ctx->Done(&ptr))
- {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3)
- {
- // int64 player_id = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
- {
- player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- }
- else
- goto handle_unusual;
- continue;
- // .protobuf.PlayerType player_type = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
- {
- uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- _internal_set_player_type(static_cast<::protobuf::PlayerType>(val));
- }
- else
- goto handle_unusual;
- continue;
- // .protobuf.HumanType human_type = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24))
- {
- uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- _internal_set_human_type(static_cast<::protobuf::HumanType>(val));
- }
- else
- goto handle_unusual;
- continue;
- // .protobuf.ButcherType butcher_type = 4;
- case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32))
- {
- uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- _internal_set_butcher_type(static_cast<::protobuf::ButcherType>(val));
- }
- else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4))
- {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr,
- ctx
- );
- CHK_(ptr != nullptr);
- } // while
- message_done:
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
-
- uint8_t* PlayerMsg::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
- ) const
- {
- // @@protoc_insertion_point(serialize_to_array_start:protobuf.PlayerMsg)
- uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
-
- // int64 player_id = 1;
- if (this->_internal_player_id() != 0)
- {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
- }
-
- // .protobuf.PlayerType player_type = 2;
- if (this->_internal_player_type() != 0)
- {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
- 2, this->_internal_player_type(), target
- );
- }
-
- // .protobuf.HumanType human_type = 3;
- if (_internal_has_human_type())
- {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
- 3, this->_internal_human_type(), target
- );
- }
-
- // .protobuf.ButcherType butcher_type = 4;
- if (_internal_has_butcher_type())
- {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
- 4, this->_internal_butcher_type(), target
- );
- }
-
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
- {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
- );
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf.PlayerMsg)
- return target;
- }
-
- size_t PlayerMsg::ByteSizeLong() const
- {
- // @@protoc_insertion_point(message_byte_size_start:protobuf.PlayerMsg)
- size_t total_size = 0;
-
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void)cached_has_bits;
-
- // int64 player_id = 1;
- if (this->_internal_player_id() != 0)
- {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
- }
-
- // .protobuf.PlayerType player_type = 2;
- if (this->_internal_player_type() != 0)
- {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_player_type());
- }
-
- switch (job_type_case())
- {
- // .protobuf.HumanType human_type = 3;
- case kHumanType:
- {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_human_type());
- break;
- }
- // .protobuf.ButcherType butcher_type = 4;
- case kButcherType:
- {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_butcher_type());
- break;
- }
- case JOB_TYPE_NOT_SET:
- {
- break;
- }
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
-
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PlayerMsg::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- PlayerMsg::MergeImpl};
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* PlayerMsg::GetClassData() const
- {
- return &_class_data_;
- }
-
- void PlayerMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from)
- {
- static_cast<PlayerMsg*>(to)->MergeFrom(
- static_cast<const PlayerMsg&>(from)
- );
- }
-
- void PlayerMsg::MergeFrom(const PlayerMsg& from)
- {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.PlayerMsg)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
-
- if (from._internal_player_id() != 0)
- {
- _internal_set_player_id(from._internal_player_id());
- }
- if (from._internal_player_type() != 0)
- {
- _internal_set_player_type(from._internal_player_type());
- }
- switch (from.job_type_case())
- {
- case kHumanType:
- {
- _internal_set_human_type(from._internal_human_type());
- break;
- }
- case kButcherType:
- {
- _internal_set_butcher_type(from._internal_butcher_type());
- break;
- }
- case JOB_TYPE_NOT_SET:
- {
- break;
- }
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
-
- void PlayerMsg::CopyFrom(const PlayerMsg& from)
- {
- // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.PlayerMsg)
- if (&from == this)
- return;
- Clear();
- MergeFrom(from);
- }
-
- bool PlayerMsg::IsInitialized() const
- {
- return true;
- }
-
- void PlayerMsg::InternalSwap(PlayerMsg* other)
- {
- using std::swap;
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(PlayerMsg, player_type_) + sizeof(PlayerMsg::player_type_) - PROTOBUF_FIELD_OFFSET(PlayerMsg, player_id_)>(
- reinterpret_cast<char*>(&player_id_),
- reinterpret_cast<char*>(&other->player_id_)
- );
- swap(job_type_, other->job_type_);
- swap(_oneof_case_[0], other->_oneof_case_[0]);
- }
-
- ::PROTOBUF_NAMESPACE_ID::Metadata PlayerMsg::GetMetadata() const
- {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[0]
- );
- }
-
- // ===================================================================
-
- class MoveMsg::_Internal
- {
- public:
- };
-
- MoveMsg::MoveMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
- ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
- {
- SharedCtor();
- if (!is_message_owned)
- {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:protobuf.MoveMsg)
- }
- MoveMsg::MoveMsg(const MoveMsg& from) :
- ::PROTOBUF_NAMESPACE_ID::Message()
- {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- ::memcpy(&player_id_, &from.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&time_in_milliseconds_) - reinterpret_cast<char*>(&player_id_)) + sizeof(time_in_milliseconds_));
- // @@protoc_insertion_point(copy_constructor:protobuf.MoveMsg)
- }
-
- inline void MoveMsg::SharedCtor()
- {
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(reinterpret_cast<char*>(&player_id_) - reinterpret_cast<char*>(this)), 0, static_cast<size_t>(reinterpret_cast<char*>(&time_in_milliseconds_) - reinterpret_cast<char*>(&player_id_)) + sizeof(time_in_milliseconds_));
- }
-
- MoveMsg::~MoveMsg()
- {
- // @@protoc_insertion_point(destructor:protobuf.MoveMsg)
- if (GetArenaForAllocation() != nullptr)
- return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
-
- inline void MoveMsg::SharedDtor()
- {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- }
-
- void MoveMsg::ArenaDtor(void* object)
- {
- MoveMsg* _this = reinterpret_cast<MoveMsg*>(object);
- (void)_this;
- }
- void MoveMsg::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*)
- {
- }
- void MoveMsg::SetCachedSize(int size) const
- {
- _cached_size_.Set(size);
- }
-
- void MoveMsg::Clear()
- {
- // @@protoc_insertion_point(message_clear_start:protobuf.MoveMsg)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void)cached_has_bits;
-
- ::memset(&player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&time_in_milliseconds_) - reinterpret_cast<char*>(&player_id_)) + sizeof(time_in_milliseconds_));
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
-
- const char* MoveMsg::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx)
- {
- #define CHK_(x) \
- if (PROTOBUF_PREDICT_FALSE(!(x))) \
- goto failure
- while (!ctx->Done(&ptr))
- {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3)
- {
- // int64 player_id = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
- {
- player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- }
- else
- goto handle_unusual;
- continue;
- // double angle = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 17))
- {
- angle_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
- ptr += sizeof(double);
- }
- else
- goto handle_unusual;
- continue;
- // int64 time_in_milliseconds = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24))
- {
- time_in_milliseconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- }
- else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4))
- {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr,
- ctx
- );
- CHK_(ptr != nullptr);
- } // while
- message_done:
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
-
- uint8_t* MoveMsg::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
- ) const
- {
- // @@protoc_insertion_point(serialize_to_array_start:protobuf.MoveMsg)
- uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
-
- // int64 player_id = 1;
- if (this->_internal_player_id() != 0)
- {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
- }
-
- // double angle = 2;
- static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
- double tmp_angle = this->_internal_angle();
- uint64_t raw_angle;
- memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
- if (raw_angle != 0)
- {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->_internal_angle(), target);
- }
-
- // int64 time_in_milliseconds = 3;
- if (this->_internal_time_in_milliseconds() != 0)
- {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_time_in_milliseconds(), target);
- }
-
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
- {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
- );
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf.MoveMsg)
- return target;
- }
-
- size_t MoveMsg::ByteSizeLong() const
- {
- // @@protoc_insertion_point(message_byte_size_start:protobuf.MoveMsg)
- size_t total_size = 0;
-
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void)cached_has_bits;
-
- // int64 player_id = 1;
- if (this->_internal_player_id() != 0)
- {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
- }
-
- // double angle = 2;
- static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
- double tmp_angle = this->_internal_angle();
- uint64_t raw_angle;
- memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
- if (raw_angle != 0)
- {
- total_size += 1 + 8;
- }
-
- // int64 time_in_milliseconds = 3;
- if (this->_internal_time_in_milliseconds() != 0)
- {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_time_in_milliseconds());
- }
-
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
-
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MoveMsg::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- MoveMsg::MergeImpl};
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* MoveMsg::GetClassData() const
- {
- return &_class_data_;
- }
-
- void MoveMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from)
- {
- static_cast<MoveMsg*>(to)->MergeFrom(
- static_cast<const MoveMsg&>(from)
- );
- }
-
- void MoveMsg::MergeFrom(const MoveMsg& from)
- {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.MoveMsg)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
-
- if (from._internal_player_id() != 0)
- {
- _internal_set_player_id(from._internal_player_id());
- }
- static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
- double tmp_angle = from._internal_angle();
- uint64_t raw_angle;
- memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
- if (raw_angle != 0)
- {
- _internal_set_angle(from._internal_angle());
- }
- if (from._internal_time_in_milliseconds() != 0)
- {
- _internal_set_time_in_milliseconds(from._internal_time_in_milliseconds());
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
-
- void MoveMsg::CopyFrom(const MoveMsg& from)
- {
- // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.MoveMsg)
- if (&from == this)
- return;
- Clear();
- MergeFrom(from);
- }
-
- bool MoveMsg::IsInitialized() const
- {
- return true;
- }
-
- void MoveMsg::InternalSwap(MoveMsg* other)
- {
- using std::swap;
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(MoveMsg, time_in_milliseconds_) + sizeof(MoveMsg::time_in_milliseconds_) - PROTOBUF_FIELD_OFFSET(MoveMsg, player_id_)>(
- reinterpret_cast<char*>(&player_id_),
- reinterpret_cast<char*>(&other->player_id_)
- );
- }
-
- ::PROTOBUF_NAMESPACE_ID::Metadata MoveMsg::GetMetadata() const
- {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[1]
- );
- }
-
- // ===================================================================
-
- class PickMsg::_Internal
- {
- public:
- };
-
- PickMsg::PickMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
- ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
- {
- SharedCtor();
- if (!is_message_owned)
- {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:protobuf.PickMsg)
- }
- PickMsg::PickMsg(const PickMsg& from) :
- ::PROTOBUF_NAMESPACE_ID::Message()
- {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- ::memcpy(&player_id_, &from.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&prop_type_) - reinterpret_cast<char*>(&player_id_)) + sizeof(prop_type_));
- // @@protoc_insertion_point(copy_constructor:protobuf.PickMsg)
- }
-
- inline void PickMsg::SharedCtor()
- {
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(reinterpret_cast<char*>(&player_id_) - reinterpret_cast<char*>(this)), 0, static_cast<size_t>(reinterpret_cast<char*>(&prop_type_) - reinterpret_cast<char*>(&player_id_)) + sizeof(prop_type_));
- }
-
- PickMsg::~PickMsg()
- {
- // @@protoc_insertion_point(destructor:protobuf.PickMsg)
- if (GetArenaForAllocation() != nullptr)
- return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
-
- inline void PickMsg::SharedDtor()
- {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- }
-
- void PickMsg::ArenaDtor(void* object)
- {
- PickMsg* _this = reinterpret_cast<PickMsg*>(object);
- (void)_this;
- }
- void PickMsg::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*)
- {
- }
- void PickMsg::SetCachedSize(int size) const
- {
- _cached_size_.Set(size);
- }
-
- void PickMsg::Clear()
- {
- // @@protoc_insertion_point(message_clear_start:protobuf.PickMsg)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void)cached_has_bits;
-
- ::memset(&player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&prop_type_) - reinterpret_cast<char*>(&player_id_)) + sizeof(prop_type_));
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
-
- const char* PickMsg::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx)
- {
- #define CHK_(x) \
- if (PROTOBUF_PREDICT_FALSE(!(x))) \
- goto failure
- while (!ctx->Done(&ptr))
- {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3)
- {
- // int64 player_id = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
- {
- player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- }
- else
- goto handle_unusual;
- continue;
- // .protobuf.PropType prop_type = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
- {
- uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- _internal_set_prop_type(static_cast<::protobuf::PropType>(val));
- }
- else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4))
- {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr,
- ctx
- );
- CHK_(ptr != nullptr);
- } // while
- message_done:
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
-
- uint8_t* PickMsg::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
- ) const
- {
- // @@protoc_insertion_point(serialize_to_array_start:protobuf.PickMsg)
- uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
-
- // int64 player_id = 1;
- if (this->_internal_player_id() != 0)
- {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
- }
-
- // .protobuf.PropType prop_type = 2;
- if (this->_internal_prop_type() != 0)
- {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
- 2, this->_internal_prop_type(), target
- );
- }
-
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
- {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
- );
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf.PickMsg)
- return target;
- }
-
- size_t PickMsg::ByteSizeLong() const
- {
- // @@protoc_insertion_point(message_byte_size_start:protobuf.PickMsg)
- size_t total_size = 0;
-
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void)cached_has_bits;
-
- // int64 player_id = 1;
- if (this->_internal_player_id() != 0)
- {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
- }
-
- // .protobuf.PropType prop_type = 2;
- if (this->_internal_prop_type() != 0)
- {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_prop_type());
- }
-
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
-
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PickMsg::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- PickMsg::MergeImpl};
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* PickMsg::GetClassData() const
- {
- return &_class_data_;
- }
-
- void PickMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from)
- {
- static_cast<PickMsg*>(to)->MergeFrom(
- static_cast<const PickMsg&>(from)
- );
- }
-
- void PickMsg::MergeFrom(const PickMsg& from)
- {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.PickMsg)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
-
- if (from._internal_player_id() != 0)
- {
- _internal_set_player_id(from._internal_player_id());
- }
- if (from._internal_prop_type() != 0)
- {
- _internal_set_prop_type(from._internal_prop_type());
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
-
- void PickMsg::CopyFrom(const PickMsg& from)
- {
- // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.PickMsg)
- if (&from == this)
- return;
- Clear();
- MergeFrom(from);
- }
-
- bool PickMsg::IsInitialized() const
- {
- return true;
- }
-
- void PickMsg::InternalSwap(PickMsg* other)
- {
- using std::swap;
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(PickMsg, prop_type_) + sizeof(PickMsg::prop_type_) - PROTOBUF_FIELD_OFFSET(PickMsg, player_id_)>(
- reinterpret_cast<char*>(&player_id_),
- reinterpret_cast<char*>(&other->player_id_)
- );
- }
-
- ::PROTOBUF_NAMESPACE_ID::Metadata PickMsg::GetMetadata() const
- {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[2]
- );
- }
-
- // ===================================================================
-
- class SendMsg::_Internal
- {
- public:
- };
-
- SendMsg::SendMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
- ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
- {
- SharedCtor();
- if (!is_message_owned)
- {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:protobuf.SendMsg)
- }
- SendMsg::SendMsg(const SendMsg& from) :
- ::PROTOBUF_NAMESPACE_ID::Message()
- {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (!from._internal_message().empty())
- {
- message_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_message(), GetArenaForAllocation());
- }
- ::memcpy(&player_id_, &from.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&to_player_id_) - reinterpret_cast<char*>(&player_id_)) + sizeof(to_player_id_));
- // @@protoc_insertion_point(copy_constructor:protobuf.SendMsg)
- }
-
- inline void SendMsg::SharedCtor()
- {
- message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(reinterpret_cast<char*>(&player_id_) - reinterpret_cast<char*>(this)), 0, static_cast<size_t>(reinterpret_cast<char*>(&to_player_id_) - reinterpret_cast<char*>(&player_id_)) + sizeof(to_player_id_));
- }
-
- SendMsg::~SendMsg()
- {
- // @@protoc_insertion_point(destructor:protobuf.SendMsg)
- if (GetArenaForAllocation() != nullptr)
- return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
-
- inline void SendMsg::SharedDtor()
- {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- }
-
- void SendMsg::ArenaDtor(void* object)
- {
- SendMsg* _this = reinterpret_cast<SendMsg*>(object);
- (void)_this;
- }
- void SendMsg::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*)
- {
- }
- void SendMsg::SetCachedSize(int size) const
- {
- _cached_size_.Set(size);
- }
-
- void SendMsg::Clear()
- {
- // @@protoc_insertion_point(message_clear_start:protobuf.SendMsg)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void)cached_has_bits;
-
- message_.ClearToEmpty();
- ::memset(&player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&to_player_id_) - reinterpret_cast<char*>(&player_id_)) + sizeof(to_player_id_));
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
-
- const char* SendMsg::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx)
- {
- #define CHK_(x) \
- if (PROTOBUF_PREDICT_FALSE(!(x))) \
- goto failure
- while (!ctx->Done(&ptr))
- {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3)
- {
- // int64 player_id = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
- {
- player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- }
- else
- goto handle_unusual;
- continue;
- // int64 to_player_id = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16))
- {
- to_player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- }
- else
- goto handle_unusual;
- continue;
- // string message = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26))
- {
- auto str = _internal_mutable_message();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protobuf.SendMsg.message"));
- CHK_(ptr);
- }
- else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4))
- {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr,
- ctx
- );
- CHK_(ptr != nullptr);
- } // while
- message_done:
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
-
- uint8_t* SendMsg::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
- ) const
- {
- // @@protoc_insertion_point(serialize_to_array_start:protobuf.SendMsg)
- uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
-
- // int64 player_id = 1;
- if (this->_internal_player_id() != 0)
- {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
- }
-
- // int64 to_player_id = 2;
- if (this->_internal_to_player_id() != 0)
- {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_to_player_id(), target);
- }
-
- // string message = 3;
- if (!this->_internal_message().empty())
- {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->_internal_message().data(), static_cast<int>(this->_internal_message().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "protobuf.SendMsg.message"
- );
- target = stream->WriteStringMaybeAliased(
- 3, this->_internal_message(), target
- );
- }
-
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
- {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
- );
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf.SendMsg)
- return target;
- }
-
- size_t SendMsg::ByteSizeLong() const
- {
- // @@protoc_insertion_point(message_byte_size_start:protobuf.SendMsg)
- size_t total_size = 0;
-
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void)cached_has_bits;
-
- // string message = 3;
- if (!this->_internal_message().empty())
- {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_message()
- );
- }
-
- // int64 player_id = 1;
- if (this->_internal_player_id() != 0)
- {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
- }
-
- // int64 to_player_id = 2;
- if (this->_internal_to_player_id() != 0)
- {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_to_player_id());
- }
-
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
-
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SendMsg::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- SendMsg::MergeImpl};
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* SendMsg::GetClassData() const
- {
- return &_class_data_;
- }
-
- void SendMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from)
- {
- static_cast<SendMsg*>(to)->MergeFrom(
- static_cast<const SendMsg&>(from)
- );
- }
-
- void SendMsg::MergeFrom(const SendMsg& from)
- {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.SendMsg)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
-
- if (!from._internal_message().empty())
- {
- _internal_set_message(from._internal_message());
- }
- if (from._internal_player_id() != 0)
- {
- _internal_set_player_id(from._internal_player_id());
- }
- if (from._internal_to_player_id() != 0)
- {
- _internal_set_to_player_id(from._internal_to_player_id());
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
-
- void SendMsg::CopyFrom(const SendMsg& from)
- {
- // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.SendMsg)
- if (&from == this)
- return;
- Clear();
- MergeFrom(from);
- }
-
- bool SendMsg::IsInitialized() const
- {
- return true;
- }
-
- void SendMsg::InternalSwap(SendMsg* other)
- {
- using std::swap;
- auto* lhs_arena = GetArenaForAllocation();
- auto* rhs_arena = other->GetArenaForAllocation();
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &message_,
- lhs_arena,
- &other->message_,
- rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(SendMsg, to_player_id_) + sizeof(SendMsg::to_player_id_) - PROTOBUF_FIELD_OFFSET(SendMsg, player_id_)>(
- reinterpret_cast<char*>(&player_id_),
- reinterpret_cast<char*>(&other->player_id_)
- );
- }
-
- ::PROTOBUF_NAMESPACE_ID::Metadata SendMsg::GetMetadata() const
- {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[3]
- );
- }
-
- // ===================================================================
-
- class AttackMsg::_Internal
- {
- public:
- };
-
- AttackMsg::AttackMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
- ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
- {
- SharedCtor();
- if (!is_message_owned)
- {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:protobuf.AttackMsg)
- }
- AttackMsg::AttackMsg(const AttackMsg& from) :
- ::PROTOBUF_NAMESPACE_ID::Message()
- {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- ::memcpy(&player_id_, &from.player_id_, static_cast<size_t>(reinterpret_cast<char*>(&angle_) - reinterpret_cast<char*>(&player_id_)) + sizeof(angle_));
- // @@protoc_insertion_point(copy_constructor:protobuf.AttackMsg)
- }
-
- inline void AttackMsg::SharedCtor()
- {
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(reinterpret_cast<char*>(&player_id_) - reinterpret_cast<char*>(this)), 0, static_cast<size_t>(reinterpret_cast<char*>(&angle_) - reinterpret_cast<char*>(&player_id_)) + sizeof(angle_));
- }
-
- AttackMsg::~AttackMsg()
- {
- // @@protoc_insertion_point(destructor:protobuf.AttackMsg)
- if (GetArenaForAllocation() != nullptr)
- return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
-
- inline void AttackMsg::SharedDtor()
- {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- }
-
- void AttackMsg::ArenaDtor(void* object)
- {
- AttackMsg* _this = reinterpret_cast<AttackMsg*>(object);
- (void)_this;
- }
- void AttackMsg::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*)
- {
- }
- void AttackMsg::SetCachedSize(int size) const
- {
- _cached_size_.Set(size);
- }
-
- void AttackMsg::Clear()
- {
- // @@protoc_insertion_point(message_clear_start:protobuf.AttackMsg)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void)cached_has_bits;
-
- ::memset(&player_id_, 0, static_cast<size_t>(reinterpret_cast<char*>(&angle_) - reinterpret_cast<char*>(&player_id_)) + sizeof(angle_));
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
-
- const char* AttackMsg::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx)
- {
- #define CHK_(x) \
- if (PROTOBUF_PREDICT_FALSE(!(x))) \
- goto failure
- while (!ctx->Done(&ptr))
- {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3)
- {
- // int64 player_id = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
- {
- player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- }
- else
- goto handle_unusual;
- continue;
- // double angle = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 17))
- {
- angle_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
- ptr += sizeof(double);
- }
- else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4))
- {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr,
- ctx
- );
- CHK_(ptr != nullptr);
- } // while
- message_done:
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
-
- uint8_t* AttackMsg::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
- ) const
- {
- // @@protoc_insertion_point(serialize_to_array_start:protobuf.AttackMsg)
- uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
-
- // int64 player_id = 1;
- if (this->_internal_player_id() != 0)
- {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_player_id(), target);
- }
-
- // double angle = 2;
- static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
- double tmp_angle = this->_internal_angle();
- uint64_t raw_angle;
- memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
- if (raw_angle != 0)
- {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->_internal_angle(), target);
- }
-
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
- {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
- );
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf.AttackMsg)
- return target;
- }
-
- size_t AttackMsg::ByteSizeLong() const
- {
- // @@protoc_insertion_point(message_byte_size_start:protobuf.AttackMsg)
- size_t total_size = 0;
-
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void)cached_has_bits;
-
- // int64 player_id = 1;
- if (this->_internal_player_id() != 0)
- {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_player_id());
- }
-
- // double angle = 2;
- static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
- double tmp_angle = this->_internal_angle();
- uint64_t raw_angle;
- memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
- if (raw_angle != 0)
- {
- total_size += 1 + 8;
- }
-
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
-
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AttackMsg::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- AttackMsg::MergeImpl};
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* AttackMsg::GetClassData() const
- {
- return &_class_data_;
- }
-
- void AttackMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from)
- {
- static_cast<AttackMsg*>(to)->MergeFrom(
- static_cast<const AttackMsg&>(from)
- );
- }
-
- void AttackMsg::MergeFrom(const AttackMsg& from)
- {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.AttackMsg)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
-
- if (from._internal_player_id() != 0)
- {
- _internal_set_player_id(from._internal_player_id());
- }
- static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
- double tmp_angle = from._internal_angle();
- uint64_t raw_angle;
- memcpy(&raw_angle, &tmp_angle, sizeof(tmp_angle));
- if (raw_angle != 0)
- {
- _internal_set_angle(from._internal_angle());
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
-
- void AttackMsg::CopyFrom(const AttackMsg& from)
- {
- // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.AttackMsg)
- if (&from == this)
- return;
- Clear();
- MergeFrom(from);
- }
-
- bool AttackMsg::IsInitialized() const
- {
- return true;
- }
-
- void AttackMsg::InternalSwap(AttackMsg* other)
- {
- using std::swap;
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(AttackMsg, angle_) + sizeof(AttackMsg::angle_) - PROTOBUF_FIELD_OFFSET(AttackMsg, player_id_)>(
- reinterpret_cast<char*>(&player_id_),
- reinterpret_cast<char*>(&other->player_id_)
- );
- }
-
- ::PROTOBUF_NAMESPACE_ID::Metadata AttackMsg::GetMetadata() const
- {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[4]
- );
- }
-
- // ===================================================================
-
- class IDMsg::_Internal
- {
- public:
- };
-
- IDMsg::IDMsg(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) :
- ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned)
- {
- SharedCtor();
- if (!is_message_owned)
- {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:protobuf.IDMsg)
- }
- IDMsg::IDMsg(const IDMsg& from) :
- ::PROTOBUF_NAMESPACE_ID::Message()
- {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- playerid_ = from.playerid_;
- // @@protoc_insertion_point(copy_constructor:protobuf.IDMsg)
- }
-
- inline void IDMsg::SharedCtor()
- {
- playerid_ = int64_t{0};
- }
-
- IDMsg::~IDMsg()
- {
- // @@protoc_insertion_point(destructor:protobuf.IDMsg)
- if (GetArenaForAllocation() != nullptr)
- return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
-
- inline void IDMsg::SharedDtor()
- {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- }
-
- void IDMsg::ArenaDtor(void* object)
- {
- IDMsg* _this = reinterpret_cast<IDMsg*>(object);
- (void)_this;
- }
- void IDMsg::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*)
- {
- }
- void IDMsg::SetCachedSize(int size) const
- {
- _cached_size_.Set(size);
- }
-
- void IDMsg::Clear()
- {
- // @@protoc_insertion_point(message_clear_start:protobuf.IDMsg)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void)cached_has_bits;
-
- playerid_ = int64_t{0};
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
-
- const char* IDMsg::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx)
- {
- #define CHK_(x) \
- if (PROTOBUF_PREDICT_FALSE(!(x))) \
- goto failure
- while (!ctx->Done(&ptr))
- {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3)
- {
- // int64 playerID = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8))
- {
- playerid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- }
- else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4))
- {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr,
- ctx
- );
- CHK_(ptr != nullptr);
- } // while
- message_done:
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
-
- uint8_t* IDMsg::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
- ) const
- {
- // @@protoc_insertion_point(serialize_to_array_start:protobuf.IDMsg)
- uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
-
- // int64 playerID = 1;
- if (this->_internal_playerid() != 0)
- {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_playerid(), target);
- }
-
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields()))
- {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream
- );
- }
- // @@protoc_insertion_point(serialize_to_array_end:protobuf.IDMsg)
- return target;
- }
-
- size_t IDMsg::ByteSizeLong() const
- {
- // @@protoc_insertion_point(message_byte_size_start:protobuf.IDMsg)
- size_t total_size = 0;
-
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void)cached_has_bits;
-
- // int64 playerID = 1;
- if (this->_internal_playerid() != 0)
- {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_playerid());
- }
-
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
-
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData IDMsg::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- IDMsg::MergeImpl};
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* IDMsg::GetClassData() const
- {
- return &_class_data_;
- }
-
- void IDMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from)
- {
- static_cast<IDMsg*>(to)->MergeFrom(
- static_cast<const IDMsg&>(from)
- );
- }
-
- void IDMsg::MergeFrom(const IDMsg& from)
- {
- // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.IDMsg)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
-
- if (from._internal_playerid() != 0)
- {
- _internal_set_playerid(from._internal_playerid());
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
-
- void IDMsg::CopyFrom(const IDMsg& from)
- {
- // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.IDMsg)
- if (&from == this)
- return;
- Clear();
- MergeFrom(from);
- }
-
- bool IDMsg::IsInitialized() const
- {
- return true;
- }
-
- void IDMsg::InternalSwap(IDMsg* other)
- {
- using std::swap;
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(playerid_, other->playerid_);
- }
-
- ::PROTOBUF_NAMESPACE_ID::Metadata IDMsg::GetMetadata() const
- {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[5]
- );
- }
-
- // @@protoc_insertion_point(namespace_scope)
- } // namespace protobuf
- PROTOBUF_NAMESPACE_OPEN
- template<>
- PROTOBUF_NOINLINE ::protobuf::PlayerMsg* Arena::CreateMaybeMessage<::protobuf::PlayerMsg>(Arena* arena)
- {
- return Arena::CreateMessageInternal<::protobuf::PlayerMsg>(arena);
- }
- template<>
- PROTOBUF_NOINLINE ::protobuf::MoveMsg* Arena::CreateMaybeMessage<::protobuf::MoveMsg>(Arena* arena)
- {
- return Arena::CreateMessageInternal<::protobuf::MoveMsg>(arena);
- }
- template<>
- PROTOBUF_NOINLINE ::protobuf::PickMsg* Arena::CreateMaybeMessage<::protobuf::PickMsg>(Arena* arena)
- {
- return Arena::CreateMessageInternal<::protobuf::PickMsg>(arena);
- }
- template<>
- PROTOBUF_NOINLINE ::protobuf::SendMsg* Arena::CreateMaybeMessage<::protobuf::SendMsg>(Arena* arena)
- {
- return Arena::CreateMessageInternal<::protobuf::SendMsg>(arena);
- }
- template<>
- PROTOBUF_NOINLINE ::protobuf::AttackMsg* Arena::CreateMaybeMessage<::protobuf::AttackMsg>(Arena* arena)
- {
- return Arena::CreateMessageInternal<::protobuf::AttackMsg>(arena);
- }
- template<>
- PROTOBUF_NOINLINE ::protobuf::IDMsg* Arena::CreateMaybeMessage<::protobuf::IDMsg>(Arena* arena)
- {
- return Arena::CreateMessageInternal<::protobuf::IDMsg>(arena);
- }
- PROTOBUF_NAMESPACE_CLOSE
-
- // @@protoc_insertion_point(global_scope)
- #include <google/protobuf/port_undef.inc>
|