From 479005db1f54ce2d27ab14b2a7b239822259a4e4 Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Wed, 14 Jan 2015 12:01:17 +0100
Subject: [PATCH] Reorder header files

  The first included file should be the HH corresponding to the
CC to avoid missing headers in the HH file.
---
 include/hpp/manipulation/graph-steering-method.hh | 3 +++
 src/axial-handle.cc                               | 7 ++++++-
 src/graph-steering-method.cc                      | 3 ++-
 src/graph/edge.cc                                 | 3 ++-
 src/graph/graph.cc                                | 3 ++-
 src/graph/node-selector.cc                        | 4 ++--
 src/graph/node.cc                                 | 3 ++-
 src/handle.cc                                     | 9 +++++++--
 src/manipulation-planner.cc                       | 4 +++-
 src/path-projector.cc                             | 4 ++--
 src/problem-solver.cc                             | 6 ++++--
 src/roadmap.cc                                    | 4 ++--
 src/robot.cc                                      | 4 +++-
 13 files changed, 40 insertions(+), 17 deletions(-)

diff --git a/include/hpp/manipulation/graph-steering-method.hh b/include/hpp/manipulation/graph-steering-method.hh
index 688372ea..9f68f58e 100644
--- a/include/hpp/manipulation/graph-steering-method.hh
+++ b/include/hpp/manipulation/graph-steering-method.hh
@@ -18,11 +18,14 @@
 #ifndef HPP_MANIPULATION_GRAPH_STEERING_METHOD_HH
 # define HPP_MANIPULATION_GRAPH_STEERING_METHOD_HH
 
+# include <hpp/manipulation/config.hh>
+
 # include <hpp/core/steering-method.hh>
 # include <hpp/core/weighed-distance.hh>
 # include <hpp/model/device.hh>
 
 # include "hpp/manipulation/fwd.hh"
