← Back to team overview

yade-dev team mailing list archive

dispatch, inheritance, virtual functions

 

Hi Janek,

what is the proper way of declaring classes that derive from the same
parent class and the dispatcher should dispatch based on that parent
class?

Dem3DofGeom is parent for both Dem3DofGeom_SphereSphere and
Dem3DofGeom_FacetSphere. Constitutive law doesn't care, it declares that
it expects Dem3DofGeom.

Now, Dem3DofGeom_FacetSphere has different classIndex than Dem3DofGeom.
Shouldn't the DynLibDispatcher automagically climb up the inheritance
tree to find dispatch defined for some parent class and use that one?
Currently, it seems broken in some strange way
(https://bugs.launchpad.net/yade/+bug/415265)

What is the algorithm for dispatch? (Sorry, the code is horrible and I
have no time to understand/rewrite it)

Cheers, Vaclav




Follow ups