]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/killing-cons.tcc
release: 1.1.35
[lilypond.git] / lily / include / killing-cons.tcc
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  */
9
10 #ifndef KILLING_CONS_TCC
11 #define KILLING_CONS_TCC
12
13 #include "cons.hh"
14
15 template<class T>
16 Killing_cons<T>::~Killing_cons ()
17 {
18   delete car_;
19 }
20
21 template<class T>
22 void 
23 copy_killing_cons_list (Cons_list<T> &dest, Cons<T> *src) 
24 {
25   for (; src; src  = src->next_)
26     {
27       T *t = new T(*src->car_);
28       dest.append ( new Killing_cons<T> (t, 0));
29     }
30 }
31
32 template<class T>
33 void
34 clone_killing_cons_list (Cons_list<T> & dest, Cons<T> *src)
35 {
36   for (; src; src  = src->next_)
37     {
38       T *t = src->car_->clone ();
39       dest.append (new Killing_cons<T> (t, 0));      
40     }
41 }
42
43 #endif /* KILLING_CONS_TCC */
44