X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fcommand-request.hh;h=078e02dd2f07e109ff913db02fa5fb0852662c46;hb=f988425624a6f6d1a48aea0ac0c1c84ff0857e56;hp=96c010322bcd41aad7502fc8415861d733ac6309;hpb=31653bf1d61a33ef8bc8c871d60c6b3452d04d28;p=lilypond.git diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index 96c010322b..078e02dd2f 100644 --- a/lily/include/command-request.hh +++ b/lily/include/command-request.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ @@ -14,44 +14,29 @@ #include "array.hh" #include "duration.hh" #include "musical-pitch.hh" +#include "protected-scm.hh" -/** Request which are assumed to be "happening" before the - musical requests. Not coupled to a note or rest. */ -class Command_req : public virtual Request { +class Break_req : public Request { public: - REQUESTMETHODS(Command_req); - -}; - - -class Break_req : public Command_req { -public: - enum { DISALLOW = -10000, FORCE = 10000 }; - int penalty_i_; + Real penalty_f_; Break_req (); - REQUESTMETHODS (Break_req); +protected: + VIRTUAL_COPY_CONS(Music); }; -class Mark_req : public Command_req { +class Mark_req : public Request { public: - Mark_req (String); - String str_; - REQUESTMETHODS (Mark_req); + virtual bool do_equal_b (Request const*) const; + SCM mark_label (); + VIRTUAL_COPY_CONS(Music); }; -class Command_script_req : public Command_req, public Script_req { -public: - // huh? - Command_script_req(); - ~Command_script_req(); - REQUESTMETHODS(Command_script_req); -}; /** Baseclass for time_signature/partial req. It has to be handled by Staff_{walker,column} baseclass. */ -class Timing_req : public Command_req { +class Timing_req : public Request { public: - REQUESTMETHODS(Timing_req); + VIRTUAL_COPY_CONS(Music); }; @@ -62,106 +47,73 @@ public: int metronome_i_; Tempo_req(); - REQUESTMETHODS(Tempo_req); - bool do_equal_b (Request *) const; -}; - -class Partial_measure_req : public Timing_req { -public: - Moment duration_; +protected: - Partial_measure_req (Moment); - REQUESTMETHODS(Partial_measure_req); - bool do_equal_b (Request*) const; + VIRTUAL_COPY_CONS(Music); + bool do_equal_b (Request const *) const; }; + /** todo: allow C time_signature */ class Time_signature_change_req : public Timing_req { public: - int beats_i_, one_beat_i_; + int beats_i_; + int one_beat_i_; Time_signature_change_req(); - bool do_equal_b (Request*) const; - REQUESTMETHODS(Time_signature_change_req); -}; +protected: -/// toggle Cadenza mode -class Cadenza_req : public Timing_req { -public: - /// turn on? - bool on_b_; - bool do_equal_b (Request*) const; - Cadenza_req (bool); - REQUESTMETHODS(Cadenza_req); + bool do_equal_b (Request const *) const; + VIRTUAL_COPY_CONS(Music); }; + /// check if we're at start of a measure. class Barcheck_req : public Timing_req { public: - bool do_equal_b (Request *) const; - REQUESTMETHODS(Barcheck_req); + bool do_equal_b (Request const *) const; + VIRTUAL_COPY_CONS(Music); }; -class Measure_grouping_req : public Timing_req { -public: - Array beat_i_arr_; - Array elt_length_arr_; - bool do_equal_b (Request *) const; - REQUESTMETHODS(Measure_grouping_req); -}; /** draw a (repeat)-bar. This something different than #Barcheck_req#, the latter should only happen at the start of a measure. */ -class Bar_req : public Command_req { +class Bar_req : public Request { public: - String type_str_; - Bar_req (String); - bool do_equal_b (Request*) const; - REQUESTMETHODS(Bar_req); + Bar_req (String); +protected: + VIRTUAL_COPY_CONS(Music); }; +class Breathing_sign_req : public Request { + VIRTUAL_COPY_CONS(Music); +}; /** Handle key changes. - Routines for sharps and flats are separated, - so that caller may identify non-conventional keys. */ -class Key_change_req : public Command_req { +class Key_change_req : public Request +{ public: - Array pitch_arr_; - bool minor_b_; - bool ordinary_key_b_; - - Key_change_req(); - REQUESTMETHODS(Key_change_req); - - /// squash the octaves to 1 - void squash_octaves(); - /// return number of flats in key - int flats_i(); - - /// return number of sharps in key - int sharps_i(); - + SCM pitch_alist (); + +protected: + VIRTUAL_COPY_CONS(Music); void transpose (Musical_pitch d); - /// is minor key? - bool minor_b() const; + bool do_equal_b (Request const * )const; }; -class Clef_change_req : public Command_req { +class Clef_change_req : public Request { public: String clef_str_; Clef_change_req (String); - REQUESTMETHODS(Clef_change_req); -}; +protected: -class Bracket_req : public Span_req, public Command_req { - -public: - REQUESTMETHODS(Bracket_req); + VIRTUAL_COPY_CONS(Music); }; + #endif // COMMANDREQUEST_HH