FUNCTION using_items
(* SCHEMA STRUCTURAL_FRAME_SCHEMA; *)
(* New for LPM/6 - required for FUNCTION using_representations *)
FUNCTION using_items
(item : founded_item_select;
checked_items: SET OF founded_item_select)
: SET OF founded_item_select;
LOCAL
new_check_items : SET OF founded_item_select;
result_items : SET OF founded_item_select;
next_items : SET OF founded_item_select;
END_LOCAL;
result_items := [];
new_check_items := checked_items + item;
(* Find the set of representation_items or founded_items
in which item is used directly. *)
next_items := QUERY(z <* bag_to_set( USEDIN(item , '')) |
('STRUCTURAL_FRAME_SCHEMA.REPRESENTATION_ITEM' IN TYPEOF(z)) OR
('STRUCTURAL_FRAME_SCHEMA.FOUNDED_ITEM' IN TYPEOF(z)));
(* If the set of next_items is not empty; *)
IF SIZEOF(next_items) > 0 THEN
(* For each element in the set, find the using_items recursively *)
REPEAT i := 1 TO HIINDEX(next_items);
(* Check for loop in data model, i.e. one of the next_items
occurred earlier in the set of check_items; *)
IF NOT(next_items[i] IN new_check_items) THEN
result_items := result_items + next_items[i] +
using_items(next_items[i],new_check_items);
END_IF;
END_REPEAT;
END_IF;
(* return the set of representation_items or founded_items
in which the input item is used directly and indirectly. *)
RETURN (result_items);
END_FUNCTION; (* STEP Part 43 2nd Edition *)
Referenced By
Defintion using_items is references by the following definitions:
[Top Level Definitions] [Exit]Generated by STEP Tools® EXPRESS to HTML Converter
2023-03-25T00:11:39-04:00