26 | | virtual void from_setting(const Setting &root) { |
27 | | root.lookupValue("name", name); |
28 | | } |
29 | | |
30 | | virtual void to_setting(Setting &root) const { |
31 | | Setting &name_setting = root.add("name", Setting::TypeString); |
| 26 | virtual void from_setting(const Setting &set) { |
| 27 | set.lookupValue("name", name); |
| 28 | } |
| 29 | |
| 30 | virtual void to_setting(Setting &set) const { |
| 31 | Setting &name_setting = set.add("name", Setting::TypeString); |
52 | | virtual void from_setting(const Setting &root) { |
53 | | root.lookupValue("number", number); |
54 | | if( root.exists( "software" ) ) |
55 | | UI::get(software, root, "software"); |
56 | | } |
57 | | |
58 | | virtual void to_setting(Setting &root) const { |
59 | | Setting &number_setting = root.add("number", Setting::TypeInt); |
| 52 | virtual void from_setting(const Setting &set) { |
| 53 | set.lookupValue("number", number); |
| 54 | if( set.exists( "software" ) ) |
| 55 | UI::get(software, set, "software"); |
| 56 | } |
| 57 | |
| 58 | virtual void to_setting(Setting &set) const { |
| 59 | Setting &number_setting = set.add("number", Setting::TypeInt); |
91 | | virtual void from_setting(const Setting &root) { |
92 | | root.lookupValue("year", year); |
93 | | root.lookupValue("manufacturer", manufacturer); |
94 | | } |
95 | | |
96 | | virtual void to_setting(Setting &root) const { |
97 | | Setting &year_setting = root.add("year", Setting::TypeInt); |
| 91 | virtual void from_setting(const Setting &set) { |
| 92 | set.lookupValue("year", year); |
| 93 | set.lookupValue("manufacturer", manufacturer); |
| 94 | } |
| 95 | |
| 96 | virtual void to_setting(Setting &set) const { |
| 97 | Setting &year_setting = set.add("year", Setting::TypeInt); |
120 | | virtual void from_setting(const Setting &root) { |
121 | | Transport::from_setting(root); |
122 | | |
123 | | root.lookupValue("kilometers", kilometers); |
124 | | |
125 | | if( root.exists( "passengers" ) ) |
126 | | UI::get(passengers, root, "passengers"); |
127 | | } |
128 | | |
129 | | virtual void to_setting(Setting &root) const { |
130 | | Transport::to_setting(root); |
131 | | |
132 | | Setting &kilometers_setting = root.add("kilometers", Setting::TypeInt); |
| 120 | virtual void from_setting(const Setting &set) { |
| 121 | Transport::from_setting(set); |
| 122 | |
| 123 | set.lookupValue("kilometers", kilometers); |
| 124 | |
| 125 | if( set.exists( "passengers" ) ) |
| 126 | UI::get(passengers, set, "passengers"); |
| 127 | } |
| 128 | |
| 129 | virtual void to_setting(Setting &set) const { |
| 130 | Transport::to_setting(set); |
| 131 | |
| 132 | Setting &kilometers_setting = set.add("kilometers", Setting::TypeInt); |
169 | | void from_setting(const Setting &root) { |
170 | | Transport::from_setting(root); |
171 | | |
172 | | root.lookupValue("electricLights", electricLights); |
173 | | |
174 | | UI::get(matr, root, "matr"); |
175 | | } |
176 | | |
177 | | void to_setting(Setting &root) const { |
178 | | Transport::to_setting(root); |
179 | | |
180 | | Setting &electricLights_setting = root.add("electricLights", Setting::TypeBoolean); |
| 169 | void from_setting(const Setting &set) { |
| 170 | Transport::from_setting(set); |
| 171 | |
| 172 | set.lookupValue("electricLights", electricLights); |
| 173 | |
| 174 | UI::get(matr, set, "matr"); |
| 175 | } |
| 176 | |
| 177 | void to_setting(Setting &set) const { |
| 178 | Transport::to_setting(set); |
| 179 | |
| 180 | Setting &electricLights_setting = set.add("electricLights", Setting::TypeBoolean); |