From 1a062435a8d5c6699e4d9ee21bae98aef25153cf Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:28:02 +0000 Subject: [PATCH] lilypond-0.0.23 --- src/grouping.cc | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/src/grouping.cc b/src/grouping.cc index 4b8efaee6c..4f02b75378 100644 --- a/src/grouping.cc +++ b/src/grouping.cc @@ -100,11 +100,15 @@ Rhythmic_grouping::intersect(MInterval t) } +/* I really should be documenting what is happening here, but I find + that difficult, since I don't really understand what's going on here. + + */ void Rhythmic_grouping::split(Array splitpoints) { //check on splitpoints.. - int j = 0, i=0, starti = 0, startj = 0; + int j = 0, i = 0, starti = 0, startj = 0; Array ch; while (1) { @@ -162,8 +166,7 @@ Rhythmic_grouping::Rhythmic_grouping(Array r) Rhythmic_grouping::~Rhythmic_grouping() { - junk(); - + junk(); } void @@ -289,3 +292,28 @@ Rhythmic_grouping::generate_beams(Array flags, int &flagidx) return beams; } +void +Rhythmic_grouping::translate(Moment m) +{ + if (interval_) + *interval_ += m; + else + for (int i=0; i < children.size(); i++) + children[i]->translate(m); +} + +void +Rhythmic_grouping::extend(MInterval m) +{ + assert(m.left >= interval().left); + while (m.right >interval().right ) { + Array a(children); + for (int i=0; i < a.size(); i++) { + a[i] =new Rhythmic_grouping(*children[i]); + a[i]->translate(children.last()->interval().right); + } + children.concat(a); + } + assert(m.right <= interval().right); + OK(); +} -- 2.39.5