You can use javadoc standard and then use doxygen that understands javadoc to generate a documentation.
In doxygen I recommend using the option JAVADOC_AUTOBRIEF set to YES. If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the first line (until the first dot) of a Javadoc-style comment as the brief description.
Example for a class definition:
/**
* A brief description. A more elaborate class description
* @param bool somebool a boolean argument.
* @see Test()
* @return The test results
*/
An option is to use the doxygen format of writing comments - this has the added benefit of being able to generate html/latex and other sorts of docs for your code.
发布评论
评论(4)
有许多不同的标准,如果您想生成文档,请尝试 doxygen
There are many different standards, if you want to generate documentation, try doxygen
您可以使用javadoc标准,然后使用理解javadoc的doxygen来生成文档。
在 doxygen 中,我建议使用选项
JAVADOC_AUTOBRIEF
设置为YES
。如果 JAVADOC_AUTOBRIEF 标记设置为 YES,那么 doxygen 会将 Javadoc 样式注释的第一行(直到第一个点)解释为简短描述。类定义示例:
(doxygen 手册中的更多示例)
安装是非常简单,有一个 GUI 和一个漂亮的图形可视化:
运行 gui 调用 doxywizard 并使用向导设置,只需在其中设置 JAVADOC_AUTOBRIEF “专家”设置。
You can use javadoc standard and then use doxygen that understands javadoc to generate a documentation.
In doxygen I recommend using the option
JAVADOC_AUTOBRIEF
set toYES
. If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the first line (until the first dot) of a Javadoc-style comment as the brief description.Example for a class definition:
(Some more examples in the doxygen manual)
Installation is really simple, there is a GUI and a nice graphical visualisation available with:
Run the gui calling
doxywizard
and use the Wizard settings, onlyJAVADOC_AUTOBRIEF
has to be set there in "Expert" settings.没有遵循贵公司强制执行的标准。
从项目创建文档的一种流行方法是使用 doxygen。
There are no standards follow the standard which your company mandates.
A popular way to create documentation from projects is to use doxygen.
一种选择是使用 doxygen 格式编写注释 - 这具有能够为代码生成 html/latex 和其他类型文档的额外好处。
An option is to use the doxygen format of writing comments - this has the added benefit of being able to generate html/latex and other sorts of docs for your code.