]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/key.hh
release: 0.1.54
[lilypond.git] / lily / include / key.hh
1 /*
2   key.hh -- declare Key, Octave_key
3
4   (c) 1996,97 Han-Wen Nienhuys
5 */
6
7 #ifndef KEY_HH
8 #define KEY_HH
9
10 #include "varray.hh"
11 #include "scalar.hh"
12
13 /// administration of current key in one octave.
14 class Octave_key {
15
16 public:
17   Array<int> accidental_i_arr_;
18   void clear ();
19   Octave_key();
20   void set (int i, int acc);
21   int acc (int i) const { return accidental_i_arr_[i]; }
22   void print () const;
23 };
24
25 /// administration of accidentals
26 class Key
27 {
28   /** for each octave a key. Has to be private since octave 0 isn't member 0.
29    */
30   Array<Octave_key> octaves;
31 public:
32   bool multi_octave_b_;
33   
34   void clear ();
35   Octave_key&oct (int);
36   void set (int name, int acc);
37   void set (int oct, int name, int acc);
38   Key();
39   void print () const;  
40 };
41
42 #endif // KEY_HH
43
44