From 773a981084193a0ef05c7338bc8ac2e1eae45edb Mon Sep 17 00:00:00 2001 From: sigureling <1678348940@qq.com> Date: Thu, 16 May 2024 21:10:39 +0800 Subject: [PATCH] feat: :sparkles: update protobuf file in cpp --- CAPI/cpp/proto/Message2Clients.pb.cc | 449 ++++++++++++--- CAPI/cpp/proto/Message2Clients.pb.h | 307 ++++++++++- CAPI/cpp/proto/Message2Server.pb.cc | 56 +- CAPI/cpp/proto/Message2Server.pb.h | 42 +- CAPI/cpp/proto/Services.grpc.pb.cc | 178 +++++- CAPI/cpp/proto/Services.grpc.pb.h | 787 ++++++++++++++++++++++++--- CAPI/cpp/proto/Services.pb.cc | 25 +- CAPI/python/PyAPI/Interface.py | 2 +- 8 files changed, 1586 insertions(+), 260 deletions(-) diff --git a/CAPI/cpp/proto/Message2Clients.pb.cc b/CAPI/cpp/proto/Message2Clients.pb.cc index 80594d18..3e1fedbb 100644 --- a/CAPI/cpp/proto/Message2Clients.pb.cc +++ b/CAPI/cpp/proto/Message2Clients.pb.cc @@ -158,7 +158,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.x_)*/ 0, /*decltype(_impl_.y_)*/ 0, /*decltype(_impl_.hp_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.x_)*/ 0, /*decltype(_impl_.y_)*/ 0, /*decltype(_impl_.hp_)*/ 0, /*decltype(_impl_.id_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} { } struct MessageOfWormholeDefaultTypeInternal @@ -374,6 +374,28 @@ namespace protobuf }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MoveResDefaultTypeInternal _MoveRes_default_instance_; + PROTOBUF_CONSTEXPR BuildShipRes::BuildShipRes( + ::_pbi::ConstantInitialized + ) : + _impl_{ + /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.act_success_)*/ false, /*decltype(_impl_._cached_size_)*/ {}} + { + } + struct BuildShipResDefaultTypeInternal + { + PROTOBUF_CONSTEXPR BuildShipResDefaultTypeInternal() : + _instance(::_pbi::ConstantInitialized{}) + { + } + ~BuildShipResDefaultTypeInternal() + { + } + union + { + BuildShipRes _instance; + }; + }; + PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BuildShipResDefaultTypeInternal _BuildShipRes_default_instance_; PROTOBUF_CONSTEXPR BoolRes::BoolRes( ::_pbi::ConstantInitialized ) : @@ -463,7 +485,7 @@ namespace protobuf }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MessageOfNewsDefaultTypeInternal _MessageOfNews_default_instance_; } // namespace protobuf -static ::_pb::Metadata file_level_metadata_Message2Clients_2eproto[20]; +static ::_pb::Metadata file_level_metadata_Message2Clients_2eproto[21]; static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_Message2Clients_2eproto = nullptr; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_Message2Clients_2eproto = nullptr; @@ -558,6 +580,7 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfWormhole, _impl_.x_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfWormhole, _impl_.y_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfWormhole, _impl_.hp_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfWormhole, _impl_.id_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfResource, _internal_metadata_), ~0u, // no _extensions_ @@ -654,6 +677,14 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V PROTOBUF_FIELD_OFFSET(::protobuf::MoveRes, _impl_.actual_angle_), PROTOBUF_FIELD_OFFSET(::protobuf::MoveRes, _impl_.act_success_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::protobuf::BuildShipRes, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::protobuf::BuildShipRes, _impl_.act_success_), + PROTOBUF_FIELD_OFFSET(::protobuf::BuildShipRes, _impl_.player_id_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::protobuf::BoolRes, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -695,19 +726,20 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode {61, -1, -1, sizeof(::protobuf::MessageOfCommunity)}, {71, -1, -1, sizeof(::protobuf::MessageOfFort)}, {81, -1, -1, sizeof(::protobuf::MessageOfWormhole)}, - {90, -1, -1, sizeof(::protobuf::MessageOfResource)}, - {99, -1, -1, sizeof(::protobuf::MessageOfHome)}, - {109, -1, -1, sizeof(::protobuf::MessageOfMap_Row)}, - {116, -1, -1, sizeof(::protobuf::MessageOfMap)}, - {125, -1, -1, sizeof(::protobuf::MessageOfTeam)}, - {135, -1, -1, sizeof(::protobuf::MessageOfObj)}, - {154, -1, -1, sizeof(::protobuf::MessageOfAll)}, - {167, -1, -1, sizeof(::protobuf::MessageToClient)}, - {176, -1, -1, sizeof(::protobuf::MoveRes)}, - {185, -1, -1, sizeof(::protobuf::BoolRes)}, - {192, -1, -1, sizeof(::protobuf::ShipInfoRes)}, - {199, -1, -1, sizeof(::protobuf::EcoRes)}, - {206, -1, -1, sizeof(::protobuf::MessageOfNews)}, + {91, -1, -1, sizeof(::protobuf::MessageOfResource)}, + {100, -1, -1, sizeof(::protobuf::MessageOfHome)}, + {110, -1, -1, sizeof(::protobuf::MessageOfMap_Row)}, + {117, -1, -1, sizeof(::protobuf::MessageOfMap)}, + {126, -1, -1, sizeof(::protobuf::MessageOfTeam)}, + {136, -1, -1, sizeof(::protobuf::MessageOfObj)}, + {155, -1, -1, sizeof(::protobuf::MessageOfAll)}, + {168, -1, -1, sizeof(::protobuf::MessageToClient)}, + {177, -1, -1, sizeof(::protobuf::MoveRes)}, + {186, -1, -1, sizeof(::protobuf::BuildShipRes)}, + {194, -1, -1, sizeof(::protobuf::BoolRes)}, + {201, -1, -1, sizeof(::protobuf::ShipInfoRes)}, + {208, -1, -1, sizeof(::protobuf::EcoRes)}, + {215, -1, -1, sizeof(::protobuf::MessageOfNews)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -727,6 +759,7 @@ static const ::_pb::Message* const file_default_instances[] = { &::protobuf::_MessageOfAll_default_instance_._instance, &::protobuf::_MessageToClient_default_instance_._instance, &::protobuf::_MoveRes_default_instance_._instance, + &::protobuf::_BuildShipRes_default_instance_._instance, &::protobuf::_BoolRes_default_instance_._instance, &::protobuf::_ShipInfoRes_default_instance_._instance, &::protobuf::_EcoRes_default_instance_._instance, @@ -761,50 +794,52 @@ const char descriptor_table_protodef_Message2Clients_2eproto[] PROTOBUF_SECTION_ "\"G\n\022MessageOfCommunity\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002" " \001(\005\022\n\n\002hp\030\003 \001(\005\022\017\n\007team_id\030\004 \001(\003\"B\n\rMes" "sageOfFort\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\n\n\002hp\030\003" - " \001(\005\022\017\n\007team_id\030\004 \001(\003\"5\n\021MessageOfWormho" - "le\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\n\n\002hp\030\003 \001(\005\";\n\021" - "MessageOfResource\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022" - "\020\n\010progress\030\003 \001(\005\"B\n\rMessageOfHome\022\t\n\001x\030" - "\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\n\n\002hp\030\003 \001(\005\022\017\n\007team_id\030" - "\004 \001(\003\"\201\001\n\014MessageOfMap\022\016\n\006height\030\001 \001(\r\022\r" - "\n\005width\030\002 \001(\r\022(\n\004rows\030\003 \003(\0132\032.protobuf.M" - "essageOfMap.Row\032(\n\003Row\022!\n\004cols\030\001 \003(\0162\023.p" - "rotobuf.PlaceType\"R\n\rMessageOfTeam\022\017\n\007te" - "am_id\030\001 \001(\003\022\021\n\tplayer_id\030\002 \001(\003\022\r\n\005score\030" - "\003 \001(\003\022\016\n\006energy\030\004 \001(\003\"\237\005\n\014MessageOfObj\022/" - "\n\014ship_message\030\001 \001(\0132\027.protobuf.MessageO" - "fShipH\000\0223\n\016bullet_message\030\002 \001(\0132\031.protob" - "uf.MessageOfBulletH\000\0225\n\017factory_message\030" - "\003 \001(\0132\032.protobuf.MessageOfFactoryH\000\0229\n\021c" - "ommunity_message\030\004 \001(\0132\034.protobuf.Messag" - "eOfCommunityH\000\022/\n\014fort_message\030\005 \001(\0132\027.p" - "rotobuf.MessageOfFortH\000\0227\n\020wormhole_mess" - "age\030\006 \001(\0132\033.protobuf.MessageOfWormholeH\000" - "\022/\n\014home_message\030\007 \001(\0132\027.protobuf.Messag" - "eOfHomeH\000\0227\n\020resource_message\030\010 \001(\0132\033.pr" - "otobuf.MessageOfResourceH\000\022-\n\013map_messag" - "e\030\t \001(\0132\026.protobuf.MessageOfMapH\000\022/\n\014new" - "s_message\030\n \001(\0132\027.protobuf.MessageOfNews" - "H\000\022@\n\025bombed_bullet_message\030\013 \001(\0132\037.prot" - "obuf.MessageOfBombedBulletH\000\022/\n\014team_mes" - "sage\030\014 \001(\0132\027.protobuf.MessageOfTeamH\000B\020\n" - "\016message_of_obj\"\260\001\n\014MessageOfAll\022\021\n\tgame" - "_time\030\001 \001(\005\022\026\n\016red_team_score\030\002 \001(\005\022\027\n\017b" - "lue_team_score\030\003 \001(\005\022\027\n\017red_team_energy\030" - "\004 \001(\005\022\030\n\020blue_team_energy\030\005 \001(\005\022\023\n\013red_h" - "ome_hp\030\006 \001(\005\022\024\n\014blue_home_hp\030\007 \001(\005\"\224\001\n\017M" - "essageToClient\022+\n\013obj_message\030\001 \003(\0132\026.pr" - "otobuf.MessageOfObj\022\'\n\ngame_state\030\002 \001(\0162" - "\023.protobuf.GameState\022+\n\013all_message\030\003 \001(" - "\0132\026.protobuf.MessageOfAll\"J\n\007MoveRes\022\024\n\014" - "actual_speed\030\001 \001(\003\022\024\n\014actual_angle\030\002 \001(\001" - "\022\023\n\013act_success\030\003 \001(\010\"\036\n\007BoolRes\022\023\n\013act_" - "success\030\001 \001(\010\"9\n\013ShipInfoRes\022*\n\tship_inf" - "o\030\001 \003(\0132\027.protobuf.MessageOfShip\"\031\n\006EcoR" - "es\022\017\n\007economy\030\001 \001(\003\"z\n\rMessageOfNews\022\026\n\014" - "text_message\030\001 \001(\tH\000\022\030\n\016binary_message\030\002" - " \001(\014H\000\022\017\n\007from_id\030\003 \001(\003\022\r\n\005to_id\030\004 \001(\003\022\017" - "\n\007team_id\030\005 \001(\003B\006\n\004newsb\006proto3"; + " \001(\005\022\017\n\007team_id\030\004 \001(\003\"A\n\021MessageOfWormho" + "le\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\n\n\002hp\030\003 \001(\005\022\n\n\002" + "id\030\004 \001(\005\";\n\021MessageOfResource\022\t\n\001x\030\001 \001(\005" + "\022\t\n\001y\030\002 \001(\005\022\020\n\010progress\030\003 \001(\005\"B\n\rMessage" + "OfHome\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022\n\n\002hp\030\003 \001(\005" + "\022\017\n\007team_id\030\004 \001(\003\"\201\001\n\014MessageOfMap\022\016\n\006he" + "ight\030\001 \001(\r\022\r\n\005width\030\002 \001(\r\022(\n\004rows\030\003 \003(\0132" + "\032.protobuf.MessageOfMap.Row\032(\n\003Row\022!\n\004co" + "ls\030\001 \003(\0162\023.protobuf.PlaceType\"R\n\rMessage" + "OfTeam\022\017\n\007team_id\030\001 \001(\003\022\021\n\tplayer_id\030\002 \001" + "(\003\022\r\n\005score\030\003 \001(\003\022\016\n\006energy\030\004 \001(\003\"\237\005\n\014Me" + "ssageOfObj\022/\n\014ship_message\030\001 \001(\0132\027.proto" + "buf.MessageOfShipH\000\0223\n\016bullet_message\030\002 " + "\001(\0132\031.protobuf.MessageOfBulletH\000\0225\n\017fact" + "ory_message\030\003 \001(\0132\032.protobuf.MessageOfFa" + "ctoryH\000\0229\n\021community_message\030\004 \001(\0132\034.pro" + "tobuf.MessageOfCommunityH\000\022/\n\014fort_messa" + "ge\030\005 \001(\0132\027.protobuf.MessageOfFortH\000\0227\n\020w" + "ormhole_message\030\006 \001(\0132\033.protobuf.Message" + "OfWormholeH\000\022/\n\014home_message\030\007 \001(\0132\027.pro" + "tobuf.MessageOfHomeH\000\0227\n\020resource_messag" + "e\030\010 \001(\0132\033.protobuf.MessageOfResourceH\000\022-" + "\n\013map_message\030\t \001(\0132\026.protobuf.MessageOf" + "MapH\000\022/\n\014news_message\030\n \001(\0132\027.protobuf.M" + "essageOfNewsH\000\022@\n\025bombed_bullet_message\030" + "\013 \001(\0132\037.protobuf.MessageOfBombedBulletH\000" + "\022/\n\014team_message\030\014 \001(\0132\027.protobuf.Messag" + "eOfTeamH\000B\020\n\016message_of_obj\"\260\001\n\014MessageO" + "fAll\022\021\n\tgame_time\030\001 \001(\005\022\026\n\016red_team_scor" + "e\030\002 \001(\005\022\027\n\017blue_team_score\030\003 \001(\005\022\027\n\017red_" + "team_energy\030\004 \001(\005\022\030\n\020blue_team_energy\030\005 " + "\001(\005\022\023\n\013red_home_hp\030\006 \001(\005\022\024\n\014blue_home_hp" + "\030\007 \001(\005\"\224\001\n\017MessageToClient\022+\n\013obj_messag" + "e\030\001 \003(\0132\026.protobuf.MessageOfObj\022\'\n\ngame_" + "state\030\002 \001(\0162\023.protobuf.GameState\022+\n\013all_" + "message\030\003 \001(\0132\026.protobuf.MessageOfAll\"J\n" + "\007MoveRes\022\024\n\014actual_speed\030\001 \001(\003\022\024\n\014actual" + "_angle\030\002 \001(\001\022\023\n\013act_success\030\003 \001(\010\"6\n\014Bui" + "ldShipRes\022\023\n\013act_success\030\001 \001(\010\022\021\n\tplayer" + "_id\030\002 \001(\003\"\036\n\007BoolRes\022\023\n\013act_success\030\001 \001(" + "\010\"9\n\013ShipInfoRes\022*\n\tship_info\030\001 \003(\0132\027.pr" + "otobuf.MessageOfShip\"\031\n\006EcoRes\022\017\n\007econom" + "y\030\001 \001(\003\"z\n\rMessageOfNews\022\026\n\014text_message" + "\030\001 \001(\tH\000\022\030\n\016binary_message\030\002 \001(\014H\000\022\017\n\007fr" + "om_id\030\003 \001(\003\022\r\n\005to_id\030\004 \001(\003\022\017\n\007team_id\030\005 " + "\001(\003B\006\n\004newsb\006proto3"; static const ::_pbi::DescriptorTable* const descriptor_table_Message2Clients_2eproto_deps[1] = { &::descriptor_table_MessageType_2eproto, }; @@ -812,13 +847,13 @@ static ::_pbi::once_flag descriptor_table_Message2Clients_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_Message2Clients_2eproto = { false, false, - 2831, + 2899, descriptor_table_protodef_Message2Clients_2eproto, "Message2Clients.proto", &descriptor_table_Message2Clients_2eproto_once, descriptor_table_Message2Clients_2eproto_deps, 1, - 20, + 21, schemas, file_default_instances, TableStruct_Message2Clients_2eproto::offsets, @@ -3288,10 +3323,10 @@ namespace protobuf MessageOfWormhole* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.x_){}, decltype(_impl_.y_){}, decltype(_impl_.hp_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.x_){}, decltype(_impl_.y_){}, decltype(_impl_.hp_){}, decltype(_impl_.id_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.x_, &from._impl_.x_, static_cast(reinterpret_cast(&_impl_.hp_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.hp_)); + ::memcpy(&_impl_.x_, &from._impl_.x_, static_cast(reinterpret_cast(&_impl_.id_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.id_)); // @@protoc_insertion_point(copy_constructor:protobuf.MessageOfWormhole) } @@ -3302,7 +3337,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.x_){0}, decltype(_impl_.y_){0}, decltype(_impl_.hp_){0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.x_){0}, decltype(_impl_.y_){0}, decltype(_impl_.hp_){0}, decltype(_impl_.id_){0}, /*decltype(_impl_._cached_size_)*/ {}}; } MessageOfWormhole::~MessageOfWormhole() @@ -3333,7 +3368,7 @@ namespace protobuf // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; - ::memset(&_impl_.x_, 0, static_cast(reinterpret_cast(&_impl_.hp_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.hp_)); + ::memset(&_impl_.x_, 0, static_cast(reinterpret_cast(&_impl_.id_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.id_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -3378,6 +3413,16 @@ namespace protobuf else goto handle_unusual; continue; + // int32 id = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) + { + _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -3433,6 +3478,13 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_hp(), target); } + // int32 id = 4; + if (this->_internal_id() != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_id(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( @@ -3470,6 +3522,12 @@ namespace protobuf total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_hp()); } + // int32 id = 4; + if (this->_internal_id() != 0) + { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id()); + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -3502,6 +3560,10 @@ namespace protobuf { _this->_internal_set_hp(from._internal_hp()); } + if (from._internal_id() != 0) + { + _this->_internal_set_id(from._internal_id()); + } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -3524,7 +3586,7 @@ namespace protobuf using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(MessageOfWormhole, _impl_.hp_) + sizeof(MessageOfWormhole::_impl_.hp_) - PROTOBUF_FIELD_OFFSET(MessageOfWormhole, _impl_.x_)>( + PROTOBUF_FIELD_OFFSET(MessageOfWormhole, _impl_.id_) + sizeof(MessageOfWormhole::_impl_.id_) - PROTOBUF_FIELD_OFFSET(MessageOfWormhole, _impl_.x_)>( reinterpret_cast(&_impl_.x_), reinterpret_cast(&other->_impl_.x_) ); @@ -6971,6 +7033,247 @@ namespace protobuf // =================================================================== + class BuildShipRes::_Internal + { + public: + }; + + BuildShipRes::BuildShipRes(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : + ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) + { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:protobuf.BuildShipRes) + } + BuildShipRes::BuildShipRes(const BuildShipRes& from) : + ::PROTOBUF_NAMESPACE_ID::Message() + { + BuildShipRes* const _this = this; + (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.player_id_){}, decltype(_impl_.act_success_){}, /*decltype(_impl_._cached_size_)*/ {}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&_impl_.player_id_, &from._impl_.player_id_, static_cast(reinterpret_cast(&_impl_.act_success_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.act_success_)); + // @@protoc_insertion_point(copy_constructor:protobuf.BuildShipRes) + } + + inline void BuildShipRes::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned + ) + { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.act_success_){false}, /*decltype(_impl_._cached_size_)*/ {}}; + } + + BuildShipRes::~BuildShipRes() + { + // @@protoc_insertion_point(destructor:protobuf.BuildShipRes) + if (auto* arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) + { + (void)arena; + return; + } + SharedDtor(); + } + + inline void BuildShipRes::SharedDtor() + { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + } + + void BuildShipRes::SetCachedSize(int size) const + { + _impl_._cached_size_.Set(size); + } + + void BuildShipRes::Clear() + { + // @@protoc_insertion_point(message_clear_start:protobuf.BuildShipRes) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::memset(&_impl_.player_id_, 0, static_cast(reinterpret_cast(&_impl_.act_success_) - reinterpret_cast(&_impl_.player_id_)) + sizeof(_impl_.act_success_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + const char* BuildShipRes::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) + { +#define CHK_(x) \ + if (PROTOBUF_PREDICT_FALSE(!(x))) \ + goto failure + while (!ctx->Done(&ptr)) + { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) + { + // bool act_success = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) + { + _impl_.act_success_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } + else + goto handle_unusual; + continue; + // int64 player_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) + { + _impl_.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* BuildShipRes::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream + ) const + { + // @@protoc_insertion_point(serialize_to_array_start:protobuf.BuildShipRes) + uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // bool act_success = 1; + if (this->_internal_act_success() != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_act_success(), target); + } + + // int64 player_id = 2; + if (this->_internal_player_id() != 0) + { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_player_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) + { + target = ::_pbi::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.BuildShipRes) + return target; + } + + size_t BuildShipRes::ByteSizeLong() const + { + // @@protoc_insertion_point(message_byte_size_start:protobuf.BuildShipRes) + 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 = 2; + if (this->_internal_player_id() != 0) + { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id()); + } + + // bool act_success = 1; + if (this->_internal_act_success() != 0) + { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); + } + + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BuildShipRes::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + BuildShipRes::MergeImpl}; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* BuildShipRes::GetClassData() const + { + return &_class_data_; + } + + void BuildShipRes::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) + { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:protobuf.BuildShipRes) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + if (from._internal_player_id() != 0) + { + _this->_internal_set_player_id(from._internal_player_id()); + } + if (from._internal_act_success() != 0) + { + _this->_internal_set_act_success(from._internal_act_success()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + } + + void BuildShipRes::CopyFrom(const BuildShipRes& from) + { + // @@protoc_insertion_point(class_specific_copy_from_start:protobuf.BuildShipRes) + if (&from == this) + return; + Clear(); + MergeFrom(from); + } + + bool BuildShipRes::IsInitialized() const + { + return true; + } + + void BuildShipRes::InternalSwap(BuildShipRes* other) + { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(BuildShipRes, _impl_.act_success_) + sizeof(BuildShipRes::_impl_.act_success_) - PROTOBUF_FIELD_OFFSET(BuildShipRes, _impl_.player_id_)>( + reinterpret_cast(&_impl_.player_id_), + reinterpret_cast(&other->_impl_.player_id_) + ); + } + + ::PROTOBUF_NAMESPACE_ID::Metadata BuildShipRes::GetMetadata() const + { + return ::_pbi::AssignDescriptors( + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[16] + ); + } + + // =================================================================== + class BoolRes::_Internal { public: @@ -7175,7 +7478,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::Metadata BoolRes::GetMetadata() const { return ::_pbi::AssignDescriptors( - &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[16] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[17] ); } @@ -7395,7 +7698,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::Metadata ShipInfoRes::GetMetadata() const { return ::_pbi::AssignDescriptors( - &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[17] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[18] ); } @@ -7605,7 +7908,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::Metadata EcoRes::GetMetadata() const { return ::_pbi::AssignDescriptors( - &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[18] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[19] ); } @@ -8006,7 +8309,7 @@ namespace protobuf ::PROTOBUF_NAMESPACE_ID::Metadata MessageOfNews::GetMetadata() const { return ::_pbi::AssignDescriptors( - &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[19] + &descriptor_table_Message2Clients_2eproto_getter, &descriptor_table_Message2Clients_2eproto_once, file_level_metadata_Message2Clients_2eproto[20] ); } @@ -8110,6 +8413,12 @@ PROTOBUF_NOINLINE ::protobuf::MoveRes* return Arena::CreateMessageInternal<::protobuf::MoveRes>(arena); } template<> +PROTOBUF_NOINLINE ::protobuf::BuildShipRes* + Arena::CreateMaybeMessage<::protobuf::BuildShipRes>(Arena* arena) +{ + return Arena::CreateMessageInternal<::protobuf::BuildShipRes>(arena); +} +template<> PROTOBUF_NOINLINE ::protobuf::BoolRes* Arena::CreateMaybeMessage<::protobuf::BoolRes>(Arena* arena) { diff --git a/CAPI/cpp/proto/Message2Clients.pb.h b/CAPI/cpp/proto/Message2Clients.pb.h index 9215fb35..85b7ee72 100644 --- a/CAPI/cpp/proto/Message2Clients.pb.h +++ b/CAPI/cpp/proto/Message2Clients.pb.h @@ -52,6 +52,9 @@ namespace protobuf class BoolRes; struct BoolResDefaultTypeInternal; extern BoolResDefaultTypeInternal _BoolRes_default_instance_; + class BuildShipRes; + struct BuildShipResDefaultTypeInternal; + extern BuildShipResDefaultTypeInternal _BuildShipRes_default_instance_; class EcoRes; struct EcoResDefaultTypeInternal; extern EcoResDefaultTypeInternal _EcoRes_default_instance_; @@ -114,6 +117,8 @@ PROTOBUF_NAMESPACE_OPEN template<> ::protobuf::BoolRes* Arena::CreateMaybeMessage<::protobuf::BoolRes>(Arena*); template<> +::protobuf::BuildShipRes* Arena::CreateMaybeMessage<::protobuf::BuildShipRes>(Arena*); +template<> ::protobuf::EcoRes* Arena::CreateMaybeMessage<::protobuf::EcoRes>(Arena*); template<> ::protobuf::MessageOfAll* Arena::CreateMaybeMessage<::protobuf::MessageOfAll>(Arena*); @@ -1938,6 +1943,7 @@ namespace protobuf kXFieldNumber = 1, kYFieldNumber = 2, kHpFieldNumber = 3, + kIdFieldNumber = 4, }; // int32 x = 1; void clear_x(); @@ -1968,6 +1974,16 @@ namespace protobuf int32_t _internal_hp() const; void _internal_set_hp(int32_t value); + public: + // int32 id = 4; + void clear_id(); + int32_t id() const; + void set_id(int32_t value); + + private: + int32_t _internal_id() const; + void _internal_set_id(int32_t value); + public: // @@protoc_insertion_point(class_scope:protobuf.MessageOfWormhole) @@ -1983,6 +1999,7 @@ namespace protobuf int32_t x_; int32_t y_; int32_t hp_; + int32_t id_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union @@ -4343,6 +4360,210 @@ namespace protobuf }; // ------------------------------------------------------------------- + class BuildShipRes final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.BuildShipRes) */ + { + public: + inline BuildShipRes() : + BuildShipRes(nullptr) + { + } + ~BuildShipRes() override; + explicit PROTOBUF_CONSTEXPR BuildShipRes(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BuildShipRes(const BuildShipRes& from); + BuildShipRes(BuildShipRes&& from) noexcept + : + BuildShipRes() + { + *this = ::std::move(from); + } + + inline BuildShipRes& operator=(const BuildShipRes& from) + { + CopyFrom(from); + return *this; + } + inline BuildShipRes& operator=(BuildShipRes&& from) noexcept + { + if (this == &from) + return *this; + if (GetOwningArena() == from.GetOwningArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) + { + InternalSwap(&from); + } + else + { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() + { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() + { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() + { + return default_instance().GetMetadata().reflection; + } + static const BuildShipRes& default_instance() + { + return *internal_default_instance(); + } + static inline const BuildShipRes* internal_default_instance() + { + return reinterpret_cast( + &_BuildShipRes_default_instance_ + ); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(BuildShipRes& a, BuildShipRes& b) + { + a.Swap(&b); + } + inline void Swap(BuildShipRes* other) + { + if (other == this) + return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) + { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) + { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } + else + { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BuildShipRes* other) + { + if (other == this) + return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BuildShipRes* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final + { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BuildShipRes& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const BuildShipRes& from) + { + BuildShipRes::MergeImpl(*this, from); + } + + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream + ) const final; + int GetCachedSize() const final + { + return _impl_._cached_size_.Get(); + } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BuildShipRes* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() + { + return "protobuf.BuildShipRes"; + } + + protected: + explicit BuildShipRes(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); + + public: + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int + { + kPlayerIdFieldNumber = 2, + kActSuccessFieldNumber = 1, + }; + // int64 player_id = 2; + void clear_player_id(); + int64_t player_id() const; + void set_player_id(int64_t value); + + private: + int64_t _internal_player_id() const; + void _internal_set_player_id(int64_t value); + + public: + // bool act_success = 1; + void clear_act_success(); + bool act_success() const; + void set_act_success(bool value); + + private: + bool _internal_act_success() const; + void _internal_set_act_success(bool value); + + public: + // @@protoc_insertion_point(class_scope:protobuf.BuildShipRes) + + private: + class _Internal; + + template + friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ + { + int64_t player_id_; + bool act_success_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union + { + Impl_ _impl_; + }; + friend struct ::TableStruct_Message2Clients_2eproto; + }; + // ------------------------------------------------------------------- + class BoolRes final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protobuf.BoolRes) */ { @@ -4409,7 +4630,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 16; + 17; friend void swap(BoolRes& a, BoolRes& b) { @@ -4601,7 +4822,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 17; + 18; friend void swap(ShipInfoRes& a, ShipInfoRes& b) { @@ -4805,7 +5026,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 18; + 19; friend void swap(EcoRes& a, EcoRes& b) { @@ -5004,7 +5225,7 @@ namespace protobuf ); } static constexpr int kIndexInFileMessages = - 19; + 20; friend void swap(MessageOfNews& a, MessageOfNews& b) { @@ -6400,6 +6621,30 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MessageOfWormhole.hp) } + // int32 id = 4; + inline void MessageOfWormhole::clear_id() + { + _impl_.id_ = 0; + } + inline int32_t MessageOfWormhole::_internal_id() const + { + return _impl_.id_; + } + inline int32_t MessageOfWormhole::id() const + { + // @@protoc_insertion_point(field_get:protobuf.MessageOfWormhole.id) + return _internal_id(); + } + inline void MessageOfWormhole::_internal_set_id(int32_t value) + { + _impl_.id_ = value; + } + inline void MessageOfWormhole::set_id(int32_t value) + { + _internal_set_id(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfWormhole.id) + } + // ------------------------------------------------------------------- // MessageOfResource @@ -8419,6 +8664,58 @@ namespace protobuf // ------------------------------------------------------------------- + // BuildShipRes + + // bool act_success = 1; + inline void BuildShipRes::clear_act_success() + { + _impl_.act_success_ = false; + } + inline bool BuildShipRes::_internal_act_success() const + { + return _impl_.act_success_; + } + inline bool BuildShipRes::act_success() const + { + // @@protoc_insertion_point(field_get:protobuf.BuildShipRes.act_success) + return _internal_act_success(); + } + inline void BuildShipRes::_internal_set_act_success(bool value) + { + _impl_.act_success_ = value; + } + inline void BuildShipRes::set_act_success(bool value) + { + _internal_set_act_success(value); + // @@protoc_insertion_point(field_set:protobuf.BuildShipRes.act_success) + } + + // int64 player_id = 2; + inline void BuildShipRes::clear_player_id() + { + _impl_.player_id_ = int64_t{0}; + } + inline int64_t BuildShipRes::_internal_player_id() const + { + return _impl_.player_id_; + } + inline int64_t BuildShipRes::player_id() const + { + // @@protoc_insertion_point(field_get:protobuf.BuildShipRes.player_id) + return _internal_player_id(); + } + inline void BuildShipRes::_internal_set_player_id(int64_t value) + { + _impl_.player_id_ = value; + } + inline void BuildShipRes::set_player_id(int64_t value) + { + _internal_set_player_id(value); + // @@protoc_insertion_point(field_set:protobuf.BuildShipRes.player_id) + } + + // ------------------------------------------------------------------- + // BoolRes // bool act_success = 1; @@ -8854,6 +9151,8 @@ namespace protobuf // ------------------------------------------------------------------- + // ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) } // namespace protobuf diff --git a/CAPI/cpp/proto/Message2Server.pb.cc b/CAPI/cpp/proto/Message2Server.pb.cc index 2c69a5e9..121cb4a5 100644 --- a/CAPI/cpp/proto/Message2Server.pb.cc +++ b/CAPI/cpp/proto/Message2Server.pb.cc @@ -222,7 +222,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.team_id_)*/ int64_t{0}, /*decltype(_impl_.ship_type_)*/ 0, /*decltype(_impl_.birthpoint_index_)*/ 0, /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.team_id_)*/ int64_t{0}, /*decltype(_impl_.ship_type_)*/ 0, /*decltype(_impl_.birthpoint_index_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} { } struct BuildShipMsgDefaultTypeInternal @@ -335,7 +335,6 @@ const uint32_t TableStruct_Message2Server_2eproto::offsets[] PROTOBUF_SECTION_VA ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::protobuf::BuildShipMsg, _impl_.ship_type_), PROTOBUF_FIELD_OFFSET(::protobuf::BuildShipMsg, _impl_.team_id_), - PROTOBUF_FIELD_OFFSET(::protobuf::BuildShipMsg, _impl_.player_id_), PROTOBUF_FIELD_OFFSET(::protobuf::BuildShipMsg, _impl_.birthpoint_index_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { @@ -383,10 +382,10 @@ const char descriptor_table_protodef_Message2Server_2eproto[] PROTOBUF_SECTION_V "overMsg\022\021\n\tplayer_id\030\001 \001(\003\022\017\n\007recover\030\002 " "\001(\003\022\017\n\007team_id\030\003 \001(\003\"[\n\nInstallMsg\022)\n\013mo" "dule_type\030\001 \001(\0162\024.protobuf.ModuleType\022\021\n" - "\tplayer_id\030\002 \001(\003\022\017\n\007team_id\030\003 \001(\003\"s\n\014Bui" + "\tplayer_id\030\002 \001(\003\022\017\n\007team_id\030\003 \001(\003\"`\n\014Bui" "ldShipMsg\022%\n\tship_type\030\001 \001(\0162\022.protobuf." - "ShipType\022\017\n\007team_id\030\002 \001(\003\022\021\n\tplayer_id\030\003" - " \001(\003\022\030\n\020birthpoint_index\030\004 \001(\005b\006proto3"; + "ShipType\022\017\n\007team_id\030\002 \001(\003\022\030\n\020birthpoint_" + "index\030\003 \001(\005b\006proto3"; static const ::_pbi::DescriptorTable* const descriptor_table_Message2Server_2eproto_deps[1] = { &::descriptor_table_MessageType_2eproto, }; @@ -394,7 +393,7 @@ static ::_pbi::once_flag descriptor_table_Message2Server_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_Message2Server_2eproto = { false, false, - 878, + 859, descriptor_table_protodef_Message2Server_2eproto, "Message2Server.proto", &descriptor_table_Message2Server_2eproto_once, @@ -2787,10 +2786,10 @@ namespace protobuf BuildShipMsg* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.team_id_){}, decltype(_impl_.ship_type_){}, decltype(_impl_.birthpoint_index_){}, decltype(_impl_.player_id_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.team_id_){}, decltype(_impl_.ship_type_){}, decltype(_impl_.birthpoint_index_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.team_id_, &from._impl_.team_id_, static_cast(reinterpret_cast(&_impl_.player_id_) - reinterpret_cast(&_impl_.team_id_)) + sizeof(_impl_.player_id_)); + ::memcpy(&_impl_.team_id_, &from._impl_.team_id_, static_cast(reinterpret_cast(&_impl_.birthpoint_index_) - reinterpret_cast(&_impl_.team_id_)) + sizeof(_impl_.birthpoint_index_)); // @@protoc_insertion_point(copy_constructor:protobuf.BuildShipMsg) } @@ -2801,7 +2800,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.team_id_){int64_t{0}}, decltype(_impl_.ship_type_){0}, decltype(_impl_.birthpoint_index_){0}, decltype(_impl_.player_id_){int64_t{0}}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.team_id_){int64_t{0}}, decltype(_impl_.ship_type_){0}, decltype(_impl_.birthpoint_index_){0}, /*decltype(_impl_._cached_size_)*/ {}}; } BuildShipMsg::~BuildShipMsg() @@ -2832,7 +2831,7 @@ namespace protobuf // Prevent compiler warnings about cached_has_bits being unused (void)cached_has_bits; - ::memset(&_impl_.team_id_, 0, static_cast(reinterpret_cast(&_impl_.player_id_) - reinterpret_cast(&_impl_.team_id_)) + sizeof(_impl_.player_id_)); + ::memset(&_impl_.team_id_, 0, static_cast(reinterpret_cast(&_impl_.birthpoint_index_) - reinterpret_cast(&_impl_.team_id_)) + sizeof(_impl_.birthpoint_index_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -2868,19 +2867,9 @@ namespace protobuf else goto handle_unusual; continue; - // int64 player_id = 3; + // int32 birthpoint_index = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) - { - _impl_.player_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } - else - goto handle_unusual; - continue; - // int32 birthpoint_index = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { _impl_.birthpoint_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); @@ -2938,18 +2927,11 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_team_id(), target); } - // int64 player_id = 3; - if (this->_internal_player_id() != 0) - { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_player_id(), target); - } - - // int32 birthpoint_index = 4; + // int32 birthpoint_index = 3; if (this->_internal_birthpoint_index() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_birthpoint_index(), target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_birthpoint_index(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) @@ -2984,18 +2966,12 @@ namespace protobuf ::_pbi::WireFormatLite::EnumSize(this->_internal_ship_type()); } - // int32 birthpoint_index = 4; + // int32 birthpoint_index = 3; if (this->_internal_birthpoint_index() != 0) { total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_birthpoint_index()); } - // int64 player_id = 3; - if (this->_internal_player_id() != 0) - { - total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_player_id()); - } - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -3028,10 +3004,6 @@ namespace protobuf { _this->_internal_set_birthpoint_index(from._internal_birthpoint_index()); } - if (from._internal_player_id() != 0) - { - _this->_internal_set_player_id(from._internal_player_id()); - } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -3054,7 +3026,7 @@ namespace protobuf using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(BuildShipMsg, _impl_.player_id_) + sizeof(BuildShipMsg::_impl_.player_id_) - PROTOBUF_FIELD_OFFSET(BuildShipMsg, _impl_.team_id_)>( + PROTOBUF_FIELD_OFFSET(BuildShipMsg, _impl_.birthpoint_index_) + sizeof(BuildShipMsg::_impl_.birthpoint_index_) - PROTOBUF_FIELD_OFFSET(BuildShipMsg, _impl_.team_id_)>( reinterpret_cast(&_impl_.team_id_), reinterpret_cast(&other->_impl_.team_id_) ); diff --git a/CAPI/cpp/proto/Message2Server.pb.h b/CAPI/cpp/proto/Message2Server.pb.h index fc227615..706b406f 100644 --- a/CAPI/cpp/proto/Message2Server.pb.h +++ b/CAPI/cpp/proto/Message2Server.pb.h @@ -2218,8 +2218,7 @@ namespace protobuf { kTeamIdFieldNumber = 2, kShipTypeFieldNumber = 1, - kBirthpointIndexFieldNumber = 4, - kPlayerIdFieldNumber = 3, + kBirthpointIndexFieldNumber = 3, }; // int64 team_id = 2; void clear_team_id(); @@ -2241,7 +2240,7 @@ namespace protobuf void _internal_set_ship_type(::protobuf::ShipType value); public: - // int32 birthpoint_index = 4; + // int32 birthpoint_index = 3; void clear_birthpoint_index(); int32_t birthpoint_index() const; void set_birthpoint_index(int32_t value); @@ -2250,16 +2249,6 @@ namespace protobuf int32_t _internal_birthpoint_index() const; void _internal_set_birthpoint_index(int32_t value); - public: - // int64 player_id = 3; - void clear_player_id(); - int64_t player_id() const; - void set_player_id(int64_t value); - - private: - int64_t _internal_player_id() const; - void _internal_set_player_id(int64_t value); - public: // @@protoc_insertion_point(class_scope:protobuf.BuildShipMsg) @@ -2275,7 +2264,6 @@ namespace protobuf int64_t team_id_; int ship_type_; int32_t birthpoint_index_; - int64_t player_id_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union @@ -3164,31 +3152,7 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.BuildShipMsg.team_id) } - // int64 player_id = 3; - inline void BuildShipMsg::clear_player_id() - { - _impl_.player_id_ = int64_t{0}; - } - inline int64_t BuildShipMsg::_internal_player_id() const - { - return _impl_.player_id_; - } - inline int64_t BuildShipMsg::player_id() const - { - // @@protoc_insertion_point(field_get:protobuf.BuildShipMsg.player_id) - return _internal_player_id(); - } - inline void BuildShipMsg::_internal_set_player_id(int64_t value) - { - _impl_.player_id_ = value; - } - inline void BuildShipMsg::set_player_id(int64_t value) - { - _internal_set_player_id(value); - // @@protoc_insertion_point(field_set:protobuf.BuildShipMsg.player_id) - } - - // int32 birthpoint_index = 4; + // int32 birthpoint_index = 3; inline void BuildShipMsg::clear_birthpoint_index() { _impl_.birthpoint_index_ = 0; diff --git a/CAPI/cpp/proto/Services.grpc.pb.cc b/CAPI/cpp/proto/Services.grpc.pb.cc index c1cbfd8b..e79f2928 100644 --- a/CAPI/cpp/proto/Services.grpc.pb.cc +++ b/CAPI/cpp/proto/Services.grpc.pb.cc @@ -31,11 +31,14 @@ namespace protobuf "/protobuf.AvailableService/Produce", "/protobuf.AvailableService/Rebuild", "/protobuf.AvailableService/Construct", + "/protobuf.AvailableService/RepairHome", + "/protobuf.AvailableService/RepairWormhole", "/protobuf.AvailableService/Attack", "/protobuf.AvailableService/Send", "/protobuf.AvailableService/InstallModule", "/protobuf.AvailableService/Recycle", "/protobuf.AvailableService/BuildShip", + "/protobuf.AvailableService/BuildShipRID", "/protobuf.AvailableService/EndAllAction", }; @@ -56,12 +59,15 @@ namespace protobuf rpcmethod_Produce_(AvailableService_method_names[5], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_Rebuild_(AvailableService_method_names[6], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_Construct_(AvailableService_method_names[7], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_Attack_(AvailableService_method_names[8], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_Send_(AvailableService_method_names[9], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_InstallModule_(AvailableService_method_names[10], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_Recycle_(AvailableService_method_names[11], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_BuildShip_(AvailableService_method_names[12], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_EndAllAction_(AvailableService_method_names[13], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + rpcmethod_RepairHome_(AvailableService_method_names[8], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_RepairWormhole_(AvailableService_method_names[9], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_Attack_(AvailableService_method_names[10], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_Send_(AvailableService_method_names[11], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_InstallModule_(AvailableService_method_names[12], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_Recycle_(AvailableService_method_names[13], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_BuildShip_(AvailableService_method_names[14], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_BuildShipRID_(AvailableService_method_names[15], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_EndAllAction_(AvailableService_method_names[16], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel) { } @@ -281,6 +287,62 @@ namespace protobuf return result; } + ::grpc::Status AvailableService::Stub::RepairHome(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) + { + return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_RepairHome_, context, request, response); + } + + void AvailableService::Stub::async::RepairHome(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function f) + { + ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RepairHome_, context, request, response, std::move(f)); + } + + void AvailableService::Stub::async::RepairHome(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) + { + ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RepairHome_, context, request, response, reactor); + } + + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncRepairHomeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_RepairHome_, context, request); + } + + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncRepairHomeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + auto* result = + this->PrepareAsyncRepairHomeRaw(context, request, cq); + result->StartCall(); + return result; + } + + ::grpc::Status AvailableService::Stub::RepairWormhole(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) + { + return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_RepairWormhole_, context, request, response); + } + + void AvailableService::Stub::async::RepairWormhole(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function f) + { + ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RepairWormhole_, context, request, response, std::move(f)); + } + + void AvailableService::Stub::async::RepairWormhole(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) + { + ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RepairWormhole_, context, request, response, reactor); + } + + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncRepairWormholeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_RepairWormhole_, context, request); + } + + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncRepairWormholeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + auto* result = + this->PrepareAsyncRepairWormholeRaw(context, request, cq); + result->StartCall(); + return result; + } + ::grpc::Status AvailableService::Stub::Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::protobuf::BoolRes* response) { return ::grpc::internal::BlockingUnaryCall<::protobuf::AttackMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Attack_, context, request, response); @@ -421,6 +483,34 @@ namespace protobuf return result; } + ::grpc::Status AvailableService::Stub::BuildShipRID(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::protobuf::BuildShipRes* response) + { + return ::grpc::internal::BlockingUnaryCall<::protobuf::BuildShipMsg, ::protobuf::BuildShipRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_BuildShipRID_, context, request, response); + } + + void AvailableService::Stub::async::BuildShipRID(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BuildShipRes* response, std::function f) + { + ::grpc::internal::CallbackUnaryCall<::protobuf::BuildShipMsg, ::protobuf::BuildShipRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_BuildShipRID_, context, request, response, std::move(f)); + } + + void AvailableService::Stub::async::BuildShipRID(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BuildShipRes* response, ::grpc::ClientUnaryReactor* reactor) + { + ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_BuildShipRID_, context, request, response, reactor); + } + + ::grpc::ClientAsyncResponseReader<::protobuf::BuildShipRes>* AvailableService::Stub::PrepareAsyncBuildShipRIDRaw(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::grpc::CompletionQueue* cq) + { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BuildShipRes, ::protobuf::BuildShipMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_BuildShipRID_, context, request); + } + + ::grpc::ClientAsyncResponseReader<::protobuf::BuildShipRes>* AvailableService::Stub::AsyncBuildShipRIDRaw(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::grpc::CompletionQueue* cq) + { + auto* result = + this->PrepareAsyncBuildShipRIDRaw(context, request, cq); + result->StartCall(); + return result; + } + ::grpc::Status AvailableService::Stub::EndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) { return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_EndAllAction_, context, request, response); @@ -566,6 +656,34 @@ namespace protobuf AddMethod(new ::grpc::internal::RpcServiceMethod( AvailableService_method_names[8], ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler( + [](AvailableService::Service* service, + ::grpc::ServerContext* ctx, + const ::protobuf::IDMsg* req, + ::protobuf::BoolRes* resp) + { + return service->RepairHome(ctx, req, resp); + }, + this + ) + )); + AddMethod(new ::grpc::internal::RpcServiceMethod( + AvailableService_method_names[9], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler( + [](AvailableService::Service* service, + ::grpc::ServerContext* ctx, + const ::protobuf::IDMsg* req, + ::protobuf::BoolRes* resp) + { + return service->RepairWormhole(ctx, req, resp); + }, + this + ) + )); + AddMethod(new ::grpc::internal::RpcServiceMethod( + AvailableService_method_names[10], + ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, ::grpc::ServerContext* ctx, @@ -578,7 +696,7 @@ namespace protobuf ) )); AddMethod(new ::grpc::internal::RpcServiceMethod( - AvailableService_method_names[9], + AvailableService_method_names[11], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, @@ -592,7 +710,7 @@ namespace protobuf ) )); AddMethod(new ::grpc::internal::RpcServiceMethod( - AvailableService_method_names[10], + AvailableService_method_names[12], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, @@ -606,7 +724,7 @@ namespace protobuf ) )); AddMethod(new ::grpc::internal::RpcServiceMethod( - AvailableService_method_names[11], + AvailableService_method_names[13], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, @@ -620,7 +738,7 @@ namespace protobuf ) )); AddMethod(new ::grpc::internal::RpcServiceMethod( - AvailableService_method_names[12], + AvailableService_method_names[14], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, @@ -634,7 +752,21 @@ namespace protobuf ) )); AddMethod(new ::grpc::internal::RpcServiceMethod( - AvailableService_method_names[13], + AvailableService_method_names[15], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler( + [](AvailableService::Service* service, + ::grpc::ServerContext* ctx, + const ::protobuf::BuildShipMsg* req, + ::protobuf::BuildShipRes* resp) + { + return service->BuildShipRID(ctx, req, resp); + }, + this + ) + )); + AddMethod(new ::grpc::internal::RpcServiceMethod( + AvailableService_method_names[16], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, @@ -717,6 +849,22 @@ namespace protobuf return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } + ::grpc::Status AvailableService::Service::RepairHome(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + { + (void)context; + (void)request; + (void)response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + + ::grpc::Status AvailableService::Service::RepairWormhole(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + { + (void)context; + (void)request; + (void)response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + ::grpc::Status AvailableService::Service::Attack(::grpc::ServerContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response) { (void)context; @@ -757,6 +905,14 @@ namespace protobuf return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } + ::grpc::Status AvailableService::Service::BuildShipRID(::grpc::ServerContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BuildShipRes* response) + { + (void)context; + (void)request; + (void)response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + ::grpc::Status AvailableService::Service::EndAllAction(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) { (void)context; diff --git a/CAPI/cpp/proto/Services.grpc.pb.h b/CAPI/cpp/proto/Services.grpc.pb.h index 3fdff8d0..eee58909 100644 --- a/CAPI/cpp/proto/Services.grpc.pb.h +++ b/CAPI/cpp/proto/Services.grpc.pb.h @@ -125,6 +125,26 @@ namespace protobuf return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncConstructRaw(context, request, cq)); } // 修建建筑 + virtual ::grpc::Status RepairHome(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) = 0; + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> AsyncRepairHome(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(AsyncRepairHomeRaw(context, request, cq)); + } + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> PrepareAsyncRepairHome(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncRepairHomeRaw(context, request, cq)); + } + // 修理大本营 + virtual ::grpc::Status RepairWormhole(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) = 0; + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> AsyncRepairWormhole(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(AsyncRepairWormholeRaw(context, request, cq)); + } + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> PrepareAsyncRepairWormhole(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncRepairWormholeRaw(context, request, cq)); + } + // 修理虫洞 virtual ::grpc::Status Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::protobuf::BoolRes* response) = 0; std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> AsyncAttack(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq) { @@ -173,6 +193,15 @@ namespace protobuf { return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncBuildShipRaw(context, request, cq)); } + virtual ::grpc::Status BuildShipRID(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::protobuf::BuildShipRes* response) = 0; + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BuildShipRes>> AsyncBuildShipRID(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BuildShipRes>>(AsyncBuildShipRIDRaw(context, request, cq)); + } + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BuildShipRes>> PrepareAsyncBuildShipRID(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BuildShipRes>>(PrepareAsyncBuildShipRIDRaw(context, request, cq)); + } virtual ::grpc::Status EndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) = 0; std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> AsyncEndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { @@ -213,6 +242,12 @@ namespace protobuf virtual void Construct(::grpc::ClientContext* context, const ::protobuf::ConstructMsg* request, ::protobuf::BoolRes* response, std::function) = 0; virtual void Construct(::grpc::ClientContext* context, const ::protobuf::ConstructMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; // 修建建筑 + virtual void RepairHome(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) = 0; + virtual void RepairHome(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // 修理大本营 + virtual void RepairWormhole(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) = 0; + virtual void RepairWormhole(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // 修理虫洞 virtual void Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response, std::function) = 0; virtual void Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; // 攻击 @@ -226,6 +261,8 @@ namespace protobuf virtual void Recycle(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void BuildShip(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BoolRes* response, std::function) = 0; virtual void BuildShip(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void BuildShipRID(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BuildShipRes* response, std::function) = 0; + virtual void BuildShipRID(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BuildShipRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void EndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) = 0; virtual void EndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; // 结束所有动作 @@ -258,6 +295,10 @@ namespace protobuf virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncRebuildRaw(::grpc::ClientContext* context, const ::protobuf::ConstructMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncConstructRaw(::grpc::ClientContext* context, const ::protobuf::ConstructMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncConstructRaw(::grpc::ClientContext* context, const ::protobuf::ConstructMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncRepairHomeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncRepairHomeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncRepairWormholeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncRepairWormholeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncAttackRaw(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncAttackRaw(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncSendRaw(::grpc::ClientContext* context, const ::protobuf::SendMsg& request, ::grpc::CompletionQueue* cq) = 0; @@ -268,6 +309,8 @@ namespace protobuf virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncRecycleRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncBuildShipRaw(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncBuildShipRaw(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BuildShipRes>* AsyncBuildShipRIDRaw(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BuildShipRes>* PrepareAsyncBuildShipRIDRaw(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncEndAllActionRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncEndAllActionRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; }; @@ -350,6 +393,24 @@ namespace protobuf { return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncConstructRaw(context, request, cq)); } + ::grpc::Status RepairHome(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) override; + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> AsyncRepairHome(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(AsyncRepairHomeRaw(context, request, cq)); + } + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> PrepareAsyncRepairHome(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncRepairHomeRaw(context, request, cq)); + } + ::grpc::Status RepairWormhole(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) override; + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> AsyncRepairWormhole(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(AsyncRepairWormholeRaw(context, request, cq)); + } + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> PrepareAsyncRepairWormhole(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncRepairWormholeRaw(context, request, cq)); + } ::grpc::Status Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::protobuf::BoolRes* response) override; std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> AsyncAttack(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq) { @@ -395,6 +456,15 @@ namespace protobuf { return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncBuildShipRaw(context, request, cq)); } + ::grpc::Status BuildShipRID(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::protobuf::BuildShipRes* response) override; + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BuildShipRes>> AsyncBuildShipRID(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BuildShipRes>>(AsyncBuildShipRIDRaw(context, request, cq)); + } + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BuildShipRes>> PrepareAsyncBuildShipRID(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BuildShipRes>>(PrepareAsyncBuildShipRIDRaw(context, request, cq)); + } ::grpc::Status EndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) override; std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> AsyncEndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { @@ -423,6 +493,10 @@ namespace protobuf void Rebuild(::grpc::ClientContext* context, const ::protobuf::ConstructMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; void Construct(::grpc::ClientContext* context, const ::protobuf::ConstructMsg* request, ::protobuf::BoolRes* response, std::function) override; void Construct(::grpc::ClientContext* context, const ::protobuf::ConstructMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; + void RepairHome(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) override; + void RepairHome(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; + void RepairWormhole(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) override; + void RepairWormhole(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; void Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response, std::function) override; void Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; void Send(::grpc::ClientContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response, std::function) override; @@ -433,6 +507,8 @@ namespace protobuf void Recycle(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; void BuildShip(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BoolRes* response, std::function) override; void BuildShip(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; + void BuildShipRID(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BuildShipRes* response, std::function) override; + void BuildShipRID(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BuildShipRes* response, ::grpc::ClientUnaryReactor* reactor) override; void EndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) override; void EndAllAction(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; @@ -476,6 +552,10 @@ namespace protobuf ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncRebuildRaw(::grpc::ClientContext* context, const ::protobuf::ConstructMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncConstructRaw(::grpc::ClientContext* context, const ::protobuf::ConstructMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncConstructRaw(::grpc::ClientContext* context, const ::protobuf::ConstructMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncRepairHomeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncRepairHomeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncRepairWormholeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncRepairWormholeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncAttackRaw(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncAttackRaw(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncSendRaw(::grpc::ClientContext* context, const ::protobuf::SendMsg& request, ::grpc::CompletionQueue* cq) override; @@ -486,6 +566,8 @@ namespace protobuf ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncRecycleRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncBuildShipRaw(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncBuildShipRaw(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BuildShipRes>* AsyncBuildShipRIDRaw(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BuildShipRes>* PrepareAsyncBuildShipRIDRaw(::grpc::ClientContext* context, const ::protobuf::BuildShipMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncEndAllActionRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncEndAllActionRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; const ::grpc::internal::RpcMethod rpcmethod_TryConnection_; @@ -496,11 +578,14 @@ namespace protobuf const ::grpc::internal::RpcMethod rpcmethod_Produce_; const ::grpc::internal::RpcMethod rpcmethod_Rebuild_; const ::grpc::internal::RpcMethod rpcmethod_Construct_; + const ::grpc::internal::RpcMethod rpcmethod_RepairHome_; + const ::grpc::internal::RpcMethod rpcmethod_RepairWormhole_; const ::grpc::internal::RpcMethod rpcmethod_Attack_; const ::grpc::internal::RpcMethod rpcmethod_Send_; const ::grpc::internal::RpcMethod rpcmethod_InstallModule_; const ::grpc::internal::RpcMethod rpcmethod_Recycle_; const ::grpc::internal::RpcMethod rpcmethod_BuildShip_; + const ::grpc::internal::RpcMethod rpcmethod_BuildShipRID_; const ::grpc::internal::RpcMethod rpcmethod_EndAllAction_; }; static std::unique_ptr NewStub(const std::shared_ptr<::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); @@ -527,6 +612,10 @@ namespace protobuf // 给建筑回血 virtual ::grpc::Status Construct(::grpc::ServerContext* context, const ::protobuf::ConstructMsg* request, ::protobuf::BoolRes* response); // 修建建筑 + virtual ::grpc::Status RepairHome(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); + // 修理大本营 + virtual ::grpc::Status RepairWormhole(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); + // 修理虫洞 virtual ::grpc::Status Attack(::grpc::ServerContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response); // 攻击 virtual ::grpc::Status Send(::grpc::ServerContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response); @@ -535,6 +624,7 @@ namespace protobuf virtual ::grpc::Status InstallModule(::grpc::ServerContext* context, const ::protobuf::InstallMsg* request, ::protobuf::BoolRes* response); virtual ::grpc::Status Recycle(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); virtual ::grpc::Status BuildShip(::grpc::ServerContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BoolRes* response); + virtual ::grpc::Status BuildShipRID(::grpc::ServerContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BuildShipRes* response); virtual ::grpc::Status EndAllAction(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); // 结束所有动作 }; @@ -763,6 +853,62 @@ namespace protobuf } }; template + class WithAsyncMethod_RepairHome : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithAsyncMethod_RepairHome() + { + ::grpc::Service::MarkMethodAsync(8); + } + ~WithAsyncMethod_RepairHome() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RepairHome(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRepairHome(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + { + ::grpc::Service::RequestAsyncUnary(8, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_RepairWormhole : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithAsyncMethod_RepairWormhole() + { + ::grpc::Service::MarkMethodAsync(9); + } + ~WithAsyncMethod_RepairWormhole() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RepairWormhole(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRepairWormhole(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + { + ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithAsyncMethod_Attack : public BaseClass { private: @@ -773,7 +919,7 @@ namespace protobuf public: WithAsyncMethod_Attack() { - ::grpc::Service::MarkMethodAsync(8); + ::grpc::Service::MarkMethodAsync(10); } ~WithAsyncMethod_Attack() override { @@ -787,7 +933,7 @@ namespace protobuf } void RequestAttack(::grpc::ServerContext* context, ::protobuf::AttackMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(8, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -801,7 +947,7 @@ namespace protobuf public: WithAsyncMethod_Send() { - ::grpc::Service::MarkMethodAsync(9); + ::grpc::Service::MarkMethodAsync(11); } ~WithAsyncMethod_Send() override { @@ -815,7 +961,7 @@ namespace protobuf } void RequestSend(::grpc::ServerContext* context, ::protobuf::SendMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -829,7 +975,7 @@ namespace protobuf public: WithAsyncMethod_InstallModule() { - ::grpc::Service::MarkMethodAsync(10); + ::grpc::Service::MarkMethodAsync(12); } ~WithAsyncMethod_InstallModule() override { @@ -843,7 +989,7 @@ namespace protobuf } void RequestInstallModule(::grpc::ServerContext* context, ::protobuf::InstallMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -857,7 +1003,7 @@ namespace protobuf public: WithAsyncMethod_Recycle() { - ::grpc::Service::MarkMethodAsync(11); + ::grpc::Service::MarkMethodAsync(13); } ~WithAsyncMethod_Recycle() override { @@ -871,7 +1017,7 @@ namespace protobuf } void RequestRecycle(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -885,7 +1031,7 @@ namespace protobuf public: WithAsyncMethod_BuildShip() { - ::grpc::Service::MarkMethodAsync(12); + ::grpc::Service::MarkMethodAsync(14); } ~WithAsyncMethod_BuildShip() override { @@ -899,7 +1045,35 @@ namespace protobuf } void RequestBuildShip(::grpc::ServerContext* context, ::protobuf::BuildShipMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(14, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_BuildShipRID : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithAsyncMethod_BuildShipRID() + { + ::grpc::Service::MarkMethodAsync(15); + } + ~WithAsyncMethod_BuildShipRID() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status BuildShipRID(::grpc::ServerContext* /*context*/, const ::protobuf::BuildShipMsg* /*request*/, ::protobuf::BuildShipRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestBuildShipRID(::grpc::ServerContext* context, ::protobuf::BuildShipMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BuildShipRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + { + ::grpc::Service::RequestAsyncUnary(15, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -913,7 +1087,7 @@ namespace protobuf public: WithAsyncMethod_EndAllAction() { - ::grpc::Service::MarkMethodAsync(13); + ::grpc::Service::MarkMethodAsync(16); } ~WithAsyncMethod_EndAllAction() override { @@ -927,10 +1101,10 @@ namespace protobuf } void RequestEndAllAction(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(16, context, request, response, new_call_cq, notification_cq, tag); } }; - typedef WithAsyncMethod_TryConnection>>>>>>>>>>>>> AsyncService; + typedef WithAsyncMethod_TryConnection>>>>>>>>>>>>>>>> AsyncService; template class WithCallbackMethod_TryConnection : public BaseClass { @@ -1236,6 +1410,84 @@ namespace protobuf } }; template + class WithCallbackMethod_RepairHome : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithCallbackMethod_RepairHome() + { + ::grpc::Service::MarkMethodCallback(8, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + { return this->RepairHome(context, request, response); })); + } + void SetMessageAllocatorFor_RepairHome( + ::grpc::MessageAllocator<::protobuf::IDMsg, ::protobuf::BoolRes>* allocator + ) + { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(8); + static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_RepairHome() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RepairHome(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RepairHome( + ::grpc::CallbackServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/ + ) + { + return nullptr; + } + }; + template + class WithCallbackMethod_RepairWormhole : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithCallbackMethod_RepairWormhole() + { + ::grpc::Service::MarkMethodCallback(9, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + { return this->RepairWormhole(context, request, response); })); + } + void SetMessageAllocatorFor_RepairWormhole( + ::grpc::MessageAllocator<::protobuf::IDMsg, ::protobuf::BoolRes>* allocator + ) + { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(9); + static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_RepairWormhole() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RepairWormhole(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RepairWormhole( + ::grpc::CallbackServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/ + ) + { + return nullptr; + } + }; + template class WithCallbackMethod_Attack : public BaseClass { private: @@ -1246,14 +1498,14 @@ namespace protobuf public: WithCallbackMethod_Attack() { - ::grpc::Service::MarkMethodCallback(8, new ::grpc::internal::CallbackUnaryHandler<::protobuf::AttackMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response) - { return this->Attack(context, request, response); })); + ::grpc::Service::MarkMethodCallback(10, new ::grpc::internal::CallbackUnaryHandler<::protobuf::AttackMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response) + { return this->Attack(context, request, response); })); } void SetMessageAllocatorFor_Attack( ::grpc::MessageAllocator<::protobuf::AttackMsg, ::protobuf::BoolRes>* allocator ) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(8); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(10); static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::AttackMsg, ::protobuf::BoolRes>*>(handler) ->SetMessageAllocator(allocator); } @@ -1285,14 +1537,14 @@ namespace protobuf public: WithCallbackMethod_Send() { - ::grpc::Service::MarkMethodCallback(9, new ::grpc::internal::CallbackUnaryHandler<::protobuf::SendMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response) - { return this->Send(context, request, response); })); + ::grpc::Service::MarkMethodCallback(11, new ::grpc::internal::CallbackUnaryHandler<::protobuf::SendMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response) + { return this->Send(context, request, response); })); } void SetMessageAllocatorFor_Send( ::grpc::MessageAllocator<::protobuf::SendMsg, ::protobuf::BoolRes>* allocator ) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(9); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(11); static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::SendMsg, ::protobuf::BoolRes>*>(handler) ->SetMessageAllocator(allocator); } @@ -1324,14 +1576,14 @@ namespace protobuf public: WithCallbackMethod_InstallModule() { - ::grpc::Service::MarkMethodCallback(10, new ::grpc::internal::CallbackUnaryHandler<::protobuf::InstallMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::InstallMsg* request, ::protobuf::BoolRes* response) + ::grpc::Service::MarkMethodCallback(12, new ::grpc::internal::CallbackUnaryHandler<::protobuf::InstallMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::InstallMsg* request, ::protobuf::BoolRes* response) { return this->InstallModule(context, request, response); })); } void SetMessageAllocatorFor_InstallModule( ::grpc::MessageAllocator<::protobuf::InstallMsg, ::protobuf::BoolRes>* allocator ) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(10); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(12); static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::InstallMsg, ::protobuf::BoolRes>*>(handler) ->SetMessageAllocator(allocator); } @@ -1363,14 +1615,14 @@ namespace protobuf public: WithCallbackMethod_Recycle() { - ::grpc::Service::MarkMethodCallback(11, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + ::grpc::Service::MarkMethodCallback(13, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) { return this->Recycle(context, request, response); })); } void SetMessageAllocatorFor_Recycle( ::grpc::MessageAllocator<::protobuf::IDMsg, ::protobuf::BoolRes>* allocator ) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(11); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(13); static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>*>(handler) ->SetMessageAllocator(allocator); } @@ -1402,14 +1654,14 @@ namespace protobuf public: WithCallbackMethod_BuildShip() { - ::grpc::Service::MarkMethodCallback(12, new ::grpc::internal::CallbackUnaryHandler<::protobuf::BuildShipMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BoolRes* response) + ::grpc::Service::MarkMethodCallback(14, new ::grpc::internal::CallbackUnaryHandler<::protobuf::BuildShipMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BoolRes* response) { return this->BuildShip(context, request, response); })); } void SetMessageAllocatorFor_BuildShip( ::grpc::MessageAllocator<::protobuf::BuildShipMsg, ::protobuf::BoolRes>* allocator ) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(12); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(14); static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::BuildShipMsg, ::protobuf::BoolRes>*>(handler) ->SetMessageAllocator(allocator); } @@ -1431,6 +1683,45 @@ namespace protobuf } }; template + class WithCallbackMethod_BuildShipRID : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithCallbackMethod_BuildShipRID() + { + ::grpc::Service::MarkMethodCallback(15, new ::grpc::internal::CallbackUnaryHandler<::protobuf::BuildShipMsg, ::protobuf::BuildShipRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::BuildShipMsg* request, ::protobuf::BuildShipRes* response) + { return this->BuildShipRID(context, request, response); })); + } + void SetMessageAllocatorFor_BuildShipRID( + ::grpc::MessageAllocator<::protobuf::BuildShipMsg, ::protobuf::BuildShipRes>* allocator + ) + { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(15); + static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::BuildShipMsg, ::protobuf::BuildShipRes>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_BuildShipRID() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status BuildShipRID(::grpc::ServerContext* /*context*/, const ::protobuf::BuildShipMsg* /*request*/, ::protobuf::BuildShipRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* BuildShipRID( + ::grpc::CallbackServerContext* /*context*/, const ::protobuf::BuildShipMsg* /*request*/, ::protobuf::BuildShipRes* /*response*/ + ) + { + return nullptr; + } + }; + template class WithCallbackMethod_EndAllAction : public BaseClass { private: @@ -1441,14 +1732,14 @@ namespace protobuf public: WithCallbackMethod_EndAllAction() { - ::grpc::Service::MarkMethodCallback(13, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + ::grpc::Service::MarkMethodCallback(16, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) { return this->EndAllAction(context, request, response); })); } void SetMessageAllocatorFor_EndAllAction( ::grpc::MessageAllocator<::protobuf::IDMsg, ::protobuf::BoolRes>* allocator ) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(13); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(16); static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>*>(handler) ->SetMessageAllocator(allocator); } @@ -1469,7 +1760,7 @@ namespace protobuf return nullptr; } }; - typedef WithCallbackMethod_TryConnection>>>>>>>>>>>>> CallbackService; + typedef WithCallbackMethod_TryConnection>>>>>>>>>>>>>>>> CallbackService; typedef CallbackService ExperimentalCallbackService; template class WithGenericMethod_TryConnection : public BaseClass @@ -1664,7 +1955,7 @@ namespace protobuf } }; template - class WithGenericMethod_Attack : public BaseClass + class WithGenericMethod_RepairHome : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -1672,23 +1963,23 @@ namespace protobuf } public: - WithGenericMethod_Attack() + WithGenericMethod_RepairHome() { ::grpc::Service::MarkMethodGeneric(8); } - ~WithGenericMethod_Attack() override + ~WithGenericMethod_RepairHome() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status Attack(::grpc::ServerContext* /*context*/, const ::protobuf::AttackMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status RepairHome(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template - class WithGenericMethod_Send : public BaseClass + class WithGenericMethod_RepairWormhole : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -1696,23 +1987,23 @@ namespace protobuf } public: - WithGenericMethod_Send() + WithGenericMethod_RepairWormhole() { ::grpc::Service::MarkMethodGeneric(9); } - ~WithGenericMethod_Send() override + ~WithGenericMethod_RepairWormhole() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status Send(::grpc::ServerContext* /*context*/, const ::protobuf::SendMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status RepairWormhole(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template - class WithGenericMethod_InstallModule : public BaseClass + class WithGenericMethod_Attack : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -1720,23 +2011,23 @@ namespace protobuf } public: - WithGenericMethod_InstallModule() + WithGenericMethod_Attack() { ::grpc::Service::MarkMethodGeneric(10); } - ~WithGenericMethod_InstallModule() override + ~WithGenericMethod_Attack() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status InstallModule(::grpc::ServerContext* /*context*/, const ::protobuf::InstallMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status Attack(::grpc::ServerContext* /*context*/, const ::protobuf::AttackMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template - class WithGenericMethod_Recycle : public BaseClass + class WithGenericMethod_Send : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -1744,23 +2035,23 @@ namespace protobuf } public: - WithGenericMethod_Recycle() + WithGenericMethod_Send() { ::grpc::Service::MarkMethodGeneric(11); } - ~WithGenericMethod_Recycle() override + ~WithGenericMethod_Send() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status Recycle(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status Send(::grpc::ServerContext* /*context*/, const ::protobuf::SendMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template - class WithGenericMethod_BuildShip : public BaseClass + class WithGenericMethod_InstallModule : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -1768,23 +2059,23 @@ namespace protobuf } public: - WithGenericMethod_BuildShip() + WithGenericMethod_InstallModule() { ::grpc::Service::MarkMethodGeneric(12); } - ~WithGenericMethod_BuildShip() override + ~WithGenericMethod_InstallModule() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status BuildShip(::grpc::ServerContext* /*context*/, const ::protobuf::BuildShipMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status InstallModule(::grpc::ServerContext* /*context*/, const ::protobuf::InstallMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template - class WithGenericMethod_EndAllAction : public BaseClass + class WithGenericMethod_Recycle : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -1792,23 +2083,95 @@ namespace protobuf } public: - WithGenericMethod_EndAllAction() + WithGenericMethod_Recycle() { ::grpc::Service::MarkMethodGeneric(13); } - ~WithGenericMethod_EndAllAction() override + ~WithGenericMethod_Recycle() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status EndAllAction(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + ::grpc::Status Recycle(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template - class WithRawMethod_TryConnection : public BaseClass + class WithGenericMethod_BuildShip : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithGenericMethod_BuildShip() + { + ::grpc::Service::MarkMethodGeneric(14); + } + ~WithGenericMethod_BuildShip() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status BuildShip(::grpc::ServerContext* /*context*/, const ::protobuf::BuildShipMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_BuildShipRID : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithGenericMethod_BuildShipRID() + { + ::grpc::Service::MarkMethodGeneric(15); + } + ~WithGenericMethod_BuildShipRID() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status BuildShipRID(::grpc::ServerContext* /*context*/, const ::protobuf::BuildShipMsg* /*request*/, ::protobuf::BuildShipRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_EndAllAction : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithGenericMethod_EndAllAction() + { + ::grpc::Service::MarkMethodGeneric(16); + } + ~WithGenericMethod_EndAllAction() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EndAllAction(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_TryConnection : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -2032,6 +2395,62 @@ namespace protobuf } }; template + class WithRawMethod_RepairHome : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithRawMethod_RepairHome() + { + ::grpc::Service::MarkMethodRaw(8); + } + ~WithRawMethod_RepairHome() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RepairHome(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRepairHome(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + { + ::grpc::Service::RequestAsyncUnary(8, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_RepairWormhole : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithRawMethod_RepairWormhole() + { + ::grpc::Service::MarkMethodRaw(9); + } + ~WithRawMethod_RepairWormhole() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RepairWormhole(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRepairWormhole(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + { + ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithRawMethod_Attack : public BaseClass { private: @@ -2042,7 +2461,7 @@ namespace protobuf public: WithRawMethod_Attack() { - ::grpc::Service::MarkMethodRaw(8); + ::grpc::Service::MarkMethodRaw(10); } ~WithRawMethod_Attack() override { @@ -2056,7 +2475,7 @@ namespace protobuf } void RequestAttack(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(8, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2070,7 +2489,7 @@ namespace protobuf public: WithRawMethod_Send() { - ::grpc::Service::MarkMethodRaw(9); + ::grpc::Service::MarkMethodRaw(11); } ~WithRawMethod_Send() override { @@ -2084,7 +2503,7 @@ namespace protobuf } void RequestSend(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2098,7 +2517,7 @@ namespace protobuf public: WithRawMethod_InstallModule() { - ::grpc::Service::MarkMethodRaw(10); + ::grpc::Service::MarkMethodRaw(12); } ~WithRawMethod_InstallModule() override { @@ -2112,7 +2531,7 @@ namespace protobuf } void RequestInstallModule(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2126,7 +2545,7 @@ namespace protobuf public: WithRawMethod_Recycle() { - ::grpc::Service::MarkMethodRaw(11); + ::grpc::Service::MarkMethodRaw(13); } ~WithRawMethod_Recycle() override { @@ -2140,7 +2559,7 @@ namespace protobuf } void RequestRecycle(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2154,7 +2573,7 @@ namespace protobuf public: WithRawMethod_BuildShip() { - ::grpc::Service::MarkMethodRaw(12); + ::grpc::Service::MarkMethodRaw(14); } ~WithRawMethod_BuildShip() override { @@ -2168,7 +2587,35 @@ namespace protobuf } void RequestBuildShip(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(14, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_BuildShipRID : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithRawMethod_BuildShipRID() + { + ::grpc::Service::MarkMethodRaw(15); + } + ~WithRawMethod_BuildShipRID() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status BuildShipRID(::grpc::ServerContext* /*context*/, const ::protobuf::BuildShipMsg* /*request*/, ::protobuf::BuildShipRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestBuildShipRID(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + { + ::grpc::Service::RequestAsyncUnary(15, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2182,7 +2629,7 @@ namespace protobuf public: WithRawMethod_EndAllAction() { - ::grpc::Service::MarkMethodRaw(13); + ::grpc::Service::MarkMethodRaw(16); } ~WithRawMethod_EndAllAction() override { @@ -2196,7 +2643,7 @@ namespace protobuf } void RequestEndAllAction(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(16, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2448,6 +2895,68 @@ namespace protobuf } }; template + class WithRawCallbackMethod_RepairHome : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithRawCallbackMethod_RepairHome() + { + ::grpc::Service::MarkMethodRawCallback(8, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + { return this->RepairHome(context, request, response); })); + } + ~WithRawCallbackMethod_RepairHome() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RepairHome(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RepairHome( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/ + ) + { + return nullptr; + } + }; + template + class WithRawCallbackMethod_RepairWormhole : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithRawCallbackMethod_RepairWormhole() + { + ::grpc::Service::MarkMethodRawCallback(9, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + { return this->RepairWormhole(context, request, response); })); + } + ~WithRawCallbackMethod_RepairWormhole() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RepairWormhole(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RepairWormhole( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/ + ) + { + return nullptr; + } + }; + template class WithRawCallbackMethod_Attack : public BaseClass { private: @@ -2458,8 +2967,8 @@ namespace protobuf public: WithRawCallbackMethod_Attack() { - ::grpc::Service::MarkMethodRawCallback(8, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) - { return this->Attack(context, request, response); })); + ::grpc::Service::MarkMethodRawCallback(10, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + { return this->Attack(context, request, response); })); } ~WithRawCallbackMethod_Attack() override { @@ -2489,8 +2998,8 @@ namespace protobuf public: WithRawCallbackMethod_Send() { - ::grpc::Service::MarkMethodRawCallback(9, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) - { return this->Send(context, request, response); })); + ::grpc::Service::MarkMethodRawCallback(11, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + { return this->Send(context, request, response); })); } ~WithRawCallbackMethod_Send() override { @@ -2520,7 +3029,7 @@ namespace protobuf public: WithRawCallbackMethod_InstallModule() { - ::grpc::Service::MarkMethodRawCallback(10, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + ::grpc::Service::MarkMethodRawCallback(12, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->InstallModule(context, request, response); })); } ~WithRawCallbackMethod_InstallModule() override @@ -2551,7 +3060,7 @@ namespace protobuf public: WithRawCallbackMethod_Recycle() { - ::grpc::Service::MarkMethodRawCallback(11, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + ::grpc::Service::MarkMethodRawCallback(13, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Recycle(context, request, response); })); } ~WithRawCallbackMethod_Recycle() override @@ -2582,7 +3091,7 @@ namespace protobuf public: WithRawCallbackMethod_BuildShip() { - ::grpc::Service::MarkMethodRawCallback(12, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + ::grpc::Service::MarkMethodRawCallback(14, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->BuildShip(context, request, response); })); } ~WithRawCallbackMethod_BuildShip() override @@ -2603,6 +3112,37 @@ namespace protobuf } }; template + class WithRawCallbackMethod_BuildShipRID : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithRawCallbackMethod_BuildShipRID() + { + ::grpc::Service::MarkMethodRawCallback(15, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + { return this->BuildShipRID(context, request, response); })); + } + ~WithRawCallbackMethod_BuildShipRID() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status BuildShipRID(::grpc::ServerContext* /*context*/, const ::protobuf::BuildShipMsg* /*request*/, ::protobuf::BuildShipRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* BuildShipRID( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/ + ) + { + return nullptr; + } + }; + template class WithRawCallbackMethod_EndAllAction : public BaseClass { private: @@ -2613,7 +3153,7 @@ namespace protobuf public: WithRawCallbackMethod_EndAllAction() { - ::grpc::Service::MarkMethodRawCallback(13, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + ::grpc::Service::MarkMethodRawCallback(16, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->EndAllAction(context, request, response); })); } ~WithRawCallbackMethod_EndAllAction() override @@ -2823,6 +3363,60 @@ namespace protobuf virtual ::grpc::Status StreamedConstruct(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::ConstructMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0; }; template + class WithStreamedUnaryMethod_RepairHome : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithStreamedUnaryMethod_RepairHome() + { + ::grpc::Service::MarkMethodStreamed(8, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) + { return this->StreamedRepairHome(context, streamer); })); + } + ~WithStreamedUnaryMethod_RepairHome() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status RepairHome(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedRepairHome(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_RepairWormhole : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithStreamedUnaryMethod_RepairWormhole() + { + ::grpc::Service::MarkMethodStreamed(9, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) + { return this->StreamedRepairWormhole(context, streamer); })); + } + ~WithStreamedUnaryMethod_RepairWormhole() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status RepairWormhole(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedRepairWormhole(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0; + }; + template class WithStreamedUnaryMethod_Attack : public BaseClass { private: @@ -2833,8 +3427,8 @@ namespace protobuf public: WithStreamedUnaryMethod_Attack() { - ::grpc::Service::MarkMethodStreamed(8, new ::grpc::internal::StreamedUnaryHandler<::protobuf::AttackMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::AttackMsg, ::protobuf::BoolRes>* streamer) - { return this->StreamedAttack(context, streamer); })); + ::grpc::Service::MarkMethodStreamed(10, new ::grpc::internal::StreamedUnaryHandler<::protobuf::AttackMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::AttackMsg, ::protobuf::BoolRes>* streamer) + { return this->StreamedAttack(context, streamer); })); } ~WithStreamedUnaryMethod_Attack() override { @@ -2860,8 +3454,8 @@ namespace protobuf public: WithStreamedUnaryMethod_Send() { - ::grpc::Service::MarkMethodStreamed(9, new ::grpc::internal::StreamedUnaryHandler<::protobuf::SendMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::SendMsg, ::protobuf::BoolRes>* streamer) - { return this->StreamedSend(context, streamer); })); + ::grpc::Service::MarkMethodStreamed(11, new ::grpc::internal::StreamedUnaryHandler<::protobuf::SendMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::SendMsg, ::protobuf::BoolRes>* streamer) + { return this->StreamedSend(context, streamer); })); } ~WithStreamedUnaryMethod_Send() override { @@ -2887,7 +3481,7 @@ namespace protobuf public: WithStreamedUnaryMethod_InstallModule() { - ::grpc::Service::MarkMethodStreamed(10, new ::grpc::internal::StreamedUnaryHandler<::protobuf::InstallMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::InstallMsg, ::protobuf::BoolRes>* streamer) + ::grpc::Service::MarkMethodStreamed(12, new ::grpc::internal::StreamedUnaryHandler<::protobuf::InstallMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::InstallMsg, ::protobuf::BoolRes>* streamer) { return this->StreamedInstallModule(context, streamer); })); } ~WithStreamedUnaryMethod_InstallModule() override @@ -2914,7 +3508,7 @@ namespace protobuf public: WithStreamedUnaryMethod_Recycle() { - ::grpc::Service::MarkMethodStreamed(11, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) + ::grpc::Service::MarkMethodStreamed(13, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) { return this->StreamedRecycle(context, streamer); })); } ~WithStreamedUnaryMethod_Recycle() override @@ -2941,7 +3535,7 @@ namespace protobuf public: WithStreamedUnaryMethod_BuildShip() { - ::grpc::Service::MarkMethodStreamed(12, new ::grpc::internal::StreamedUnaryHandler<::protobuf::BuildShipMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::BuildShipMsg, ::protobuf::BoolRes>* streamer) + ::grpc::Service::MarkMethodStreamed(14, new ::grpc::internal::StreamedUnaryHandler<::protobuf::BuildShipMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::BuildShipMsg, ::protobuf::BoolRes>* streamer) { return this->StreamedBuildShip(context, streamer); })); } ~WithStreamedUnaryMethod_BuildShip() override @@ -2958,6 +3552,33 @@ namespace protobuf virtual ::grpc::Status StreamedBuildShip(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::BuildShipMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0; }; template + class WithStreamedUnaryMethod_BuildShipRID : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithStreamedUnaryMethod_BuildShipRID() + { + ::grpc::Service::MarkMethodStreamed(15, new ::grpc::internal::StreamedUnaryHandler<::protobuf::BuildShipMsg, ::protobuf::BuildShipRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::BuildShipMsg, ::protobuf::BuildShipRes>* streamer) + { return this->StreamedBuildShipRID(context, streamer); })); + } + ~WithStreamedUnaryMethod_BuildShipRID() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status BuildShipRID(::grpc::ServerContext* /*context*/, const ::protobuf::BuildShipMsg* /*request*/, ::protobuf::BuildShipRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedBuildShipRID(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::BuildShipMsg, ::protobuf::BuildShipRes>* server_unary_streamer) = 0; + }; + template class WithStreamedUnaryMethod_EndAllAction : public BaseClass { private: @@ -2968,7 +3589,7 @@ namespace protobuf public: WithStreamedUnaryMethod_EndAllAction() { - ::grpc::Service::MarkMethodStreamed(13, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) + ::grpc::Service::MarkMethodStreamed(16, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) { return this->StreamedEndAllAction(context, streamer); })); } ~WithStreamedUnaryMethod_EndAllAction() override @@ -2984,7 +3605,7 @@ namespace protobuf // replace default version of method with streamed unary virtual ::grpc::Status StreamedEndAllAction(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0; }; - typedef WithStreamedUnaryMethod_TryConnection>>>>>>>>>>>> StreamedUnaryService; + typedef WithStreamedUnaryMethod_TryConnection>>>>>>>>>>>>>>> StreamedUnaryService; template class WithSplitStreamingMethod_AddPlayer : public BaseClass { @@ -3013,7 +3634,7 @@ namespace protobuf virtual ::grpc::Status StreamedAddPlayer(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer<::protobuf::PlayerMsg, ::protobuf::MessageToClient>* server_split_streamer) = 0; }; typedef WithSplitStreamingMethod_AddPlayer SplitStreamedService; - typedef WithStreamedUnaryMethod_TryConnection>>>>>>>>>>>>> StreamedService; + typedef WithStreamedUnaryMethod_TryConnection>>>>>>>>>>>>>>>> StreamedService; }; } // namespace protobuf diff --git a/CAPI/cpp/proto/Services.pb.cc b/CAPI/cpp/proto/Services.pb.cc index 54eabe0f..3b842203 100644 --- a/CAPI/cpp/proto/Services.pb.cc +++ b/CAPI/cpp/proto/Services.pb.cc @@ -31,7 +31,7 @@ static constexpr ::_pb::Message* const* file_default_instances = nullptr; const char descriptor_table_protodef_Services_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\016Services.proto\022\010protobuf\032\025Message2Clie" - "nts.proto\032\024Message2Server.proto2\363\005\n\020Avai" + "nts.proto\032\024Message2Server.proto2\233\007\n\020Avai" "lableService\0223\n\rTryConnection\022\017.protobuf" ".IDMsg\032\021.protobuf.BoolRes\022=\n\tAddPlayer\022\023" ".protobuf.PlayerMsg\032\031.protobuf.MessageTo" @@ -43,14 +43,19 @@ const char descriptor_table_protodef_Services_2eproto[] PROTOBUF_SECTION_VARIABL "uf.BoolRes\0224\n\007Rebuild\022\026.protobuf.Constru" "ctMsg\032\021.protobuf.BoolRes\0226\n\tConstruct\022\026." "protobuf.ConstructMsg\032\021.protobuf.BoolRes" - "\0220\n\006Attack\022\023.protobuf.AttackMsg\032\021.protob" - "uf.BoolRes\022,\n\004Send\022\021.protobuf.SendMsg\032\021." - "protobuf.BoolRes\0228\n\rInstallModule\022\024.prot" - "obuf.InstallMsg\032\021.protobuf.BoolRes\022-\n\007Re" - "cycle\022\017.protobuf.IDMsg\032\021.protobuf.BoolRe" - "s\0226\n\tBuildShip\022\026.protobuf.BuildShipMsg\032\021" - ".protobuf.BoolRes\0222\n\014EndAllAction\022\017.prot" - "obuf.IDMsg\032\021.protobuf.BoolResb\006proto3"; + "\0220\n\nRepairHome\022\017.protobuf.IDMsg\032\021.protob" + "uf.BoolRes\0224\n\016RepairWormhole\022\017.protobuf." + "IDMsg\032\021.protobuf.BoolRes\0220\n\006Attack\022\023.pro" + "tobuf.AttackMsg\032\021.protobuf.BoolRes\022,\n\004Se" + "nd\022\021.protobuf.SendMsg\032\021.protobuf.BoolRes" + "\0228\n\rInstallModule\022\024.protobuf.InstallMsg\032" + "\021.protobuf.BoolRes\022-\n\007Recycle\022\017.protobuf" + ".IDMsg\032\021.protobuf.BoolRes\0226\n\tBuildShip\022\026" + ".protobuf.BuildShipMsg\032\021.protobuf.BoolRe" + "s\022>\n\014BuildShipRID\022\026.protobuf.BuildShipMs" + "g\032\026.protobuf.BuildShipRes\0222\n\014EndAllActio" + "n\022\017.protobuf.IDMsg\032\021.protobuf.BoolResb\006p" + "roto3"; static const ::_pbi::DescriptorTable* const descriptor_table_Services_2eproto_deps[2] = { &::descriptor_table_Message2Clients_2eproto, &::descriptor_table_Message2Server_2eproto, @@ -59,7 +64,7 @@ static ::_pbi::once_flag descriptor_table_Services_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_Services_2eproto = { false, false, - 837, + 1005, descriptor_table_protodef_Services_2eproto, "Services.proto", &descriptor_table_Services_2eproto_once, diff --git a/CAPI/python/PyAPI/Interface.py b/CAPI/python/PyAPI/Interface.py index 6e374797..94e73478 100644 --- a/CAPI/python/PyAPI/Interface.py +++ b/CAPI/python/PyAPI/Interface.py @@ -415,7 +415,7 @@ def Produce(self) -> Future[bool]: pass @abstractmethod - def Rebuild(self, constructionType: THUAI7.ConstructionStateType) -> Future[bool]: + def Rebuild(self, constructionType: THUAI7.ConstructionState) -> Future[bool]: """发出重建指令 - 需要接近待重建 `Construction`