A base class method can simply call a derived method:
void Base::Execute() { Done(42); }
For the base class Done () to call before the derived class, you can name it as the first operator of the derived class method or use a non-virtual idiom.
Here's an example of calling it at the top of a derived class method. It depends on the derived class to understand it.
void Derived::Done(int code) { Base::Done(code); }
Here is an example of using a non-virtual idiom:
class Base { void Done(int code){
source share