Sounds like you're looking for something along the lines of the Adapter pattern (and/or the Facade pattern). Your DeviceClass would be a factory which returns instances of DeviceAdapter::Device1 or what not; DeviceAdapter::Foo would convert from your generic interface into the correct calls on a Foo instance, DeviceAdapter::Bar similar for Bar instances.
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: Inheritance based on input
by Fletch
in thread Inheritance based on input
by cbanker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |