]> git.donarmstrong.com Git - lilypond.git/blob - lily/grace-iterator.cc
d68bcad7b37ff7a1aeb3bd3f0a4af39d76c0ee78
[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--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #include "grace-music.hh"
11 #include "grace-iterator.hh"
12
13
14 #include "global-context.hh"
15 #include "warn.hh"
16
17 void
18 Grace_iterator::process (Moment m)
19 {
20   Moment main;
21   main.main_part_ = - start_mom_.grace_part_ + m.grace_part_;
22   Music_wrapper_iterator::process (main);
23
24   /* We can safely do this, since \grace should always be inside
25      sequential.  */
26   descend_to_child (child_iter_->get_outlet ());
27 }
28
29 Moment
30 Grace_iterator::pending_moment () const
31 {
32   Moment cp =Music_wrapper_iterator::pending_moment ();
33
34   Moment pending;
35   pending.grace_part_ =  start_mom_.grace_part_ + cp.main_part_;
36
37   return pending;
38 }
39
40
41 IMPLEMENT_CTOR_CALLBACK (Grace_iterator);