Patch for kabc resources

Tobias Koenig tokoe at
Tue Jan 6 19:52:10 GMT 2004

On Tue, Jan 06, 2004 at 06:53:23PM +0100, David Faure wrote:
> On Tuesday 06 January 2004 18:45, Tobias Koenig wrote:

> > Is there any nice design pattern wich covers this issue, so that the
> > method of the base class don't have to be called from every
> > implementation explicitely?
> An easy solution is to separate the public method from the virtual, protected, method.
> Hmm, well the public method is also virtual here, so this would give
> something like
> public:
>  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).
We could make the writeConfig() method protected as well, because only
KRES::Manager should call this method and we can make him a friendclass of
KABC::Resource. Makes this sense?

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: <>

More information about the kde-core-devel mailing list