- // cursor.inl
+ // cursor.inl -*-c++-*-
#ifndef CURSOR_INL
#define CURSOR_INL
#include <assert.h>
list_( list )
{
if ( list.size() )
- pointer_ = pointer ? pointer : list.top().pointer_;
+ pointer_ = pointer ? pointer : list.top_;
+ //list.top().pointer_; // ARGH! recursion.
else
pointer_ = pointer;
}
template<class T>
inline void
-Cursor<T>::remove()
+Cursor<T>::backspace()
{
- assert( pointer_ );
+ Cursor<T> c(*this);
+ c--;
list_.remove( *this );
}
+template<class T>
+inline void
+Cursor<T>::del()
+{
+ Cursor<T> c(*this);
+ c++;
+ list_.remove( *this );
+ *this = c;
+}
+
template<class T>
inline const List<T>&
Cursor<T>::list() const
return ( pointer_ != 0 );
}
-#endif
\ No newline at end of file
+#endif