5 // instantiate a template: explicit instantiation.
6 #define L_instantiate(a) template class List<a>; template class Cursor<a>; \
12 List<T>::List(List const&src)
15 // probably el stupido
16 for (Cursor<T> c(src); c.ok(); c++)
63 \item if #after_me# is #ok()#, add after #after_me#, else
64 \item if list !empty simply add to bottom, else
65 \item list is empty: create first \Ref{Link} and initialize
71 List<T>::add( T const & thing, Cursor<T> &after_me )
73 if (!size_) { // not much choice if list is empty
74 bottom_ = top_ = new Link<T>( thing );
77 } else { // add at aprioprate place
80 Link<T> *p =after_me.pointer();
82 if (p == bottom_) // adjust bottom_ if necessary.
91 List<T>::insert( T const & thing, Cursor<T> &before_me )
94 bottom_ = top_ = new Link<T>( thing );
102 Link<T> *p = before_me.pointer() ;
106 top_ = p->previous();
115 List<T>::concatenate(List<T> const&s)
117 Cursor<T> b(bottom());
118 for (Cursor<T> c(s); c.ok(); c++) {