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 »


 
Implements the Express Aggregate Instance Comparison> operation as defined in section 12.2.2.1 Aggregate instance comparison; in ISO 10303-11:1994(E) : The EXPRESS Language Reference Manual.
This operation is only applicable to aggregates in data models. The actual data models must be open before this function can be successfully performed.
Related functions: edmiAggrDifference, edmiAggrIntersection , edmiAggrUnion , edmiAggrValueCompare , edmiIsAggrSubset , edmiIsAggrSuperset
Header:
#include "sdai.h"
Prototype:
EdmiError edmiAggrInstanceCompare(SdaiAggr    operand1,
                                   SdaiAggr    operand2, 
                                   SdaiLogical *result);  
Arguments:

operand1

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

operand2

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

result

Address of a variable that will receive the result of the aggregate instance compare 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
EdmiError rstat;
SdaiLogical result;
SdaiAggr operand1, operand2;
. . .
If (rstat = edmiAggrInstanceCompare (operand1, operand2, &result)) {
/* Error in operation */ 
printf("\nError: %s in edmiAggrInstanceCompare \n", 
edmiGetErrorText(rstat)); 
goto error; 
}
switch (result) {
case sdaiTRUE: 
. . . /* The two aggregates are instance value equal */ 
break; 
case sdaiFALSE: 
. . . /* The two aggregates are not instance value equal */ 
break; 
default: 
. . . /* Unset elements in one of the aggregates or 
error in operation */  
}
. . .

  • No labels