Overview Schemas Index

ASSEMBLY_FEATURE_RELATIONSHIP_SCHEMA (jsdai.SAssembly_feature_relationship_schema)


FUNCTION unique_in_product_definition
          (item : representative_shape_representation) : BOOLEAN;

LOCAL
  local_p_d: SET  OF  product_definition := [];
  local_s_r: SET OF shape_representation := [];
  i : INTEGER;
  j : INTEGER;
END_LOCAL;
-- find product_definitions represented BY the input 
-- representative_shape_representation
  local_p_d := using_product_definition_of_shape_representation (item);
-- ERROR
  IF  (SIZEOF (local_p_d) <> 1) THEN  RETURN  (FALSE);
    ELSE
-- find shape_representation representing the product_definitions
    REPEAT  i := 1 TO  HIINDEX  (local_p_d);
      local_s_r := find_shape_representation_of_product_definition 
                   (local_p_d[i]);
      REPEAT j := 1 TO HIINDEX (local_s_r);
        IF (('REPRESENTATIVE_SHAPE_REPRESENTATION' IN TYPEOF (local_s_r[j])) 
             AND (local_s_r[j] :<>: item)) THEN RETURN  (FALSE);
        END_IF;
      END_REPEAT;
    END_REPEAT;
  END_IF;
  RETURN (TRUE);

END_FUNCTION; -- unique_in_product_definition

public class FUnique_in_product_definition
          public static Value run(SdaiContext _context, Value item)