2 input-score.cc -- implement Input_score
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "input-score.hh"
11 #include "input-staff.hh"
12 #include "input-music.hh"
14 #include "paper-def.hh"
15 #include "midi-def.hh"
20 Input_score::add(Input_staff
*s
)
22 staffs_
.bottom().add(s
);
26 Input_score::set(Paper_def
*p
)
33 Input_score::set(Midi_def
* midi_p
)
39 Input_score::Input_score(Input_score
const&s
)
41 paper_p_
= (s
.paper_p_
)? new Paper_def(*s
.paper_p_
) :0;
42 midi_p_
= (s
.midi_p_
)? new Midi_def(*s
.midi_p_
) : 0;
43 defined_ch_c_l_
= s
.defined_ch_c_l_
;
44 errorlevel_i_
= s
.errorlevel_i_
;
45 score_wide_music_p_
= (s
.score_wide_music_p_
) ?
46 s
.score_wide_music_p_
->clone():0;
52 Score
*s_p
= new Score
;
53 s_p
->defined_ch_c_l_
= defined_ch_c_l_
;
54 s_p
->errorlevel_i_
= errorlevel_i_
;
56 s_p
->set(new Midi_def(*midi_p_
));
58 s_p
->set( new Paper_def(*paper_p_
));
60 for (iter_top(staffs_
,i
); i
.ok(); i
++) {
61 Staff
* staf_p
=i
->parse(s_p
, score_wide_music_p_
);
69 Input_score::set(Input_music
*m_p
)
71 delete score_wide_music_p_
;
72 score_wide_music_p_
=m_p
;
76 Input_score::~Input_score()
79 delete score_wide_music_p_
;
83 Input_score::Input_score()
85 score_wide_music_p_
=0;
93 Input_score::print()const
96 mtor
<< "Input_score {\n";
97 for (iter_top(staffs_
,i
); i
.ok(); i
++) {