Пример #1
0
 public bool MoveNext()
 {
     if (_queue.Size() > 0)
     {
         IteratorNode ctx = (IteratorNode)_queue.Top();
         T            val = ctx._curVal;
         if (ctx.Fetch())
         {
             _queue.UpdateTop();
         }
         else
         {
             _queue.Pop();
         }
         this._current = val;
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #2
0
 public bool MoveNext()
 {
     if (m_queue.Count > 0)
     {
         IteratorNode ctx = (IteratorNode)m_queue.Top;
         T            val = ctx.m_curVal;
         if (ctx.Fetch())
         {
             m_queue.UpdateTop();
         }
         else
         {
             m_queue.Pop();
         }
         this.m_current = val;
         return(true);
     }
     else
     {
         return(false);
     }
 }