When specifying new a language / product type --- and specifying its datatypes, I have a choice to add the "Common Type" as part of the datatype's specification. For example, for the Java language, and the pre-given 'byte' datatype, we find a Common Type of 'Byte'. Here's what the help page says:
The common type is the generic name of the datatype , for example the Java boolean datatype has a common datatype Boolean.
But, sorry, I don't quite get it. In Java, both are legal datatypes. Neither is any more common than the other. Then I thought, well, we might be talking about some common, "UML" datatypes --- common to all (implementation) languages; i.e. a platform independent type (see also below). But then amongst the C++ types I find a common type of "Uint" for the C++ type 'unsigned int' (and I am tempted to think that Uint can hardly by a generic, UML datatype).
Where does the tool list such common types? Where else can I find them? And, then, should I not be mapping common types to Java types; i.e. choose a common type, and specify to what I'd like that mapped to (rather than specifying the Java type and - optionally - entering a free-text common type)?
Lastly, let me talk about the CONVERT_TYPE model transform macro; here's the help file:
CONVERT_NAME(<destinationLanguage>, <originalType>)
Will convert <originalType>, to the corresponding type in <destinationLanguage> using the datatypes and common types defined in the model.
Where:
ยท <originalType> is assumed to be a platform independent common type.
This seems clear enough - and point to the interpretation that a common type is language-independent etc.; except...
When modeling (say) a class, one specifies a "language" for that class (why specify a language in a PIM?). Choosing <none> as the language gives me
no primitive datatypes at all --- can't even specify an integer attribute (the only type choices are other classes).
Choosing a class language of (say) Java, gives me the complete set of Java language datatypes as expected. Of course, I am then modeling a PIM using Java datatypes. Further, what does the CONVERT_TYPE macro achieve? Converting my Java type to the specified free-text "common type", then converting from the common type to the respective target language type?
Could somebody please shed some light on this? Any comments greatly appreciated...
cheers,
olaf.