Author Topic: Looking for Freeware UML tool that will import C++ code  (Read 1100 times)

0 Members and 1 Guest are viewing this topic.

Offline perdrixTopic starter

  • Frequent Contributor
  • **
  • Posts: 640
  • Country: gb
Looking for Freeware UML tool that will import C++ code
« on: August 21, 2022, 02:16:56 pm »
I found Umbrello, but sadly that doesn't "grok" C++17 or even some parts of C++14.

Does anyone know a free UML tool that will import C++17/C++20 cope (including templates) and is even half way decent?

For bonus points, one that will round trip from source to UML and back to source without losing code would be even better.

Thanks
David

 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1209
  • Country: pl
Re: Looking for Freeware UML tool that will import C++ code
« Reply #1 on: August 21, 2022, 04:21:27 pm »
Must it be freeware?

You already mentioned Umbrello, which is not freeware, so I will let myself to drop that restriction. You did not mention the operating system, so I will assume the ones on which Umbrello could run. And offer Doxygen. It can generate UML diagrams for classes. See diagrams documentation in Doxygen for details on how to enable that in the doxyfile.

The C++ support for Doxygen was pretty good the last time I checked. At least as far as it can be, considering that the task is provably impossible for the general case. and even in practical cases presenting C++ sources as UML diagrams is troublesome thanks to mix of paradigms, two separate levels of polymorphism, and generally poor correspondence between source and semantics it represents.
« Last Edit: August 21, 2022, 04:29:59 pm by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 

Offline perdrixTopic starter

  • Frequent Contributor
  • **
  • Posts: 640
  • Country: gb
Re: Looking for Freeware UML tool that will import C++ code
« Reply #2 on: August 22, 2022, 08:39:30 am »
Must it be freeware?

You already mentioned Umbrello, which is not freeware,

Umbrello.kde.org seems to think it is
 

Offline perdrixTopic starter

  • Frequent Contributor
  • **
  • Posts: 640
  • Country: gb
Re: Looking for Freeware UML tool that will import C++ code
« Reply #3 on: August 22, 2022, 08:42:53 am »

What kind of UML diagrams to you want to use, just class diagrams for documentation, or more comprehensive capabilities?


Yes, class diagrams for documentation is what I'm after in the first instance (plus anything else to aid understanding/refactoring).

D.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19517
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Looking for Freeware UML tool that will import C++ code
« Reply #4 on: August 22, 2022, 09:05:22 am »
I found Umbrello, but sadly that doesn't "grok" C++17 or even some parts of C++14.

Does anyone know a free UML tool that will import C++17/C++20 cope (including templates) and is even half way decent?

For bonus points, one that will round trip from source to UML and back to source without losing code would be even better.

Don't forget the interactions between C++ "features". In this case I would start by looking for interactions between the internal Turing-complete language[1] and macros.

Class diagrams are the least interesting UML diagrams, IMHO. Much more interesting are the FSM diagrams and object collaboration diagrams. (I have, mercifully, forgotten the correct name for the latter).

[1] C++ templates, of course. Use them in legal C++ programs to cause the compiler to emit the infinite sequence of prime numbers during compilation. Infamously the C++ committee refused to believe they had accidentally created a Turing complete language, until Erwin Unruh rubbed their noses in it. https://en.wikibooks.org/wiki/C%2B%2B_Programming/Templates/Template_Meta-Programming#History_of_TMP
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline perdrixTopic starter

  • Frequent Contributor
  • **
  • Posts: 640
  • Country: gb
Re: Looking for Freeware UML tool that will import C++ code
« Reply #5 on: August 22, 2022, 01:21:48 pm »
I found Umbrello, but sadly that doesn't "grok" C++17 or even some parts of C++14.

Does anyone know a free UML tool that will import C++17/C++20 cope (including templates) and is even half way decent?

For bonus points, one that will round trip from source to UML and back to source without losing code would be even better.

Class diagrams are the least interesting UML diagrams, IMHO. Much more interesting are the FSM diagrams and object collaboration diagrams. (I have, mercifully, forgotten the correct name for the latter).


You'll get no argument from me on that score ...

D.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19517
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Looking for Freeware UML tool that will import C++ code
« Reply #6 on: August 22, 2022, 02:33:09 pm »
I found Umbrello, but sadly that doesn't "grok" C++17 or even some parts of C++14.

Does anyone know a free UML tool that will import C++17/C++20 cope (including templates) and is even half way decent?

For bonus points, one that will round trip from source to UML and back to source without losing code would be even better.

Class diagrams are the least interesting UML diagrams, IMHO. Much more interesting are the FSM diagrams and object collaboration diagrams. (I have, mercifully, forgotten the correct name for the latter).


You'll get no argument from me on that score ...

D.

Come to think of it, I don't think I've ever needed a UML class diagram when spelunking into other people's code.

I've always found a text-based tree structure to be compact, complete, and easy to use when browsing and debugging. See example attached, where indentation indicates a subclass.

The pre-requisites are a language based on the experiences learned in the 70s and early 80s, and a decent IDE. Don't such IDE's exist?
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf