Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added virtual destructors to joint properties. #391

Merged
merged 1 commit into from
May 24, 2015
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
1 change: 1 addition & 0 deletions dart/dynamics/BallJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class BallJoint : public MultiDofJoint<3>
{
Properties(const MultiDofJoint<3>::Properties& _properties =
MultiDofJoint<3>::Properties());
virtual ~Properties() = default;
};

/// Constructor
Expand Down
4 changes: 4 additions & 0 deletions dart/dynamics/EulerJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class EulerJoint : public MultiDofJoint<3>

/// Constructor
UniqueProperties(AxisOrder _axisOrder = AO_XYZ);

virtual ~UniqueProperties() = default;
};

struct Properties : MultiDofJoint<3>::Properties, EulerJoint::UniqueProperties
Expand All @@ -75,6 +77,8 @@ class EulerJoint : public MultiDofJoint<3>
MultiDofJoint<3>::Properties(),
const EulerJoint::UniqueProperties& _eulerJointProperties =
EulerJoint::UniqueProperties());

virtual ~Properties() = default;
};

/// Constructor
Expand Down
2 changes: 2 additions & 0 deletions dart/dynamics/FreeJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class FreeJoint : public MultiDofJoint<6>
{
Properties(const MultiDofJoint<6>::Properties& _properties =
MultiDofJoint<6>::Properties());

virtual ~Properties() = default;
};

/// Constructor
Expand Down
4 changes: 4 additions & 0 deletions dart/dynamics/Joint.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ class Joint : public virtual common::Subject
Eigen::Isometry3d::Identity(),
bool _isPositionLimited = false,
ActuatorType _actuatorType = DefaultActuatorType);

virtual ~Properties() = default;
};

/// Default actuator type
Expand Down Expand Up @@ -912,6 +914,8 @@ class TemplateJointPtr

template<class, class> friend class TemplateJointPtr;

typedef JointT element_type;

/// Default constructor
TemplateJointPtr() = default;

Expand Down
4 changes: 4 additions & 0 deletions dart/dynamics/MultiDofJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,17 @@ class MultiDofJoint : public Joint
const Vector& _restPosition = Vector::Constant(0.0),
const Vector& _dampingCoefficient = Vector::Constant(0.0),
const Vector& _coulombFrictions = Vector::Constant(0.0));

virtual ~UniqueProperties() = default;
};

struct Properties : Joint::Properties, UniqueProperties
{
Properties(
const Joint::Properties& _jointProperties = Joint::Properties(),
const UniqueProperties& _multiDofProperties = UniqueProperties());

virtual ~Properties() = default;
};

/// Constructor
Expand Down
4 changes: 4 additions & 0 deletions dart/dynamics/PlanarJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ class PlanarJoint : public MultiDofJoint<3>
UniqueProperties(const Eigen::Vector3d& _transAxis1,
const Eigen::Vector3d& _transAxis2);

virtual ~UniqueProperties() = default;

/// Set plane type as XY-plane
void setXYPlane();

Expand All @@ -115,6 +117,8 @@ class PlanarJoint : public MultiDofJoint<3>
MultiDofJoint<3>::Properties(),
const PlanarJoint::UniqueProperties& _planarProperties =
PlanarJoint::UniqueProperties());

virtual ~Properties() = default;
};

/// Constructor
Expand Down
2 changes: 2 additions & 0 deletions dart/dynamics/PrismaticJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class PrismaticJoint : public SingleDofJoint
Eigen::Vector3d mAxis;

UniqueProperties(const Eigen::Vector3d& _axis = Eigen::Vector3d::UnitZ());
virtual ~UniqueProperties() = default;
};

struct Properties : SingleDofJoint::Properties,
Expand All @@ -68,6 +69,7 @@ class PrismaticJoint : public SingleDofJoint
SingleDofJoint::Properties(),
const PrismaticJoint::UniqueProperties& _prismaticProperties =
PrismaticJoint::UniqueProperties());
virtual ~Properties() = default;
};

/// Constructor
Expand Down
4 changes: 4 additions & 0 deletions dart/dynamics/RevoluteJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class RevoluteJoint : public SingleDofJoint
Eigen::Vector3d mAxis;

UniqueProperties(const Eigen::Vector3d& _axis = Eigen::Vector3d::UnitZ());

virtual ~UniqueProperties() = default;
};

struct Properties : SingleDofJoint::Properties,
Expand All @@ -68,6 +70,8 @@ class RevoluteJoint : public SingleDofJoint
SingleDofJoint::Properties(),
const RevoluteJoint::UniqueProperties& _revoluteProperties =
RevoluteJoint::UniqueProperties());

virtual ~Properties() = default;
};

/// Constructor
Expand Down
2 changes: 2 additions & 0 deletions dart/dynamics/ScrewJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class ScrewJoint : public SingleDofJoint

UniqueProperties(const Eigen::Vector3d& _axis = Eigen::Vector3d::UnitZ(),
double _pitch = 0.1);
virtual ~UniqueProperties() = default;
};

struct Properties : SingleDofJoint::Properties,
Expand All @@ -73,6 +74,7 @@ class ScrewJoint : public SingleDofJoint
SingleDofJoint::Properties(),
const ScrewJoint::UniqueProperties& _screwProperties =
ScrewJoint::UniqueProperties());
virtual ~Properties() = default;
};

/// Constructor
Expand Down
4 changes: 4 additions & 0 deletions dart/dynamics/SingleDofJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,17 @@ class SingleDofJoint : public Joint
double _coulombFriction = 0.0,
bool _preserveDofName = false,
std::string _dofName = "");

virtual ~UniqueProperties() = default;
};

struct Properties : Joint::Properties, UniqueProperties
{
Properties(
const Joint::Properties& _jointProperties = Joint::Properties(),
const UniqueProperties& _singleDofProperties = UniqueProperties());

virtual ~Properties() = default;
};

/// Constructor
Expand Down
1 change: 1 addition & 0 deletions dart/dynamics/TranslationalJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class TranslationalJoint : public MultiDofJoint<3>
{
Properties(const MultiDofJoint<3>::Properties& _properties =
MultiDofJoint<3>::Properties());
virtual ~Properties() = default;
};

/// Constructor
Expand Down
3 changes: 3 additions & 0 deletions dart/dynamics/UniversalJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class UniversalJoint : public MultiDofJoint<2>

UniqueProperties(const Eigen::Vector3d& _axis1 = Eigen::Vector3d::UnitX(),
const Eigen::Vector3d& _axis2 = Eigen::Vector3d::UnitY());

virtual ~UniqueProperties() = default;
};

struct Properties : MultiDofJoint<2>::Properties,
Expand All @@ -68,6 +70,7 @@ class UniversalJoint : public MultiDofJoint<2>
MultiDofJoint<2>::Properties(),
const UniversalJoint::UniqueProperties& _universalProperties =
UniversalJoint::UniqueProperties());
virtual ~Properties() = default;
};

/// Constructor
Expand Down
1 change: 1 addition & 0 deletions dart/dynamics/WeldJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class WeldJoint : public ZeroDofJoint
struct Properties : ZeroDofJoint::Properties
{
Properties(const Joint::Properties& _properties = Joint::Properties());
virtual ~Properties() = default;
};

/// Constructor
Expand Down
1 change: 1 addition & 0 deletions dart/dynamics/ZeroDofJoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class ZeroDofJoint : public Joint
struct Properties : Joint::Properties
{
Properties(const Joint::Properties& _properties = Joint::Properties());
virtual ~Properties() = default;
};

/// Constructor
Expand Down