2 command-request.cc -- implement non-musical reqs
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "command-request.hh"
11 #include "musical-request.hh"
14 Cadenza_req::do_print () const
22 Cadenza_req::do_equal_b (Request const *r) const
24 Cadenza_req*cad = dynamic_cast <Cadenza_req const *> (r);
25 return cad && cad->on_b_ == on_b_;
28 Cadenza_req::Cadenza_req (bool b)
36 Bar_req::do_equal_b (Request const *r) const
38 Bar_req * b = dynamic_cast <Bar_req const *> (r);
39 return b && type_str_ == b->type_str_;
43 Bar_req::do_print () const
50 Bar_req::Bar_req (String s)
55 Partial_measure_req::Partial_measure_req (Moment m)
61 Partial_measure_req::do_equal_b (Request const* r) const
63 Partial_measure_req *p = dynamic_cast <Partial_measure_req const*> (r);
65 return p&& p->length_mom_ == length_mom_;
69 Barcheck_req::do_equal_b (Request const *r) const
71 Barcheck_req *b = dynamic_cast<Barcheck_req const*> (r);
76 Clef_change_req::do_print () const
83 Clef_change_req::Clef_change_req (String s)
89 Partial_measure_req::do_print () const
95 Time_signature_change_req::do_print () const
98 DOUT << beats_i_ << "/" << one_beat_i_;
103 Time_signature_change_req::do_equal_b (Request const *r) const
105 Time_signature_change_req * m
106 = dynamic_cast <Time_signature_change_req const*> (r);
108 return m && m->beats_i_ == beats_i_
109 && one_beat_i_ == m->one_beat_i_;
112 Time_signature_change_req::Time_signature_change_req ()
119 Tempo_req::Tempo_req ()
126 Tempo_req::do_print () const
128 DOUT << dur_.str () << " = " << metronome_i_;
133 Tempo_req::do_equal_b (Request const *r) const
135 Tempo_req *t = dynamic_cast <Tempo_req const*> (r);
137 return t&& t->dur_.length_mom ()== dur_.length_mom () && metronome_i_ == t->metronome_i_;
144 Key_change_req::do_print () const
147 for (int i=0; i < key_.pitch_arr_.size (); i++)
149 key_.pitch_arr_[i].print ();
154 Key_change_req::Key_change_req ()
158 Break_req::Break_req ()
163 Mark_req::Mark_req (String s)
169 Mark_req::do_print () const
174 Key_change_req::transpose (Musical_pitch p)