Previous Table of Contents Next


11.6.3 EnumerationLiteral


   An enumeration literal is a user-defined data value for an enumeration.

   Description

   Constructs::EnumerationLiteral reuses the definition of Enumeration from Basic. It adds a specialization to Constructs::NamedElement.

   Generalizations

   • “NamedElement? on page 143

   Attributes

   No additional attributes

   Associations

   • enumeration: Enumeration[0..1] The Enumeration that this EnumerationLiteral is a member of. Subsets NamedElement::namespace.

   Constraints

   No additional constraints

   Semantics

   An EnumerationLiteral defines an element of the run-time extension of an enumeration data type.

   An EnumerationLiteral has a name that can be used to identify it within its enumeration datatype. The enumeration literal name is scoped within and must be unique within its enumeration. Enumeration literal names are not global and must be qualified for general use.

   The run-time values corresponding to enumeration literals can be compared for equality.

   Notation

   An EnumerationLiteral is typically shown as a name, one to a line, in the compartment of the enumeration notation. See “Enumeration? .

   Examples

   See “Enumeration?