- else
- {
- delete musical_column_l_;
- musical_column_l_ = 0;
- }
-
- if (new_musical_l)
- {
- musical_column_l_ = new_musical_l;
- }
-}
-
-
-Staff_info
-Score_engraver::get_staff_info() const
-{
- Staff_info inf = Engraver_group_engraver::get_staff_info();
-
- inf.command_l_ = command_column_l_;
- inf.musical_l_ = musical_column_l_;
-
- return inf;
-}
-
-
-Music_output*
-Score_engraver::get_output_p ()
-{
- Music_output * o = pscore_p_;
- pscore_p_=0;
- return o;
-}
-
-bool
-Score_engraver::do_try_music (Music*r)
-{
- bool gotcha = Engraver_group_engraver::do_try_music (r);
-
- if (!gotcha)
- {
- /*
- UGH! THIS IS NOT SYMMETRIC. CLEAN ME UP!
- */
- if (Break_req* b = dynamic_cast<Break_req *> (r))
- {
- gotcha = true;
- if (b->penalty_i_ <= Break_req::DISALLOW)
- break_penalty_i_ = b->penalty_i_;
- else if (b->penalty_i_ >= Break_req::FORCE)
- command_column_l_->break_penalty_i_ = b->penalty_i_;
- }
- }
- return gotcha;
-}
-
-void
-Score_engraver::forbid_breaks ()
-{
- break_penalty_i_ = Break_req::DISALLOW;
-}
-
-ADD_THIS_TRANSLATOR(Score_engraver);
-
-void
-Score_engraver::do_add_processing ()
-{
- Translator_group::do_add_processing ();
- assert (dynamic_cast<Paper_def *> (output_def_l_));
- assert (!daddy_trans_l_);
- pscore_p_ = new Paper_score;
- pscore_p_->paper_l_ = dynamic_cast<Paper_def*>(output_def_l_);
-}
+ elems_.clear ();
+}
+
+ADD_TRANSLATOR_GROUP (Score_engraver,
+ /* doc */ "Top level engraver. Takes care of generating columns and the complete system (ie. System) "
+ "\n\n "
+ "This engraver decides whether a column is breakable. The default is "
+ "that a column is always breakable. However, every Bar_engraver "
+ "that does not have a barline at a certain point will set "
+ "forbidBreaks to stop linebreaks. In practice, this "
+ "means that you can make a breakpoint by creating a barline (assuming "
+ "that there are no beams or notes that prevent a breakpoint.) ",
+ /* create */
+ "System ",
+
+ /* read */
+ "currentMusicalColumn "
+ "currentCommandColumn "
+ "verticallySpacedContexts ",
+
+ /* write */
+ "");