X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftemplate5.cc;h=b669abb8994ef59bdbc51216cff3752c293233cb;hb=a38a563f999c2b0c6fe2715e19b14afe77108338;hp=af9b565719ec72908485fa1442cac76210b7d6b9;hpb=a6ee9dcd388111e842064a8d46ab06c4897a00d2;p=lilypond.git diff --git a/lily/template5.cc b/lily/template5.cc index af9b565719..b669abb899 100644 --- a/lily/template5.cc +++ b/lily/template5.cc @@ -3,16 +3,16 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2002 Han-Wen Nienhuys + (c) 1997--2007 Han-Wen Nienhuys */ -#include -#include "string.hh" #include "moment.hh" #include "real.hh" +#include "interval.hh" + #include "interval.tcc" -#include "compare.hh" +template<> Rational Interval_t::infinity () { @@ -21,12 +21,41 @@ Interval_t::infinity () return infty; } -String + +template<> +string Interval_t::T_to_string (Rational a) { - return a.string (); + 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); +}