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 | |
virtual ErrCode INTERFACE_FUNC | getEnumeratorNames (IList **names)=0 |
Gets the list of enumerator names. More... | |
virtual ErrCode INTERFACE_FUNC | getAsDictionary (IDict **dictionary)=0 |
Gets the enumerator names and values as a Dictionary. More... | |
virtual ErrCode INTERFACE_FUNC | getEnumeratorIntValue (IString *name, Int *value)=0 |
Gets the value of enumerator with the specified name. More... | |
virtual ErrCode INTERFACE_FUNC | getCount (SizeT *count)=0 |
Gets the number of enumerators within the Enumeration Type. More... | |
![]() | |
virtual ErrCode INTERFACE_FUNC | getName (IString **typeName)=0 |
Gets the name of the Type. More... | |
![]() | |
virtual ErrCode INTERFACE_FUNC | borrowInterface (const IntfID &intfID, void **obj) const =0 |
Returns another interface which is supported by the object without incrementing the reference count. More... | |
virtual ErrCode INTERFACE_FUNC | dispose ()=0 |
Disposes all references held by the object. More... | |
virtual ErrCode INTERFACE_FUNC | getHashCode (SizeT *hashCode)=0 |
Returns hash code of the object. More... | |
virtual ErrCode INTERFACE_FUNC | equals (IBaseObject *other, Bool *equal) const =0 |
Compares object to another object for equality. More... | |
virtual ErrCode INTERFACE_FUNC | toString (CharPtr *str)=0 |
Returns a string representation of the object. More... | |
![]() | |
virtual ErrCode INTERFACE_FUNC | queryInterface (const IntfID &intfID, void **obj)=0 |
Returns another interface which is supported by the object and increments the reference count. More... | |
virtual int INTERFACE_FUNC | addRef ()=0 |
Increments the reference count for an interface on an object. More... | |
virtual int INTERFACE_FUNC | releaseRef ()=0 |
Decrements the reference count for an interface on an object. More... | |
Gets the enumerator names and values as a Dictionary.
[out] | dictionary | The Dictionary object with enumerator names as keys, and enumerator values as its values. |
|
pure virtual |
Gets the number of enumerators within the Enumeration Type.
[out] | count | The number of enumerators within the Enumeration Type. |
Gets the value of enumerator with the specified name.
name | The name of the enumerator (String object). | |
[out] | value | The integer value of the enumerator with the specified name. |