]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/plist.tcc
07c1a0118f77ae6d0b67afbe3f36d2b05bac88d0
[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     {
15         delete c.remove_p();
16     }
17 }
18
19 template<class T>
20 PCursor<T> 
21 Link_list<T>::find (T what) const
22 {
23   PCursor<T> i (*this);
24   for (; i.ok(); i++)
25         if (i.ptr() == what)
26            break;
27   return i;    
28 }