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