* mln/core/alias/dpoint1d.hh,
* mln/core/alias/dpoint2d.hh,
* mln/core/alias/dpoint3d.hh: Split declaration and reference to
global variables.
* tests/all_headers.cc,
* tests/global_vars1.cc,
* tests/global_vars2.cc: update tests. Include essential headers.
* mln/core/all.hh,
* mln/core/site_set/p_line2d.hh,
* mln/transform/essential.hh,
* mln/transform/influence_zone_geodesic.hh: cleanup.
---
milena/ChangeLog | 18 +++++++++++
milena/mln/core/alias/dpoint1d.hh | 36 +++++++++++++--------
milena/mln/core/alias/dpoint2d.hh | 38 +++++++++++++---------
milena/mln/core/alias/dpoint3d.hh | 38 ++++++++++++++---------
milena/mln/core/all.hh | 12 +++----
milena/mln/core/site_set/p_line2d.hh | 14 +++-----
milena/mln/transform/essential.hh | 7 ++--
milena/mln/transform/influence_zone_geodesic.hh | 2 +-
milena/tests/all_headers.cc | 12 ++++---
milena/tests/global_vars1.cc | 4 ++
milena/tests/global_vars2.cc | 4 ++
11 files changed, 115 insertions(+), 70 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 813df7d..428323d 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,23 @@
2008-11-18 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Fix wrong declaration of global variables.
+
+ * mln/core/alias/dpoint1d.hh,
+ * mln/core/alias/dpoint2d.hh,
+ * mln/core/alias/dpoint3d.hh: Split declaration and reference to
+ global variables.
+
+ * tests/all_headers.cc,
+ * tests/global_vars1.cc,
+ * tests/global_vars2.cc: update tests. Include essential headers.
+
+ * mln/core/all.hh,
+ * mln/core/site_set/p_line2d.hh,
+ * mln/transform/essential.hh,
+ * mln/transform/influence_zone_geodesic.hh: cleanup.
+
+2008-11-18 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Update graph related classes.
* mln/accu/center.hh: New accu.
diff --git a/milena/mln/core/alias/dpoint1d.hh b/milena/mln/core/alias/dpoint1d.hh
index 997fd36..c15967b 100644
--- a/milena/mln/core/alias/dpoint1d.hh
+++ b/milena/mln/core/alias/dpoint1d.hh
@@ -29,11 +29,10 @@
#ifndef MLN_CORE_ALIAS_DPOINT1D_HH
# define MLN_CORE_ALIAS_DPOINT1D_HH
-/*! \file mln/core/alias/dpoint1d.hh
- *
- * \brief Definition of the mln::dpoint1d alias and of its
- * construction routine.
- */
+/// \file mln/core/alias/dpoint1d.hh
+///
+/// Definition of the mln::dpoint1d alias and of its
+/// construction routine.
# include <mln/core/dpoint.hh>
# include <mln/core/grids.hh>
@@ -43,9 +42,8 @@
namespace mln
{
- /*! \brief Type alias for a delta-point defined on the 1D square
- * grid with integer coordinates.
- */
+ /// Type alias for a delta-point defined on the 1D square
+ /// grid with integer coordinates.
typedef dpoint<mln::grid::tick, def::coord> dpoint1d;
@@ -58,10 +56,20 @@ namespace mln
namespace mln
{
- /*!
- * \brief Definition of a shortcut for delta point in 1d.
- * \{
- */
+ /// Definition of a shortcut for delta point in 1d.
+ /// \{
+
+ extern const dpoint1d before;
+ extern const dpoint1d after;
+
+ extern const dpoint1d ind_dec;
+ extern const dpoint1d ind_inc;
+
+ /// \}
+
+
+
+# ifndef MLN_INCLUDE_ONLY
const dpoint1d before = dpoint1d( -1 );
const dpoint1d after = dpoint1d( +1 );
@@ -69,8 +77,8 @@ namespace mln
const dpoint1d ind_dec = before;
const dpoint1d ind_inc = after;
- /*! \}
- */
+# endif // ! MLN_INCLUDE_ONLY
+
} // end of namespace mln
diff --git a/milena/mln/core/alias/dpoint2d.hh b/milena/mln/core/alias/dpoint2d.hh
index c14a8f0..c7dc880 100644
--- a/milena/mln/core/alias/dpoint2d.hh
+++ b/milena/mln/core/alias/dpoint2d.hh
@@ -29,11 +29,10 @@
#ifndef MLN_CORE_ALIAS_DPOINT2D_HH
# define MLN_CORE_ALIAS_DPOINT2D_HH
-/*! \file mln/core/alias/dpoint2d.hh
- *
- * \brief Definition of the mln::dpoint2d alias and of its
- * construction routine.
- */
+/// \file mln/core/alias/dpoint2d.hh
+///
+/// Definition of the mln::dpoint2d alias and of its
+/// construction routine.
# include <mln/core/dpoint.hh>
# include <mln/core/def/coord.hh>
@@ -42,9 +41,8 @@
namespace mln
{
- /*! \brief Type alias for a delta-point defined on the 2D square
- * grid with integer coordinates.
- */
+ /// Type alias for a delta-point defined on the 2D square
+ /// grid with integer coordinates.
typedef dpoint<mln::grid::square, def::coord> dpoint2d;
@@ -53,22 +51,30 @@ namespace mln
# include <mln/core/alias/point2d.hh>
-
namespace mln
{
- /*!
- * \brief Definition of a shortcut for delta point in 2d.
- * \{
- */
+ /// Definition of a shortcut for delta point in 2d.
+ /// \{
+
+ extern const dpoint2d up;
+ extern const dpoint2d down;
+ extern const dpoint2d left;
+ extern const dpoint2d right;
+
+ /// \}
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
const dpoint2d up = dpoint2d( -1, 0 );
const dpoint2d down = dpoint2d( +1, 0 );
const dpoint2d left = dpoint2d( 0, -1 );
const dpoint2d right = dpoint2d( 0, +1 );
- /*!
- * \}
- */
+# endif // ! MLN_INCLUDE_ONLY
+
} // end of namespace mln
diff --git a/milena/mln/core/alias/dpoint3d.hh b/milena/mln/core/alias/dpoint3d.hh
index b9140ac..b96a8b9 100644
--- a/milena/mln/core/alias/dpoint3d.hh
+++ b/milena/mln/core/alias/dpoint3d.hh
@@ -29,11 +29,10 @@
#ifndef MLN_CORE_ALIAS_DPOINT3D_HH
# define MLN_CORE_ALIAS_DPOINT3D_HH
-/*! \file mln/core/alias/dpoint3d.hh
- *
- * \brief Definition of the mln::dpoint3d alias and of its
- * construction routine.
- */
+/// \file mln/core/alias/dpoint3d.hh
+///
+/// Definition of the mln::dpoint3d alias and of its
+/// construction routine.
# include <mln/core/dpoint.hh>
# include <mln/core/grids.hh>
@@ -42,9 +41,8 @@
namespace mln
{
- /*! \brief Type alias for a delta-point defined on the 3D square
- * grid with integer coordinates.
- */
+ /// Type alias for a delta-point defined on the 3D square
+ /// grid with integer coordinates.
typedef dpoint<mln::grid::cube, def::coord> dpoint3d;
@@ -57,10 +55,21 @@ namespace mln
namespace mln
{
- /*!
- * \brief Definition of a shortcut for delta point in 3d.
- * \{
- */
+ /// Definition of a shortcut for delta point in 3d.
+ /// \{
+
+ extern const dpoint3d sagittal_dec;
+ extern const dpoint3d sagittal_inc;
+ extern const dpoint3d axial_dec;
+ extern const dpoint3d axial_inc;
+ extern const dpoint3d coronal_dec;
+ extern const dpoint3d coronal_inc;
+
+ /// \}
+
+
+# ifndef MLN_INCLUDE_ONLY
+
const dpoint3d sagittal_dec = dpoint3d( 0, 0, -1);
const dpoint3d sagittal_inc = dpoint3d( 0, 0, +1);
const dpoint3d axial_dec = dpoint3d( 0, -1, 0);
@@ -68,9 +77,8 @@ namespace mln
const dpoint3d coronal_dec = dpoint3d(-1, 0, 0);
const dpoint3d coronal_inc = dpoint3d(+1, 0, 0);
- /*!
- * \}
- */
+# endif // ! MLN_INCLUDE_ONLY
+
} // end of namespace mln
diff --git a/milena/mln/core/all.hh b/milena/mln/core/all.hh
index a9c177c..f20314a 100644
--- a/milena/mln/core/all.hh
+++ b/milena/mln/core/all.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,11 +28,9 @@
#ifndef MLN_CORE_ALL_HH_
# define MLN_CORE_ALL_HH_
-/*! \file mln/core/all.hh
- *
- * \brief File that includes all the core routines.
- *
- */
+/// \file mln/core/all.hh
+///
+/// File that includes all the core routines.
# include <mln/core/a_point_of.hh>
# include <mln/core/category.hh>
@@ -63,5 +61,5 @@
# include <mln/core/routine/all.hh>
# include <mln/core/site_set/all.hh>
-#endif // !MLN_CORE_ALL_HH_
+#endif // ! MLN_CORE_ALL_HH_
diff --git a/milena/mln/core/site_set/p_line2d.hh b/milena/mln/core/site_set/p_line2d.hh
index 9ad9549..f521e3a 100644
--- a/milena/mln/core/site_set/p_line2d.hh
+++ b/milena/mln/core/site_set/p_line2d.hh
@@ -28,11 +28,10 @@
#ifndef MLN_CORE_P_LINE2D_HH
# define MLN_CORE_P_LINE2D_HH
-/*! \file mln/core/site_set/p_line2d.hh
- *
- * \brief Definition of a 2D discrete line of points (based on
- * p_array).
- */
+/// \file mln/core/site_set/p_line2d.hh
+///
+/// Definition of a 2D discrete line of points (based on
+/// p_array).
# include <mln/core/site_set/p_array.hh>
# include <mln/core/alias/box2d.hh>
@@ -70,8 +69,7 @@ namespace mln
- /*! \brief 2D line point set class.
- */
+ /// 2D line point set class.
class p_line2d : public internal::site_set_base_< point2d, p_line2d >
{
typedef p_line2d self_;
@@ -136,7 +134,7 @@ namespace mln
/// Return the corresponding std::vector of points.
const std::vector<point2d>& std_vector() const;
-
+
protected:
p_array<point2d> arr_;
diff --git a/milena/mln/transform/essential.hh b/milena/mln/transform/essential.hh
index c6cc5f1..6d22fba 100644
--- a/milena/mln/transform/essential.hh
+++ b/milena/mln/transform/essential.hh
@@ -28,10 +28,9 @@
#ifndef MLN_TRANSFORM_ESSENTIAL_HH
# define MLN_TRANSFORM_ESSENTIAL_HH
-/*! \file mln/transform/essential.hh
- *
- * \brief File that includes essential "point-wise" expression tools.
- */
+/// \file mln/transform/essential.hh
+///
+/// File that includes essential "point-wise" expression tools.
// NOTHING YET
diff --git a/milena/mln/transform/influence_zone_geodesic.hh
b/milena/mln/transform/influence_zone_geodesic.hh
index c63e1fa..cf3a7df 100644
--- a/milena/mln/transform/influence_zone_geodesic.hh
+++ b/milena/mln/transform/influence_zone_geodesic.hh
@@ -49,7 +49,7 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
-
+
namespace internal
{
diff --git a/milena/tests/all_headers.cc b/milena/tests/all_headers.cc
index b84a0b8..34da33b 100644
--- a/milena/tests/all_headers.cc
+++ b/milena/tests/all_headers.cc
@@ -1,4 +1,5 @@
// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/all_headers.cc
- *
- * \brief Tests with all headers. (check norris tests)
- */
+/// \file tests/all_headers.cc
+///
+/// Tests with all headers. (check norris tests)
#include <mln/util/all.hh>
#include <mln/fun/p2v/all.hh>
@@ -94,7 +94,9 @@
#include <mln/tag/all.hh>
#include <mln/labeling/all.hh>
-
+#include <mln/essential/1d.hh>
+#include <mln/essential/2d.hh>
+#include <mln/essential/3d.hh>
int main ()
{
diff --git a/milena/tests/global_vars1.cc b/milena/tests/global_vars1.cc
index f41407d..c36f76f 100644
--- a/milena/tests/global_vars1.cc
+++ b/milena/tests/global_vars1.cc
@@ -93,6 +93,10 @@
#include <mln/tag/all.hh>
#include <mln/labeling/all.hh>
+#include <mln/essential/1d.hh>
+#include <mln/essential/2d.hh>
+#include <mln/essential/3d.hh>
+
int f1();
int main ()
diff --git a/milena/tests/global_vars2.cc b/milena/tests/global_vars2.cc
index a3b93a6..b9d94eb 100644
--- a/milena/tests/global_vars2.cc
+++ b/milena/tests/global_vars2.cc
@@ -95,6 +95,10 @@
#include <mln/tag/all.hh>
#include <mln/labeling/all.hh>
+#include <mln/essential/1d.hh>
+#include <mln/essential/2d.hh>
+#include <mln/essential/3d.hh>
+
int f1 ()
{
return 0;
--
1.5.6.5