lilypond-0.0.27
[lilypond.git] / flower / scalar.hh
blobbff21618c62de4db000573427b79e69145ad90ca
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();
26 ///
27 operator bool() const;
28 /** perl -like string to bool conversion
33 #endif // SCALAR_HH