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:
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:
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:
The results for documenting a method (or function) would be similar to those illustrated here.
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:
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:
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:
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:
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:
联系客服