doxygen的特定命令

摘要:本文给出doxygen所支持的全部的一个列表,同时对其进行逐一解释与说明,对于使用doxygen来有重要参考价值。本文主要来自对doxygen官方文档的翻译。

概述

所有在文档中的命令都开始于一个反斜杠()或者是一个at-符号(@)。如果你喜欢,可以把所有的以反斜杠开头的命令都换成以at-符号开头的命令。 有些命令有一个或多个参数,每一个参数都其确定的范围:
  • 如果使用 <尖>括号说明参数是一个单独单词。
  • 如果使用(圆)括号说明参数一直到命令所在的结束。
  • 如果使用{大}括号说明参数一直延伸到本段结束。一个段落的结束以一个空行来标识,或者是一个段落标记。
  • 如果使用[中]括号说明参数是可选的。
下面是一个以字母顺序的列表,列表给出了所有可用的命令:
a | addindex | addtogroup | anchor | arg | attention | author | b | brief | bug | c |
copydoc | date | def | defgroup |deprecated | details | dir | dontinclude | dot |
dotfile | e | else |elseif | em |endcode | endcond | enddot | endhtmlonly | endif |
example | exception | extends | f$ | f[ | f] | f{ | f} | file | fn | headerfile | hideinitializer |
internal | invariant | interface | latexonly | li | line | link | mainpage |manonly | memberof |
msc | n | name | namespace | nosubgrouping |note | overload | p | package | page | par |
return | retval | sa | section | see | showinitializer | since | skip |skipline | struct |
$ | @ |  | & | ~ | < | > | # | % | "
下一节我们将具体介绍所有doxygen认识的命令,对于不认识的命令doxygen把它当作一般的文本。

命令的具体介绍

addtogroup <name> [(title)]

本命令就像defgroup定义一个组,但它不会因为多次使用相同的名字而收到一个警告。这些组会在最后合并到一起,形成一个逻辑上的大组。 标题是可选的,所以本命令也可以把一些对象加入一个已经存在的组中,使用@{ 和 @}的形式,如下:
/*!addtogroup mygrp *  Additional documentation for group `mygrp' *  @{ *//*! *  A function */ void func1() { }/*!Another function */ void func2() { }/*!@} */
参看:
页面分组, 命令defgroupingroup 和 weakgroup

callgraph

当这个命令在一个函数或方法的注释里,并且设置文件中的HAVE_DOT被设置为“YES”,那么doxygen会产生出一个函数调用图。此时不会理会设置文件中的CALL_GRAPH选项的值。
注意:
这个调用图的完整性与正确性依赖于doxygen的解析,目前它还不是完美的。

callergraph

当这个命令在一个函数或方法的注释里,并且设置文件中的HAVE_DOT被设置为“YES”,那么doxygen会产生出一个函数调用者图。此时不会理会设置文件中的CALLER_GRAPH选项的值。
注意:
这个调用者图的完整性与正确性依赖于doxygen的解析,目前它还不是完美的。

category <name> [<header-file>] [<header-name>]

仅针对于带类的C:说明这个文档块属于一个类,它的名字叫<name>。 这个命令的参数意义与命令class一样。
参看:
章节class

class <name> [<header-file>] [<header-name>]

指明一个文档块属于一个类,它的名字叫<name>,header-file与header-name是可选的。如果header-file被指定,那么会产生一个指定该头文件复本的一个链接。如果header-name被指定,那么就可以覆盖该链接的标题,以及文档中其它使用这头文件的情况,当一个头文件存在于一个非标准的搜索目录时很有用(比如<X11/X.h>)。通过header-name你可以指定这个“include”的指令显示的效果,是在名字周围加双引号或是加尖括号。当没有指定时,尖括号是默认的效果。请注意,这两个参数可以通过命令headerfile单独指定。
示例:
/* A dummy class */ class Test { };/*!class Test class.h "inc/class.h" *  rief This is a test class. * * Some details about the Test class */
点击 这里 看看这段代码的产生的文档。

def <name>

指出这块注释属于一个#define宏。
示例:
/*!file define.h rief testing definesThis is to test the documentation of defines. *//*!  def MAX(x,y) Computes the maximum of a x and a y. *//*!   Computes the absolute value of its argument a x. */ #define ABS(x) (((x)&gt;0)?(x):-(x)) #define MAX(x,y) ((x)&gt;(y)?(x):(y)) #define MIN(x,y) ((x)&gt;(y)?(y):(x)) /*!&gt; Computes the minimum of a x and a y. */
点击 这里 查看这这段代码产生的文档。

defgroup <name> (group title)

这指明当前的注释块属于一个类、文件或名字空间分组。这被用于把类、文件或名字空间放于一个组。你同时也可以把一个组放于另一个组里,这样形成一个继承的结构。 <name> 参数应该是一个单独的标识符。
参看:
页面 分组, 章节 ingroupaddtogroupweakgroup

dir [<path fragment>]

指明当前注释块包含一个目录的文档。参数“path fragment”应该包含目录名,并且足够用于区分不同的目录。选项SHOW_DIRECTORIES用于指明是否显示一个目录的信息,STRIP_FROM_PATH用于指明在输出时过虑掉的前缀。

enum <name>

指明当前注释块包含一个枚举类型的文档,这个枚举类型的名字是“name”。如果这个枚举是一个类的成员,并且文档不在类的里面,那么作用域类也应该指出。如果当前的注释块放在一个枚举声明的前面,这个 enum 命令可以省去。
注意:
匿名的枚举类型是不能文档化的,但是匿名的枚举值是可以的。
注意:
一个匿名的枚举类型是不能文档化的,但是它的值可以。
示例:
class Test { public: enum TEnum { Val1, Val2 };/*!Another enum, with inline docs */ enum AnotherEnum { V1, /*!&lt; value 1 */ V2  /*!&lt; value 2 */ }; };/*!class Test * The class description. *//*!enum Test::TEnum * A description of the enum type. *//*!var Test::TEnum Test::Val1 * The description of the first enum value. */
点击这里 查看由doxygen生成的相应的文档。

example <file-name>

