Previous Table of Contents Next


11.6.1 DataType


   Description

   A data type is a type whose instances are identified only by their value. A DataType may contain attributes to support the modeling of structured data types.

   A typical use of data types would be to represent programming language primitive types or CORBA basic types. For example, integer and string types are often treated as data types.

   Generalizations

   • “Classifier? on page 127

   Attributes

   No additional attributes

   Associations

   • ownedAttribute: Property[*] The Attributes owned by the DataType. Subsets Classifier::attribute and Element::ownedMember.

   • ownedOperation: Operation[*] The Operations owned by the DataType. Subsets Classifier::feature and Element::ownedMember.

   Constraints

   No additional constraints

   Semantics

   A data type is a special kind of classifier, similar to a class. It differs from a class in that instances of a data type are identified only by their value.

   All copies of an instance of a data type and any instances of that data type with the same value are considered to be the same instance. Instances of a data type that has attributes (i.e., is a structured data type) are considered to be the same if the structure is the same and the values of the corresponding attributes are the same.

   If a data type has attributes, then instances of that data type will contain attribute values matching the attributes.

   Semantic Variation Points

   Any restrictions on the capabilities of data types, such as constraining the types of their attributes, is a semantic variation point.

   Notation

   A data type is shown using the classifier symbol with keyword «dataType» or when it is referenced by e.g., an attribute, shown as a string containing the name of the data type.

   Examples


   size: Integer

   Figure 11.19 - Notation of data type: to the left is an icon denoting a data type and to the right is a reference to a data type that is used in an attribute.