(*
   $Id$
   ISO TC184/SC4/WG12 N4050 - ISO/TS 10303-1701 Layout macro definition - EXPRESS ARM
   Supersedes ISO TC184/SC4/WG12 N3489
*)

SCHEMA Layout_macro_definition_arm; 

	USE FROM Fabrication_joint_arm;	-- ISO/TS 10303-1668

	SUBTYPE_CONSTRAINT printed_component_subtypes FOR Printed_component;  
	(ONEOF (Layout_macro_component,
	 Printed_connector_component));
	END_SUBTYPE_CONSTRAINT;  

	SUBTYPE_CONSTRAINT printed_part_template_subtypes FOR Printed_part_template;  
		 (ONEOF (Basic_multi_stratum_printed_part_template,
		Layout_macro_floor_plan_template,
		Printed_connector_template,
		Structured_printed_part_template));
	END_SUBTYPE_CONSTRAINT;

  ENTITY Layout_macro_component
    SUBTYPE OF (Printed_component);
      design_definition                       	: Layout_macro_definition;
      SELF\Printed_component.derived_from		: Layout_macro_floor_plan_template;
  END_ENTITY;

  ENTITY Layout_macro_definition
    SUBTYPE OF (Interconnect_module);
      floor_layout_view : Layout_macro_floor_plan_template;
    WHERE
      WR1 : NOT (EXISTS(SELF\Part_design_view.usage_view));
      WR2 : SIZEOF(USEDIN(SELF,
 'GENERIC_PRODUCT_OCCURRENCE_ARM.DEFINITION_BASED_PRODUCT_OCCURRENCE.DERIVED_FROM')) = 0;
  END_ENTITY;

  ENTITY Layout_macro_definition_terminal_to_usage_terminal_assignment;
      defined_template_feature : Printed_part_template_terminal;
      assigned_design_object   : fabricated_feature_select;
    WHERE
      WR1 : SIZEOF(USEDIN(SELF,
 'LAYOUT_MACRO_DEFINITION_ARM.LAYOUT_MACRO_FLOOR_PLAN_TEMPLATE.ACCESS_MAPS')) = 1;
  END_ENTITY;

  ENTITY Layout_macro_floor_plan_template
    SUBTYPE OF (Printed_part_template);
      access_maps : SET[1:?] OF Layout_macro_definition_terminal_to_usage_terminal_assignment;
    INVERSE
      macro_definition : SET[0:1] OF layout_macro_definition FOR floor_layout_view;
    WHERE
      WR1: SIZEOF(TYPEOF(SELF) - TYPEOF(SELF\Printed_part_template ||
                                 SELF\Template_definition ||
                                 SELF\Item_shape ||
                                 SELF\Product_view_definition ||
                                 SELF\Layout_macro_floor_plan_template)) = 0;
  END_ENTITY;


END_SCHEMA;
