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