Live data from Hacker News

Show HN: Clang-uml – C++ to UML diagram generator based on Clang

github.com

1–10 of 21 posts

Show HN: Clang-uml – C++ to UML diagram generator based on Clang

#1
Hi,

clang-uml is an open-source C++ to UML diagram generator, driven by YAML configuration files.

The main idea behind the project is to easily maintain up-to-date diagrams within a code-base or document legacy code.

The configuration file for clang-uml defines the types and contents of each generated diagram.

The diagrams can be currently generated in PlantUML and JSON formats.

Main features: - class, sequence, package and include diagrams - up to C++17 with support for C++20 concepts - visualization of template specialization relationships - declarative diagram content filtering based on namespaces, elements and relationships - relationship inference from C++ containers, smart pointers and custom templates - customizable interactive links in diagrams (SVG output only) - generation of UML packages from namespaces or directories - JSON output containing intermediate diagram model representation for custom processing

More features, usage information and examples are in README at https://github.com/bkryza/clang-uml and online docs at https://clang-uml.github.io

In particular, checkout diagrams generated from test cases here: https://clang-uml.github.io/md_docs_2test__cases.html

Show HN: Clang-uml – C++ to UML diagram generator based on Clang
github.com

Re: Show HN: Clang-uml – C++ to UML diagram generator based on Clang

#2
Remember the days people thought they could build everything in UML diagrams, and have the code essentially be generated or trivially written from there? Fast forward to 2023 and we're generating UML diagrams from C++ code because it's easier. I love this.

Re: Show HN: Clang-uml – C++ to UML diagram generator based on Clang

#3
post #2

Remember the days people thought they could build everything in UML diagrams, and have the code essentially be generated or trivially written from there? Fast forward to 2023 and we're generating UML diagrams from C++ code because it's easier. I love this.

UML... the only pictures that _don't_ paint a thousand words!

Re: Show HN: Clang-uml – C++ to UML diagram generator based on Clang

#4
post #2

Remember the days people thought they could build everything in UML diagrams, and have the code essentially be generated or trivially written from there? Fast forward to 2023 and we're generating UML diagrams from C++ code because it's easier. I love this.

This is why code bases from the Java 1.4 days are so unwieldy.

Re: Show HN: Clang-uml – C++ to UML diagram generator based on Clang

#6
post #2

Remember the days people thought they could build everything in UML diagrams, and have the code essentially be generated or trivially written from there? Fast forward to 2023 and we're generating UML diagrams from C++ code because it's easier. I love this.

I'd bet with GPT-XX based code generation this might UML sequence diagrams may make a resurgence. its at least good to run some kind of automated 'design lint' to run even if just to ensure a new feature or commit has not broken the high level assumptions/state machine. The codebase I work in I definitely could use something like this regularly.

Re: Show HN: Clang-uml – C++ to UML diagram generator based on Clang

#8
post #2

Remember the days people thought they could build everything in UML diagrams, and have the code essentially be generated or trivially written from there? Fast forward to 2023 and we're generating UML diagrams from C++ code because it's easier. I love this.

Not sure what cursed C++ you've seen but UML is easily 100x worse.

There may be a few hundred good C++ programmers around but nobody can grok UML, if somebody says they can: they're a liar.

Re: Show HN: Clang-uml – C++ to UML diagram generator based on Clang

#9
Ideally we should write and organize our code such that it is easy to visualize. We shouldn’t write code and then visualize it. And we also shouldn’t think we have to abandon text-based editors when we want to do such.

People forget that higher level languages are only to help _people_ understand and organize code better.

I’m waiting for the first programming language or text editor that visualizes your code from the first line you type.

Post reply on HN