// 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 PropMsg::PropMsg( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized ) : player_id_(int64_t{0}), prop_type_(0) { } struct PropMsgDefaultTypeInternal { constexpr PropMsgDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) { } ~PropMsgDefaultTypeInternal() { } union { PropMsg _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PropMsgDefaultTypeInternal _PropMsg_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 ) : player_id_(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_; constexpr TreatAndRescueMsg::TreatAndRescueMsg( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized ) : player_id_(int64_t{0}), to_player_id_(int64_t{0}) { } struct TreatAndRescueMsgDefaultTypeInternal { constexpr TreatAndRescueMsgDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) { } ~TreatAndRescueMsgDefaultTypeInternal() { } union { TreatAndRescueMsg _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TreatAndRescueMsgDefaultTypeInternal _TreatAndRescueMsg_default_instance_; constexpr SkillMsg::SkillMsg( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized ) : player_id_(int64_t{0}), skill_id_(0) { } struct SkillMsgDefaultTypeInternal { constexpr SkillMsgDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) { } ~SkillMsgDefaultTypeInternal() { } union { SkillMsg _instance; }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SkillMsgDefaultTypeInternal _SkillMsg_default_instance_; } // namespace protobuf static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_Message2Server_2eproto[8]; 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_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::protobuf::PlayerMsg, player_type_), 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::PropMsg, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::PropMsg, player_id_), PROTOBUF_FIELD_OFFSET(::protobuf::PropMsg, 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, player_id_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::TreatAndRescueMsg, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::TreatAndRescueMsg, player_id_), PROTOBUF_FIELD_OFFSET(::protobuf::TreatAndRescueMsg, to_player_id_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::SkillMsg, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::SkillMsg, player_id_), PROTOBUF_FIELD_OFFSET(::protobuf::SkillMsg, skill_id_), }; 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::PropMsg)}, {28, -1, -1, sizeof(::protobuf::SendMsg)}, {37, -1, -1, sizeof(::protobuf::AttackMsg)}, {45, -1, -1, sizeof(::protobuf::IDMsg)}, {52, -1, -1, sizeof(::protobuf::TreatAndRescueMsg)}, {60, -1, -1, sizeof(::protobuf::SkillMsg)}, }; 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::_PropMsg_default_instance_), reinterpret_cast(&::protobuf::_SendMsg_default_instance_), reinterpret_cast(&::protobuf::_AttackMsg_default_instance_), reinterpret_cast(&::protobuf::_IDMsg_default_instance_), reinterpret_cast(&::protobuf::_TreatAndRescueMsg_default_instance_), reinterpret_cast(&::protobuf::_SkillMsg_default_instance_), }; const char descriptor_table_protodef_Message2Server_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\024Message2Server.proto\022\010protobuf\032\021Messag" "eType.proto\"\263\001\n\tPlayerMsg\022\021\n\tplayer_id\030\001" " \001(\003\022-\n\014student_type\030\002 \001(\0162\025.protobuf.St" "udentTypeH\000\022-\n\014tricker_type\030\003 \001(\0162\025.prot" "obuf.TrickerTypeH\000\022)\n\013player_type\030\004 \001(\0162" "\024.protobuf.PlayerTypeB\n\n\010job_type\"I\n\007Mov" "eMsg\022\021\n\tplayer_id\030\001 \001(\003\022\r\n\005angle\030\002 \001(\001\022\034" "\n\024time_in_milliseconds\030\003 \001(\003\"C\n\007PropMsg\022" "\021\n\tplayer_id\030\001 \001(\003\022%\n\tprop_type\030\002 \001(\0162\022." "protobuf.PropType\"C\n\007SendMsg\022\021\n\tplayer_i" "d\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\005angle\030\002 \001(\001\"\032\n\005IDMsg\022\021\n\tplayer_id\030\001 \001(" "\003\"<\n\021TreatAndRescueMsg\022\021\n\tplayer_id\030\001 \001(" "\003\022\024\n\014to_player_id\030\002 \001(\003\"/\n\010SkillMsg\022\021\n\tp" "layer_id\030\001 \001(\003\022\020\n\010skill_id\030\002 \001(\005b\006proto3"; 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, 640, descriptor_table_protodef_Message2Server_2eproto, "Message2Server.proto", &descriptor_table_Message2Server_2eproto_once, descriptor_table_Message2Server_2eproto_deps, 1, 8, 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 kStudentType: { _internal_set_student_type(from._internal_student_type()); break; } case kTrickerType: { _internal_set_tricker_type(from._internal_tricker_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 kStudentType: { // No need to clear break; } case kTrickerType: { // 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.StudentType student_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_student_type(static_cast<::protobuf::StudentType>(val)); } else goto handle_unusual; continue; // .protobuf.TrickerType tricker_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_tricker_type(static_cast<::protobuf::TrickerType>(val)); } else goto handle_unusual; continue; // .protobuf.PlayerType player_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_player_type(static_cast<::protobuf::PlayerType>(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.StudentType student_type = 2; if (_internal_has_student_type()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 2, this->_internal_student_type(), target ); } // .protobuf.TrickerType tricker_type = 3; if (_internal_has_tricker_type()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 3, this->_internal_tricker_type(), target ); } // .protobuf.PlayerType player_type = 4; if (this->_internal_player_type() != 0) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 4, this->_internal_player_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 = 4; if (this->_internal_player_type() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_player_type()); } switch (job_type_case()) { // .protobuf.StudentType student_type = 2; case kStudentType: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_student_type()); break; } // .protobuf.TrickerType tricker_type = 3; case kTrickerType: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_tricker_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 kStudentType: { _internal_set_student_type(from._internal_student_type()); break; } case kTrickerType: { _internal_set_tricker_type(from._internal_tricker_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 PropMsg::_Internal { public: }; PropMsg::PropMsg(::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.PropMsg) } PropMsg::PropMsg(const PropMsg& 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.PropMsg) } inline void PropMsg::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_)); } PropMsg::~PropMsg() { // @@protoc_insertion_point(destructor:protobuf.PropMsg) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } inline void PropMsg::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); } void PropMsg::ArenaDtor(void* object) { PropMsg* _this = reinterpret_cast(object); (void)_this; } void PropMsg::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void PropMsg::SetCachedSize(int size) const { _cached_size_.Set(size); } void PropMsg::Clear() { // @@protoc_insertion_point(message_clear_start:protobuf.PropMsg) 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* PropMsg::_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* PropMsg::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream ) const { // @@protoc_insertion_point(serialize_to_array_start:protobuf.PropMsg) 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.PropMsg) return target; } size_t PropMsg::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:protobuf.PropMsg) 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 PropMsg::_class_data_ = { ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, PropMsg::MergeImpl}; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* PropMsg::GetClassData() const { return &_class_data_; } void PropMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from) { static_cast(to)->MergeFrom( static_cast(from) ); } void PropMsg::MergeFrom(const PropMsg& from) { // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.PropMsg) 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 PropMsg::CopyFrom(const PropMsg& from) { // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.PropMsg) if (&from == this) return; Clear(); MergeFrom(from); } bool PropMsg::IsInitialized() const { return true; } void PropMsg::InternalSwap(PropMsg* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(PropMsg, prop_type_) + sizeof(PropMsg::prop_type_) - PROTOBUF_FIELD_OFFSET(PropMsg, player_id_)>( reinterpret_cast(&player_id_), reinterpret_cast(&other->player_id_) ); } ::PROTOBUF_NAMESPACE_ID::Metadata PropMsg::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_); player_id_ = from.player_id_; // @@protoc_insertion_point(copy_constructor:protobuf.IDMsg) } inline void IDMsg::SharedCtor() { player_id_ = 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; player_id_ = 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 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; 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 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); } 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 player_id = 1; if (this->_internal_player_id() != 0) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_player_id()); } 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_player_id() != 0) { _internal_set_player_id(from._internal_player_id()); } _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(player_id_, other->player_id_); } ::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] ); } // =================================================================== class TreatAndRescueMsg::_Internal { public: }; TreatAndRescueMsg::TreatAndRescueMsg(::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.TreatAndRescueMsg) } TreatAndRescueMsg::TreatAndRescueMsg(const TreatAndRescueMsg& 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(&to_player_id_) - reinterpret_cast(&player_id_)) + sizeof(to_player_id_)); // @@protoc_insertion_point(copy_constructor:protobuf.TreatAndRescueMsg) } inline void TreatAndRescueMsg::SharedCtor() { ::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_)); } TreatAndRescueMsg::~TreatAndRescueMsg() { // @@protoc_insertion_point(destructor:protobuf.TreatAndRescueMsg) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } inline void TreatAndRescueMsg::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); } void TreatAndRescueMsg::ArenaDtor(void* object) { TreatAndRescueMsg* _this = reinterpret_cast(object); (void)_this; } void TreatAndRescueMsg::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void TreatAndRescueMsg::SetCachedSize(int size) const { _cached_size_.Set(size); } void TreatAndRescueMsg::Clear() { // @@protoc_insertion_point(message_clear_start:protobuf.TreatAndRescueMsg) 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(&to_player_id_) - reinterpret_cast(&player_id_)) + sizeof(to_player_id_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* TreatAndRescueMsg::_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; 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* TreatAndRescueMsg::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream ) const { // @@protoc_insertion_point(serialize_to_array_start:protobuf.TreatAndRescueMsg) 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); } 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.TreatAndRescueMsg) return target; } size_t TreatAndRescueMsg::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:protobuf.TreatAndRescueMsg) 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()); } // 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 TreatAndRescueMsg::_class_data_ = { ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, TreatAndRescueMsg::MergeImpl}; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* TreatAndRescueMsg::GetClassData() const { return &_class_data_; } void TreatAndRescueMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from) { static_cast(to)->MergeFrom( static_cast(from) ); } void TreatAndRescueMsg::MergeFrom(const TreatAndRescueMsg& from) { // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.TreatAndRescueMsg) 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_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 TreatAndRescueMsg::CopyFrom(const TreatAndRescueMsg& from) { // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.TreatAndRescueMsg) if (&from == this) return; Clear(); MergeFrom(from); } bool TreatAndRescueMsg::IsInitialized() const { return true; } void TreatAndRescueMsg::InternalSwap(TreatAndRescueMsg* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(TreatAndRescueMsg, to_player_id_) + sizeof(TreatAndRescueMsg::to_player_id_) - PROTOBUF_FIELD_OFFSET(TreatAndRescueMsg, player_id_)>( reinterpret_cast(&player_id_), reinterpret_cast(&other->player_id_) ); } ::PROTOBUF_NAMESPACE_ID::Metadata TreatAndRescueMsg::GetMetadata() const { return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[6] ); } // =================================================================== class SkillMsg::_Internal { public: }; SkillMsg::SkillMsg(::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.SkillMsg) } SkillMsg::SkillMsg(const SkillMsg& 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(&skill_id_) - reinterpret_cast(&player_id_)) + sizeof(skill_id_)); // @@protoc_insertion_point(copy_constructor:protobuf.SkillMsg) } inline void SkillMsg::SharedCtor() { ::memset(reinterpret_cast(this) + static_cast(reinterpret_cast(&player_id_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&skill_id_) - reinterpret_cast(&player_id_)) + sizeof(skill_id_)); } SkillMsg::~SkillMsg() { // @@protoc_insertion_point(destructor:protobuf.SkillMsg) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } inline void SkillMsg::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); } void SkillMsg::ArenaDtor(void* object) { SkillMsg* _this = reinterpret_cast(object); (void)_this; } void SkillMsg::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void SkillMsg::SetCachedSize(int size) const { _cached_size_.Set(size); } void SkillMsg::Clear() { // @@protoc_insertion_point(message_clear_start:protobuf.SkillMsg) 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(&skill_id_) - reinterpret_cast(&player_id_)) + sizeof(skill_id_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* SkillMsg::_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; // int32 skill_id = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { skill_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&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* SkillMsg::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream ) const { // @@protoc_insertion_point(serialize_to_array_start:protobuf.SkillMsg) 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); } // int32 skill_id = 2; if (this->_internal_skill_id() != 0) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_skill_id(), 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.SkillMsg) return target; } size_t SkillMsg::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:protobuf.SkillMsg) 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()); } // int32 skill_id = 2; if (this->_internal_skill_id() != 0) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_skill_id()); } return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); } const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SkillMsg::_class_data_ = { ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, SkillMsg::MergeImpl}; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* SkillMsg::GetClassData() const { return &_class_data_; } void SkillMsg::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from) { static_cast(to)->MergeFrom( static_cast(from) ); } void SkillMsg::MergeFrom(const SkillMsg& from) { // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.SkillMsg) 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_skill_id() != 0) { _internal_set_skill_id(from._internal_skill_id()); } _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } void SkillMsg::CopyFrom(const SkillMsg& from) { // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.SkillMsg) if (&from == this) return; Clear(); MergeFrom(from); } bool SkillMsg::IsInitialized() const { return true; } void SkillMsg::InternalSwap(SkillMsg* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(SkillMsg, skill_id_) + sizeof(SkillMsg::skill_id_) - PROTOBUF_FIELD_OFFSET(SkillMsg, player_id_)>( reinterpret_cast(&player_id_), reinterpret_cast(&other->player_id_) ); } ::PROTOBUF_NAMESPACE_ID::Metadata SkillMsg::GetMetadata() const { return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( &descriptor_table_Message2Server_2eproto_getter, &descriptor_table_Message2Server_2eproto_once, file_level_metadata_Message2Server_2eproto[7] ); } // @@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::PropMsg* Arena::CreateMaybeMessage<::protobuf::PropMsg>(Arena* arena) { return Arena::CreateMessageInternal<::protobuf::PropMsg>(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); } template<> PROTOBUF_NOINLINE ::protobuf::TreatAndRescueMsg* Arena::CreateMaybeMessage<::protobuf::TreatAndRescueMsg>(Arena* arena) { return Arena::CreateMessageInternal<::protobuf::TreatAndRescueMsg>(arena); } template<> PROTOBUF_NOINLINE ::protobuf::SkillMsg* Arena::CreateMaybeMessage<::protobuf::SkillMsg>(Arena* arena) { return Arena::CreateMessageInternal<::protobuf::SkillMsg>(arena); } PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include