J
John Wood
I have a class (B) that derives from another class (A) - it provides a
specialization of that base class.
It turns out that the base class (A) needs to be replaceable. That is, I
need to be able to plug in new implementations (retaining the same
interface).
I cannot change the source code of A or B, it needs to be in a library that
is shipped out. But customers should be able to 'plug-in' new base classes.
Other than having a proxy class as A that delegates to a plug-in interface,
I can't see any other way of doing it. And I really don't like writing proxy
classes.
Anyone have any better ideas?
Thanks.
specialization of that base class.
It turns out that the base class (A) needs to be replaceable. That is, I
need to be able to plug in new implementations (retaining the same
interface).
I cannot change the source code of A or B, it needs to be in a library that
is shipped out. But customers should be able to 'plug-in' new base classes.
Other than having a proxy class as A that delegates to a plug-in interface,
I can't see any other way of doing it. And I really don't like writing proxy
classes.
Anyone have any better ideas?
Thanks.