lilypond-1.3.16
[lilypond.git] / lily / include / killing-cons.tcc
blobf6fcff7bd1946959e820a066b97ab2b5cb01cdd9
1 /*   
2   killing-cons.tcc -- declare Killing_cons
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
10 #ifndef KILLING_CONS_TCC
11 #define KILLING_CONS_TCC
13 #include "cons.hh"
15 template<class T>
16 Killing_cons<T>::~Killing_cons ()
18   delete car_;
21 template<class T>
22 void 
23 copy_killing_cons_list (Cons_list<T> &dest, Cons<T> *src) 
25   for (; src; src  = src->next_)
26     {
27       T *t = new T(*src->car_);
28       dest.append ( new Killing_cons<T> (t, 0));
29     }
32 template<class T>
33 void
34 clone_killing_cons_list (Cons_list<T> & dest, Cons<T> *src)
36   for (; src; src  = src->next_)
37     {
38       T *t = src->car_->clone ();
39       dest.append (new Killing_cons<T> (t, 0));      
40     }
43 #endif /* KILLING_CONS_TCC */