Doxygen has a really neat feature whereby it will generate inheritance graphs from code. However, when using multiple inheritance from classes with a common base, the plot shows two separate base classes (even though I'm using virtual inheritance as signified by the dashed lines around the base class)
How can I make Doxygen plot something more like the following . . .
D
/ \
B C
\ /
A
And not: (as happens without virtual inheritance)
D
/ \
B C
| |
A A
Doxygen Manual: Graphs and diagrams. Doxygen has built-in support to generate inheritance diagrams for C++ classes.
The solution to the diamond problem is to use the virtual keyword. We make the two parent classes (who inherit from the same grandparent class) into virtual classes in order to avoid two copies of the grandparent class in the child class.
Make sure the following options are set in the Doxywizard dialog: In Wizard tab, under Output, select HTML output. In Wizard tab, under Diagrams, choose the option Use dot tool from the GraphViz package. Select the following two options below it: Include dependency graphs and Included by dependency graphs.
You have to set HAVE_DOT , CALL_GRAPH and CALLER_GRAPH to YES . Also make sure the path to dot is in your PATH variable. If that still doesn't work, you might have to set EXTRACT_ALL and/or EXTRACT_STATIC , depending on your functions. Apologies, I do have HAVE_DOT, CALL_GRAPH, and CALLER_GRAPH set to YES.
If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is available from the path. This tool is part of Graphviz (see: http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent Bell Labs. The other options in this section have no effect if this option is set to NO The default value is: NO.
Set to
HAVE_DOT = YES
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With