lilypond-0.1.37
[lilypond.git] / src / commandrequest.cc
blob5cf0912417e154e601a0604a6d321375b0a4aa8d
1 /*
2 commandrequest.cc -- implement Nonmusical reqs
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
9 #include "commandrequest.hh"
10 #include "debug.hh"
11 #include "musicalrequest.hh"
14 void
15 Cadenza_req::do_print()const
17 mtor << on_b_;
20 Cadenza_req::Cadenza_req(bool b)
22 on_b_ =b;
24 /* *************** */
27 int
28 Bar_req::compare(const Bar_req &c1)const
30 return type_str_ == c1.type_str_;
33 void
34 Bar_req::do_print() const
36 mtor << type_str_;
39 Bar_req::Bar_req(String s)
41 type_str_ = s;
44 Partial_measure_req::Partial_measure_req(Moment m)
46 duration_ =m;
48 /* *************** */
49 Meter_change_req::Meter_change_req()
51 beats_i_ = 0;
52 one_beat_i_ =0;
54 void
55 Meter_change_req::set(int b,int o)
57 beats_i_=b;
58 one_beat_i_=o;
61 void
62 Timing_req::do_print()const{}
64 void
65 Command_req::do_print()const{}
66 /* *************** */
67 void
68 Barcheck_req::do_print() const{}
70 /* *************** */
71 void
72 Clef_change_req::do_print() const
74 mtor << clef_str_ ;
77 Clef_change_req::Clef_change_req(String s)
79 clef_str_ = s;
81 /* *************** */
82 void
83 Group_feature_req::do_print() const
85 mtor << "stemdir " << stemdir_i_;
88 Group_feature_req::Group_feature_req()
90 stemdir_i_ = 0;
93 void
94 Group_change_req::do_print()const
96 mtor << "id : " << newgroup_str_;
98 /* *************** */
99 void
100 Terminate_voice_req::do_print()const
104 /* *************** */
105 void
106 Partial_measure_req::do_print() const
108 mtor << duration_;
111 void
112 Meter_change_req::do_print() const
114 mtor << beats_i_ << "*" << one_beat_i_;
117 /* *************** */
119 void
120 Measure_grouping_req::do_print() const
122 for (int i=0; i < elt_length_arr_.size(); i++) {
123 mtor << beat_i_arr_[i] <<"*" << elt_length_arr_[i]<<" ";
126 /* *************** */
127 void
128 Key_change_req::do_print() const
130 for (int i=0; i < melodic_p_arr_.size(); i++) {
131 melodic_p_arr_[i]->print();
135 Key_change_req::Key_change_req()
138 Key_change_req::Key_change_req(Key_change_req const&c)
140 for (int i=0; i < c.melodic_p_arr_.size(); i++) {
141 melodic_p_arr_.push( c.melodic_p_arr_[i]->clone()->melodic() );
145 Key_change_req::~Key_change_req()
147 for (int i=0; i < melodic_p_arr_.size(); i++)
148 delete melodic_p_arr_[i];