2 moment.hh -- declare Moment
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
14 #include "rational.hh"
17 Musical timing (Main-timing, grace-timing) with glue for
22 DECLARE_SIMPLE_SMOBS (Moment,);
27 Moment (Rational, Rational);
30 Moment operator - () const;
32 void operator += (Moment const &m);
33 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 SCM smobbed_copy () const;
50 String to_string () const;
51 static int compare (Moment const&, Moment const&);
54 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, + );
55 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, - );
56 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, / );
57 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, * );
60 DECLARE_UNSMOB(Moment,moment);
61 int compare (Moment const&,Moment const&);
62 INSTANTIATE_COMPARE (Moment const&, Moment::compare);
66 std::ostream & operator << (std::ostream &, Moment const &);
69 #endif /* MOMENT_HH */