X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Finterval.cc;h=3ffdb3cbce7e035fcab8cafba4a5cb229c1f1df8;hb=74930b635951419c12227e94b83e265aca5dd371;hp=d4ca0f40f470117ffcf12b847b734a84bffd1516;hpb=c3e003dacb5689ffe384d3a2f2d5dc2afb9439bb;p=lilypond.git diff --git a/flower/interval.cc b/flower/interval.cc index d4ca0f40f4..3ffdb3cbce 100644 --- a/flower/interval.cc +++ b/flower/interval.cc @@ -1,29 +1,53 @@ /* - interval.cc -- instantiate Interval_t + This file is part of LilyPond, the GNU music typesetter. - source file of the Flower Library + Copyright (C) 1997--2010 Han-Wen Nienhuys - (c) 1997 Han-Wen Nienhuys -*/ - - -#include "interval.hh" -#include "real.hh" -#include "interval.tcc" + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -template INTERVAL__INSTANTIATE(Real); + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . +*/ +#include "interval.hh" +#include "interval.tcc" +template<> Real -Interval_t::infinity() +Interval_t::infinity () { return HUGE_VAL; } -String -Interval_t::T_to_str (Real r) +template<> +string +Interval_t::T_to_string (Real r) { - return String (r); + return ::to_string (r); } + +template<> +int +Interval_t::infinity () +{ + return INT_MAX; +} + +template<> +string +Interval_t::T_to_string (int i) +{ + return ::to_string (i); +} + +template INTERVAL__INSTANTIATE (int); +template INTERVAL__INSTANTIATE (Real);