mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 08:13:14 +00:00
IfcFile: possibility to mark an entity as modified so that potential cache is invalidated.
This commit is contained in:
committed by
Thomas Krijnen
parent
3bef32bb87
commit
000d11daab
@@ -1213,7 +1213,9 @@ void IfcEntityInstanceData::setArgument(unsigned int i, Argument* a, IfcUtil::Ar
|
||||
if (this->file) {
|
||||
register_inverse_visitor visitor(*this->file, *this);
|
||||
apply_individual_instance_visitor(copy).apply(visitor);
|
||||
}
|
||||
|
||||
this->file->mark_entity_as_modified(id_);
|
||||
}
|
||||
|
||||
if (i < attributes_.size()) {
|
||||
attributes_[i] = copy;
|
||||
@@ -1429,6 +1431,11 @@ IfcEntityList::ptr IfcFile::traverse(IfcUtil::IfcBaseClass* instance, int max_le
|
||||
return IfcParse::traverse(instance, max_level);
|
||||
}
|
||||
|
||||
void IfcFile::mark_entity_as_modified(int /*id*/)
|
||||
{
|
||||
by_ref_cached_.clear();
|
||||
}
|
||||
|
||||
void IfcFile::addEntities(IfcEntityList::ptr es) {
|
||||
for( IfcEntityList::it i = es->begin(); i != es->end(); ++ i ) {
|
||||
addEntity(*i);
|
||||
|
||||
Reference in New Issue
Block a user