Are there any known problems when using multiple inheritance in OMNeT++?

208 views Asked by At

I am about to extend an existing protocol in INET. Since I am going to start developing a big feature and this needs some time, I would like to know in advance about limitations for using multiple inheritance.

Very simple question

Are there any known issues with INET concerning multiple inheritance involving internal classes like Module or SimpleModule? I ask because I cannot really start simulating as part of my code is still undergoing many changes and if I start using multiple inheritance to get error after it is going to be bad.

Thank you

1

There are 1 answers

1
Rudi On

You should NOT use multiple inheritance in a way where the internal omnet classes are multiple times on the inheritance hierarchy. OMNeT++ is keeping track of the ownership of the objects and that will interfere with the main library. INET is not using it either and there is no real reason to use it.

On the other hand it's fine to use multiple classes as interfaces (i.e. java style). That is widely used in INET too.