[Top][All Lists]

[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: David Philippi
Subject: Re: BUG #1589: The whole concept of forces/move_with_forces/forces_holder needs to be rethought
Date: Wed, 6 Nov 2002 13:51:13 +0100
User-agent: KMail/1.4.1

On Wednesday 06 November 2002 02:05, Gervase Lam wrote:
> Sorry if this is a naive question.  Why do member templates have to be
> used?  Couldn't something like the following do?

Who said that member templates are the only solution? In this case they are 
the best but surely not the only one. It shouldn't be hard to imagine a few 
more ways to achieve the same effect. ;-)

[code using inheritance in PinguAction]

> That's the basics of it.  OK, a few small things could be improved here.
> But why not use this basic idea rather than member templates?

Because you would either have to include the same collision code in different 
actions or you would have to derive the actions from 
where X is the right base class for the current action. The first would 
introduce redundant code and the second creates an ugly class hierarchie.

Bye David

reply via email to

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