lilypond-0.0.50
[lilypond.git] / lily / include / key.hh
blobcbffa1e8f7d33562ab83268c99afff77302cbae2
1 /*
2 key.hh -- declare Key, Octave_key
4 (c) 1996,97 Han-Wen Nienhuys
5 */
7 #ifndef KEY_HH
8 #define KEY_HH
10 #include "varray.hh"
11 #include "scalar.hh"
13 /// administration of current key in one octave.
14 class Octave_key {
16 public:
17 Array<int> accidental_i_arr_;
19 Key();
20 void set(int i, int acc);
21 int acc(int i)const { return accidental_i_arr_[i]; }
24 /// administration of accidentals
25 class Key
27 /** for each octave a key. Has to be private since octave 0 isn't member 0.
29 Array<Octave_key> octaves;
30 public:
31 bool multi_octave_b_;
33 Octave_key&oct(int);
34 Octave_key oct(int) const;
35 void set(int name, int acc);
36 void set(int oct, int name, int acc);
37 Key();
40 #endif // KEY_HH