From: fred Date: Sun, 12 Jan 1997 19:57:30 +0000 (+0000) Subject: flower-1.0.20 X-Git-Tag: release/1.5.59~6413 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2dbf7c6b5a6a3c9571f5ae250efa23d22dc19bbd;p=lilypond.git flower-1.0.20 --- diff --git a/flower/plist.hh b/flower/plist.hh index 0aedfba60b..f5913c1299 100644 --- a/flower/plist.hh +++ b/flower/plist.hh @@ -24,7 +24,8 @@ class PointerList : public List void concatenate(PointerList const &s) { List::concatenate(s); } PointerList() {} }; -/** This class does no deletion of the pointers, but it knows how to +/** + This class does no deletion of the pointers, but it knows how to copy itself (shallow copy). We could have derived it from List, but this design saves a lot of code dup; for all PointerLists in the program only one parent List is instantiated. */ @@ -47,6 +48,7 @@ struct IPointerList : public PointerList { You have to copy this yourself, or use the macro PointerList__copy */ + #define IPointerList__copy(T, to, from, op) \ for (PCursor _pc_(from); _pc_.ok(); _pc_++)\ to.bottom().add(_pc_->op)\ @@ -57,8 +59,10 @@ template void PL_copy(IPointerList &dst,IPointerList const&src); -#define PL_instantiate(a) template class PointerList -#define IPL_instantiate(a) PL_instantiate(a); template class IPointerList +#define PL_instantiate(a) template class PointerList; \ + template class PCursor; +#define IPL_instantiate(a) PL_instantiate(a); \ + template class IPointerList #include "plist.inl"