Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/SofaHaplyRobotics/Haply_Inverse3Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ const std::string Haply_Inverse3Controller::wirelessGripIdKey_ = "wireless_verse

using namespace sofa::helper::system::thread;

const int Haply_Inverse3ControllerClass = core::RegisterObject("Driver allowing interfacing with Haptic Haply Robotics Inverse3 device.")
.add< Haply_Inverse3Controller >()
;
void registerHaply_Inverse3Controller(sofa::core::ObjectFactory* factory)
{
factory->registerObjects(core::ObjectRegistrationData("Driver allowing interfacing with Haptic Haply Robotics Inverse3 device.")
.add< Haply_Inverse3Controller >());
}


//constructeur
Expand Down
1 change: 1 addition & 0 deletions src/SofaHaplyRobotics/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <sofa/config.h>

#ifdef SOFA_BUILD_SOFAHAPLYROBOTICS
# define SOFA_TARGET SofaHaplyRobotics
# define SOFA_HAPLYROBOTICS_API SOFA_EXPORT_DYNAMIC_LIBRARY
#else
# define SOFA_HAPLYROBOTICS_API SOFA_IMPORT_DYNAMIC_LIBRARY
Expand Down
13 changes: 13 additions & 0 deletions src/SofaHaplyRobotics/initSofaHaplyRoboticsPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
****************************************************************************/
#include <SofaHaplyRobotics/config.h>

#include <sofa/core/ObjectFactory.h>

namespace sofa::HaplyRobotics
{
void registerHaply_Inverse3Controller(sofa::core::ObjectFactory* factory);
}

namespace sofa::component
{

Expand All @@ -31,6 +38,7 @@ extern "C" {
SOFA_HAPLYROBOTICS_API const char* getModuleLicense();
SOFA_HAPLYROBOTICS_API const char* getModuleDescription();
SOFA_HAPLYROBOTICS_API const char* getModuleComponentList();
SOFA_HAPLYROBOTICS_API void registerObjects(sofa::core::ObjectFactory* factory);
}

void initExternalModule()
Expand Down Expand Up @@ -68,4 +76,9 @@ const char* getModuleComponentList()
return "Haply_Inverse3Controller";
}

void registerObjects(sofa::core::ObjectFactory* factory)
{
sofa::HaplyRobotics::registerHaply_Inverse3Controller(factory);
}

} // namespace sofa::component