How is this "interface"-like structure/pattern called?
- by Sebastian Negraszus
Let's assume we have an XmlDoc class that contains basic functionality for dealing with an XML data structure and saving/loading data to/from a file. Now we have several subclasses, A, B and C. They all inherit from XmlDoc and add component-specific methods for setting and getting lots of data. They are like "interfaces" but also add an implementation for the signatures.
Finally, we have an ABCDoc class that joins all the "interfaces" via virtual multiple inheritence and adds some ABCDoc-specific stuff, such as using XMLDoc-methods to set an appropriate doc type. We may also have an ADoc class for only saving A data.
How is this pattern called? "Interface" is not really the right word since interfaces usually do not contain an implementation.
Bonus points for C++ code conventions.