26 #ifndef MLN_CORE_CONCEPT_SITE_ITERATOR_HH
27 # define MLN_CORE_CONCEPT_SITE_ITERATOR_HH
36 # include <mln/core/concept/site_proxy.hh>
37 # include <mln/core/concept/iterator.hh>
74 bool is_valid()
const;
87 # ifndef MLN_INCLUDE_ONLY
94 mln_precondition(is_valid());
103 E *
const this_ =
const_cast<E*const
>(exact(
this));
104 if (this_->target_() == 0)
106 return exact(
this)->is_valid_();
109 template <
typename E>
112 Site_Iterator<E>::invalidate()
114 if (exact(
this)->target_() == 0)
116 exact(
this)->invalidate_();
117 mln_postcondition(is_valid() ==
false);
120 template <
typename E>
123 Site_Iterator<E>::start()
125 mln_precondition(exact(
this)->target_() != 0);
126 exact(
this)->start_();
129 template <
typename E>
131 Site_Iterator<E>::Site_Iterator()
133 bool m0 = (& E::target_) == (& E::target_);
135 bool (E::*m1)()
const = & E::is_valid_;
137 void (E::*m2)() = & E::invalidate_;
139 void (E::*m3)() = & E::start_;
141 void (E::*m4)() = & E::next_;
143 bool m5 = (& E::change_target) == (& E::change_target);
147 # endif // ! MLN_INCLUDE_ONLY
152 #endif // ! MLN_CORE_CONCEPT_SITE_ITERATOR_HH