Milena (Olena)  User documentation 2.0a Id
 All Classes Namespaces Functions Variables Typedefs Enumerator Groups Pages
p_faces_piter.hh
1 // Copyright (C) 2008, 2009, 2011 EPITA Research and Development Laboratory (LRDE)
2 //
3 // This file is part of Olena.
4 //
5 // Olena is free software: you can redistribute it and/or modify it under
6 // the terms of the GNU General Public License as published by the Free
7 // Software Foundation, version 2 of the License.
8 //
9 // Olena is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with Olena. If not, see <http://www.gnu.org/licenses/>.
16 //
17 // As a special exception, you may use this file as part of a free
18 // software project without restriction. Specifically, if other files
19 // instantiate templates or use macros or inline functions from this
20 // file, or you compile this file and link it with other files to produce
21 // an executable, this file does not by itself cause the resulting
22 // executable to be covered by the GNU General Public License. This
23 // exception does not however invalidate any other reasons why the
24 // executable file might be covered by the GNU General Public License.
25 
26 #ifndef MLN_CORE_SITE_SET_ATTIC_P_FACES_PITER_HH
27 # define MLN_CORE_SITE_SET_ATTIC_P_FACES_PITER_HH
28 
34 
35 # include <mln/core/site_set/p_faces.hh>
36 # include <mln/core/internal/p_complex_piter_base.hh>
37 # include <mln/topo/attic/faces_iter.hh>
38 
39 
40 namespace mln
41 {
42 
43  // Forward declarations.
44  template <unsigned N, unsigned D, typename P> struct p_faces;
45 
46  template <unsigned N, unsigned D> class faces_fwd_iter_;
47  template <unsigned N, unsigned D> class faces_bkd_iter_;
48 
49 
50  /*------------------------------.
51  | p_faces_fwd_piter_<N, D, P>. |
52  `------------------------------*/
53 
56  template <unsigned N, unsigned D, typename P>
57  class p_faces_fwd_piter_
58  : public internal::p_complex_piter_base_< topo::faces_fwd_iter_<N, D>,
59  p_faces<N, D, P>,
60  P,
61  p_faces_fwd_piter_<N, D, P> >
62  {
63  typedef p_faces_fwd_piter_<N, D, P> self_;
64  typedef internal::p_complex_piter_base_< topo::faces_fwd_iter_<N, D>,
65  p_faces<N, D, P>,
66  P,
67  self_ > super_;
68 
69  public:
72  p_faces_fwd_piter_();
73  p_faces_fwd_piter_(const p_faces<N, D, P>& pc);
75  };
76 
77 
78  /*------------------------------.
79  | p_faces_bkd_piter_<N, D, P>. |
80  `------------------------------*/
81 
84  template <unsigned N, unsigned D, typename P>
85  class p_faces_bkd_piter_
86  /* FIXME: Rename internal::p_complex_piter_base_ to something else,
87  as it is also used for p_faces piters! */
88  : public internal::p_complex_piter_base_< topo::faces_bkd_iter_<N, D>,
89  p_faces<N, D, P>,
90  P,
91  p_faces_bkd_piter_<N, D, P> >
92  {
93  typedef p_faces_bkd_piter_<N, D, P> self_;
94  typedef internal::p_complex_piter_base_< topo::faces_bkd_iter_<N, D>,
95  p_faces<N, D, P>,
96  P,
97  self_ > super_;
98 
99  public:
102  p_faces_bkd_piter_();
103  p_faces_bkd_piter_(const p_faces<N, D, P>& pc);
105  };
106 
107 
108 
109 # ifndef MLN_INCLUDE_ONLY
110 
111  /*------------------------------.
112  | p_faces_fwd_piter_<N, D, P>. |
113  `------------------------------*/
114 
115  template <unsigned N, unsigned D, typename P>
116  inline
117  p_faces_fwd_piter_<N, D, P>::p_faces_fwd_piter_()
118  {
119  }
120 
121  template <unsigned N, unsigned D, typename P>
122  inline
123  p_faces_fwd_piter_<N, D, P>::p_faces_fwd_piter_(const p_faces<N, D, P>& pc)
124  : super_(pc)
125  {
126  }
127 
128 
129  /*------------------------------.
130  | p_faces_bkd_piter_<N, D, P>. |
131  `------------------------------*/
132 
133  template <unsigned N, unsigned D, typename P>
134  inline
135  p_faces_bkd_piter_<N, D, P>::p_faces_bkd_piter_()
136  {
137  }
138 
139  template <unsigned N, unsigned D, typename P>
140  inline
141  p_faces_bkd_piter_<N, D, P>::p_faces_bkd_piter_(const p_faces<N, D, P>& pc)
142  : super_(pc)
143  {
144  }
145 
146 # endif // ! MLN_INCLUDE_ONLY
147 
148 } // end of mln
149 
150 #endif // ! MLN_CORE_SITE_SET_ATTIC_P_FACES_PITER_HH