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 #ifndef MLN_TOPO_CENTER_ONLY_ITER_HH
00027 # define MLN_TOPO_CENTER_ONLY_ITER_HH
00028 
00035 
00036 # include <mln/topo/internal/complex_relative_iterator_base.hh>
00037 # include <mln/topo/face.hh>
00038 
00039 
00040 namespace mln
00041 {
00042 
00043   namespace topo
00044   {
00045 
00046     
00047     template <unsigned D> class face;
00048 
00049 
00050     
00051 
00052 
00053 
00072     template <unsigned D>
00073     class center_only_iter
00074       : public internal::forward_complex_relative_iterator_base< topo::face<D>,
00075                                                                  algebraic_face<D>,
00076                                                                  center_only_iter<D> >
00077     {
00078       
00079     private:
00080       typedef center_only_iter<D> self_;
00081       typedef internal::forward_complex_relative_iterator_base< topo::face<D>,
00082                                                                 algebraic_face<D>,
00083                                                                 self_ > super_;
00084 
00085     public:
00088       center_only_iter();
00089       template <typename Fref>
00090       center_only_iter(const Fref& f_ref);
00092 
00094       void update_adj_faces_();
00095     };
00096 
00097 
00098 
00099 # ifndef MLN_INCLUDE_ONLY
00100 
00101     
00102 
00103 
00104 
00105     template <unsigned D>
00106     inline
00107     center_only_iter<D>::center_only_iter()
00108     {
00109     }
00110 
00111     template <unsigned D>
00112     template <typename Fref>
00113     inline
00114     center_only_iter<D>::center_only_iter(const Fref& f_ref)
00115       : super_(f_ref)
00116     {
00117     }
00118 
00119     template <unsigned D>
00120     inline
00121     void
00122     center_only_iter<D>::update_adj_faces_()
00123     {
00124       mln_precondition(this->c_);
00125       this->adj_faces_.clear();
00126       this->adj_faces_.push_back(make_algebraic_face(*this->c_, true));
00127     }
00128 
00129 # endif // ! MLN_INCLUDE_ONLY
00130 
00131   } 
00132 
00133 } 
00134 
00135 #endif // ! MLN_TOPO_CENTER_ONLY_ITER_HH