1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//! `ifc-cost` — cost semantics as a **view** over the model.
//!
//! # This crate owns no data
//!
//! It borrows a `&Model` and interprets entities that happen to be cost
//! entities. That is the whole design: the model stores structure, this crate
//! supplies meaning, and the two are separable.
//!
//! The consequences are the point:
//!
//! - **Optional.** An application that never touches cost compiles none of
//! this. It is a cargo feature of the `ifc` facade crate.
//! - **Non-destructive.** Because the model holds the same entities with or
//! without this crate, a file with cost data round-trips identically in
//! either build. Verified in `ifc/tests/costing_roundtrip.rs`, which runs
//! with no domain crate compiled at all.
//! - **Replaceable.** A different interpretation of the same entities is
//! another crate, not a fork of the model.
//!
//! # Modules
//!
//! | Module | Role |
//! | --- | --- |
//! | [`view`] | [`CostView`]: the entry point, borrows a `&Model` |
//! | [`item`] | `IfcCostItem`: the individual line |
//! | [`schedule`] | `IfcCostSchedule`: the containing document |
//! | [`value`] | `IfcCostValue` and applied monetary values |
//! | [`quantity`] | Quantities a cost is computed against |
//! | [`relation`] | Nesting and control assignment |
//! | [`mutation`] | Transaction-staged bounded IFC4 authoring; release-bound quantities |
//! | [`currency`] | Monetary unit agreement |
//! | [`rollup`] | Summing a cost tree |
//! | [`error`] | Why a cost lookup failed |
//!
//! ```
//! use ifc_cost::CostView;
//! use ifc_model::{Entity, EntityId, Model, Value};
//!
//! let mut model = Model::new();
//! model.insert(
//! EntityId(1),
//! Entity::new("IFCCOSTITEM", vec![
//! Value::Text("guid".into()), Value::Null, Value::Text("Excavation".into()),
//! ]),
//! );
//!
//! let view = CostView::new(&model);
//! assert_eq!(view.items().next().unwrap().name(), Some("Excavation"));
//! ```
pub use ;
pub use CostError;
/// The IFC release a release-bound authoring error names (re-exported from
/// `ifc-schema`).
pub use SchemaVersion;
pub use CostItem;
pub use ;
pub use CostQuantity;
pub use ;
pub use ;
pub use CostSchedule;
pub use ;
pub use CostView;