|
Posted by Sanders Kaufman on 07/24/07 05:46
Jerry Stuckle wrote:
> Sanders Kaufman wrote:
>> So when I override a function, it actually calls the baseclass
>> function AND THEN the derived function? Did I understand that right?
>
> No, it doesn't. It only calls the derived class function. But the
> derived class function should call the base class function.
Oh, OK. I misunderstood "should".
You're saying that if I override a function, I should be calling the
overridden function from within the override at some point.
This is an OOP design principle, but not necessarily enforced in the
compiler/IDE thingies.
It's that way because, there's not much point in writing a function that
just gets voided in the actual implementation and because it allows you
to put some shared or common functionality deeper down (higher up?) into
the foundation of the architecture.
Zat right?
Navigation:
[Reply to this message]
|