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 »


 
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);
}
. . .

  • No labels