Skip to main content

ifc_cost/
mutation.rs

1//! Transaction-staged cost authoring.
2//!
3//! The quantity writer (#190), the cost item and schedule writers and
4//! their relationships (#202), and `assign_cost_quantities` (#203) bind the
5//! model's declared release (IFC2X3, IFC4 or IFC4X3) and lay their records
6//! out by attribute name, as `ifc-properties` does. IFC2X3 requires
7//! `IfcRoot.OwnerHistory`: the `IfcRoot` writers that leave it unset refuse
8//! an IFC2X3 model, and their `*_with_owner_history` variants take a
9//! caller-supplied one. The cost value, currency and monetary-unit writers
10//! bind the release too (#213), so each record has its release's arity.
11//!
12//! Assigning cost items to their schedule is authored here; assigning a cost
13//! item to the products it prices is deliberately read-only
14//! ([`crate::relation::controlled_by`]). Validating that an arbitrary target
15//! is an `IfcObjectDefinition` needs the schema's inheritance tables, which
16//! this crate reads only for the quantity layout.
17#![deny(missing_docs)]
18
19mod control;
20mod datetime;
21mod draft;
22mod error;
23mod quantity;
24mod release;
25mod validate;
26mod value;
27
28pub use control::{
29    assign_schedule_items, assign_schedule_items_with_owner_history, create_cost_item,
30    create_cost_item_with_owner_history, create_cost_schedule,
31    create_cost_schedule_with_owner_history, nest_cost_items, nest_cost_items_with_owner_history,
32};
33pub use datetime::{CalendarDate, DateTimeValue, LocalTime};
34pub use draft::{
35    CostItemDraft, CostItemType, CostScheduleDraft, CostScheduleType, CostValueDraft,
36    CostValueKind, NestingDraft, ScheduleAssignmentDraft,
37};
38pub use error::{CostAuthoringError, CostAuthoringResult};
39pub use quantity::{assign_cost_quantities, create_quantity, QuantityDraft, QuantityKind};
40pub use value::{create_cost_value, create_currency_relationship, create_monetary_unit};