On Wed, Aug 14, 2002 at 04:46:29PM +0200, Jean-Marc Lasgouttes wrote:
> What you should do, I think is to have every InsetFoo::dispatch(...)
> method call its parent dispatch on the 'default:' of the switch(). Do
> you have to know explicitely the parent name for that in C++

Yes. But that's no problem.

> (presumably becasue of multiple inheritence?). In Java, it would be as
> simple as super.dispatch().

Ah... good idea actually. 

> I think you have to do it anyway. And I think the virtual table
> solution is not magic either, since in some case you may want to do

> case LFUN_FOO:
>   if (some condition) {
>     handle it myself
>   }
>   else {
>     lets do as my parent does
>   }

Sure, but that wors with virtual functions as well.

Anyway, the default: should solve my problem.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

Reply via email to