company logo

TypeDefinition :: lookupCode - Lookup enumeration code by string

The function returns the code (number) for an enumerated value identified by the name passed in sEnumeratorName.

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.

Return value:  Enumerator value ( int32  )

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.

Implementation details

int32 TypeDefinition  :: lookupCode ( odaba::String &sEnumeratorName )
  • sEnumeratorName - Enumerator name

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