company logo

DictionaryHandle :: StringToEnum - Get enum value from enum name

The function converts an enumerator name (string) into an enumerator value (integer). The string value can be passed as pointer to string or in a property handle. When the string passed does not match, the function returns CS_U.

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 overview

Implementation details

  1. Get enum value from property handle
    int32 DictionaryHandle  :: StringToEnum ( NString &enum_name, PropertyHandle &ph )
    • enum_name - Enumeration name

      The enumeration name is passed as 0-terminated string. Enumeration names can be passed as scoped names, where preceding name space names are separated by double colon '::'.

    • ph - Reference to property handle
  2. to list
  3. Get enum value from string
    int32 DictionaryHandle  :: StringToEnum ( NString &enum_name, NString &enum_string )
    • enum_name - Enumeration name

      The enumeration name is passed as 0-terminated string. Enumeration names can be passed as scoped names, where preceding name space names are separated by double colon '::'.

    • enum_string - Enumerator name

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

  4. to list