打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Doxygen Examples

The doxygen tag @mainpage is an easy way to add content to the main page of your documentation. The following code ...

/**
 * @mainpage  Title of Main Page
 *
 *            Descriptive information placed on main page.
 *            <p/> <br/>
 */


... results in the following page displayed via the "Main Page" tab:

Documenting a File

A description can be associated with a file by using the @file tag. The following code ...

/**
 * @file NewClass.java
 *
 * @brief      A brief file description.
 * @details    More verbose file description.
 */


... results in the generated documentation page via the "Files" tab:

Documenting Member Data

The following code ...

/**
    * @brief   Short member data description.
    */
   int dataMember;


... results in the following generated documentation via the "Class Members" tab:


Then upon clicking on the link, you are taken to the "Member Data Documentation" section in the "Class Reference" page:

Documenting a Class

The results for documenting a method (or function) would be similar to those illustrated here.

Detailed Description Tags

The following description code ...

/**
    * @brief      Short class description.
    *
    * @details    Verbose description of class details.
    *
    * Note the following example code:
    * @code
    *    Window win = new Window(parent);
    *    win.show();
    * @endcode
    */
    class ClassName extends ExtendedClassName
   {
      /* do nothing */
   }


... generates the Detailed Description Section via the "Classes" tab as follows:

Author, Date and Version Tags

The following code ...

/**
    * @author     Fred McClurg, fred-mcclurg@uiowa.edu
    * @date       June 10, 2010
    * @version    0.2.0.1 (alpha)
    */
    class ClassName extends ExtendedClassName
   {
      /* do nothing */
   }


... generates the Author, Date, and Version Sections on the page via the "Classes" tab. All e-mail addresses are converted to mailto hypertext links automatically. Note the doxygen tag @author for example:

Note, Attention, and Warning Tags

The following code ...

/**
    * @note       This class has no class.
    * @attention  Should only be used by those who
    *             know what they are doing.
    * @warning    Not certified for use within mission
    *             critical or life sustaining systems.
    */
   class ClassName extends ExtendedClassName
   {
      /* do nothing */
   }


... generates the Note, Attention, and Warning Sections on the page via the "Classes" tab as follows:

Bug and Todo Tags

The following code ...

/**
    * @bug        Division by zero does not work.
    * @todo       Finish writing the class.
    */
   class ClassName extends ExtendedClassName
   {
      /* do nothing */
   }


... generates the Bug, and Todo Sections on the page via the "Classes" tab as follows:

All of the Bug items are reported on a Bug List page:



In a similar fashion, all of the Todo items are reported on a Todo List page:

Documenting a Method

The following code ...

/**
    * @brief      Short method description.
    *
    * @details    Verbose description of method
    *             (or function) details.
    *
    * @param      args     Command line argument.
    *
    * @return     The status of the program.
    *
    * @retval     status   The program status.
    *                      <ul>
    *                         <li> 0 = Failure
    *                         <li> 1 = Success
    *                      </ul>
    *
    * @todo       Make it do something.
    *
    * @bug        To be Microsoft Certified,
    *             must never deallocate memory.
    *
    * @exception  StringIndexOutOfRangeException
    *             if index is not between
    *             <code>0</code> and
    *             <code>length() - 1</code>.
    *
    * @see        NewClass
    * @see        http://java.sun.com
    */
   public static int main(String[] args)
   {
      ...
      return( status );
   }


... results in the following Member Function documentation. All URLs are converted to hypertext links automatically. Note the doxygen tag @see for example:


本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
如何在Eclipse中如何自动添加注释和自定义注释风格
Table of Contents
brophp和ckeditor整合手记
HTML代码实例-HTML常用格式Tag .
用表单字段加亮的方式为用户提供友好的界面
Doxygen快速入门
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服