帐前卒专栏

Without software, we are nothing.

Use Doxygen

doxygen is  a tool to generate documents. So you don’t worry about writing mountainous documents of codes.  It can generate pdf, html, latex and also doc. But it will abstract the comment and keyword to generate documents. If your comments is not suitable for doxygen, it  will generate into documents.  First , get doxygen tool from Internet or use ”sudo apt-get install doxygen” from ubuntu. Then cd to your project root, and type: ”doxygen -g” to the configure file of generating document. Open New “Doxyfile” with vim or gedit. There are some labels in this configure file. label format is:

All text after a hash (#) is considered a comment and will be ignored

The format is:

       TAG = value [value, …]

For lists items can also be appended using:

       TAG += value [value, …]

Values that contain spaces should be placed between quotes (” “)

There are some useful label for cpp or c project.

this label will let you to use /// or //! comments to generate documents.

MULTILINE_CPP_IS_BRIEF = YES

what’s the size of tab in your code documents?

TAB_SIZE               = 4

what’s the name of project?

PROJECT_NAME           = CNODE

If you use chinese or some other non-English language…

DOXYFILE_ENCODING      = UTF-8

which patter you want to generate documents? If you left blank, doxygen will parse to kinds of files. But here, I just use two kinds files.

FILE_PATTERNS          = .h FILE_PATTERNS          += .c

will you want recursive the code paths?

RECURSIVE              = YES

Save “Doxyfile” and run command: ”doxygen

Comments