3

Visio 2010 Beta can generate static UML diagram from Native C++ project, and it's great. How is it possible to solve reverse problem: given a static UML diagram from Visio, generate header files?

Or, maybe, there are free tools for architecture development and reverse engineering?

EDIT Generally speaking, I don't need diagrams to be strictly UML. They just should be clear enough to look at them and understand classes during designing application, implementing and supporting. But it must have a feature of reverse-engineering and generating code.

I'll try to use offered alternatives in several days and then write a little comparison.

  1. ArgoUML I tried to import my existing code and failed. The reason is that C++ support is pre-alpha. Many constructions of the language are not supported yet. From MessageBox shown while importing:

The C++ reverse engineering module is pre-alpha stage. Its known limits are:

* very few C++ constructs are supported, e.g., enums, unions, templates, etc, aren't;
* no support for non-member variables and functions;
* no integration with the C++ generator => RTE won't work!;
* no operator overload support;
* very immature, certainly this list needs to grow!
flashnik
  • 1,900
  • 4
  • 19
  • 38

4 Answers4

4
  1. Bring up diagram in Visio
  2. Bring up Visual Studio, open c++ project.
  3. Start typing in code :)

Seriously, Viso is a visual tool and represents it's data in a form best suited to rendering. This lacks information needed to construct a code model from it, unless it were to use some complex vision and edge detection algorithms.

So, I don't think there will be any such tool out there.

Larry Watanabe
  • 10,126
  • 9
  • 43
  • 46
  • 1
    For me it seems that there should be such tools because it is very convenient. And Microsoft has VS to develop and Visio to show diagrams (and Visio has a Toolbox in VS which reverse-engineers code to UML). If I were a Microsoft I'd created a some tool (or feature for Visio/VS) to generate diagrams. By now I know only Sysbase Powerdesigner which can do such things (code<-->UML). And Visio can do with database diagrams. But to C++... :(( – flashnik Jan 06 '10 at 20:29
  • +1 flashnik thanks for the feedback. I'm surprised visio can do that with database diagrams, though. – Larry Watanabe Jan 07 '10 at 13:25
  • I've found that there was Visio 2003 for Enterprise Architects and it was shipped with Team Suite VS. It can generate C++ and .Net code from UML diagram. So the problem can be not in Visio but in modern version of studio. Maybe let's create a feature request for Visio 2010 and VS 2010 while both of them are in beta? – flashnik Jan 08 '10 at 20:57
4

StarUML is a free (and better) alternative with code generation possibility.
Most paid UML tools generate code too.

LiraNuna
  • 64,916
  • 15
  • 117
  • 140
stefaanv
  • 14,072
  • 2
  • 31
  • 53
3

ArgoUML is a nice, free tool that can generate UML class diagrams then generate source code from the diagram. ArgoUML can output code in several languages, including C++.

You can find it at: http://argouml.tigris.org

Bill W
  • 1,428
  • 1
  • 20
  • 29
  • Tigris.. I love tigris products :) Thank you, I'll try it and then reply again. – flashnik Jan 06 '10 at 21:01
  • I also really like the "design critics" they critique the UML that you have written thereby helping you to write better UML. :) – Bill W Jan 06 '10 at 21:13
  • No, it's not good for C++. I tried to import project and it failed... Hope, they will develop it and fix problems. Now it's very early product – flashnik Jan 06 '10 at 22:36
  • I have been able to generate C++ code from UML with ArgoUML. However, it does not yet generate UML from C++ code. I was not worried about that because your original question was "How is it possible to solve reverse problem: given a static UML diagram from Visio, generate header files?". ArgoUML handles that just fine. – Bill W Jan 07 '10 at 18:56
1

Enterprise Architect from Sparx Systems has worked well for me.

LeWoody
  • 3,593
  • 4
  • 25
  • 31