+class pkgAcquire::UriIterator
+{
+ pkgAcquire::Queue *CurQ;
+ pkgAcquire::Queue::QItem *CurItem;
+
+ public:
+
+ // Advance to the next item
+ inline void operator ++() {operator ++();};
+ void operator ++(int)
+ {
+ CurItem = CurItem->Next;
+ while (CurItem == 0 && CurQ != 0)
+ {
+ CurItem = CurQ->Items;
+ CurQ = CurQ->Next;
+ }
+ };
+
+ // Accessors
+ inline pkgAcquire::ItemDesc const *operator ->() const {return CurItem;};
+ inline bool operator !=(UriIterator const &rhs) const {return rhs.CurQ != CurQ || rhs.CurItem != CurItem;};
+ inline bool operator ==(UriIterator const &rhs) const {return rhs.CurQ == CurQ && rhs.CurItem == CurItem;};
+
+ UriIterator(pkgAcquire::Queue *Q) : CurQ(Q), CurItem(0)
+ {
+ while (CurItem == 0 && CurQ != 0)
+ {
+ CurItem = CurQ->Items;
+ CurQ = CurQ->Next;
+ }
+ }
+};
+