File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020#pragma once
2121
2222#include <sofa/config.h>
23- #include <sofa/config/sharedlibrary_defines.h>
24-
25- #define INFINYTOOLKIT_VERSION @PROJECT_VERSION@
23+ #define PLUGIN_VERSION @PROJECT_VERSION@
2624
2725#ifdef SOFA_BUILD_INFINYTOOLKIT
2826# define SOFA_TARGET @PROJECT_NAME@
2927# define SOFA_INFINYTOOLKIT_API SOFA_EXPORT_DYNAMIC_LIBRARY
3028#else
3129# define SOFA_INFINYTOOLKIT_API SOFA_IMPORT_DYNAMIC_LIBRARY
3230#endif
33-
34- namespace sofa ::infinytoolkit
35- {
36- constexpr const char * MODULE_NAME = "@PROJECT_NAME@" ;
37- constexpr const char * MODULE_VERSION = "@PROJECT_VERSION@" ;
38- } // namespace sofa::infinytoolkit
Original file line number Diff line number Diff line change 2222#include < sofa/core/ObjectFactory.h>
2323#include < sofa/helper/system/PluginManager.h>
2424
25+ using sofa::core::ObjectFactory;
26+
2527namespace sofa ::infinytoolkit
2628{
2729// Haptic and Carving
@@ -56,6 +58,14 @@ extern void registerMotionReplayController(sofa::core::ObjectFactory* factory);
5658
5759
5860
61+ } // namespace sofa::infinytoolkit
62+
63+
64+ namespace sofa ::component
65+ {
66+
67+ using namespace sofa ::infinytoolkit;
68+
5969// Here are just several convenient functions to help user to know what contains the plugin
6070extern " C" {
6171 SOFA_INFINYTOOLKIT_API void initExternalModule ();
@@ -85,12 +95,12 @@ void initExternalModule()
8595
8696const char * getModuleName ()
8797{
88- return MODULE_NAME ;
98+ return sofa_tostring ( SOFA_TARGET ) ;
8999}
90100
91101const char * getModuleVersion ()
92102{
93- return MODULE_VERSION ;
103+ return sofa_tostring ( PLUGIN_VERSION ) ;
94104}
95105
96106const char * getModuleLicense ()
@@ -137,4 +147,4 @@ void registerObjects(sofa::core::ObjectFactory* factory)
137147 registerMotionReplayController (factory);
138148}
139149
140- } // namespace sofa::infinytoolkit
150+ } // namespace sofa::component
Original file line number Diff line number Diff line change 2020#pragma once
2121#include < InfinyToolkit/config.h>
2222
23- namespace sofa ::infinytoolkit
23+ namespace sofa ::component
2424{
2525
2626void SOFA_INFINYTOOLKIT_API initInfinyToolkit ();
2727
28- } // namespace sofa::infinytoolkit
28+ } // namespace sofa::component
You can’t perform that action at this time.
0 commit comments