Since I’m a newbie programmer and code in our team is really complicated, I always found myself lost somewhere in the code sea. Luckily our code is doxygenized long times ago, so I want to try out some cool features of doxygen. The most important feature to me is inheritance diagram and the usage relations between classes. (something like class A has a member of class B) So here is how to do it:
Install graphviz which has a tool called dot that doxygen use to draw those diagrams:
1
$ sudo apt-get install graphviz
Set
HAVE_DOT
,CALL_GRAPH
,CALLER_GRAPH
, andEXTRACT_ALL
to YES.Set
DOT_GRAPH_MAX_NODES
andMAX_DOT_GRAPH_DEPTH
to some big number.Generate doxygen files.
Done. Then you will see diagrams as this.
Here we assume your files are already doxygenized. If you don’t know what doxygen is or how to use doxygen, you may refer to the reference link to find out.
References:
Doxygen
Doxygen manual