Use Doxygen to generate C# help documentation


Article catalog [click to expand](?)[+]

  1. One what is Doxygen
  2. Two prepare software
    1. 1 doxygen
    2. 2 graphviz
    3. 3 Microsoft HTML Help Workshop
  3. Three C comments
  4. Four configuration
    1. 1 Doxygen working directory
    2. 2 Wizard
    3. 421 Project
    4. 422 Mode
    5. 423 Output output
    6. 424 Diagrams
    7. 3 Export
    8. 431 Project Project
    9. 432 Build
    10. 433 Input
    11. 434 Index Index
    12.       435 HTML
    13.       436 Dot
    14. Five Run
    15. Six HTML renderings
    16. Seven CHM renderings
    17. Eight reminders

One. What is Doxygen?

Doxygen is a program file generation tool that can convert specific comments in the program into a description file. Usually when we write programs, we will write comments more or less, but for others, it is as hard as salvaging the Titanic to directly explore the comments in the program. Most of the useful comments belong to the description of functions, categories, etc. Therefore, if the annotations can be processed and rearranged into a pure reference manual based on the structure of the program itself, it will reduce a lot of burden for those who use your program code later. However, on the other hand, the work of organizing files is a heavy burden for you.
Doxygen is to follow some of its rules when you write comments. Then, he can help you produce 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 Doxygen's tools to generate documents.

two. Prepare the software

2.1 doxygen

Official website:http://www.doxygen.nl/

download link:http://www.stack.nl/~dimitri/doxygen/download.html

2.2 graphviz

Official website:http://www.graphviz.org/content/dot-dotexe

Note: This software is not necessary. If you need to use more powerful functions such as class inheritance system diagrams, you need to install this software for configuration and use.Need to install Java environment
download link:http://www.graphviz.org/Download_windows.php

 

2.3 Microsoft HTML Help Workshop

chm file creation tool

Three software

three. C# comments

<Summary>  Brief description of the whole
<summary>Description</summary>
Classes, attributes (not recommended), methods, etc. 
 
<para>  Following the Summary, effective explanation of the entry parameters involved in the method
<param name=username>This parameter is the user's account</param>
Method entry parameters; 
 
<returns>  Explain the return value of the method;
<returns>A return value of zero means the operation was successful, -1 means the operation was unsuccessful</returns>
The return value of the method; 
 
<remarks>  Remarks on some sentences
<remarks>This class needs to call another User class related method</remarks>
Classes, methods, attributes, etc.; 
 
<see>  Generate a hyperlink to other descriptions in the generated document;
<see cref=”[member]”/>
Can be added to other comment identifiers 
 
<seealso>  The difference with the above is that this identifier shows the hyperlink in the "See Also" area at the end of a document, while the former is in the document;
<seealso cref=”[member]”/>
Can not be added to other comment identifiers 
 
<value>  A summary explanation of an attribute;
<value>This is a public property</value>
Attributes  
 
<code> If you need to put a part of the source code section, you can use this identifier to mark it out
<code>
public int add(int a,b)
{
return a+b;
}
</code>
Can be added to other comment identifiers 
 
<exception>  Explain the exceptions that may be thrown in the program;
<exception cref=”System.Exception>Exception thrown</exception>
If an exception is thrown in the method, such as "try...catch structure", you can use this identifier to explain 
 
<permission>  Some explanations on method access rights:
<permission cref=”System.Security.PermissionSet>This is public method</permission>
Method, attribute 
 
<c>  versus<code>The identifier is basically the same, but this identifier is only used for a single line of code;
<c>return a+b;</c>
Can be inserted in other identifiers; 
 
<example>  For example, usually with<code>Supporting the use of;
<example>  The following example shows how to call the Add method:
<code>
class MyClass
{
public static int Main()
{
return Add(1+2);
}
}
</code>
</example>
Can be inserted in other identifiers; 
 
<paramref>  Reference an entry parameter elsewhere
<paramref cref=”a>Please note that this is an integer parameter</paramref> 

four. Configuration

4.1 Doxygen working directory

Please choose oneExisting folders with non-Chinese paths,As shown below:

4.2 Wizard

4.2.1 Project

4.2.2 Mode mode

 

4.2.3 Output

Remove the hook of With search function

Plain HTML, as the first picture below, with navigation panel as the second picture below

  

4.2.4 Diagrams

(Use built-in class diagram generator) will use the built-in generation function to generate the class diagram of each class, only one class is not generated.

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

4.3 Export

4.3.1 Project Project

OUTPUT_LANGUAGE select chinese TAB_SIZE is the length of Tab

4.3.2 Build

