...
Code Block | ||||
---|---|---|---|---|
| ||||
EdmiError edmiGetAttrPrimitiveType(SdaiAttr attributeId,
SdaiPrimitiveType *dataType);
|
Returns the primitive type of the data value that can be assigned to the specified attribute in an instance of a type that contains this attribute.
Info |
---|
...
In this context an attributeID also represents a view_entity attributeID. |
The dictionary model that defines the specified attribute must be open before this function can be successfully performed.
...
Arguments
...
Type | Name | Comment | |
SdaiAttr | attributeId | A numeric attributeID that uniquely identifies the attribute definition instance in the EDMdatabase. | The attributeID is returned from the sdaiGetAttrDefinition and sdaiGetAttrDefinitionBN functions. |
SdaiPrimitiveType | dataType | Address of the variable that will receive the legal primitive type of data value that can be assigned to the specified attribute. |
...
Return Value
...
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Options
...
Example
...
Code Block | ||
---|---|---|
| ||
EdmiError rstat; SdaiAttr attributeId; SdaiPrimitiveType dataType; . . . if (rstat = edmiGetAttrPrimitiveType(attributeId, &dataType)) { /* Error in operation */ printf("\nError: %s in edmiGetAttrPrimitiveType\n", |
...
edmiGetErrorText(rstat)); |
...
goto error; |
...
} switch (dataType) { |
...
case sdaiINTEGER: |
...
. . . |
...
break; |
...
case sdaiREAL: |
...
. . . |
...
break; |
...
case sdaiSTRING: |
...
. . . |
...
break; |
...
case sdaiBOOLEAN: |
...
. . . |
...
break; |
...
case sdaiLOGICAL: |
...
. . . |
...
break; |
...
case sdaiBINARY: |
...
. . . |
...
break; |
...
case sdaiENUMERATION: |
...
. . . |
...
break; |
...
case sdaiINSTANCE: |
...
. . . |
...
break; |
...
case sdaiAGGR: |
...
. . . |
...
break; |
...
case sdaiADB: |
...
. . . |
...
break; |
...
default: |
...
/* Unknown value */ |
...
}
. . . |
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|