Nathan Chou <starry...@gmail.com> writes:

> Hi,
>
> I am almost done moving multiple/cross-voice spanner code out of specific
> engravers into the Spanner_engraver class. I just want to make sure this
> approach is on the right track before finishing up and submitting the patch:
>
> New instances of the engraver are created to handle
> spanners/events/announcements with particular id's. The instance initially
> created with the context will maintain a map/list of the additional child
> instances that are created.

The "maintain a map/list of the additional child instances" bit is of
course the most relevant.  Each specific engraver source file should
have to bother as little as possible, optimally making the
"spanner-id-ization" a fairly trivial and mechanical replacement.

> Instead of the listen_ or acknowledge_ functions in the engraver, a
> special function is called in Spanner_engraver when listening or
> acknowledging.  This function then calls the listen_ or acknowledge_
> function: * On just the engraver instance corresponding to the
> spanner-id, if this was indicated when the listener/acknowledger was
> added * On all engraver instances otherwise
>
> This does seem to allow each instance (and the engraver code) to only
> have to deal with one spanner. Please let me know of any improvements
> or concerns, thanks!

The general description seems fine to me.  The interesting thing will be
to see how you factored the stuff.

-- 
David Kastrup

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to