views:

1657

answers:

6

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!
+2  A: 
  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
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
+1 flashnik thanks for the feedback. I'm surprised visio can do that with database diagrams, though.
Larry Watanabe
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
+4  A: 

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

stefaanv
+3  A: 

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
Tigris.. I love tigris products :)Thank you, I'll try it and then reply again.
flashnik
I also really like the "design critics" they critique the UML that you have written thereby helping you to write better UML. :)
Bill W
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
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
A: 

Not really a free tool. But feel free to have a look at this "project"

epatel
Well, sounds interesting, but not what I need by now. But I'll remember about it :)
flashnik
A: 

Enterprise Architect from Sparx Systems has worked well for me.

LWoodyiii
A: 

Yeah this is really nice feature in visio 2010.. generating static UML diagram from Native C++ project was good experience for me too. I got trial visio download from visio toolbox and would like to explore such features. Btw thanks for starting this thread, am also interested in visio reverse engineering area.

Jessica Perry