Design ideas about iterators

Boudewijn Rempt boud at valdyas.org
Tue Mar 2 22:18:45 CET 2004


On Tuesday 02 March 2004 02:39, Cyrille Berger wrote:

> Tell what's your opinion about it ?

I'm not completely convinced that this idea has already fully crystallized... 
One problem I'm currently having is the definition of QUANTUM -- having 
QUANTUM as a typedef and using it all over the place makes it terribly hard 
to have 16 or 32 bits per channel other than as a compile option. That's fine 
for ImageMagick, where it originally came from, but for an interactive app, 
I'd prefer something more flexible. And it's doable, I'm sure, because 
Photogenics (gratis demo for Linux available) can do it.

But making QUANTUM more flexible and hide that flexibility (I'd really hate to 
have a QUANTUM8, QUANTUM16 and QUANTUM32 defined and switch statements 
everywhere), you need to reconsider iterating over quantums.

As for the other issue, I think we should keep as closely as possible to the 
default usage in the stl, with the default usage of Qt as a back-up.

That said, I haven't got much of a clue about what to do about hiding QUANTUM, 
and even less about iterators, so if you can whip up something that works, we 
can use it, and refine/refactor later.

-- 
Boudewijn Rempt | http://www.valdyas.org/fading/index.cgi


More information about the kimageshop mailing list