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的源代码。
開發者 | Dimitri van Heesch |
---|---|
当前版本 |
|
源代码库 | |
编程语言 | C++ |
操作系统 | 跨平台 |
类型 | 文檔生成器 |
许可协议 | GNU通用公共许可证 |
网站 | www |
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 <[email protected]> * @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 }
外部連結编辑
- 官方网站
- SourceForge.net上的Doxygen
- Freecode上的Doxygen
- MediaWiki documentation(页面存档备份,存于互联网档案馆) in Doxygen
- Example of documentation automatically generated by Doxygen (页面存档备份,存于互联网档案馆) for Apache Harmony
- ^ Doxygen release 1.10.0. 2023年12月25日 [2023年12月25日].
🔥 Top keywords: Baike: 首页Special:搜索胖猫跳江事件背着善宰跑九龍城寨之圍城逆天奇案2璩静淚之女王歌手2024Energy (組合)新生 (网络剧)习近平匈牙利邊佑錫劉俊謙 (香港)金智媛神耆小子塞尔维亚金秀賢 (男演員)母亲节猩球崛起:王國誕生九龍寨城馴鹿寶貝家族榮耀之繼承者Seventeen (組合)六四事件不夠善良的我們张维为楊佩潔TripleS支配物种庆余年郭葦昀洪若潭命案金惠奫2024年英雄联盟季中邀请赛春色寄情人BABYMONSTER笑看風雲乘風2024排球少年!!角色列表破墓徐巧芯中华人民共和国中華民國打天下2WIND BREAKER—防風少年—习明泽排球少年!!彭丽媛磁暴ILLIT贾斯汀·比伯逆天奇案BOYNEXTDOOR猿人爭霸戰:猩凶革命張書偉我的婆婆怎麼那麼可愛我獨自升級怪獸8號謝坤達IVE (組合)與鳳行關於我轉生變成史萊姆這檔事角色列表黃道十二宮福建號航空母艦虽然不是英雄葉乃文五月天張員瑛草榴社区張文傑2024年花蓮地震极光香緹·摩爾迷宮飯呂家愷搜查班長1958日本劉德華海莉·鮑德溫蕭景鴻越位 (足球)葬送的芙莉蓮周處除三害 (電影)毛泽东願榮光歸香港林峯周雨彤伍允龍羅毓儀香港Baike: 分類索引沒有秘密猩球崛起:終極決戰角質層唐振剛柯佳嬿文化大革命