26 #ifndef MLN_CORE_SITE_SET_COMPLEX_PSITE_HH
27 # define MLN_CORE_SITE_SET_COMPLEX_PSITE_HH
33 # include <mln/core/internal/pseudo_site_base.hh>
35 # include <mln/topo/complex.hh>
52 template <
unsigned D,
typename G>
class p_complex;
59 template <
unsigned D,
typename G>
61 :
public internal::pseudo_site_base_< const mln_site(G)&, complex_psite<D, G> >
96 const target* target_()
const;
104 const mln_site(G)& subj_();
161 template <
unsigned D,
typename G>
172 template <
unsigned D,
typename G>
185 template <
unsigned D,
typename G>
187 operator< (const complex_psite<D, G>& lhs,
192 template <
unsigned D,
typename G>
195 operator<<(std::ostream& ostr, const complex_psite<D, G>& p);
199 # ifndef MLN_INCLUDE_ONLY
201 template <
unsigned D,
typename G>
209 template <
unsigned D,
typename G>
219 mln_precondition(pc.
cplx() == face.
cplx());
225 template <
unsigned D,
typename G>
228 unsigned n,
unsigned face_id)
230 face_(pc.cplx(), n, face_id)
236 template <
unsigned D,
typename G>
243 mln_invariant(!pc_ || pc_.cplx() == face_.cplx());
245 return face_.is_valid();
248 template <
unsigned D,
typename G>
253 return face_.invalidate();
256 template <
unsigned D,
typename G>
261 mln_precondition(target_());
265 template <
unsigned D,
typename G>
272 mln_invariant(!pc_ || pc_.cplx() == face_.cplx());
277 template <
unsigned D,
typename G>
284 face_.set_cplx(new_target.
cplx());
290 template <
unsigned D,
typename G>
298 template <
unsigned D,
typename G>
306 template <
unsigned D,
typename G>
314 template <
unsigned D,
typename G>
319 return face_.face_id();
322 template <
unsigned D,
typename G>
327 mln_precondition(is_valid());
330 mln_invariant(!pc_ || pc_.cplx() == face_.cplx());
334 p_ = site_set().geom()(face_);
342 template <
unsigned D,
typename G>
351 template <
unsigned D,
typename G>
360 template <
unsigned D,
typename G>
362 operator< (const complex_psite<D, G>& lhs,
365 mln_precondition(&lhs.site_set() == &rhs.site_set());
366 return lhs.face() < rhs.face();
374 template <
unsigned D,
typename G>
377 operator<<(std::ostream& ostr, const complex_psite<D, G>& p)
379 return ostr << p.face();
382 # endif // ! MLN_INCLUDE_ONLY
386 #endif // ! MLN_CORE_SITE_SET_COMPLEX_PSITE_HH