Multiple inheritance paradigms in OpenFOAM
Merry Christmas everyone,
from time to time, by going through the OF code (v16.12), I see some crazy (to me) inheritance hierarchies combined with multiple inheritance. One example is the class template reactingMixture (src/thermophysicalModels/reactionThermo/mixtures/reactingMixture): Code:
template<class ThermoType> My question: Is there a reason for that (some kind of paradigm I do not know about)? What are the advantages of such design? I thought that usually this kind of problem would be solved through composition. Am I just not seeing the big picture? Thanks for your answers RP |
You are probably right that the reader could/should be a member composition instead of inheritance (although I don't have the code in front of me at the moment). Please open a gitlab issue to track and discuss this.
Thanks, /mark |
|
Thanks Mark
|
All times are GMT -4. The time now is 15:37. |