3 pcursor.hh -- part of flowerlib
5 (c) 1996 Han-Wen Nienhuys&Jan Nieuwenhuizen
12 /// cursor which feels like a pointer
14 struct PCursor : public Cursor<T> {
16 /// make cursor with #no# items back
17 PCursor<T> operator -( int no) const {
18 return PCursor<T> (Cursor<T>::operator-(no));
21 /// make cursor with #no# items further
22 PCursor<T> operator +( int no) const {
23 return PCursor<T> (Cursor<T>::operator+(no));
25 PCursor(const List<T> & l) : Cursor<T> (l) {}
27 PCursor( const Cursor<T>& cursor ) : Cursor<T>(cursor) { }
28 T operator ->() { return *(*this); }
32 I like operator->(), so here it is.
34 Cursor to go with pointer list.