]> git.donarmstrong.com Git - lilypond.git/blob - lily/audio-element-info.cc
bcae088b678bca9f3c4dfeda561d5f26c8bd6426
[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--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #include "audio-element-info.hh"
10
11 #include "translator-group.hh"
12 #include "context.hh"
13
14 Audio_element_info::Audio_element_info (Audio_element *s, Stream_event *r)
15 {
16   elem_ = s;
17   origin_trans_ = 0;
18   event_ = r;
19 }
20
21 Audio_element_info::Audio_element_info ()
22 {
23   elem_ = 0;
24   event_ = 0;
25   origin_trans_ = 0;
26 }
27
28 vector<Context*>
29 Audio_element_info::origin_contexts (Translator *end) const
30 {
31   Context *t = origin_trans_->context ();
32   vector<Context*> r;
33   do
34     {
35       r.push_back (t);
36       t = t->get_parent_context ();
37     }
38   while (t && t != end->context ());
39
40   return r;
41 }