From: fred Date: Mon, 4 Nov 1996 16:54:16 +0000 (+0000) Subject: lilypond-0.0.7 X-Git-Tag: release/1.5.59~6921 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4411ca8871e37d5e08504bc98c5e88b9f1be8d5d;p=lilypond.git lilypond-0.0.7 --- diff --git a/README b/README index b60e7f2bbd..41c366eec3 100644 --- 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 diff --git a/voice.cc b/voice.cc index ae9342b487..379cbae23a 100644 --- 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 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 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()); } diff --git a/voice.hh b/voice.hh index b409fa4cd3..59b0dc8315 100644 --- 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