24
24
25
25
#include < sofa/core/ObjectFactory.h>
26
26
using sofa::core::ObjectFactory;
27
+ #include < sofa/helper/system/PluginManager.h>
27
28
28
29
#include < Eigen/MetisSupport>
29
30
30
31
namespace sofa ::metis
31
32
{
33
+ extern void registerMetisOrderingMethod (sofa::core::ObjectFactory* factory);
34
+
32
35
extern " C" {
33
36
SOFA_METIS_API void initExternalModule ();
34
37
SOFA_METIS_API const char * getModuleName ();
35
38
SOFA_METIS_API const char * getModuleVersion ();
36
39
SOFA_METIS_API const char * getModuleDescription ();
37
- SOFA_METIS_API const char * getModuleComponentList ( );
40
+ SOFA_METIS_API void registerObjects (sofa::core::ObjectFactory* factory );
38
41
}
39
42
40
-
41
43
template <class EigenSolverFactory , class Scalar >
42
44
void registerOrderingMethods ()
43
45
{
@@ -55,6 +57,9 @@ namespace sofa::metis
55
57
56
58
void init ()
57
59
{
60
+ // make sure that this plugin is registered into the PluginManager
61
+ sofa::helper::system::PluginManager::getInstance ().registerPlugin (MODULE_NAME);
62
+
58
63
static bool first = true ;
59
64
if (first)
60
65
{
@@ -87,11 +92,9 @@ namespace sofa::metis
87
92
return " " ;
88
93
}
89
94
90
- const char * getModuleComponentList ( )
95
+ void registerObjects (sofa::core::ObjectFactory* factory )
91
96
{
92
- // / string containing the names of the classes provided by the plugin
93
- static std::string classes = ObjectFactory::getInstance ()->listClassesFromTarget (sofa_tostring (SOFA_TARGET));
94
- return classes.c_str ();
97
+ registerMetisOrderingMethod (factory);
95
98
}
96
99
97
100
}
0 commit comments