Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | Related Pages

TRational Class Reference

rational number representation.

#include <TRational.h>

List of all members.

Public Member Functions

 TRational (long int num=0, long int denom=1)
 TRational (const TRational &d)
 TRational (const string &str)
long int getNumerator () const
long int getDenominator () const
void setNumerator (long int d)
void setDenominator (long int d)
void set (long int n, long int d)
TRational operator+ (const TRational &dur) const
TRational operator- (const TRational &dur) const
TRational operator * (const TRational &dur) const
 Useful for notes with dots.

TRational operator/ (const TRational &dur) const
TRational operator * (int num) const
TRational operator/ (int num) const
TRationaloperator+= (const TRational &dur)
TRationaloperator-= (const TRational &dur)
TRationaloperator *= (const TRational &dur)
 Useful for notes with dots.

TRationaloperator/= (const TRational &dur)
TRationaloperator *= (long int num)
TRationaloperator/= (long int num)
TRationaloperator= (const TRational &dur)
bool operator> (const TRational &dur) const
bool operator>= (const TRational &dur) const
bool operator< (const TRational &dur) const
bool operator<= (const TRational &dur) const
bool operator== (const TRational &dur) const
bool operator!= (const TRational &dur) const
bool operator> (double num) const
bool operator>= (double num) const
bool operator< (double num) const
bool operator<= (double num) const
bool operator== (double) const
void rationalise ()
 operator string () const
 operator double () const
 operator float () const
 operator int () const
virtual string toString () const
double toDouble () const
float toFloat () const
int toInt () const


Generated on Tue Mar 23 09:49:49 2004 for LibMusicXML by doxygen 1.3.3