fbpx
维基百科

Doxygen

Doxygen是一個适用于C++CJavaObjective-CPythonIDLCORBA和Microsoft flavors)、FortranVHDLPHPC#D語言的文檔生成器。它可以在大多數類Unix操作系統macOS以及Microsoft Windows上執行。初始版本的Doxygen使用了一些舊版本DOC++的源代码,在那之后,Dimitri van Heesch重写了Doxygen的源代码。

Doxygen
開發者Dimitri van Heesch
当前版本
  • 1.9.8 (2023年8月25日;穩定版本)[1]
源代码库
  • github.com/doxygen/doxygen
编程语言C++
操作系统跨平台
类型文檔生成器
许可协议GNU通用公共许可证
网站www.doxygen.nl

Doxygen是一個編寫軟件參考文檔的工具。該文檔是直接寫在源代码中的,因此比較容易保持更新。Doxygen可以交叉引用和源代码,使文件的讀者可以很容易地引用實際的源代码。

KDE将Doxygen作为它的一部分且KDevelop具有內置的支持。 Doxygen的发布遵守GNU通用公共许可证,是自由软件

用法 编辑

如同Javadoc,Doxygen從源文件提取註解。除了Javadoc的語法,Doxygen支持Qt使用的文檔標記,並可以輸出成HTML、以及CHMRTFPDFLaTeXPostScript手册页

範例代碼 编辑

 
内容输出为HTML的截图

注释文档一般用两个星号标志:

/**  * <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.  *  */  Timeint timemillis ///< Number of milliseconds passed since Jan 1, 1970.   {  // the code  } 

外部連結 编辑

  1. ^ Doxygen release 1.9.8. 2023年8月25日 [2023年8月28日]. 

doxygen, 此條目翻譯品質不佳, 2020年2月25日, 翻譯者可能不熟悉中文或原文語言, 也可能使用了機器翻譯, 請協助翻譯本條目或重新編寫, 并注意避免翻译腔的问题, 明顯拙劣的翻譯請改掛, href, template, html, class, redirect, title, template, href, wikipedia, html, class, redirect, title, wikipedia, 提交刪除, 此條目没有列出任何参考或来源, 2017年10月26日, 維基百科所有的內容都. 此條目翻譯品質不佳 2020年2月25日 翻譯者可能不熟悉中文或原文語言 也可能使用了機器翻譯 請協助翻譯本條目或重新編寫 并注意避免翻译腔的问题 明顯拙劣的翻譯請改掛 a href Template D html class mw redirect title Template D d a a href Wikipedia CSD html G13 class mw redirect title Wikipedia CSD G13 a 提交刪除 此條目没有列出任何参考或来源 2017年10月26日 維基百科所有的內容都應該可供查證 请协助補充可靠来源以改善这篇条目 无法查证的內容可能會因為異議提出而被移除 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開發者Dimitri van Heesch当前版本1 9 8 2023年8月25日 穩定版本 1 源代码库github wbr com wbr doxygen wbr doxygen编程语言C 操作系统跨平台类型文檔生成器许可协议GNU通用公共许可证网站www wbr doxygen wbr nlDoxygen是一個編寫軟件參考文檔的工具 該文檔是直接寫在源代码中的 因此比較容易保持更新 Doxygen可以交叉引用和源代码 使文件的讀者可以很容易地引用實際的源代码 KDE将Doxygen作为它的一部分且KDevelop具有內置的支持 Doxygen的发布遵守GNU通用公共许可证 是自由软件 用法 编辑如同Javadoc Doxygen從源文件提取註解 除了Javadoc的語法 Doxygen支持Qt使用的文檔標記 並可以輸出成HTML 以及CHM RTF PDF LaTeX PostScript或手册页 範例代碼 编辑 nbsp 内容输出为HTML的截图注释文档一般用两个星号标志 lt A short one line description gt lt Longer description gt lt May span multiple lines or paragraphs as needed gt param Description of method s or function s input parameter param return Description of the return value 但也能像HeaderDoc 一樣使用 的標誌 例如 lt A short one line description gt lt Longer description gt lt May span multiple lines or paragraphs as needed gt 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 lt jdoe example com gt 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 lt Number of milliseconds passed since Jan 1 1970 the code 外部連結 编辑官方网站 SourceForge net上的Doxygen Freecode 英语 Freecode 上的Doxygen MediaWiki documentation 页面存档备份 存于互联网档案馆 in Doxygen Example of documentation automatically generated by Doxygen 页面存档备份 存于互联网档案馆 for Apache Harmony Doxygen release 1 9 8 2023年8月25日 2023年8月28日 取自 https zh wikipedia org w index php title Doxygen amp oldid 75263942, 维基百科,wiki,书籍,书籍,图书馆,

文章

,阅读,下载,免费,免费下载,mp3,视频,mp4,3gp, jpg,jpeg,gif,png,图片,音乐,歌曲,电影,书籍,游戏,游戏。