我希望在Doxygen文档中包含文件夹。
我尝试过使用\page和\include,但没有成功,有人知道怎么做吗?这是目录树:
+根目录 -+控制器 --- category.php -+模型 --- categories.php - mainpage.php
我希望在Doxygen文档中包含文件夹。
我尝试过使用\page和\include,但没有成功,有人知道怎么做吗?这是目录树:
+根目录 -+控制器 --- category.php -+模型 --- categories.php - mainpage.php
在对你的问题的评论中,\page 命令将添加到手动编写的文档中的页面。例如,如果源文件包含 \page 声明,它将将其内容添加到文档索引中。你可以在这里添加额外的帮助,例如:
/*! \page overviewpage Architecture Overview
*
* \section memorymanagement Memory Management
*
* Some writing you want to appear as a help page in the documentation here.
*/
\include命令将会把一个文件的内容作为源代码块包含在当前文件中。
我认为您实际上是想知道如何让Doxygen添加多个源代码目录。 只要递归设置为YES(这不是默认值),如果您已将根文件夹设置为Doxygen输入,则它应该适用于您的结构。
RECURSIVE = YES
如果你还没这样做,你可以像这样添加不同的文件夹,路径相对于Doxyfile文件。
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
# The INPUT tag can be used to specify the files and/or directories that contain
# documented source files. You may enter file names like "myfile.cpp" or
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = src test/src
@Martin Foot提供的解决方案在您的文件夹名称中存在空格时无效,因为doxygen会将其视为单独的文件路径。如果引用整个内容,则无法正常工作。 从这里汲取灵感... 为Doxygen排除目录 这是我的建议解决方案,其中引用每个文件夹并使用多行语法。
INPUT = "src"
INPUT += "spaced folder/test/src"
参考资料:https://www.doxygen.nl/manual/config.html
the += operator can be used instead of = to append new values to the list.