IfcTable

IfcTable

实体定义

IfcTable是用于以行和列的形式提供信息的数据结构。每个实例可以有IfcTableColumn实例,用于定义每个列的名称、描述和单位。信息行存储为IfcTableRow对象列表。

 

限制:为了向后兼容,IfcTable对象的行被约束为具有相同数量的单元格。表格的第一行提供了单元格的数量。所有其他行都必须包含相同数量的单元格。这由WR2执行。

 

下图说明了表格的使用。

 

 

下图描述了IFC4之前表格的结构。

 

 

 

IFC1.5中的新实体。

IFC4 添加了列属性。

 

Formal Propositions

RuleDescription
WR1 Ensures that each row defines the same number of cells. The rule compares whether all other rows of the IfcTable have the same number of cells as the first row.
WR2 The rule restricts the allowed number of heading rows to no more than one.
 

 

 

 

Attribute inheritance

#AttributeTypeCardinalityDescriptionC
IfcTable
1 Name IfcLabel [0:1]   X
2 Rows IfcTableRow L[1:?] Reference to information content of rows. X
3 Columns IfcTableColumn L[1:?] The column information associated with this table. X
  NumberOfCellsInRow
:=HIINDEX(Rows[1].RowCells)
IfcInteger [1:1] The number of cells in each row, this complies to the number of columns in a table. See WR2 that ensures that each row has the same number of cells. The actual value is derived from the first member of the Rows list. X
  NumberOfHeadings
:=SIZEOF(QUERY( Temp <* Rows | Temp.IsHeading))
IfcInteger [1:1] The number of headings in a table. This is restricted by WR3 to max. one. X
  NumberOfDataRows
:=SIZEOF(QUERY( Temp <* Rows | NOT(Temp.IsHeading)))
IfcInteger [1:1] The number of rows in a table that contains data, i.e. total number of rows minus number of heading rows in table. X
 

EXPRESS Specification

ENTITY IfcTable;
  Name : OPTIONAL IfcLabel;
  Rows : OPTIONAL LIST [1:?] OF IfcTableRow;
  Columns : OPTIONAL LIST [1:?] OF IfcTableColumn;
 DERIVE
  NumberOfCellsInRow : IfcInteger := HIINDEX(Rows[1].RowCells);
  NumberOfHeadings : IfcInteger := SIZEOF(QUERY( Temp <* Rows | Temp.IsHeading));
  NumberOfDataRows : IfcInteger := SIZEOF(QUERY( Temp <* Rows | NOT(Temp.IsHeading)));
 WHERE
  WR1 : SIZEOF(QUERY( Temp <* Rows | HIINDEX(Temp.RowCells) <> HIINDEX(Rows[1].RowCells))) = 0;
  WR2 : { 0 <=

 

 

###############

posted @ 2022-12-31 18:04  西北逍遥  阅读(23)  评论(0编辑  收藏  举报