氧分组 [英] Doxygen grouping
问题描述
我对氧气中的页面和组有疑问.我有一个项目,在这里我将类等与@defgroup和@ingroup cmds分组.到目前为止,一切正常.
I have a question about pages and groups in doxygen. I have a project, where I grouped classes etc. with the @defgroup and @ingroup cmds. So far this works fine.
现在,我想为带有降价页面的项目添加特殊文档.这些页面应显示在专用模块(组)中.我尝试使用@page和@subpage cmds创建页面.效果很好,但是页面在菜单中显示为纯白.
Now I'd like to add special documentation to the project with markdown pages. These pages should appear in the dedicated module (group). I tried to create pages with the @page and @subpage cmds. That works fine, but the pages appear plain in the menu.
因此,我尝试使用@ingroup将它们添加到组中.但这不起作用,正如我猜到的那样.是否可以将页面添加到模块(组)中?
So I tried to add them to the groups with @ingroup. But that doesn't work as I guessed. Is it possible to add pages to modules (groups)?
结果应如下所示:
Project
|-- Modules
| |-- "Module1"
| | |-- documentation page1 (from *.md file)
| | |-- class documentation
| |-- "Module2"
| | |-- documentation page2
| | |-- class documentation
希望你能帮助我!
推荐答案
在上述情况下,我们为团体提供了两种类型的文档:
In described case we have two types of documentation for groups:
- 源文件中的文档
- 降价文件中的文档
我们需要为此组创建树结构.
And we need create tree structure for this goups.
例如,我们创建2个组:
For example, we create 2 groups :
- 主应用程序带有源代码中的文档
- 库,文档包含在文件 library.md 中
- Main Application with documentation in source code
- Library with documentation in file library.md
主应用程序组源代码(对于C ++)可能如下所示:
Main Application group source code (for C++) may look like this:
/** @defgroup app Main Application */
/** @addtogroup app
* @brief Main application description.
*
* @{
*/
int main() { return 0; } //do nothing
/** @} */
MarkDown文件 library.md 包含简单文本:
MarkDown file library.md contain simple text:
Library File {#library}
============
Library Page Content from library.md.
现在要定义结构,我们创建具有内容的 mainpage.md 文件:
Now to define structure we create mainpage.md file with content:
Pages {#mainpage}
============
Content:
- @subpage library
@defgroup Library
@addtogroup Library
@copydoc library
@{
@}
mainpage.md中的
@subpage
标记用于隐藏从树到一个根项(页面)的所有页面. @defgroup
标签为降价文档创建新的组. @copydoc
标签将内容从库页面复制到库组.
@subpage
tag in mainpage.md used to hide all pages from tree to one root item (Pages).
@defgroup
tag create new group for markdown documentation.
@copydoc
tag copy content from library page to Library group.
在屏幕截图上,您可以看到结果结构:
On screenshot you can see result structure:
请注意,在这种情况下,模块组名称和 Page 名称可能会有所不同.您还可以使用 @copydoc
标记将MarkDown文件中的内容粘贴到源代码文档中.
Note, that Module Group name and Page name may be different in that case. You can also paste content from MarkDown files into source code documentation using @copydoc
tag.
参考: http://www.doxygen.nl/manual/grouping.html
这篇关于氧分组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!