]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/key.hh
release: 0.1.11
[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  
19     Octave_key();
20     void set (int i, int acc);
21     int acc (int i) const { return accidental_i_arr_[i]; }
22 };
23
24 /// administration of accidentals
25 class Key
26 {
27     /** for each octave a key. Has to be private since octave 0 isn't member 0.
28      */
29     Array<Octave_key> octaves;
30 public:
31     bool multi_octave_b_;
32     
33     Octave_key&oct (int);
34     void set (int name, int acc);
35     void set (int oct, int name, int acc);
36     Key();
37 };
38
39 #endif // KEY_HH
40
41