doxygen的特定命令

摘要:本文給出doxygen所支持的所有的一個列表,同時對其進行逐一解釋與說明,對於使用doxygen來有重要參考價值。本文主要來自對doxygen官方文檔的翻譯。

概述

全部在文檔中的命令都開始於一個反斜槓( \)或者是一個at-符號( @)。若是你喜歡,能夠把全部的以反斜槓開頭的命令都換成以at-符號開頭的命令。 有些命令有一個或多個參數,每個參數都其肯定的範圍:
  • 若是使用 <尖>括號說明參數是一個單獨單詞。
  • 若是使用(圓)括號說明參數一直到命令所在的結束。
  • 若是使用{大}括號說明參數一直延伸到本段結束。一個段落的結束以一個空行來標識,或者是一個段落標記。
  • 若是使用[中]括號說明參數是可選的。
下面是一個以字母順序的列表,列表給出了全部可用的命令:
a |  addindex |  addtogroup |  anchor |  arg |  attention |  author |  b |  brief |  bug |  c |
callgraph |  callergraph |  category |  class |  code | cond |  copybrief |  copydetails |
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 |
htmlinclude |  htmlonly |  if |  ifnot |  image |  implements | include |  includelineno |  ingroup |
internal |  invariant |  interface |  latexonly |  li |  line |  link |  mainpage | manonly |  memberof |
msc |  n |  name |  namespace |  nosubgrouping | note |  overload |  p |  package |  page |  par |
paragraph |  param |  post | pre |  private |  privatesection | property |  protected |
return |  retval |  sa |  section |  see |  showinitializer |  since |  skip | skipline |  struct |
subpage |  subsection |  subsubsection |  test |  throw | todo |  tparam |  typedef | union |
until |  var |  verbatim |  verbinclude | version |  warning |  weakgroup |  xmlonly |  xrefitem |
$ |  @ |  \ |  & |  ~ |  < |  > |  # |  % |  "
下一節咱們將具體介紹全部doxygen認識的命令,對於不認識的命令doxygen把它看成通常的文本。

命令的具體介紹

\addtogroup <name> [(title)]

本命令就像 \defgroup定義一個組,但它不會由於屢次使用相同的名字而收到一個警告。這些組會在最後合併到一塊兒,造成一個邏輯上的大組。 標題是可選的,因此本命令也能夠把一些對象加入一個已經存在的組中,使用@{ 和 @}的形式,以下:
/*!\addtogroup mygrp *  Additional documentation for group `mygrp' *  @{ *//*! *  A function */ void func1() { }/*!Another function */ void func2() { }/*!@} */
參看:
頁面 分組, 命令 \defgroup\ingroup 和  \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" *  \brief This is a test class. * * Some details about the Test class */
點擊  這裏 看看這段代碼的產生的文檔。

\def <name>

指出這塊註釋屬於一個 #define宏。
示例:
/*!\file define.h \brief 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> 參數應該是一個單獨的標識符。
參看:
頁面  分組, 章節  \ingroup\addtogroup\weakgroup

\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 * \brief Test class. * * Details about Test. */ /*!\fn const char *Test::member(char c,int n) *  \brief A member function. *  \param c a character. *  \param n an integer. *  \exception std::out_of_range parameter is out of range. *  \return a character pointer. */ 點擊 這裏查看由doxygen生成的相應的文檔。
相關參考
章節  \var 和章節  \typedef

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

用於生成class、struct、union 文檔,文檔應該在定義以前。這個命令的參數與命令  \cmdclass的第2、第三參數相同。<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,小節  \defgroup\addtogroup 和  \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 * * 等等…… */
你能夠經過 \ref index 來引用首頁。 ( 若是樹視圖被禁用了,你可使用 \ref main)
相關參考
小節  \section,小節  \subsection 以及小節  \page

\memberof <name>

這個命令指定一個函數是一個類的成員,它處理的方式與 \relates 很類似,二者惟一的區別是這個命令使得那個函數被做爲一個真正的成員來處理。這是很是有用的,當程序設計記語言自己不支持成員函數的概念時(好比C語言)。 這個命令能夠與  \public\protected 或者  \private 一同使用。 在示例文件夾中的 manual.c文件展現瞭如何使用這個命令。 點擊 這裏查看由doxygen生成的相應的文檔。
相關參考
小節  \extends\implements,  \public\protected 以及  \private

\name (header)

這個命令把註釋塊放到一個成員組的頭文件定義中。這個註釋塊應該緊跟着這樣的  //@{ ... //@} 結構,這個結構包含這個組的成員。 參見  Member Groups 的示例。

\namespace <name>

指明當前註釋塊包含一個名字空間的文檔,這個名字空間有一個標識符 <name>。

\nosubgrouping

這個命令能夠放在一個類的文檔內部。它能夠與成員分組一塊兒使用,這個命令的使用能夠避免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 *  \brief 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 \ref subsection1 and \ref subsection2. For more info see page \ref 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和小節 \ref

\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  \memberof\public, 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  \memberof\public, 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  \memberof\protected and  \private.

\relates <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) { } /*!\relates String * A string debug function. */ void stringDebug() { } 點擊 這裏查看由doxygen生成的相應的文檔。

\relatesalso <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

\typedef (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 \typedef and \fn.
相關參考
section  \fn and  \typedef.

\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 *  \brief 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 *  \bug It crashes a lot and requires huge amounts of memory. *  \bug 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.

\brief {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 \brief commands are present they will be joined. See section  \author for an example. Synonymous to \short.

\bug { 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 \bug commands will be joined into a single paragraph. Each bug description will start on a new line. Alternatively, one \bug command may mention several bugs. The \bug 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  \brief 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  \if\ifnot, or  \elseif command.
相關參考
\if\ifnot\elseif\endif.

\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  \endif\ifnot\else, 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  \endif\ifnot\else, 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  \endif\if\else, 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.

\note { 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 \note commands will be joined into a single paragraph. Each note description will start on a new line. Alternatively, one \note command may mention several notes. The \note 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. * * \note * 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.

\tparam <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.

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

\return { 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 \return commands will be joined into a single paragraph. The \return description ends when a blank line or some other sectioning command is encountered. See section  \fn for an example.

\retval <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 \retval commands will be joined into a single paragraph. Each return value description will start on a new line. The \retval 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.

\test { 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.

\throw <exception-object> { exception description }

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

\todo { 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  \todo and  \bug. 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 \reminder, 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 \ref command.
注意:
Anchors can currently only be put into a comment block that is marked as a page (using  \page) or mainpage ( \mainpage).
相關參考
section  \ref.

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.

\ref <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 \ref 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  \ref 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 \ref 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 \ref advanced "advanced section". */ //----------------------------------------------------------- /*!\page advanced Advanced Usage This page is for advanced users. Make sure you have first read \ref 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  \line\skip\skipline, 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  \line\skip\skipline, 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  \example\dontinclude, 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

\b <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 \ref 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="\ref B"];</span> <span class= "comment">      c [ label="class C" URL="\ref 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="\ref Receiver::Command()"];</span> <span class= "comment">    Sender&lt;-Receiver [label="Ack()", URL="\ref 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="\ref Command()"];</span> <span class= "comment">    Receiver-&gt;Sender [label="Ack()", URL="\ref 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  \textwidth). 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

\n

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
相關文章
相關標籤/搜索