#1376 remove_deep_batched()

This commit is contained in:
Thomas Krijnen
2021-03-13 12:16:40 +01:00
parent 624e296d24
commit 5961253c29
4 changed files with 226 additions and 153 deletions
+8
View File
@@ -131,6 +131,11 @@ private:
void initialize_(IfcParse::IfcSpfStream* f);
void build_inverses_(IfcUtil::IfcBaseClass*);
std::set<int> batch_deletion_ids_;
bool batch_mode_ = false;
void process_deletion_();
public:
IfcParse::IfcSpfLexer* tokens;
IfcParse::IfcSpfStream* stream;
@@ -226,6 +231,9 @@ public:
IfcUtil::IfcBaseClass* addEntity(IfcUtil::IfcBaseClass* entity);
void addEntities(IfcEntityList::ptr es);
void batch() { batch_mode_ = true; }
void unbatch() { process_deletion_(); batch_mode_ = false; }
/// Removes entity instance from file and unsets references.
///
/// Attention when running removeEntity inside a loop over a list of entities to be removed.