Using Doxygen to generate net help documents

Source: Internet
Author: User
Tags doxygen

Go from: Generate net help documents using Doxygen

A What is Doxygen?
Doxygen is a program's file generation tool that converts specific annotations in a program into a description file. Usually we write the program, more or less will be written in the comments, but for others, to directly explore the program in the comments, and salvage titanic the same hard. Most useful annotations are for descriptions of functions, categories, and so on. Therefore, if you can follow the structure of the program itself, the annotations are processed and re-organized into a purely reference manual, for those who use your program code later will reduce a lot of burden. However, in turn, the work of filing is a heavy burden for you.
Doxygen is when you write a comment, slightly following some of the rules it has set. Then, he can help you produce beautiful documents.
Therefore, the use of Doxygen can be divided into two parts. The first is the writing of annotations in a particular format, and the second is the use of Doxygen tools to produce documents.

Graphviz-2.30.1.msi (not required) if you need to use more powerful features such as class inheritance system diagrams, you need to install this software configuration to use

Three C # comments
<Summary> an overview of the overall description
classes, attributes (not recommended), methods, and so on

<para> following the summary, an effective explanation of the entry parameters involved in the method
<param name=username> This parameter is the user's account </param>
The entry parameters of the method;

<returns> The return value of the method is interpreted;
<returns> return value 0 for successful operation, 1 for unsuccessful operation </returns>
The return value of the method;

<remarks> Comment description for some statements
<remarks> This class needs to invoke another user class related method </remarks>
Classes, methods, attributes, etc.;

<see> generates a hyperlink in the generated document that is connected to another description;
<see cref= "[member]"/>
Can be added to other comment identifiers

The difference between <seealso> and the above is that this identifier shows a hyperlink at the end of a document in the "See Also" area, while the former is in the document;
<seealso cref= "[member]"/>
cannot be added to other comment identifiers

<value> A summary explanation of an attribute;
<value> This is a public property </value>

<code> If you need to place a portion of the source code snippet, you can mark it with this identifier
public int Add (int a, b)
return a+b;
Can be added to other comment identifiers

<exception> Explain the exceptions that may be thrown in the program;
<exception cref= "System.Exception" > Thrown exception condition </exception>
In the method, if there is an exception, such as "Try...catch structure" can use this identifier to explain

<permission> Some explanations of access to methods:
<permission cref= "System.Security.PermissionSet" > This is public method </permission>
Method, Property

<c> is basically the same as <code> identifier, but this identifier is used only for a single line of code;
<c>return a+b;</c>
It can be inserted into other identifiers;

<example> examples, usually with the use of <code> matching;
<example> The following example shows how to call the Add method:
Class MyClass
public static int Main ()
Return Add (1+2);
can be inserted in other identifiers;

<paramref> referencing an entry parameter in other places
<paramref cref= "A" > Please note that this is an integer parameter </paramref>

Four Configuration
Step 1: Is the working directory of Doxygen, please specify an existing non-Chinese folder
Main interface such as:

Step 2: Specific configuration

Wizard Tab




Remove the hook with search function


(Use built-in class diagram generator) uses built-in build functionality to generate class diagrams for each class, and only one class is not generated.

If you need a larger function such as class inheritance system diagram, select the third item (use Dot tool from the GraphViz package) requires an Ann GraphViz.

Export tab


Output_language Select Chinese

Tab_size is the length of the tab


The public method is generated by default, and Extract_all is also selected here. It guarantees that all public methods and project methods are output, and that extract_static is the generation of static methods.


Input directory, support multiple directories, we can put into the project directory and the Include directory, the following exclude is to ignore directories and files, can be added by themselves.


Select Alphabetical_index and the class will have a combined type index entry.

The generated index


If you have previously selected (Prepare form compressed HTML (. chm)) Here the Generate_htmlhelp item will be selected, and the chm_file below it fills in the name of your CHM document. Hhc_location Choose your HTML help Workshop installation directory HHC program, generally in C:/Program Files (x86)/html help Workshop/hhc.exe. Selecting Toc_expand will generate the tree directory on the left.


If you choose the built-in build function (Use Build-in class Diagram generator) At this point Class_diagrams is selected, and Hav_dot is not selected, if you chose to use the Graphviz dot tool to generate the Dot tool from the GraphViz package) the opposite is the case, please choose the class_diagrams. At this point you need to set the following Dot_path as the Graphviz installation directory, otherwise you will not be able to build.

In addition, the following options are selected to generate the corresponding graph, not the selection is not generated.

Class_graphs class Diagram

Collaboration_graph Collaboration diagram

Group_graphs Photos

Uml_look whether the UML appearance

Include_graph include

INCLUDED by GRAPH is include

Call_graph Call

Caller_graph is called

Directory_graph Directory Map

Graphical_hierarchy Inheritance system diagram

Once configured, go to the Run tab and click Run Doxygen to start the build.

After the build is complete

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: 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.