From 5d1ee387bc198dd77198564d9d8cb4a742418b3c Mon Sep 17 00:00:00 2001 From: Frederick Roy Date: Thu, 27 Jun 2024 14:21:26 +0900 Subject: [PATCH 1/3] deprecate usage of getComponentList entrypoint from plugins --- .../Qt/src/sofa/gui/qt/SofaPluginManager.cpp | 17 ++++++++++++++++- .../Helper/src/sofa/helper/config.h.in | 4 ++++ .../src/sofa/helper/system/PluginManager.h | 9 ++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/Sofa/GUI/Qt/src/sofa/gui/qt/SofaPluginManager.cpp b/Sofa/GUI/Qt/src/sofa/gui/qt/SofaPluginManager.cpp index a110bf6c836..2594979213b 100644 --- a/Sofa/GUI/Qt/src/sofa/gui/qt/SofaPluginManager.cpp +++ b/Sofa/GUI/Qt/src/sofa/gui/qt/SofaPluginManager.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -249,7 +250,21 @@ void SofaPluginManager::updateComponentList() return; } - QString cpts( plugin->getModuleComponentList() ); + std::string componentListStr{}; + const char* tempComponentList = plugin->getModuleComponentList(); + + // the plugin does not implement getModuleComponentList(), or returns nothing. + if (tempComponentList == nullptr) + { + const char* pluginNameStr = plugin->getModuleName(); + componentListStr = sofa::core::ObjectFactory::getInstance()->listClassesFromTarget(pluginNameStr); + } + else + { + componentListStr = tempComponentList; + } + + QString cpts(componentListStr.data()); cpts.replace(", ","\n"); cpts.replace(",","\n"); std::istringstream in(cpts.toStdString()); diff --git a/Sofa/framework/Helper/src/sofa/helper/config.h.in b/Sofa/framework/Helper/src/sofa/helper/config.h.in index 5b0b86b583b..851c866d06e 100644 --- a/Sofa/framework/Helper/src/sofa/helper/config.h.in +++ b/Sofa/framework/Helper/src/sofa/helper/config.h.in @@ -79,3 +79,7 @@ SOFA_ATTRIBUTE_DISABLED( \ SOFA_ATTRIBUTE_DISABLED( \ "v23.12", "v24.06", "This function is replaced by solveLCP.") #endif // SOFA_BUILD_SOFA_HELPER + +#define SOFA_ATTRIBUTE_DEPRECATED__PLUGIN_GETCOMPONENTLIST() \ + SOFA_ATTRIBUTE_DEPRECATED("v24.12", "v25.06", \ + "Using entrypoint GetComponentList() from a plugin has been deprecated. Use the helper function listClassesFromTarget() from ObjectFactory instead.") diff --git a/Sofa/framework/Helper/src/sofa/helper/system/PluginManager.h b/Sofa/framework/Helper/src/sofa/helper/system/PluginManager.h index 113a475e576..84de03e2640 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/PluginManager.h +++ b/Sofa/framework/Helper/src/sofa/helper/system/PluginManager.h @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -96,9 +97,15 @@ class SOFA_HELPER_API Plugin static const char* symbol; typedef const char* (*FuncPtr) (); FuncPtr func; + + SOFA_ATTRIBUTE_DEPRECATED__PLUGIN_GETCOMPONENTLIST() const char* operator() () const { - if (func) return func(); + if (func) + { + msg_warning("Plugin::GetModuleComponentList") << "This entrypoint is being deprecated, and should not be implemented anymore."; + return func(); + } else return nullptr; } GetModuleComponentList():func(nullptr) {} From 66a2d0940852bfd98eed92ab37ec30e7894c51d9 Mon Sep 17 00:00:00 2001 From: Frederick Roy Date: Thu, 27 Jun 2024 15:00:47 +0900 Subject: [PATCH 2/3] remove deprecated entrypoint --- .../src/sofa/component/animationloop/init.cpp | 7 ------- .../sofa/component/collision/detection/algorithm/init.cpp | 8 -------- .../component/collision/detection/intersection/init.cpp | 7 ------- .../src/sofa/component/collision/detection/init.cpp | 7 ------- .../src/sofa/component/collision/geometry/init.cpp | 6 ------ .../sofa/component/collision/response/contact/init.cpp | 7 ------- .../src/sofa/component/collision/response/mapper/init.cpp | 7 ------- .../component/constraint/lagrangian/correction/init.cpp | 7 ------- .../sofa/component/constraint/lagrangian/model/init.cpp | 7 ------- .../sofa/component/constraint/lagrangian/solver/init.cpp | 8 -------- .../src/sofa/component/constraint/projective/init.cpp | 7 ------- .../Controller/src/sofa/component/controller/init.cpp | 7 ------- .../Diffusion/src/sofa/component/diffusion/init.cpp | 7 ------- .../Analyze/src/sofa/component/engine/analyze/init.cpp | 7 ------- .../Generate/src/sofa/component/engine/generate/init.cpp | 7 ------- .../Select/src/sofa/component/engine/select/init.cpp | 7 ------- .../src/sofa/component/engine/transform/init.cpp | 7 ------- .../Component/Haptics/src/sofa/component/haptics/init.cpp | 7 ------- .../Component/IO/Mesh/src/sofa/component/io/mesh/init.cpp | 7 ------- .../src/sofa/component/linearsolver/direct/init.cpp | 7 ------- .../src/sofa/component/linearsolver/iterative/init.cpp | 7 ------- .../src/sofa/component/linearsolver/ordering/init.cpp | 7 ------- .../sofa/component/linearsolver/preconditioner/init.cpp | 7 ------- .../LinearSystem/src/sofa/component/linearsystem/init.cpp | 8 -------- .../Linear/src/sofa/component/mapping/linear/init.cpp | 7 ------- .../src/sofa/component/mapping/mappedmatrix/init.cpp | 7 ------- .../src/sofa/component/mapping/nonlinear/init.cpp | 7 ------- Sofa/Component/Mass/src/sofa/component/mass/init.cpp | 7 ------- .../src/sofa/component/mechanicalload/init.cpp | 7 ------- .../src/sofa/component/odesolver/backward/init.cpp | 7 ------- .../Forward/src/sofa/component/odesolver/forward/init.cpp | 7 ------- .../Playback/src/sofa/component/playback/init.cpp | 7 ------- .../SceneUtility/src/sofa/component/sceneutility/init.cpp | 7 ------- .../Component/Setting/src/sofa/component/setting/init.cpp | 7 ------- .../sofa/component/solidmechanics/fem/elastic/init.cpp | 7 ------- .../component/solidmechanics/fem/hyperelastic/init.cpp | 7 ------- .../sofa/component/solidmechanics/fem/nonuniform/init.cpp | 7 ------- .../src/sofa/component/solidmechanics/spring/init.cpp | 7 ------- .../src/sofa/component/solidmechanics/tensormass/init.cpp | 7 ------- .../src/sofa/component/statecontainer/init.cpp | 7 ------- .../sofa/component/topology/container/constant/init.cpp | 7 ------- .../sofa/component/topology/container/dynamic/init.cpp | 7 ------- .../src/sofa/component/topology/container/grid/init.cpp | 7 ------- .../Mapping/src/sofa/component/topology/mapping/init.cpp | 7 ------- .../Utility/src/sofa/component/topology/utility/init.cpp | 7 ------- Sofa/Component/Visual/src/sofa/component/visual/init.cpp | 7 ------- .../src/sofa/gl/component/rendering2d/init.cpp | 7 ------- .../src/sofa/gl/component/rendering3d/init.cpp | 7 ------- .../Shader/src/sofa/gl/component/shader/init.cpp | 7 ------- .../Helper/src/sofa/helper/system/PluginManager.cpp | 1 - .../src/MultiThreading/initMultiThreading.cpp | 6 ------ 51 files changed, 352 deletions(-) diff --git a/Sofa/Component/AnimationLoop/src/sofa/component/animationloop/init.cpp b/Sofa/Component/AnimationLoop/src/sofa/component/animationloop/init.cpp index b8e8fc9fb36..8d882c688ca 100644 --- a/Sofa/Component/AnimationLoop/src/sofa/component/animationloop/init.cpp +++ b/Sofa/Component/AnimationLoop/src/sofa/component/animationloop/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::animationloop diff --git a/Sofa/Component/Collision/Detection/Algorithm/src/sofa/component/collision/detection/algorithm/init.cpp b/Sofa/Component/Collision/Detection/Algorithm/src/sofa/component/collision/detection/algorithm/init.cpp index 0607b39e356..b17a99201ce 100644 --- a/Sofa/Component/Collision/Detection/Algorithm/src/sofa/component/collision/detection/algorithm/init.cpp +++ b/Sofa/Component/Collision/Detection/Algorithm/src/sofa/component/collision/detection/algorithm/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -56,11 +55,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} - } // namespace sofa::component::collision::detection::algorithm diff --git a/Sofa/Component/Collision/Detection/Intersection/src/sofa/component/collision/detection/intersection/init.cpp b/Sofa/Component/Collision/Detection/Intersection/src/sofa/component/collision/detection/intersection/init.cpp index 8984bf4ccdf..10f8fbda707 100644 --- a/Sofa/Component/Collision/Detection/Intersection/src/sofa/component/collision/detection/intersection/init.cpp +++ b/Sofa/Component/Collision/Detection/Intersection/src/sofa/component/collision/detection/intersection/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::collision::detection::intersection diff --git a/Sofa/Component/Collision/Detection/src/sofa/component/collision/detection/init.cpp b/Sofa/Component/Collision/Detection/src/sofa/component/collision/detection/init.cpp index 217c33402e2..19406c7b204 100644 --- a/Sofa/Component/Collision/Detection/src/sofa/component/collision/detection/init.cpp +++ b/Sofa/Component/Collision/Detection/src/sofa/component/collision/detection/init.cpp @@ -31,7 +31,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -62,10 +61,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::collision::detection diff --git a/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/init.cpp b/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/init.cpp index 4073b55c683..3f6df460a90 100644 --- a/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/init.cpp +++ b/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/init.cpp @@ -55,10 +55,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::collision::geometry diff --git a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/init.cpp b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/init.cpp index 916aed30d73..2a19dcfbfb5 100644 --- a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/init.cpp +++ b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::collision::response::contact diff --git a/Sofa/Component/Collision/Response/Mapper/src/sofa/component/collision/response/mapper/init.cpp b/Sofa/Component/Collision/Response/Mapper/src/sofa/component/collision/response/mapper/init.cpp index 9821e2f2411..80deff9364b 100644 --- a/Sofa/Component/Collision/Response/Mapper/src/sofa/component/collision/response/mapper/init.cpp +++ b/Sofa/Component/Collision/Response/Mapper/src/sofa/component/collision/response/mapper/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::collision::response::mapper diff --git a/Sofa/Component/Constraint/Lagrangian/Correction/src/sofa/component/constraint/lagrangian/correction/init.cpp b/Sofa/Component/Constraint/Lagrangian/Correction/src/sofa/component/constraint/lagrangian/correction/init.cpp index 8b5e9e1e173..814cfc507c7 100644 --- a/Sofa/Component/Constraint/Lagrangian/Correction/src/sofa/component/constraint/lagrangian/correction/init.cpp +++ b/Sofa/Component/Constraint/Lagrangian/Correction/src/sofa/component/constraint/lagrangian/correction/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::constraint::lagrangian::correction diff --git a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/init.cpp b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/init.cpp index 986b6bab6b1..4e24afdcaad 100644 --- a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/init.cpp +++ b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::constraint::lagrangian::model diff --git a/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/init.cpp b/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/init.cpp index be66e913c8f..49035665928 100644 --- a/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/init.cpp +++ b/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/init.cpp @@ -29,7 +29,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -56,11 +55,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} - } // namespace sofa::component::constraint::lagrangian::solver diff --git a/Sofa/Component/Constraint/Projective/src/sofa/component/constraint/projective/init.cpp b/Sofa/Component/Constraint/Projective/src/sofa/component/constraint/projective/init.cpp index 7b0a28103c4..b774107ac0f 100644 --- a/Sofa/Component/Constraint/Projective/src/sofa/component/constraint/projective/init.cpp +++ b/Sofa/Component/Constraint/Projective/src/sofa/component/constraint/projective/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::constraint::projective diff --git a/Sofa/Component/Controller/src/sofa/component/controller/init.cpp b/Sofa/Component/Controller/src/sofa/component/controller/init.cpp index efc0963c364..0c1fe7f520c 100644 --- a/Sofa/Component/Controller/src/sofa/component/controller/init.cpp +++ b/Sofa/Component/Controller/src/sofa/component/controller/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::controller diff --git a/Sofa/Component/Diffusion/src/sofa/component/diffusion/init.cpp b/Sofa/Component/Diffusion/src/sofa/component/diffusion/init.cpp index 02882be643c..9c4c72094e6 100644 --- a/Sofa/Component/Diffusion/src/sofa/component/diffusion/init.cpp +++ b/Sofa/Component/Diffusion/src/sofa/component/diffusion/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::diffusion diff --git a/Sofa/Component/Engine/Analyze/src/sofa/component/engine/analyze/init.cpp b/Sofa/Component/Engine/Analyze/src/sofa/component/engine/analyze/init.cpp index 40827db5327..3cb16116d29 100644 --- a/Sofa/Component/Engine/Analyze/src/sofa/component/engine/analyze/init.cpp +++ b/Sofa/Component/Engine/Analyze/src/sofa/component/engine/analyze/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::engine::analyze diff --git a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/init.cpp b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/init.cpp index aaef80e6e0d..84dbb29dcd0 100644 --- a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/init.cpp +++ b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::engine::generate diff --git a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/init.cpp b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/init.cpp index a6147c20b32..57add32cd26 100644 --- a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/init.cpp +++ b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::engine::select diff --git a/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/init.cpp b/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/init.cpp index e1237a6ec27..c4c25209d5d 100644 --- a/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/init.cpp +++ b/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::engine::transform diff --git a/Sofa/Component/Haptics/src/sofa/component/haptics/init.cpp b/Sofa/Component/Haptics/src/sofa/component/haptics/init.cpp index f7289cedde2..2c21a12944f 100644 --- a/Sofa/Component/Haptics/src/sofa/component/haptics/init.cpp +++ b/Sofa/Component/Haptics/src/sofa/component/haptics/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::haptics diff --git a/Sofa/Component/IO/Mesh/src/sofa/component/io/mesh/init.cpp b/Sofa/Component/IO/Mesh/src/sofa/component/io/mesh/init.cpp index 2fbc868cea4..3bb7f8f9487 100644 --- a/Sofa/Component/IO/Mesh/src/sofa/component/io/mesh/init.cpp +++ b/Sofa/Component/IO/Mesh/src/sofa/component/io/mesh/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::io::mesh diff --git a/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/init.cpp b/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/init.cpp index 92af1db615d..c2cb8734ee2 100644 --- a/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/init.cpp +++ b/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/init.cpp @@ -29,7 +29,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -76,10 +75,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::linearsolver::direct diff --git a/Sofa/Component/LinearSolver/Iterative/src/sofa/component/linearsolver/iterative/init.cpp b/Sofa/Component/LinearSolver/Iterative/src/sofa/component/linearsolver/iterative/init.cpp index 2eef545e58a..c64c072b575 100644 --- a/Sofa/Component/LinearSolver/Iterative/src/sofa/component/linearsolver/iterative/init.cpp +++ b/Sofa/Component/LinearSolver/Iterative/src/sofa/component/linearsolver/iterative/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::linearsolver::iterative diff --git a/Sofa/Component/LinearSolver/Ordering/src/sofa/component/linearsolver/ordering/init.cpp b/Sofa/Component/LinearSolver/Ordering/src/sofa/component/linearsolver/ordering/init.cpp index 69fe6f0a1ba..63dd35a4118 100644 --- a/Sofa/Component/LinearSolver/Ordering/src/sofa/component/linearsolver/ordering/init.cpp +++ b/Sofa/Component/LinearSolver/Ordering/src/sofa/component/linearsolver/ordering/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::linearsolver::ordering diff --git a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/init.cpp b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/init.cpp index 0344807d143..b135b8700dc 100644 --- a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/init.cpp +++ b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::linearsolver::preconditioner diff --git a/Sofa/Component/LinearSystem/src/sofa/component/linearsystem/init.cpp b/Sofa/Component/LinearSystem/src/sofa/component/linearsystem/init.cpp index ce9bed0a02f..8b2cc4d0fe5 100644 --- a/Sofa/Component/LinearSystem/src/sofa/component/linearsystem/init.cpp +++ b/Sofa/Component/LinearSystem/src/sofa/component/linearsystem/init.cpp @@ -42,7 +42,6 @@ extern "C" { SOFA_COMPONENT_LINEARSYSTEM_API const char* getModuleVersion(); SOFA_COMPONENT_LINEARSYSTEM_API const char* getModuleLicense(); SOFA_COMPONENT_LINEARSYSTEM_API const char* getModuleDescription(); - SOFA_COMPONENT_LINEARSYSTEM_API const char* getModuleComponentList(); } void initExternalModule() @@ -70,11 +69,4 @@ const char* getModuleDescription() return "This plugin defines a linear system and provides components able to assemble one from the scene."; } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} - } // namespace sofa::component::linearsystem diff --git a/Sofa/Component/Mapping/Linear/src/sofa/component/mapping/linear/init.cpp b/Sofa/Component/Mapping/Linear/src/sofa/component/mapping/linear/init.cpp index cd7b6ebd887..41646305224 100644 --- a/Sofa/Component/Mapping/Linear/src/sofa/component/mapping/linear/init.cpp +++ b/Sofa/Component/Mapping/Linear/src/sofa/component/mapping/linear/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::mapping::linear diff --git a/Sofa/Component/Mapping/MappedMatrix/src/sofa/component/mapping/mappedmatrix/init.cpp b/Sofa/Component/Mapping/MappedMatrix/src/sofa/component/mapping/mappedmatrix/init.cpp index ff79888893b..17364692f93 100644 --- a/Sofa/Component/Mapping/MappedMatrix/src/sofa/component/mapping/mappedmatrix/init.cpp +++ b/Sofa/Component/Mapping/MappedMatrix/src/sofa/component/mapping/mappedmatrix/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::mapping::mappedmatrix diff --git a/Sofa/Component/Mapping/NonLinear/src/sofa/component/mapping/nonlinear/init.cpp b/Sofa/Component/Mapping/NonLinear/src/sofa/component/mapping/nonlinear/init.cpp index 4eaeaeb84bd..88bc991628a 100644 --- a/Sofa/Component/Mapping/NonLinear/src/sofa/component/mapping/nonlinear/init.cpp +++ b/Sofa/Component/Mapping/NonLinear/src/sofa/component/mapping/nonlinear/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::mapping::nonlinear diff --git a/Sofa/Component/Mass/src/sofa/component/mass/init.cpp b/Sofa/Component/Mass/src/sofa/component/mass/init.cpp index d5ce80c88fd..de3b283820c 100644 --- a/Sofa/Component/Mass/src/sofa/component/mass/init.cpp +++ b/Sofa/Component/Mass/src/sofa/component/mass/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::mass diff --git a/Sofa/Component/MechanicalLoad/src/sofa/component/mechanicalload/init.cpp b/Sofa/Component/MechanicalLoad/src/sofa/component/mechanicalload/init.cpp index b8463552d51..d75ac38e91f 100644 --- a/Sofa/Component/MechanicalLoad/src/sofa/component/mechanicalload/init.cpp +++ b/Sofa/Component/MechanicalLoad/src/sofa/component/mechanicalload/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::mechanicalload diff --git a/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/init.cpp b/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/init.cpp index d6c829ce13e..24b4e5bfb5d 100644 --- a/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/init.cpp +++ b/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::odesolver::backward diff --git a/Sofa/Component/ODESolver/Forward/src/sofa/component/odesolver/forward/init.cpp b/Sofa/Component/ODESolver/Forward/src/sofa/component/odesolver/forward/init.cpp index 46401a9b7e7..18768b08b3f 100644 --- a/Sofa/Component/ODESolver/Forward/src/sofa/component/odesolver/forward/init.cpp +++ b/Sofa/Component/ODESolver/Forward/src/sofa/component/odesolver/forward/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::odesolver::forward diff --git a/Sofa/Component/Playback/src/sofa/component/playback/init.cpp b/Sofa/Component/Playback/src/sofa/component/playback/init.cpp index 7a7a313bf47..cafc48306f1 100644 --- a/Sofa/Component/Playback/src/sofa/component/playback/init.cpp +++ b/Sofa/Component/Playback/src/sofa/component/playback/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::playback diff --git a/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/init.cpp b/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/init.cpp index fd30f92db3a..1a27e0896e6 100644 --- a/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/init.cpp +++ b/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::sceneutility diff --git a/Sofa/Component/Setting/src/sofa/component/setting/init.cpp b/Sofa/Component/Setting/src/sofa/component/setting/init.cpp index 1042dc9adff..f34ee5276ad 100644 --- a/Sofa/Component/Setting/src/sofa/component/setting/init.cpp +++ b/Sofa/Component/Setting/src/sofa/component/setting/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::setting diff --git a/Sofa/Component/SolidMechanics/FEM/Elastic/src/sofa/component/solidmechanics/fem/elastic/init.cpp b/Sofa/Component/SolidMechanics/FEM/Elastic/src/sofa/component/solidmechanics/fem/elastic/init.cpp index a65e3cfaac4..5cb273e843a 100644 --- a/Sofa/Component/SolidMechanics/FEM/Elastic/src/sofa/component/solidmechanics/fem/elastic/init.cpp +++ b/Sofa/Component/SolidMechanics/FEM/Elastic/src/sofa/component/solidmechanics/fem/elastic/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::solidmechanics::fem::elastic diff --git a/Sofa/Component/SolidMechanics/FEM/HyperElastic/src/sofa/component/solidmechanics/fem/hyperelastic/init.cpp b/Sofa/Component/SolidMechanics/FEM/HyperElastic/src/sofa/component/solidmechanics/fem/hyperelastic/init.cpp index 27f7f40e50d..c26f27ac8d9 100644 --- a/Sofa/Component/SolidMechanics/FEM/HyperElastic/src/sofa/component/solidmechanics/fem/hyperelastic/init.cpp +++ b/Sofa/Component/SolidMechanics/FEM/HyperElastic/src/sofa/component/solidmechanics/fem/hyperelastic/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::solidmechanics::fem::hyperelastic diff --git a/Sofa/Component/SolidMechanics/FEM/NonUniform/src/sofa/component/solidmechanics/fem/nonuniform/init.cpp b/Sofa/Component/SolidMechanics/FEM/NonUniform/src/sofa/component/solidmechanics/fem/nonuniform/init.cpp index d4f440bb026..efa2f9139ed 100644 --- a/Sofa/Component/SolidMechanics/FEM/NonUniform/src/sofa/component/solidmechanics/fem/nonuniform/init.cpp +++ b/Sofa/Component/SolidMechanics/FEM/NonUniform/src/sofa/component/solidmechanics/fem/nonuniform/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() initExternalModule(); } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::solidmechanics::fem::nonuniform diff --git a/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/init.cpp b/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/init.cpp index b11478b2a68..eb0545819d8 100644 --- a/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/init.cpp +++ b/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::solidmechanics::spring diff --git a/Sofa/Component/SolidMechanics/TensorMass/src/sofa/component/solidmechanics/tensormass/init.cpp b/Sofa/Component/SolidMechanics/TensorMass/src/sofa/component/solidmechanics/tensormass/init.cpp index c4f64cf7b33..616a70834c0 100644 --- a/Sofa/Component/SolidMechanics/TensorMass/src/sofa/component/solidmechanics/tensormass/init.cpp +++ b/Sofa/Component/SolidMechanics/TensorMass/src/sofa/component/solidmechanics/tensormass/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::solidmechanics::tensormass diff --git a/Sofa/Component/StateContainer/src/sofa/component/statecontainer/init.cpp b/Sofa/Component/StateContainer/src/sofa/component/statecontainer/init.cpp index 988cafa0630..789814021d5 100644 --- a/Sofa/Component/StateContainer/src/sofa/component/statecontainer/init.cpp +++ b/Sofa/Component/StateContainer/src/sofa/component/statecontainer/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::statecontainer diff --git a/Sofa/Component/Topology/Container/Constant/src/sofa/component/topology/container/constant/init.cpp b/Sofa/Component/Topology/Container/Constant/src/sofa/component/topology/container/constant/init.cpp index e264c2caeae..8e3c0970fbc 100644 --- a/Sofa/Component/Topology/Container/Constant/src/sofa/component/topology/container/constant/init.cpp +++ b/Sofa/Component/Topology/Container/Constant/src/sofa/component/topology/container/constant/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::topology::container::constant diff --git a/Sofa/Component/Topology/Container/Dynamic/src/sofa/component/topology/container/dynamic/init.cpp b/Sofa/Component/Topology/Container/Dynamic/src/sofa/component/topology/container/dynamic/init.cpp index 61bbee49213..88ac7674543 100644 --- a/Sofa/Component/Topology/Container/Dynamic/src/sofa/component/topology/container/dynamic/init.cpp +++ b/Sofa/Component/Topology/Container/Dynamic/src/sofa/component/topology/container/dynamic/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::topology::container::dynamic diff --git a/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/init.cpp b/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/init.cpp index 877b7b6ccf1..a134bb36d20 100644 --- a/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/init.cpp +++ b/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::topology::container::grid diff --git a/Sofa/Component/Topology/Mapping/src/sofa/component/topology/mapping/init.cpp b/Sofa/Component/Topology/Mapping/src/sofa/component/topology/mapping/init.cpp index 726711584b7..c84007bf931 100644 --- a/Sofa/Component/Topology/Mapping/src/sofa/component/topology/mapping/init.cpp +++ b/Sofa/Component/Topology/Mapping/src/sofa/component/topology/mapping/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::topology::mapping diff --git a/Sofa/Component/Topology/Utility/src/sofa/component/topology/utility/init.cpp b/Sofa/Component/Topology/Utility/src/sofa/component/topology/utility/init.cpp index 1c824bacca4..c4cbe818890 100644 --- a/Sofa/Component/Topology/Utility/src/sofa/component/topology/utility/init.cpp +++ b/Sofa/Component/Topology/Utility/src/sofa/component/topology/utility/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::topology::utility diff --git a/Sofa/Component/Visual/src/sofa/component/visual/init.cpp b/Sofa/Component/Visual/src/sofa/component/visual/init.cpp index 329477cd3f0..4e2abe393dd 100644 --- a/Sofa/Component/Visual/src/sofa/component/visual/init.cpp +++ b/Sofa/Component/Visual/src/sofa/component/visual/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() } } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::component::visual diff --git a/Sofa/GL/Component/Rendering2D/src/sofa/gl/component/rendering2d/init.cpp b/Sofa/GL/Component/Rendering2D/src/sofa/gl/component/rendering2d/init.cpp index c79350cef7a..946bd4ea4ea 100644 --- a/Sofa/GL/Component/Rendering2D/src/sofa/gl/component/rendering2d/init.cpp +++ b/Sofa/GL/Component/Rendering2D/src/sofa/gl/component/rendering2d/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() initExternalModule(); } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::gl::component::rendering2d diff --git a/Sofa/GL/Component/Rendering3D/src/sofa/gl/component/rendering3d/init.cpp b/Sofa/GL/Component/Rendering3D/src/sofa/gl/component/rendering3d/init.cpp index e9c08a9c934..5156beca33d 100644 --- a/Sofa/GL/Component/Rendering3D/src/sofa/gl/component/rendering3d/init.cpp +++ b/Sofa/GL/Component/Rendering3D/src/sofa/gl/component/rendering3d/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() initExternalModule(); } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::gl::component::rendering3d diff --git a/Sofa/GL/Component/Shader/src/sofa/gl/component/shader/init.cpp b/Sofa/GL/Component/Shader/src/sofa/gl/component/shader/init.cpp index 7f00267a14e..eeb782dcd3b 100644 --- a/Sofa/GL/Component/Shader/src/sofa/gl/component/shader/init.cpp +++ b/Sofa/GL/Component/Shader/src/sofa/gl/component/shader/init.cpp @@ -28,7 +28,6 @@ extern "C" { SOFA_EXPORT_DYNAMIC_LIBRARY void initExternalModule(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleName(); SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleVersion(); - SOFA_EXPORT_DYNAMIC_LIBRARY const char* getModuleComponentList(); } void initExternalModule() @@ -55,10 +54,4 @@ void init() initExternalModule(); } -const char* getModuleComponentList() -{ - /// string containing the names of the classes provided by the plugin - static std::string classes = core::ObjectFactory::getInstance()->listClassesFromTarget(MODULE_NAME); - return classes.c_str(); -} } // namespace sofa::gl::component::shader diff --git a/Sofa/framework/Helper/src/sofa/helper/system/PluginManager.cpp b/Sofa/framework/Helper/src/sofa/helper/system/PluginManager.cpp index fa5d6b10bb4..bac647e93af 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/PluginManager.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/system/PluginManager.cpp @@ -212,7 +212,6 @@ PluginManager::PluginLoadStatus PluginManager::loadPluginByPath(const std::strin [[maybe_unused]] const auto moduleDescriptionResult = getPluginEntry(p.getModuleDescription,d); [[maybe_unused]] const auto moduleLicenseResult = getPluginEntry(p.getModuleLicense,d); - [[maybe_unused]] const auto moduleComponentListResult = getPluginEntry(p.getModuleComponentList,d); [[maybe_unused]] const auto moduleVersionResult = getPluginEntry(p.getModuleVersion,d); } diff --git a/applications/plugins/MultiThreading/src/MultiThreading/initMultiThreading.cpp b/applications/plugins/MultiThreading/src/MultiThreading/initMultiThreading.cpp index 6220f2b4ddb..d14bb740f10 100644 --- a/applications/plugins/MultiThreading/src/MultiThreading/initMultiThreading.cpp +++ b/applications/plugins/MultiThreading/src/MultiThreading/initMultiThreading.cpp @@ -34,7 +34,6 @@ SOFA_MULTITHREADING_PLUGIN_API const char* getModuleName(); SOFA_MULTITHREADING_PLUGIN_API const char* getModuleVersion(); SOFA_MULTITHREADING_PLUGIN_API const char* getModuleLicense(); SOFA_MULTITHREADING_PLUGIN_API const char* getModuleDescription(); -SOFA_MULTITHREADING_PLUGIN_API const char* getModuleComponentList(); } void init() @@ -72,9 +71,4 @@ const char* getModuleDescription() return "MultiThreading SOFA Framework"; } -const char* getModuleComponentList() -{ - return "DataExchange, AnimationLoopParallelScheduler "; -} - } From 5a7a744f168394235beee3605409a029be34f768 Mon Sep 17 00:00:00 2001 From: Frederick ROY Date: Fri, 28 Jun 2024 11:13:39 +0900 Subject: [PATCH 3/3] restore binding (as the entrypoint can still be called) --- Sofa/framework/Helper/src/sofa/helper/system/PluginManager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Sofa/framework/Helper/src/sofa/helper/system/PluginManager.cpp b/Sofa/framework/Helper/src/sofa/helper/system/PluginManager.cpp index bac647e93af..fa5d6b10bb4 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/PluginManager.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/system/PluginManager.cpp @@ -212,6 +212,7 @@ PluginManager::PluginLoadStatus PluginManager::loadPluginByPath(const std::strin [[maybe_unused]] const auto moduleDescriptionResult = getPluginEntry(p.getModuleDescription,d); [[maybe_unused]] const auto moduleLicenseResult = getPluginEntry(p.getModuleLicense,d); + [[maybe_unused]] const auto moduleComponentListResult = getPluginEntry(p.getModuleComponentList,d); [[maybe_unused]] const auto moduleVersionResult = getPluginEntry(p.getModuleVersion,d); }