26 #ifndef MLN_CORE_INTERNAL_IMAGE_DOMAIN_MORPHER_HH
27 # define MLN_CORE_INTERNAL_IMAGE_DOMAIN_MORPHER_HH
33 # include <mln/core/internal/image_morpher.hh>
50 template <
typename I,
typename S,
typename E>
51 class image_domain_morpher :
public image_morpher<I, mln_value(I), S, E>
56 typedef mln_rvalue(I) rvalue;
59 typedef mln_morpher_lvalue(I) lvalue;
63 rvalue operator()(const mln_psite(S)& p) const;
66 lvalue operator()(const mln_psite(S)& p);
71 image_domain_morpher();
75 # ifndef MLN_INCLUDE_ONLY
77 template <
typename I,
typename S,
typename E>
79 image_domain_morpher<I,S,E>::image_domain_morpher()
83 template <
typename I,
typename S,
typename E>
86 image_domain_morpher<I,S,E>::operator()(const mln_psite(S)& p)
const
88 mln_precondition(this->delegatee_() != 0);
89 mln_precondition(exact(
this)->
has(p));
90 mln_precondition(this->delegatee_()->
has(p));
91 return this->delegatee_()->operator()(p);
94 template <
typename I,
typename S,
typename E>
96 typename image_domain_morpher<I,S,E>::lvalue
97 image_domain_morpher<I,S,E>::operator()(
const mln_psite(S)& p)
99 mln_precondition(this->delegatee_() != 0);
100 mln_precondition(exact(
this)->
has(p));
101 mln_precondition(this->delegatee_()->
has(p));
102 return this->delegatee_()->operator()(p);
105 # endif // ! MLN_INCLUDE_ONLY
112 #endif // ! MLN_CORE_INTERNAL_IMAGE_DOMAIN_MORPHER_HH