mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 23:11:00 +00:00
file.reset_identity_cache() function for adv use cases
This commit is contained in:
@@ -366,6 +366,8 @@ private:
|
|||||||
batch_mode_ = true;
|
batch_mode_ = true;
|
||||||
}
|
}
|
||||||
void unbatch();
|
void unbatch();
|
||||||
|
|
||||||
|
void reset_identity_cache();
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WITH_IFCXML
|
#ifdef WITH_IFCXML
|
||||||
|
|||||||
@@ -2768,6 +2768,15 @@ void IfcParse::IfcFile::unbatch() {
|
|||||||
batch_deletion_ids_.clear();
|
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() {
|
void IfcParse::IfcFile::build_inverses() {
|
||||||
for (const auto& pair : *this) {
|
for (const auto& pair : *this) {
|
||||||
build_inverses_(pair.second);
|
build_inverses_(pair.second);
|
||||||
|
|||||||
Reference in New Issue
Block a user