1 #include "getcommand.hh"
4 #include "inputmusic.hh"
5 #include "inputstaff.hh"
6 #include "inputcommand.hh"
7 #include "staffcommands.hh"
8 #include "melodicstaff.hh"
9 #include "rhythmstaff.hh"
13 Input_staff::add(Array<Input_command*> &s)
15 commands_.bottom().add(get_reset_command());
16 for (int i=0; i < s.size(); i++)
17 commands_.bottom().add(s[i]);
21 Input_staff::Input_staff(String s)
27 Input_staff::add(Input_music*m)
29 music_.bottom().add(m);
33 Input_staff::parse(Score*score_l)
37 if (type == "melodic")
38 p = new Melodic_staff;
39 else if (type == "rhythmic")
40 p = new Rhythmic_staff;
41 p->score_l_ = score_l;
42 p->define_spot_str_ = define_spot_str_;
44 for (iter_top(music_,i); i.ok(); i++) {
45 Voice_list vl = i->convert();
50 Array<String> mark_arr;
51 Array<Moment> moment_arr;
52 p->get_marks(mark_arr, moment_arr);
53 score_l->add_marks(mark_arr, moment_arr);
59 Input_staff::Input_staff(Input_staff const&s)
61 for (iter_top(s.commands_,i); i.ok(); i++)
62 commands_.bottom().add(new Input_command(**i));
63 for (iter_top(s.music_,i); i.ok(); i++)
65 define_spot_str_ = s.define_spot_str_;
70 Input_staff::print() const
73 mtor << "Input_staff {\n";
74 for (iter_top(commands_,i); i.ok(); i++)
76 for (iter_top(music_,i); i.ok(); i++)