Patch for kabc resources

Tobias Koenig tokoe at kde.org
Tue Jan 6 21:41:33 GMT 2004


On Tue, Jan 06, 2004 at 08:58:43PM +0100, Christian Loose wrote:
> Am Dienstag, 6. Januar 2004 18:53 schrieb David Faure:
Hi,

> > public:
> >  // DO NOT REIMPLEMENT IN SUBCLASSES
> >  virtual void writeConfig() {
> >     doWriteConfig();
> >     BaseClass::writeConfig();
> >  }
> >
> > protected:
> >   virtual void doWriteConfig() { }
> >
> > This way you know for sure that the baseclass method is always called,
> > and subclasses should only reimplement doWriteConfig (better name
> > needed, like writeResourceConfig() or anything more appropriate).
> 
> You could also make the doWriteConfig() private. See 
> http://www.gotw.ca/publications/mill18.htm
Interesting approach, Bo could you change the patch in the way that
KRES::Manager becomes a friend class of KABC::Resource,
KABC::Resource::writeConfig() becomes protected and
KABC::Resource::doWriteConfig() becomes private?

Ciao,
Tobias
-- 
Can a government that shoots at reporters be democratic?
Separate politics from religion and economy!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040106/2e1d56b1/attachment.sig>


More information about the kde-core-devel mailing list