使用 Doxygen 创建特定函数的调用图

问题描述 投票:0回答:1

当我将 EXTRACT_ALL、EXTRACT_PRIVATE 和 EXTRACT_STATIC 全部设置为 YES 时,我可以为项目中的几乎所有实体创建调用图。但是如何为特定函数创建调用图?

如果可能,那么如果我启用 INTERACTIVE_SVG,是否可以访问调用图中的函数,或者我是否必须为每个调用的函数创建一个调用图?

graph doxygen
1个回答
1
投票

这有点取决于您的 doxygen 版本。 但除了配置设置(总是需要

HAVE_DOT=YES
):

  • CALL_GRAPH
  • CALLER_GRAPH

有命令(请参阅https://www.doxygen.nl/manual/commands.html):

  • \callgraph
  • \callergraph
  • \hidecallgraph
  • hidecallergraph

使用这些命令应该可以创建所需的图表。

根据要求:

doxygen 配置文件

HAVE_DOT=YES

源代码文件

/// \file

/// \brief the first function
/// \details the details of the first function
/// \callgraph
void fie1(void)
{
  fie2();
};

/// \brief the second function
/// \details the details of the second function
void fie2(void);
© www.soinside.com 2019 - 2024. All rights reserved.