https://svn.lrde.epita.fr/svn/oln/trunk/olena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Fix oln/core/iterator_vtypes.hh w.r.t. backward niters.
* oln/core/iterator_vtypes.hh (oln::bkd_niter_neighb_): New
forward declaration.
(single_vtype<morpher::add_neighborhood<Image, Neighb>,
typedef_::bkd_niter_type >): Fix ret.
Add comments.
Aesthetic changes.
* oln/morpher/add_neighborhood.hh
(oln/core/gen/bkd_niter_neighb.hh): Include it.
core/iterator_vtypes.hh | 64 +++++++++++++++++++++++++++++++++++++-------
morpher/add_neighborhood.hh | 1
2 files changed, 56 insertions(+), 9 deletions(-)
Index: oln/core/iterator_vtypes.hh
--- oln/core/iterator_vtypes.hh (revision 639)
+++ oln/core/iterator_vtypes.hh (working copy)
@@ -42,8 +42,12 @@
| oln::image1d<T>. |
`------------------*/
+ // Forward declaration.
template <typename T> class image1d;
+
+ /// piters.
+
/// fwd_piter vtype of image1d.
template <typename T>
struct single_vtype< image1d<T>, typedef_::fwd_piter_type >
@@ -59,6 +63,8 @@
};
+ /// qiters.
+
/// fwd_qiter vtype of image1d.
template <typename T>
struct single_vtype< image1d<T>, typedef_::fwd_qiter_type >
@@ -78,8 +84,12 @@
| oln::image2d<T>. |
`------------------*/
+ // Forward declaration.
template <typename T> class image2d;
+
+ // piters.
+
/// fwd_piter vtype of image2d.
template <typename T>
struct single_vtype< image2d<T>, typedef_::fwd_piter_type >
@@ -95,6 +105,8 @@
};
+ // qiters.
+
/// fwd_qiter vtype of image2d.
template <typename T>
struct single_vtype< image2d<T>, typedef_::fwd_qiter_type >
@@ -114,8 +126,12 @@
| oln::image3d<T>. |
`------------------*/
+ // Forward declaration.
template <typename T> class image3d;
+
+ // piters.
+
/// fwd_piter vtype of image3d.
template <typename T>
struct single_vtype< image3d<T>, typedef_::fwd_piter_type >
@@ -131,6 +147,8 @@
};
+ // qiters.
+
/// fwd_qiter vtype of image3d.
template <typename T>
struct single_vtype< image3d<T>, typedef_::fwd_qiter_type >
@@ -150,46 +168,65 @@
| oln::morpher::add_isubset<Image, Isubset>. |
`--------------------------------------------*/
+ // Forward declarations.
namespace morpher {
template <typename Image, typename Isubset> struct add_isubset;
}
template <typename piter_t, typename isubset_t> class piter_isubset_;
+ // piters.
+
+ /// fwd_piter vtype on morpher::add_isubset.
template <typename Image, typename Isubset>
- struct single_vtype< morpher::add_isubset<Image, Isubset>,
typedef_::fwd_piter_type >
+ struct single_vtype< morpher::add_isubset<Image, Isubset>,
+ typedef_::fwd_piter_type >
{
typedef piter_isubset_<oln_type_of(Image, fwd_piter), Isubset> ret;
};
+ /// bkd_piter vtype on morpher::add_isubset.
template <typename Image, typename Isubset>
- struct single_vtype< morpher::add_isubset<Image, Isubset>,
typedef_::bkd_piter_type >
+ struct single_vtype< morpher::add_isubset<Image, Isubset>,
+ typedef_::bkd_piter_type >
{
typedef piter_isubset_<oln_type_of(Image, bkd_piter), Isubset> ret;
};
+ // qiters.
+
+ /// fwd_qiter vtype on morpher::add_isubset.
template <typename Image, typename Isubset>
- struct single_vtype< morpher::add_isubset<Image, Isubset>,
typedef_::fwd_qiter_type >
+ struct single_vtype< morpher::add_isubset<Image, Isubset>,
+ typedef_::fwd_qiter_type >
{
typedef piter_isubset_<oln_type_of(Image, fwd_qiter), Isubset> ret;
};
+ /// bkd_qiter vtype on morpher::add_isubset.
template <typename Image, typename Isubset>
- struct single_vtype< morpher::add_isubset<Image, Isubset>,
typedef_::bkd_qiter_type >
+ struct single_vtype< morpher::add_isubset<Image, Isubset>,
+ typedef_::bkd_qiter_type >
{
typedef piter_isubset_<oln_type_of(Image, bkd_qiter), Isubset> ret;
};
+ // niters.
+
+ /// fwd_niter vtype on morpher::add_isubset.
template <typename Image, typename Isubset>
- struct single_vtype< morpher::add_isubset<Image, Isubset>,
typedef_::fwd_niter_type >
+ struct single_vtype< morpher::add_isubset<Image, Isubset>,
+ typedef_::fwd_niter_type >
{
typedef piter_isubset_<oln_type_of(Image, fwd_niter), Isubset> ret;
};
+ /// bkd_niter vtype on morpher::add_isubset.
template <typename Image, typename Isubset>
- struct single_vtype< morpher::add_isubset<Image, Isubset>,
typedef_::bkd_niter_type >
+ struct single_vtype< morpher::add_isubset<Image, Isubset>,
+ typedef_::bkd_niter_type >
{
typedef piter_isubset_<oln_type_of(Image, bkd_niter), Isubset> ret;
};
@@ -199,13 +236,20 @@
| oln::morpher::add_neighborhood<Image, Isubset>. |
`-------------------------------------------------*/
+ // Forward declarations.
namespace morpher {
template <typename Image, typename Neighb> struct add_neighborhood;
}
template <typename point_t> class fwd_niter_neighb_;
+ template <typename point_t> class bkd_niter_neighb_;
+
+
+ // qiters.
+ /// fwd_niter vtype of morpher::add_neighborhood.
template <typename Image, typename Neighb>
- struct single_vtype< morpher::add_neighborhood<Image, Neighb>,
typedef_::fwd_niter_type >
+ struct single_vtype< morpher::add_neighborhood<Image, Neighb>,
+ typedef_::fwd_niter_type >
{
private:
typedef oln_type_of(Image, point) point_t;
@@ -213,13 +257,15 @@
typedef fwd_niter_neighb_<point_t> ret;
};
+ /// bkd_niter vtype of morpher::add_neighborhood.
template <typename Image, typename Neighb>
- struct single_vtype< morpher::add_neighborhood<Image, Neighb>,
typedef_::bkd_niter_type >
+ struct single_vtype< morpher::add_neighborhood<Image, Neighb>,
+ typedef_::bkd_niter_type >
{
private:
typedef oln_type_of(Image, point) point_t;
public:
- typedef fwd_niter_neighb_<point_t> ret; // FIXME: should be bkd but not yet
impled!
+ typedef bkd_niter_neighb_<point_t> ret;
};
Index: oln/morpher/add_neighborhood.hh
--- oln/morpher/add_neighborhood.hh (revision 639)
+++ oln/morpher/add_neighborhood.hh (working copy)
@@ -32,6 +32,7 @@
# include <oln/core/gen/topo_add_nbh.hh>
# include <oln/core/iterator_vtypes.hh>
# include <oln/core/gen/fwd_niter_neighb.hh>
+# include <oln/core/gen/bkd_niter_neighb.hh>
namespace oln