Versions Compared

Key

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

...

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

 Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an _EDMinterface_ error code. Use edmiGetErrorText to get the error text corresponding to the error code.
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,

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

 

Example

...

 

Code Block
languagecpp
 /*
 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 (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"