sdaiDelete


Deletes the aggregate element pointed to by the specified iterator, i.e. deletes the aggregate element that is the current element of the specified iterator. The actual iterator will point to the element immediately following the deleted element after completion of this operation. If the actual aggregate element is a parent aggregate, then all child aggregates to this parent aggregate will be deleted.
This function is applicable on aggregates of type LIST, SET, and BAG that are owned by application instances.
The model that holds the actual aggregate must be open for write access before this operation can be successfully performed.
Related function: sdaiRemove
Header:
#include "sdai.h"
Prototype:
void sdaiDelete(SdaiIterator iterator);
Arguments:

iterator

A numeric iteratorID that uniquely identifies the aggregate element to be deleted from the EDMdatabase.
The iteratorID is defined by the sdaiCreateIterator function.

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