Single-Element Functions : List of Functions : stm_r_element_type

stm_r_element_type
Returns the element type of the specified element.
Function Type
stm_element_type
For Elements
All types
Syntax
stm_r_element_type (id, &status)
Arguments
 
Input/Output
Status Codes
Return Values
The return value belongs to the enumerated type stm_element_type. This type has the following values corresponding to the Rational Statemate element types:
Example
To list all the conditions appearing in the Definition field for the condition C1, generate a list of elements (of type mixed) using the query function stm_r_mx_in_definition_of_co. Elements in this list are all the elements (not necessarily conditions) appearing in the Definition field of the condition C1. Search this list for conditions and if any are found, print them.
The program contains the following statements:

stm_id cond_id;
stm_list elmnt_list, co_list;
stm_id el;
stm_element_type el_type;
int status;
.
.
cond_id = stm_r_co ("C1", &status);
co_list = stm_list_create (cond_id, end_of_list,
&status);
elmnt_list = stm_r_mx_in_definition_of_co (co_list,
&status);
for (el = (stm_id)
stm_list_first_element (elmnt_list, &status);
status == stm_success;
el = (stm_id)
stm_list_next_element (elmnt_list, &status))
{
el_type = stm_r_element_type (el, &status);
if (el_type == stm_condition)
printf ("\n Condition Name:%s",
stm_r_co_name (el, &status));
}
.
.
.