LEFT | RIGHT |
(no file at all) | |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2010--2019 Neil Puttock <n.puttock@gmail.com> | 4 Copyright (C) 2010--2019 Neil Puttock <n.puttock@gmail.com> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "music.hh" | 25 #include "music.hh" |
26 #include "simple-music-iterator.hh" | 26 #include "simple-music-iterator.hh" |
27 #include "lily-imports.hh" | 27 #include "lily-imports.hh" |
28 | 28 |
29 class Partial_iterator : public Simple_music_iterator | 29 class Partial_iterator : public Simple_music_iterator |
30 { | 30 { |
31 public: | 31 public: |
32 DECLARE_SCHEME_CALLBACK (constructor, ()); | 32 DECLARE_SCHEME_CALLBACK (constructor, ()); |
33 DECLARE_SCHEME_CALLBACK (finalization, (SCM, SCM)); | 33 DECLARE_SCHEME_CALLBACK (finalization, (SCM, SCM)); |
34 protected: | 34 protected: |
35 virtual void process (Moment); | 35 void process (Moment) override; |
36 }; | 36 }; |
37 | 37 |
38 void | 38 void |
39 Partial_iterator::process (Moment m) | 39 Partial_iterator::process (Moment m) |
40 { | 40 { |
41 if (Duration * dur | 41 if (Duration * dur |
42 = unsmob<Duration> (get_music ()->get_property ("duration"))) | 42 = unsmob<Duration> (get_music ()->get_property ("duration"))) |
43 { | 43 { |
44 Moment length = Moment (dur->get_length ()); | 44 Moment length = Moment (dur->get_length ()); |
45 | 45 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 } | 99 } |
100 Moment mp = robust_scm2moment (timing->get_property ("measurePosition"), | 100 Moment mp = robust_scm2moment (timing->get_property ("measurePosition"), |
101 Rational (0)); | 101 Rational (0)); |
102 mp.main_part_ = measure_length (timing); | 102 mp.main_part_ = measure_length (timing); |
103 timing->set_property ("measurePosition", | 103 timing->set_property ("measurePosition", |
104 (mp - *unsmob<Moment> (length)).smobbed_copy ()); | 104 (mp - *unsmob<Moment> (length)).smobbed_copy ()); |
105 timing->unset_property (ly_symbol2scm ("partialBusy")); | 105 timing->unset_property (ly_symbol2scm ("partialBusy")); |
106 | 106 |
107 return SCM_UNSPECIFIED; | 107 return SCM_UNSPECIFIED; |
108 } | 108 } |
LEFT | RIGHT |