Enumeration types define the enumerator names and values of Enumerations with a name matching that of the Enumeration type. More...
Enumeration types define the enumerator names and values of Enumerations with a name matching that of the Enumeration type.
An Enumeration type provides a String-type name, a list of enumerator names (list of Strings) and a list of enumerator values (list of Integer objects). To use Enumeration types for creating Enumeration objects, they must be added to the Type Manager. Alternatively, if an Enumeration is created without a matching Enumeration type in the manager, a default Enumeration type is generated based on the enumerator names and values of the created Enumeration object. This generated Enumeration type is then added to the Type Manager.
The enumerator values are represented as a list of Integer objects. These values can be explicitly specified during Enumeration type creation, or only the first enumerator value can be specified, with the rest automatically assigned in ascending order, starting from that value (or from the default '0' value if not specified).
Public Member Functions | |
ListPtr< IString > | getEnumeratorNames () const |
Gets the list of enumerator names. More... | |
DictPtr< IString, IInteger > | getAsDictionary () const |
Gets the enumerator names and values as a Dictionary. More... | |
Int | getEnumeratorIntValue (const StringPtr &name) const |
Gets the value of enumerator with the specified name. More... | |
SizeT | getCount () const |
Gets the number of enumerators within the Enumeration Type. More... | |
![]() | |
StringPtr | getName () const |
Gets the name of the Type. More... | |
Gets the enumerator names and values as a Dictionary.
|
inline |
Gets the number of enumerators within the Enumeration Type.
|
inline |
Gets the value of enumerator with the specified name.
name | The name of the enumerator (String object). |