summaryrefslogtreecommitdiff
path: root/request.cc
diff options
context:
space:
mode:
Diffstat (limited to 'request.cc')
-rw-r--r--request.cc42
1 files changed, 14 insertions, 28 deletions
diff --git a/request.cc b/request.cc
index 27029ba8d7..27816e5b43 100644
--- a/request.cc
+++ b/request.cc
@@ -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);
}