$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
adj_higher_face_iter.hh
1 // Copyright (C) 2008, 2009, 2010, 2012 EPITA Research and Development
2 // Laboratory (LRDE)
3 //
4 // This file is part of Olena.
5 //
6 // Olena is free software: you can redistribute it and/or modify it under
7 // the terms of the GNU General Public License as published by the Free
8 // Software Foundation, version 2 of the License.
9 //
10 // Olena is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with Olena. If not, see <http://www.gnu.org/licenses/>.
17 //
18 // As a special exception, you may use this file as part of a free
19 // software project without restriction. Specifically, if other files
20 // instantiate templates or use macros or inline functions from this
21 // file, or you compile this file and link it with other files to produce
22 // an executable, this file does not by itself cause the resulting
23 // executable to be covered by the GNU General Public License. This
24 // exception does not however invalidate any other reasons why the
25 // executable file might be covered by the GNU General Public License.
26 
27 #ifndef MLN_TOPO_ADJ_HIGHER_FACE_ITER_HH
28 # define MLN_TOPO_ADJ_HIGHER_FACE_ITER_HH
29 
34 
35 # include <mln/topo/internal/complex_relative_iterator_base.hh>
36 # include <mln/topo/algebraic_face.hh>
37 
38 
39 namespace mln
40 {
41 
42  namespace topo
43  {
44 
45  // Forward declaration.
46  template <unsigned D> class complex;
47 
48  namespace internal
49  {
50 
51  template <typename C, typename F, typename E>
52  class forward_complex_relative_iterator_base;
53 
54  template <typename C, typename F, typename E>
55  class backward_complex_relative_iterator_base;
56 
57  } // end of mln::topo::internal
58 
59  template <unsigned D>
60  class algebraic_face;
61 
62  /*------------------------------------.
63  | topo::adj_higher_face_fwd_iter<D>. |
64  `------------------------------------*/
65 
73  template <unsigned D>
76  algebraic_face<D>,
77  adj_higher_face_fwd_iter<D> >
78  {
82  self_ > super_;
83  // Tech note: we use topo::face to help g++-2.95.
84 
85  public:
89  template <typename Fref>
90  adj_higher_face_fwd_iter(const Fref& f_ref);
92 
94  void update_adj_faces_();
95  };
96 
97 
98  /*------------------------------------.
99  | topo::adj_higher_face_bkd_iter<D>. |
100  `------------------------------------*/
101 
109  template <unsigned D>
112  algebraic_face<D>,
113  adj_higher_face_bkd_iter<D> >
114  {
118  self_ > super_;
119  // Tech note: we use topo::face to help g++-2.95.
120 
121  public:
125  template <typename Fref>
126  adj_higher_face_bkd_iter(const Fref& f_ref);
128 
130  void update_adj_faces_();
131  };
132 
133 
134 
135 # ifndef MLN_INCLUDE_ONLY
136 
137  /*------------------------------------.
138  | topo::adj_higher_face_fwd_iter<D>. |
139  `------------------------------------*/
140 
141  template <unsigned D>
142  inline
144  {
145  }
146 
147  template <unsigned D>
148  template <typename Fref>
149  inline
151  : super_(f_ref)
152  {
153  }
154 
155  template <unsigned D>
156  inline
157  void
159  {
160  mln_precondition(this->c_);
161  this->adj_faces_ = this->c_->higher_dim_adj_faces();
162  }
163 
164 
165  /*------------------------------------.
166  | topo::adj_higher_face_bkd_iter<D>. |
167  `------------------------------------*/
168 
169  template <unsigned D>
170  inline
172  {
173  }
174 
175  template <unsigned D>
176  template <typename Fref>
177  inline
179  : super_(f_ref)
180  {
181  }
182 
183  template <unsigned D>
184  inline
185  void
187  {
188  mln_precondition(this->c_);
189  this->adj_faces_ = this->c_->higher_dim_adj_faces();
190  }
191 
192 # endif // ! MLN_INCLUDE_ONLY
193 
194  } // end of namespace mln::topo
195 
196 } // end of namespace mln
197 
198 #endif // ! MLN_TOPO_ADJ_HIGHER_FACE_ITER_HH