X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fporrectus-engraver.cc;h=fab7e7d86ef4c6220fe7dbf484a2c1279a407d75;hb=8d0267eb80a7cb026751db0a9eabeb61d958776e;hp=cf1b8962f5309ba03a51cb2ad852b23440fe4f40;hpb=a6ee9dcd388111e842064a8d46ab06c4897a00d2;p=lilypond.git diff --git a/lily/porrectus-engraver.cc b/lily/porrectus-engraver.cc index cf1b8962f5..fab7e7d86e 100644 --- a/lily/porrectus-engraver.cc +++ b/lily/porrectus-engraver.cc @@ -1,7 +1,7 @@ /* porrectus-engraver.cc -- implement Porrectus_engraver - Copyright (c) 2001--2002 Juergen Reuter + Copyright (c) 2001--2003 Juergen Reuter written for the GNU LilyPond music typesetter */ @@ -22,7 +22,7 @@ * ligature context that encloses use of this engraver, using syntax * like: \ligature { e \~ c }. * - * TODO: Do not allow a series of adjacent porrectus requests, as in: + * TODO: Do not allow a series of adjacent porrectus events, as in: * e \~ d \~ c. * * TODO: Junk duplicate (or rather triple) implementation of @@ -31,8 +31,8 @@ #include "staff-symbol-referencer.hh" #include "porrectus.hh" -#include "musical-request.hh" -#include "command-request.hh" +#include "event.hh" + #include "rhythmic-head.hh" #include "item.hh" #include "engraver.hh" @@ -55,7 +55,7 @@ protected: private: PQueue past_notes_pq_; - Porrectus_req *porrectus_req_; + Music *porrectus_req_; Array left_heads_; Array right_heads_; Link_array porrectuses_; @@ -69,9 +69,9 @@ Porrectus_engraver::Porrectus_engraver () bool Porrectus_engraver::try_music (Music *m) { - if (Porrectus_req *req_ = dynamic_cast (m)) + if (m->is_mus_type ("porrectus-event")) { - porrectus_req_ = req_; + porrectus_req_ = m; return true; } else @@ -92,12 +92,11 @@ Porrectus_engraver::acknowledge_grob (Grob_info info_) { if (Rhythmic_head::has_interface (info_.grob_)) { - Note_req *note_req_ = dynamic_cast (info_.music_cause ()); - if (!note_req_) - return; - right_heads_.push (Grob_pitch_tuple (info_.grob_, note_req_, - now_mom () + - note_req_->length_mom ())); + Music * m = info_.music_cause (); + if (m->is_mus_type ("note-event")) + right_heads_.push (Grob_pitch_tuple (info_.grob_, m, + now_mom () + + m->get_length ())); } } @@ -168,6 +167,7 @@ Porrectus_engraver::start_translation_timestep () ENTER_DESCRIPTION(Porrectus_engraver, /* descr */ "Join adjacent notes to a porrectus ligature.", /* creats*/ "Porrectus", -/* acks */ "rhythmic-head-interface", +/* accepts */ "porrectus-event", +/* acks */ "rhythmic-head-interface", /* reads */ "", /* write */ "");