Schema: General_model_parameter_arm



SCHEMA General_model_parameter_arm;

USE FROM Class_arm;    -- ISO/TS 10303-1070

USE FROM Classification_assignment_arm;    -- ISO/TS 10303-1114

USE FROM External_class_arm;    -- ISO/TS 10303-1275

USE FROM Foundation_representation_arm;    -- ISO/TS 10303-1006

USE FROM Independent_property_arm;    -- ISO/TS 10303-1036

USE FROM Independent_property_representation_arm;    -- ISO/TS 10303-1038

USE FROM Parameter_value_specification_arm;    -- ISO/WD 10303-1470

USE FROM Property_assignment_arm;    -- ISO/TS 10303-1030


TYPE gmp_classification_item = SELECT BASED_ON classification_item WITH
   (Constrained_general_parameter_relationship,
    General_model_parameter,
    Parameter_value_representation_item);
END_TYPE;

ENTITY Constrained_general_parameter_relationship
  SUBTYPE OF (Independent_property_relationship);
  SELF\Independent_property_relationship.relating : General_model_parameter;
  SELF\Independent_property_relationship.related : General_model_parameter;
  required_class : Class;
WHERE
  WR1: (required_class.id IN CLASSOF(related)) AND (required_class.id IN CLASSOF(relating));
END_ENTITY;

ENTITY General_model_parameter
  SUBTYPE OF (Independent_property);
END_ENTITY;

ENTITY Parameter_value_representation_item
  SUBTYPE OF (Representation_item);
  parameter_value : parameter_value_select;
END_ENTITY;

FUNCTION CLASSOF
 (the_instance : GENERIC_ENTITY : ininst) : SET OF STRING;
  LOCAL
    result : SET OF STRING;
    classifications : BAG OF Classification_assignment;
  END_LOCAL;

  result := TYPEOF(the_instance);
  classifications := USEDIN(the_instance,'GENERAL_MODEL_PARAMETER_ARM.CLASSIFICATION_ASSIGNMENT.ITEMS');

  REPEAT i := LOINDEX(classifications) TO HIINDEX(classifications);
    result := result + classifications[i].ASSIGNED_CLASS.ID;
  END_REPEAT;

  RETURN (result);
	
END_FUNCTION;

END_SCHEMA;  -- General_model_parameter_arm