Ets_Topo_Parent_Attr_Get()
Abstract
Obtains the value of a top-level attribute, given an object handle and attribute name.
Syntax
Ets_Topo_Parent_Attr_Get (child_obj_hndl, attr_name, result_value_ptr)
| Argument | Type | Description |
|---|---|---|
child_obj_hndl |
EtsT_Obj_Handle |
Handle to child object. |
attr_name |
const char * |
Name of top-level attribute of interest. |
result_value_ptr |
void * |
Value of the attribute of interest. (See Ets_Obj_Attr_Get() on page 958 for details about this argument.) |
Return Type
EtsT_Compcode
EtsC_Compcode_Success if the attribute value is obtained; EtsC_Compcode_Failure otherwise.
Header
ets_api_topo.h
Details
Use this function to obtain the value of a top-level attribute when you are using active attributes.
Normally, you would use a combination of Ets_Topo_Parent_Get() and Ets_Obj_Attr_Get() to obtain, first, an attribute’s parent object and then, the attribute’s value. However, for top-level attributes, Ets_Topo_Parent_Get() returns a handle to the original object instead of the working copy of the object. As a result, changes to the value of a top-level attribute are made to the original object and won’t be reflected immediately in the GUI. This function avoids that problem by operating on the working copy of the object.
Note: For situations not involving a top-level attribute and active attributes, the combination of Ets_Topo_Parent_Get() and Ets_Obj_Attr_Get() is more efficient and should be used instead of Ets_Topo_Parent_Attr_Get().