]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/notename-table.cc
release: 1.0.17
[lilypond.git] / lily / notename-table.cc
index 1f3bc9921044a2a18401b71bc389901d9708e04f..bf32cb7ee2919031c77f9eb147421e4ad86b7c70 100644 (file)
@@ -3,26 +3,22 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "notename-table.hh"
 #include "pointer.tcc"
 #include "musical-request.hh"
+#include "dictionary-iter.hh"
 
-template class P<Melodic_req>;
-
-void
-Notename_table::add (String s, Melodic_req *m_p)
+String
+Notename_table::get_name (Musical_pitch m) const
 {
-  elem (s).set_p (m_p);
-}
 
-Melodic_req*
-Notename_table::get_l (String s)
-{
-  if (! elt_b (s))
-       return 0;
-  return elem (s);
+  for (Dictionary_iter<Musical_pitch> ai (*this); ai.ok (); ai++)
+    {
+      if (ai.val () == m)
+       return ai.key ();
+    }
+  return "r";                  // rest. 
 }
-