Doxygen
Doxygen是一個适用于C++、C、Java、Objective-C、Python、IDL(CORBA和Microsoft flavors)、Fortran、VHDL、PHP、C#和D語言的文檔生成器。它可以在大多數類Unix操作系統、macOS以及Microsoft Windows上執行。初始版本的Doxygen使用了一些舊版本DOC++的源代码,在那之后,Dimitri van Heesch重写了Doxygen的源代码。 Doxygen是一個編寫軟件參考文檔的工具。該文檔是直接寫在源代码中的,因此比較容易保持更新。Doxygen可以交叉引用和源代码,使文件的讀者可以很容易地引用實際的源代码。 KDE将Doxygen作为它的一部分且KDevelop具有內置的支持。Doxygen的发布遵守GNU通用公共许可证,是自由软件。 用法如同Javadoc,Doxygen從源文件提取註解。除了Javadoc的語法,Doxygen支持Qt使用的文檔標記,並可以輸出成HTML、以及CHM、RTF、PDF、LaTeX、PostScript或手册页。 範例代碼注释文档一般用两个星号标志: /**
* <A short one line description>
*
* <Longer description>
* <May span multiple lines or paragraphs as needed>
*
* @param Description of method's or function's input parameter
* @param ...
* @return Description of the return value
*/
但也能像HeaderDoc一樣使用*!的標誌。例如: /*!
* <A short one line description>
*
* <Longer description>
* <May span multiple lines or paragraphs as needed>
*
* @param Description of method's or function's input parameter
* @param ...
* @return Description of the return value
*/
以下說明如何从C++源代码產生文档。請確保參數EXTRACT_ALL在Doxyfile設置為YES。 /**
* @file
* @author John Doe <jdoe@example.com>
* @version 1.0
*
* @section LICENSE
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option)any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details at
* http://www.gnu.org/copyleft/gpl.html
*
* @section DESCRIPTION
*
* The time class represents a moment of time.
*/
class Time {
public:
/**
* Constructor that sets the time to a given value.
*
* @param timemillis Number of milliseconds
* passed since Jan 1, 1970.
*/
Time (int timemillis){
// the code
}
/**
* Get the current time.
*
* @return A time object set to the current time.
*/
static Time now () {
// the code
}
};
另一種方法是首選的一些參數的記錄如下。這將產生同樣的文件。 /**
* Constructor that sets the time to a given value.
*
*/
Time(int timemillis ///< Number of milliseconds passed since Jan 1, 1970.
)
{
// the code
}
外部連結
Information related to Doxygen |
Index:
pl ar de en es fr it arz nl ja pt ceb sv uk vi war zh ru af ast az bg zh-min-nan bn be ca cs cy da et el eo eu fa gl ko hi hr id he ka la lv lt hu mk ms min no nn ce uz kk ro simple sk sl sr sh fi ta tt th tg azb tr ur zh-yue hy my ace als am an hyw ban bjn map-bms ba be-tarask bcl bpy bar bs br cv nv eml hif fo fy ga gd gu hak ha hsb io ig ilo ia ie os is jv kn ht ku ckb ky mrj lb lij li lmo mai mg ml zh-classical mr xmf mzn cdo mn nap new ne frr oc mhr or as pa pnb ps pms nds crh qu sa sah sco sq scn si sd szl su sw tl shn te bug vec vo wa wuu yi yo diq bat-smg zu lad kbd ang smn ab roa-rup frp arc gn av ay bh bi bo bxr cbk-zam co za dag ary se pdc dv dsb myv ext fur gv gag inh ki glk gan guw xal haw rw kbp pam csb kw km kv koi kg gom ks gcr lo lbe ltg lez nia ln jbo lg mt mi tw mwl mdf mnw nqo fj nah na nds-nl nrm nov om pi pag pap pfl pcd krc kaa ksh rm rue sm sat sc trv stq nso sn cu so srn kab roa-tara tet tpi to chr tum tk tyv udm ug vep fiu-vro vls wo xh zea ty ak bm ch ny ee ff got iu ik kl mad cr pih ami pwn pnt dz rmy rn sg st tn ss ti din chy ts kcg ve