c++ - 如何让 Doxygen 显示菱形继承图

标签 c++ doxygen multiple-inheritance virtual-inheritance diamond-problem

Doxygen 有一个非常巧妙的功能,它可以从代码生成继承图。但是,当从具有公共(public)基类的类使用多重继承时,该图显示了两个独立的基类(即使我使用的是虚拟继承,如基类周围的虚线所示)

enter image description here

我怎样才能让 Doxygen 的情节更像下面这样。 . .

     D
    / \
   B   C
    \ /
     A

而不是:(就像没有虚拟继承时发生的那样)

     D
   /   \
   B   C
   |   |
   A   A

最佳答案

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.

设置为

HAVE_DOT = YES

关于c++ - 如何让 Doxygen 显示菱形继承图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23813253/

相关文章:

C++ int[] 到字符串

visual-studio-2008 - 在 VS2008 中将 doxygen 作为自定义构建步骤运行

c - 有没有办法自定义 Doxygen index.html(和 latex 等价物)的输出?

c++ - Doxygen:防止由于前向声明和模板造成重复

c++ - 是否优化了多个顺序数组访问?

c++ - 我的数组值如何被覆盖

scala - 在Scala多重继承中,如何解决签名相同但返回类型不同的冲突方法?

python - 使用继承 python34 创建交互式命令循环

c++ - 构建 C++ 字符串时如何处理未终止的字符数组?

c++ - 当基类具有虚函数时,对基类的静态转换会产生意想不到的结果