Skip to content
Snippets Groups Projects
Commit 1c8f22d9 authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

[Device] De-inline constructors

parent ca1b8b3d
No related branches found
No related tags found
No related merge requests found
......@@ -51,12 +51,7 @@ class HPP_MANIPULATION_DLLAPI Device : public pinocchio::HumanoidRobot {
/// Constructor
/// \param name of the new instance,
static DevicePtr_t create(const std::string& name) {
Device* ptr = new Device(name);
DevicePtr_t shPtr(ptr);
ptr->init(shPtr);
return shPtr;
}
static DevicePtr_t create(const std::string& name);
DevicePtr_t self() const { return self_.lock(); }
......@@ -84,7 +79,7 @@ class HPP_MANIPULATION_DLLAPI Device : public pinocchio::HumanoidRobot {
/// \param name of the new instance,
/// \param robot Robots that manipulate objects,
/// \param objects Set of objects manipulated by the robot.
Device(const std::string& name) : Parent_t(name) {}
Device(const std::string& name);
void init(const DeviceWkPtr_t& self) {
Parent_t::init(self);
......
......@@ -43,6 +43,17 @@ namespace hpp {
namespace manipulation {
using ::pinocchio::Frame;
DevicePtr_t Device::create(const std::string& name) {
Device* ptr = new Device(name);
DevicePtr_t shPtr(ptr);
ptr->init(shPtr);
return shPtr;
}
Device::Device(const std::string& name) : Parent_t(name)
{
}
pinocchio::DevicePtr_t Device::clone() const {
Device* ptr = new Device(*this);
DevicePtr_t shPtr(ptr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment