]> git.donarmstrong.com Git - lilypond.git/blob - lily/grace-iterator.cc
8ef15c7cf98f0fb1c9cef0de9fd3255751404f46
[lilypond.git] / lily / grace-iterator.cc
1 /*   
2   grace-music.cc -- implement Grace_music
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1999--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #include "grace-iterator.hh"
11 #include "global-context.hh"
12 #include "warn.hh"
13
14 void
15 Grace_iterator::process (Moment m)
16 {
17   Moment main;
18   main.main_part_ = - start_mom_.grace_part_ + m.grace_part_;
19   Music_wrapper_iterator::process (main);
20
21   /* We can safely do this, since \grace should always be inside
22      sequential.  */
23   descend_to_child (child_iter_->get_outlet ());
24 }
25
26 Moment
27 Grace_iterator::pending_moment () const
28 {
29   Moment cp = Music_wrapper_iterator::pending_moment ();
30
31   Moment pending;
32   pending.grace_part_ =  start_mom_.grace_part_ + cp.main_part_;
33
34   return pending;
35 }
36
37
38 IMPLEMENT_CTOR_CALLBACK (Grace_iterator);