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++)
57 \item if #after_me# is #ok()#, add after #after_me#, else
58 \item if list !empty simply add to bottom, else
59 \item list is empty: create first \Ref{Link} and initialize
65 List<T>::add( T const & thing, Cursor<T> &after_me )
67 if (!size_) { // not much choice if list is empty
68 bottom_ = top_ = new Link<T>( thing );
71 } else { // add at aprioprate place
74 Link<T> *p =after_me.pointer();
76 if (p == bottom_) // adjust bottom_ if necessary.
85 List<T>::insert( T const & thing, Cursor<T> &before_me )
88 bottom_ = top_ = new Link<T>( thing );
96 Link<T> *p = before_me.pointer() ;
100 top_ = p->previous();
109 List<T>::concatenate(List<T> const&s)
111 Cursor<T> b(bottom());
112 for (Cursor<T> c(s); c.ok(); c++) {