]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/plist.tcc
release: 0.1.8
[lilypond.git] / flower / include / plist.tcc
1 #include "plist.hh"
2
3 #define PL_INSTANTIATE(a) class Link_list<a*>; \
4         template class PCursor<a*>;
5 #define IPL_INSTANTIATE(a) PL_INSTANTIATE(a); \
6         template class Pointer_list<a*>
7         
8 template<class T>
9 void
10 Pointer_list<T>::junk()
11 {
12     PCursor<T> c (*this);
13     while (c.ok()) {
14         delete c.remove_p();
15     }
16 }
17
18 template<class T>
19 PCursor<T> 
20 Link_list<T>::find (T what) const
21 {
22     PCursor<T> i (*this);
23     for (; i.ok(); i++)
24         if (i.ptr() == what)
25            break;
26     return i;    
27 }