Ema_Object_Attr_Nth()
Abstract
Obtains the attribute name of the "nth" attribute of the specified object.
Syntax
Ema_Object_Attr_Nth (model_id, object_id, index, attr_name)
| Argument | Type | Description |
|---|---|---|
model_id |
EmaT_Model_Id |
numeric model ID of the model containing the object of interest |
object_id |
EmaT_Object_Id |
numeric object ID of the object of interest |
index |
int |
numeric index of the attribute of interest |
attr_name |
char* |
character buffer that receives the name of the specified attribute; this buffer may then be used in a call to Ema_Object_Attr_Get() |
Return Type
VosT_Fun_Status
The status of the operation (VOSC_SUCCESS or VOSC_FAILURE)
Header
ema.h
Details
This function is useful as the method of obtaining the name of each attribute within loops that process all attributes of a specified object.
The model ID is a numeric identifier that references a model. It can be obtained from the functions Ema_Model_Create(), Ema_Model_Copy(), or Ema_Model_Read().
The object ID is a numeric identifier that references an object. It can be obtained from the functions Ema_Object_Create(), Ema_Object_Copy(), Ema_Object_Move(), Ema_Object_Move_Recursively(), or Ema_Object_Nth().
You should ensure that the buffer referenced by attr_name* is large enough to hold the attribute name; otherwise the resulting application may abort with a segmentation violation.