2 moment.hh -- declare Moment
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
14 #include "rational.hh"
17 Rationals with glue for Guilification;
19 FIXME: remove self_scm_ and then remove this class */
20 class Moment : public Rational
22 DECLARE_SIMPLE_SMOBS(Moment,);
25 Moment (int m) : Rational (m) { }
26 Moment (int m, int n) : Rational (m,n) { }
27 Moment (Rational m) : Rational (m) { }
30 Deliver a copy of THIS as a smobified SCM
32 SCM make_scm () const;
36 Moment * unsmob_moment (SCM);
38 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, / );
39 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, + );
40 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, * );
41 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, - );
42 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, % );
44 INSTANTIATE_COMPARE (Moment const&, Rational::compare);
48 A really big time-moment.
50 Windhoze-suck-suck-suck-suck-suck-thank-you-cygnus
52 I get tired of all these incompatibilities. Let's just assume that
53 INT_MAX is really, really, really big.
55 Can't we name this Saint_jut_mom (Sintjuttemis ?) */
57 /* URG ! WE HAVE TWO RATIONAL INFINITIES! */
58 const Moment infinity_mom = INT_MAX;
60 #endif /* MOMENT_HH */