]> git.donarmstrong.com Git - lilypond.git/blobdiff - src/voice.cc
release: 0.0.32
[lilypond.git] / src / voice.cc
index 8bccb12d8d1b8003408d9e303fef6c6a2a863200..3dd4becf218270afe77904ce964fc22499ee4cb6 100644 (file)
@@ -1,6 +1,15 @@
+/*
+  voice.cc -- implement Voice
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
 #include "debug.hh"
 #include "voice.hh"
-#include "request.hh"
+#include "musicalrequest.hh"
+#include "commandrequest.hh"
 
 void
 Voice::set_default_group(String s)
@@ -49,54 +58,4 @@ Voice::last() const
        l  += i->duration;
     return l;
 }
-/* *************************************************************** */
-void
-Voice_element::print() const
-{
-#ifndef NPRINT
-    mtor << "voice_element { dur :"<< duration <<"\n";
-    for (iter_top(reqs,rc); rc.ok(); rc++) {
-       rc->print();
-    }
-    mtor << "}\n";
-#endif
-}
-void
-Voice_element::add(Request*r)
-{
-    if (r->rhythmic()) {
-       assert (!duration  || duration == r->duration());           
-       duration = r->duration();
-    }
-    
-    r->elt_l_ = this;
-    reqs.bottom().add(r);
-}
-
-
-Voice_element::Voice_element()
-{
-    voice_l_ = 0;
-    duration = 0;
-    defined_ch_c_l_m = 0;
-}
 
-Voice_element::Voice_element(Voice_element const&src)
-{
-    defined_ch_c_l_m = src.defined_ch_c_l_m;
-               // are you sure? They can be modified after copying.
-    voice_l_=0;
-    for (iter_top(src.reqs, i); i.ok(); i++)
-       add(i->clone());
-
-}
-void
-Voice_element::set_default_group(String s)
-{
-    for (iter_top(reqs, i); i.ok(); i++)
-       if (i->groupchange())
-           return ;
-    Group_change_req *greq = new Group_change_req;
-    greq->newgroup_str_ = s;
-    add(greq);
-}