青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

tqsheng

go.....
隨筆 - 366, 文章 - 18, 評論 - 101, 引用 - 0
數據加載中……

Doxygen入門(1)--基礎知識


來自:http://www.stack.nl/~dimitri/doxygen/starting.html

Getting started

The executable doxygen is the main program that parses the sources and generates the documentation. See section Doxygen usage for more detailed usage information.

[可執行的 doxygen 是一種源文件轉換及文檔生成工具,具體使用信息請參見 Doxygen用法 ]

The executable doxytag is only needed if you want to generate references to external documentation (i.e. documentation that was generated by doxygen) for which you do not have the sources. See section Doxytag usage for more detailed usage information.

[可執行的 doxytag 是一種外部文檔索引生成工具,當然所謂外部文檔也是應由 doxygen 生成的,doxytag 特別適合于所基于的外部文檔不包含源程序時的情況。具體查看 Doxytag 用法 ]

Optionally, the executable doxywizard can be used, which is a graphical front-end for editing the configuration file that is used by doxygen and for running doxygen in a graphical environment. For Mac OS X doxywizard will be started by clicking on the Doxygen application icon.

[另外,可執行的 doxywizard 是一種前端圖形工具,用于配置文件的編輯。如果在 Mac 中使用 doxywizard 可以直接點擊 Doxygen 應用程序圖標。]

