X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fsequential-iterator.cc;h=84d677df00e1ce07c9ebdf8d37a18deb0b0715d3;hb=7b3a9b122d7ef1eb70fdabaac466b7b0c23a1df2;hp=6174c202f13ce37883218313f2bdf91a3d4167f1;hpb=108cf0e8c08c8e15e2a800feb161cfad9057daa8;p=lilypond.git diff --git a/lily/sequential-iterator.cc b/lily/sequential-iterator.cc index 6174c202f1..84d677df00 100644 --- a/lily/sequential-iterator.cc +++ b/lily/sequential-iterator.cc @@ -1,9 +1,20 @@ /* - sequential-iterator.cc -- implement Sequential_iterator + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 1997--2011 Han-Wen Nienhuys - (c) 1997--2005 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "sequential-iterator.hh" @@ -42,7 +53,12 @@ Sequential_iterator::Sequential_iterator () SCM Sequential_iterator::get_music_list () const { - return SCM_EOL; + Music *m = get_music (); + SCM proc = m->get_property ("elements-callback"); + if (scm_procedure_p (proc)) + return scm_call_1 (proc, m->self_scm ()); + else + return SCM_EOL; } void @@ -171,7 +187,7 @@ Sequential_iterator::next_element (bool) in that chunk should be in len.grace_part_ */ - last_mom_ = here_mom_;; + last_mom_ = here_mom_; here_mom_ += len; } @@ -244,12 +260,6 @@ Sequential_iterator::ok () const return iter_; } -Music_iterator * -Sequential_iterator::try_music_in_children (Music *m) const -{ - return iter_ ? iter_->try_music (m) : 0; -} - IMPLEMENT_CTOR_CALLBACK (Sequential_iterator); bool