Skip to main content

exact_property_sets_where

Function exact_property_sets_where 

Source
pub fn exact_property_sets_where<S>(
    model: &Model,
    object: EntityId,
    select_set: S,
) -> Result<Vec<ExactPropertySetEntry>, ExactPropertyError>
where S: FnMut(&str) -> bool,
Expand description

The property sets and quantity sets of object whose names select_set picks, empty ones included (#186).

exact_properties_where lists properties, so a selected set with no members leaves no trace in its answer. This lists the sets themselves: an IDS property facet must fail on a matching set that is empty, and it can tell that case from “no such set” only here. An empty result is a proven absence of every selected set.

The traversal, model and assignment validation and refusals are those of exact_properties_where; every member of a selected set is validated, though none is resolved. One difference: a set whose HasProperties or Quantities is () or $ is listed with members == 0. The schema declares both SET [1:?], so exact_properties_where refuses such a set as ExactPropertyError::MalformedAggregate; here the question is only whether the set exists, and it does. Occurrence sets come first, then the sets inherited from the object’s IfcTypeObject, each in assignment order. A type set is listed even when an occurrence set has the same name: overriding works per property, so both sets exist for the object. A queried IfcTypeObject lists its own HasPropertySets with ExactSource::Type of object (#193).

§Errors

Any ExactPropertyError, as for exact_properties_where; in particular two selected sets of one name on one source are ExactPropertyError::DuplicateMatchingSets.