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.
}
-