]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.7
authorfred <fred>
Mon, 4 Nov 1996 16:54:16 +0000 (16:54 +0000)
committerfred <fred>
Mon, 4 Nov 1996 16:54:16 +0000 (16:54 +0000)
README
voice.cc
voice.hh

diff --git a/README b/README
index b60e7f2bbdd333c9876a0a9f1e9d724f8a1df7f9..41c366eec380fc3c6207ba903dd05b778f3b38e6 100644 (file)
--- a/README
+++ b/README
@@ -19,6 +19,8 @@ You will need GNU C++ v2.7 or better and GNU make.  If you actually
 want to use this, you'd better use the "speedy" compilation flags in
 the Makefile.
 
+why G++ >= 2.7? LilyPond & flower lib uses builtin bool and typeof.
+
 USING
 
 No, you shouldn't. Really. If you're still not discouraged; this is
index ae9342b487e1bbe48b5db86345dc19b536ea9a51..379cbae23a073fd23fb22e2cea4caaa0cdc2f1a5 100644 (file)
--- a/voice.cc
+++ b/voice.cc
@@ -1,14 +1,10 @@
 #include "debug.hh"
 #include "voice.hh"
 
-void
-Voice_element::add(Request*r)
+Voice::Voice(Voice const&src)
 {
-    if (r->rhythmic()) {
-       assert (!duration);         
-       duration = r->duration();
-    }
-    reqs.bottom().add(r);
+    PL_copy(elts, src.elts);
+    start = src.start;
 }
 
 Voice::Voice()
@@ -22,13 +18,6 @@ Voice::add(Voice_element*v)
     elts.bottom().add(v);
 }
 
-Voice_element::Voice_element()
-{
-    voice = 0;
-    group = 0;
-    duration = 0.0;
-}
-
 void
 Voice::print() const
 {
@@ -39,6 +28,16 @@ Voice::print() const
        vec->print();
 #endif
 }
+
+Real
+Voice::last() const
+{
+    Real l =start;
+    for (PCursor<Voice_element*> vec(elts); vec.ok(); vec++)
+       l  += vec->duration;
+    return l;
+}
+/****************************************************************/
 void
 Voice_element::print() const
 {
@@ -50,12 +49,29 @@ Voice_element::print() const
     mtor << "}\n";
 #endif
 }
+void
+Voice_element::add(Request*r)
+{
+    if (r->rhythmic()) {
+       assert (!duration);         
+       duration = r->duration();
+    }
+    reqs.bottom().add(r);
+}
 
-Real
-Voice::last() const
+
+Voice_element::Voice_element()
 {
-    Real l =start;
-    for (PCursor<Voice_element*> vec(elts); vec.ok(); vec++)
-       l  += vec->duration;
-    return l;
+    voice = 0;
+    group = 0;
+    duration = 0.0;
+}
+
+Voice_element::Voice_element(Voice_element const&src)
+{
+    duration=src.duration;
+    voice=src.voice;
+    PointerList__copy(Request*, reqs, src.reqs, clone());
+    group=src.group;
+    assert(!granted_items.size() && !granted_spanners.size());
 }
index b409fa4cd34bccfeb058f9c61c03cbff0d64f316..59b0dc831515a06cb05914a5a9e25012163c9a66 100644 (file)
--- a/voice.hh
+++ b/voice.hh
@@ -14,6 +14,7 @@ struct Voice {
     Real when(const Voice_element*)const;
     Real last() const;
     Voice();
+        Voice(    Voice const&);
     void add(Voice_element*);
     void print() const;
 };
@@ -42,7 +43,7 @@ struct Voice_element {
     
     void add(Request*);
     Voice_element();
-
+    Voice_element(Voice_element const & src );
     void print ()const;
 };
 /** Apart from being a container for the requests, Voice_element is