$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
adj_lower_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_LOWER_FACE_ITER_HH
28 # define MLN_TOPO_ADJ_LOWER_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 declarations.
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 namespace mln::topo::internal
58 
59  template <unsigned D>
60  class algebraic_face;
61 
62 
63  /*-----------------------------------.
64  | topo::adj_lower_face_fwd_iter<D>. |
65  `-----------------------------------*/
66 
74  template <unsigned D>
77  algebraic_face<D>,
78  adj_lower_face_fwd_iter<D> >
79  {
80  // Tech note: we use topo::face to help g++-2.95.
81  private:
85  self_ > super_;
86 
87  public:
91  template <typename Fref>
92  adj_lower_face_fwd_iter(const Fref& f_ref);
94 
96  void update_adj_faces_();
97  };
98 
99 
100  /*-----------------------------------.
101  | topo::adj_lower_face_bkd_iter<D>. |
102  `-----------------------------------*/
103 
111  template <unsigned D>
114  algebraic_face<D>,
115  adj_lower_face_bkd_iter<D> >
116  {
117  // Tech note: we use topo::face to help g++-2.95.
118  private:
122  self_ > super_;
123  public:
127  template <typename Fref>
128  adj_lower_face_bkd_iter(const Fref& f_ref);
130 
132  void update_adj_faces_();
133  };
134 
135 
136 
137 # ifndef MLN_INCLUDE_ONLY
138 
139  /*-----------------------------------.
140  | topo::adj_lower_face_fwd_iter<D>. |
141  `-----------------------------------*/
142 
143  template <unsigned D>
144  inline
146  {
147  }
148 
149  template <unsigned D>
150  template <typename Fref>
151  inline
153  : super_(f_ref)
154  {
155  }
156 
157  template <unsigned D>
158  inline
159  void
161  {
162  mln_precondition(this->c_);
163  this->adj_faces_ = this->c_->lower_dim_adj_faces();
164  }
165 
166 
167  /*-----------------------------------.
168  | topo::adj_lower_face_bkd_iter<D>. |
169  `-----------------------------------*/
170 
171  template <unsigned D>
172  inline
174  {
175  }
176 
177  template <unsigned D>
178  template <typename Fref>
179  inline
181  : super_(f_ref)
182  {
183  }
184 
185  template <unsigned D>
186  inline
187  void
189  {
190  mln_precondition(this->c_);
191  this->adj_faces_ = this->c_->lower_dim_adj_faces();
192  }
193 
194 # endif // ! MLN_INCLUDE_ONLY
195 
196  } // end of namespace mln::topo
197 
198 } // end of namespace mln
199 
200 #endif // ! MLN_TOPO_ADJ_LOWER_FACE_ITER_HH