2 moment.hh -- declare Moment
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2001 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 smobbed_copy () 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);
47 #endif /* MOMENT_HH */