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

Prepend DART_ to DEPRECATED and FORCEINLINE macros to avoid name conflicts #742

Merged
merged 2 commits into from
Jul 6, 2016
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

* Misc improvements and bug fixes

* Renamed `DEPRECATED` and `FORCEINLINE` to `DART_DEPRECATED` and `DART_FORCEINLINE` to avoid name conflicts: [#742](https://github.com/dartsim/dart/pull/742)
* Updated copyright: added CMU to copyright holder, moved individual contributors to CONTRIBUTING.md: [#723](https://github.com/dartsim/dart/pull/723)

### DART 6.0.0 (2016-05-10)
Expand Down
12 changes: 6 additions & 6 deletions dart/common/Deprecated.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
//==============================================================================

#if defined(__GNUC__) || defined(__clang__)
#define DEPRECATED(version) __attribute__ ((deprecated))
#define FORCEINLINE __attribute__((always_inline))
#define DART_DEPRECATED(version) __attribute__ ((deprecated))
#define DART_FORCEINLINE __attribute__((always_inline))
#elif defined(_MSC_VER)
#define DEPRECATED(version) __declspec(deprecated)
#define FORCEINLINE __forceinline
#define DART_DEPRECATED(version) __declspec(deprecated)
#define DART_FORCEINLINE __DART_FORCEINLINE
#else
#define DEPRECATED(version) ()
#define FORCEINLINE
#define DART_DEPRECATED(version) ()
#define DART_FORCEINLINE
#endif

// We define two convenient macros that can be used to suppress
Expand Down
2 changes: 1 addition & 1 deletion dart/constraint/ConstraintSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class ConstraintSolver
/// Set collision detector. This function acquires ownership of the
/// CollisionDetector passed as an argument. This method is deprecated in
/// favor of the overload that accepts a std::shared_ptr.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
void setCollisionDetector(collision::CollisionDetector* collisionDetector);

/// Set collision detector
Expand Down
6 changes: 3 additions & 3 deletions dart/dynamics/BodyNode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,12 +706,12 @@ class BodyNode :
/// this status is set by the constraint solver during dynamics simulation but
/// not by collision detector.
/// \param[in] True if this body node is colliding.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
void setColliding(bool _isColliding);

/// Return whether this body node is set to be colliding with other objects.
/// \return True if this body node is colliding.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
bool isColliding();

/// Add applying linear Cartesian forces to this node
Expand Down Expand Up @@ -1030,7 +1030,7 @@ class BodyNode :
static std::size_t msBodyNodeCount;

/// Whether the node is currently in collision with another node.
/// \deprecated DEPRECATED(6.0) See #670 for more detail.
/// \deprecated DART_DEPRECATED(6.0) See #670 for more detail.
bool mIsColliding;

//--------------------------------------------------------------------------
Expand Down
26 changes: 13 additions & 13 deletions dart/dynamics/Joint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,31 +539,31 @@ class Joint : public virtual common::Subject,
//----------------------------------------------------------------------------

/// Deprecated. Use getRelativeTransform() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
const Eigen::Isometry3d& getLocalTransform() const;

/// Deprecated. Use getLocalSpatialVelocity() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
const Eigen::Vector6d& getLocalSpatialVelocity() const;

/// Deprecated. Use getLocalSpatialAcceleration() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
const Eigen::Vector6d& getLocalSpatialAcceleration() const;

/// Deprecated. Use getLocalPrimaryAcceleration() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
const Eigen::Vector6d& getLocalPrimaryAcceleration() const;

/// Deprecated. Use getRelativeJacobian() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
const math::Jacobian getLocalJacobian() const;

/// Deprecated. Use getRelativeJacobian() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
math::Jacobian getLocalJacobian(const Eigen::VectorXd& positions) const;

/// Deprecated. Use getRelativeJacobianTimeDeriv() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
const math::Jacobian getLocalJacobianTimeDeriv() const;

/// Get transform of the child BodyNode relative to the parent BodyNode
Expand Down Expand Up @@ -680,27 +680,27 @@ class Joint : public virtual common::Subject,
//----------------------------------------------------------------------------

/// Deprecated. Use updateRelativeTransform() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
void updateLocalTransform() const;

/// Deprecated. Use updateRelativeSpatialVelocity() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
void updateLocalSpatialVelocity() const;

/// Deprecated. Use updateRelativeSpatialAcceleration() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
void updateLocalSpatialAcceleration() const;

/// Deprecated. Use updateRelativePrimaryAcceleration() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
void updateLocalPrimaryAcceleration() const;

/// Deprecated. Use updateRelativeJacobian() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
void updateLocalJacobian(bool mandatory = true) const;

/// Deprecated. Use updateRelativeJacobianTimeDeriv() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
void updateLocalJacobianTimeDeriv() const;

/// Update transform of the child BodyNode relative to the parent BodyNode
Expand Down
4 changes: 2 additions & 2 deletions dart/dynamics/Marker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ class Marker final :
/// Get the BodyNode this Marker belongs to
///
/// Deprecated: Use getBodyNodePtr() instead
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
BodyNode* getBodyNode();

/// Get the (const) BodyNode this Marker belongs to
///
/// Deprecated: Use getBodyNodePtr() instead
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
const BodyNode* getBodyNode() const;

/// Get position of this marker in the parent body node coordinates
Expand Down
2 changes: 1 addition & 1 deletion dart/dynamics/MetaSkeleton.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ class MetaSkeleton : public common::Subject
virtual double getPotentialEnergy() const = 0;

/// Clear collision flags of the BodyNodes in this MetaSkeleton
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
virtual void clearCollidingBodies() = 0;

/// \}
Expand Down
2 changes: 1 addition & 1 deletion dart/dynamics/ReferentialSkeleton.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class ReferentialSkeleton : public MetaSkeleton
double getPotentialEnergy() const override;

// Documentation inherited
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
void clearCollidingBodies() override;

/// \}
Expand Down
8 changes: 4 additions & 4 deletions dart/dynamics/Skeleton.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class Skeleton :
void setProperties(const AspectProperties& properties);

/// Get the Properties of this Skeleton
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
const AspectProperties& getSkeletonProperties() const;

/// Set the AspectProperties of this Skeleton
Expand All @@ -222,11 +222,11 @@ class Skeleton :

/// Deprecated. Please use enableSelfCollisionCheck() and
/// setAdjacentBodyCheck() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
void enableSelfCollision(bool enableAdjacentBodyCheck = false);

/// Deprecated. Please use disableSelfCollisionCheck() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
void disableSelfCollision();

/// Set whether to check self-collision.
Expand Down Expand Up @@ -826,7 +826,7 @@ class Skeleton :
double getPotentialEnergy() const override;

// Documentation inherited
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
void clearCollidingBodies() override;

/// \}
Expand Down
4 changes: 2 additions & 2 deletions dart/gui/SimWindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ class SimWindow : public Win3D {

virtual void drawSkeletons() const;

DEPRECATED(6.0)
DART_DEPRECATED(6.0)
virtual void drawSkels();

DEPRECATED(6.0)
DART_DEPRECATED(6.0)
virtual void drawEntities();

/// \brief
Expand Down
2 changes: 1 addition & 1 deletion dart/math/Geometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ Eigen::Isometry3d computeTransform(const Eigen::Vector3d& axis,
AxisType axisType = AxisType::AXIS_X);

/// Generate frame given origin and z-axis
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
Eigen::Isometry3d getFrameOriginAxisZ(const Eigen::Vector3d& _origin,
const Eigen::Vector3d& _axisZ);

Expand Down
2 changes: 1 addition & 1 deletion dart/simulation/World.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class World : public virtual common::Subject
//--------------------------------------------------------------------------

/// Deprecated. Please use checkCollision(~) instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
bool checkCollision(bool checkAllCollisions);

/// Perform collision checking with 'option' over all the feasible collision
Expand Down
4 changes: 2 additions & 2 deletions dart/utils/XmlHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ tinyxml2::XMLElement* getElement(tinyxml2::XMLElement* parentElement,
bool hasAttribute(const tinyxml2::XMLElement* element, const char* const name);

// Please use getAttributeString() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
std::string getAttribute(tinyxml2::XMLElement* element, const char* const name);

// Please use getAttributeDouble() instead.
DEPRECATED(6.0)
DART_DEPRECATED(6.0)
void getAttribute(tinyxml2::XMLElement* element, const char* const name, double* d);

std::string getAttributeString (const tinyxml2::XMLElement* element, const std::string& attributeName);
Expand Down
2 changes: 1 addition & 1 deletion dart/utils/sdf/SdfParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace utils {

namespace SdfParser {

DEPRECATED(6.0)
DART_DEPRECATED(6.0)
simulation::WorldPtr readSdfFile(
const common::Uri& fileUri,
const common::ResourceRetrieverPtr& retriever = nullptr);
Expand Down