It is again a sort of "how to do it properly" question. Sorry if someone is annoyed.
I've got to understand ca 150 TLOCs of C/C++ mixture. I've imported the code in UML-Tool "Enterprise Architect" and got a messy chart. Many Structs and Enums had anonymous names because of this C-ish constructs: typedef struct/enum {...} MyType;
In second run I've converted it to C++ form: struct/enum MyType{...};
but got a bunch of unrelated structs. Unfortunately, Enterprise Architect doesn't resolve typedefs. e.g. no relations between A, B and C were recognized:
struct A;
struct B;
typedef A *PtrA;
typedef List<B> BList;
struct C{ PtrA pA; BList lB; };
Thanks to throughout naming convention, I was able to replace all typedefs by original type like this:
struct C{ A pA; B lB; };
Now importing source-code in "Enterprise Architect" gave a nice diagram with all relations. Of cause, the code doesn't compile, and is not the same. All changes in code require an annoying conversion for making this "pseudo" code understandable by EA again. Therefore my questions:
Thank you very much for any advice! Valentin Heinitz
I have Enterprise Architect, and almost invariably for doing what you are attempting on a large code body I use doxygen instead. It generates both class and call graphs. Use it with GraphViz and "UML-style" class diagrams, and you have a reasonably good code navigation and comprehension tool, with flexible configuration to add or exclude detail as necessary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With