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

List:       kde-core-devel
Subject:    Re: New KDE printing system
From:       Guillaume Laurent <glaurent () telegraph-road ! org>
Date:       2001-02-28 15:33:19
[Download RAW message or body]

On Wednesday 28 February 2001 15:07, Michael Goffioul wrote:

> There's no theoretical restriction in having several KPrinter objects,
> however you need to use the factory to create them. As the factory is a
> singleton and only contains one printer object, you will only have one
> KPrinter object also. I'm using this scheme because the KPrinter class is
> an abstract class, the real objects are like KCupsPrinter, KLpdPrinter, ...
> You can't instantiate a KPrinter object. In fact you shouldn't: the real
> printing work is done in subclasses, a KPrinter object doesn't do anything
> useful. The factory is there to create the real object according to the
> user settings.
>
> Is this a problem ?

Nope, that looks fine to me. If you can't instantiate a KPrinter (make the 
ctor protected to ensure that - I suppose you already have), then all is fine.

-- 
						Guillaume
						http://www.telegraph-road.org

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

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