Doxygen
Developed in Linux and comments in doxygen format in the Code. This is a good way to help us generate documents.
The main Syntax of doxygen is explained on the Internet. There is a project: doxygen in GNOME Power Manager.
Note writing is very good. You can download it and learn from your actual development.
Here I want to talk about how to extract Open Source Software documents from the source code.
You can install the following three tools:
1 doxygen
2 graphviz
3 htmlhelp
1. doxygen is a well-known code documentation tool.
: Www.doxygen.org
Install it.
2 graphviz
This tool works with doxygen to extract functions and clarify the call relationships between modules.
: Http://www.graphviz.org/Download..php
The following figure shows the relationships extracted from graphviz:
|
|
|
|
Cluster |
Crazy |
Datastruct |
FSM |
|
|
|
|
Hello |
Profile |
SDH |
Switch |
|
|
|
|
UNIX |
World |
Twopi2 |
Er |
|
|
|
|
Fdpclust |
Process |
Softmaint |
Transparency |
3 htmlhelp
This tool converts the HTML file generated by doxygen into a CHM file, which looks more convenient.
: Http://www.softpedia.com/get/Authoring-tools/Help-e-book-creators/HTML-Help-Workshop.shtml
Install it.
4. Take gnome power manager as an example to see how to use these tools to provide our documentation capabilities.
Source code:
Http://www.gnome.org/projects/gnome-power-manager/
Download the source code and decompress it. Let's take a look at the above three tools:
First use doxygen:
The generated help document contains the call graph. Use htmlhelp Workshop: generated CHM File: and various call relationships, which are clear at a glance:
According to the generated code comments, gnome power manager is very useful for comments, which can be used in our actual development.
In addition, gnome power manager is the best tool for gobject. You can also use it for reference.