2 command-request.cc -- implement non-musical reqs
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "command-request.hh"
11 #include "musical-request.hh"
15 Bar_req::do_equal_b (Request const *r) const
17 Bar_req const* b = dynamic_cast <Bar_req const *> (r);
18 return b && type_str_ == b->type_str_;
22 Bar_req::do_print () const
25 DEBUG_OUT << type_str_;
29 Bar_req::Bar_req (String s)
37 Barcheck_req::do_equal_b (Request const *r) const
39 Barcheck_req const*b = dynamic_cast<Barcheck_req const*> (r);
44 Clef_change_req::do_print () const
47 DEBUG_OUT << clef_str_ ;
51 Clef_change_req::Clef_change_req (String s)
58 Time_signature_change_req::do_print () const
61 DEBUG_OUT << beats_i_ << "/" << one_beat_i_;
66 Time_signature_change_req::do_equal_b (Request const *r) const
68 Time_signature_change_req const* m
69 = dynamic_cast <Time_signature_change_req const*> (r);
71 return m && m->beats_i_ == beats_i_
72 && one_beat_i_ == m->one_beat_i_;
75 Time_signature_change_req::Time_signature_change_req ()
82 Tempo_req::Tempo_req ()
89 Tempo_req::do_print () const
91 DEBUG_OUT << dur_.str () << " = " << metronome_i_;
96 Tempo_req::do_equal_b (Request const *r) const
98 Tempo_req const *t = dynamic_cast <Tempo_req const*> (r);
100 return t&& t->dur_.length_mom ()== dur_.length_mom () && metronome_i_ == t->metronome_i_;
104 Key_change_req::do_print () const
108 Key_change_req::Key_change_req ()
113 Key_change_req::Key_change_req (Key_change_req const&s)
116 key_ = s.key_ ? new Key_def (*s.key_) : 0;
119 Key_change_req::~Key_change_req ()
124 Break_req::Break_req ()
131 Mark_req::do_equal_b (Request const * r) const
133 Mark_req const * other = dynamic_cast<Mark_req const*> (r);
134 return other && scm_equal_p (other->mark_label_, mark_label_);
138 Key_change_req::transpose (Musical_pitch p)