+# include "hpp/manipulation/graph/fwd.hh"
 
 namespace hpp {
   namespace manipulation {
diff --git a/src/axial-handle.cc b/src/axial-handle.cc
index e76bbc64..f261c444 100644
--- a/src/axial-handle.cc
+++ b/src/axial-handle.cc
@@ -17,12 +17,17 @@
 // hpp-manipulation. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include <hpp/manipulation/axial-handle.hh>
+
 #include <boost/assign/list_of.hpp>
+
 #include <hpp/fcl/math/transform.h>
+
 #include <hpp/model/joint.hh>
 #include <hpp/model/gripper.hh>
+
 #include <hpp/constraints/relative-transformation.hh>
-#include <hpp/manipulation/axial-handle.hh>
+
 #include <hpp/manipulation/robot.hh>
 
 namespace hpp {
diff --git a/src/graph-steering-method.cc b/src/graph-steering-method.cc
index 0098cb74..93c7cba9 100644
--- a/src/graph-steering-method.cc
+++ b/src/graph-steering-method.cc
@@ -14,11 +14,12 @@
 // received a copy of the GNU Lesser General Public License along with
 // hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
 
+#include "hpp/manipulation/graph-steering-method.hh"
+
 #include <hpp/core/straight-path.hh>
 
 #include "hpp/manipulation/graph/graph.hh"
 #include "hpp/manipulation/graph/edge.hh"
-#include "hpp/manipulation/graph-steering-method.hh"
 
 namespace hpp {
   namespace manipulation {
diff --git a/src/graph/edge.cc b/src/graph/edge.cc
index c0b2386a..22b65f80 100644
--- a/src/graph/edge.cc
+++ b/src/graph/edge.cc
@@ -14,6 +14,8 @@
 // received a copy of the GNU Lesser General Public License along with
 // hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
 
+#include "hpp/manipulation/graph/edge.hh"
+
 #include <sstream>
 
 #include <hpp/core/straight-path.hh>
@@ -24,7 +26,6 @@
 #include <hpp/util/pointer.hh>
 
 #include "hpp/manipulation/robot.hh"
-#include "hpp/manipulation/graph/edge.hh"
 #include "hpp/manipulation/graph/statistics.hh"
 
 namespace hpp {
diff --git a/src/graph/graph.cc b/src/graph/graph.cc
index 0e33c87d..d673280e 100644
--- a/src/graph/graph.cc
+++ b/src/graph/graph.cc
@@ -14,13 +14,14 @@
 // received a copy of the GNU Lesser General Public License along with
 // hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
 
+#include "hpp/manipulation/graph/graph.hh"
+
 #include <hpp/util/assertion.hh>
 
 #include "hpp/manipulation/robot.hh"
 #include "hpp/manipulation/graph/node-selector.hh"
 #include "hpp/manipulation/graph/node.hh"
 #include "hpp/manipulation/graph/edge.hh"
-#include "hpp/manipulation/graph/graph.hh"
 
 namespace hpp {
   namespace manipulation {
diff --git a/src/graph/node-selector.cc b/src/graph/node-selector.cc
index 82088236..def678fd 100644
--- a/src/graph/node-selector.cc
+++ b/src/graph/node-selector.cc
@@ -14,10 +14,10 @@
 // received a copy of the GNU Lesser General Public License along with
 // hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
 
-#include <cstdlib>
-
 #include "hpp/manipulation/graph/node-selector.hh"
 
+#include <cstdlib>
+
 namespace hpp {
   namespace manipulation {
     namespace graph {
diff --git a/src/graph/node.cc b/src/graph/node.cc
index 9c336b5c..e67f8e22 100644
--- a/src/graph/node.cc
+++ b/src/graph/node.cc
@@ -14,10 +14,11 @@
 // received a copy of the GNU Lesser General Public License along with
 // hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
 
+#include "hpp/manipulation/graph/node.hh"
+
 #include "hpp/manipulation/robot.hh"
 #include "hpp/manipulation/graph/edge.hh"
 #include "hpp/manipulation/graph/graph.hh"
-#include "hpp/manipulation/graph/node.hh"
 
 namespace hpp {
   namespace manipulation {
diff --git a/src/handle.cc b/src/handle.cc
index e0a2b531..b1e028e3 100644
--- a/src/handle.cc
+++ b/src/handle.cc
@@ -17,13 +17,18 @@
 // hpp-manipulation. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include <hpp/manipulation/handle.hh>
+
 #include <boost/assign/list_of.hpp>
+
 #include <hpp/fcl/math/transform.h>
+
 #include <hpp/model/joint.hh>
+#include <hpp/model/gripper.hh>
+
 #include <hpp/constraints/relative-position.hh>
 #include <hpp/constraints/relative-transformation.hh>
-#include <hpp/manipulation/handle.hh>
-#include <hpp/model/gripper.hh>
+
 #include <hpp/manipulation/robot.hh>
 
 namespace hpp {
diff --git a/src/manipulation-planner.cc b/src/manipulation-planner.cc
index 12f1f154..9bc05766 100644
--- a/src/manipulation-planner.cc
+++ b/src/manipulation-planner.cc
@@ -14,7 +14,10 @@
 // received a copy of the GNU Lesser General Public License along with
 // hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
 
+#include "hpp/manipulation/manipulation-planner.hh"
+
 #include <hpp/util/assertion.hh>
+
 #include <hpp/core/path-validation.hh>
 #include <hpp/core/connected-component.hh>
 
@@ -24,7 +27,6 @@
 #include "hpp/manipulation/path-projector.hh"
 #include "hpp/manipulation/path-projector/dichotomy.hh"
 #include "hpp/manipulation/path-projector/progressive.hh"
-#include "hpp/manipulation/manipulation-planner.hh"
 #include "hpp/manipulation/graph/edge.hh"
 
 namespace hpp {
diff --git a/src/path-projector.cc b/src/path-projector.cc
index d81d0b26..f2ec52d3 100644
--- a/src/path-projector.cc
+++ b/src/path-projector.cc
@@ -14,12 +14,12 @@
 // received a copy of the GNU Lesser General Public License along with
 // hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
 
+#include "hpp/manipulation/path-projector.hh"
+
 #include <hpp/util/pointer.hh>
 #include <hpp/core/path-vector.hh>
 #include <hpp/core/distance.hh>
 
-#include "hpp/manipulation/path-projector.hh"
-
 namespace hpp {
   namespace manipulation {
     PathProjector::PathProjector (const core::DistancePtr_t distance) :
diff --git a/src/problem-solver.cc b/src/problem-solver.cc
index 864ae8d4..c70949b2 100644
--- a/src/problem-solver.cc
+++ b/src/problem-solver.cc
@@ -15,9 +15,13 @@
 // hpp-manipulation-corba.  If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "hpp/manipulation/problem-solver.hh"
+
 #include <hpp/util/pointer.hh>
 #include <hpp/util/debug.hh>
+
 #include <hpp/model/gripper.hh>
+
 #include <hpp/core/roadmap.hh>
 
 #include "hpp/manipulation/object.hh"
@@ -27,8 +31,6 @@
 #include "hpp/manipulation/problem.hh"
 #include "hpp/manipulation/roadmap.hh"
 
-#include "hpp/manipulation/problem-solver.hh"
-
 namespace hpp {
   namespace manipulation {
     std::ostream& operator<< (std::ostream& os, const Robot& robot)
diff --git a/src/roadmap.cc b/src/roadmap.cc
index 6920d39e..f4b2ce8f 100644
--- a/src/roadmap.cc
+++ b/src/roadmap.cc
@@ -14,10 +14,10 @@
 // received a copy of the GNU Lesser General Public License along with
 // hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
 
-#include <hpp/util/pointer.hh>
-
 #include "hpp/manipulation/roadmap.hh"
 
+#include <hpp/util/pointer.hh>
+
 namespace hpp {
   namespace manipulation {
     Roadmap::Roadmap (const core::DistancePtr_t& distance, const core::DevicePtr_t& robot) :
diff --git a/src/robot.cc b/src/robot.cc
index 923823b4..fa38c796 100644
--- a/src/robot.cc
+++ b/src/robot.cc
@@ -17,12 +17,14 @@
 // hpp-manipulation. If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include "hpp/manipulation/handle.hh"
+
 #include <hpp/util/debug.hh>
+
 #include <hpp/model/gripper.hh>
 #include <hpp/model/object-factory.hh>
 
 #include "hpp/manipulation/fwd.hh"
-#include "hpp/manipulation/handle.hh"
 #include "hpp/manipulation/object.hh"
 #include "hpp/manipulation/robot.hh"
 
-- 
GitLab