X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Frhythmic-head.cc;h=171c93cb7b9f6071efe13bfb896bf9441acb2388;hb=01d84d552854fb399bd0e819502c6c2db2a1b214;hp=0698b0c3cf2578626f19e5926c92ad06fff8d5db;hpb=9bc467a994787949def91708bf3bd50d088db982;p=lilypond.git diff --git a/lily/rhythmic-head.cc b/lily/rhythmic-head.cc index 0698b0c3cf..171c93cb7b 100644 --- a/lily/rhythmic-head.cc +++ b/lily/rhythmic-head.cc @@ -18,19 +18,32 @@ #include "stem.hh" +Dots* +Rhythmic_head::dots_l () const +{ + SCM s = get_elt_property ("dot"); + return dynamic_cast (unsmob_element (s)); +} + +Stem* +Rhythmic_head::stem_l () const +{ + SCM s = get_elt_property ("stem"); + return dynamic_cast (unsmob_element (s)); +} int Rhythmic_head::dots_i () const { - return dots_l_ ? dots_l_->dots_i_ : 0; + return dots_l () ? dots_l ()->dots_i_ : 0; } void Rhythmic_head::do_post_processing () { - if (dots_l_) + if (dots_l ()) { - dots_l_->set_position(int (position_f ())); + dots_l ()->set_position(int (position_f ())); } } @@ -38,26 +51,15 @@ Rhythmic_head::do_post_processing () void Rhythmic_head::add_dots (Dots *dot_l) { - dots_l_ = dot_l; + set_elt_property ("dot", dot_l->self_scm_); dot_l->add_dependency (this); } Rhythmic_head::Rhythmic_head () { - dots_l_ =0; balltype_i_ =0; - stem_l_ =0; } -void -Rhythmic_head::do_substitute_element_pointer (Score_element*o,Score_element*n) -{ - Staff_symbol_referencer::do_substitute_element_pointer (o,n); - if (o == dots_l_) - dots_l_ = dynamic_cast (n) ; - else if (o == stem_l_) - stem_l_ = dynamic_cast(n); -} void