2 notename-table.cc -- implement Notename_table
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "notename-table.hh"
10 #include "dictionary-iter.hh"
11 #include "dictionary.hh"
12 #include "musical-pitch.hh"
15 Notename_table::get_name (Musical_pitch m) const
17 for (Dictionary_iter<Musical_pitch> ai (*pitch_dict_); ai.ok (); ai++)
27 Notename_table::add_note_name (String s,
28 Musical_pitch const *p)
30 pitch_dict_->elem (s) = *p;
33 Notename_table::Notename_table ()
35 pitch_dict_ = new Dictionary<Musical_pitch>;
38 Notename_table::~Notename_table()
43 Notename_table::Notename_table (Notename_table const &s)
45 pitch_dict_ = new Dictionary<Musical_pitch> (*s.pitch_dict_);
48 Notename_table::elem_b (String s)const
50 return pitch_dict_->elem_b (s);
53 Notename_table::get_pitch (String s)const
55 return (*pitch_dict_)[s];