lilypond-1.3.16
[lilypond.git] / lily / include / moment.hh
blob3f69637f05b3d937b6b8ec0ee35f358ce4afa649
1 /*
2 moment.hh -- declare Moment
4 source file of the GNU LilyPond music typesetter
6 (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
10 #ifndef MOMENT_HH
11 #define MOMENT_HH
13 #include "smobs.hh"
14 #include "rational.hh"
16 /**
17 Rationals with glue for Guilification;
19 struct Moment : public Rational
21 Moment () { self_scm_ = SCM_EOL; }
22 Moment (int m) : Rational (m) {self_scm_ = SCM_EOL; }
23 Moment (int m, int n) : Rational (m,n) {self_scm_ = SCM_EOL; }
24 Moment (Rational m) : Rational (m) {self_scm_ = SCM_EOL; }
25 ~Moment ();
27 DECLARE_SMOBS;
31 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, / );
32 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, + );
33 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, * );
34 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, - );
35 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, % );
37 INSTANTIATE_COMPARE (Moment const&, Rational::compare);
40 /**
41 A really big time-moment.
43 Windhoze-suck-suck-suck-suck-suck-thank-you-cygnus
45 I get tired of all these incompatibilities. Let's just assume that
46 INT_MAX is really, really, really big.
48 Can't we name this Saint_jut_mom (Sintjuttemis ?) */
50 /* URG ! WE HAVE TWO RATIONAL INFINITIES! */
51 const Moment infinity_mom = INT_MAX;
53 #endif /* MOMENT_HH */