lilypond-1.3.130
[lilypond.git] / lily / grace-iterator.cc
blobb0c89c921431dea216b5c1819f607f8f33decfc9
1 /*
2 grace-iterator.cc -- implement Grace_iterator
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
10 #include "grace-iterator.hh"
11 #include "global-translator.hh"
12 #include "warn.hh"
14 Grace_iterator::~Grace_iterator ()
16 // child_iter_p_ = 0;
19 void
20 Grace_iterator::construct_children ()
22 Translator_group * t = report_to_l ()->find_create_translator_l ("Grace", ""); // umgh.
24 if (t)
25 set_translator (t);
26 Music_wrapper_iterator::construct_children ();
29 void
30 Grace_iterator::process (Moment)
32 Global_translator * t = dynamic_cast<Global_translator*>(report_to_l ());
33 if (t)
35 t->start ();
36 t->run_iterator_on_me (child_iter_p_);
37 delete child_iter_p_;
38 child_iter_p_ = 0;
39 t->finish ();
41 else
43 warning (_("no Grace context available"));
47 Moment
48 Grace_iterator::pending_moment () const
50 return 0;
54 IMPLEMENT_CTOR_CALLBACK(Grace_iterator);