#include "translator.icc"
-using std::vector;
-
struct Grob_pq_entry
{
Grob *grob_;
TRANSLATOR_DECLARATIONS (Grob_pq_engraver);
protected:
virtual void initialize ();
- DECLARE_ACKNOWLEDGER (grob);
+ void acknowledge_grob (Grob_info);
void start_translation_timestep ();
void stop_translation_timestep ();
void process_acknowledged ();
vector<Grob_pq_entry> started_now_;
};
-Grob_pq_engraver::Grob_pq_engraver ()
+Grob_pq_engraver::Grob_pq_engraver (Context *c)
+ : Engraver (c)
{
}
void
Grob_pq_engraver::process_acknowledged ()
{
- vector_sort (started_now_, std::less<Grob_pq_entry> ());
+ vector_sort (started_now_, less<Grob_pq_entry> ());
SCM lst = SCM_EOL;
SCM *tail = &lst;
for (vsize i = 0; i < started_now_.size (); i++)
busy = scm_cdr (busy);
}
- if (start_busy != busy)
+ if (!scm_is_eq (start_busy, busy))
context ()->set_property ("busyGrobs", busy);
}
-ADD_ACKNOWLEDGER (Grob_pq_engraver, grob);
+void
+Grob_pq_engraver::boot ()
+{
+ ADD_ACKNOWLEDGER (Grob_pq_engraver, grob);
+}
+
ADD_TRANSLATOR (Grob_pq_engraver,
/* doc */
"Administrate when certain grobs (e.g., note heads) stop"