]> git.donarmstrong.com Git - lilypond.git/blob - lily/template5.cc
release: 0.1.48
[lilypond.git] / lily / template5.cc
1 /*
2   template5.cc -- instantiate Intervals
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9 #include <limits.h>
10 #include "proto.hh"
11 #include "string.hh"
12 #include "moment.hh"
13 #include "real.hh"
14
15 #include "interval.tcc"
16
17 template INTERVAL__INSTANTIATE(Rational);
18 template INTERVAL__INSTANTIATE(int);
19
20 Rational
21 Interval_t<Rational>::infinity()
22 {
23   Rational infty;
24   infty.set_infinite (1);
25   return infty;
26 }
27
28 String
29 Interval_t<Rational>::T_to_str (Rational a)
30 {
31   return a.str ();
32 }
33
34 int
35 Interval_t<int>::infinity()
36 {
37   return INT_MAX;
38 }
39
40 String
41 Interval_t<int>::T_to_str (int i)
42 {
43   return String (i);
44 }