Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »


 
This operation implements the aggregate subset operation in the Express language, defined in 12.6.5 Subset operator in ISO 10303-11:1994(E) : The EXPRESS Language Reference Manual.
The data model(s) that hosts the two specified aggregates must be open before this operation can be successfully performed.
Related functions: edmiIsAggrSuperset
Header:
#include "sdai.h"
Prototype:
EdmiError edmiIsAggrSubset(SdaiAggr    operand1,
                            SdaiAggr    operand2, 
                            SdaiLogical *result);  
Arguments:

operand1

A numeric aggregateID that uniquely identifies the aggregate instance used as the left operand (operand1) in the aggregate subset operation.
The aggregateID is returned when the aggregate is created or it can be retrieved with an EDMinterface get operation.

operand2

A numeric aggregateID that uniquely identifies the aggregate instance used as the right operand (operand2) in the aggregate subset operation.
The aggregateID is returned when the aggregate is created or it can be retrieved with an EDMinterface get operation..

result

Address of a SdaiLogical variable that will receive the result of the aggregate subset operation.
The result is as follows:
sdaiTRUE: the compared instance values are identical
sdaiFALSE: the compared instance values are not identical.
sdaiUNKNOWN: use sdaiErrorQuery to check for possible error in operation.

Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
SdaiAggr operand1, operand2;
EdmiError rstat;
SdaiLogical result;
. . .
if (rstat = edmiIsAggrSubset (operand1, operand2, &result)) {
/* Error in operation */ 
printf("\nError: %s in edmiIsAggrSubset\n", 
edmiGetErrorText(rstat)); 
goto error; 
}
switch (result) {
case sdaiTRUE: 
. . . /* operand1 is a subset operand2 */ 
break; 
case sdaiFALSE:  
. . . /* operand1 is not a subset of operand2 */  
break; 
default: 
. . . /* One or more unset value found in operation */  
}
. . .

  • No labels