// Generated by the protocol buffer compiler. DO NOT EDIT! // source: Message2Server.proto #include "Message2Server.pb.h" #include #include #include #include #include #include #include #include // @@protoc_insertion_point(includes) #include 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(&::protobuf::_PlayerMsg_default_instance_), reinterpret_cast(&::protobuf::_MoveMsg_default_instance_), reinterpret_cast(&::protobuf::_PickMsg_default_instance_), reinterpret_cast(&::protobuf::_SendMsg_default_instance_), reinterpret_cast(&::protobuf::_AttackMsg_default_instance_), reinterpret_cast(&::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(reinterpret_cast(&player_type_) - reinterpret_cast(&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(this) + static_cast(reinterpret_cast(&player_id_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&player_type_) - reinterpret_cast(&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(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(reinterpret_cast(&player_type_) - reinterpret_cast(&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(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(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(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(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(to)->MergeFrom( static_cast(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(&player_id_), reinterpret_cast(&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(reinterpret_cast(&time_in_milliseconds_) - reinterpret_cast(&player_id_)) + sizeof(time_in_milliseconds_)); // @@protoc_insertion_point(copy_constructor:protobuf.MoveMsg) } inline void MoveMsg::SharedCtor() { ::memset(reinterpret_cast(this) + static_cast(reinterpret_cast(&player_id_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&time_in_milliseconds_) - reinterpret_cast(&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(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(reinterpret_cast(&time_in_milliseconds_) - reinterpret_cast(&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(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(tag) == 17)) { angle_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); ptr += sizeof(double); } else goto handle_unusual; continue; // int64 time_in_milliseconds = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(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(to)->MergeFrom( static_cast(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(&player_id_), reinterpret_cast(&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(reinterpret_cast(&prop_type_) - reinterpret_cast(&player_id_)) + sizeof(prop_type_)); // @@protoc_insertion_point(copy_constructor:protobuf.PickMsg) } inline void PickMsg::SharedCtor() { ::memset(reinterpret_cast(this) + static_cast(reinterpret_cast(&player_id_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&prop_type_) - reinterpret_cast(&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(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(reinterpret_cast(&prop_type_) - reinterpret_cast(&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(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(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(to)->MergeFrom( static_cast(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(&player_id_), reinterpret_cast(&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(reinterpret_cast(&to_player_id_) - reinterpret_cast(&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(this) + static_cast(reinterpret_cast(&player_id_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&to_player_id_) - reinterpret_cast(&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(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(reinterpret_cast(&to_player_id_) - reinterpret_cast(&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(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(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(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(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(to)->MergeFrom( static_cast(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(&player_id_), reinterpret_cast(&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(reinterpret_cast(&angle_) - reinterpret_cast(&player_id_)) + sizeof(angle_)); // @@protoc_insertion_point(copy_constructor:protobuf.AttackMsg) } inline void AttackMsg::SharedCtor() { ::memset(reinterpret_cast(this) + static_cast(reinterpret_cast(&player_id_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&angle_) - reinterpret_cast(&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(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(reinterpret_cast(&angle_) - reinterpret_cast(&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(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(tag) == 17)) { angle_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(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(to)->MergeFrom( static_cast(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(&player_id_), reinterpret_cast(&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(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(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(to)->MergeFrom( static_cast(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