]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.61
authorfred <fred>
Sun, 24 Mar 2002 19:40:27 +0000 (19:40 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:40:27 +0000 (19:40 +0000)
flower/include/parray.hh [new file with mode: 0644]
lily/include/local-key-reg.hh

diff --git a/flower/include/parray.hh b/flower/include/parray.hh
new file mode 100644 (file)
index 0000000..ed12074
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+  parray.hh -- declare Pointer_array
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef PARRAY_HH
+#define PARRAY_HH
+
+#include "varray.hh"
+
+template<class T>
+class Pointer_array : public Array<T>
+{
+public:
+    int find_i (T t) const{
+       for (int i=0; i < size(); i++)
+           if (elem(i) == t)
+               return i;
+       return -1;
+    }
+    T find_l(T t)const
+    {
+       int i = find_i(t);
+       if (i >= 0)
+           return elem(i);
+       else
+           return 0;
+    }
+};
+#endif // PARRAY_HH
index 2ab094b3b397613c7c3a142e0c637130a8d75066..4921bd03aaf7f5083cee4b6c6e825c331364708f 100644 (file)
@@ -9,11 +9,15 @@
 #define LOCALKEYREG_HH
 #include "register.hh"
 #include "key.hh"
+#include "parray.hh"
 
 struct Local_key_register : Request_register {
     Key local_key_;
-    Local_key_item* key_item_p_;
     Key const *key_C_;
+    Array<Note_req* > mel_l_arr_;
+    Array<Item* > support_l_arr_;
+    Pointer_array<Item * > forced_l_arr_;
+    Pointer_array<Item *> tied_l_arr_;
     /* *************** */
     virtual void process_requests();
     virtual void acknowledge_element(Staff_elem_info);