]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/key.hh
release: 0.0.49
[lilypond.git] / lily / include / key.hh
index 3d58629d5d49dd5b9c48e11ac4f16ea2530d3e2d..cbffa1e8f7d33562ab83268c99afff77302cbae2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  key.hh -- declare Key
+  key.hh -- declare Key, Octave_key
 
   (c) 1996,97 Han-Wen Nienhuys
 */
 #include "varray.hh"
 #include "scalar.hh"
 
-/// administration of current key
-class Key {
-    Array<int> accidental_i_arr_;
-
-    /* *************** */
+/// administration of current key in one octave.
+class Octave_key {
 
 public:
+    Array<int> accidental_i_arr_;
  
     Key();
     void set(int i, int acc);
@@ -24,14 +22,19 @@ public:
 };
 
 /// administration of accidentals
-struct Local_key
+class Key
 {
-    void reset(Key);    
-    Key& oct(int);
-    Local_key();
-
-private:
-    Array<Key> octaves;
+    /** for each octave a key. Has to be private since octave 0 isn't member 0.
+     */
+    Array<Octave_key> octaves;
+public:
+    bool multi_octave_b_;
+    
+    Octave_key&oct(int);
+    Octave_key  oct(int) const;
+    void set(int name, int acc);
+    void set(int oct, int name, int acc);
+    Key();
 };
 
 #endif // KEY_HH