Example 2: Introducing 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.
The API function SE_GetNextObject() provides a way to step through the set.
SE_Iterator is an opaque type which is allocated by the API, and so it must be freed (SE_FreeIterator).
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