From 2050ca2d86d234cde3b64fa1438ab4ff07bd068a Mon Sep 17 00:00:00 2001
From: Florent Lamiraux <florent@laas.fr>
Date: Tue, 7 Nov 2017 22:14:33 +0100
Subject: [PATCH] Update to modifications in hpp-core SizeInterval_t ->
 segment_t.

---
 include/hpp/manipulation/graph/edge.hh        |  4 +-
 include/hpp/manipulation/graph/fwd.hh         |  4 +-
 .../hpp/manipulation/graph/graph-component.hh |  2 +-
 .../hpp/manipulation/graph/state-selector.hh  |  2 +-
 include/hpp/manipulation/graph/state.hh       |  2 +-
 src/graph/edge.cc                             |  4 +-
 src/graph/graph-component.cc                  |  4 +-
 src/graph/helper.cc                           | 38 +++++++++----------
 src/handle.cc                                 |  2 -
 9 files changed, 30 insertions(+), 32 deletions(-)

diff --git a/include/hpp/manipulation/graph/edge.hh b/include/hpp/manipulation/graph/edge.hh
index 06f485a..3bc140f 100644
--- a/include/hpp/manipulation/graph/edge.hh
+++ b/include/hpp/manipulation/graph/edge.hh
@@ -345,7 +345,7 @@ namespace hpp {
 
           /// Insert a NumericalConstraint that parametrizes the foliation
           void insertParamConstraint (const NumericalConstraintPtr_t& nm,
-              const SizeIntervals_t& passiveDofs = SizeIntervals_t ());
+              const segments_t& passiveDofs = segments_t ());
 
           void insertParamConstraint (const DifferentiableFunctionPtr_t function, const ComparisonTypePtr_t ineq)
             HPP_MANIPULATION_DEPRECATED;
@@ -358,7 +358,7 @@ namespace hpp {
           /// The manifold represented the foliation is defined by this
           /// constraints.
           void insertConditionConstraint (const NumericalConstraintPtr_t& nm,
-              const SizeIntervals_t& passiveDofs = SizeIntervals_t ());
+              const segments_t& passiveDofs = segments_t ());
 
           /// Insert a LockedJoint that defines the foliation
           ///
