Skip to main content

openbim_ifc_v0_1_model_purge

Function openbim_ifc_v0_1_model_purge 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn openbim_ifc_v0_1_model_purge( model: OpenbimIfcModel, classes: *const *const u8, class_lengths: *const usize, class_count: usize, flags: u32, nodes: *mut OpenbimIfcValueNode, node_capacity: usize, out_nodes_required: *mut usize, strings: *mut u8, string_capacity: usize, out_strings_required: *mut usize, ) -> OpenbimIfcStatus
Expand description

Purge unreferenced entities as one checked transaction. With class_count 0, every resource entity no IfcRoot reaches (nor annotates something reached); otherwise entities of the class_count classes (UTF-8 names of class_lengths[i] bytes, any case, subtypes included) that nothing references. flags: OPENBIM_IFC_PURGE_INCLUDE_ROOTS, OPENBIM_IFC_PURGE_INCLUDE_OWNER_HISTORY, OPENBIM_IFC_PURGE_DRY_RUN. The answer is a RemovalReport tape: removed (LIST of RemovedEntity: id REF, type name TEXT), kept (LIST of KeptEntity: id, type name, reason TEXT – shared, related-object, definition, protected – users LIST of REF), detached and rebased (LISTs of REF), applied (BOOL, false for a dry run). A size query or a short buffer plans the removal and answers BufferTooSmall without applying it.

UnsupportedSchema for a class the release does not declare; InvalidArgument for a class that is not UTF-8 or an unknown flag; FeatureDisabled.

§Safety

classes and class_lengths null (with class_count 0) or valid for class_count reads, each class valid for its length; the buffers as for openbim_ifc_v0_1_entity_attribute.