sdaiUnsetAggrByIterator


Set the specified ARRAY element value to indeterminate, i.e. the element value will be unset such that a following EDMinterface operations sdaiTestAggrByIndex and edmiTestAggrByIterator on the same element will return sdaiFALSE. The functions sdaiGetAggrByIndex and sdaiGetAggrByIterator on the same ARRAY element will fail when the element value is indeterminate, i.e. the value is unset. When the actual element value is an aggregate, this aggregate and all child aggregates will be deleted by this operation.
This operation is only applicable on ARRAY aggregates owned by application instances. The actual ARRAY element is specified by the current element of the iterator given in the <iterator> argument.
All elements in an ARRAY have the value indeterminate until an element value is assigned by one of the following operations: sdaiPutAggrByIndex , sdaiPutAggrByIterator , sdaiCreateNestedAggrByIndex , or sdaiCreateNestedAggrByIterator .
The model that holds the actual ARRAY aggregate instance must be open for write access before this operation can successfully performed.
Related functions: sdaiUnsetAggrByIterator , sdaiPutAggrByIndex , sdaiPutAggrByIterator , sdaiCreateNestedAggrByIndex , sdaiCreateNestedAggrByIterator .
Header:
#include "sdai.h"
Prototype:
void sdaiUnsetAggrByIterator(SdaiIterator iterator);
Arguments:

iterator

A numeric iteratorID that uniquely identify the ARRAY element of interest in the EDMdatabase. The array element to unset is the current element of the iterator specified by this argument.
The iteratorID is defined when the iterator is created by the sdaiCreateIterator function.

Returns:
Void – use sdaiErrorQuery to check for error in operation.
Examples:
SdaiAggr aggrId;
SdaiIterator iterator
SdaiErrorCode errCode;
...
iterator = sdaiCreateIterator(aggrId);
while (sdaiNext(iterator) == sdaiTRUE) {
sdaiUnsetAggrByIterator(iterator); 
if (errCode = sdaiErrorQuery()) { 
/* Error in operation */ 
printf("\nError: %s in sdaiUnsetAggrByIterator \n", 
edmiGetErrorText(errCode)); 
goto error; 

}
. . .