cpp:doxygen
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cpp:doxygen [2017/01/13 22:23] – rlunaro | cpp:doxygen [2022/12/02 21:02] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| My objective is to generate the documentation in HTML. However, many kinds of output are available: chm, latex, eclipse help, math help, qt help. | My objective is to generate the documentation in HTML. However, many kinds of output are available: chm, latex, eclipse help, math help, qt help. | ||
| + | |||
| + | ===== Installation ===== | ||
| + | |||
| + | < | ||
| + | # sudo apt-get install doxygen | ||
| + | # sudo apt-get install graphviz | ||
| + | </ | ||
| ===== First round: empty document ===== | ===== First round: empty document ===== | ||
| Line 29: | Line 36: | ||
| PROJECT_BRIEF = "this is called PROJECT_BRIEF tag" | PROJECT_BRIEF = "this is called PROJECT_BRIEF tag" | ||
| - | PROJECT_LOGO = "images/ | + | PROJECT_LOGO = "logo.png" |
| # Errors, warnings | # Errors, warnings | ||
| Line 38: | Line 45: | ||
| # navigation and behaviour | # navigation and behaviour | ||
| OUTPUT_DIRECTORY = " | OUTPUT_DIRECTORY = " | ||
| - | FILE_PATTERNS = "*.cpp, *.h" | + | INPUT= . |
| + | FILE_PATTERNS = *.cpp *.h | ||
| RECURSIVE = yes | RECURSIVE = yes | ||
| EXCLUDE = " | EXCLUDE = " | ||
| Line 44: | Line 52: | ||
| # output | # output | ||
| GENERATE_HTML = yes | GENERATE_HTML = yes | ||
| + | GENERATE_LATEX = no | ||
| HTML_OUTPUT = html | HTML_OUTPUT = html | ||
| - | OUTPUT_LANGUAGE = "English" | + | OUTPUT_LANGUAGE = English ## Spanish |
| BRIEF_MEMBER_DESC = yes | BRIEF_MEMBER_DESC = yes | ||
| Line 71: | Line 80: | ||
| < | < | ||
| + | $ doxygen | ||
| + | </ | ||
| + | And let's check out the result. These lines: | ||
| + | |||
| + | < | ||
| + | PROJECT_NAME = " | ||
| + | |||
| + | PROJECT_NUMBER = " | ||
| + | |||
| + | PROJECT_BRIEF = "this is called PROJECT_BRIEF tag" | ||
| + | PROJECT_LOGO = " | ||
| </ | </ | ||
| + | |||
| + | are converted into this: | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | ===== Second round: Generating documentation ===== | ||
| + | |||
| + | For generating documentation, | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | What are the results. | ||
| + | |||
| + | This comments: | ||
| + | |||
| + | <code c++> | ||
| + | /** | ||
| + | * Brief explanation of the class Square. | ||
| + | * | ||
| + | * A more long, detailed explanation of the Square | ||
| + | * class, that represents the squares in the classs. | ||
| + | * | ||
| + | */ | ||
| + | class Square: public Figure { | ||
| + | public: | ||
| + | Square(); | ||
| + | ~Square(); | ||
| + | }; | ||
| + | </ | ||
| + | |||
| + | Generate this in the docummentation: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | And this: | ||
| + | |||
| + | <code c++> | ||
| + | /** | ||
| + | * | ||
| + | * This is the explanation of the square constructor. | ||
| + | * | ||
| + | */ | ||
| + | Square:: | ||
| + | // TODO Auto-generated constructor stub | ||
| + | |||
| + | } | ||
| + | </ | ||
| + | |||
| + | Generates this: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | The comments on public properties: | ||
| + | |||
| + | <code c++> | ||
| + | class Square: public Figure { | ||
| + | double side; /*!< comment on a private value */ | ||
| + | public: | ||
| + | double something; /*!< comment on a public property | ||
| + | </ | ||
| + | |||
| + | Yields this: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
cpp/doxygen.1484346237.txt.gz · Last modified: 2022/12/02 21:02 (external edit)
