]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/plist.tcc
release: 1.1.42
[lilypond.git] / flower / include / plist.tcc
1 /*
2   plist.tcc -- implement Pointer_list
3
4   source file of the Flower Library
5
6   (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef PLIST_TCC
11 #define PLIST_TCC
12
13 #include "plist.hh"
14
15 template<class T>
16 void
17 Pointer_list<T>::junk()
18 {
19   PCursor<T> c (*this);
20   while (c.ok()) 
21     {
22         delete c.remove_p();
23     }
24 }
25
26 #ifndef __CYGWIN32__ // ugh should check for some gcc/egcs version
27
28 #define POINTERLIST_INSTANTIATE(a) template class Pointer_list<a*>;\
29         template class PCursor<a*>;
30
31 #else
32
33 #define POINTERLIST_INSTANTIATE(T)\
34     static void force_junk##T ()\
35     {\
36     Pointer_list<T*> bla;\
37     bla.junk ();\
38     }
39
40 #endif
41
42 #endif // PLIST_TCC