company logo

EnumeratorDefinition :: subEnumeratorEntry - Get subenumerator definition entry

In case of hierarchical enumerations, subordinated enumerators can be searched via sub enumerator lists. The function returns the enumerator definition at position passed in iPosition in the enumerator sub list. The position has to be less than the sub enumerator count (subEnumeratorCount()).

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 locate enumerators in a sub list by code or name, subEnumeratorDefinition() might be called.

// fragment

... function ( EnumeratorDefinition &edef ) {

  EnumeratorDefinition    subDef;

  int                     i = 0;

  while ( (subDef = edef.getSubEnumerator(i++)).isValid() ) {

    // ... do something

  }

}

Return value:  Enumerator definition ( odaba::EnumeratorDefinition  )

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

Implementation details

const odaba::EnumeratorDefinition EnumeratorDefinition  :: subEnumeratorEntry ( int32 iPosition )
  • iPosition - Position in collection

    The position of an element in a collection is beginning with 0 for the first element.