Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
themeConfluence
SdaiBoolean edmiIsAssignmentCompatible(SdaiInstance      domainId,
                                        SdaiPrimitiveType valueType,
                                         ...);

Checks if a data type is asignment 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. Header:
#include "sdai.h"
Prototype:
SdaiBoolean edmiIsAssignmentCompatible(SdaiInstance      domainId,
                                        SdaiPrimitiveType valueType,
                                         ...);
Arguments:

Arguments

...

TypeNameComment
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

...

TypeComment
 SdaiBoolean sdaiTRUE if The value is assignment compatible. Otherwise sdaiFALSE.

...

Options

...

 

Example

...

 

Code Block
languagecpp
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

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"