指明一个注释块包含的文档属于一个源代码示例。源代码文件的名字叫<file-name>。这个文件的内容将被包含在文档中,在这本块注释产生的文档之后。所有的示例被放在一个列表之中。源代码会被扫描,以发现其中已文档化的成员和类。如果发现了,会在文档产生一个交叉引用。源代码的文件或目录可能通过配制选项EXAMPLE_PATH,在配制文件中指定。 如果<file-name>不在EXAMPLE_PATH中,你可以指定一个绝对路径来使用它。 如果这个示例存在多个源代码,命令 include 可以被使用。
示例:
/** A Test class. *  More details about this class. */class Test { public: /** An example member function. *  More details about this function. */ void example(); };void Test::example() {}/** example example_test.cpp * This is an example of how to use the Test class. * More details about this example. */
这里example_test.cpp的内容如下:
void main() { Test t; t.example(); }
点击这里 查看由doxygen产生的相应的文档。
参考:
章节 include.

extends <name>

此命令可用于手动指示一个继承关系,当编程语言本身不支持这个概念(如C)。 在示例文件夹中的manual.c文件展示了如何使用这个命令。 点击这里查看由doxygen生成的相应的文档。
相关参考
章节 implements 和章节 memberof

file [<name>]

表明一个注释块包含一个源文件或头文件文档,它的名称是<name> 。这里的名字可以包含路径,如果文件名不唯一的。如果文件名被省略(比如,在 file 后面是空白),file 所产生的文档属于命令所在的文件的文档。
重要:
只有文件本身是文档化的的时候,文件所定义的全局变量、函数、类型别名、枚举的文档才使包含在输出。
例如:
/** file file.h * A brief file description. * A more elaborated file description. */
/** * A global integer value. * More details about this value. */ extern int globalValue;
点击这里查看由doxygen生成的相应的文档。
注意:
在上面的示例中,JAVADOC_AUTOBRIEF 选项已经被设置为“YES”。

fn (函数声明)

表明一个注释块包含一个函数(全局或作为一个类的成员)的文档。只有当注释块不在函数的声明或定义的前面(或者后面)时才需要这个命令。 如果注释块函数声明或定义的前面时,这个命令可以也应该省略。 一个完整的函数声明,包括参数在内,需要在 fn 的 单独 一行,这是因为 fn 命令的参数在行结束时结束。
警告:
不要使用此命令,如果不是绝对必要,因为它会导致信息重复,从而错误。
例如:
class Test { public: const char *member(char,int) throw(std::out_of_range); };
const char *Test::member(char c,int n) throw(std::out_of_range) {} /*!class Test * rief Test class. * * Details about Test. */ /*!fn const char *Test::member(char c,int n) *  rief A member function. *  param c a character. *  param n an integer. *  exception std::out_of_range parameter is out of range. *   eturn a character pointer. */ 点击这里查看由doxygen生成的相应的文档。
相关参考
章节 var 和章节  ypedef

headerfile <header-file> [<header-name>]

用于生成class、struct、union 文档,文档应该在定义之前。这个命令的参数与命令 cmdclass的第二、第三参数相同。<header-file> 应该是一个包含相应class、struct、union定义的文件。该<header-name>参数可以被用来覆盖的是在文档中使用的类的东西以外的其他链接名称<header-file> 。这可能是有用的,如果名称不在默认的包含路径(如<X11/X.h> )。 使用<header-name>参数,你可以指定 include 语句的风格,是使用双引号还是使用尖括号。如果没有指定,默认地,使用尖括号。 如果只给出一对双引号,而没有 <header-file> 或者 <header-name> 参数,此时当前文件会使用双引号替换。所以,如果一个 headerfile 命令的注释块在文件test.h内部,那么下面3个方式是相同的:
headerfile test.h "test.h"
headerfile test.h ""
headerfile ""
如果想使用尖括号风格的,你不需要额外指定信息,不过你需要显式指定使用尖括号:
headerfile test.h <test.h>
headerfile test.h <>
headerfile <>
与全局的设置相反的,你可以通过把 FORCE_LOCAL_INCLUDES 设置为 YES 来使用局部的包含行为。 为了不把所有的包含信息合并,可以设置 SHOW_INCLUDE_FILES 为 NO

hideinitializer

默认情况,当一个值的定义或初始化式的长度不大于30行的时候,定义或初始式会被显示。通过把这个命令插入定义或初始式中来隐藏它们。
相关参考
小节 showinitializer

implements <name>

此命令可用于手动指示一个继承关系,当编程语言本身不支持这个概念(如C)。 在示例文件夹中的manual.c文件展示了如何使用这个命令。 点击这里查看由doxygen生成的相应的文档。
相关参考
小节 extends 和小节 memberof

ingroup (<groupname> [<groupname> <groupname>])

如果 ingroup 命令放置于一个类、文件或名字空间的注释块,那么它将会被加入这个组,或者说被分入名字为 <groupname> 的组。
相关参考
页面 Grouping,小节 defgroupaddtogroup 和 weakgroup

interface <name> [<header-file>] [<header-name>]

表明一个注释块包含一个接口的文件,这个接口的名字是 <name>。这些参数的意义与 class 命令相同。
相关参考
小节 class

internal

这个命令在输出中加入“仅供内部使用”的文本,并且在命令 internal 之后 直到注释块或小节(哪个先达到)结束的全部文本都标记为“内部使用的”。 如果命令 internal 在一个小节内部(参看section 示例)),那么在这个命令之后的包括全部子小节都被认为是内部的。只有一个新的小节,并且与当前的小节是同一等级的,才会改变这个情况。 你可以在设置文件里设置 INTERNAL_DOCS 的值来控制内部文档的显示或隐藏。

mainpage [(title)]

如果 mainpage 被放置于一个注释块里,那么这个注释块将被用于产生一个首页(在HTML的输出中)或者是第一章(在$mbox{LaTeX}$中)。 标题参数是可选的,在doxygen生成的过程中它会替代默认的标题。如果不想有一个标题,你可以指定notitle 作为 mainpage 的参数。 这是一个示例:
/*!mainpage 我的个人定制首页 * * section intro_sec  概述 * * 这是概述 * * section install_sec 安装 * * subsection step1 Step 1: Opening the box * * 等等…… */
你可以通过 ef index 来引用首页。 ( 如果树视图被禁用了,你可以使用 ef main)
相关参考
小节 section,小节 subsection 以及小节 page

memberof <name>

这个命令指定一个函数是一个类的成员,它处理的方式与 elates 很相似,两者唯一的区别是这个命令使得那个函数被作为一个真正的成员来处理。这是非常有用的,当程序设计记语言本身不支持成员函数的概念时(比如C语言)。 这个命令可以与 publicprotected 或者 private 一同使用。 在示例文件夹中的manual.c文件展示了如何使用这个命令。 点击这里查看由doxygen生成的相应的文档。
相关参考
小节 extendsimplements, publicprotected 以及 private

ame (header)

