ГОСТ Р ИСО 10303-43—2022
EXPRESS-спеииФикаиия:
item_in_context (item :representation_item, cntxt :representation
:BOOLEAN;
*)
FUNCTION
context)
LOCAL
у :BAG OF representation^tern;
END_LOCAL;
-- If there is one or more representation using both the item
-- and cntxt return true.
IF SIZEOF(USEDIN(item,’REPRESENTATION_SCHEMA.REPRESENTATION.ITEMS’)
* cntxt.representations_in_context) > 0 THEN
RETURN (TRUE);
-- Determine the bag of representation_items that reference
-- item
ELSE у := QUERY(z <* USEDIN (item , w ) |
’REPRESENTATION_SCHEMA.REPRESENTATION_ITEM’ IN TYPEOF(z));
-- Ensure that the bag is not empty
IF SIZEOF(y) > 0 THEN
-- For each element in the bag
REPEAT i := 1 TO HIINDEX(y);
item in the input cntxt.
cntxt) THEN
-- Check to see it is an
IF item_in_context(y[i],
RETURN (TRUE);
END_IF;
END_REPEAT;
END_IF;
END_IF;
-- Return false when all possible branches have been checked
-- with no success.
RETURN (FALSE);
END_FUNCTION;
(*
"
Определение параметров:
item — объект representationjtem, проверяемый на отношение с объектом, играющим роль па
раметра cntxt. Это — входной параметр функции;
cntxt — объект representation_context, взаимосвязь с которым проверяется. Это — входной па
раметр функции.
4.5.5Функция using_items
Функция using_items возвращает набор экземпляров объектов representationjtem или founded_
item, которые ссылаются прямо или косвенно на экземпляр объекта representationjtem, играющий
роль параметра item настоящей функции.
EXPRESS-спеииФикация:
(item : founded_item_select, checked_items :SET[0:?] OF
:SET[0:?] OF founded_item_select;
*)
FUNCTION using_items
founded_item_select)
LOCAL
: SET OF founded_item_select;
:SET OF founded_item_select;
: SET OF founded_item_select;
new_check_items
result_items
next_items
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.
28