- All Superinterfaces:
- CwmClassifier, CwmElement, CwmModelElement, CwmNamespace, RefBaseObject, RefFeatured, RefObject
- All Known Implementing Classes:
public interface CwmUnion
- extends CwmClassifier
Union object instance interface.
The Union class represents programming language unions and similarly
structured data types. Because of the diversity of union semantics found
across software systems, the Union and UnionMember classes are likely
candidates for specialization to better capture union semantics in
specific language extension packages.
A discriminated Union has a collection of UnionMembers that determine the
sets of contents that the Union may contain. Such Unions have an attribute
called the discriminator that identifies the memberCase value of the
UnionMember that the Union currently contains. The discriminator is found
via the UnionDiscriminator association to StructuralFeature. The
discriminator may be embedded within UnionMembers or may be located
outside the discriminator. If it is located within UnionMembers, the
discriminator should occur in every UnionMember at the same location
(often, the first).
Undiscriminated unions (for example, a C language union) are also
supported, but have an empty discriminator reference, and the memberCase
attribute of the UnionMembers it contains is ignored.
Undiscriminated Unions are often used to represent alternate views of a
storage area. A fine degree of control over this aspect of Unions may be
creating a class that derives from both UnionMember and FixedOffsetField
CWM Record package) and setting the offset attribute instances of that
Note: This type should not be subclassed,
implemented or directly instantiated by clients. It is generated from a
MOF metamodel and implemented by Enki or MDR.
- Returns the value of reference discriminator.
- Value of reference discriminator.
void setDiscriminator(CwmStructuralFeature newValue)
- Sets the value of discriminator reference. See
getDiscriminator() for description on the attribute.
newValue - New value to be set.