Doxygen is used in the project to create documents and record memos.
Check a lot of articles, the main use of methods and examples of reference are from the following links:
Http://wenku.baidu.com/link?url=jYVQTEY6-aHB4x1KwfdmTJ7o_TkmscOvY44cqFncfobD54hAhDPotXPESJOLL-lJf8VA0GL_ zap8d0q-gws6svlnxdztruthpkthvchi39a
Steps to use:
First, the installation content
1 Installing Doxygen (Windows)
2 Installing Graphviz (Windows)
Graphviz is not installed because the project is relatively small
3 Installing Windows Help Workshop
Documents to be generated in CHM format need to be installed
Second, the configuration Doxygen
1 Write code comments Many are Chinese, if the source is GB2312 format, remember to convert to UTF-8 format. There is no attempt to enter the GB2312 format directly.
2 in the HTML option under Export Label, the chm_index_encoding option is to use GB2312, otherwise garbled characters are displayed in the generated CHM. (In fact, the search function in CHM is still garbled, not resolved)
3 Remember to add the path to the Hhc.exe.
Third, code example
This example is modified on the basis of a link example, and simple comment variables, functions, classes, etc. are basically sufficient. Note there should be some other features, and there's time for an in-depth look. PS: For example, you want to insert some sample code that invokes a function.
. h
/** * @file * * This file is used to define class example * * @auther ...*////defines the EXAMPLE_OK macro as 0#defineEXAMPLE_OK 0/** * A brief description of the @brief class * * This type of instruction for use with Doxygen **/ classExample {Private: ///variable var1 intvar1; Public: ///variable var2 intvar2; ///variable Var3 intVar3; voidEXFUNC1 (void); void intEXFUNC2 (intACharb); Char*EXFUNC3 (Char*c); }
View Code
. cpp
/** * @file * * This file defines example class * member function * * @author ...*/ /** * @brief EXFUNC1 * * * * * * ExFunc1 no parameters and return values*/ voidEXAMPLE::EXFUNC1 (void) { //Code } /** * @brief EXFUNC2 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * EXFUNC2 () returns the value of two parameters added * * @param A To add the parameter * @param b to add the parameter * @return return two parameters*/ intEXAMPLE::EXFUNC2 (intAintb) {return(A +b); } /* * * @param the character pointer passed in C. * @retval null empty string. * @retval! Null non-empty string. */ Char* EXAMPLE::EXFUNC3 (Char*c) {returnC;}
View Code
Doxygen Examples of Use (c + +)