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