public void Reset() { currentEntityLabel = 0; currentModelIndex = 0; XbimModel first = models.FirstOrDefault(); if (first != null) { cache = first.Cache; this.cursor = cache.GetEntityTable(); cursor.MoveBeforeFirst(); } }
bool IEnumerator.MoveNext() { int label; if (cursor.TryMoveNextLabel(out label)) { currentEntityLabel = label; return(true); } else if (currentModelIndex < models.Count - 1) //we have more models to process { currentModelIndex++; //go to next model cache.FreeTable(cursor); cache = models[currentModelIndex].Cache; this.cursor = cache.GetEntityTable(); cursor.MoveBeforeFirst(); if (cursor.TryMoveNextLabel(out label)) { currentEntityLabel = label; return(true); } } return(false); }
public XbimInstancesEntityEnumerator(IfcPersistedInstanceCache cache) { this.cache = cache; this.cursor = cache.GetEntityTable(); Reset(); }