]> git.donarmstrong.com Git - lilypond.git/blob - flower/lib/include/link.hh
6f9c75a4110fb4ae95ed5c1e4b13d52f649aad6c
[lilypond.git] / flower / lib / include / link.hh
1 // link.hh
2
3 #ifndef __LINK_HH
4 #define __LINK_HH
5 template<class T>
6 class List;
7
8
9 /// class for List 
10 template<class T>
11 class Link
12 {
13 //    friend class Cursor<T>;
14 public:    
15     Link( const T& thing );
16     
17     Link<T>* previous();
18     Link<T>* next();
19
20     /// put new Link item after me in list
21     void add( const T& thing );
22     /// put new Link item before me in list
23     void insert( const T& thing );      
24     void remove(List<T> &l);
25     
26     T& thing();
27     void OK() const;
28 private:    
29     Link( Link<T>* previous, Link<T>* next, const T& thing );
30
31     T thing_;
32     Link<T>* previous_;
33     Link<T>* next_;
34 };
35
36 #include "link.inl"
37
38 #endif // __LINK_HH //