]> git.donarmstrong.com Git - lilypond.git/blob - lily/audio-element-info.cc
* lily/include/translator.hh (class Translator): rename
[lilypond.git] / lily / audio-element-info.cc
1 /*
2   Audio-element-info.cc -- implement Audio_element_info
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #include "audio-element-info.hh"
10 #include "translator-group.hh"
11 #include "context.hh"
12
13 Audio_element_info::Audio_element_info (Audio_element*s, Music *r)
14 {
15   elem_ = s;
16   origin_trans_ =0;
17   event_ = r;
18 }
19
20
21 Audio_element_info::Audio_element_info ()
22 {
23   elem_ = 0;
24   event_ = 0;
25   origin_trans_ =0;
26 }
27
28
29 Link_array<Context>
30 Audio_element_info::origin_contexts (Translator* end) const
31 {
32   Context * t = origin_trans_->context ();
33   Link_array<Context> r;
34   do {
35     r.push (t);
36     t = t->get_parent_context ();
37   } while (t && t != end->context ());
38   
39   return r;
40 }