27 #ifndef MLN_TOPO_FACE_DATA_HH
28 # define MLN_TOPO_FACE_DATA_HH
39 # include <mln/topo/algebraic_n_face.hh>
49 template <
unsigned D>
class complex;
52 template <
unsigned N,
unsigned D>
struct lower_dim_faces_set_mixin;
53 template <
unsigned N,
unsigned D>
struct higher_dim_faces_set_mixin;
55 template <
unsigned N,
unsigned D>
56 struct lower_dim_adj_faces_if_dim_matches_;
57 template <
unsigned N,
unsigned D>
58 struct higher_dim_adj_faces_if_dim_matches_;
62 template <
unsigned N,
unsigned D>
class n_face;
65 template <
unsigned N,
unsigned D>
class lower_dim_faces_data_mixin;
66 template <
unsigned N,
unsigned D>
class higher_dim_faces_data_mixin;
75 template <
unsigned N,
unsigned D>
class face_data;
80 class face_data<D, D> :
public internal::lower_dim_faces_data_mixin<D, D>
86 template <
unsigned N,
unsigned D>
87 class face_data :
public internal::lower_dim_faces_data_mixin<N, D>,
88 public internal::higher_dim_faces_data_mixin<N, D>
94 class face_data<0u, D> :
public internal::higher_dim_faces_data_mixin<0u, D>
100 class face_data<0u, 0u>
110 template <
unsigned N,
unsigned D>
111 class lower_dim_faces_data_mixin
113 typedef std::vector< algebraic_n_face<N - 1, D> > lower_dim_faces_type;
116 void connect_lower_dim_face(
const algebraic_n_face<N - 1, D>& f);
119 friend struct mln::topo::internal::lower_dim_faces_set_mixin<N, D>;
120 friend struct mln::topo::internal::lower_dim_adj_faces_if_dim_matches_<N, D>;
121 friend lower_dim_faces_type
125 lower_dim_faces_type lower_dim_faces_;
128 template <
unsigned N,
unsigned D>
129 class higher_dim_faces_data_mixin
131 typedef std::vector< algebraic_n_face<N + 1, D> > higher_dim_faces_type;
134 void connect_higher_dim_face(
const algebraic_n_face<N + 1, D>& f);
137 friend struct mln::topo::internal::higher_dim_faces_set_mixin<N, D>;
138 friend struct mln::topo::internal::higher_dim_adj_faces_if_dim_matches_<N, D>;
139 friend higher_dim_faces_type
143 higher_dim_faces_type higher_dim_faces_;
151 # ifndef MLN_INCLUDE_ONLY
155 template <
unsigned N,
unsigned D>
158 lower_dim_faces_data_mixin<N, D>::connect_lower_dim_face(
const algebraic_n_face<N - 1, D>& f)
160 lower_dim_faces_.push_back(f);
163 template <
unsigned N,
unsigned D>
166 higher_dim_faces_data_mixin<N, D>::connect_higher_dim_face(
const algebraic_n_face<N + 1, D>& f)
168 higher_dim_faces_.push_back(f);
173 # endif // ! MLN_INCLUDE_ONLY
179 #endif // ! MLN_TOPO_FACE_DATA_HH