| 214 | void RV::from_setting( const Setting &root ) |
| 215 | { |
| 216 | Array<string> A; |
| 217 | if( root.exists("names")) |
| 218 | UI::get( A, root, "names" ); |
| 219 | else |
| 220 | A.set_length(0); |
| 221 | |
| 222 | ivec szs; |
| 223 | if( root.exists("sizes")) |
| 224 | UI::get(szs,root,"sizes"); |
| 225 | else |
| 226 | szs = ones_i(A.length()); |
| 227 | |
| 228 | ivec tms; |
| 229 | if( root.exists( "times") ) |
| 230 | UI::get(tms,root,"times"); |
| 231 | else |
| 232 | tms = zeros_i(A.length()); |
| 233 | |
| 234 | // TODO tady se bude plnit primo do jeho promennych, a pak se zavola validacnni metoda, takze cele prepsat, ano? |
| 235 | init( A, szs, tms ); |
| 236 | } |
| 237 | |
| 238 | /*void RV::to_setting( Setting &root ) const |
| 239 | { |
| 240 | Transport::to_setting( root ); |
| 241 | |
| 242 | Setting &kilometers_setting = root.add("kilometers", Setting::TypeInt ); |
| 243 | kilometers_setting = kilometers; |
| 244 | |
| 245 | UI::save( passengers, root, "passengers" ); |
| 246 | }*/ |
| 247 | |
| 248 | |
| 249 | |