2002->2003
[lilypond.git] / lily / grob-info.cc
blobd3a6378206ec04706d2b0c8561567be204ba62b2
1 /*
2 grob-info.cc -- implement Grob_info
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
9 #include "grob.hh"
10 #include "grob-info.hh"
11 #include "music.hh"
12 #include "translator-group.hh"
14 Grob_info::Grob_info (Grob*s)
16 grob_ = s;
17 origin_trans_ = 0;
21 Grob_info::Grob_info ()
23 grob_ = 0;
24 origin_trans_ = 0;
27 Music*
28 Grob_info::music_cause ()
31 SCM cause = grob_->get_grob_property ("cause");
32 return unsmob_music (cause);
35 Link_array<Translator>
36 Grob_info::origin_transes (Translator* end) const
38 Translator * t = origin_trans_;
39 Link_array<Translator> r;
40 do {
41 r.push (t);
42 t = t->daddy_trans_;
43 } while (t && t != end->daddy_trans_);
45 return r;