Input/Output The return value belongs to the enumerated typestm_element_type
. This type has the following values corresponding to the Rational Statemate element types:
To list all the conditions appearing in the Definition field for the conditionC1
, generate a list of elements (of type mixed) using the query functionstm_r_mx_in_definition_of_co
. Elements in this list are all the elements (not necessarily conditions) appearing in the Definition field of the conditionC1
. Search this list for conditions and if any are found, print them.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));
}
.
.
.