1 // cursor.inl -*-c++-*-
9 Cursor<T>::Cursor( const List<T>& list, Link<T>* pointer ) :
10 list_((List<T>&) list )
13 pointer_ = pointer ? pointer : list.top_;
20 Cursor<T>::Cursor( const Cursor<T>& cursor ) :
23 pointer_ = cursor.pointer_;
28 Cursor<T>::operator *()
31 return pointer_->thing();
36 Cursor<T>::operator =( const Cursor<T>& c )
38 assert( &list_ == &c.list_ );
39 pointer_ = c.pointer_;
45 Cursor<T>::add( const T& thing )
47 list_.add( thing, *this );
52 Cursor<T>::insert( const T& thing )
54 list_.insert( thing, *this );
59 Cursor<T>::backspace()
63 list_.remove( *this );
72 list_.remove( *this );
78 Cursor<T>::list() const
94 return ( pointer_ != 0 );
101 return ( pointer_ != 0 );
108 return ( pointer_ != 0 );