finalizing the Iterator API

Boudewijn Rempt boud at valdyas.org
Wed Jul 7 20:11:14 CEST 2004


On Wednesday 07 July 2004 18:19, Cyrille Berger wrote:
> >
> > Which is why I'd like something a bit more clever. In fact, even a C
> > struct where you can go a.red is easier to read.
>
> Here is what I offer :
>
> class PixelRepresentation {
>         public:
>                 operator[](Q_INT32 a);
>                  operator=(PixelRepresention a);
> }
>
> class RgbaPixelRepresentation : public PixelRepresentation {
> 	public:
> 		inline red() { return this[PIXEL_RED];  }
> 		...
> };
>
> Or we can use an union.

Okay with me.

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


More information about the kimageshop mailing list