mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Purge by_ref_cached_
This commit is contained in:
committed by
Thomas Krijnen
parent
5ad6d455f9
commit
01bc29c5b2
@@ -135,7 +135,6 @@ private:
|
||||
entities_by_type_t bytype_excl;
|
||||
entities_by_ref_t byref;
|
||||
entities_by_ref_excl_t byref_excl;
|
||||
ref_map_t by_ref_cached_;
|
||||
entity_by_guid_t byguid;
|
||||
entity_entity_map_t entity_file_map;
|
||||
|
||||
@@ -265,10 +264,6 @@ public:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
/// Marks entity as modified so that potential cache for it is invalidated.
|
||||
/// @todo Currently the whole cache is invalidated. Implement more fine-grained invalidation.
|
||||
void mark_entity_as_modified(int id);
|
||||
|
||||
unsigned int FreshId() { return ++MaxId; }
|
||||
|
||||
unsigned int getMaxId() { return MaxId; }
|
||||
|
||||
@@ -1400,8 +1400,6 @@ void IfcEntityInstanceData::setArgument(size_t i, Argument* a, IfcUtil::Argument
|
||||
if (this->file) {
|
||||
register_inverse_visitor visitor(*this->file, *this);
|
||||
apply_individual_instance_visitor(copy, i).apply(visitor);
|
||||
|
||||
this->file->mark_entity_as_modified(id_);
|
||||
}
|
||||
|
||||
attributes_[i] = copy;
|
||||
@@ -1732,11 +1730,6 @@ aggregate_of_instance::ptr IfcFile::traverse_breadth_first(IfcUtil::IfcBaseClass
|
||||
return IfcParse::traverse_breadth_first(instance, max_level);
|
||||
}
|
||||
|
||||
void IfcFile::mark_entity_as_modified(int /*id*/)
|
||||
{
|
||||
by_ref_cached_.clear();
|
||||
}
|
||||
|
||||
void IfcFile::addEntities(aggregate_of_instance::ptr es) {
|
||||
for( aggregate_of_instance::it i = es->begin(); i != es->end(); ++ i ) {
|
||||
addEntity(*i);
|
||||
@@ -1984,10 +1977,6 @@ IfcUtil::IfcBaseClass* IfcFile::addEntity(IfcUtil::IfcBaseClass* entity, int id)
|
||||
build_inverses_(new_entity);
|
||||
}
|
||||
|
||||
// @todo the id isn't actually used here, but instead
|
||||
// clears the entire inverse cache map.
|
||||
mark_entity_as_modified(0);
|
||||
|
||||
return new_entity;
|
||||
}
|
||||
|
||||
@@ -2123,7 +2112,6 @@ void IfcFile::process_deletion_() {
|
||||
{
|
||||
byref_excl.erase(name);
|
||||
}
|
||||
by_ref_cached_.erase(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2216,8 +2204,6 @@ void IfcFile::process_deletion_() {
|
||||
}
|
||||
}
|
||||
|
||||
by_ref_cached_.clear();
|
||||
|
||||
batch_deletion_ids_.clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user