]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/plist.icc
b8d3a48091e44b88b3287c367759e1f6659b9b56
[lilypond.git] / flower / include / plist.icc
1 /* -*-c++-*-
2   plist.icc -- part of flowerlib
3
4   (c) 1996, 1997--1999 Han-Wen Nienhuys& Jan Nieuwenhuizen
5 */
6
7 #ifndef PLIST_INL
8 #define PLIST_INL
9
10 template<class T>
11 inline void
12 PL_copy (Pointer_list<T*> &to, Pointer_list<T*> const&src)
13 {
14   for (PCursor<T*> pc (src); pc.ok(); pc++) 
15     {
16         T *q = pc;
17         T *p=new T(*q) ; 
18         to.bottom().add (p);
19     }
20 }
21
22
23 template<class T>
24 inline PCursor<T> 
25 Link_list<T>::find (T what) const
26 {
27   PCursor<T> i (*this);
28   for (; i.ok(); i++)
29         if (i.ptr() == what)
30            break;
31   return i;    
32 }
33 #endif