7 template<class T> class Cursor;
8 template<class T> class Link;
17 /// construct empty list
20 /// construct list from first item.
21 List( const T& thing );
31 friend class Cursor<T>;
36 WARNING: contents lost, and not deleted.
39 /// add after after_me
40 void add( const T& thing, Cursor<T> after_me );
42 /// put thing before #before_me#
43 void insert( const T& thing, Cursor<T> before_me );
44 virtual void remove( Cursor<T> me );
46 Remove link pointed to by me.
49 none; WARNING: do not use #me#.
57 List can be seen as all items written down on paper,
60 class Cursor is used to extend List
62 items are always stored as copies in List, but:
63 #List<String># : copies of #String# stored
64 #List<String*># : copies of #String*# stored!
65 (do not use, use \Ref{PointerList}#<String*># instead.)
68 retrieving "invalid" cursors, i.e.
69 #top()/bottom()# from empty list, #find()# without success,
70 results in a nonvalid Cursor ( #!ok()# )
80 // instantiate a template: explicit instantiation.
81 #define L_instantiate(a) template class List<a>; template class Cursor<a>; \
82 template class Link<a>
85 #endif // __LIST_HH //