The default is to generate a public method, here also select EXTRACT_ALL. It guarantees to output all public methods and project methods, EXTRACT_STATIC is to generate static methods.

 

4.3.3 Input

Input is the input directory and supports multiple directories. We can put in the project directory and the include directory. The Exclude below ignores directories and files and can be added by yourself.

4.3.4 Index

Select ALPHABETICAL_INDEX, there will be a combination type index entry in the class.

The generated index is shown below

      4.3.5 HTML

If you have previously selected (prepare form compressed HTML(.chm)), the GENERATE_HTMLHELP item will be selected, and the CHM_FILE below it will fill in the name of your CHM document (To add .chm). HHC_LOCATION selects the HHC program under your HTML Help WorkShop installation directory, usually in C:/Program Files (x86)/HTML Help Workshop/hhc.exe. Select TOC_EXPAND will generate the tree directory on the left.

      4.3.6 Dot

If you choose the built-in generation function (Use build-in class diagram generator), CLASS_DIAGRAMS will be in the selected state, and HAV_DOT will be in the unselected state. If you choose to use the GraphViz dot tool to generate (Use dot tool from the GraphViz package) On the contrary, please choose CLASS_DIAGRAMS. At this time, you need to set the following DOT_PATH to the installation directory of GraphViz, otherwise it will not be generated.

In addition, if the following options are selected, the corresponding graph will be generated;

CLASS_GRAPHS Class diagram

COLLABORATION_GRAPH Collaboration graph

GROUP_GRAPHS Group picture

UML_LOOK Is it UML appearance?

INCLUDE_GRAPH                   include

INCLUDED BY GRAPH is included

CALL_GRAPH Call

CALLER_GRAPH is called

DIRECTORY_GRAPH Table of Contents

GRAPHICAL_HIERARCHY Inheritance system diagram

Five.Run

After configuration, enter the Run tab and clickRun Doxygen Start to generate, wait for the generation to complete and click "Show HTML output

6. HTML renderings

 

 

Seven. CHM renderings

Share my Doxygen configuration file:

8. Reminder

To remind, if it is a WIN8 operating system, it is recommended to set dot compatibility and run as an administrator, otherwise a warning box will pop up that dot stops running.


This article is reproduced from Zhao Qingqing's blog, the original link: http://www.cnblogs.com/zhaoqingqing/p/3842236.html, please contact the original author if you need to reprint



Intelligent Recommendation

How to use eclipse to generate javadoc help documentation

javadoc is a technology provided by Sun. It extracts annotations such as classes, methods, and members from the program source code to form an API help document matching the source code. The following...

Use Idea to generate JavaDoc help documentation

Use Idea to generate Java Doc documents! Step 1: As shown in the figure, prepare the project for which you want to generate Doc documents. [ Step 2: In the navigation bar, click lools to find :Generat...

Use eclipse to generate javadoc help documentation

Attachment: Use eclipse to generate javadoc help documents According to the description standard of the Javadoc document, carefully write comments on the classes, interfaces and other files in the pro...

Use doxygen to generate Chinese documents for C/C++ programs

Use doxygen to generate Chinese documents for C/C++ programs (on) Annotate the source code in the agreed format and use the tool to process the annotated source code to produce the document. Producing...

Generate source code documentation with Doxygen - Reference

Quote: The original text comes from http://www.iteye.com/topic/874927 In order to facilitate my reading, the text format is slightly adjusted.   Doxygen is a tool for generating technical documen...

More Recommendation

Ubuntu system uses Doxygen to generate documentation

1 Introduction:    Doxygen is an open source, cross-platform, document system described in a style similar to JavaDoc. Doxgen can start from a set of source files to generate an online browser in HTML...

Generate QCH help documentation

Generate QCH help documentation Install doxygen Create a new DOC directory in the project Use Doxygen or Doxywizard to generate HTML documents Doxywizard is the GUI interface Create myHelp.qhp in the ...

Use Doxygen software to automatically generate program code chm format help documents

Doxygen generates chm help documentation Code help documents can bring qualitative improvement to program development, understanding, maintenance, and expansion! Preparation Download and installDoxyge...

Use Doxygen to implement code self-documentation

Reference link I. Introduction to Doxygen 1.1 review Doxygen is a program's document generating tool that converts comments in the program into documentation, the latter API reference manual To follow...

Use the Doxygen tool to convert comments into API documentation

Next, use the Doxygen tool to extract the comments in the DoxygenTest project and convert them into API documents in chm format. The third part is divided into nine steps: 1. Project configuration; 2....

Copyright  DMCA © 2018-2023 - All Rights Reserved - www.programmersought.com  User Notice

Top