From kde-core-devel Sun Mar 03 23:22:03 2002 From: David Faure Date: Sun, 03 Mar 2002 23:22:03 +0000 To: kde-core-devel Subject: Re: KParts API: thinking about the future (patch) X-MARC-Message: https://marc.info/?l=kde-core-devel&m=101519785709529 On Monday 04 March 2002 01:17, aleXXX wrote: > Where's the difference between > > public: > virtual bool doSomething(); > > and > public: > bool doSomething(); //calls doSomethingImpl(); > protected: > virtual bool doSomethingImpl(); With the latter you can add some code to be executed before or after all calls to doSomethingImpl(). You can't do that with the former, you have no guarantee that the derived class will call its parent implementation, and you don't either have control on "before" or "after". -- David FAURE, david@mandrakesoft.com, faure@kde.org http://people.mandrakesoft.com/~david/, http://www.konqueror.org/ KDE, Making The Future of Computing Available Today