file.reset_identity_cache() function for adv use cases

This commit is contained in:
Thomas Krijnen
2025-09-11 13:55:07 +02:00
parent 41f9b1522e
commit 9d99de2340
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -366,6 +366,8 @@ private:
batch_mode_ = true;
}
void unbatch();
void reset_identity_cache();
};
#ifdef WITH_IFCXML
+9
View File
@@ -2768,6 +2768,15 @@ void IfcParse::IfcFile::unbatch() {
batch_deletion_ids_.clear();
}
void IfcParse::IfcFile::reset_identity_cache() {
std::visit([](auto& x) {
if constexpr (std::is_same_v<std::decay_t<decltype(x)>, impl::rocks_db_file_storage>) {
x.instance_cache_.clear();
x.type_instance_cache_.clear();
}
}, storage_);
}
void IfcParse::IfcFile::build_inverses() {
for (const auto& pair : *this) {
build_inverses_(pair.second);