[Uml-devel] Data types and codegenerators
Luis De la Parra Blum
lparrab at gmx.net
Sun Mar 16 15:28:02 UTC 2003
On Saturday 15 March 2003 09:46, BARTKO, Zoltan wrote:
> * Add the possibility of switching sets of types with "a flick of the
> wrist" and be able to choose the set of types that should appear in the
> pull-down lists when defining the types of attributes and operators:
> * UML default
> * Java
> * Cpp
> * SQL
> * etc.
the idea sounds great.
> If you are willing to undertake this, I am willing to implement it. I would
> like to hear the opinions of the people, who wrote the respective code
> generators, since it would greatly affect their work.
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
for that language then you return the UML default.
...the code generatos just write whatever you have as type, so they are not
affected by this (only the combobox is affected)
that way I can stil override "string" and write "String" even if I am using
C++ and not java.
More information about the umbrello-devel