void
Engraver::announce_end_grob (Grob_info inf)
{
+ inf.start_end_ = STOP;
get_daddy_engraver ()->announce_grob (inf);
}
-/*
- CAUSE is the object (typically a Stream_event object) that
- was the reason for making E.
-*/
-void
-Engraver::announce_grob (Grob *e, SCM cause)
+Grob_info
+Engraver::make_grob_info(Grob *e, SCM cause)
{
/* TODO: Remove Music code when it's no longer needed */
if (Music *m = unsmob_music (cause))
{
cause = m->to_event ()->unprotect ();
}
- if (unsmob_stream_event (cause) || unsmob_grob (cause))
+ if (e->get_property ("cause") == SCM_EOL
+ && (unsmob_stream_event (cause) || unsmob_grob (cause)))
e->set_property ("cause", cause);
- Grob_info i (this, e);
+ return Grob_info (this, e);
+}
- Engraver_group *g = get_daddy_engraver ();
- if (g)
- g->announce_grob (i);
+/*
+ CAUSE is the object (typically a Stream_event object) that
+ was the reason for making E.
+*/
+void
+Engraver::announce_grob (Grob *e, SCM cause)
+{
+ announce_grob (make_grob_info (e, cause));
}
void
Engraver::announce_end_grob (Grob *e, SCM cause)
{
- /* TODO: Remove Music code when it's no longer needed */
- if (Music *m = unsmob_music (cause))
- {
- cause = m->to_event ()->unprotect ();
- }
- if (e->get_property ("cause") == SCM_EOL
- && (unsmob_stream_event (cause) || unsmob_grob (cause)))
- e->set_property ("cause", cause);
-
- Grob_info i (this, e);
-
- i.start_end_ = STOP;
- Engraver_group *g = get_daddy_engraver ();
- if (g)
- g->announce_grob (i);
+ announce_end_grob (make_grob_info (e, cause));
}