X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftemplate5.cc;h=b669abb8994ef59bdbc51216cff3752c293233cb;hb=5bd2d1080a904b9171ccf67520f5a172a8c3014b;hp=d7ed5211f40b093bd9c7b03608db26860f0c353b;hpb=e24df7c27635dc996c466295eacf2981bddccaf7;p=lilypond.git diff --git a/lily/template5.cc b/lily/template5.cc index d7ed5211f4..b669abb899 100644 --- a/lily/template5.cc +++ b/lily/template5.cc @@ -3,10 +3,12 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2005 Han-Wen Nienhuys + (c) 1997--2007 Han-Wen Nienhuys */ #include "moment.hh" +#include "real.hh" +#include "interval.hh" #include "interval.tcc" @@ -19,13 +21,41 @@ Interval_t::infinity () return infty; } + template<> -String +string Interval_t::T_to_string (Rational a) { return a.to_string (); } +template INTERVAL__INSTANTIATE (Rational); -template INTERVAL__INSTANTIATE (Rational); +template<> +Moment +Interval_t::infinity () +{ + Moment infty; + + infty.main_part_.set_infinite (1); + return infty; +} + + +template<> +string +Interval_t::T_to_string (Moment a) +{ + return a.to_string (); +} + +template INTERVAL__INSTANTIATE (Moment); + +template<> +Real +Interval_t::linear_combination (Real x) const +{ + Drul_array da (at (LEFT), at (RIGHT)); + return ::linear_combination (da, x); +}