company logo

TypeDefinition :: lookupType - Get enumerator type name

When enumerations are used for classifying objects, each enumerator may be associated with a type, which is usually a specialization of the base type of the enumeration.

When calling the function with an invalid type definition or when the type definition does not refer to an enumeration, the function throws an exception. In order to check, whether the data type is an enumeration, isEnumeration() might be called.

Notes:

When referring to enumerator values by Value (e.g. v) one may also call v.value("type") for retrieving the enumerators name. Within OSI, one may simply write v.type.

Return value:  Enumerator name ( odaba::String & )

The enumerator name is the string value (name) for an enumerator in an enumeration. Enumerator names must not exceed 40 characters.

Implementation details

odaba::String TypeDefinition  :: lookupType ( int32 iEnumeratorValue )

The function returns the type name for an enumerated value identified by the number passed in iEnumerationValue. When the type definition does not refer to an enumeration, the function throws an exception.

Notes:

When referring to enumerator values by Value, one may also call v.value("name") for retrieving the enumerators name. This also allows accessing label, type, condition and title. Within OSI, one may simply write v.name etc.

  • iEnumeratorValue - Enumerator value

    The enumerator value is the code (value) of an enumerator as being defined in an enumeration. CS_U is a reserved value indication an invalid enumerator value.