]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/key.hh
release: 0.1.54
[lilypond.git] / lily / include / key.hh
index 3d58629d5d49dd5b9c48e11ac4f16ea2530d3e2d..da0379919334f6e61da77075bceb71c53350ac7e 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:
-    Key();
-    void set(int i, int acc);
-    int acc(int i)const { return accidental_i_arr_[i]; }
+  Array<int> accidental_i_arr_;
+  void clear ();
+  Octave_key();
+  void set (int i, int acc);
+  int acc (int i) const { return accidental_i_arr_[i]; }
+  void print () const;
 };
 
 /// 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_;
+  
+  void clear ();
+  Octave_key&oct (int);
+  void set (int name, int acc);
+  void set (int oct, int name, int acc);
+  Key();
+  void print () const;  
 };
 
 #endif // KEY_HH