When creating a C ++ inheritance structure, you must precisely define the member functions in different places:
If B is an abstract base class, and D, E, and F all inherit from B, you can have the following:
class B
{
virtual func A( ... params ) = 0;
};
class D : public B
{
func A( ... params );
};
So here, obviously, there is some overlap. If the interface to B is large, you can have many places to change if the interface needs to be changed.
An employee suggested some tricks with the built-in dodgy #includes, ala:
class D: public B
{
#include "B_Interface.h"
}
Does this seem a bit tattered? It? Is there a better solution to avoid double maintenance?
Also, maybe the solution here is really the best language support tools like Visual Assist X?
Edit: Suppose derived classes must have unique implementations.