|[ << Programming work ]||[Top][Contents]||[ Release work >> ]|
|[ < Engraver tutorial ]||[ Up : Engraver tutorial ]||[ Translation process > ]|
10.11.1 Useful methods for information processing
An engraver inherits the following public methods from the Translator base class, which can be used to process listened events and acknowledged grobs:
virtual void initialize ()
void start_translation_timestep ()
void process_music ()
void process_acknowledged ()
void stop_translation_timestep ()
virtual void finalize ()
These methods are listed in order of translation time, with
initialize () and
finalize () bookending the whole
initialize () can be used for one-time initialization
of context properties before translation starts, whereas
finalize () is often used to tie up loose ends at the end of
translation: for example, an unterminated spanner might be completed
automatically or reported with a warning message.
In addition, there is a
derived_mark method that should be
used to protect Scheme members from garbage collection.
See section Garbage collection for dummies.