OLD | NEW |
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) 2004--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2004--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> |
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 17 matching lines...) Expand all Loading... |
28 #include "output-def.hh" | 28 #include "output-def.hh" |
29 #include "profile.hh" | 29 #include "profile.hh" |
30 #include "program-option.hh" | 30 #include "program-option.hh" |
31 #include "scm-hash.hh" | 31 #include "scm-hash.hh" |
32 #include "translator-group.hh" | 32 #include "translator-group.hh" |
33 #include "warn.hh" | 33 #include "warn.hh" |
34 | 34 |
35 bool | 35 bool |
36 Context::is_removable () const | 36 Context::is_removable () const |
37 { | 37 { |
38 return context_list_ == SCM_EOL && ! iterator_count_ | 38 return context_list_ == SCM_EOL && ! client_count_ |
39 && !dynamic_cast<Global_context const *> (daddy_context_); | 39 && !dynamic_cast<Global_context const *> (daddy_context_); |
40 } | 40 } |
41 | 41 |
42 void | 42 void |
43 Context::check_removal () | 43 Context::check_removal () |
44 { | 44 { |
45 for (SCM p = context_list_; scm_is_pair (p); p = scm_cdr (p)) | 45 for (SCM p = context_list_; scm_is_pair (p); p = scm_cdr (p)) |
46 { | 46 { |
47 Context *ctx = unsmob_context (scm_car (p)); | 47 Context *ctx = unsmob_context (scm_car (p)); |
48 | 48 |
(...skipping 26 matching lines...) Expand all Loading... |
75 scm_cons (child->self_scm (), SCM_EOL)); | 75 scm_cons (child->self_scm (), SCM_EOL)); |
76 | 76 |
77 child->daddy_context_ = this; | 77 child->daddy_context_ = this; |
78 this->events_below_->register_as_listener (child->events_below_); | 78 this->events_below_->register_as_listener (child->events_below_); |
79 } | 79 } |
80 | 80 |
81 Context::Context () | 81 Context::Context () |
82 { | 82 { |
83 daddy_context_ = 0; | 83 daddy_context_ = 0; |
84 aliases_ = SCM_EOL; | 84 aliases_ = SCM_EOL; |
85 iterator_count_ = 0; | 85 client_count_ = 0; |
86 implementation_ = 0; | 86 implementation_ = 0; |
87 properties_scm_ = SCM_EOL; | 87 properties_scm_ = SCM_EOL; |
88 accepts_list_ = SCM_EOL; | 88 accepts_list_ = SCM_EOL; |
89 context_list_ = SCM_EOL; | 89 context_list_ = SCM_EOL; |
90 definition_ = SCM_EOL; | 90 definition_ = SCM_EOL; |
91 definition_mods_ = SCM_EOL; | 91 definition_mods_ = SCM_EOL; |
92 event_source_ = 0; | 92 event_source_ = 0; |
93 events_below_ = 0; | 93 events_below_ = 0; |
94 | 94 |
95 smobify_self (); | 95 smobify_self (); |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 | 776 |
777 bool | 777 bool |
778 check_repeat_count_visibility (Context const *context, SCM count) | 778 check_repeat_count_visibility (Context const *context, SCM count) |
779 { | 779 { |
780 SCM proc = context->get_property ("repeatCountVisibility"); | 780 SCM proc = context->get_property ("repeatCountVisibility"); |
781 return (ly_is_procedure (proc) | 781 return (ly_is_procedure (proc) |
782 && to_boolean (scm_call_2 (proc, | 782 && to_boolean (scm_call_2 (proc, |
783 count, | 783 count, |
784 context->self_scm ()))); | 784 context->self_scm ()))); |
785 } | 785 } |
OLD | NEW |