[Uml-devel] Data types and codegenerators
Brian Thomas
thomas at mail630.gsfc.nasa.gov
Mon Mar 17 08:25:30 UTC 2003
On Monday 17 March 2003 09:35 am, umbrello-devel-request at mail.kde.org wrote:
> I dont see why this should affect the code generators.
> I'd say you make a set of classes containing the different primitive types
> (CppPrimitives, JavaPrimitives, SQLPrimitives and so on ) and when you
> create a new attribute, you populate the combo list with the classes of the
> model plus the primitive types for the active language. -- that is, when
> you set the ActiveLanguage to Cpp, then a call to
> <something>::getPrimitives() would return a list containing bool, int,
> short, char, and so on... <something> could be Umbrello itself (the main
> app class) or another "PrimitiveManager", but they would have to be
> cooordinated with the current active language.
> If you select a language like JavaScript, and there is no set of primitives
> for that language then you return the UML default.
But I dont think this will work well. Consider my earlier argument that there
may be more than one mapping between a UML type and what is available in
that language (as I said before.. just the UML "int" type may map to "int",
"short", "long", "Integer", etc in Java. C++ has many mappings too).
--
This will be a memorable month -- no matter how hard you try to forget it.
More information about the umbrello-devel
mailing list