FUNCTION representations_mapped_into
(rep : representation) : SET [0:?] OF representation;
LOCAL results : SET OF representation := []; rm : SET OF representation_map; mi : SET OF mapped_item := []; END_LOCAL; -- Find SET OF representation_maps which specify the representation rm := bag_to_set(USEDIN(rep, 'REPRESENTATION_SCHEMA.' + 'REPRESENTATION_MAP.MAPPED_REPRESENTATION')); -- Find the SET OF mapped_items that USE each representation_map REPEAT i := 1 TO HIINDEX(rm); mi := mi + rm[i].map_usage; END_REPEAT; -- Find the SET OF representations that USE each mapped_item REPEAT j := 1 TO HIINDEX(mi); results := results + USEDIN(mi[j],'REPRESENTATION_SCHEMA.' + 'REPRESENTATION.ITEMS'); END_REPEAT; RETURN(results); END_FUNCTION; -- representations_mapped_into
|