这个命令把注释块放到一个成员组的头文件定义中。这个注释块应该紧跟着这样的 //@{ ... //@} 结构,这个结构包含这个组的成员。 参见 Member Groups 的示例。

amespace <name>

指明当前注释块包含一个名字空间的文档,这个名字空间有一个标识符 <name>。

osubgrouping

这个命令可以放在一个类的文档内部。它可以与成员分组一起使用,这个命令的使用可以避免doxygen把一个成员组当作Public/Protected/Private/……等等小节的子组。

overload [(函数声明)]

此命令可用于生成一个重载成员函数下列标准文本: “这是一个提供便利的重载的成员函数。它与之前函数的区别只在于它们接受的参数不同。” 如果该重载成员函数的文档不是放置在函数声明或定义的上部,可选的参数会被使用以确定正确的函数。 在当前文档块内的任何其它的文档都会添加在这个消息之后。
注1:
你需要保证确实存在一个较早文档化的成员被这个函数重载。为了阻止文档被排序,你需要把选项SORT_MEMBER_DOCS设置为NO。
注2:
overload命令在单行注释里不起作用。
例如:
class Test { public: void drawRect(int,int,int,int); void drawRect(const Rect &amp;r); };
void Test::drawRect(int x,int y,int w,int h) {} void Test::drawRect(const Rect &amp;r) {} /*!class Test *  rief A short description. * *  More text. */ /*!fn void Test::drawRect(int x,int y,int w,int h) * This command draws a rectangle with a left upper corner at ( a x , a y ), * width a w and height a h. */ /*! * overload void Test::drawRect(const Rect &amp;r) */ 点击这里查看由doxygen生成的相应的文档。

package <name>

指明一个注释块包含一个名为<name>的Java包的文档。

page <名字> (标题)

指出一个注释块包含一块文档,这些文档不是直接与一个特定的类、文件或成员相关联。HTML产生器将创建一个单独的页面来包含这个文档。$mbox{LaTeX}$在章节里,产生器将新建一个小节。
例如:
/*!page page1 A documentation page Leading text. section sec An example section This page contains the subsections ef subsection1 and ef subsection2. For more info see page ef page2. subsection subsection1 The first subsection Text. subsection subsection2 The second subsection More text. */
/*!page page2 Another page Even more info. */ 点击这里查看由doxygen生成的相应的文档。
注意:
参数<名字>只能包含字母和数字的组合。在<名字>参数里,如果你想使用大写字母(如MYPAGE1),或者混合大小写(如MyPage1),你应该设置CASE_SENSE_NAMES的值为YES。然而这只有当你的文件系统是大小写敏感才是可取。否则的话(为了更好的移植性)你应该总是使用小写字母(如mypage1)来作为<名字>,在所有引用这个页的地方都只要简单地使用小写。
相关参考
小节section,小节 subsection和小节 ef

private

Indicates that the member documented in the comment block is private, i.e., should only be accessed by other members in the same class. Note that Doxygen automatically detects the protection level of members in object-oriented languages. This command is intended for use only when the language does not support the concept of protection level natively (e.g. C, PHP 4). For starting a section of private members, in a way similar to the "private:" class marker in C++, use privatesection.
相关参考
sections memberofpublic, and protected.

property (qualified property name)

Indicates that a comment block contains documentation for a property (either global or as a member of a class). This command is equivalent to var and fn.
相关参考
section fn and var.

protected

Indicates that the member documented in the comment block is protected, i.e., should only be accessed by other members in the same or derived classes. Note that Doxygen automatically detects the protection level of members in object-oriented languages. This command is intended for use only when the language does not support the concept of protection level natively (e.g. C, PHP 4). For starting a section of protected members, in a way similar to the "protected:" class marker in C++, use protectedsection.
相关参考
sections memberofpublic, and private.

protocol <name> [<header-file>] [<header-name>]

Indicates that a comment block contains documentation for a protocol in Objective-C with name <name>. 这些参数的意义与 class 命令相同。
相关参考
小节 class

public

Indicates that the member documented in the comment block is public, i.e., can be accessed by any other class or function. Note that Doxygen automatically detects the protection level of members in object-oriented languages. This command is intended for use only when the language does not support the concept of protection level natively (e.g. C, PHP 4). For starting a section of public members, in a way similar to the "public:" class marker in C++, use publicsection.
相关参考
sections memberofprotected and private.

elates <name>

This command can be used in the documentation of a non-member function <name>. It puts the function inside the `related function' section of the class documentation. This command is useful for documenting non-friend functions that are nevertheless strongly coupled to a certain class. It prevents the need of having to document a file, but only works for functions.
例如:
/*! * A String class. */
class String { friend int strcmp(const String &amp;,const String &amp;); }; /*! * Compares two strings. */ int strcmp(const String &amp;s1,const String &amp;s2) { } /*! elates String * A string debug function. */ void stringDebug() { } 点击这里查看由doxygen生成的相应的文档。

elatesalso <name>

This command can be used in the documentation of a non-member function <name>. It puts the function both inside the `related function' section of the class documentation as well as leaving its normal file documentation location. This command is useful for documenting non-friend functions that are nevertheless strongly coupled to a certain class. It only works for functions.

showinitializer

By default the value of a define and the initializer of a variable are only displayed if they are less than 30 lines long. By putting this command in a comment block of a define or variable, the initializer is shown unconditionally.
相关参考
section hideinitializer.

struct <name> [<header-file>] [<header-name>]

Indicates that a comment block contains documentation for a struct with name <name>. 这些参数的意义与 class 命令相同。
相关参考
小节 class

ypedef (typedef declaration)

Indicates that a comment block contains documentation for a typedef (either global or as a member of a class). This command is equivalent to var and fn.
相关参考
section fn and var.

union <name> [<header-file>] [<header-name>]

Indicates that a comment block contains documentation for a union with name <name>. 这些参数的意义与 class 命令相同。
相关参考
小节 class

var (variable declaration)

Indicates that a comment block contains documentation for a variable or enum value (either global or as a member of a class). This command is equivalent to ypedef and fn.
相关参考
section fn and  ypedef.

weakgroup <name> [(title)]

Can be used exactly like addtogroup, but has a lower priority when it comes to resolving conflicting grouping definitions.
相关参考
page Grouping and addtogroup.

--- Section indicators ---


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.

author { list of authors }

