]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/template5.cc
Run `make grand-replace'.
[lilypond.git] / lily / template5.cc
index 29f0f1666e962ccfd3c1b4983db486bc9bc91995..3584173cc6424ac21267bc675aecbe57fbc4f283 100644 (file)
@@ -3,10 +3,12 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "moment.hh"
+#include "real.hh"
+#include "interval.hh"
 
 #include "interval.tcc"
 
@@ -19,13 +21,41 @@ Interval_t<Rational>::infinity ()
   return infty;
 }
 
+
 template<>
-String
+string
 Interval_t<Rational>::T_to_string (Rational a)
 {
   return a.to_string ();
 }
 
+template INTERVAL__INSTANTIATE (Rational);
 
 
-template INTERVAL__INSTANTIATE (Rational);
+template<>
+Moment
+Interval_t<Moment>::infinity ()
+{
+  Moment infty;
+  
+  infty.main_part_.set_infinite (1);
+  return infty;
+}
+
+
+template<>
+string
+Interval_t<Moment>::T_to_string (Moment a)
+{
+  return a.to_string ();
+}
+
+template INTERVAL__INSTANTIATE (Moment);
+
+template<>
+Real
+Interval_t<Real>::linear_combination (Real x) const
+{
+  Drul_array<Real> da (at (LEFT), at (RIGHT));
+  return ::linear_combination (da, x);
+}