lilypond-0.0.35
[lilypond.git] / flower / scalar.hh
blob5cdfa427da053134f4db86358991558226611a63
1 /*
2 scalar.hh -- part of LilyPond
4 (c) 1996 Han-Wen Nienhuys
5 */
7 #ifndef SCALAR_HH
8 #define SCALAR_HH
9 #include "string.hh"
10 #include "real.hh"
12 /// Perl -like scalar type.
13 struct Scalar : public String {
15 Scalar(Real r) : String(r) {}
16 Scalar(int i) : String(i) {}
17 Scalar(char c) : String(c) {}
18 Scalar(const char *c) : String(c) {}
19 Scalar(String s ):String(s) {}
20 Scalar(Rational );
21 operator Rational();
22 Scalar() {}
23 bool isnum();
24 operator Real();
25 operator int();
27 /** perl -like string to bool conversion.
29 operator bool() const;
33 #endif // SCALAR_HH