|Pathologically Eclectic Rubbish Lister|
Re^2: Inheritance: parent class determine which child class to use?by fbicknel (Beadle)
|on Jul 31, 2012 at 14:05 UTC||Need Help??|
Thanks! I made some modifications and used the idea. Mine turned out something like:
... somewhere else in code land ...
The _whichType function returns 'DMMP' or 'Powerpath' after sniffing around for what we actually have.
It's nearly the same as what you suggested, but I didn't need the added 'type' attribute in this case, so simpler.
I could almost get away without the REGISTER_TYPE, but it has the added appeal of not having to hard code the things Multipath can handle. Just add a new module like the DMMP module shown to add new capabilities;
Thanks for the suggestion: perfect synergy.