lilypond-0.0.32
[lilypond.git] / flower / list.inl
blobdf0687b7c8b5b28e71cfd47ad96fbbd64b7caf8e
1 // -*-c++-*-
3 #ifndef LIST_INL
4 #define LIST_INL
6 template<class T>
7 inline
8 List<T>::List()
10     set_empty();
13 template<class T>
14 inline void
15 List<T>::set_empty()
17     top_ = bottom_ = 0;
18     size_ = 0;
21 template<class T>
22 inline void
23 List<T>::remove( Cursor<T> me )
25     if ( me.ok() ){
26         Link<T> *lp = me.pointer();     
27         lp->remove(*this);
28         delete lp;
29         size_--;
30     }
33 template<class T>
34 inline int
35 List<T>::size() const
36
37     return size_;
40 template<class T>
41 inline Cursor<T>
42 List<T>::top()const
44     return Cursor<T>( *this, top_ );
48 template<class T>
49 inline Cursor<T>
50 List<T>::bottom()const
52     return Cursor<T>( *this, bottom_ );
56 #endif