27 #ifndef MLN_CORE_CONCEPT_PSEUDO_SITE_HH
28 # define MLN_CORE_CONCEPT_PSEUDO_SITE_HH
38 # include <mln/core/concept/site_proxy.hh>
39 # include <mln/metal/is_a.hh>
47 template <
typename E>
struct Pseudo_Site;
89 template <
typename O,
typename T>
95 # ifndef MLN_INCLUDE_ONLY
101 typedef mln_target(E) target;
103 void (E::*m1)(const target&) = & E::change_target;
105 const target* (E::*m2)() const = & E::target_;
109 template <typename E>
114 return exact(
this)->target_() != 0;
119 namespace if_possible
125 template <
bool b>
struct helper;
128 struct helper< true >
131 template <
typename P>
133 const mln_target(P)& new_target)
const
135 exact(p).change_target(new_target);
138 template <
typename O,
typename D>
147 struct helper< false >
149 template <
typename O,
typename D>
159 template <
typename O,
typename D>
162 enum { is_object = mlc_is_a(O, Object)::
value };
169 # endif // ! MLN_INCLUDE_ONLY
174 #endif // ! MLN_CORE_CONCEPT_PSEUDO_SITE_HH