2 interpretation-context-handle.cc -- implement Interpretation_context_handle
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "interpretation-context-handle.hh"
10 #include "translator-group.hh"
12 Interpretation_context_handle::Interpretation_context_handle ()
17 Interpretation_context_handle::Interpretation_context_handle (Interpretation_context_handle
const&s
)
24 Interpretation_context_handle
*
25 Interpretation_context_handle::clone () const
27 Interpretation_context_handle
* handle
= new Interpretation_context_handle
;
28 handle
->report_to_
= this->report_to_
;
32 Interpretation_context_handle::~Interpretation_context_handle ()
40 with GC, this is asynchronous.
45 Interpretation_context_handle::up (Translator_group
*t
)
48 t
->iterator_count_
++;
52 Interpretation_context_handle::down ()
54 report_to_
->iterator_count_
--;
59 Interpretation_context_handle::quit ()
61 if (report_to_
) report_to_
->iterator_count_
--;
66 Interpretation_context_handle::try_music (Music
*m
)
68 return report_to_
->try_music (m
);
72 Interpretation_context_handle::operator = (Interpretation_context_handle
const &s
)
74 set_translator (s
.report_to_
);
78 Interpretation_context_handle::set_translator (Translator_group
*trans
)
80 if (report_to_
==trans
)
89 Interpretation_context_handle::report_to ()const