Download - Abstract
![Page 1: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/1.jpg)
1
Doxygen
National University of Kaohsiung Department of Applied Mathematics
Yu-Kai Hong , Chien-Hsiang Liu , Wei-Ren ChangFebruary, 2008
![Page 2: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/2.jpg)
2
Abstract
Source code documentation generator tool,
Doxygen is a documentation system for
C++, C, Java, Objective-C, Python,
IDL (Corba and Microsoft flavors),
Fortran, VHDL, PHP, C#,
and to some extend D.
![Page 3: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/3.jpg)
3
Installation
For Linux, download the software from the web, then you can use it.
For Windows, also download the software, and follow the indication, then you can use it.
Link :http://www.stack.nl/~dimitri/doxygen/
![Page 4: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/4.jpg)
4
Procedure
First, you have to generate a doxygen configuration-file. By using the command: doxygen –g filename
Next, edit your configuration-file and annotations.
Finally, create your doxygen-file. Using the command : doxygen filename
![Page 5: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/5.jpg)
5
Some Doxygen Configurations (1)
PROJECT_NAME: The name of your project. PROJECT_VERSION: The version of your proj
ect. OUTPUT_DIRECTORY: Specify the path to ou
tput your file. INLINE_SOURCES : Decide if you want to e
mbed your codes in the documents .
![Page 6: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/6.jpg)
6
Some Doxygen Configurations (2)
INPUT:
Specify the path to include your file.If you specify a directory, then all files under the directory will been handled.Moreover, you can include multiply files. For example, input=file1.c,file2.c,file3.c .
![Page 7: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/7.jpg)
7
Some Doxygen Configurations (3)
GENERATE_HTML : Decide if you want to generate html-file.
GENERATE_LATEX : Decide if you want to generate LATEX-file.
![Page 8: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/8.jpg)
8
The Comment Form in C++
Single row comment :
// … single row …
Multi-row comment :
/* … row 1 …
… row 2 …
*/
![Page 9: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/9.jpg)
9
The Comment Form in Doxygen
Single column comment :
Type 1 :
/// /// … text …
///
![Page 10: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/10.jpg)
10
The Comment Form in Doxygen
Single column comment :
Type 2 :
//! //! … text …
//!
![Page 11: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/11.jpg)
11
The Comment Form in Doxygen
Example 1:
/// This is the single column comment
void function1(void);
Example 2:
//! This is the single column comment
void function1(void);
Examples\1\index.html
![Page 12: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/12.jpg)
12
The Comment Form in Doxygen
Multi-column comment :
Type 1:
/** * … text …
*/
![Page 13: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/13.jpg)
13
The Comment Form in Doxygen
Multi-column comment :
Type 2 :
/*! * … text …
*/
![Page 14: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/14.jpg)
14
The Comment Form in Doxygen
Multi-column comment :
Type 2 :
/*! … text …
*/
![Page 15: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/15.jpg)
15
The Comment Form in Doxygen
Example 1:
/** This is the multi-column comment\n
* The second column.
*/
double* function2(int*,double);
Examples\2\index.html
![Page 16: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/16.jpg)
16
The Comment Form in Doxygen
Example 2:
/*! This is the multi-column comment\n
* The second column.
*/
double* function2(int*,double);
Examples\2\index.html
![Page 17: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/17.jpg)
17
The Brief and Detail Description
In Front of the program block ” { }”
… Comment …
{
… Program implementation …
}
![Page 18: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/18.jpg)
18
The Brief and Detail Description
Type 1 :
/// brief description. /** detail description. */
![Page 19: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/19.jpg)
19
The Brief and Detail Description
Type 2 :
//! brief description.
//! detail description
//! … text …
![Page 20: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/20.jpg)
20
The Brief and Detail Description
Example 1:
/// This is the brief description.
/** This is the detail description.
*
*/
double function3(double,double);
Examples\3\index.html
![Page 21: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/21.jpg)
21
The Brief and Detail Description
Example 2:
//! This is the brief description.
//! This is the detail description.
//!
//!
double function3(double,double);
Examples\3\index.html
![Page 22: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/22.jpg)
22
The Brief and Detail description
Note1 : Only one brief and detail description are valid.
Note2 : There is one brief description before a
declaration and before a definition of a code
item, only the one before the declaration will
be used.
Note3 : The situation for the detail description is
adverse of the brief description.
![Page 23: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/23.jpg)
23
The Brief and Detail Description
Example :
/// (1)The brief description which is used.
/// (1)The detail description which is not used
double function4(double,double);
/// (2)The brief description which is not used.
/// (2)The detail description which is used.
double function4(double var1,double var2)
{ return (var1+var2); };
Examples\4\index.html
![Page 24: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/24.jpg)
24
The Brief and Detail Description
Behind the program block ” { }”
{
… Program implementation …
}
… Comment …
![Page 25: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/25.jpg)
25
The Brief and Detail Description
Type 1 :
///< brief description. /**< detail description. */
![Page 26: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/26.jpg)
26
The Brief and Detail Description
Type 2 :
//!< brief description
//!< detail description
//!< ... Text ...
![Page 27: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/27.jpg)
27
The Brief and Detail Description
Example 1:
double function5(double,double);
///< This is the brief description.
//!< This is the detail description.
//!<
//!<
Examples\5\index.html
![Page 28: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/28.jpg)
28
The Brief and Detail Description
Example 2:
double function5(double,double);
//!< This is the brief description.
/*!< This is the detail description.
*
*/
Examples\5\index.html
![Page 29: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/29.jpg)
29
The Brief and Detail Description
Note1 : Put additional mark < in the comment block
Note2 : There blocks only used to document functions
and the parameters.
Example :
int var; //!< The single column comment. int var; /**< The multi-column comment. *>
![Page 30: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/30.jpg)
30
The Brief and Detail Description
Note3 : They cannot used to document, files, classes,
unions, structs, namespaces and enums …etc.
Note4 : There is one brief description before a
declaration and before a definition of a code
item, only the one before the declaration will
be used, the same situation is for the detail
description.
![Page 31: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/31.jpg)
31
The Brief and Detail Description
Example :
double function6(double,double);
///< (1)The brief description which is used.
//!< (1)The detail description which is used
double function6(double var1,double var2)
{ return (var1+var2); };
///< (2)The brief description which is not used.
//!< (2)The detail description which is not used.
Examples\6\index.html
![Page 32: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/32.jpg)
32
Special Syntax in Doxygen
Put additional mark \ in the comment block
\ + command
Put the document at other places on the program,
rather than in front of or behind the program block.
![Page 33: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/33.jpg)
33
Some Commands (1) - File
@file: The comment of the file. @author: Informations of the author. @brief:The comment of function or class. Example: /**
* @file myfile.h * @brief A brief introduction of the file. * … complete information … * @author Some informations of the author. */
![Page 34: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/34.jpg)
34
Some Commands (2) - Function
@param: The comment of the parameter syntax :
@param arg_name comment of arg_name
e.g.@param mtxA Return the Laplacian
matrix called A
![Page 35: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/35.jpg)
35
Some Commands (3) - Function
@return:Display return value. @retval: The comment of return value. Example:
/**
* @brief A brief introduction of your function
* … complete information …
* @param a Some introduction of parametric a. * @return Some introduction of return value. */
![Page 36: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/36.jpg)
36
Some Commands (4)
\b \c \e : set the next word to bold, italic, or courier, respectively. e.g. /// You can make things \b bold, \e italic, or set them in \c courier . results in: You can make things bold, italic, or set them in courier.
![Page 37: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/37.jpg)
37
Some Commands (4)
\n: force a newline . \internal :
starts a paragraph with "internal information" (such as implementaiton details). The paragraph will be included only if the INTERNAL_DOCS option is enabled.
![Page 38: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/38.jpg)
38
Complete C++ Example
About this code, please refer to
“C++ Language Tutorial, Juan Soulie, 2007.”
1. crectangle.h
2. set_values.h
3. crectangle.cpp
4. This is a complete html file.
![Page 39: Abstract](https://reader035.vdocuments.us/reader035/viewer/2022070412/56814a0b550346895db73820/html5/thumbnails/39.jpg)
39
Reference :
-Home http://www.stack.nl/~dimitri/doxygen/
- Manual http://www.stack.nl/~dimitri/doxygen/manual.html
- Articles http://www.stack.nl/~dimitri/doxygen/articles.html
- Chinese: http://www.stack.nl/%7Edimitri/doxygen/doxygen_in tro_cn.html