您可以使用 \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.
*/
Run Code Online (Sandbox Code Playgroud)
注意...注意“教程”的拼写;)
旁注:我注意到与具有通用后缀的文件夹名称相关的错误。我收到以下警告:
file.cpp:180: warning: \dir command matches multiple directories.
Applying the command for directory /sources/
Ignoring the command for directory /testsources/
Run Code Online (Sandbox Code Playgroud)
第 180 行的注释导致此警告
/**
* \dir "sources"
* \details Adding details later 3...
*/ //works but complains about also matching "testsources". Doxygen Bug?
Run Code Online (Sandbox Code Playgroud)
\dir /sources
我通过使用而不是引号来修复它。如果路径中没有空格,这是可以的...否则我们需要修复错误。