[Original] use doxygen to manage project documents or comments. doxygen project_php tutorial

Source: Internet
Author: User
Tags doxygen html header perl script
[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:

  • The command xxx/doxygen-g will generate a default configuration file doxygen. conf under the current directory. Open the default configuration file, and you will find that every configuration item in it is in the key-value format such as the configuration name configuration value. if you have some skills in English, configuration is basically not a problem.
  • For more information about the configuration, see: http://www.stack.nl /~ Dimitri/doxygen/manual/config.html
  • ABBREVIATE_BRIEF // brief summary
  • ALIASES // alias
  • ALLEXTERNALS // all external documents
  • ALPHABETICAL_INDEX // alphabetic index
  • ALWAYS_DETAILED_SEC // detailed description
  • BINARY_TOC // binary operation
  • BRIEF_MEMBER_DESC // brief member description
  • CALL_GRAPH // The called graph.
  • CASE_SENSE_NAMES // name of the sample for detection
  • 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 // display the DOTFILE list
  • ENABLE_PREPROCESSING // allow "preprocessing" commands
  • ENUM_VALUES_PER_LINE // enumerated values of each row
  • ENABLED_SECTIONS // ENABLED_SECTIONS
  • EXAMPLE_PATH // example path
  • EXAMPLE_PATTERNS // file format used in the example (*. cpp, *. h, *. java, etc)
  • EXAMPLE_RECURSIVE // example recursion
  • COLLABORATION_GRAPH // call relationship diagram
  • COLS_IN_ALPHA_INDEX // an index in alphabetical order displayed in column form
  • 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 // Directory chart
  • DISABLE_INDEX // disable INDEX
  • DISTRIBUTE_GROUP_DOC // disable group display of documents
  • DOT_IMAGE_FORMAT // dot matrix image
  • DOT_MULTI_TARGETS // multiple DOT targets
  • EXCLUDE // executable file
  • EXCLUDE_PATTERNS // executable file format (*. exe, *. dll, etc)
  • EXCLUDE_SYMLINKS // executable SYMLINKS
  • EXPAND_AS_DEFINED // specified extension
  • EXPAND_ONLY_PREDEF // pre-defined extension
  • EXTERNAL_GROUPS // external file used
  • EXTRA_PACKAGES // external plug-in package used
  • EXTRACT_ALL // extract all
  • EXTRACT_LOCAL_CLASSES // extract all local classes
  • EXTRACT_LOCAL_METHODS // extract all local methods
  • EXTRACT_PRIVATE // extract all private
  • EXTRACT_STATIC // extract all static
  • FILE_PATTERNS // file path
  • FILE_VERSION_FILTER // File Version control
  • FILTER_PATTERNS // control format (master version: 1st Times version: 2nd Times version)
  • FILTER_SOURCE_FILES // version control of the original file
  • FULL_PATH_NAMES // full path name
  • GENERATE_AUTOGEN_DEF // Generate the automatic definition file format
  • GENERATE_BUGLIST // Generate a BUG list
  • GENERATE_CHI // generate a "Greek letter"
  • GENERATE_DEPRECIATEDLIST // generate the "evaluation" list
  • GENERATE_HTML // generate HTML
  • GENERATE_HTMLHELP // Generate HTMLHELP
  • GENERATE_LATEX // Generate LATEX
  • GENERATE_LEGEND // Generate a legend
  • GENERATE_MAN // Generate the MAN file
  • GENERATE_PERLMOD // Generate a Perl script
  • GENERATE_RTF // generate RTF
  • GENERATE_TAGFILE // Generate a flag file
  • GENERATE_TESTLIST // Generate TESTLIST
  • GENERATE_TODOLIST // Generate TODOLIST
  • GENERATE_TREEVIEW // Generate a tree view
  • GENERATE_XML // generate XML
  • GRAPHICAL_HIERARCHY // inherits the chart
  • GROUP_GRAPHS // group-graph
  • HAVE_DOT // hide DOT
  • HHC_LOCATION // hide a location
  • HIDE_FRIEND_COMPOUNDS // hide the "composite" member type
  • HIDE_IN_BODY_DOCS // hide the document subject
  • HIDE_SCOPE_NAMES // hide the "scope" name
  • HIDE_UNDOC_CLASSES // hide all classes "not archived"
  • HIDE_UNDOC_MEMBERS // hide all "unarchived" members
  • HIDE_UNDOC_RELATIONS // hide the "unarchived" relationship
  • HTML_ALIGN_MEMBERS // member alignment in HTML document
  • HTML_FOOTER // HTML footer settings
  • HTML_HEADER // HTML header settings
  • HTML_OUTPUT // HTML output settings
  • HTML_STYLESHEET // HTML style settings
  • IGNORE_PREFIX // which prefixes are ignored
  • IMAGE_PATH // specifies the image path.
  • INCLUDE_GRAPH // include-graph
  • INCLUDE_PATH // path contained in the header file
  • INHERIT_DOCS // document inheritance
  • INLINE_INFO // INLINE_INFO
  • INLINE_INHERITED_MEMB // inline member obtained through "Inheritance"
  • INLINE_SOURCES // source code of the inline part
  • INPUT // INPUT settings
  • INPUT_FILTER // set the format of the extension of the acceptable input file (important)
  • INTERNAL_DOCS // Internal document
  • "Automatic summary" of the document generated by the JAVADOC_AUTOBRIEF // JAVADOC tool"
  • LATEX_BATCHMODE // LATEX matching method
  • Latex_1__name // LATEX command name
  • LATEX_HEADER // LATEX header
  • LATEX_HIDE_INDICES // includes the hidden content in LATEX.
  • LATEX_OUTPUT // LATEX output
  • MACRO_EXPANSION // macro expansion setting (important)
  • Makeindex_1__name // MAKEINDEX command index
  • MAN_EXTENSION // MAN extension
  • MAN_LINKS // MAN link settings
  • MAN_OUTPUT // MAN output settings
  • MAX_DOT_GRAPH_DEPTH // maximum depth of the DOT graph
  • MAX_DOT_GRAPH_HEIGHT // the maximum height of the DOT graph
  • MAX_DOT_GRAPH_WIDTH // The maximum width of the DOT graph
  • MAX_INITIALIZER_LINES // maximum initialization line
  • MULTILINE_CPP_IS_BRIEF // brief description of multiple CPP files
  • MULTILINE_CPP_IS_BRIEF // brief description of multiple CPP files
  • OPTIMIZE_OUTPUT_FOR_C // optimization settings for C
  • OPTIMIZE_OUTPUT_JAVA // JAVA-based optimization settings
  • OUTPUT_DIRECTORY // Set the output path (important)
  • OUTPUT_LANGUAGE // output language settings (important)
  • PAPER_TYPE // Paper type
  • PDF_HYPERLINKS // PDF format hyperlink settings (important)
  • PERL_PATH // perl path settings
  • PERLMOD_LATEX // perlmod LATEX
  • PERLMOD_PRETTY // perlmod PRETTY (PRETTY/PRETTY)
  • PERLMOD_MAKEVAR_PREFIX // perlmod MAKE file version PREFIX
  • PREDEFINED // pre-defined (important)
  • PROJECT_NAME // project name (important)
  • PROJECT_NUMBER // component of the project (important)
  • QUIET // static volume setting (important)
  • RECURSIVE // recursion and loop
  • REFERENCED_BY_RELATION // cross reference (important)
  • REFERENCES_RELATION // Cross-reference relationship
  • REPEAT_BRIEF // reset "brief description" to open
  • RTF_EXTENSIONS_FILE // expand the file in RTF
  • RTF_HYPERLINKS // RTF hyperlink
  • RTF_OUTPUT // RTF output settings
  • RTF_STYLESHEET_FILE // RTF style file
  • Search_shortdes // what needs to be included in the search (important)
  • SEARCHENGINE // search engine settings (important)
  • SHORT_NAMES // make the short file name take effect
  • SHOW_DIRECTORIES // Display Directory
  • SHOW_INCLUDE_FILES // display the contained File (generally NO, otherwise it is too large)
  • SHOW_USED_FILES // display the files used (usually YES)
  • SKIP_FUNCTION_MACROS // skip the macro (important) in the function. it is best for Cainiao not to skip
  • SORT_BRIEF_DOCS // brief summary of the document
  • SORT_MEMBER_DOCS // brief description of the member
  • SOURCE_BROWSER // original file path
  • STRIP_CODE_COMMENTS // bar code comments excluded (important)
  • STRIP_FROM_INC_PATH // exclude comments contained in header files (important)
  • STRIP_FROM_PATH // bar code path settings excluded
  • SUBGROUPING // subgroup settings (important)
  • TAB_SIZE // Set the tab size (important)
  • TAGFILES // flag file
  • TEMPLATE_RELATIONS // template link settings (important)
  • TOC_EXPAND // TOC extension
  • TREEVIEW_WIDTH // set the width of the tree chart (important)
  • UML_LOOK // UML appearance setting (important)
  • USE_WINDOWS_ENCODING // use the encoding format of the windows system (important)
  • VERBATIM_HEADERS // VERBATIM header (header file)
  • WARN_FORMAT // specify the warning format (important)
  • WARN_IF_DOC_ERROR // A warning is displayed if a document error occurs.
  • Warn_if_unmarshented // A warning is displayed if the file is not archived.
  • WARN_LOGFILE // warning log file settings
  • WARN_NO_PARAMDOC // no parameter documentation alert form setting
  • WARNINGS // warning settings (important)
  • XML_DTD // XML file type definition (important)
  • XML_OUTPUT // XML output settings (important)
  • XML_PROGRAMLISTING // XML program list (important)
  • XML_SCHEMA // XML schema setting (important)

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

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.