Introduction and use of Doxygen

Source: Internet
Author: User
Tags doxygen

Version record

Date

Revision

Description

Author

2009-05-11

0.0.1

Draft

Wenling buyi

       
       


Directory

Version record... 2

Directory... 3

1 Overview... 4

1.1 Introduction... 4

1.2 jobs that can be completed... 4

1.3 functional diagram... 4

2 how to use... 5

2.1 first use... 5

2.1.1 solution to Chinese Garbled text... 6

2.2 command line method... 6

2.2.1 create a configuration file... 6

2.2.2 run doxygen. 6

2.2.3 docized code... 6

3. Getting started... 6

4 configuration file... 6

5. How to document the source code... 7

6 advanced... 7

7 references... 7

8 contact information... 7


1 Overview 1.1 Introduction

This section takes Doxygen-1.6.2 as an example to introduce the overview of this tool.

Function: extract comments from the source code to form documents in various output formats;

Supported programming languages: fully supports C, C ++, Java, IDL, Objective-C, Python, PHP, C #, Fortran, and VHDL, and partially supports D;

Ø output format: HTML, Latex, RTF, manpage, Qt help project, and XML are supported directly, and chm, Qt Compressed Help, posttend, and PDF are supported indirectly;

Compatible with similar tools such as JavaDoc, Qt-Doc, and KDOC;

Supported platforms: Unix (including Linux), MacOs, and Windows;

Home page: http://www.doxygen.org/

Email list:

Doxygen-user@lists.sourceforge.net

Doxygen-develop@lists.sourceforge.net

Author: Dimitri van Heesch (dimitri@stack.nl );

Ø Reference Manual: The reference manual under the Doxygen installation directory;

1.2 of tasks can be completed

It can generate online browsing documents (in HTML format) or offline reference manuals (in LATEX format) from a series of source files ). It also supports RTF (MS-Word), PostScript, PDF with hyperlinks, compressed HTML and Unix man pages. The document is extracted directly from the source file, which makes it easy to synchronize the document with the source code;

By configuring doxygen, you can extract the code structure from the source file that has never been documented. This is very useful for quickly clarifying the clues from large source code packages. It can also automatically generate a containing relationship diagram, an inheritance diagram, and a collaborative plot, so that you can intuitively see the relationship between various elements;

You can even "Abuse" doxygen to create common documents. This is how the Doxygen manual (manual) is generated.

1.3 function Diagram

The function diagram describes the information flow of Doxygen. For details, see.

2. Use 2.1 for the first time

Doxygen has two operation modes: graphical mode and command line mode. For beginners, the former is very easy to use.

Enable bin/doxywizard.exe and set parameters in the Wizard. The main purpose is to set content on the Wizard-> Project page. You can retain the default value for other pages. This tab mainly sets the address of the source code to be read and the address of the output document. Note that the "Scan recursively" option must be checked;

Ø in doxywizard.exe, open the Run tab, select the working directory, and click the Run doxygen button to automatically generate various outputs in the target directory set above: html, Latex, etc;

2.1.1 solution to Chinese garbled characters

Here is a special note ------ Character Set Problem: if the Chinese comments in the document you want to read use GB2312 (such as Source insight, notepad, and other editing tools, the default Chinese Character Set is GB2312. This is because the Doxygen Default Input character set is UTF-8. You only need to modify Expert-> Input-> INPUT_ENCODING to GB2312 to solve this problem.

2.2 command line

This section describes the three steps of command line operations.

2.2.1 create a configuration file

There are two methods.

First, use the following command to generate the default configuration file, and then edit the configuration file as needed.

        doxygen -g 

Method 2: Use the doxywizard.exe tool mentioned in the previous section to configure and save the configuration file.

For more information about the Configuration file, see the Configuration section in the Doxygen manual.

2.2.2 run doxygen

Run the following command to generate the document.

Doxygen-g

2.2.3 docized code

This section and the previous section introduce the doxygen GUI and Command operations. According to the documents generated above, we often feel that there are no other Doxygen manuals. This is due to the lack of documentation. What is "docalization" is to discuss how to properly place your comments in the code to produce beautiful documents. Docization tells us how to write comments of the source code if you want to use Doxygen well.

Obviously, although this section is placed in step 3, it should be the first step in a new project.

3. Getting Started

After writing this article, I suddenly found the references [2-4] on the Internet. I don't think it is necessary to write it again. People have already written it quite well.

For beginners, read the references [4] And then [3].

4. Configuration File

See doxygen manual and references [2].

5. Document source code

See doxygen manual and references [2].

6. Advanced

See doxygen manual and references [5].

Reference [5] provides a way to automatically enter Doxygen comments in Vim.

7 References

1. doxygen_manual-1.6.2.chm: root directory at Doxygen

2. Learn how to use doxygen to generate source code. This document mainly describes how to configure parameters.

3. Doxygen: it is better to introduce several annotation examples.

4. Quick Start Doxygen

5. Add some macros to write doxygen comments to VIM.

8. Contact Information

I hope this document will help you. If you find any problems or have any better suggestions, please feel free to contact me!

Wenling clothing:

MSN: sikinzen@hotmail.com

Mail: sikinzen @ yahoo.com.cn

QQ: 526679213

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.