diff --git a/include/hpp/manipulation/graph/fwd.hh b/include/hpp/manipulation/graph/fwd.hh
index c3ce4ef..6ec846d 100644
--- a/include/hpp/manipulation/graph/fwd.hh
+++ b/include/hpp/manipulation/graph/fwd.hh
@@ -57,8 +57,8 @@ namespace hpp {
       typedef hpp::core::Equality Equality;
       typedef hpp::core::ComparisonTypePtr_t ComparisonTypePtr_t;
       typedef hpp::core::DifferentiableFunctionPtr_t DifferentiableFunctionPtr_t;
-      typedef hpp::core::SizeIntervals_t SizeIntervals_t;
-      typedef std::vector <SizeIntervals_t> IntervalsContainer_t;
+      typedef hpp::core::segments_t segments_t;
+      typedef std::vector <segments_t> IntervalsContainer_t;
       typedef hpp::core::NumericalConstraints_t NumericalConstraints_t;
       typedef hpp::core::LockedJoints_t LockedJoints_t;
 
diff --git a/include/hpp/manipulation/graph/graph-component.hh b/include/hpp/manipulation/graph/graph-component.hh
index 8c2e2ab..b3425db 100644
--- a/include/hpp/manipulation/graph/graph-component.hh
+++ b/include/hpp/manipulation/graph/graph-component.hh
@@ -55,7 +55,7 @@ namespace hpp {
           //         for more information.
           virtual void addNumericalConstraint (
               const NumericalConstraintPtr_t& numConstraint,
-              const SizeIntervals_t& passiveDofs = SizeIntervals_t ());
+              const segments_t& passiveDofs = segments_t ());
 
           /// Add core::DifferentiableFunction to the component.
           virtual void addNumericalConstraint
diff --git a/include/hpp/manipulation/graph/state-selector.hh b/include/hpp/manipulation/graph/state-selector.hh
index fa560dc..995df7e 100644
--- a/include/hpp/manipulation/graph/state-selector.hh
+++ b/include/hpp/manipulation/graph/state-selector.hh
@@ -52,7 +52,7 @@ namespace hpp {
           /// Should never be called.
           void addNumericalConstraint (
               const core::NumericalConstraintPtr_t& /* function */,
-              const SizeIntervals_t& /* passiveDofs */ = SizeIntervals_t ())
+              const segments_t& /* passiveDofs */ = segments_t ())
           {
             HPP_THROW_EXCEPTION (Bad_function_call, "This component does not have constraints.");
           }
diff --git a/include/hpp/manipulation/graph/state.hh b/include/hpp/manipulation/graph/state.hh
index 5bb71b0..2a0c6fb 100644
--- a/include/hpp/manipulation/graph/state.hh
+++ b/include/hpp/manipulation/graph/state.hh
@@ -108,7 +108,7 @@ namespace hpp {
 
           /// Add core::NumericalConstraint to the component.
           virtual void addNumericalConstraintForPath (const NumericalConstraintPtr_t& nm,
-              const SizeIntervals_t& passiveDofs = SizeIntervals_t ())
+              const segments_t& passiveDofs = segments_t ())
           {
             numericalConstraintsForPath_.push_back (nm);
             passiveDofsForPath_.push_back (passiveDofs);
diff --git a/src/graph/edge.cc b/src/graph/edge.cc
index 711f686..a20080f 100644
--- a/src/graph/edge.cc
+++ b/src/graph/edge.cc
@@ -726,7 +726,7 @@ namespace hpp {
       }
 
       void LevelSetEdge::insertParamConstraint (const NumericalConstraintPtr_t& nm,
-              const SizeIntervals_t& passiveDofs)
+              const segments_t& passiveDofs)
       {
         paramNumericalConstraints_.push_back (nm);
         paramPassiveDofs_.push_back (passiveDofs);
@@ -743,7 +743,7 @@ namespace hpp {
       }
 
       void LevelSetEdge::insertConditionConstraint (const NumericalConstraintPtr_t& nm,
-              const SizeIntervals_t& passiveDofs)
+              const segments_t& passiveDofs)
       {
         condNumericalConstraints_.push_back (nm);
         condPassiveDofs_.push_back (passiveDofs);
diff --git a/src/graph/graph-component.cc b/src/graph/graph-component.cc
index 4e7e6c7..bce00dc 100644
--- a/src/graph/graph-component.cc
+++ b/src/graph/graph-component.cc
@@ -46,7 +46,7 @@ namespace hpp {
       }
 
       void GraphComponent::addNumericalConstraint (const NumericalConstraintPtr_t& nm,
-          const SizeIntervals_t& passiveDofs)
+          const segments_t& passiveDofs)
       {
         numericalConstraints_.push_back(nm);
         passiveDofs_.push_back (passiveDofs);
@@ -99,7 +99,7 @@ namespace hpp {
         return numericalConstraints_;
       }
 
-      const std::vector <SizeIntervals_t>& GraphComponent::passiveDofs() const
+      const std::vector <segments_t>& GraphComponent::passiveDofs() const
       {
         return passiveDofs_;
       }
diff --git a/src/graph/helper.cc b/src/graph/helper.cc
index 13762cd..fd48f6d 100644
--- a/src/graph/helper.cc
+++ b/src/graph/helper.cc
@@ -446,22 +446,22 @@ namespace hpp {
         {
           NumericalConstraintPtr_t gc  = handle->createGrasp (gripper);
           grasp.nc.nc.push_back (gc);
-          grasp.nc.pdof.push_back (SizeIntervals_t ());
+          grasp.nc.pdof.push_back (segments_t ());
           grasp.nc_path.nc.push_back (gc);
           // TODO: see function declaration
-          grasp.nc_path.pdof.push_back (SizeIntervals_t ());
+          grasp.nc_path.pdof.push_back (segments_t ());
           NumericalConstraintPtr_t gcc = handle->createGraspComplement (gripper);
           if (gcc->function ().outputSize () > 0) {
             grasp.nc_fol.nc.push_back (gcc);
-            grasp.nc_fol.pdof.push_back (SizeIntervals_t());
+            grasp.nc_fol.pdof.push_back (segments_t());
           }
 
           const value_type c = handle->clearance () + gripper->clearance ();
           NumericalConstraintPtr_t pgc = handle->createPreGrasp (gripper, c);
           pregrasp.nc.nc.push_back (pgc);
-          pregrasp.nc.pdof.push_back (SizeIntervals_t());
+          pregrasp.nc.pdof.push_back (segments_t());
           pregrasp.nc_path.nc.push_back (pgc);
-          pregrasp.nc_path.pdof.push_back (SizeIntervals_t());
+          pregrasp.nc_path.pdof.push_back (segments_t());
         }
 
         void strictPlacementManifold (
@@ -471,18 +471,18 @@ namespace hpp {
             FoliatedManifold& place, FoliatedManifold& preplace)
         {
           place.nc.nc.push_back (placement);
-          place.nc.pdof.push_back (SizeIntervals_t());
+          place.nc.pdof.push_back (segments_t());
           place.nc_path.nc.push_back (placement);
-          place.nc_path.pdof.push_back (SizeIntervals_t());
+          place.nc_path.pdof.push_back (segments_t());
           if (placementComplement && placementComplement->function().outputSize () > 0) {
             place.nc_fol.nc.push_back (placementComplement);
-            place.nc_fol.pdof.push_back (SizeIntervals_t());
+            place.nc_fol.pdof.push_back (segments_t());
           }
 
           preplace.nc.nc.push_back (preplacement);
-          preplace.nc.pdof.push_back (SizeIntervals_t());
+          preplace.nc.pdof.push_back (segments_t());
           preplace.nc_path.nc.push_back (preplacement);
-          preplace.nc_path.pdof.push_back (SizeIntervals_t());
+          preplace.nc_path.pdof.push_back (segments_t());
         }
 
         void relaxedPlacementManifold (
@@ -493,21 +493,21 @@ namespace hpp {
         {
           if (placement) {
             place.nc.nc.push_back (placement);
-            place.nc.pdof.push_back (SizeIntervals_t());
+            place.nc.pdof.push_back (segments_t());
             // The placement constraints are not required in the path, as long as
             // they are satisfied at both ends and the object does not move. The
             // former condition is ensured by the placement constraints on both
             // ends and the latter is ensure by the LockedJoint constraints.
             place.nc_path.nc.push_back (placement);
-            place.nc_path.pdof.push_back (SizeIntervals_t());
+            place.nc_path.pdof.push_back (segments_t());
           }
           std::copy (objectLocks.begin(), objectLocks.end(), std::back_inserter(place.lj_fol));
 
           if (placement && preplacement) {
             preplace.nc.nc.push_back (preplacement);
-            preplace.nc.pdof.push_back (SizeIntervals_t());
+            preplace.nc.pdof.push_back (segments_t());
             // preplace.nc_path.nc.push_back (preplacement);
-            // preplace.nc_path.pdof.push_back (SizeIntervals_t());
+            // preplace.nc_path.pdof.push_back (segments_t());
           }
         }
 
@@ -746,19 +746,19 @@ namespace hpp {
               boost::array<NumericalConstraintPtr_t,3>& gcs
                 = graspConstraint (iG, iOH);
               grasp.nc.nc.push_back (gcs[0]);
-              grasp.nc.pdof.push_back (SizeIntervals_t ());
+              grasp.nc.pdof.push_back (segments_t ());
               grasp.nc_path.nc.push_back (gcs[0]);
               // TODO: see function declaration
-              grasp.nc_path.pdof.push_back (SizeIntervals_t ());
+              grasp.nc_path.pdof.push_back (segments_t ());
               if (gcs[1]->function ().outputSize () > 0) {
                 grasp.nc_fol.nc.push_back (gcs[1]);
-                grasp.nc_fol.pdof.push_back (SizeIntervals_t());
+                grasp.nc_fol.pdof.push_back (segments_t());
               }
 
               pregrasp.nc.nc.push_back (gcs[2]);
-              pregrasp.nc.pdof.push_back (SizeIntervals_t());
+              pregrasp.nc.pdof.push_back (segments_t());
               pregrasp.nc_path.nc.push_back (gcs[2]);
-              pregrasp.nc_path.pdof.push_back (SizeIntervals_t());
+              pregrasp.nc_path.pdof.push_back (segments_t());
             }
           };
 
diff --git a/src/handle.cc b/src/handle.cc
index d7cd871..6d1edda 100644
--- a/src/handle.cc
+++ b/src/handle.cc
@@ -55,8 +55,6 @@ namespace hpp {
 
     using core::ExplicitNumericalConstraint;
     using constraints::DifferentiableFunction;
-    using core::SizeInterval_t;
-    using core::SizeIntervals_t;
 
     bool isHandleOnR3SO3 (const Handle& handle)
     {
-- 
GitLab