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

« back to all changes in this revision

Viewing changes to lily/staff-collecting-engraver.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:
1
 
/*   
2
 
staff-collecting-engraver.cc --  implement Staff_collecting_engraver
3
 
 
4
 
source file of the GNU LilyPond music typesetter
5
 
 
6
 
(c) 2001--2004  Han-Wen Nienhuys <hanwen@cs.uu.nl>
7
 
 
8
 
 */
 
1
/*
 
2
  staff-collecting-engraver.cc -- implement Staff_collecting_engraver
 
3
 
 
4
  source file of the GNU LilyPond music typesetter
 
5
 
 
6
  (c) 2001--2006  Han-Wen Nienhuys <hanwen@xs4all.nl>
 
7
*/
 
8
 
9
9
#include "staff-symbol.hh"
10
10
#include "engraver.hh"
11
11
#include "grob.hh"
12
12
#include "context.hh"
13
13
 
14
 
 
15
14
class Staff_collecting_engraver : public Engraver
16
15
{
17
16
public:
18
17
  TRANSLATOR_DECLARATIONS (Staff_collecting_engraver);
19
 
  virtual void acknowledge_grob (Grob_info);
 
18
  DECLARE_ACKNOWLEDGER (staff_symbol);
20
19
};
21
20
 
22
21
Staff_collecting_engraver::Staff_collecting_engraver ()
23
22
{
24
 
  
25
23
}
26
24
 
27
25
void
28
 
Staff_collecting_engraver::acknowledge_grob (Grob_info gi)
 
26
Staff_collecting_engraver::acknowledge_staff_symbol (Grob_info gi)
29
27
{
30
 
  if (Staff_symbol::has_interface (gi.grob_))
31
 
    {
32
 
      SCM staffs = get_property ("stavesFound");
33
 
      staffs = gh_cons (gi.grob_->self_scm (), staffs);
 
28
  SCM staffs = get_property ("stavesFound");
 
29
  staffs = scm_cons (gi.grob ()->self_scm (), staffs);
34
30
 
35
 
      daddy_context_->set_property ("stavesFound", staffs);
36
 
    }
 
31
  context ()->set_property ("stavesFound", staffs);
37
32
}
38
33
 
39
 
 
40
 
ENTER_DESCRIPTION (Staff_collecting_engraver,
41
 
/* descr */       "Maintain the stavesFound variable",
42
 
 
43
 
/* creats*/       "",
44
 
/* accepts */     "",
45
 
/* acks  */      "staff-symbol-interface",
46
 
/* reads */       "stavesFound",
47
 
/* write */       "stavesFound");
 
34
#include "translator.icc"
 
35
ADD_ACKNOWLEDGER (Staff_collecting_engraver, staff_symbol);
 
36
 
 
37
ADD_TRANSLATOR (Staff_collecting_engraver,
 
38
                /* doc */ "Maintain the stavesFound variable",
 
39
 
 
40
                /* create */ "",
 
41
                /* accept */ "",
 
42
                /* read */ "stavesFound",
 
43
                /* write */ "stavesFound");