[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: finalizing the Iterator API
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2004-07-07 18:11:14
Message-ID: 200407072011.14297.boud () valdyas ! org
[Download RAW message or body]

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
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic