From 26ca737ab49b1f456d1dca512cf97edbb5b9f218 Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Wed, 7 Sep 2016 13:19:03 +0200
Subject: [PATCH] [C++] In Model, remove accessors of frame attribute using
 frame name

---
 src/multibody/model.hpp | 27 ---------------------------
 src/multibody/model.hxx | 36 ------------------------------------
 2 files changed, 63 deletions(-)

diff --git a/src/multibody/model.hpp b/src/multibody/model.hpp
index ab2c71da1..efdd15699 100644
--- a/src/multibody/model.hpp
+++ b/src/multibody/model.hpp
@@ -298,15 +298,6 @@ namespace se3
     ///
     PINOCCHIO_DEPRECATED const std::string & getFrameName (const FrameIndex index) const;
     
-    ///
-    /// \brief Get the index of the joint supporting the frame given by its name.
-    ///
-    /// \param[in] name Name of the frame.
-    ///
-    /// \return
-    ///
-    PINOCCHIO_DEPRECATED JointIndex getFrameParent(const std::string & name) const;
-    
     ///
     /// \brief Get the index of the joint supporting the frame given by its index.
     ///
@@ -315,15 +306,6 @@ namespace se3
     /// \return
     ///
     PINOCCHIO_DEPRECATED JointIndex getFrameParent(const FrameIndex index) const;
-
-    ///
-    /// \brief Get the type of the frame given by its index.
-    ///
-    /// \param[in] name Name of the frame.
-    ///
-    /// \return
-    ///
-    PINOCCHIO_DEPRECATED FrameType getFrameType(const std::string & name) const;
     
     ///
     /// \brief Get the type of the frame given by its index.
@@ -334,15 +316,6 @@ namespace se3
     ///
     PINOCCHIO_DEPRECATED FrameType getFrameType(const FrameIndex index) const;
     
-    ///
-    /// \brief Return the relative placement between a frame and its supporting joint.
-    ///
-    /// \param[in] name Name of the frame.
-    ///
-    /// \return The frame placement regarding the supporing joint.
-    ///
-    PINOCCHIO_DEPRECATED const SE3 & getFramePlacement(const std::string & name) const;
-    
     ///
     /// \brief Return the relative placement between a frame and its supporting joint.
     ///
diff --git a/src/multibody/model.hxx b/src/multibody/model.hxx
index 3dada82b4..10ca4422f 100644
--- a/src/multibody/model.hxx
+++ b/src/multibody/model.hxx
@@ -175,52 +175,16 @@ namespace se3
     return frames[index].name;
   }
 
-  inline Model::JointIndex Model::getFrameParent( const std::string & name ) const
-  {
-    assert(existFrame(name) && "The Frame you requested does not exist");
-    std::vector<Frame>::const_iterator it = std::find_if( frames.begin()
-                                                        , frames.end()
-                                                        , boost::bind(&Frame::name, _1) == name
-                                                        );
-    
-    std::vector<Frame>::iterator::difference_type it_diff = it - frames.begin();
-    return getFrameParent(Model::JointIndex(it_diff));
-  }
-
   inline Model::JointIndex Model::getFrameParent( const FrameIndex index ) const
   {
     return frames[index].parent;
   }
 
-  inline FrameType Model::getFrameType( const std::string & name ) const
-  {
-    assert(existFrame(name) && "The Frame you requested does not exist");
-    std::vector<Frame>::const_iterator it = std::find_if( frames.begin()
-                                                        , frames.end()
-                                                        , boost::bind(&Frame::name, _1) == name
-                                                        );
-    
-    std::vector<Frame>::iterator::difference_type it_diff = it - frames.begin();
-    return getFrameType(Model::JointIndex(it_diff));
-  }
-
   inline FrameType Model::getFrameType( const FrameIndex index ) const
   {
     return frames[index].type;
   }
 
-  inline const SE3 & Model::getFramePlacement( const std::string & name) const
-  {
-    assert(existFrame(name) && "The Frame you requested does not exist");
-    std::vector<Frame>::const_iterator it = std::find_if( frames.begin()
-                                                        , frames.end()
-                                                        , boost::bind(&Frame::name, _1) == name
-                                                        );
-    
-    std::vector<Frame>::iterator::difference_type it_diff = it - frames.begin();
-    return getFramePlacement(Model::Index(it_diff));
-  }
-
   inline const SE3 & Model::getFramePlacement( const FrameIndex index ) const
   {
     return frames[index].placement;
-- 
GitLab