edmiRemoteIsSubtypeOfBN

EdmiError edmiRemoteIsSubtypeOfBN(SdaiServerContext serverContextId,
                                    SdaiString        schemaName,
                                    SdaiString        subtypeEntityName,
                                    SdaiString        supertypeEntityName, 
                                    SdaiBoolean       *isSubtypeOf,
                                    SdaiInvocationId  *edmiInvocationId);


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.

Arguments


1TypeNameComment
2SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

3
SdaiString
schemaName
Specifies the name of the Express Schema in which the two instance types are defined. Schema names are case insensitive
4SdaiString

subtypeEntityName

The name of the assumed entity subtype.

5SdaiString

supertypeEntityName

The name of the assumed entity supertype.

6SdaiBoolean

isSubtypeOf

A variable that will receive sdaiTRUE if the entity <subtypeEntityId> is a subtype of the entity <supertypeEntityId>.

7SdaiInvocationId

edmiInvocationId

Currently not used.

 

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

 

Options


  

 

Example


 

 /*
 SCHEMA Relations 
 ENTITY Person; 
 PID : INTEGER; 
 Name : STRING; 
 END_ENTITY; 
  
 ENTITY Man SUBTYPE OF Person; 
 . . . 
 HasBeard : BOOLEAN; 
 . . . 
 END_ENTITY; 
  
 ENTITY Woman SUBTYPE OF Person; 
 . . . 
 HasGivenBirth : BOOLEAN; 
 . . . 
 END_ENTITY; 
 END_SCHEMA; 
 */
 EdmiError rstat;
 SdaiInteger nWrn, nErr;
 SdaiServerContext myContext;
 SdaiBoolean isSubType;
  
 /* Define Remote Server Context */
 rstat = edmiDefineServerContext("MyRemoteServerContext",
 "Johnny", "Supervisor", "cf37ftr", 
 "TCP", "9090", "MyServerHost", 
 NULL, NULL, NULL, NULL, NULL, &myContext); 
  
 /* Compile the schema */
 rstat = edmiRemoteDefineSchema(myContext, EXPRESS_SCHEMA_TYPE,
 "c:/data/Relations.exp", "c:/tmp/Relations.dia",  
 "Relations", 0, &nWrn, &nErr, NULL); 
  
 /* Is man subtype of person? */
 rstat = edmiRemoteIsSubtypeOfBN(myContext, "Relations",  
 "Man", "Person", &isSubType, NULL); 
  
 printf("\nMan is%s subtype of person",
 isSubType ? "" : "n't"); 
 . . .
  

 

See also

Filter by label

There are no items with the selected labels at this time.

 Â