FUNCTION field_in_table
(* SCHEMA presentation_definition_schema; *)
FUNCTION field_in_table (field : table_record_field_representation;
table : annotation_table_occurrence): BOOLEAN;
LOCAL
table_rep : table_representation;
symbol_rep_rel_set : SET OF symbol_representation_relationship;
mapped_item_set : SET OF mapped_item;
table_record_rep_set : SET OF table_record_representation := [];
END_LOCAL;
table_rep := table\styled_item.item\mapped_item.mapping_source.
mapped_representation;
mapped_item_set := QUERY(item <* table_rep.items |
('REPRESENTATION_SCHEMA.MAPPED_ITEM' IN
TYPEOF(item))
AND
('PRESENTATION_DEFINITION_SCHEMA.'+
'TABLE_RECORD_REPRESENTATION' IN
TYPEOF(item\mapped_item.mapping_source.
mapped_representation ))
);
REPEAT i := 1 TO HIINDEX(mapped_item_set);
table_record_rep_set := table_record_rep_set +
mapped_item_set[i].mapping_source.mapped_representation;
END_REPEAT;
symbol_rep_rel_set := bag_to_set (USEDIN(table_rep,
'REPRESENTATION_SCHEMA.'+
'REPRESENTATION_RELATIONSHIP.REP_1'));
REPEAT i := 1 TO HIINDEX(symbol_rep_rel_set);
table_record_rep_set := table_record_rep_set +
symbol_rep_rel_set[i]\representation_relationship.rep_2;
END_REPEAT;
IF SIZEOF(QUERY( table_record_rep <* table_record_rep_set |
-- (SIZEOF(QUERY( symbol_rep_rel <* USEDIN(table_record_rep,
-- 'PRESENTATION_DEFINITION_SCHEMA.'+
-- 'SYMBOL_REPRESENTATION_RELATIONSHIP.REP_1') |
-- symbol_rep_rel\representation_relationship.rep_2 :=: field
(SIZEOF(QUERY( rep_rel <* USEDIN(table_record_rep,
'REPRESENTATION_SCHEMA.'+
'REPRESENTATION_RELATIONSHIP.REP_1') |
('PRESENTATION_DEFINITION_SCHEMA.' +
'SYMBOL_REPRESENTATION_RELATIONSHIP' IN TYPEOF(rep_rel)) AND
(rep_rel.rep_2 :=: field)
)) > 0)
OR
(SIZEOF(QUERY(item <* table_record_rep.items |
('REPRESENTATION_SCHEMA.MAPPED_ITEM' IN
TYPEOF(item))
AND
(field :=: item\mapped_item.mapping_source.
mapped_representation )
)) > 0)
)) = 0 THEN
RETURN(FALSE);
END_IF;
RETURN(TRUE);
END_FUNCTION;
Referenced By
Defintion field_in_table is references by the following definitions:
[Top Level Definitions] [Exit]Generated by STEP Tools® EXPRESS to HTML Converter
2012-03-27T17:13:59-04:00