-
Key: UML14-306
-
Legacy Issue Number: 6259
-
Status: closed
-
Source: Simula Research Laboratory ( Dr. Bran Selic)
-
Summary:
In the UML 2, a primitive type cannot be stored directly in a Property. Instead, the Property has an association inherited from TypedElement with an end called type. This association is not composite so a Property cannot contain its own type. In the case of a complex type such as a classifier, it makes sense that the type is external to the property. But, in the case of a primitive type, it becomes impractical because for each primitive type encountered, we are forced to create a new PrimitiveType object and store the object in some package in the model. There could be an explosion of PrimitiveType objects in a model as new objects are created for "const char", "const char**", "const char **", etc. It would be unclear what model elements, if any, are using these objects.
As a proposed solution to this problem, which is inherent to Operation and Parameter as well as Property, an additional composition could be made to PrimitiveType in TypedElement. It could be an optional [0..1] unidirectional composition for this case with a primitive type so that each Property, Operation and Parameter could have access to their primitive type information. Management of these primitive types would be alot easier because they are owned by the element that is making use of them.
There is another solution that I have thought of while looking at this problem. All of the necessary primitive types could be referenced from a C++ or Java language model. All of the rest of the modifiers for the primitive type could simply be made available through the use of stereotypes from a C++ or Java profile so that the user could take "int" and add "*" and/or "const" modifiers to the primitive type. But, with this approach, there would have to be common C++ and Java models and profiles so that everyone's model could still be somewhat portable between implementations of UML 2.
-
Reported: UML 1.5 — Fri, 19 Sep 2003 04:00 GMT
-
Disposition: Resolved — UML 1.4.2
-
Disposition Summary:
No Data Available
-
Updated: Fri, 6 Mar 2015 20:58 GMT
UML14 — UML2 Super / Primitive Types / implementation issue
- Key: UML14-306
- OMG Task Force: UML 1.4 RTF