← Back to team overview

yade-dev team mailing list archive

Re: Inheritance and dispatching?

 

> But what if I want to force a different functor for B? I just tried 
> deriving Gl1_B : Gl1_A, but it seems Gl1_A will always be used to 
> display B, witout looking down the inheritance tree. Is there a simple 
> workaround?
It should use the closest dispatch as you describe.

The Dispatcher1D code is not very well tested and is possibly broken
(sorry, Janek). I will have a look tonight and fix it.

In Dispatcher2D, on the other hand, the logic was rewritten by me and is
tested to handle all such cases correctly -- see e.g.
scripts/test/dispatch-torture.py (I just fixed it in the last commit) --
http://beta.arcig.cz/~eudoxos/temp/dispatch.html

v




Follow ups

References