IFC 4.3.0.0 (IFC4X3) final

5.1.6.1 IfcCorrectObjectAssignment

5.1.6.1.1 Semantic definition

This function checks, whether the correct object types are used within the IfcRelAssigns relationship (or one of its subtypes).

5.1.6.1.2 Formal representation

FUNCTION IfcCorrectObjectAssignment
  (Constraint: IfcObjectTypeEnum; Objects : SET[1:?] OF IfcObjectDefinition)
  : LOGICAL ;
  
LOCAL
  Count : INTEGER := 0;
END_LOCAL;

    IF NOT(EXISTS(Constraint)) THEN 
      RETURN(TRUE);
    END_IF;
  
    CASE Constraint OF
      IfcObjectTypeEnum.NOTDEFINED : RETURN(TRUE);
      IfcObjectTypeEnum.PRODUCT :
        BEGIN
          Count := SIZEOF(QUERY(temp <* Objects | NOT('IFC4X3.IFCPRODUCT' IN TYPEOF(temp))));
          RETURN(Count = 0);
        END;
      IfcObjectTypeEnum.PROCESS :
        BEGIN
          Count := SIZEOF(QUERY(temp <* Objects | NOT('IFC4X3.IFCPROCESS' IN TYPEOF(temp))));
          RETURN(Count = 0);
        END;
      IfcObjectTypeEnum.CONTROL :
        BEGIN
          Count := SIZEOF(QUERY(temp <* Objects | NOT('IFC4X3.IFCCONTROL' IN TYPEOF(temp))));
          RETURN(Count = 0);
        END;
      IfcObjectTypeEnum.RESOURCE :
        BEGIN
          Count := SIZEOF(QUERY(temp <* Objects | NOT('IFC4X3.IFCRESOURCE' IN TYPEOF(temp))));
          RETURN(Count = 0);
        END;
      IfcObjectTypeEnum.ACTOR :
        BEGIN
          Count := SIZEOF(QUERY(temp <* Objects | NOT('IFC4X3.IFCACTOR' IN TYPEOF(temp))));
          RETURN(Count = 0);
        END;
      IfcObjectTypeEnum.GROUP :
        BEGIN
          Count := SIZEOF(QUERY(temp <* Objects | NOT('IFC4X3.IFCGROUP' IN TYPEOF(temp))));
          RETURN(Count = 0);
        END;
      IfcObjectTypeEnum.PROJECT :
        BEGIN
          Count := SIZEOF(QUERY(temp <* Objects | NOT('IFC4X3.IFCPROJECT' IN TYPEOF(temp))));
          RETURN(Count = 0);
        END;
      OTHERWISE : RETURN(?);
    END_CASE;

END_FUNCTION;

5.1.6.1.3 References