Use Doxygen to generate the net help document

Source: Internet
Author: User
Tags doxygen

1. What is Doxygen?
Doxygen is a program file generation tool that converts a specific annotation in the program into a description file. We usually write comments more or less when writing a program, but for others, we need to directly explore the comments in the program, just as hard as salvage the titani. Most of the useful comments are descriptions of functions, categories, and so on. Therefore, if you can reorganize the annotation into a pure reference manual based on the program structure, it will reduce the burden for people who will use your program code later. On the other hand, File Sorting is a heavy burden for you.
Doxygen is the rule you follow when writing comments. Then, he can help you generate beautiful documents.
Therefore, the use of Doxygen can be divided into two parts. The first is to write comments in a specific format, and the second is to use the Doxygen tool to generate documents.

II.
Doxygen-1.8.4-setup.exe
Http://jaist.dl.sourceforge.net/project/doxygen/rel-1.8.4/doxygen-1.8.4-setup.exe
Graphviz-2.30.1.msi (not required) if you need to use more powerful features such as the class inheritance architecture diagram, you need to install this software configuration to use
Http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.30.1.msi

III. C # Notes
<Summary> overall Summary description
<Summary> Description </summary>
Class, attribute (not recommended), method, etc.

<Para> A valid description of the entry parameters involved in the method after Summary
<Param name = username> this parameter is the user's account </param>
The entry parameters of the method;

<Returns> describes the return values of methods;
<Returns> If the return value is zero, the operation succeeds. If the value is-1, the operation fails. </returns>
The Return Value of the method;

<Remarks> remarks some statements
<Remarks> This class needs to call methods related to another User class </remarks>
Class, method, and attribute;

<See> Generate a hyperlink to other descriptions in the generated document;
<See cref = "[member]"/>
You can add it to other annotation identifiers.

<Seealso> the difference with the above is that this identifier displays the hyperlink in the "See Also" area at the end of a document, while the former is in the document;
<Seealso cref = "[member]"/>
It cannot be added to other annotation identifiers.

<Value> provides an overview of an attribute;
<Value> This is a public attribute </value>
Attribute

<Code> if you need to place a part of the source code segment, you can use this identifier to mark it
<Code>
Public int add (int a, B)
{
Return a + B;
}
</Code>
You can add it to other annotation identifiers.

<Exception> explain the exceptions that may be thrown in the program;
<Exception cref = "System. Exception"> thrown exceptions </exception>
If an exception is thrown in the method, such as "try... This identifier can be used to explain the catch structure.

<Permission> explain the access permissions of methods:
<Permission cref = "System. Security. PermissionSet"> This is a public method. </permission>
Method, attribute

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

<Example> examples are usually used together with <code>;
<Example> the following example shows how to call the Add method:
<Code>
Class MyClass
{
Public static int Main ()
{
Return Add (1 + 2 );
}
}
</Code>
</Example>
It can be inserted into other identifiers;

<Paramref> reference an entry parameter elsewhere
<Paramref cref = "a"> note that this is an integer parameter </paramref>

Iv. Configuration
Step 1: it is the working directory of Doxygen. Please specify an existing non-Chinese folder
The main interface is as follows:

Step 2: Specific Configuration

Wizard Tab

Project

 

Mode

 

Output

Remove the With search function hook

 

Diagrams

(Use built-in class dimo-generator) uses the built-in generation function to generate class diagrams for each class. Only one class is not generated.

If you need a larger function, such as the class inheritance system diagram, select the third item (Use dot tool from the GraphViz package) to install GraphViz.

 

Export Tab

Project

OUTPUT_LANGUAGE select chinese

TAB_SIZE is the length of a Tab.

 

Build

The public method is generated by default, and EXTRACT_ALL is selected here. It ensures that all public methods and project methods are output. EXTRACT_STATIC is the static method generated.

 

Input

Input is the Input directory. multiple directories are supported. We can put the project directory and include directory. The following Exclude ignores directories and files and can be added by ourselves.

 

Index

Select ALPHABETICAL_INDEX. The class contains a composite index.

 

Generated index

DoxygenTest (str,Program code

Configuration File

Related Article

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.