~ubuntu-branches/ubuntu/precise/lilypond/precise

« back to all changes in this revision

Viewing changes to lily/audio-element-info.cc

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Bushnell, BSG
  • Date: 2006-12-19 10:18:12 UTC
  • mfrom: (3.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061219101812-7awtjkp0i393wxty
Tags: 2.8.7-3
scripts/midi2ly.py: When setting DATADIR, find Lilypond python files
in the @TOPLEVEL_VERSION@ directory, not 'current'.  Patch thanks to
Chris Lamb (chris@chris-lamb.co.uk).  (Closes: #400550)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
  source file of the GNU LilyPond music typesetter
5
5
 
6
 
  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
6
  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
7
7
*/
8
8
 
9
9
#include "audio-element-info.hh"
 
10
 
10
11
#include "translator-group.hh"
11
12
#include "context.hh"
12
13
 
13
 
Audio_element_info::Audio_element_info (Audio_element*s, Music *r)
 
14
Audio_element_info::Audio_element_info (Audio_element *s, Music *r)
14
15
{
15
16
  elem_ = s;
16
 
  origin_trans_ =0;
 
17
  origin_trans_ = 0;
17
18
  event_ = r;
18
19
}
19
20
 
20
 
 
21
21
Audio_element_info::Audio_element_info ()
22
22
{
23
23
  elem_ = 0;
24
24
  event_ = 0;
25
 
  origin_trans_ =0;
 
25
  origin_trans_ = 0;
26
26
}
27
27
 
28
 
 
29
 
Link_array<Context>
30
 
Audio_element_info::origin_contexts (Translator* end) const
 
28
vector<Context*>
 
29
Audio_element_info::origin_contexts (Translator *end) const
31
30
{
32
 
  Context * t = origin_trans_->daddy_context_;
33
 
  Link_array<Context> r;
34
 
  do {
35
 
    r.push (t);
36
 
    t = t->daddy_context_;
37
 
  } while (t && t != end->daddy_context_);
38
 
  
 
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
 
39
40
  return r;
40
41
}