[Uml-devel] Re: Universal Model DataTypes in umbrello

Andrew Sutton asutton at cs.kent.edu
Thu Feb 5 10:44:02 UTC 2004

On Thursday 05 February 2004 01:37 pm, Brian Thomas wrote:
> 	I accept that UML has no universal datatypes per se, but its a problem.
> 	Again, the problem I have with all this is that I want to create  UML
> class 
 diagrams that can be used to generate both java and C++ code. I
> dont see how you can put "Java::String" for an attribute in one class in
> the diagram, and then expect umbrello to  correctly generate
> "C++::std::string" when you change over to C++ code generation from Java
> code generation (which you _should_ be able to do).
> 	Perhaps the model library should be scoped as "umbrello:<datatype>", then
> 	we have a list that looks like:

you're right.. that is a problem. Now that I think about it, there's a package 
of CORBA IDL types and I think that might actually form the foundation for 
builtin types in UML. It would, of course, include a "string" type.

It's funny, I'm writing some notes on roundtrip engineering and one of the big 
problems is mapping from UML to a specific language. There's alot of places 
where this stuff doesn't fit quite right... like mapping primitives from uml 
to C++, Java, or even specific environments like Qt (e.g., string->QString).

maybe the best solution, for now, is to leave it as it is and assume just have 
the code generator rewrite the data type on the fly.


More information about the umbrello-devel mailing list