Design ideas about iterators
cyb at lepi.org
Tue Mar 2 02:39:19 CET 2004
I was thinking about the design of iterators.
1) I think we need two iterators, one that would deals with QUANTUM and
another with pixels data (maybe we can do a template, and we will ask the
ColorStrategy to give us the iterator)
2) operators are a big problem, because, it's clear that "=" refears to the
change of value, but operators like "==", "+=", "-=", "-" or "+" can refears
to the change of value or to the change of position (in the stl, they are
used for the position)
Description of the operators :
= allow the change of value (tile are access in TILEMODE_RW)
* give back a value (tile are access in TILEMODE_READ)
++ go to the next QUANTUM/pixel
-- go to the previous pixel
I think that [ ] should not be used, it may be rather confusing.
3) some other functions :
goNextPixel() - only for quantum iterator
Tell what's your opinion about it ?
--- Cyrille Berger ---
More information about the kimageshop