*** empty log message ***
[lilypond.git] / lily / staff-collecting-engraver.cc
blobf885cc6149a3260f1e4c2347d359d4551e76ec21
1 /*
2 staff-collecting-engraver.cc -- implement Staff_collecting_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2001--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
9 #include "staff-symbol.hh"
10 #include "engraver.hh"
11 #include "grob.hh"
12 #include "translator-group.hh"
14 class Staff_collecting_engraver : public Engraver
16 public:
17 TRANSLATOR_DECLARATIONS(Staff_collecting_engraver);
18 virtual void acknowledge_grob (Grob_info);
21 Staff_collecting_engraver::Staff_collecting_engraver ()
26 void
27 Staff_collecting_engraver::acknowledge_grob (Grob_info gi)
29 if (Staff_symbol::has_interface (gi.grob_))
31 SCM staffs = get_property ("stavesFound");
32 staffs = gh_cons (gi.grob_->self_scm (), staffs);
34 daddy_trans_->set_property ("stavesFound", staffs);
39 ENTER_DESCRIPTION(Staff_collecting_engraver,
40 /* descr */ "Maintain the stavesFound variable",
42 /* creats*/ "",
43 /* accepts */ "",
44 /* acks */ "staff-symbol-interface",
45 /* reads */ "stavesFound",
46 /* write */ "stavesFound");