sdaiBeginning


Position the specified iterator at the beginning of, i.e. before the first element in the connected aggregate instance so that there is no current element of the iterator . The first following sdaiNext operation on the actual iterator will make the first element in the connected aggregate the current element of the iterator .
This operation is applicable to all existing iterators. For unordered aggregates the first, or next, element determination is left to the implementation.
The model that holds the aggregate connected to the actual iterator must be open before this function can be successfully performed.
See related functions: sdaiCreateIterator , sdaiDeleteIterator , sdaiNext , sdaiPrevious , sdaiEnd
Header:
#include "sdai.h"
Prototype:
void sdaiBeginning(SdaiIterator iterator);
Arguments:

Iterator

A numeric iteratorID that uniquely identifies an iterator in the actual EDMserver. The iteratorID is defined by the sdaiCreateIterator function when the actual iterator is created.

Returns:
Void – use sdaiErrorQuery function to check for error during operation.
Example:
SdaiIterator iterator;
SdaiErrorCode errCode;
SdaiAggr aggrId;
...
iterator = sdaiCreateIterator (aggrId);
. . .
sdaiBeginning(iterator);
errCode = sdaiErrorQuery();
if (errCode) {
/* Error in operation */ 
printf("\nError: %s in sdaiBeginning \n", 
edmiGetErrorText(errCode)); 
goto error; 
}
. . .