]> git.donarmstrong.com Git - lilypond.git/blob - flower/pcursor.hh
release: 0.0.3
[lilypond.git] / flower / pcursor.hh
1
2
3 /// cursor which feels like a pointer
4 template<class T>
5 struct PCursor : public Cursor<T> {
6
7     /// make cursor with #no# items back
8     PCursor<T> operator -( int no) const {
9         return PCursor<T> (Cursor<T>::operator-(no));
10     }
11
12     /// make cursor with #no# items further
13     PCursor<T> operator +( int no) const {
14         return PCursor<T> (Cursor<T>::operator+(no));
15     }
16     PCursor(List<T> & l) : Cursor<T> (l) {}
17
18     PCursor( const Cursor<T>& cursor ) : Cursor<T>(cursor) { }
19     T operator ->() { return  *(*this); }
20
21 };
22 /**
23  HWN: I'd like an operator->(), so here it is.
24
25  Cursor to go with pointer list.
26  */