]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/request.hh
release: 1.1.15
[lilypond.git] / lily / include / request.hh
index eab7b2d8b07de1fb3328bb37a477f3cc5ad0b7ec..4d0a5f2a0a8fd30daa367a684895a2343ba0a67e 100644 (file)
 #include "music.hh"
 #include "direction.hh"
 
-#define DEFAULTACCESSOR(T)  virtual T *access_ ## T () { return 0; }
 
+/** An atom of musical information.  This is an abstract class for any
+  piece of music that does not contain other Music.
+  
+  Hungarian postfix: req
 
-/**
-   An atom of musical information .
- Hungarian postfix: req
- @see lilygut manpage
  */
 class Request : public Music {
 
 public:
     
-  /* *************** */
-
   virtual ~Request(){}
 
-  DECLARE_MY_RUNTIME_TYPEINFO;
-  VIRTUAL_COPY_CONS(Request,Music);
-    
-  virtual MInterval time_int() const;
-  virtual Moment duration() const { return 0; }
-
-  /*  accessors for children
-      maybe checkout RTTI
-  */
-
-  DEFAULTACCESSOR(Barcheck_req)
-  DEFAULTACCESSOR(Script_req)
-  DEFAULTACCESSOR(Span_req)
-  DEFAULTACCESSOR(Spacing_req)
-  DEFAULTACCESSOR(Musical_req)
-  DEFAULTACCESSOR(Command_req)
+  
+  VIRTUAL_COPY_CONS(Music);
     
   bool equal_b (Request*) const;
 protected:
@@ -58,9 +41,8 @@ protected:
 
 
 #define REQUESTMETHODS(T)      \
-virtual T * access_ ## T() { return this;}\
-DECLARE_MY_RUNTIME_TYPEINFO;\
-VIRTUAL_COPY_CONS(T, Request);\
+\
+VIRTUAL_COPY_CONS(Request);\
 virtual void do_print() const
 
 
@@ -82,5 +64,20 @@ public:
   Script_req (Script_req const&);
 };
 
-    
+
+/**
+  Requests to start or stop something.
+ This type of request typically results in the creation of a #Spanner#
+*/
+class Span_req  : public virtual Request  {
+public:
+  /// should the spanner start or stop, or is it unwanted?
+  Direction spantype_;
+  bool do_equal_b (Request*) const;
+  REQUESTMETHODS(Span_req);
+
+  Span_req();
+};
+
+
 #endif