Generic iterator class.
Generic iterator class. This class represents a position in an arbitrary container It provides a generic way to iterate over the objects contained in a container. This is achieved with the following code:GArray<int> a; GList<GString> l; for (GPosition pos=a.firstpos(); pos; ++pos) l.append(a[pos]); for (GPosition pos=l.lastpos(); pos; --pos) printf("%d\n", l[pos]);A GPosition object remains meaningful as long as you do not modify the contents of the underlying container. You should not use a GPosition that was initialized before modifying the contents of container object. Undetermined results may occur (as they say...)
GPosition(const GContainerBase &gc)
operator int()
int operator !()
GPosition& operator ++()
GPosition& operator --()
Alphabetic index HTML hierarchy of classes or Java