2 moment.hh -- declare Moment
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
13 #include "rational.hh"
16 Musical timing (Main-timing, grace-timing) with glue for
21 DECLARE_SIMPLE_SMOBS (Moment);
26 Moment (Rational, Rational);
29 Moment operator - () const;
31 void operator += (Moment const &m);
32 void operator -= (Moment const &m);
34 void operator *= (Moment const &m);
35 void operator /= (Moment const &m);
36 void operator %= (Moment const &m);
41 void set_infinite (int k);
43 bool to_bool () const;
47 Deliver a copy of THIS as a smobified SCM
49 string to_string () const;
50 static int compare (Moment const &, Moment const &);
51 SCM as_scheme () const;
54 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, +);
55 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, -);
56 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, /);
57 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, *);
58 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, %);
60 DECLARE_UNSMOB (Moment, moment);
61 int compare (Moment const &, Moment const &);
62 INSTANTIATE_COMPARE (Moment const &, Moment::compare);
64 Moment robust_scm2moment (SCM, Moment);
67 ostream &operator << (ostream &, Moment const &);
70 bool moment_less (SCM a, SCM b);
72 #endif /* MOMENT_HH */