XCSG:Enumeration

From AtlasWiki
Revision as of 15:24, 5 March 2014 by Xingyan (Talk | contribs) (Created page with "The semantics of Enumeration are those common to UML [5, pp. 2-39, 2-68] and MS-IL [27, p. 143]. The semantics of EnumerationLiteral are those defined by UML [5, pp. 2-39, 2-...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The semantics of Enumeration are those common to UML [5, pp. 2-39, 2-68] and MS-IL [27, p. 143].

The semantics of EnumerationLiteral are those defined by UML [5, pp. 2-39, 2-65].

Specifications

Metaclass Enumeration
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

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).