sdaiIsSubtypeOf
Determines whether a specified instance type is a subtype of another specified instance type. This operation will return sdaiTRUE if the instance type specified by the <subtypeEntity> argument is the same or a subtype of the instance type specified by the <supertypeEntity> argument, else sdaiFALSE will be returned.
The dictionary model that holds the actual entity definition instances must be open before this operation can be successfully performed.
Related function: sdaiIsSubtypeOfBN
Header:
#include "sdai.h"
Prototype:
SdaiBoolean sdaiIsSubtypeOf(SdaiEntity subtypeEntity,
SdaiEntity supertypeEntity);
Arguments:
subtypeEntity |
A numeric entityID that uniquely identifies the entity definition instance in the EDMdatabase that defines the subtype in this operation. |
supertypeEntity |
A numeric entityID that uniquely identifies the entity definition instance in the EDMdatabase that defines the supertype in this operation. |
Returns:
sdaiTRUE : The <subtypeEntity> instance type is the same or a subtype of the <supertypeEntity> instance type.
sdaiFALSE : The <subtypeEntity> is neither the same instance type nor a subtype of the <supertypeEntity> instance type. Use sdaiErrorQuery to check for error during operation.
Example:
SdaiAppInstance anInst;
SdaiEntity entityId,pointId;
...
entityId = sdaiGetInstanceType(anInst);
if (sdaiIsSubtypeOf (entityId, pointId) == sdaiTRUE) {
. . .
}
. . .