Commit 2a937a13 authored by Roland Levillain's avatar Roland Levillain
Browse files

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).

git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@4574 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent b1f3c0ea
2009-09-29 Roland Levillain <roland@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@lrde.epita.fr>
 
Allow iterators to perform extra work while changing their target.
......@@ -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,10 +127,17 @@ 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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment