]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/command-request.hh
release: 1.3.145
[lilypond.git] / lily / include / command-request.hh
index 7d539fb6660711336c865bb8fffccada7820191a..8c4cbeeb51fb9e5928af904a09b836c6a6cb1a6d 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #include "request.hh"
 #include "array.hh"
 #include "duration.hh"
-#include "musical-pitch.hh"
+#include "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);
-
+protected:
+  VIRTUAL_COPY_CONS (Music);
 };
 
-
-class Break_req : public Command_req {
+class Mark_req : public Request {
 public:
-  enum { DISALLOW = -10000, FORCE = 10000 };
-  int penalty_i_;
-  Break_req ();
-  REQUESTMETHODS (Break_req);
+  virtual bool do_equal_b (Request const*) const;
+  SCM mark_label ();
+  VIRTUAL_COPY_CONS (Music);
 };
 
-class Mark_req : public Command_req {
-public:
-  Mark_req (String);
-  String str_;
-  REQUESTMETHODS (Mark_req);
-};
-
-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  {
-public:
-  REQUESTMETHODS(Timing_req);
-};
-
-
-class Tempo_req : public Timing_req
-{
-public:
-  Duration dur_;
-  int metronome_i_;
-
-  Tempo_req();
-  REQUESTMETHODS(Tempo_req);
-  bool do_equal_b (Request *) const;
-};
-
-class Partial_measure_req  : public Timing_req  {
-public:
-  Moment duration_;
-
-  Partial_measure_req (Moment);
-  REQUESTMETHODS(Partial_measure_req);
-  bool do_equal_b (Request*) const;
-};
-
-/**
-  todo: allow C time_signature
+/*
+    int metronome_i_;
  */
-class Time_signature_change_req  : public Timing_req  {
-public:
-  int beats_i_, one_beat_i_;
-
-  Time_signature_change_req();
-  bool do_equal_b (Request*) const;
-  REQUESTMETHODS(Time_signature_change_req);
-};
-
-/// toggle Cadenza mode
-class Cadenza_req  : public Timing_req  {
+class Tempo_req : public Request
+{
 public:
-  /// turn on?
-  bool on_b_;
-  bool do_equal_b (Request*) const;
-  Cadenza_req (bool);
-  REQUESTMETHODS(Cadenza_req);
+  Tempo_req ();
+protected:
+  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);
-};
-
-class Measure_grouping_req : public Timing_req  {
+class Barcheck_req  : public Request  {
 public:
-  Array<int> beat_i_arr_;
-  Array<Moment> elt_length_arr_;
-  bool do_equal_b (Request *) const;
-  REQUESTMETHODS(Measure_grouping_req);
+  bool do_equal_b (Request const *) const;
+  VIRTUAL_COPY_CONS (Music);
 };
 
-/** 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  {
-public:
-  String type_str_;
-  Bar_req (String);
-  bool do_equal_b (Request*) const;
-
-  REQUESTMETHODS(Bar_req);
+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  {
-public:
-  Array<Musical_pitch> pitch_arr_;
-  int modality_i_;
-  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();
-
-  void transpose (Musical_pitch  d);
-  bool minor_b() const;
-};
-
-class Clef_change_req  : public Command_req  {
-public:
-  String clef_str_;
-  Clef_change_req (String);
-  REQUESTMETHODS(Clef_change_req);
-};
-
-class Bracket_req :  public Span_req, public Command_req {
-
+class Key_change_req  : public Request
+{
 public:
-  REQUESTMETHODS(Bracket_req);
+  SCM pitch_alist ();
+  
+protected:
+  VIRTUAL_COPY_CONS (Music);
+  bool do_equal_b (Request const * ) const;
+  void transpose (Pitch  d);
 };
 
-
 #endif // COMMANDREQUEST_HH
+