Starts a paragraph where one or more author names 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 author commands will be joined into a single paragraph. Each author description will start a new line. Alternatively, one author command may mention several authors. The author command ends when a blank line or some other sectioning command is encountered.
例如:
/*!class WindowsNT *  rief Windows Nice Try. *  author Bill Gates *  author Several species of small furry animals gathered together *          in a cave and grooving with a pict. *  version 4.0 *  date    1996-1998 *  ug It crashes a lot and requires huge amounts of memory. *  ug The class introduces the more bugs, the longer it is used. *  warning This class may explode in your face. *  warning If you inherit anything from this class, you're doomed. */
class WindowsNT {}; Click here for the corresponding HTML documentation that is generated by doxygen.

rief {brief description}

Starts a paragraph that serves as a brief description. For classes and files the brief description will be used in lists and at the start of the documentation page. For class and file members, the brief description will be placed at the declaration of the member and prepended to the detailed description. A brief description may span several lines (although it is advised to keep it brief!). A brief description ends when a blank line or another sectioning command is encountered. If multiple rief commands are present they will be joined. See section author for an example. Synonymous to short.

ug { bug description }

Starts a paragraph where one or more bugs may be reported. 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 ug commands will be joined into a single paragraph. Each bug description will start on a new line. Alternatively, one ug command may mention several bugs. The ug command ends when a blank line or some other sectioning command is encountered. See section author for an example.

cond [<section-label>]

