]> git.donarmstrong.com Git - lilypond.git/blob - lily/grob-info.cc
release: 1.5.29
[lilypond.git] / lily / grob-info.cc
1 /*
2   grob-info.cc -- implement Grob_info
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #include "grob-info.hh"
10 #include "request.hh"
11 #include "translator.hh"
12 #include "translator-group.hh"
13
14 Grob_info::Grob_info (Grob*s_l, SCM c)
15 {
16   grob_l_ = s_l;
17   cause_ = c; 
18   origin_trans_l_ = 0;  
19 }
20
21
22 Grob_info::Grob_info ()
23 {
24   grob_l_ = 0;
25   cause_ = SCM_EOL;
26   origin_trans_l_ = 0;
27 }
28
29 Music*
30 Grob_info::music_cause ()
31 {
32   return unsmob_music (cause_);
33 }
34
35 Link_array<Translator>
36 Grob_info::origin_trans_l_arr (Translator* end) const
37 {
38   Translator * t = origin_trans_l_;
39   Link_array<Translator> r;
40   do {
41     r.push (t);
42     t = t->daddy_trans_l_;
43   } while (t && t != end->daddy_trans_l_);
44   
45   return r;
46 }
47