How can I generate UML class diagrams from C ++ source files?

With doxygen, I can generate good diagrams, but doxygen does not have a deeper analysis of the relationships between classes. It recognizes derivation, but other relationships are not understood by the instrument. What better utilities exist (commercial or not) that generate more complete UML class diagrams from C ++ source files?

The tools available for C # / Java are slightly better, but they are not of interest to me right now.

+6
c ++ generator uml class-diagram
source share
4 answers

For parsing C ++ code, the best tool I've used is BoUML. This is not ideal, and he will not generate charts for you, but he understands the relationship. If you click two classes on the class diagram, they will automatically build the relationship, and this will allow you to grow the diagram by selecting a specific class and activating related classes (both classes that depend on the selected and classes that the selected depends on).

+4
source share

@jdehaan it looks like many of us are sailing in the same boat today;)

codedrawer for C ++ ( http://www.codedrawer.com/ ) is one such tool.

I will contact some of the launched today that may interest you.

Qt Dependency Visualizer

Code Refactoring

+3
source share

He recognizes the conclusion, but other relationships are not understood by the instrument.

Doxygen also supports the creation of collaboration diagrams that provide an image for relationships without inheritance.

In the Doxygen manual:

COLLABORATION_GRAPH If the COLLABORATION_GRAPH and HAVE_DOT set to YES , then doxygen will generate a graph for each document class showing direct and indirect implementation dependencies (inheritance, containment and class variables) of the class with other documented classes. Dd>

I myself do nothing with UML, but these diagrams are good enough for my purposes (graphical inheritance and composition).

+3
source share

Enterprise Architect . Deeply analyzes the code, can generate diagrams from the code, the code from the diagram and support the generation of the code in the opposite direction, which means changing the created diagram and saving the changes in the source code. And he knows C, C ++, C #, Java, Python, VB.NET and VB, PHP, Java, Delphi. In addition, it supports a whole bunch of chart types, including, of course, the full UML2.0. (I don't know what he is doing in C: P)

In addition, to do it right, he does a lot of other things, and I think it really costs his price, which is 135-239 US dollars depending on the publication.

+1
source share

All Articles