Previous Table of Contents Next


7.6 MOF Model Data Types

   The following data types are part of the MOF Model. Each data type is represented in the MOF Model as an instance of the appropriate DataType subclass.

7.6.1 PrimitiveTypes used in the MOF Model

    The only PrimitiveType instances used in the MOF Model are Boolean, Integer, and String. These are specified in “The PrimitiveTypes Package? on page 134.

   NOTE: The PrimitiveTypes package defines 6 standard PrimitiveType instances in total. The other three instances (Long, Float, and Double) are not used in the specification of the MOF Model as an instance of itself.

7.6.2 MultiplicityType

   MultiplicityType is a structure (record) type that is used to specify the multiplicity properties of an Attribute, Parameter, Reference, or AssociationEnd.

   Fields

   lower


   upper isOrdered



   isUnique


   Constraints

   The “lower? bound of a MultiplicityType to be “Unbounded.? [C-54] on page 123.

   The “lower? bound of a MultiplicityType cannot exceed the “upper? bound. [C-55] on page 123 .

    The “upper? bound of a MultiplicityType cannot be less than 1. [C-56] on page 123.

   If a MultiplicityType specifies bounds of [0..1] or [1..1]), the “is_ordered? and “is_unique? values must be false. [C-57] on page 124.

   IDL

   struct MultiplicityType {long lower;long upper;boolean isOrdered;boolean isUnique;

   };

   const string LOWER_CANNOT_BE_NEGATIVE_OR_UNBOUNDED ="org.omg:constraint.model.multiplicity_type.lower_cannot_be_negative_or_unbounded";const string LOWER_CANNOT_EXCEED_UPPER ="org.omg:constraint.model.multiplicity_type.lower_cannot_exceed_upper";const string UPPER_MUST_BE_POSITIVE ="org.omg:constraint.model.multiplicity_type.upper_must_be_positive";const string MUST_BE_UNORDERED_NONUNIQUE ="org.omg:constraint.model.multiplicity_type.must_be_unordered_nonunique";

7.6.3 VisibilityKind

   This data type enumerates the three possible kinds of visibility for a ModelElement outside of its container. These are:

   NOTE: The rules governing visibility of ModelElements in the MOF are yet to be specified. As an interim measure, all

   ModelElements are deemed to be visible, irrespective of the “visibility? attribute settings. The IDL mapping specification includes minimal preconditions on visibility to ensure that generated IDL is compilable (see 9.5, “Preconditions for IDL Generation,? on page 192).

   IDL enum VisibilityKind {public_vis, private_vis, protected_vis};

7.6.4 DirectionKind

   DirectionKind enumerates the possible directions of information transfer for Operation and Exception Parameters.

   IDL enum DirectionKind {in_dir, out_dir, inout_dir, return_dir};

7.6.5 ScopeKind

   ScopeKind enumerates the possible “scopes? for Attributes and Operations.

   IDL enum ScopeKind {instance_level, classifier_level};

7.6.6 AggregationKind

   AggregationKind enumerates the possible aggregation semantics for Associations (specified via AssociationEnds).

   NOTE: Aggregation semantics in the MOF is intended to be aligned with UML. Unfortunately, the OMG UML specification does not define the meaning of “shared? aggregation for UML. As an interim measure, the use of “shared? aggregation in MOF meta-models is discouraged.

   IDL enum AggregationKind {none, shared, composite};

7.6.7 EvaluationKind

   EvaluationKind enumerates the possible models for Constraint evaluation.

   Container

   Constraint

   IDL enum EvaluationKind {immediate, deferred};