- public:
- /** create cursor, set at top. The const part isn't true, actually, #list#
- surely isn't const, but I get tired of the warning messages. */
- Cursor (const List<T>& list, Link<T>* pointer = 0);
- /**
- Create an invalid cursor (pointing to nothing, associated with no list.)
- */
- Cursor();
- Cursor (const Cursor<T>& cursor);
-
- T& thing();
-
- /// return current T
- T& operator *() { return thing(); }
- operator T() { return thing(); }
- Cursor<T> operator =( const Cursor<T>& c);
-
- /// make cursor with #no# items back
- Cursor<T> operator -( int no) const;
-
- /// make cursor with #no# items further
- Cursor<T> operator +( int no) const;
- int operator -(Cursor<T> op) const;
- Cursor<T> operator -=(int);
- Cursor<T> operator +=(int);
- /// move one down
- void next();
- /// move one up.
- void previous();
- /// return current and move one down
- Cursor<T> operator ++( int);
+public:
+ /** create cursor, set at top. The const part isn't true, actually, #list#
+ surely isn't const, but I get tired of the warning messages. */
+ Cursor (const List<T>& list, Link<T>* pointer = 0);
+ /**
+ Create an invalid cursor (pointing to nothing, associated with no list.)
+ */
+ Cursor();
+ Cursor (const Cursor<T>& cursor);
+
+ T& thing();
+
+ /// return current T
+ T& operator *() { return thing(); }
+ operator T() { return thing(); }
+ Cursor<T> operator =( const Cursor<T>& c);
+
+ /// make cursor with #no# items back
+ Cursor<T> operator -( int no) const;
+
+ /// make cursor with #no# items further
+ Cursor<T> operator +( int no) const;
+ int operator -(Cursor<T> op) const;
+ Cursor<T> operator -=(int);
+ Cursor<T> operator +=(int);
+ /// move one down
+ void next();
+ /// move one up.
+ void previous();
+ /// return current and move one down
+ Cursor<T> operator ++( int);