Doxygen 如何为文件夹生成文档

Doxygen How to general documention for folder

我想为每个文件夹添加说明,如图所示:

这可能吗?

您可以使用 \dir 或 @dir 命令记录文件夹

http://www.doxygen.nl/manual/commands.html#cmddir

这方面的文档不是很好。但我确实已经花时间弄清楚它是如何工作的。在您想要的任何源文件中,您可以为该文件夹添加文档(或者甚至为该文件夹的文档创建一个特定文件)。

你的情况

/** \dir workspace
 *  \brief "Folder description that shows up where you want"
 *  \details More details to be displayed on the folder's page.
 */


/** \dir workspace/SWTtutotial
 *  \brief "Folder description that shows up where you want"
 *  \details More details to be displayed on the folder's page.
 */

注意...注意 "tutorial" 的拼写 ;)

旁注:我注意到一个与具有通用后缀的文件夹名称相关的错误。我收到以下警告:

file.cpp:180: warning: \dir command matches multiple directories.
  Applying the command for directory /sources/
  Ignoring the command for directory /testsources/

导致此警告的第 180 行的注释

/**
 * \dir "sources"
 * \details Adding details later 3...
 */ //works but complains about also matching "testsources".  Doxygen Bug?

我使用 \dir /sources 而不是引号修复了它。如果路径中没有空格,这没问题...否则我们需要修复错误。