[Original] use doxygen to manage project documents or comments. [Original] use doxygen to manage project documents or comments. doxygen Project 1 and doxygen application scenarios: doxygen can be used to manage comments of mainstream programming languages and form a document system [original] using doxygen to manage project documents or comments. doxygen project
I. doxygen application scenarios:Doxygen can be used to manage the comments of mainstream programming languages to form a document system. (Including C, C ++, C #, Objective-C, IDL, Java, VHDL, PHP, Python, Tcl, and Fortran ). Doxygen official website address (http://www.doxygen.nl/) recently most of the time spent on api interface maintenance, one of the more important links is the interface you write how to make the caller understand the usage at a glance. Both the cooperation between the internal wireless server and the client and the Open API interfaces are the same. It took several days to try using doxygen and svn hook to manage the interface documentation, which is very convenient and practical. The official doxygen website uses doxygen. for more specific results, see http://www.doxygen.nl /.
Below I will first post my own parts, and the UI is very frustrating. when you are using it, you can make the UI Department of the company beautify it. because I am still mainly using the intranet, therefore, I have never considered the UI experience as follows:
II. installation:Currently, doxygen fully supports mainstream systems such as windows, mac ox, and linux. It is basically used in all mainstream programming languages. Here we will briefly introduce the process of compiling and installing the source code in ubuntu. For other installation methods, refer to the official website.
3. configuration of the configuration file using doxygen:
Doxygen is used to configure the configuration file. that is to say, you only need to configure the configuration file slightly and then execute the command: xxxx/doxygen xxxx. conf can generate the document you want (here, doxygen provides documents in multiple formats, I mainly use html, so that we can configure a web service on this html by ourselves, you can use the document on the web .), Doxygen provides more than 200 configuration items. you can use the configuration file to complete a wide range of functions. The following are some common configuration instructions:
4. after doxygen is configured, you can write comments. after doxygen is configured, you will spend most of your time writing and maintaining comments in your code. You want to use doxygen to manage documents. Therefore, no strict requirements are required for code comments.
/*** @ Brief here we use brief to describe the main functions of the interface method. * @ date interface method creation time * @ author interface method creator * @ param: The parameters are described as follows: * name | type | description of param * ---------- | ----------- | -------------------- * car_id | int | vehicle source number * province | int | province where the salesman is located ** x | x * x | the return values of x * x | x * @ return are described as follows: * name | type | description of value * -------- | ---------- | ---------------------- * car_id | int | vehicle source number * car_info | object | Car source information in json format * @ warning this interface needs to inform the caller of some warnings * @ attention this interface needs to inform the caller of some precautions * @ note some of this interface remarks. It is usually used when the latter makes a major change to this interface. Note what someone modified at a certain time point * @ todo some unfinished to-do content of this interface */public function newSale () {do someting ;}
- After you write comments according to the specifications, the results displayed in the document on the page are as follows:
The writing rules can be agreed in advance within the project, and the rest can be maintained as long as you follow the rules. Of course, people are people after all, and it is impossible to ensure that all code can be written according to the expected annotation rules. Therefore, the path of the log file can be specified in the configuration file of doxygen. You can make good use of this day file, write a small piece of code in the corresponding script language to analyze this log file, and then display it on the web page in a user-friendly manner. The specified administrator can regularly view the comments error log to immediately correct the incorrect comments.
5. more common features of doxygen: The functions of doxygen are far more than those I have mentioned. There are also many rich and colorful features. people who want to use this feature, you can go to the official doxygen website to learn more. This article can be reproduced at will, but be sure to indicate the source of the original article.
Objective 1. doxygen application scenario: doxygen can be used to manage comments of mainstream programming languages to form a document system...