Skip to main content

ifc_control/
lib.rs

1//! Bounded IFC control semantics: permits, project orders, action
2//! requests, and performance history.
3//!
4//! This crate owns the `IfcControl` subtypes that govern work rather
5//! than describe physical form. It stages them into a transaction and
6//! validates what the schema states; it does not implement approval
7//! workflow, authorization, or policy decisions, which are the
8//! concern of whatever system issues the permit.
9//!
10//! Controls relate to the work they govern through
11//! `IfcRelAssignsToControl`. The crate owning the relating control
12//! writes that relationship, so this crate stages it for its own four
13//! controls and refuses any other.
14//!
15//! Records are laid out by attribute name from one release's table
16//! (#198). `IfcRoot.OwnerHistory` is required in IFC2X3 and optional from
17//! IFC4 on, so the writers that leave it unset refuse IFC2X3 with
18//! [`ControlError::AuthoringRequired`]; the `*_with_owner_history`
19//! variants bind the model's declared release and take a caller-supplied
20//! `IfcOwnerHistory` (#202).
21//!
22//! [`read_control`] and [`read_controls`] read the four controls back as
23//! borrowed [`Control`] views, by attribute name in the same declared
24//! release, together with the [`ControlAssignment`]s that govern work
25//! (#100). A record that does not fit its release is refused, never read
26//! as absent.
27//!
28//! `IfcCostItem`, `IfcCostSchedule`, `IfcWorkCalendar` and
29//! `IfcWorkControl` are `IfcControl` subtypes too, but they belong to
30//! `ifc-cost` and `ifc-schedule`: the crates split by domain, not by
31//! supertype, so those entities do not move here.
32
33mod assignment;
34mod authoring;
35mod error;
36mod read;
37mod release;
38
39pub use assignment::{
40    assign_to_control, assign_to_control_with_owner_history, ControlAssignmentDraft,
41};
42pub use authoring::{create_control, create_control_with_owner_history, ControlDraft, ControlKind};
43pub use error::{ControlError, ControlResult};
44pub use read::{read_control, read_controls, Control, ControlAssignment};