]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/nscalar.hh
partial: 1.0.1.jcn
[lilypond.git] / flower / include / nscalar.hh
1 /*
2   scalar.hh -- declare 
3
4   source file of the Flower Library
5
6   (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9
10 #ifndef SCALAR_HH
11 #define SCALAR_HH
12
13 struct Scalar {
14   String str_;
15   // Real real_;
16   int int_;
17   //  Rational rational_;
18
19
20   struct typebits {
21     string_bit: 1;
22     int_bit:1;
23   };
24 private:
25
26   
27   //  operator Real();
28   operator int();
29   
30   /**   perl -like string to bool conversion.
31    */
32   //  operator bool() const;
33    
34   //Scalar (Real r) : String (r) {}
35   Scalar (int i) : String (i) {}
36   //  Scalar (char c) : String (c) {}
37   Scalar (char const *c) : String (c) {}    
38   Scalar (String s):String (s) {}
39   //Scalar (Rational);
40   static Scalar undefined ();
41 };
42
43 #endif // SCALAR_HH