Table of Contents
[Original] Use doxygen to manage project documents or comments, doxygen project
1. Doxygen application scenarios:
Doxygen can be used to manage comments in current mainstream programming languages ​​to form a documentation system. (Including C, C++, C#, Objective-C, IDL, Java, VHDL, PHP, Python, Tcl, Fortran, etc.). Doxygen official website address (http://www.doxygen.nl/) Recently, most of the time is spent on the maintenance of the API interface. One of the more important aspects is how the interface you write allows the caller to understand the usage at a glance. It is the same whether it is the cooperation between the internal wireless server and the client or the API interface open to the outside world. After spending a few days trying to use doxygen combined with svn hook to manage interface documents, it is very convenient and practical. The doxygen official website itself actually uses doxygen. If you want to see more specific effects, you can directly refer to http://www.doxygen.nl/.
2. Installation:
Doxygen currently fully supports mainstream systems such as windows, mac ox, and linux. And it is basically used in all current mainstream programming languages. Here is a brief introduction to the source code compilation and installation process under the ubuntu system. For other installation methods, please refer to the official website.
3. Configuration of the configuration file using doxygen:
http://www.bkjia.com/PHPjc/922301.html
www.bkjia.comtrue
Home Backend Development PHP Tutorial [Original] Use doxygen to manage project documents or comments, doxygen project_PHP tutorial

[Original] Use doxygen to manage project documents or comments, doxygen project_PHP tutorial

Jul 13, 2016 am 10:12 AM
doxygen

[Original] Use doxygen to manage project documents or comments, doxygen project

1. Doxygen application scenarios:

Doxygen can be used to manage comments in current mainstream programming languages ​​to form a documentation system. (Including C, C++, C#, Objective-C, IDL, Java, VHDL, PHP, Python, Tcl, Fortran, etc.). Doxygen official website address (http://www.doxygen.nl/) Recently, most of the time is spent on the maintenance of the API interface. One of the more important aspects is how the interface you write allows the caller to understand the usage at a glance. It is the same whether it is the cooperation between the internal wireless server and the client or the API interface open to the outside world. After spending a few days trying to use doxygen combined with svn hook to manage interface documents, it is very convenient and practical. The doxygen official website itself actually uses doxygen. If you want to see more specific effects, you can directly refer to http://www.doxygen.nl/.

Below I will post some of the renderings I made myself. The UI is very frustrating. When you actually use it, you can ask the company's UI department to beautify it. Since I mainly use it on the intranet, I haven't thought too much about the UI experience. :

2. Installation:

Doxygen currently fully supports mainstream systems such as windows, mac ox, and linux. And it is basically used in all current mainstream programming languages. Here is a brief introduction to the source code compilation and installation process under the ubuntu system. For other installation methods, please refer to the official website.

3. Configuration of the configuration file using doxygen:

The use of doxygen can be said to be the configuration of the configuration file. That is to say, you only need to slightly configure the configuration file and then execute the command: xxxx/doxygen xxxx.conf to generate the document you want (Here doxygen provides documents in a variety of formats. I mainly use html, so that we can configure a web service on this html ourselves, and then use the document on the web. ), doxygen provides it. With more than 200 configuration items, rich functions can be completed through configuration files. Here are some commonly used configuration instructions:

  • Use the command xxx/doxygen -g to generate a default configuration file doxygen.conf in the current directory. Open the default configuration file, and you will find that each configuration item in it is in the key-value format of configuration name and configuration value . If you have a certain knowledge of English, configuration is basically not a problem.
  • For detailed configuration instructions, please refer to: http://www.stack.nl/~dimitri/doxygen/manual/config.html
  • ABBREVIATE_BRIEF                                                                                                                                                                                                                         Aliases // Alias ​​
  • ALLEXTERNALS                                                                                                                                                             // All external documents
  • ALPHABETICAL_INDEX //Alphabetical index
  • ALWAYS_DETAILED_SEC        //Detailed description part
  • BINARY_TOC                                                                                                                                                                                                                                                 // Binary operations
  • BRIEF_MEMBER_DESC                                                                                     // Short member description CALL_GRAPH                                                                                                                                                                                                                                                                            
  • CASE_SENSE_NAMES //The names of the detected examples
  • CHM_FILE                                                                                                                                                                                                                                                         //CHM format file
  • CLASS_DIAGRAMS                                                                                           // Class-Table
  • CLASS_GRAPH       //Class-Graph
  • DOT_PATH        //DOT path settings
  • DOT_TRANSPARENT
  •      //DOT conversion settings
  • DOTFILE_DIRS
  •                                                                                                                                                                                                                                     //DOTFILE list display
  • ENABLE_PREPROCESSING
  •  ​                                                                                                                                                                                                          //Allow the "preprocessing" directive
  • ENUM_VALUES_PER_LINE
  • //The enumeration value of each line
  • ENABLED_SECTIONS
  •                                                                                                                                                                                                        <🎜> Example_patterns // The file format ( *.cpp, *.h, *.java, etc.)
  • EXAMPLE_RECURSIVE     //Example recursion
  • COLLABORATION_GRAPH                                                                                                                                                                                 
  • COLS_IN_ALPHA_INDEX                                                                                                                                                                                                                                                   COMPACT_LATEX
  • //Compressed LATEX document
  • COMPACT_RTF
  • //Compressed RTF document
  • CREATE_SUBDIRS
  •                                             //Create a "subdirectory"
  • DETAILS_AT_TOP
  • //Detailed header of the document
  • DIRECTORY_GRAPH
  •                                                                                               
  • DISABLE_INDEX                                                                                                
  • DISTRIBUTE_GROUP_DOC                                                                                                                                                  <🎜> <🎜> EXCLUDE
  •                                                                                                                                                                                              
  • EXCLUDE_PATTERNS                   //Executable file format (*.exe, *.dll, etc.)
  • EXCLUDE_SYMLINKS     //Executable SYMLINKS
  • <🎜> <🎜>
  • EXTERNAL_GROUPS     //External files used
  • EXTRA_PACKAGES                                                                                                                                                                                                                                               // External plug-in packages used
  • EXTRACT_ALL                                                                                     
  • EXTRACT_LOCAL_CLASSES //Extract all local classes
  • EXTRACT_LOCAL_METHODS //Extract all local methods
  • EXTRACT_PRIVATE                                                                                            EXTRACT_STATIC
  •                                                                                                                                // Extract all static
  • FILE_PATTERNS                                                                                                                                 <🎜>
  • FILTER_PATTERNS                             //Control format (main version: 1st version: 2nd version number)
  • FILTER_SOURCE_FILES //Version control of original files
  • FULL_PATH_NAMES //Full path name
  • GENERATE_AUTOGEN_DEF //Generate automatic definition file format
  • GENERATE_BUGLIST //Generate BUG list
  • GENERATE_CHI                                                                                                                                 GENERATE_DEPRECIATELIST
  • //Generate the "evaluation" list
  • GENERATE_HTML
  • //Generate HTML
  • GENERATE_HTMLHELP
  • //Generate HTMLHELP
  • GENERATE_LATEX
  • //Generate LATEX
  • GENERATE_LEGEND
  • //Generate legend
  • GENERATE_MAN
  •                                                           // Generate MAN file
  • GENERATE_PERLMOD
  • //Generate Perl script
  • GENERATE_RTF
  • //Generate RTF
  • GENERATE_TAGFILE                                                                                                                                                                                                        
  • GENERATE_TESTLIST //Generate TESTLIST
  • GENERATE_TODOLIST //Generate TODOLIST
  • GENERATE_TREEVIEW //Generate tree view display
  • GENERATE_XML //Generate XML
  • GRAPHICAL_HIERARCHY //Inherit chart
  • GROUP_GRAPHS                                                                                               HAVE_DOT
  •                                                                                                                   <🎜>
  • HIDE_FRIEND_COMPOUNDS //Hide the "composite" friend type
  • HIDE_IN_BODY_DOCS //Hide the body of the document
  • HIDE_SCOPE_NAMES //Hide the "scope" name
  • HIDE_UNDOC_CLASSES //Hide all "unarchived" CLASS
  • HIDE_UNDOC_MEMBERS //Hide all "unarchived" members
  • HIDE_UNDOC_RELATIONS //Hide "unarchived" relationships
  • HTML_ALIGN_MEMBERS //Member alignment in HTML document
  • HTML_FOOTER //HTML footnote settings
  • HTML_HEADER //HTML header settings
  • HTML_OUTPUT                                                                                                                                                                                                                    
  • HTML_STYLESHEET //HTML style setting
  • IGNORE_PREFIX                                                                                                                                                                                 Image_path // The path of the picture set
  • INCLUDE_GRAPH                                                                                            ​
  • INCLUDE_PATH                                                                                                                                                                                                                                                              
  • INHERIT_DOCS
  • //Inheritance relationship of documents <🎜>
  • INLINE_INHERITED_MEMB
  • //Inline members obtained through "inheritance"
  • INLINE_SOURCES
  • //Source code of the inline part
  • INPUT
  •                                                                                                      ​  INPUT_FILTER                                                                                                                                                                                           // Acceptable input file extension format settings (important)
  • INTERNAL_DOCS //Internal Documents
  • JAVADOC_AUTOBRIEF                                                                          // "Automatic summary" of the document generated by the JAVADOC tool
  • LATEX_BATCHMODE //LATEX matching mode
  • LATEX_CMD_NAME                                                                              // LATEX command name
  • LATEX_HEADER                                                                                                 LATEX_HIDE_INDICES
  •                                                                                                                                                                                                        
  • LATEX_OUTPUT                                                                                               
  • MACRO_EXPANSION //Macro expansion settings (important)
  • MAKEINDEX_CMD_NAME //MAKEINDEX command index <🎜>
  • MAN_LINKS                                                                                                                                                                                                                                                                                MAN_OUTPUT
  •                                                                                                                                                                                                                                                   
  • MAX_DOT_GRAPH_DEPTH //Maximum depth of DOT map
  • MAX_DOT_GRAPH_HEIGHT //Maximum height of DOT graph
  • MAX_DOT_GRAPH_WIDTH //Maximum width of DOT graph
  • MAX_INITIALIZER_LINES //Maximum initialization lines
  • MULTILINE_CPP_IS_BRIEF //Short description of multiple CPP files
  • MULTILINE_CPP_IS_BRIEF //Short description of multiple CPP files
  • OPTIMIZE_OUTPUT_FOR_C //Optimization settings for C
  • OPTIMIZE_OUTPUT_JAVA //Optimization settings for JAVA
  • OUTPUT_DIRECTORY //Output path setting (important)
  • OUTPUT_LANGUAGE //Output language setting (important)
  • PAPER_TYPE                                                                                                                                                                                                                                    
  • PDF_HYPERLINKS //PDF format hyperlink settings (important)
  • PERL_PATH                                                                                                                                                                                                                             PERLMOD_LATEX
  •                            //perlmod LATEX
  • <🎜> PERLMOD_MAKEVAR_PREFIX
  • //perlmod MAKE file version PREFIX
  • PREDEFINED
  •                                                                                                                                                                                                                                                                               
  • PROJECT_NAME                                                                                                                                                                                                                                            
  • PROJECT_NUMBER //Project members (important)
  • QUIET                                                                                                                                                                                                                                                                               .
  • RECURSIVE                                                                                                                                                             
  • REFERENCED_BY_RELATION //Cross reference (important) <🎜>
  • Repeat_brief
  • // Set up "Short Explanation" to open the state <🎜>
  • RTF_HYPERLINKS
  •                                                                                               RTF_OUTPUT                                                                                                                                <🎜>
  • SEARCH_INCLUDES                                                                                                                                                                    // What needs to be included in the search (important)
  • SEARCHENGINE                                                                         //Search engine settings (important)
  • SHORT_NAMES                                                                                                                                                                                                                                                         
  • SHOW_DIRECTORIES
  • //Show directory
  • SHOW_INCLUDE_FILES
  •                                                                                                                                               // Show included files (usually NO, otherwise too large) Show_used_files
  • // Show the file (general yes)
  • SKIP_FUNCTION_MACROS
  •                         // Skip the macros in the function (important), novices should not skip it
  • <🎜> SORT_MEMBER_DOCS
  •                                                                                                                                                                                                                                     
  • SOURCE_BROWSER                                                                                                                                                                                                                       
  • STRIP_CODE_COMMENTS //Exclude which barcode form comments (important)
  • STRIP_FROM_INC_PATH                                 // Exclude which header files contain comments (important)
  • STRIP_FROM_PATH //Exclude which barcode path settings
  • SUBGROUPING                                                                                                                                                                                                                                     // Subgroup settings (important)
  • TAB_SIZE                                                                                                                                                                                                                TAGFILES
  •                                                                                                                                                                                     
  • TEMPLATE_RELATIONS //Template relationship settings (important)
  • TOC_EXPAND                                                                                                             
  • TREEVIEW_WIDTH                                                                                                                                                         UML_LOOK
  •                                                                                                                                         
  • USE_WINDOWS_ENCODING //Use the encoding form of the windows system (important)
  • VERBATIM_HEADERS //VERBATIM headers (header files)
  • WARN_FORMAT                                                                                                                                                                                                           // Warning format specification (important)
  • WARN_IF_DOC_EC_ERROR // If the document is wrong, a warning
  • WARN_IF_UNDOCUMENTED //If it is an unarchived file, display a warning
  • WARN_LOGFILE                                                                                                                                                                                                                       // Warning log file settings
  • WARN_NO_PARAMDOC                                                                                                                                                  // No parameter document warning format setting
  • WARNINGS                                                                                                                                                                                                                                                                               ​
  • XML_DTD
  •                                                                                                                                                                                                                                      XML_OUTPUT                                                                                                                                                                                                                            
  • XML_PROGRAMLISTING                                                         //XML program list (important)
  • XML_SCHEMA                                                                                                                                                                                                                                           4. Writing comments after doxygen configuration is completed
  • After you configure doxygen, you will basically spend your time writing and maintaining comments in your code. I want to use doxygen to manage documents. Then code comments do not need to be strictly required.

    After writing comments according to the specifications, the effect displayed in the page document is as follows:

/**
 * @brief 这里用brief来说明接口方法的主要功能
 * @date   接口方法的创建时间
 * @author 接口方法的创建人
 * @param  : 参数说明如下表:
 * name     | type     |description of param 
 * ----------|-----------|--------------------
 * car_id   | int      |车源编号
 * province | int      |业务员所在省份
 * x        |  x       |   x
 * x        |  x       |   x
 * x        |  x       |   x
 * @return    返回值说明如下:
 * name     | type     | description of value
 * -------- |----------|----------------------
 * car_id   | int      | 车源编号
 * car_info | object   | json对象格式的车源信息
 * @warning   该接口需要告知给调用者看的一些警告
 * @attention 该接口需要告知给调用者看的一些注意事项
 * @note      该接口的一些备注说明。通常用于当后者对该接口有较大改动的时候。备注一下某个时间点某人改动了什么东西
 * @ todo     该接口的一些未完成的待办内容
 */
public function newSale() {
    do someting;
 }
Copy after login
    The writing rules can be agreed in advance within the project, and the rest only needs to be maintained according to these rules. Of course, people are human after all, and it is impossible to guarantee that all code can be written according to the expected annotation rules. Therefore, the path to the log file can be specified in the doxygen configuration file. You can make good use of this log file, write a small piece of code in the corresponding script language to analyze the log file, and then display it on the web page in a humane way. Designated managers regularly check the annotation error log and correct incorrect annotation content immediately.
  • 5. Commonly used features of doxygen

The functions of doxygen are far more than what I introduced above, and there are many rich and colorful functions. If you want to use this thing, you can go to the doxygen official website to learn about it yourself. This article may be reproduced at will, but please be sure to indicate the source of the original text.

http://www.bkjia.com/PHPjc/922301.html

www.bkjia.comtrue

http: //www.bkjia.com/PHPjc/922301.htmlTechArticle

[Original] Use doxygen to manage project documents or comments, doxygen project 1, doxygen application scenarios: doxygen can be used Manage the comments of current mainstream programming languages ​​to form a documentation system...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1662
14
PHP Tutorial
1262
29
C# Tutorial
1235
24
Explain different error types in PHP (Notice, Warning, Fatal Error, Parse Error). Explain different error types in PHP (Notice, Warning, Fatal Error, Parse Error). Apr 08, 2025 am 12:03 AM

There are four main error types in PHP: 1.Notice: the slightest, will not interrupt the program, such as accessing undefined variables; 2. Warning: serious than Notice, will not terminate the program, such as containing no files; 3. FatalError: the most serious, will terminate the program, such as calling no function; 4. ParseError: syntax error, will prevent the program from being executed, such as forgetting to add the end tag.

Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1? Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1? Apr 17, 2025 am 12:06 AM

In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values ​​to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP in Action: Real-World Examples and Applications PHP in Action: Real-World Examples and Applications Apr 14, 2025 am 12:19 AM

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

What are HTTP request methods (GET, POST, PUT, DELETE, etc.) and when should each be used? What are HTTP request methods (GET, POST, PUT, DELETE, etc.) and when should each be used? Apr 09, 2025 am 12:09 AM

HTTP request methods include GET, POST, PUT and DELETE, which are used to obtain, submit, update and delete resources respectively. 1. The GET method is used to obtain resources and is suitable for read operations. 2. The POST method is used to submit data and is often used to create new resources. 3. The PUT method is used to update resources and is suitable for complete updates. 4. The DELETE method is used to delete resources and is suitable for deletion operations.

PHP: A Key Language for Web Development PHP: A Key Language for Web Development Apr 13, 2025 am 12:08 AM

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

How does PHP handle file uploads securely? How does PHP handle file uploads securely? Apr 10, 2025 am 09:37 AM

PHP handles file uploads through the $\_FILES variable. The methods to ensure security include: 1. Check upload errors, 2. Verify file type and size, 3. Prevent file overwriting, 4. Move files to a permanent storage location.

Explain the difference between self::, parent::, and static:: in PHP OOP. Explain the difference between self::, parent::, and static:: in PHP OOP. Apr 09, 2025 am 12:04 AM

In PHPOOP, self:: refers to the current class, parent:: refers to the parent class, static:: is used for late static binding. 1.self:: is used for static method and constant calls, but does not support late static binding. 2.parent:: is used for subclasses to call parent class methods, and private methods cannot be accessed. 3.static:: supports late static binding, suitable for inheritance and polymorphism, but may affect the readability of the code.

See all articles