Example 2: About Iterators
An Iterator provides sequential access to a set of objects matching a given criteria.
Iterators are represented by the opaque data type SE_Iterator. Since these are allocated by the API, they must be freed with the API call SE_FreeIterator.
The API function SE_IsIteratorEmpty() provides a way to determine if there are any more objects in the iterator.
The API function SE_GetNextObject() provides a way to step through the set.
There are 3 types of Iterators: component, associate and aggregate, which traverse the 3 different types of relationships.
More advanced features provide extensive control over selection process and objects returned via parameters to:
- Simplify access to more complex structures
- Apply conversions to object field data
- Control traversal sequence & branching