]> git.donarmstrong.com Git - lilypond.git/blob - lily/grace-iterator.cc
release: 1.1.51
[lilypond.git] / lily / grace-iterator.cc
1 /*   
2   grace-iterator.cc --  implement Grace_iterator
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #include "grace-iterator.hh"
11 #include "global-translator.hh"
12 #include "warn.hh"
13
14 void
15 Grace_iterator::construct_children () 
16 {
17   Translator_group * t = report_to_l ()->find_create_translator_l ("Grace", ""); // umgh.
18
19   if (t)
20     set_translator (t);
21   Music_wrapper_iterator::construct_children ();
22 }
23
24 void
25 Grace_iterator::do_process_and_next (Moment m)
26 {
27   Global_translator * t = dynamic_cast<Global_translator*>(report_to_l ());
28   if (t)
29     {
30       t->start ();
31       t->run_iterator_on_me (child_iter_p_);
32       delete child_iter_p_;
33       child_iter_p_ = 0;
34       t->finish ();
35       Music_iterator::do_process_and_next (m);
36     }
37   else
38     {
39       warning (_("No Grace context available!")); 
40     }
41 }
42
43 Moment
44 Grace_iterator::next_moment ()  const
45 {
46   return 0;
47 }