[Kde-hardware-devel] First capabilities support

Kevin Krammer kevin.krammer at gmx.at
Thu Feb 23 10:23:49 CET 2006


On Wednesday 22 February 2006 15:57, Kevin Ottens wrote:
> Le Mercredi 22 Février 2006 15:15, Will Stephenson a écrit :

> > My first thought is, i see that each capability subclass defines a set of
> > characteristics, like Processor::canThrottle().  This might make it hard
> > to add more characteristics in future - how about defining capabilities
> > by multiple inheritance from a set of fine grained characteristics such
> > as
> >
> > public class Throttleable
> > {
> > 	virtual bool canThrottle() const = 0;
> > };
> >
> > This is very java like, I know!
>
> I find this fine grained characteristics idea tempting, but it
> unfortunately means that we'll break binary compatibility to add new
> characteristics. :-/

Not if the interface is implemented in a private class and the device class 
provides a method to return the interface object. A simple non-extensible 
device could still implement the interfaces itself and return "this" (or 
wrapper around it)

Cheers,
Kevin

-- 
Kevin Krammer <kevin.krammer at gmx.at>
Qt/KDE Developer, Debian User
Moderator: www.mrunix.de (German), www.qtcentre.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20060223/d6317203/attachment.pgp 


More information about the Kde-hardware-devel mailing list