X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fmoment.hh;h=b95cf42b4d8183687ecaa518923bde8278ef2499;hb=b9955d706ca6f136b160f0611db85c6bdf0fea9b;hp=a882bb098623e2c2bceb319db137d8344aaac5e8;hpb=6bf1606d827527f02953add0988a4fbbf0dc0c4e;p=lilypond.git diff --git a/lily/include/moment.hh b/lily/include/moment.hh index a882bb0986..b95cf42b4d 100644 --- a/lily/include/moment.hh +++ b/lily/include/moment.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1999--2001 Han-Wen Nienhuys + (c) 1999--2003 Han-Wen Nienhuys */ @@ -23,8 +23,8 @@ class Moment public: Moment (); Moment (int m); - Moment (int m, int n); + Moment (Rational, Rational); Moment (Rational m); Moment operator - () const; @@ -39,16 +39,17 @@ public: Rational grace_part_; void set_infinite (int k); - - operator bool (); + + bool to_bool () const; int den () const; int num () const; /* Deliver a copy of THIS as a smobified SCM */ SCM smobbed_copy () const; - String str () const; + String to_string () const; static int compare (Moment const&, Moment const&); + }; IMPLEMENT_ARITHMETIC_OPERATOR (Moment, + ); IMPLEMENT_ARITHMETIC_OPERATOR (Moment, - ); @@ -56,12 +57,13 @@ IMPLEMENT_ARITHMETIC_OPERATOR (Moment, / ); IMPLEMENT_ARITHMETIC_OPERATOR (Moment, * ); -Moment * unsmob_moment (SCM); +DECLARE_UNSMOB(Moment,moment); int compare (Moment const&,Moment const&); INSTANTIATE_COMPARE (Moment const&, Moment::compare); -#if 0 -IMPLEMENT_ARITHMETIC_OPERATOR (Moment, % ); + +#ifdef STREAM_SUPPORT +std::ostream & operator << (std::ostream &, Moment const &); #endif #endif /* MOMENT_HH */