pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BUG #1589: The whole concept of forces/move_with_forces/forces_holde


From: Gervase Lam
Subject: Re: BUG #1589: The whole concept of forces/move_with_forces/forces_holder needs to be rethought
Date: Thu, 14 Nov 2002 22:21:37 +0000

> From: David Philippi <address@hidden>
> Subject: Re: BUG #1589: The whole concept of
> forces/move_with_forces/forces_holder needs to be rethought
> Date: Mon, 11 Nov 2002 16:27:01 +0100

> On Monday 11 November 2002 01:57, Gervase Lam wrote:
> > Each action, which is derived from PinguAction, can then override the
> > virtual function.
>
> What about two differnt actions needing the same overwrite? You'll have
> t= o=20
> duplicate it because you can't derive a virtual function from a class on
> = the=20
> same level or you'll have to put an intermediate class between the
> two=20 actions and PinguAction which does the override for both action
> classes.

I understand your point.  However, I just wanted to understand the code 
fragment that Ingo e-mailed several days ago to get this confirmed in my 
head.  I was initially unable to do this.

Reading the C++ FAQ-Lite on the web, my basic C++ tutorial book and 
re-reading Ingo's sample code helped me.  By doing this, I found the one 
bit of the code that prevented me from understanding it.  And it wasn't to 
do with templates!

However, I can think of one possible disadvantage of using member 
templates to achieve this.  "Several" collision checking template 
functions with different function names would be needed.  Overriding a 
virtual function would only require the one function name.

Oh well.  Life is full of compromises.

Thanks,
Gervase.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]