pub struct CostValue<'m> { /* private fields */ }Expand description
A borrowed view of an IfcCostValue entity.
Implementations§
Source§impl<'m> CostValue<'m>
impl<'m> CostValue<'m>
Sourcepub fn new(id: EntityId, entity: &'m Entity) -> Self
pub fn new(id: EntityId, entity: &'m Entity) -> Self
Wrap an entity known to be an IfcCostValue.
Sourcepub fn description(&self) -> Option<&'m str>
pub fn description(&self) -> Option<&'m str>
The value’s description.
Sourcepub fn amount(&self) -> Option<f64>
pub fn amount(&self) -> Option<f64>
The directly stated amount.
None for a composed value that states only Components. Use
CostValue::component_refs and CostValue::operator for those, or
CostValue::is_composed to tell the two shapes apart.
Sourcepub fn measure(&self) -> Option<&'m str>
pub fn measure(&self) -> Option<&'m str>
The measure type wrapping the applied value, e.g. IFCMONETARYMEASURE.
A cost value is not required to be monetary: IfcAppliedValueSelect
also admits ratios and plain measures. Reporting the wrapper lets a
caller refuse to add a ratio to a currency.
Sourcepub fn is_monetary(&self) -> bool
pub fn is_monetary(&self) -> bool
Whether the applied value is a monetary measure.
Sourcepub fn applicable_date(&self) -> Option<&'m str>
pub fn applicable_date(&self) -> Option<&'m str>
The date from which the value applies, as authored.
Sourcepub fn fixed_until_date(&self) -> Option<&'m str>
pub fn fixed_until_date(&self) -> Option<&'m str>
The date after which the value no longer holds, as authored.
Sourcepub fn operator(&self) -> Option<ArithmeticOperator>
pub fn operator(&self) -> Option<ArithmeticOperator>
How this value’s components combine, if stated.
Sourcepub fn component_refs(&self) -> Vec<EntityId>
pub fn component_refs(&self) -> Vec<EntityId>
Ids of the nested IfcAppliedValue components, in file order.
Order is preserved because it is the only ordering information the file carries, and an order-sensitive operator needs it.
Sourcepub fn is_composed(&self) -> bool
pub fn is_composed(&self) -> bool
Whether this value is composed from components rather than stated.
Sourcepub fn unit_basis(&self, model: &Model) -> Option<UnitBasis>
pub fn unit_basis(&self, model: &Model) -> Option<UnitBasis>
The rate basis, if this value is a rate rather than a lump sum.
Resolves the IfcMeasureWithUnit: slot 0 is ValueComponent, slot 1
is UnitComponent.