...
Code Block | ||||
---|---|---|---|---|
| ||||
EdmiError edmiGetSubtypes(SdaiEntity entityId,
SdaiInteger options,
SdaiInteger *numberOfSubtypes,
SdaiEntity **subtypes);
|
Gets a list of the subtypes of a given entity.
...
The dictionary model containing the the specified entity definition must be opened before this operation can be successfully performed.
...
Arguments
...
Type | Name | Comment | |
SdaiEntity | entityId | The instanceID that uniquely identifies the instance of entity definition within a dictionary model in the EDMdatabase. | The entityID is returned by the sdaiGetEntity function. |
SdaiInteger | options | The <options> value should be one of the options described below. | The name of all <options> are defined in the header file sdai.h|
SdaiInteger | numberOfSubtypes | The number of subtypes found. | |
SdaiEntity | subtypes | Address of an array of entity-definition instances that specifies the returned subtypes. | The virtual memory holding the result of the operation is allocated by EXPRESS Data Manager, hence the application should free this memory when appropriate by invoking the edmiFree() operation to avoid "out of virtual memory". |
Return Value
...
Insert excerpt | ||
---|---|---|
|
|
Options
...
Option | Comment |
---|---|
DIRECT_SUBTYPES | Only the nearest subtypes will be included in the result.This is the default value of the <options> argument. |
ALL_SUBTYPES | Specifies that all entities that are subtypes of the actual entity are included in the result. |
...
Example
...
Code Block | ||
---|---|---|
| ||
EdmiError rstat; SdaiInteger numberOfsubtypes; SdaiEntity entityId,*subtypes; |
...
. . . |
...
if (rstat = edmiGetSubtypes(entityId, |
...
ALL_SUBTYPES, |
...
&numberOfsubtypes, |
...
&subtypes)) { |
...
/* Error in operation */ |
...
printf("\nError: %s in edmiGetSubtypes\n", |
...
edmiGetErrorText(rstat)); |
...
goto error; |
...
} /* Resulting data set is found in memory buffer at address returned |
...
in the <subtypes> variable */ |
...
. . . |
...
/* Release memory buffer when data is no longer needed */ |
...
edmiFree(subtypes); |
...
. . . |
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|