OLD | NEW |
1 #ifndef FLUID_HH | |
2 #define FLUID_HH | |
3 | |
4 /* | 1 /* |
5 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
6 | 3 |
7 Copyright (C) 2015--2020 David Kastrup <dak@gnu.org> | 4 Copyright (C) 2015--2020 David Kastrup <dak@gnu.org> |
8 | 5 |
9 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
10 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 |
11 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
12 (at your option) any later version. | 9 (at your option) any later version. |
13 | 10 |
14 LilyPond is distributed in the hope that it will be useful, | 11 LilyPond is distributed in the hope that it will be useful, |
15 but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 GNU General Public License for more details. | 14 GNU General Public License for more details. |
18 | 15 |
19 You should have received a copy of the GNU General Public License | 16 You should have received a copy of the GNU General Public License |
20 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. | 17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. |
21 */ | 18 */ |
22 | 19 |
| 20 #ifndef FLUID_HH |
| 21 #define FLUID_HH |
| 22 |
23 #include "lily-guile.hh" | 23 #include "lily-guile.hh" |
24 | 24 |
25 // Fluid is a wrapper class for cached storage of GUILE fluids. | 25 // Fluid is a wrapper class for cached storage of GUILE fluids. |
26 // You use it like | 26 // You use it like |
27 // | 27 // |
28 // Fluid parser (Lily::f_parser); | 28 // Fluid parser (Lily::f_parser); |
29 // | 29 // |
30 // and when you first access `parser' as an SCM value, its value is | 30 // and when you first access `parser' as an SCM value, its value is |
31 // fetched from the respective fluid (in this case `%parser', cf | 31 // fetched from the respective fluid (in this case `%parser', cf |
32 // lily/lily-imports.cc) and cached for future accesses. | 32 // lily/lily-imports.cc) and cached for future accesses. |
(...skipping 23 matching lines...) Expand all Loading... |
56 } | 56 } |
57 operator SCM () | 57 operator SCM () |
58 { | 58 { |
59 if (SCM_UNBNDP (value_)) | 59 if (SCM_UNBNDP (value_)) |
60 value_ = scm_fluid_ref (fluid_); | 60 value_ = scm_fluid_ref (fluid_); |
61 return value_; | 61 return value_; |
62 } | 62 } |
63 }; | 63 }; |
64 | 64 |
65 #endif | 65 #endif |
OLD | NEW |