Compile fix.
[lilypond.git] / lily / staff-collecting-engraver.cc
blob6e4c5ad8098892e9f1a5bc936d67e52ce5e10d0b
1 /*
2 staff-collecting-engraver.cc -- implement Staff_collecting_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2001--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #include "staff-symbol.hh"
10 #include "engraver.hh"
11 #include "grob.hh"
12 #include "context.hh"
14 class Staff_collecting_engraver : public Engraver
16 public:
17 TRANSLATOR_DECLARATIONS (Staff_collecting_engraver);
18 DECLARE_ACKNOWLEDGER (staff_symbol);
19 DECLARE_END_ACKNOWLEDGER (staff_symbol);
22 Staff_collecting_engraver::Staff_collecting_engraver ()
26 void
27 Staff_collecting_engraver::acknowledge_staff_symbol (Grob_info gi)
29 SCM staffs = get_property ("stavesFound");
30 staffs = scm_cons (gi.grob ()->self_scm (), staffs);
32 context ()->set_property ("stavesFound", staffs);
35 void
36 Staff_collecting_engraver::acknowledge_end_staff_symbol (Grob_info gi)
38 SCM staffs = get_property ("stavesFound");
39 staffs = scm_delq (gi.grob ()->self_scm (), staffs);
41 context ()->set_property ("stavesFound", staffs);
44 #include "translator.icc"
46 ADD_ACKNOWLEDGER (Staff_collecting_engraver, staff_symbol);
47 ADD_END_ACKNOWLEDGER (Staff_collecting_engraver, staff_symbol);
49 ADD_TRANSLATOR (Staff_collecting_engraver,
50 /* doc */
51 "Maintain the @code{stavesFound} variable.",
53 /* create */
54 "",
56 /* read */
57 "stavesFound ",
59 /* write */
60 "stavesFound "