Expand description
The assembled, queryable IFC schema.
§What this owns
Supertype chains, Part 21 positional attribute order, case-insensitive
lookup and defined-type alias resolution. They are not IFC concepts –
every EXPRESS schema serialized as Part 21 shares them – but this crate
answers them over its own declaration types, so decoding and querying a
bundled table needs no parser crate. The walks follow the same rules as
openbim_step::SchemaGraph (ISO 10303-21 §12.2.5.2 slot order,
case-folded lookup, bounded chains).
What is genuinely IFC here: which schema version a file declares (the
FILE_SCHEMA tokens), and each version’s independently bundled tables.
Parsing EXPRESS text (Schema::from_express) needs the opt-in express
feature. A schema can always be assembled from declarations:
use ifc_schema::{Attribute, EntityDef, Schema};
let schema = Schema::new(
"IFC4",
vec![
EntityDef::new("IfcRoot")
.with_attribute(Attribute::new("GlobalId", "IfcGloballyUniqueId")),
EntityDef::new("IfcWall")
.with_supertype("IfcRoot")
.with_attribute(Attribute::new("Name", "IfcLabel")),
],
Vec::new(),
);
assert!(schema.is_a("IFCWALL", "IfcRoot"));
assert_eq!(schema.attribute_names("IfcWall"), ["GlobalId", "Name"]);Structs§
- Schema
- An IFC schema: the entity and type tables, queryable.