5 template<class T> class Cursor;
6 template<class T> class Link;
8 /// all-purpose doubly linked list
15 /// construct empty list
25 friend class Cursor<T>;
28 void concatenate(List<T> const &s);
34 WARNING: contents lost, and not deleted.
37 /// add after after_me
38 void add( const T& thing, Cursor<T> &after_me );
40 /// put thing before #before_me#
41 void insert( const T& thing, Cursor<T> &before_me );
42 virtual void remove( Cursor<T> me );
44 Remove link pointed to by me.
47 none; WARNING: do not use #me#.
55 List can be seen as all items written down on paper,
58 class Cursor is used to extend List
60 items are always stored as copies in List, but:
61 #List<String># : copies of #String# stored
62 #List<String*># : copies of #String*# stored!
63 (do not use, use \Ref{PointerList} #<String*># instead.)
66 retrieving "invalid" cursors, i.e.
67 #top()/bottom()# from empty list, #find()# without success,
68 results in a nonvalid Cursor ( #!ok()# )
78 // instantiate a template: explicit instantiation.
79 #define L_instantiate(a) template class List<a>; template class Cursor<a>; \
80 template class Link<a>
83 #endif // __LIST_HH //