Search code examples
c++umlclass-diagram

How to draw class diagrams from C++ code


I have some C++ code that do not compile, I would like to draw class diagrams from it. Is there something very basic (nothing fancy just bare bone) I can use ? I am on linux


Solution

  • ArgoUML (http://argouml.tigris.org/) is a pretty good multi-platform UML diagram tool.

    Alternatively, if you don't care about actually following strict UML conventions, there's several general online diagramming services like LucidChart (https://www.lucidchart.com/) that will let you create class diagrams that are kind of UML compatible but not really (and won't force you to try to stay compatible either).

    EDIT: I just realised you meant tools to actually create the diagrams from the code, in which case I can only really think of Doxygen which will generate the diagrams as a side-effect of generating documentation for your code. Bit of Googling didn't really give me much else except perhaps this: http://www.codedrawer.com/ but I haven't checked it out personally.

    You might also find some additional stuff here (thanks Colonel panic for the link): Generating UML from C++ code?