Esempio n. 1
0
        public void Reset()
        {
            currentEntityLabel = 0;
            currentModelIndex  = 0;
            XbimModel first = models.FirstOrDefault();

            if (first != null)
            {
                cache       = first.Cache;
                this.cursor = cache.GetEntityTable();
                cursor.MoveBeforeFirst();
            }
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public XbimInstancesEntityEnumerator(IfcPersistedInstanceCache cache)
 {
     this.cache  = cache;
     this.cursor = cache.GetEntityTable();
     Reset();
 }