Difference between revisions of "XCSG:Enumeration"

From AtlasWiki
Jump to: navigation, search
Line 1: Line 1:
The semantics of Enumeration are those common to UML [5, pp. 2-39, 2-68] and MS-IL [27, p. 143].
+
An Enumeration is a group of related [[XCSG:Variable#immutable|immutable]] [[XCSG:Variable|Variables]].
 
+
The semantics of EnumerationLiteral are those defined by UML [5, pp. 2-39, 2-65].
+
  
 
== Specifications ==
 
== Specifications ==
  
{| class="atlaswikitable" style="width:100%"
+
{{Node
! width="160" align="left" | Metaclass
+
| extends = Type
| Enumeration
+
| description = A group of related [[XCSG:Variable#immutable|immutable]] [[XCSG:Variable|Variables]].
|-
+
}}
! Extends
+
| [[DataType]]
+
|-
+
! Description
+
| A datatype whose range consists of a set of predefined values, called enumeration literals
+
|-
+
! References
+
| [5, pp. 2-39, 2-68, 3-57, 6-8, 6-38], [5, B-8, enumeration], enumeration type [27, p. 143]
+
|}
+
  
 
== Language mappings ==
 
== Language mappings ==

Revision as of 14:36, 6 May 2014

An Enumeration is a group of related immutable Variables.

Specifications

Metaclass Enumeration
Extends Type
Description A group of related immutable Variables.
Direct Subkinds C:Enum, Java:Enum
All Superkinds Type, Node, ModelElement
Specified In Edges

Inherited From In Edge Predecessor Multiplicity Description
Type AliasedType TypeAlias Connects a TypeAlias to the Type or TypeAlias it was declared to duplicate.

ArrayElementType ArrayType 0..1 Connects an ArrayType to the Type of elements contained by arrays of that type.
C:CompletedBy OpaqueType 1 Connects an OpaqueType to the complete definition of the corresponding Type.
ReferencedType Pointer Connects a Pointer to the Type of the data pointed to.
Returns Function Connects a Function to the Type of its return value (which may be Void).
TypeOf Variable Links a Variable or DataFlow node to its Type

DataFlow (Node)
Specified Out Edges

Inherited From Out Edge Successor Multiplicity Description
Type TypeChecked InstanceOf Connects a Type (usually a Classifier) to an InstanceOf test.
Known Possible In Edges

Inherited From In Edge Predecessor Multiplicity Description
Node Contains Node 1 Indicates that the predecessor contains the successor in a sense specified by the specific type of Contains edge.
Known Possible Out Edges

Inherited From Out Edge Successor Multiplicity Description
Node Contains Node Indicates that the predecessor contains the successor in a sense specified by the specific type of Contains edge.

Language mappings

In C++, an enum declaration creates a distinct integer type with named constants (literals). The names of the enumeration literals must be distinct, and the only operation defined for enumerated data types is assignment [50, p. 17].

Enumeration literals can be mapped to named constants in languages that do not support enumeration types (such as Java).