Write a lotCodeWhat should I do if I want to generate a C ++ class document and diagram? Yes, it is something that is pleasing to the eye to generate the MFC class library.
In general, there are three ways to generate such a document:
- Use doxygen to automatically generate documents
Doxygen can be used across platforms to maintain documents while maintaining code, which is convenient and practical.
To generate a class relationship diagram, you can use doxygen with graphviz. After graphviz is installed, add the executable directory to the system path, in this way, graphviz can be used in doxygen to generate a class relationship diagram.
In text editors such as vim and Emacs, macro operations can be naturally used to insert doxygen comments. What if Visual Studio is used, you can also use doxycomment add-in for Visual Studio 2005 or something like this.
Note the following when using doxygen to generate documents,Source codeThe file encoding must be the same as the doxygen character encoding. Otherwise, the generated file will be garbled. Now this time, of course, is unified with UTF-8 better.
- Use the class digoal of Visual Studio
On msdn, we will introduce how to use class digoal.
- Using Visio to draw UML diagrams is not recommended because it is hard to synchronize with the code.