Your design requirement violates a very important OOP principle. If a class or a function depended upon that "superset" interface, then the compiler would never be able to enforce type-safety - you'd essentially be fighting against it, and for what?
I recommend that you segregate your interfaces, and make one concrete (possibly pure virtual) class that implements all of them. This design pattern has a name - it's called facade.
Update I now read your update, and I believe you need a facility for promoting objects. There are 2 kinds of promotions:
- Implementation promotions:
This is where you essentially replace the implementation of an object. This can either be done by the state pattern, or by placement-newing your object to one with a different VTABLE. - Functionality promotions:
This is where you add functionality, as in more functions. You can do this by having a map from a name of a hardware module to a variant pointer of it. When you promote an object to a different class, you simply replace the pointer variant. E.g., if your first mapping was from "COM1" ->GenericSerial*
, then you now set "COM1" ->SpecializedSerial*
. You can work with a variant library such as boost's.