00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef OLENA_TOPO_INTER_PIXEL_FWD_DIR_ITER_HH
00030 # define OLENA_TOPO_INTER_PIXEL_FWD_DIR_ITER_HH
00031
00032 # include <oln/core/abstract/iter.hh>
00033 # include <oln/topo/inter-pixel/internal/dir-iter.hh>
00034
00035 namespace oln {
00036
00037 namespace topo {
00038
00039 namespace inter_pixel {
00040 template<unsigned Dim, class Exact = mlc::final>
00041 class fwd_dir_iter;
00042 }
00043
00044 }
00045
00046 template<unsigned Dim, class Exact>
00047 struct iter_traits<topo::inter_pixel::fwd_dir_iter<Dim, Exact> >
00048 : public iter_traits<topo::inter_pixel::internal::dir_iter_<Dim, typename
00049 mlc::exact_vt<topo::inter_pixel::fwd_dir_iter<Dim, Exact>, Exact>::ret> >
00050 {
00051
00052 };
00053
00054 namespace topo {
00055
00056 namespace inter_pixel {
00058 template<unsigned Dim, class Exact>
00059 class fwd_dir_iter
00060 : public internal::dir_iter_<Dim, typename mlc::exact_vt<fwd_dir_iter<Dim, Exact>, Exact>::ret>
00061 {
00062 private:
00063 typedef internal::dir_iter_<Dim, typename mlc::exact_vt<fwd_dir_iter<Dim, Exact>, Exact>::ret> super;
00064 typedef typename super::dir_type dir_type;
00065
00066 public:
00067 fwd_dir_iter() : super(), begin_(internal::dir_traits<Dim>::first()) {}
00068 fwd_dir_iter(dir_type i) : super(i), begin_(i) {}
00069
00074 template<class U>
00075 U
00076 operator=(U u)
00077 {
00078 return super::operator=(u);
00079 }
00080
00082 dir_type
00083 next()
00084 {
00085 return internal::dir_traits<Dim>::next(this->cur_);
00086 }
00087
00089 dir_type
00090 begin()
00091 {
00092 return begin_;
00093 }
00094
00095 private:
00096 dir_type begin_;
00097 };
00099 # define oln_fwd_dir_iter_type(ImgType) \
00100 oln::topo::inter_pixel::fwd_dir_iter< ImgType::dim >
00101
00102 }
00103
00104 }
00105
00106 }
00107
00108 #endif // ! OLENA_TOPO_INTER_PIXEL_FWD_DIR_ITER_HH