X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftemplate5.cc;h=681812f8cadc74c70ac6b6adb456088182a240e2;hb=5f746ae1ae44ebb1c8f0274f3dabea5c052a6a21;hp=22928dedc2b1f5b5cd8cbf04c2fed0bef265f31f;hpb=19fbc4154436823f3365e0bc42c4420f2233a860;p=lilypond.git diff --git a/lily/template5.cc b/lily/template5.cc index 22928dedc2..681812f8ca 100644 --- a/lily/template5.cc +++ b/lily/template5.cc @@ -3,31 +3,59 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2009 Han-Wen Nienhuys */ -#include -#include "proto.hh" -#include "string.hh" #include "moment.hh" #include "real.hh" +#include "interval.hh" + #include "interval.tcc" -#include "compare.hh" +template<> Rational -Interval_t::infinity() +Interval_t::infinity () { Rational infty; infty.set_infinite (1); return infty; } -String -Interval_t::T_to_str (Rational a) + +template<> +string +Interval_t::T_to_string (Rational a) { - return a.str (); + return a.to_string (); } +template INTERVAL__INSTANTIATE (Rational); + + +template<> +Moment +Interval_t::infinity () +{ + Moment infty; + + infty.main_part_.set_infinite (1); + return infty; +} -template INTERVAL__INSTANTIATE(Rational); +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); +}