强大的doxygen

工具下载及安装

  • Doxygen可以从一套源文件开始,生成HTML格式的在线类浏览器。笔者采用的版本是 Doxygen1.8.9.1

  • Microsoft HTML Help Workshop是微软开发,用于本工程创建*.chm文件,笔者上官网下载最新的 htmlhelp

  • Graphviz用于配合doxygen使用,提取函数之间、头文件之间的调用关系,笔者使用的版本是 graphviz-2.38 .

Doxywizard

图形界面的Doxygen工具,使用非常方便。

关键参数设定讲解
  • Wizard\Topics\Project\Project Name 项目名称
  • Wizard\Topics\Project\Project synopsis 项目提要,对项进行简要说明
  • Wizard\Topics\Project\Project version or id 项目版本号或ID号
  • Wizard\Topics\Project\Project logo 项目logo显示
  • Wizard\Topics\Project\Scan recursively 稍描递归,可以实现对子目录中的文件进行稍描,并且进行文档转换。
  • *

doxygen

翻译

Documenting the code//记录代码

Special comment blocks//特定的注释块
Comment blocks for C-like languages (C/C++/C#/Objective-C/PHP/Java)
    1. JavaDoc类型
/**  
 * ... text ...  
 */  
    1. Qt类型
注释
file
author
version
date
brief //简单描述

对于\brief命令,有几个

/*! \brief Brief description.  
 *         Brief description continued.  
 *
 *  Detailed description starts here.  
 */  

Special Commands

  • \a
  • \addindex
  • \addtogroup
  • \anchor
  • \arg
  • \attention
  • \author
  • \authors
  • \b
  • \brief
  • \bug
  • \c
  • \callergraph
  • \callgraph
  • \category
  • \cite
  • \class
  • \code
  • \cond
  • \copybrief
  • \copydetails
  • \copydoc
  • \copyright
  • \date
  • \def
  • \defgroup
  • \deprecated
  • \details
  • \diafile
  • \dir
  • \docbookonly
  • \dontinclude
  • \dot
  • \dotfile
  • \e
  • \else
  • \elseif
  • \em
  • \endcode
  • \endcond
  • \enddocbookonly
  • \enddot
  • \endhtmlonly
  • \endif
  • \endinternal
  • \endlatexonly
  • \endlink
  • \endmanonly
  • \endmsc
  • \endparblock
  • \endrtfonly
  • \endsecreflist
  • \endverbatim
  • \enduml
  • \endxmlonly
  • \enum
  • \example
  • \exception
  • \extends
  • \f$
  • \f[
  • \f]
  • \f{
  • \f}
  • \file
  • \fn
  • \headerfile
  • \hidecallergraph
  • \hidecallgraph
  • \hideinitializer
  • \htmlinclude
  • \htmlonly
  • \idlexcept
  • \if
  • \ifnot
  • \image
  • \implements
  • \include
  • \includelineno
  • \ingroup
  • \internal
  • \invariant
  • \interface
  • \latexinclude
  • \latexonly
  • \li
  • \line
  • \link
  • \mainpage
  • \manonly
  • \memberof
  • \msc
  • \mscfile
  • \n
  • \name
  • \namespace
  • \nosubgrouping
  • \note
  • \overload
  • \p
  • \package
  • \page
  • \par
  • \paragraph
  • \param
  • \parblock
  • \post
  • \pre
  • \private
  • \privatesection
  • \property
  • \protected
  • \protectedsection
  • \protocol
  • \public
  • \publicsection
  • \pure
  • \ref
  • \refitem
  • \related
  • \relates
  • \relatedalso
  • \relatesalso
  • \remark
  • \remarks
  • \result
  • \return
  • \returns
  • \retval
  • \rtfonly
  • \sa
  • \secreflist
  • \section
  • \see
  • \short
  • \showinitializer
  • \since
  • \skip
  • \skipline
  • \snippet
  • \startuml
  • \struct
  • \subpage
  • \subsection
  • \subsubsection
  • \tableofcontents
  • \test
  • \throw
  • \throws
  • \todo
  • \tparam
  • \typedef
  • \union
  • \until
  • \var
  • \verbatim
  • \verbinclude
  • \version
  • \vhdlflow
  • \warning
  • \weakgroup
  • \xmlonly
  • \xrefitem
  • $
  • \@
  • \
  • \&
  • \~
  • \<
  • >
  • #
  • \%
  • \”
  • .
  • ::
  • |
  • \–
  • \—
\attention { attention text } 注意文本

Starts a paragraph where a message that needs attention may be entered. The paragraph will be indented. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \attention commands will be joined into a single paragraph. The \attention command ends when a blank line or some other sectioning command is encountered.

\exception {exception description} 对一个异常对象进行注释。
\warning { warning message } 警告消息(一些需要注意的事情)

Starts a paragraph where one or more warning messages may be entered. The paragraph will be indented. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent \warning commands will be joined into a single paragraph. Each warning description will start on a new line. Alternatively, one \warning command may mention several warnings. The \warning command ends when a blank line or some other sectioning command is encountered. See section \author for an example.

\todo { things to be done } 对将要做的事情进行注释
\see {comment with reference to other items } 一段包含其他部分引用的注释,中间包含对其他代码项的名称,自动产生对其的引用链接。
\relates 通常用做把非成员函数的注释文档包含在类的说明文档中。
\since {text} 通常用来说明从什么版本、时间写此部分代码。
\deprecated
\pre { description of the precondition } 用来说明代码项的前提条件。
\post { description of the postcondition } 用来说明代码项之后的使用条件。
\code 在注释中开始说明一段代码,直到@endcode命令。
\@endcode 注释中代码段的结束。

技巧

如何在 “Main Page” 中添加内容
  1. 创建一个markdown文件
  2. 在文件的开头添加下面的代码

    • Key&LCD main page {#mainpage}
    • ============
  3. 编译后在main page中显示了markdown文件内容。

  4. 参考EthMoh中IR077K的README.md文件
如何换行
  • 在’.’后加空格可以实现单行实现换行操作。

参考代码:/** An enum type. More details */

显示结果:

An enum type.
More details

参考文档

http://www.tuicool.com/articles/imqi6ry

http://www.360doc.com/content/12/0812/14/7851074_229747305.shtml

http://blog.csdn.net/leehong2005/article/details/9137889

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值