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

List:       kde-core-devel
Subject:    Re: KParts API: thinking about the future (patch)
From:       David Faure <david () mandrakesoft ! com>
Date:       2002-03-03 23:22:03
[Download RAW message or body]

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


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

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