The following figure shows the relation between the tools and the flow of information between them (it looks complex but that's only because it tries to be complete):

[下圖說明了工具和信息流向的關系,雖然看起來有些復雜,但其實很簡單,當然復雜也是因為 Doxygen 期望能夠提供更完善的功能。]

infoflow.gif

Doxygen information flow

Step 1: Creating a configuration file [第一步:創建配置文件]

Doxygen uses a configuration file to determine all of its settings. Each project should get its own configuration file. A project can consist of a single source file, but can also be an entire source tree that is recursively scanned.

[Doxygen 使用配置文件來決定使用中所有的設置。每個項目應該擁有自己的配置文件。這里所說的項目可以包含一個文件的項目,當然更適合的是包括整個源文件樹中所有文件的項目。]

To simplify the creation of a configuration file, doxygen can create a template configuration file for you. To do this call doxygen from the command line with the -g option:

[為了簡化配置文件的創建, doxygen 提供了配置模板,使用如下命令即可:]

doxygen -g <config-file>

where <config-file> is the name of the configuration file. If you omit the file name, a file named Doxyfile will be created. If a file with the name <config-file> already exists, doxygen will rename it to <config-file>.bak before generating the configuration template. If you use - (i.e. the minus sign) as the file name then doxygen will try to read the configuration file from standard input (stdin), which can be useful for scripting.

[其中 <config-file> 是配置文件的名稱。如果忽略該項,默認的文件名將被創建,即 Doxyfile。如果指定的 <config-file> 已經存在,doxygen 將重命名原來的文件為 <config-file>.bak,之后再生成新的配置模板。如果我們使用 -(減號)作為文件名,doxygen 將嘗試從標準輸入(stdin)讀取配置信息,這種方式特別適合于自寫腳本。]

The configuration file has a format that is similar to that of a (simple) Makefile. It consists of a number of assignments (tags) of the form:

[配置文件的格式類似于簡單的 Makefile,它包含一些具有賦值格式的標簽,如下:]

TAGNAME = VALUE or 
TAGNAME = VALUE1 VALUE2 ... 

You can probably leave the values of most tags in a generated template configuration file to their default value. See section Configuration for more details about the configuration file.

[我們可以保留大部分標簽的默認值,參見具體配置說明。]

If you do not wish to edit the config file with a text editor, you should have a look at doxywizard, which is a GUI front-end that can create, read and write doxygen configuration files, and allows setting configuration options by entering them via dialogs.

[如果我們不希望以文本形式編輯配置文件,我們可以使用 doxywizard,它是一個 doxygen 的前端 gui,用以創建、讀取、編輯 doxygen 配置文件,可以通過對話框選擇配置選項。]

For a small project consisting of a few C and/or C++ source and header files, you can leave INPUT tag empty and doxygen will search for sources in the current directory.

[對于只包含幾個C或C++源文件及頭文件的小項目來說,我們可以使 INPUT 標簽留空,這樣 doxygen 將在當前文件夾中搜尋所有的源文件。]

If you have a larger project consisting of a source directory or tree you should assign the root directory or directories to the INPUT tag, and add one or more file patterns to the FILE_PATTERNS tag (for instance *.cpp *.h). Only files that match one of the patterns will be parsed (if the patterns are omitted a list of source extensions is used). For recursive parsing of a source tree you must set the RECURSIVE tag to YES. To further fine-tune the list of files that is parsed the EXCLUDE and EXCLUDE_PATTERNS tags can be used. To omit all testdirectories from a source tree for instance, one could use:

[如果處理包含一個源文件目錄的大項目,我們應該令 INPUT 標簽等于源文件根目錄和相應的目錄,并添加文件類型
標簽 FILE_PATTERNS (如 *.cpp、*.h)。只有匹配文件類型的文件才會被處理,如果該標簽忽略不指明,則“源文件
擴展列表”將被采用。如果希望迭代處理源代碼樹,你必須設置 RECURSIVE 為 YES。如果希望更精確地控制文件
類型列表,還可以使用 EXCLUDEEXCLUDE_PATTERNS 。如下面列子,如果需要忽略掉 test 目錄下的所有文件,
可以這樣處理:]

EXCLUDE_PATTERNS = */test/*

Doxygen looks at the file's extension to determine how to parse a file. If a file has an .idl or .odl extension it is treated as an IDL file. If it has a .java extension it is treated as a file written in Java. Files ending with .cs are treated as C# files and the .py extension selects the Python parser. Finally, files with the extensions .php.php4,.inc or .phtml are treated as PHP sources. Any other extension is parsed as if it is a C/C++ file, where files that end with .m are treated as Objective-C source files.

[Doxygen 是通過文件的擴展名來決定如何處理文件的。如果某個文件擴展名為 .idl 或 .odl,那么這個文件即被認為

是 IDL 文件。如果某個具有 .java 擴展名,那么即被認為是由 Java 語言寫成的文件。同樣,.cs 是 C# 文件,.py 文件

作為 Python 來處理;.php、.php4、.inc 或 .phtml 被認為是 PHP 源文件。其他的就被認為是 C/C++文件處理,其中

以 .m 結尾的被認為是 Object-C 文件處理。]

If you start using doxygen for an existing project (thus without any documentation that doxygen is aware of), you can still get an idea of what the structure is and how the documented result would look like. To do so, you must set the EXTRACT_ALL tag in the configuration file to YES. Then, doxygen will pretend everything in your sources is documented. Please note that as a consequence warnings about undocumented members will not be generated as long as EXTRACT_ALL is set to YES.

[如果你使用 doxygen 對現有項目進行處理(也就是說目前 doxygen 對要處理的項目還一無所知),我們可以先規劃出未來成品的結構如何,或者是明確到底以什么樣子呈現。為實現該目的,我們必須設置 EXTRACT_ALL 標簽為 YES。這樣,doxygen 將記錄源文件中所有內容。請注意:使用了該標簽后,未記錄的成員或文件內容將不會得到任何提示或警告。]

To analyse an existing piece of software it is useful to cross-reference a (documented) entity with its definition in the source files. Doxygen will generate such cross-references if you set the SOURCE_BROWSER tag to YES. It can also include the sources directly into the documentation by setting INLINE_SOURCES to YES (this can be handy for code reviews for instance).

[另外,使用交叉引用(鏈接源文件定義片斷)在軟件分析中十分有效,Doxygen 將在 SOURCE_BROWSER 為 YES 的情況下自動產生交叉引用。如果設置 INLINE_SOURCES 為 YES,可以使源代碼直接加入到文檔中,這對代碼復審非常有用。]

(自己注:記得將 OUTPUT_LANGUAGE=Chinese)

Step 2: Running doxygen [第二步:運行 doxygen]

To generate the documentation you can now enter: [我們可以直接使用以下命令產生文檔:]
doxygen <config-file>

Depending on your settings doxygen will create htmlrtflatexxml and/or man directories inside the output directory. As the names suggest these directories contain the generated documentation in HTML, RTF, $\mbox{\LaTeX}$, XML and Unix-Man page format.

[通過不同的設置,doxygen 可以在輸出目錄中生成各種文件夾,如何 html、rtf、latex、xml 或 man等,并分別代表所生成的 HTML、RTF、XML以及 $\mbox{\LaTeX}$, Unix-Man 格式文檔。]

The default output directory is the directory in which doxygen is started. The root directory to which the output is written can be changed using the OUTPUT_DIRECTORY. The format specific directory within the output directory can be selected using the HTML_OUTPUTRTF_OUTPUTLATEX_OUTPUTXML_OUTPUT, and MAN_OUTPUT tags of the configuration file. If the output directory does not exist, doxygen will try to create it for you (but it will nottry to create a whole path recursively, like mkdir -p does).

[默認的輸出文件夾為當前運行 doxygen 的文件夾,當然可以使用 OUTPUT_DIRECTORY 修改根目錄。另外,根目錄下特定的文件夾可以通過以下標簽設置,即HTML_OUTPUTRTF_OUTPUTLATEX_OUTPUTXML_OUTPUT, 和 MAN_OUTPUT 。如果輸出文件夾不存在,那么 doxygen 將嘗試創建一個新的,但是不會象 mkdir -p 一樣工作。]

HTML output

The generated HTML documentation can be viewed by pointing a HTML browser to the index.html file in the htmldirectory. For the best results a browser that supports cascading style sheets (CSS) should be used (I'm using Mozilla, Safari, Konqueror, and sometimes IE6 to test the generated output).

[生成的 HTML 文檔通過 index.html 起始,這些 HTML 文檔采用 CSS。]

Some of the features the HTML section (such as GENERATE_TREEVIEW) require a browser that supports DHTML and Javascript.

[還有一些特性(如 GENERATE_TREEVIEW)需要瀏覽器支持 DHTML 和 Javascript。]

If you plan to use the search engine (see SEARCHENGINE), you should view the HTML output via a PHP-enabled web server (e.g. apache with the PHP module installed).

[如果你計劃使用搜索引擎(見SEARCHENGINE)你應當通過 php web服務器來查看 html 輸出。]

LaTeX output

The generated $\mbox{\LaTeX}$ documentation must first be compiled by a $\mbox{\LaTeX}$ compiler (I use a recent teTeX distribution). To simplify the process of compiling the generated documentation, doxygen writes a Makefile into the latexdirectory.

The contents and targets in the Makefile depend on the setting of USE_PDFLATEX. If it is disabled (set to NO), then typing make in the latex directory a dvi file called refman.dvi will be generated. This file can then be viewed using xdvi or converted into a PostScript file refman.ps by typing make ps (this requires dvips).

To put 2 pages on one physical page use make ps_2on1 instead. The resulting PostScript file can be send to a PostScript printer. If you do not have a PostScript printer, you can try to use ghostscript to convert PostScript into something your printer understands.

Conversion to PDF is also possible if you have installed the ghostscript interpreter; just type make pdf (or make pdf_2on1).

To get the best results for PDF output you should set the PDF_HYPERLINKS and USE_PDFLATEX tags to YES. In this case the Makefile will only contain a target to build refman.pdf directly.

RTF output

Doxygen combines the RTF output to a single file called refman.rtf. This file is optimized for importing into the Microsoft Word. Certain information is encoded using field. To show the actual value you need to select all (Edit - select all) and then toggle fields (right click and select the option from the drop down menu).

XML output

The XML output consists of a structured "dump" of the information gathered by doxygen. Each compound (class/namespace/file/...) has its own XML file and there is also an index file called index.xml.

A file called combine.xslt XSLT script is also generated and can be used to combine all XML files into a single file.

Doxygen also generates two XML schema files index.xsd (for the index file) and compound.xsd (for the compound files). This schema file describes the possible elements, their attributes and how they are structured, i.e. it the describes the grammar of the XML files and can be used for validation or to steer XSLT scripts.

In the addon/doxmlparser directory you can find a parser library for reading the XML output produced by doxygen in an incremental way (see addon/doxmlparser/include/doxmlintf.h for the interface of the library)

Man page output

The generated man pages can be viewed using the man program. You do need to make sure the man directory is in the man path (see the MANPATH environment variable). Note that there are some limitations to the capabilities of the man page format, so some information (like class diagrams, cross references and formulas) will be lost.

Step 3: Documenting the sources[第三步:標記源文件]

Although documenting the sources is presented as step 3, in a new project this should of course be step 1. Here I assume you already have some code and you want doxygen to generate a nice document describing the API and maybe the internals as well.

[雖然標記源文件放在了第三步,但實際上對于一個新項目來說,這應該是第一步。這里我們假設你已經有一些代碼,并想利用 doxygen 來生成漂亮的文檔以描述 API 或內部細節等。]

If the EXTRACT_ALL option is set to NO in the configuration file (the default), then doxygen will only generate documentation for documented members, files, classes and namespaces. So how do you document these? For members, classes and namespaces there are basically two options:

[如果 EXTRACT_ALL 標簽設置為 NO(默認值),那么 doxygen 只生成已經標記的成員、文件、類及命名空間。所以我們該如何標記它們,這里對成員、類、命名空間給出兩條基本原則:]

  1. Place a special documentation block in front of the declaration or definition of the member, class or namespace. For file, class and namespace members it is also allowed to place the documention directly after the member. See section Special documentation blocks to learn more about special documentation blocks.
  2. Place a special documentation block somewhere else (another file or another location) and put a structural command in the documentation block. A structural command links a documentation block to a certain entity that can be documented (e.g. a member, class, namespace or file). See section Documentation at other places to learn more about structural commands.
      1、在成員、類、命名空間前放置特別的標記塊。對于一個文件、類、命名空間等,同樣可以直接在成員后面加上標記。詳見Special documentation blocks
2、在另一個文件或位置放置特別的標記塊,并在標記塊中置入結構化命令。結構化命令將提供到某個記錄塊或某個位置的鏈接(如鏈接到成員、類、命名空間等。)詳見:Documentation at other places 

Files can only be documented using the second option, since there is no way to put a documentation block before a file. Of course, file members (functions, variable, typedefs, defines) do not need an explicit structural command; just putting a special documentation block in front or behind them will do.

[文件只能以上面第二種方式標記,因為我們是沒有方式在一個文件前面置入標記塊的。當然,文件成員(包括函數、變量、類型定義、定義等)不需要明確的結構化命令。只要在它們前面或后面放入特別的標記塊即可。]

The text inside a special documentation block is parsed before it is written to the HTML and/or $\mbox{\LaTeX}$ output files.

[特別標記塊中的文本將在輸出前被轉換。]

During parsing the following steps take place: [轉換步驟:]

  • The special commands inside the documentation are executed. See section Special Commands for an overview of all commands.
  • [標記中的特別命令被執行,詳見: Special Commands ]
  • If a line starts with some whitespace followed by one or more asterisks (*) and then optionally more whitespace, then all whitespace and asterisks are removed.
  • [如果某行以 whitespace 加上一個或多個星號開始,后面可能還會有更多 whitespace,那么所有的 whitespace 和星號將被刪除]
  • All resulting blank lines are treated as a paragraph separators. This saves you from placing new-paragraph commands yourself in order to make the generated documentation readable.
  • [所有空行將被認為是段落分隔。這會省去加入段落命令的麻煩。]
  • Links are created for words corresponding to documented classes (unless the word is preceded by a %; then the word will not be linked and the % sign is removed).
  • [創建標記類的鏈接。如果鏈接文字前標有 %,那么該文字將不會被認為是鏈接,同時刪除 %]
  • Links to members are created when certain patterns are found in the text. See section Automatic link generationfor more information on how the automatic link generation works.
  • [創建標記成員的鏈接。詳見:Automatic link generation ]
  • HTML tags that are in the documentation are interpreted and converted to $\mbox{\LaTeX}$ equivalents for the $\mbox{\LaTeX}$ output. See section HTML Commands for an overview of all supported HTML tags.
  • [文檔中的HTML標簽被轉換。]

Go to the next section or return to the index.

posted on 2012-07-10 16:33 tqsheng 閱讀(559) 評論(0)  編輯 收藏 引用

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美丰满少妇xxxbbb| 夜夜嗨av一区二区三区免费区| 午夜精品亚洲| 一区二区三区波多野结衣在线观看| 亚洲黄色av一区| 久久婷婷av| 香蕉成人伊视频在线观看| 欲色影视综合吧| 国内精品嫩模av私拍在线观看| 国产精品久久久久久久久免费樱桃 | 亚洲精品中文在线| 亚洲最新视频在线| 午夜在线视频观看日韩17c| 久久精品最新地址| 91久久精品日日躁夜夜躁国产| 91久久精品国产| 亚洲综合视频一区| 久久免费99精品久久久久久| 美女脱光内衣内裤视频久久影院| 一区二区三区四区精品| 欧美激情第9页| 欧美高清免费| 一本色道久久99精品综合| 篠田优中文在线播放第一区| 女人香蕉久久**毛片精品| 国产精品美女久久福利网站| 亚洲国产日韩一区二区| 午夜亚洲精品| 免费h精品视频在线播放| 夜夜夜久久久| 欧美3dxxxxhd| 国内精品久久久久久影视8 | 久久久中精品2020中文| 欧美日韩亚洲高清一区二区| 韩国av一区二区三区| 亚洲午夜免费福利视频| 欧美国产亚洲另类动漫| 欧美一区二区视频观看视频| 国产精品hd| 夜夜嗨av一区二区三区免费区| 久久日韩粉嫩一区二区三区| 亚洲在线电影| 欧美日韩亚洲一区二区| 亚洲精品久久久久久下一站| 免费在线欧美视频| 久久国内精品视频| 国产乱码精品| 午夜久久美女| 亚洲一区二区三区精品在线 | 亚洲第一综合天堂另类专| 午夜精品一区二区三区四区| 久久精品国产免费观看| 欧美黄色aa电影| 黑人极品videos精品欧美裸| 久久精品99国产精品日本| 亚洲欧美卡通另类91av| 国产精品久久久久久av下载红粉 | 9l国产精品久久久久麻豆| 欧美激情精品久久久久久黑人 | 久久精品欧美日韩| 性做久久久久久免费观看欧美 | 六月婷婷久久| 亚洲福利视频网| 欧美va亚洲va日韩∨a综合色| 久久久最新网址| 亚洲人成在线免费观看| 亚洲精品一级| 国产精品黄色在线观看| 亚洲欧美在线观看| 欧美一级淫片播放口| 国产日韩欧美在线| 免费在线观看精品| 欧美刺激性大交免费视频| 一区二区三区久久网| 在线视频精品一区| 国产伦精品一区二区三区在线观看 | 国产精品视频99| 欧美在线首页| 久久婷婷久久| 在线中文字幕日韩| 欧美亚洲在线观看| 亚洲福利视频在线| 9久re热视频在线精品| 在线视频免费在线观看一区二区| 99精品国产在热久久下载| 欧美日韩亚洲三区| 午夜精品www| 久久精品国产精品亚洲精品| 在线色欧美三级视频| 亚洲国产成人精品视频| 欧美视频日韩视频| 久久久亚洲国产天美传媒修理工| 久久综合影视| 午夜精品在线| 欧美电影免费观看大全| 国产免费成人| 亚洲国产精品va在看黑人| 日韩一二三区视频| 亚洲免费久久| 欧美日韩a区| 欧美中文在线观看| 免费观看30秒视频久久| 亚洲专区国产精品| 久久综合伊人| 性久久久久久久久| 欧美国产日韩视频| 久久深夜福利免费观看| 欧美日韩精品在线视频| 麻豆成人91精品二区三区| 欧美日韩精品综合| 欧美电影美腿模特1979在线看| 国产久一道中文一区| 日韩小视频在线观看| 亚洲电影免费观看高清完整版| 亚洲综合色噜噜狠狠| 亚洲婷婷综合久久一本伊一区| 麻豆视频一区二区| 久久久另类综合| 国产精品va在线播放| 亚洲欧洲在线观看| 亚洲黄网站黄| 久久婷婷国产综合国色天香| 欧美一区二区三区视频免费| 国产精品家庭影院| 一区二区三区久久精品| 日韩午夜av| 欧美激情欧美激情在线五月| 美国十次了思思久久精品导航| 国产一级精品aaaaa看| 午夜精品视频网站| 久久人人超碰| 在线色欧美三级视频| 久久久爽爽爽美女图片| 每日更新成人在线视频| 禁久久精品乱码| 久久久久久久综合| 欧美成人精品在线视频| 亚洲精品美女免费| 欧美理论电影网| 99综合视频| 香港久久久电影| 国产女主播在线一区二区| 欧美一区二区在线免费观看| 久久综合九色欧美综合狠狠| 亚洲观看高清完整版在线观看| 米奇777超碰欧美日韩亚洲| 欧美成人综合在线| 日韩一级大片在线| 国产精品麻豆欧美日韩ww| 欧美一区2区三区4区公司二百| 久久精品亚洲一区| 极品少妇一区二区三区| 免费国产一区二区| 亚洲理伦电影| 欧美一级专区免费大片| 激情欧美丁香| 欧美日韩成人综合在线一区二区| 麻豆精品在线视频| 免费日韩一区二区| 亚洲国产高清在线观看视频| 亚洲伦理中文字幕| 久久中文字幕一区二区三区| 久久婷婷av| 亚洲国产欧美国产综合一区| 亚洲视频网站在线观看| 国产日韩综合| 欧美大片免费观看| 亚洲手机成人高清视频| 久久综合99re88久久爱| 亚洲作爱视频| 黄色影院成人| 欧美日韩中文字幕综合视频| 久久成人精品无人区| 亚洲日本电影在线| 久久精品国产精品亚洲综合| 亚洲人成网站999久久久综合 | 久热综合在线亚洲精品| 亚洲精品一区在线观看香蕉| 久久国产精彩视频| 日韩视频久久| 在线看视频不卡| 国产精品你懂得| 欧美精品大片| 久久影视精品| 午夜日本精品| 亚洲性视频网站| 亚洲精品一区二区三区婷婷月| 浪潮色综合久久天堂| 亚欧成人在线| 亚洲专区免费| 在线视频欧美一区| 亚洲精品综合| 亚洲激情视频网| 在线欧美日韩| 亚洲第一成人在线| 一区二区视频免费在线观看| 国语精品中文字幕| 国产一区二区三区在线观看网站| 国产精品成人国产乱一区 | 亚洲国产成人一区|