Checks if a data type is asignment compatible with another data type.
A data type A is assignment compatible with data type B if A is the same datatype as B or any subtype of B. All defined data types in an EDM database are specified by domains identified by domain Ids.
Header:
#include "sdai.h"
Prototype:
SdaiBoolean edmiIsAssignmentCompatible(SdaiInstance domainId,
SdaiPrimitiveType valueType,
...);
Arguments:
DomainId |
The instance Id of the data domain that assignment compatibility is to be checked against. |
ValueType |
The primitive type of the value to check for assignment compatibility. |
. . . |
The value to check for assignment compatibility. |
Returns:
sdaiTRUE if The value is assignment compatible. Otherwise sdaiFALSE.
EXAMPLE
SdaiEntity domainId;
SdaiBoolean isCompatible;
SdaiSchema schemaId,
SdaiInstance kid;
. . .
edmiGetEntityInSchemaBN("family", "woman", &domainId);
if (edmiIsAssignmentCompatible(domainId, sdaiINSTANCE, adultId) {
sdaiPutAttrBN(kid, "mother", sdaiINSTANCE, adultId);
} else {
sdaiPutAttrBN(kid, "father", sdaiINSTANCE, adultId);
}
. . .