      1  #include "itemiterator.h"
      2
      3  ItemIterator::ItemIterator(vector<Item*>& its)
      4     : items(its)
      5  {
      6     pos = 0;
      7  }
      8
      9  Item* ItemIterator::get() const
     10  {
     11     if (pos < items.size())
     12        return items[pos];
     13     else
     14        return NULL;
     15  }
     16
     17  bool ItemIterator::is_done() const
     18  {
     19     return pos >= items.size();
     20  }