ifc_element_type/lib.rs
1//! Element, resource, and process type definitions.
2//!
3//! An IFC model separates what a thing *is* from where it sits. The
4//! type definition carries the shared description: a pump type names
5//! the pump model, and every pump placed from it inherits that.
6//!
7//! This crate owns the 132 concrete `IfcTypeObject` subtypes. They
8//! sit in one crate because they are one uniform shape with one
9//! shared WHERE rule, not because they are one domain: the list
10//! spans HVAC, structure, furniture, resources and processes.
11//! Splitting them across domain crates would copy the same rule and
12//! the same slot table into a dozen places.
13//!
14//! The catalogue in [`table`] is generated from the schema by
15//! `scripts/gen-element-types.py`; [`create_type`] is the writer. It takes
16//! no model and writes the catalogue's IFC4X3 layout; [`create_type_in`]
17//! and [`create_type_with_owner_history`] write the model's declared
18//! release, which IFC2X3 needs for its required `OwnerHistory` (#202).
19
20mod authoring;
21mod error;
22mod release;
23mod supertype;
24pub mod table;
25
26pub use authoring::{
27 create_type, create_type_in, create_type_with_owner_history, Slot6, TypeDraft,
28};
29pub use error::{ElementTypeError, ElementTypeResult};
30pub use supertype::{
31 create_supertype, create_supertype_in, create_supertype_with_owner_history, SupertypeDraft,
32 SupertypeKind, ALL_SUPERTYPES, BUILT_ELEMENT_TYPE, CIVIL_ELEMENT_TYPE, DEEP_FOUNDATION_TYPE,
33 DISTRIBUTION_ELEMENT_TYPE, FURNISHING_ELEMENT_TYPE, TYPE_OBJECT, TYPE_PRODUCT,
34};
35pub use table::{ElementType, Family, ALL};