Application module: Support resource | ISO/TS 10303-1800:2014-02(E) © ISO |
This clause specifies the information requirements for the Support resource application module. The information requirements are specified as the Application Reference Model (ARM) of this application module.
NOTE 1 A graphical representation of the information requirements is given in Annex C.
NOTE 2 The mapping specification is specified in 5.1. It shows how the information requirements are met by using common resources and constructs defined or imported in the MIM schema of this application module.
This clause defines the information requirements to which implementations shall conform using the EXPRESS language as defined in ISO 10303-11. The following begins the Support resource schema.
EXPRESS specification:
*)
SCHEMA Support_resource_arm;
(*
This subclause specifies the ARM types for this application module. The ARM types and definitions are specified below.
An identifier is a string suitable for identifying some product data.
NOTE An identifier may or may not have a natural-language meaning.
EXAMPLE In the context of a product, a part number or serial number would be an example of an identifier.
EXPRESS specification:
*)
TYPE
identifier =
STRING;
END_TYPE;
(*
A label is an alphanumeric string that represents the human-interpretable name of something and shall have a natural-language meaning.
EXAMPLE 'Smith', 'Widget Inc.', and 'Materials Test Laboratory' are examples of labels.
EXPRESS specification:
*)
TYPE
label =
STRING;
END_TYPE;
(*
EXPRESS specification:
*)
TYPE
text =
STRING;
END_TYPE;
(*
This subclause specifies the ARM functions for this module. The ARM functions and definitions are specified below.
It returns the Set containing all elements of specified Bag.
EXPRESS specification:
*)
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;
(*
Argument definitions:
the_bag: the bag that needs to be converted.
Depending on the value of criterion, it returns TRUE if:
NOTE 1 If sub_names contains the entity names of all the subtypes of a particular entity data type, this case can be used to ensure that no instance of the supertype exists.
NOTE 2 If sub_names contains the entity names of subtypes of a particular entity data type, this function can be used to ensure that no instance of these subtypes exists.
NOTE 3 If sub_names contains the entity names of all the subtypes of a particular entity data type, this function can be used to ensure that no complex entity instance of subtypes of the entity exists and that only instances of subtypes of the entity exist.
NOTE 4 The concept of complex entity instance is defined in ISO 10303-11.
NOTE 5 If sub_names contains the entity names of subtypes of a particular entity data type, this function can be used to ensure that no complex entity instance of these subtypes of the entity exists.
EXPRESS specification:
*)
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;
(*
Argument definitions:
the_type: the instance whose data type is checked.
sub_names: the set of names of the entity data types that are candidates for the type of the_type.
criterion: an integer value which is checked.
*)
END_SCHEMA; -- Support_resource_arm
(*
© ISO 2014 — All rights reserved