Application module: Support resource | ISO/TS 10303-1800:2014-02(E) © ISO |
(*
ISO TC184/SC4/WG12 N8059 - ISO/TS 10303-1800 Support resource - EXPRESS ARM
Supersedes
ISO TC184/SC4/WG12 N7472
*)
SCHEMA Support_resource_arm;
TYPE identifier =
STRING;
END_TYPE;
TYPE label =
STRING;
END_TYPE;
TYPE text =
STRING;
END_TYPE;
FUNCTION bag_to_set
(the_bag : BAG[0:?] OF GENERIC : intype) : SET[0:?] OF GENERIC : intype;
LOCAL the_set : SET OF GENERIC : intype := []; i : INTEGER; END_LOCAL; IF SIZEOF(the_bag)> 0 THEN REPEAT i := 1 TO HIINDEX(the_bag); the_set := the_set + the_bag[i]; END_REPEAT; END_IF; RETURN(the_set);
END_FUNCTION;
FUNCTION type_check_function
(the_type : GENERIC; sub_names : SET[0:?] OF STRING; criterion : INTEGER) : LOGICAL;
IF((NOT EXISTS(the_type)) OR (SIZEOF(sub_names)= 0)) THEN RETURN (UNKNOWN); ELSE CASE criterion OF 0: RETURN (SIZEOF(sub_names * TYPEOF(the_type))> 0); 1: RETURN (SIZEOF(sub_names * TYPEOF(the_type))= 0); 2: RETURN (SIZEOF(sub_names * TYPEOF(the_type))= 1); 3: RETURN(SIZEOF(sub_names * TYPEOF(the_type))<= 1); OTHERWISE : RETURN (UNKNOWN); END_CASE; END_IF;
END_FUNCTION;
END_SCHEMA; -- Support_resource_arm
© ISO 2014 — All rights reserved