Starts a conditional section that ends with a corresponding endcond command, which is typically found in another comment block. The main purpose of this pair of commands is to (conditionally) exclude part of a file from processing (in older version of doxygen this could only be achieved using C preprocessor commands). The section between cond and endcond commands can be included by adding its section label to the ENABLED_SECTIONS configuration option. If the section label is omitted, the section will be excluded from processing unconditionally. For conditional sections within a comment block one should use a if ... endif block. Conditional sections can be nested. In this case a nested section will only be shown if it and its containing section are included. Here is an example showing the commands in action:
/** An interface */ class Intf { public: /** A method */ virtual void func() = 0;
/// @cond TEST /** A method used for testing */ virtual void test() = 0; /// @endcond }; /// @cond DEV /* *  The implementation of the interface */ class Implementation : public Intf { public: void func(); /// @cond TEST void test(); /// @endcond /// @cond /** This method is obsolete and does *  not show up in the documentation. */ void obsolete(); /// @endcond }; /// @endcond The output will be different depending on whether or not ENABLED_SECTIONS contains TEST, or DEV

date { date description }

Starts a paragraph where one or more dates 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 date commands will be joined into a single paragraph. Each date description will start on a new line. Alternatively, one date command may mention several dates. The date command ends when a blank line or some other sectioning command is encountered. See section author for an example.

deprecated { description }

Starts a paragraph indicating that this documentation block belongs to a deprecated entity. Can be used to describe alternatives, expected life span, etc.

details {detailed decription}

Just like rief starts a brief description, details starts the detailed description. You can also start a new paragraph (blank line) then the details command is not needed.

else

Starts a conditional section if the previous conditional section was not enabled. The previous section should have been started with a ififnot, or elseif command.
相关参考
ififnotelseifendif.

elseif <section-label>

Starts a conditional documentation section if the previous section was not enabled. A conditional section is disabled by default. To enable it you must put the section-label after the ENABLED_SECTIONS tag in the configuration file. Conditional blocks can be nested. A nested section is only enabled if all enclosing sections are enabled as well.
相关参考
sections endififnotelse, and elseif.

endcond

Ends a conditional section that was started by cond.
相关参考
cond.

endif

Ends a conditional section that was started by if or ifnot For each if or ifnot one and only one matching endif must follow.
相关参考
if, and ifnot.

exception <exception-object> { exception description }

Starts an exception description for an exception object with name <exception-object>. Followed by a description of the exception. The existence of the exception object is not checked. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent exception commands will be joined into a single paragraph. Each parameter description will start on a new line. The exception description ends when a blank line or some other sectioning command is encountered. See section fn for an example.
注意:
the tag exceptions is a synonym for this tag.

if <section-label>

Starts a conditional documentation section. The section ends with a matching endif command. A conditional section is disabled by default. To enable it you must put the section-label after the ENABLED_SECTIONS tag in the configuration file. Conditional blocks can be nested. A nested section is only enabled if all enclosing sections are enabled as well.
例如:
/*!Unconditionally shown documentation. *  if Cond1 *    Only included if Cond1 is set. *  endif *  if Cond2 *    Only included if Cond2 is set. *    if Cond3 *      Only included if Cond2 and Cond3 are set. *    endif *    More text. *  endif *  Unconditional text. */
You can also use conditional commands inside aliases. To document a class in two languages you could for instance use:
Example 2:
/*!english *  This is English. *  endenglish *  dutch *  Dit is Nederlands. *  enddutch */ class Example { };
Where the following aliases are defined in the configuration file:
ALIASES  = "english=if english" "endenglish=endif" "dutch=if dutch" "enddutch=endif"
and ENABLED_SECTIONS can be used to enable either english or dutch.
相关参考
sections endififnotelse, and elseif.

ifnot <section-label>

Starts a conditional documentation section. The section ends with a matching endif command. This conditional section is enabled by default. To disable it you must put the section-label after the ENABLED_SECTIONS tag in the configuration file.
相关参考
sections endififelse, and elseif.

invariant { description of invariant }

Starts a paragraph where the invariant of an entity can be described. 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 invariant commands will be joined into a single paragraph. Each invariant description will start on a new line. Alternatively, one invariant command may mention several invariants. The invariant command ends when a blank line or some other sectioning command is encountered.

ote { text }

Starts a paragraph where a note can 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 ote commands will be joined into a single paragraph. Each note description will start on a new line. Alternatively, one ote command may mention several notes. The ote command ends when a blank line or some other sectioning command is encountered. See section par for an example.

par [(paragraph title)] { paragraph }

If a paragraph title is given this command starts a paragraph with a user defined heading. The heading extends until the end of the line. The paragraph following the command will be indented. If no paragraph title is given this command will start a new paragraph. This will also work inside other paragraph commands (like param or warning) without ending the that command. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. The par command ends when a blank line or some other sectioning command is encountered.
例如:
/*!class Test * Normal text. * * par User defined paragraph: * Contents of the paragraph. * * par * New paragraph under the same heading. * * ote * This note consists of two paragraphs. * This is the first paragraph. * * par * And this is the second paragraph. * * More normal text. */
class Test {}; 点击这里查看由doxygen生成的相应的文档。

param <parameter-name> { parameter description }

Starts a parameter description for a function parameter with name <parameter-name>, followed by a description of the parameter. The existence of the parameter is checked and a warning is given if the documentation of this (or any other) parameter is missing or not present in the function declaration or definition. The param command has an optional attribute specifying the direction of the attribute. Possible values are "in" and "out". Here is an example for the function memcpy:
<span class="comment">/*!</span> <span class= "comment"> Copies bytes from a source memory area to a destination memory area,</span> <span> where both areas may not overlap.</span> <span class= "comment"> @param[out] dest The memory area to copy to.</span> <span class= "comment"> @param[in]  src  The memory area to copy from.</span> <span class= "comment"> @param[in]  n    The number of bytes to copy</span> <span> */</span> <span class="keywordtype">void</span> memcpy(<span class= "keywordtype">void</span> *dest, <span class= "keyword">const</span> <span class= "keywordtype">void</span> *src, <span class= "keywordtype">size_t</span> n);
If a parameter is both input and output, use [in,out] as an attribute. The parameter description is a paragraph with no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent param commands will be joined into a single paragraph. Each parameter description will start on a new line. The param description ends when a blank line or some other sectioning command is encountered. See section fn for an example.

param <template-parameter-name> { description }

Starts a template parameters for a class or function template parameter with name <template-parameter-name>, followed by a description of the template parameter. Otherwise similar to cmdparam.

post { description of the postcondition }

Starts a paragraph where the postcondition of an entity can be described. 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 post commands will be joined into a single paragraph. Each postcondition will start on a new line. Alternatively, one post command may mention several postconditions. The post command ends when a blank line or some other sectioning command is encountered.

pre { description of the precondition }

Starts a paragraph where the precondition of an entity can be described. 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 pre commands will be joined into a single paragraph. Each precondition will start on a new line. Alternatively, one pre command may mention several preconditions. The pre command ends when a blank line or some other sectioning command is encountered.

emarks { remark text }

Starts a paragraph where one or more remarks 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 emark commands will be joined into a single paragraph. Each remark will start on a new line. Alternatively, one emark command may mention several remarks. The emark command ends when a blank line or some other sectioning command is encountered.

eturn { description of the return value }

Starts a return value description for a function. The text of the paragraph has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent eturn commands will be joined into a single paragraph. The eturn description ends when a blank line or some other sectioning command is encountered. See section fn for an example.

etval <return value> { description }

Starts a return value description for a function with name <return value>. Followed by a description of the return value. The text of the paragraph that forms the description has no special internal structure. All visual enhancement commands may be used inside the paragraph. Multiple adjacent etval commands will be joined into a single paragraph. Each return value description will start on a new line. The etval description ends when a blank line or some other sectioning command is encountered.

sa { references }

Starts a paragraph where one or more cross-references to classes, functions, methods, variables, files or URL may be specified. Two names joined by either :: or # are understood as referring to a class and one of its members. One of several overloaded methods or constructors may be selected by including a parenthesized list of argument types after the method name. Synonymous to see.
相关参考
section autolink for information on how to create links to objects.

see { references }

Equivalent to sa. Introduced for compatibility with Javadoc.

since { text }

This tag can be used to specify since when (version or time) an entity is available. The paragraph that follows since does not have any special internal structure. All visual enhancement commands may be used inside the paragraph. The since description ends when a blank line or some other sectioning command is encountered.

est { paragraph describing a test case }

Starts a paragraph where a test case can be described. The description will also add the test case to a separate test list. The two instances of the description will be cross-referenced. Each test case in the test list will be preceded by a header that indicates the origin of the test case.

hrow <exception-object> { exception description }

Synonymous to exception (see section exception).
注意:
the tag hrows is a synonym for this tag.

odo { paragraph describing what is to be done }

Starts a paragraph where a TODO item is described. The description will also add an item to a separate TODO list. The two instances of the description will be cross-referenced. Each item in the TODO list will be preceded by a header that indicates the origin of the item.

version { version number }

Starts a paragraph where one or more version strings 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 version commands will be joined into a single paragraph. Each version description will start on a new line. Alternatively, one version command may mention several version strings. The version command ends when a blank line or some other sectioning command is encountered. See section author for an example.

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.

xrefitem <key> "(heading)" "(list title)" {text}

This command is a generalization of commands such as  odo and ug. It can be used to create user-defined text sections which are automatically cross-referenced between the place of occurrence and a related page, which will be generated. On the related page all sections of the same type will be collected. The first argument <key> is a identifier uniquely representing the type of the section. The second argument is a quoted string representing the heading of the section under which text passed as the forth argument is put. The third argument (list title) is used as the title for the related page containing all items with the same key. The keys "todo", "test", "bug", and "deprecated" are predefined. To get an idea on how to use the xrefitem command and what its effect is, consider the todo list, which (for English output) can be seen an alias for the command
xrefitem todo "Todo" "Todo List" 
Since it is very tedious and error-prone to repeat the first three parameters of the command for each section, the command is meant to be used in combination with the ALIASES option in the configuration file. To define a new command eminder, for instance, one should add the following line to the configuration file:
ALIASES += "reminder=xrefitem reminders "Reminder" "Reminders"" 
Note the use of escaped quotes for the second and third argument of the xrefitem command.

--- Commands to create links ---


addindex (text)

This command adds (text) to the $mbox{LaTeX}$ index.

anchor <word>

This command places an invisible, named anchor into the documentation to which you can refer with the ef command.
注意:
Anchors can currently only be put into a comment block that is marked as a page (using page) or mainpage (mainpage).
相关参考
section  ef.

This command ends a link that is started with the link command.
相关参考
section link.

The links that are automatically generated by doxygen always have the name of the object they point to as link-text. The link command can be used to create a link to an object (a file, class, or member) with a user specified link-text. The link command should end with an endlink command. All text between the link and endlink commands serves as text for a link to the <link-object> specified as the first argument of link. See section autolink for more information on automatically generated links and valid link-objects.

ef <name> ["(text)"]

Creates a reference to a named section, subsection, page or anchor. For HTML documentation the reference command will generate a link to the section. For a sections or subsections the title of the section will be used as the text of the link. For anchor the optional text between quotes will be used or <name> if no text is specified. For $mbox{LaTeX}$ documentation the reference command will generate a section number for sections or the text followed by a page number if <name> refers to an anchor.
相关参考
Section page for an example of the ef command.

subpage <name> ["(text)"]

This command can be used to create a hierarchy of pages. The same structure can be made using the defgroup and ingroup commands, but for pages the subpage command is often more convenient. The main page (see mainpage) is typically the root of hierarchy. This command behaves similar as  ef in the sense that it creates a reference to a page labeled <name> with the optional link text as specified in the second argument. It differs from the ef command in that it only works for pages, and creates a parent-child relation between pages, where the child page (or sub page) is identified by label <name>. See the section and subsection commands if you want to add structure without creating multiple pages.
注意:
Each page can be the sub page of only one other page and no cyclic relations are allowed, i.e. the page hierarchy must have a tree structure.
这是一个示例:
/*!mainpage A simple manual Some general info. This manual is divided in the following sections: - subpage intro - subpage advanced "Advanced usage" */ //----------------------------------------------------------- /*!page intro Introduction This page introduces the user to the topic. Now you can proceed to the ef advanced "advanced section". */ //----------------------------------------------------------- /*!page advanced Advanced Usage This page is for advanced users. Make sure you have first read ef intro "the introduction". */

section <section-name> (section title)

Creates a section with name <section-name>. The title of the section should be specified as the second argument of the section command.
警告:
This command only works inside related page documentation and not in other documentation blocks!

subsection <subsection-name> (subsection title)

Creates a subsection with name <subsection-name>. The title of the subsection should be specified as the second argument of the subsection command.
警告:
This command only works inside a section of a related page documentation block and not in other documentation blocks!
相关参考
Section page for an example of the subsection command.

subsubsection <subsubsection-name> (subsubsection title)

Creates a subsubsection with name <subsubsection-name>. The title of the subsubsection should be specified as the second argument of the subsubsection command.
警告:
This command only works inside a subsection of a related page documentation block and not in other documentation blocks!
相关参考
Section page for an example of the subsubsection command.

paragraph <paragraph-name> (paragraph title)

Creates a named paragraph with name <paragraph-name>. The title of the paragraph should be specified as the second argument of the paragraph command.
警告:
This command only works inside a subsubsection of a related page documentation block and not in other documentation blocks!
相关参考
Section page for an example of the paragraph command.

--- Commands for displaying examples ---


dontinclude <file-name>

This command can be used to parse a source file without actually verbatim including it in the documentation (as the include command does). This is useful if you want to divide the source file into smaller pieces and add documentation between the pieces. Source files or directories can be specified using the EXAMPLE_PATH tag of doxygen's configuration file. The class and member declarations and definitions inside the code fragment are `remembered' during the parsing of the comment block that contained the dontinclude command. For line by line descriptions of source files, one or more lines of the example can be displayed using the line, skip, skipline, and until commands. An internal pointer is used for these commands. The dontinclude command sets the pointer to the first line of the example.
例如:
/*!A test class. */ class Test { public: /// a member function void example(); }; /*!page example *  dontinclude example_test.cpp *  Our main function starts like this: *  skip main *  until { *  First we create a object c t of the Test class. *  skipline Test *  Then we call the example member function *  line example *  After that our little test routine ends. *  line } */
Where the example file example_test.cpp looks as follows:
void main() { Test t; t.example(); }
点击这里查看由doxygen生成的相应的文档。
相关参考
sections lineskipskipline, and until.

include <file-name>

This command can be used to include a source file as a block of code. The command takes the name of an include file as an argument. Source files or directories can be specified using the EXAMPLE_PATH tag of doxygen's configuration file. If <file-name> itself is not unique for the set of example files specified by the EXAMPLE_PATH tag, you can include part of the absolute path to disambiguate it. Using the include command is equivalent to inserting the file into the documentation block and surrounding it with code and endcode commands. The main purpose of the include command is to avoid code duplication in case of example blocks that consist of multiple source and header files. For a line by line description of a source files use the dontinclude command in combination with the lineskipskipline, and until commands.
注意:
Doxygen's special commands do not work inside blocks of code. It is allowed to nest C-style comments inside a code block though.
相关参考
section exampledontinclude, and section verbatim.

includelineno <file-name>

This command works the same way as include, but will add line numbers to the included file.
相关参考
section include.

line ( pattern )

This command searches line by line through the example that was last included using include or dontinclude until it finds a non-blank line. If that line contains the specified pattern, it is written to the output. The internal pointer that is used to keep track of the current line in the example, is set to the start of the line following the non-blank line that was found (or to the end of the example if no such line could be found). See section dontinclude for an example.

skip ( pattern )

This command searches line by line through the example that was last included using include or dontinclude until it finds a line that contains the specified pattern. The internal pointer that is used to keep track of the current line in the example, is set to the start of the line that contains the specified pattern (or to the end of the example if the pattern could not be found). See section dontinclude for an example.

skipline ( pattern )

This command searches line by line through the example that was last included using include or dontinclude until it finds a line that contains the specified pattern. It then writes the line to the output. The internal pointer that is used to keep track of the current line in the example, is set to the start of the line following the line that is written (or to the end of the example if the pattern could not be found).
注意:
The command:
skipline pattern
is equivalent to:
skip pattern
line pattern
See section dontinclude for an example.

until ( pattern )

This command writes all lines of the example that was last included using include or dontinclude to the output, until it finds a line containing the specified pattern. The line containing the pattern will be written as well. The internal pointer that is used to keep track of the current line in the example, is set to the start of the line following last written line (or to the end of the example if the pattern could not be found). See section dontinclude for an example.

verbinclude <file-name>

This command includes the file <file-name> verbatim in the documentation. The command is equivalent to pasting the file in the documentation and placing verbatim and endverbatim commands around it. Files or directories that doxygen should look for can be specified using the EXAMPLE_PATH tag of doxygen's configuration file.

htmlinclude <file-name>

This command includes the file <file-name> as is in the HTML documentation. The command is equivalent to pasting the file in the documentation and placing htmlonly and endhtmlonly commands around it. Files or directories that doxygen should look for can be specified using the EXAMPLE_PATH tag of doxygen's configuration file.

--- Commands for visual enhancements ---

a <word>

Displays the argument <word> using a special font. Use this command to refer to member arguments in the running text.
例如:
... the a x and a y coordinates are used to ...
This will result in the following text: ... the x and y coordinates are used to ...

arg { item-description }

This command has one argument that continues until the first blank line or until another arg is encountered. The command can be used to generate a simple, not nested list of arguments. Each argument should start with a arg command.
例如:
Typing:
arg c AlignLeft left alignment. arg c AlignCenter center alignment. arg c AlignRight right alignment
No other types of alignment are supported. will result in the following text:
  • AlignLeft left alignment.
  • AlignCenter center alignment.
  • AlignRight right alignment
No other types of alignment are supported.
注意:
For nested lists, HTML commands should be used.
Equivalent to li

 <word>

Displays the argument <word> using a bold font. Equivalent to <b>word</b>. To put multiple words in bold use <b>multiple words</b>.

c <word>

Displays the argument <word> using a typewriter font. Use this to refer to a word of code. Equivalent to <tt>word</tt>.
例如:
Typing:
... This function returns c void and not c int ...
will result in the following text: ... This function returns void and not int ...
Equivalent to p To have multiple words in typewriter font use <tt>multiple words</tt>.

code

Starts a block of code. A code block is treated differently from ordinary text. It is interpreted as C/C++ code. The names of the classes and members that are documented are automatically replaced by links to the documentation.
相关参考
section endcode, section verbatim.

copydoc <link-object>

Copies a documentation block from the object specified by <link-object> and pastes it at the location of the command. This command can be useful to avoid cases where a documentation block would otherwise have to be duplicated or it can be used to extend the documentation of an inherited member. The link object can point to a member (of a class, file or group), a class, a namespace, a group, a page, or a file (checked in that order). Note that if the object pointed to is a member (function, variable, typedef, etc), the compound (class, file, or group) containing it should also be documented for the copying to work. To copy the documentation for a member of a class for instance one can put the following in the documentation
/*!@copydoc MyClass::myfunction() *  More documentation. */
if the member is overloaded, you should specify the argument types explicitly (without spaces!), like in the following:
/*!@copydoc MyClass::myfunction(type1,type2) */
Qualified names are only needed if the context in which the documentation block is found requires them. The copydoc command can be used recursively, but cycles in the copydoc relation will be broken and flagged as an error. Note that both the brief description and the detailed documentation will be copied. See cmdcopybrief and cmdcopydetails for copying only the brief or detailed part of the comment block.

copybrief <link-object>

Works in a similar way as copydoc but will only copy the brief description, not the detailed documentation.

copydetails <link-object>

Works in a similar way as copydoc but will only copy the detailed documentation, not the brief description.

dot

Starts a text fragment which should contain a valid description of a dot graph. The text fragment ends with enddot. Doxygen will pass the text on to dot and include the resulting image (and image map) into the output. The nodes of a graph can be made clickable by using the URL attribute. By using the command ef inside the URL value you can conveniently link to an item inside doxygen. 这是一个示例:
<span class="comment">/*!class B */</span> <span class="keyword">class </span>B {};
<span class="comment">/*!class C */</span> <span class="keyword">class </span>C {}; <span class="comment">/*!mainpage</span> <span class= "comment">  Class relations expressed via an inline dot graph:</span> <span>  dot</span> <span>  digraph example {</span> <span class= "comment">      node [shape=record, fontname=Helvetica, fontsize=10];</span> <span class= "comment">      b [ label="class B" URL=" ef B"];</span> <span class= "comment">      c [ label="class C" URL=" ef C"];</span> <span class= "comment">      b -&gt; c [ arrowhead="open", style="dashed" ];</span> <span>  }</span> <span>  enddot</span> <span class= "comment">  Note that the classes in the above graph are clickable </span> <span>  (in the HTML output).</span> <span> */</span>

msc

Starts a text fragment which should contain a valid description of a message sequence chart. See http://www.mcternan.me.uk/mscgen/ for examples. The text fragment ends with endmsc.
注意:
The text fragment should only include the part of the message sequence chart that is within the msc {...} block.
You need to install the mscgen tool, if you want to use this command.
Here is an example of the use of the msc command.
<span class= "comment">/** Sender class. Can be used to send a command to the server.</span> <span class= "comment">  The receiver will acknowlegde the command by calling Ack().</span>
<span>  msc</span> <span>    Sender,Receiver;</span> <span class= "comment">    Sender-&gt;Receiver [label="Command()", URL=" ef Receiver::Command()"];</span> <span class= "comment">    Sender&lt;-Receiver [label="Ack()", URL=" ef Ack()", ID="1"];</span> <span>  endmsc</span> <span> */</span> <span class="keyword">class </span>Sender { <span class="keyword">public</span>: <span class="comment">    /** Acknowledgement from server */</span> <span class="keywordtype">void</span> Ack(<span class= "keywordtype">bool</span> ok); }; <span class= "comment">/** Receiver class. Can be used to receive and execute commands.</span> <span class= "comment">  After execution of a command, the receiver will send an acknowledgement</span> <span>  msc</span> <span>    Receiver,Sender;</span> <span class= "comment">    Receiver&lt;-Sender [label="Command()", URL=" ef Command()"];</span> <span class= "comment">    Receiver-&gt;Sender [label="Ack()", URL=" ef Sender::Ack()", ID="1"];</span> <span>  endmsc</span> <span> */</span> <span class="keyword">class </span>Receiver { <span class="keyword">public</span>: <span class= "comment">    /** Executable a command on the server */</span> <span class="keywordtype">void</span> Command(<span class= "keywordtype">int</span> commandId); };

dotfile <file> ["caption"]

Inserts an image generated by dot from <file> into the documentation. The first argument specifies the file name of the image. doxygen will look for files in the paths (or files) that you specified after the DOTFILE_DIRS tag. If the dot file is found it will be used as an input file to the dot tool. The resulting image will be put into the correct output directory. If the dot file name contains spaces you'll have to put quotes ("...") around it. The second argument is optional and can be used to specify the caption that is displayed below the image. This argument has to be specified between quotes even if it does not contain any spaces. The quotes are stripped before the caption is displayed.

e <word>

Displays the argument <word> in italics. Use this command to emphasize words.
例如:
Typing:
... this is a e really good example ...
will result in the following text: ... this is a really good example ...
Equivalent to em. To emphasis multiple words use <em>multiple words</em>.

em <word>

Displays the argument <word> in italics. Use this command to emphasize words.
例如:
Typing:
... this is a em really good example ...
will result in the following text: ... this is a really good example ...
Equivalent to e

endcode

Ends a block of code.
相关参考
section code

enddot

Ends a blocks that was started with dot.

endmsc

Ends a blocks that was started with msc.

endhtmlonly

Ends a block of text that was started with a htmlonly command.
相关参考
section htmlonly.

endlatexonly

Ends a block of text that was started with a latexonly command.
相关参考
section latexonly.

endmanonly

Ends a block of text that was started with a manonly command.
相关参考
section manonly.

endverbatim

Ends a block of text that was started with a verbatim command.
相关参考
section endcode, section verbatim.

endxmlonly

Ends a block of text that was started with a xmlonly command.
相关参考
section xmlonly.

f$

Marks the start and end of an in-text formula.
相关参考
section formulas for an example.

f[

Marks the start of a long formula that is displayed centered on a separate line.
相关参考
section f] and section formulas.

f]

Marks the end of a long formula that is displayed centered on a separate line.
相关参考
section f[ and section formulas.

f{environment}{

Marks the start of a formula that is in a specific environment.
注意:
The second is optional and is only to help editors (such as Vim) to do proper syntax highlighting by making the number of opening and closing braces the same.

f}

Marks the end of a formula that is in a specific environment.

htmlonly

Starts a block of text that will be verbatim included in the generated HTML documentation only. The block ends with a endhtmlonly command. This command can be used to include HTML code that is too complex for doxygen (i.e. applets, java-scripts, and HTML tags that require attributes). You can use the latexonly and endlatexonly pair to provide a proper $mbox{LaTeX}$ alternative. Note: environment variables (like $(HOME) ) are resolved inside a HTML-only block.
相关参考
section manonly and section latexonly.

image <format> <file> ["caption"] [<sizeindication>=<size>]

Inserts an image into the documentation. This command is format specific, so if you want to insert an image for more than one format you'll have to repeat this command for each format. The first argument specifies the output format. Currently, the following values are supported: html and latex. The second argument specifies the file name of the image. doxygen will look for files in the paths (or files) that you specified after the IMAGE_PATH tag. If the image is found it will be copied to the correct output directory. If the image name contains spaces you'll have to put quotes ("...") around it. You can also specify an absolute URL instead of a file name, but then doxygen does not copy the image nor check its existance. The third argument is optional and can be used to specify the caption that is displayed below the image. This argument has to be specified on a single line and between quotes even if it does not contain any spaces. The quotes are stripped before the caption is displayed. The fourth argument is also optional and can be used to specify the width or height of the image. This is only useful for $mbox{LaTeX}$ output (i.e. format=latex). The sizeindication can be either width or height. The size should be a valid size specifier in $mbox{LaTeX}$ (for example 10cm or 6in or a symbolic width like  extwidth). Here is example of a comment block:
/*!Here is a snapshot of my new application: *  image html application.jpg *  image latex application.eps "My application" width=10cm */
And this is an example of how the relevant part of the configuration file may look:
IMAGE_PATH     = my_image_dir
警告:
The image format for HTML is limited to what your browser supports. For $mbox{LaTeX}$, the image format must be Encapsulated PostScript (eps).Doxygen does not check if the image is in the correct format. So you have to make sure this is the case!

latexonly

Starts a block of text that will be verbatim included in the generated $mbox{LaTeX}$ documentation only. The block ends with a endlatexonly command. This command can be used to include $mbox{LaTeX}$ code that is too complex for doxygen (i.e. images, formulas, special characters). You can use the htmlonly and endhtmlonly pair to provide a proper HTML alternative. Note: environment variables (like $(HOME) ) are resolved inside a $mbox{LaTeX}$-only block.
相关参考
section latexonly and section htmlonly.

manonly

Starts a block of text that will be verbatim included in the generated MAN documentation only. The block ends with a endmanonly command. This command can be used to include groff code directly into MAN pages. You can use the htmlonly and latexonly and endhtmlonly and endlatexonly pairs to provide proper HTML and $mbox{LaTeX}$ alternatives.
相关参考
section htmlonly and section latexonly.

li { item-description }

This command has one argument that continues until the first blank line or until another li is encountered. The command can be used to generate a simple, not nested list of arguments. Each argument should start with a li command.
例如:
Typing:
li c AlignLeft left alignment. li c AlignCenter center alignment. li c AlignRight right alignment
No other types of alignment are supported. will result in the following text:
  • AlignLeft left alignment.
  • AlignCenter center alignment.
  • AlignRight right alignment
No other types of alignment are supported.
注意:
For nested lists, HTML commands should be used.
Equivalent to arg

Forces a new line. Equivalent to <br> and inspired by the printf function.

p <word>

Displays the parameter <word> using a typewriter font. You can use this command to refer to member function parameters in the running text.
例如:
... the p x and p y coordinates are used to ...
This will result in the following text: ... the x and y coordinates are used to ...
Equivalent to c

verbatim

Starts a block of text that will be verbatim included in both the HTML and the $mbox{LaTeX}$ documentation. The block should end with a endverbatim block. All commands are disabled in a verbatim block.
警告:
Make sure you include a endverbatim command for each verbatim command or the parser will get confused!
相关参考
section code, and section verbinclude.

xmlonly

Starts a block of text that will be verbatim included in the generated XML output only. The block ends with a endxmlonly command. This command can be used to include custom XML tags.
相关参考
section htmlonly and section latexonly.

\

This command writes a backslash character () to the HTML and $mbox{LaTeX}$ output. The backslash has to be escaped in some cases because doxygen uses it to detect commands.

@

This command writes an at-sign (@) to the HTML and $mbox{LaTeX}$ output. The at-sign has to be escaped in some cases because doxygen uses it to detect JavaDoc commands.

~[LanguageId]

This command enables/disables a language specific filter. This can be used to put documentation for different language into one comment block and use the OUTPUT_LANGUAGE tag to filter out only a specific language. Use ~language_id to enable output for a specific language only and ~ to enable output for all languages (this is also the default mode). 例如:
/*!~english This is english ~dutch Dit is Nederlands ~german Dieses ist deutsch. ~ output for all languages. */

&

This command writes the & character to output. This character has to be escaped because it has a special meaning in HTML.

$

This command writes the $ character to the output. This character has to be escaped in some cases, because it is used to expand environment variables.

#

This command writes the # character to the output. This character has to be escaped in some cases, because it is used to refer to documented entities.

<

This command writes the < character to the output. This character has to be escaped because it has a special meaning in HTML.

>

This command writes the > character to the output. This character has to be escaped because it has a special meaning in HTML.

\%

This command writes the % character to the output. This character has to be escaped in some cases, because it is used to prevent auto-linking to word that is also a documented class or struct.

"

This command writes the " character to the output. This character has to be escaped in some cases, because it is used in pairs to indicate an unformated text fragment.

--- Commands included for Qt compatibility ---

The following commands are supported to remain compatible to the Qt class browser generator. Do not use these commands in your own documentation.
  • annotatedclasslist
  • classhierarchy
  • define
  • functionindex
  • header
  • headerfilelist
  • inherit
  • l
  • postheader
原作者  lgb
原文地址:https://www.cnblogs.com/benhuan/p/3302114.html