]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.4
authorfred <fred>
Tue, 22 Oct 1996 18:57:58 +0000 (18:57 +0000)
committerfred <fred>
Tue, 22 Oct 1996 18:57:58 +0000 (18:57 +0000)
request.cc

index 27029ba8d759dc6ecbb12da35be11b716a030919..27816e5b4325f8f7b0caa1e5f2467790cd3b9576 100644 (file)
@@ -1,48 +1,38 @@
 #include "request.hh"
+#include "debug.hh"
+
+void
+Request::print() const    
+{
+#ifndef NPRINT
+    mtor << "Req{ unknown }\n";
+#endif
+}
+
 Request::Request(Voice_element*v)
 {
     elt = v;
-    tag = UNKNOWN;
 }
 
-Note_req::Note_req(Voice_element*v):
-    Request(v)
+Note_req::Note_req(Voice_element*v)
+    : Rhythmic_req(v)
 {
     name = 'c';
     octave = 0;
     accidental = 0;
     forceacc = false;
-    balltype = 1;
-    dots = 0;
-    tag = NOTE;
 }
 
-Rest_req::Rest_req(Voice_element*v)
+Rhythmic_req::Rhythmic_req(Voice_element*v)
      :Request(v)
 {
     balltype = 1;
     dots = 0;
-    tag =REST;    
 }
 
 Request::Request()
 {
     elt = 0;
-    tag = UNKNOWN;    
-}
-
-Note_req*
-Request::note()
-{
-    assert(tag == NOTE);
-    return (Note_req*)this;
-}
-
-Rest_req*
-Request::rest()
-{
-    assert(tag == REST);
-    return (Rest_req*)this;
 }
 
 
@@ -60,11 +50,7 @@ wholes(int dur, int dots)
 }
 
 Real
-Note_req::duration() const {    
-    return wholes( balltype,dots);
-}
-Real
-Rest_req::duration() const{
+Rhythmic_req::duration() const {    
     return wholes( balltype,dots);
 }