5 template<class T> class Cursor;
6 template<class T> class Link;
8 /** all-purpose doubly linked list.
10 List can be seen as all items written down on paper,
13 class Cursor is used to extend List
15 items are always stored as copies in List, but:
16 #List<String># : copies of #String# stored
17 #List<String*># : copies of #String*# stored!
18 (do not use, use \Ref{Link_list} #<String*># instead.)
21 retrieving "invalid" cursors, i.e.
22 #top()/bottom ()# from empty list, #find ()# without success,
23 results in a nonvalid Cursor ( #!ok()#)
33 List (List const&src);
35 /// construct empty list
41 Cursor<T> bottom() const; // const sucks.
42 Cursor<T> top() const;
44 void OK() const; // check list
48 friend class Cursor<T>;
51 void concatenate (List<T> const &s);
59 contents lost, and not deleted.
63 void add (T const & thing, Cursor<T> &after_me);
65 /// put thing before #before_me#
66 void insert (T const & thing, Cursor<T> &before_me);
68 /** Remove link pointed to by me. Destructor of contents called
75 WARNING: do not use #me# after calling
77 void remove (Cursor<T> me);
90 #endif // __LIST_HH //