我使用Doxygen为我的SDK制作了文档.它包含文件,名称空间,类,类型等的列表 - 我在代码中作为Doxygen注释放置的所有内容.现在我想写一些关于SDK(介绍类型)的一般信息,它与任何代码元素都没有直接关系.我想将此介绍放在文档起始页面上.我怎样才能做到这一点?
Chr*_*ris 91
看看mainpage命令.
另外,看看另一个线程的答案:如何在Doxygen中包含自定义文件.它指出,有三个扩展,并Doxygen的类作为附加的文档文件:.dox,.txt和.doc.具有这些扩展名的文件不会出现在文件索引中,但可以用于在最终文档中包含其他信息 - 对于必要的文档非常有用,但这些文档并不适合包含在您的源代码中(例如,常见问题解答)
因此,我建议mainpage.dox您在项目目录中使用(或类似命名的)文件来向您介绍SDK.请注意,在此文件中,您需要放置一个或多个C/C++样式注释块.
dox*_*gen 54
请注意,使用Doxygen版本1.8.0,您还可以添加Markdown格式化页面.为此,您需要创建扩展名为.md或.markdown的页面,并将以下内容添加到配置文件中:
INPUT += your_page.md
FILE_PATTERNS += *.md *.markdown
Run Code Online (Sandbox Code Playgroud)
有关详细信息,请参见http://www.doxygen.org/markdown.html#md_page_header.
Pas*_*cal 51
从v1.8.8开始,也有选项USE_MDFILE_AS_MAINPAGE.因此,请确保将索引文件(例如README.md)添加到INPUT并将其设置为此选项的值:
INPUT += README.md
USE_MDFILE_AS_MAINPAGE = README.md
Run Code Online (Sandbox Code Playgroud)
以下语法可能有助于为 doxygen 添加主页和相关子页面:
/*! \mainpage Drawing Shapes
*
* This project helps user to draw shapes.
* Currently two types of shapes can be drawn:
* - \subpage drawingRectanglePage "How to draw rectangle?"
*
* - \subpage drawingCirclePage "How to draw circle?"
*
*/
/*! \page drawingRectanglePage How to draw rectangle?
*
* Lorem ipsum dolor sit amet
*
*/
/*! \page drawingCirclePage How to draw circle?
*
* This page is about how to draw a circle.
* Following sections describe circle:
* - \ref groupCircleDefinition "Definition of Circle"
* - \ref groupCircleClass "Circle Class"
*/
Run Code Online (Sandbox Code Playgroud)
创建如下组也有助于设计页面:
/** \defgroup groupCircleDefinition Circle Definition
* A circle is a simple shape in Euclidean geometry.
* It is the set of all points in a plane that are at a given distance from a given point, the centre;
* equivalently it is the curve traced out by a point that moves so that its distance from a given point is constant.
* The distance between any of the points and the centre is called the radius.
*/
Run Code Online (Sandbox Code Playgroud)
小智 5
在文档中添加包含您的内容的任何文件,例如toc.h:
@ mainpage Manual SDK
<hr/>
@ section pageTOC Content
-# @ref Description
-# @ref License
-# @ref Item
...
Run Code Online (Sandbox Code Playgroud)
在你的Doxyfile:
INPUT = toc.h \
Run Code Online (Sandbox Code Playgroud)
示例(俄语):
scale-tech.ru/luckyBackupW/doc/html/index.html(来自web.archive.org)
scale-tech.ru/luckyBackupW/doc/html/toc_8h_source.html(来自web.archive.org)