From fa100456012fe76bd95f9e23348afa134d4d50cb Mon Sep 17 00:00:00 2001 From: codeboss <2422523675@qq.com> Date: Sun, 22 Jun 2025 10:05:31 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ComponentBasic/ComponentBasic.vcxproj | 4 +-- ComponentBasic/ComponentBasic.vcxproj.filters | 4 +-- ComponentBasic/DeduceFramework.cpp | 2 +- ComponentBasic/RouteManage.cpp | 22 ++++++++-------- ComponentBasic/RouteManage.h | 4 +-- ...faceMotionPlugin.cpp => SurfaceMotion.cpp} | 26 +++++++++---------- ...{SurfaceMotionPlugin.h => SurfaceMotion.h} | 4 +-- TestProject/main.cpp | 4 +-- 8 files changed, 35 insertions(+), 35 deletions(-) rename ComponentBasic/{SurfaceMotionPlugin.cpp => SurfaceMotion.cpp} (84%) rename ComponentBasic/{SurfaceMotionPlugin.h => SurfaceMotion.h} (92%) diff --git a/ComponentBasic/ComponentBasic.vcxproj b/ComponentBasic/ComponentBasic.vcxproj index 30c26f6..8e51e01 100644 --- a/ComponentBasic/ComponentBasic.vcxproj +++ b/ComponentBasic/ComponentBasic.vcxproj @@ -105,14 +105,14 @@ - + - + diff --git a/ComponentBasic/ComponentBasic.vcxproj.filters b/ComponentBasic/ComponentBasic.vcxproj.filters index c5ba88a..f85e342 100644 --- a/ComponentBasic/ComponentBasic.vcxproj.filters +++ b/ComponentBasic/ComponentBasic.vcxproj.filters @@ -38,7 +38,7 @@ Header Files - + Header Files @@ -58,7 +58,7 @@ Source Files - + Source Files diff --git a/ComponentBasic/DeduceFramework.cpp b/ComponentBasic/DeduceFramework.cpp index 38d0e00..9f778c3 100644 --- a/ComponentBasic/DeduceFramework.cpp +++ b/ComponentBasic/DeduceFramework.cpp @@ -71,7 +71,7 @@ void DeduceFramework::init_framework() auto res_e = std::make_shared(); info_pulls = std::make_shared(); res_e->append(info_pulls); - auto route_mgr = std::make_shared(); + auto route_mgr = std::make_shared(); res_e->append(route_mgr); this->_entity_map_over_0xffff[res_e->entityID()] = res_e; } diff --git a/ComponentBasic/RouteManage.cpp b/ComponentBasic/RouteManage.cpp index 8cf04d4..eedc1ad 100644 --- a/ComponentBasic/RouteManage.cpp +++ b/ComponentBasic/RouteManage.cpp @@ -1,6 +1,6 @@ #include "RouteManage.h" -PlainRouteManage::PlainRouteManage() +PlainRouteManagePlugin::PlainRouteManagePlugin() { } @@ -8,7 +8,7 @@ PlainRouteManage::PlainRouteManage() #include -void PlainRouteManage::execute(std::shared_ptr map, std::shared_ptr in, QList>& out) +void PlainRouteManagePlugin::execute(std::shared_ptr map, std::shared_ptr in, QList>& out) { auto resp = std::make_shared(); resp->reset(in->targetEntity(), in->sourceEntity()); @@ -24,7 +24,7 @@ void PlainRouteManage::execute(std::shared_ptr map, std::shared_ptr map, std::shared_ptr in, QList>& out) +void PlainRouteManagePlugin::execute(std::shared_ptr map, std::shared_ptr in, QList>& out) { auto resp = std::make_shared(); resp->reset(in->targetEntity(), in->sourceEntity()); @@ -40,7 +40,7 @@ void PlainRouteManage::execute(std::shared_ptr map, std::shared_ptr map, std::shared_ptr in, QList>& out) +void PlainRouteManagePlugin::execute(std::shared_ptr map, std::shared_ptr in, QList>& out) { auto resp = std::make_shared(); resp->reset(in->targetEntity(), in->sourceEntity()); @@ -59,7 +59,7 @@ void PlainRouteManage::execute(std::shared_ptr map, std::shared_ptr map, std::shared_ptr in, QList>& out) +void PlainRouteManagePlugin::execute(std::shared_ptr map, std::shared_ptr in, QList>& out) { auto resp = std::make_shared(); resp->reset(in->targetEntity(), in->sourceEntity()); @@ -76,7 +76,7 @@ void PlainRouteManage::execute(std::shared_ptr map, std::shared_ptr_route_resource_map.keys()) { @@ -116,19 +116,19 @@ void PlainRouteManage::saveTo(QJsonObject& obj) const obj["total_route"] = route_array; } -std::shared_ptr PlainRouteManage::defaultNew() const +std::shared_ptr PlainRouteManagePlugin::defaultNew() const { return nullptr; } -void PlainRouteManage::bindEntity(std::weak_ptr host) +void PlainRouteManagePlugin::bindEntity(std::weak_ptr host) { this->_bind_entity = host; } -QString PlainRouteManage::name() const +QString PlainRouteManagePlugin::name() const { - return NAME(PlainRouteManage); + return NAME(PlainRouteManagePlugin); } RouteResource& RouteResource::operator=(const RouteResource& other) diff --git a/ComponentBasic/RouteManage.h b/ComponentBasic/RouteManage.h index 7cc62de..6f5c14f 100644 --- a/ComponentBasic/RouteManage.h +++ b/ComponentBasic/RouteManage.h @@ -15,7 +15,7 @@ struct RouteResource { /// /// 平面路径管理插件 /// -class PlainRouteManage : public ProcList< +class COMPONENTBASIC_EXPORT PlainRouteManagePlugin : public ProcList< WsRespond, WsRespond, WsRespond, @@ -26,7 +26,7 @@ private: QHash _route_resource_map; public: - PlainRouteManage(); + PlainRouteManagePlugin(); // 通过 ProcList 继承 void execute(std::shared_ptr map, std::shared_ptr in, QList>& out) override; diff --git a/ComponentBasic/SurfaceMotionPlugin.cpp b/ComponentBasic/SurfaceMotion.cpp similarity index 84% rename from ComponentBasic/SurfaceMotionPlugin.cpp rename to ComponentBasic/SurfaceMotion.cpp index efb9d6c..745ccff 100644 --- a/ComponentBasic/SurfaceMotionPlugin.cpp +++ b/ComponentBasic/SurfaceMotion.cpp @@ -1,19 +1,19 @@ -#include "SurfaceMotionPlugin.h" +#include "SurfaceMotion.h" -SurfaceMotionControlPlugin::SurfaceMotionControlPlugin() +SurfaceMotionPlugin::SurfaceMotionPlugin() { } -void SurfaceMotionControlPlugin::recoveryFrom(const QJsonObject& obj) +void SurfaceMotionPlugin::recoveryFrom(const QJsonObject& obj) { } -void SurfaceMotionControlPlugin::saveTo(QJsonObject& obj) const +void SurfaceMotionPlugin::saveTo(QJsonObject& obj) const { } -void SurfaceMotionControlPlugin::execute(std::shared_ptr map, +void SurfaceMotionPlugin::execute(std::shared_ptr map, std::shared_ptr in, QList>& out) { auto exec_result = std::make_shared(); @@ -45,7 +45,7 @@ void SurfaceMotionControlPlugin::execute(std::shared_ptr map, out << exec_result; } -void SurfaceMotionControlPlugin::execute(std::shared_ptr map, +void SurfaceMotionPlugin::execute(std::shared_ptr map, std::shared_ptr in, QList>& out) { auto exec_result = std::make_shared(); @@ -79,7 +79,7 @@ void SurfaceMotionControlPlugin::execute(std::shared_ptr map, } #include -void SurfaceMotionControlPlugin::execute(std::shared_ptr map, +void SurfaceMotionPlugin::execute(std::shared_ptr map, std::shared_ptr in, QList>& out) { auto reqs = std::make_shared(); @@ -93,7 +93,7 @@ void SurfaceMotionControlPlugin::execute(std::shared_ptr map, } #include -void SurfaceMotionControlPlugin::execute(std::shared_ptr map, +void SurfaceMotionPlugin::execute(std::shared_ptr map, std::shared_ptr in, QList>& out) { auto rst = std::make_shared(); @@ -142,17 +142,17 @@ void SurfaceMotionControlPlugin::execute(std::shared_ptr map, out << rst; } -std::shared_ptr SurfaceMotionControlPlugin::defaultNew() const +std::shared_ptr SurfaceMotionPlugin::defaultNew() const { - return std::make_shared(); + return std::make_shared(); } -void SurfaceMotionControlPlugin::bindEntity(std::weak_ptr host) +void SurfaceMotionPlugin::bindEntity(std::weak_ptr host) { this->_bind_entity = host; } -QString SurfaceMotionControlPlugin::name() const +QString SurfaceMotionPlugin::name() const { - return NAME(SurfaceMotionControlPlugin); + return NAME(SurfaceMotionPlugin); } diff --git a/ComponentBasic/SurfaceMotionPlugin.h b/ComponentBasic/SurfaceMotion.h similarity index 92% rename from ComponentBasic/SurfaceMotionPlugin.h rename to ComponentBasic/SurfaceMotion.h index c53c1c0..feb4760 100644 --- a/ComponentBasic/SurfaceMotionPlugin.h +++ b/ComponentBasic/SurfaceMotion.h @@ -5,7 +5,7 @@ /// /// 水面平台机动组件 /// -class COMPONENTBASIC_EXPORT SurfaceMotionControlPlugin : public ProcList< +class COMPONENTBASIC_EXPORT SurfaceMotionPlugin : public ProcList< WsRespond, WsRespond, WsRespond, @@ -18,7 +18,7 @@ private: Posture _start_posture; public: - SurfaceMotionControlPlugin(); + SurfaceMotionPlugin(); // 通过 ProcList 继承 void execute(std::shared_ptr map, std::shared_ptr in, QList>& out) override; diff --git a/TestProject/main.cpp b/TestProject/main.cpp index af5fce5..e0540a9 100644 --- a/TestProject/main.cpp +++ b/TestProject/main.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include @@ -17,7 +17,7 @@ int main(int argc, char* argv[]) cmd->_length_total = 200000; auto enti = std::make_shared(); - auto motion = std::make_shared(); + auto motion = std::make_shared(); enti->append(motion); auto box3d = std::make_shared(); enti->append(box3d);