edmiIsAssignmentCompatible
SdaiBoolean edmiIsAssignmentCompatible(SdaiInstance domainId,
SdaiPrimitiveType valueType,
...);
Checks if a data type is assignment 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.
Arguments
Type | Name | Comment |
SdaiInstance | DomainId | The instance Id of the data domain that assignment compatibility is to be checked against. |
SdaiPrimitiveType | ValueType | The primitive type of the value to check for assignment compatibility. |
| . . . | The value to check for assignment compatibility. |
Return Value
Type | Comment |
SdaiBoolean | sdaiTRUE if The value is assignment compatible. Otherwise sdaiFALSE. |
Options
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);
}
. . .
See also