Friday, 5 September 2008

Document with Doxygen

This is a quite cool tool for your documentation.

It generates the documents based on the structure of the software and the comments in the codes. Of course there are some specific ways to comment in the codes which makes the generated codes more beautiful but it still works with the normal comments in the codes.

You can download it from its official website, Doxygen, or install it from Synaptic Package Manager if you are using Ubuntu. You may also like to install Graphviz to let Doxygen to generate more advanced graphs.

It is also easy to use Doxygen. Before it generates the documentation, it asks for a configuration file, which also can be generated automatically.

Use command
doxygen -g

It generates a template. And then you need to edit this file for your own purpose.

Set your project name first:
PROJECT_NAME = "myproject"

Set following to YES:
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES


If you like treeview, switch it on by setting:
GENERATE_TREEVIEW = YES

If you like the graphs, set:
HAVE_DOT = YES
CALL_GRAPH = YES

By default, it generates html and latex, but you also can generate other formats and the options are in the template file.

You can change the switches as you like, and it will show you the different features. Once you finish all settings, let Doxygen do the rest.
doxygen

It generates the documents you want!

No comments: