* mln/core/internal/p_complex_piter_base.hh
(p_complex_piter_base<I, S, P, E>::p_complex_piter_base_(const S&)):
Move the underlying iterator's (target) complex assignment...
(p_complex_piter_base<I, S, P, E>::change_target_):
...here (new method).
---
milena/ChangeLog | 10 ++++++++++
milena/mln/core/internal/p_complex_piter_base.hh | 12 +++++++++++-
2 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 5da882c..eb868cc 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,15 @@
2009-09-29 Roland Levillain <roland(a)lrde.epita.fr>
+ Fix target change in complex piters.
+
+ * mln/core/internal/p_complex_piter_base.hh
+ (p_complex_piter_base<I, S, P, E>::p_complex_piter_base_(const S&)):
+ Move the underlying iterator's (target) complex assignment...
+ (p_complex_piter_base<I, S, P, E>::change_target_):
+ ...here (new method).
+
+2009-09-29 Roland Levillain <roland(a)lrde.epita.fr>
+
Allow iterators to perform extra work while changing their target.
* mln/core/concept/pseudo_site.hh
diff --git a/milena/mln/core/internal/p_complex_piter_base.hh
b/milena/mln/core/internal/p_complex_piter_base.hh
index 6d7f5f6..9d4ff21 100644
--- a/milena/mln/core/internal/p_complex_piter_base.hh
+++ b/milena/mln/core/internal/p_complex_piter_base.hh
@@ -85,6 +85,9 @@ namespace mln
/// Go to the next point.
void next_();
+ /// Change the target of the underlying complex iterator.
+ void change_target_(const S& pc);
+
private:
/// Update the psite.
void update_();
@@ -124,12 +127,19 @@ namespace mln
p_complex_piter_base_<I, S, P, E>::p_complex_piter_base_(const S& pc)
{
this->change_target(pc);
- iter_.set_cplx(pc.cplx());
mln_postcondition(!this->is_valid());
}
template <typename I, typename S, typename P, typename E>
inline
+ void
+ p_complex_piter_base_<I, S, P, E>::change_target_(const S& pc)
+ {
+ iter_.set_cplx(pc.cplx());
+ }
+
+ template <typename I, typename S, typename P, typename E>
+ inline
bool
p_complex_piter_base_<I, S, P, E>::is_valid_() const
{
--
1.6.3.1