company logo

EnumeratorDefinition :: subEnumeratorDefinition - Get subenumerator definition

The function returns the enumerator definition for the requested category in a subcategory list. When no sub-list is available, the function throws an exception.

When the enumerator definition is not valid or when the requested enumerator could not be found in the sub enumerator list, the function also throws an exception.

In order to read all enumerators in a sub-list, subEnumeratorEntry() might be called.

// fragment; EnumeratorDefinition ed;

  EnumeratorDefinition sub;

  if ( !(sub = ed.subEnumerator(111)).isValid() )

    Application::output("Enumerator 111 not avaiilable");

Return value:  Enumerator definition ( odaba::EnumeratorDefinition  )

Enumerator definitions provide code, name and definition for an enumerator value.

Implementation details

  1. Get subenumerator by code
    const odaba::EnumeratorDefinition EnumeratorDefinition  :: subEnumeratorDefinition ( int32 iEnumeratorValue )

    The function provides the enumerator for the enumerator code (numerical value) passed in iEnumeratorValue.

    When no enumerator with the passed code could be found, the function returns an empty enumerator definition.

    • 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.

  2. to list
  3. Get subenumerator by name
    const odaba::EnumeratorDefinition EnumeratorDefinition  :: subEnumeratorDefinition ( odaba::String &sName )

    The function searches the enumerator for the enumerator name passed in sName.

    When no enumerator with the passed name could be found, the function returns an empty enumerator definition.

    • sName - Name
  4. to list