]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/locotype.cpp
Add vehicles
[r2c2.git] / source / libmarklin / locotype.cpp
index 7a1becf35ac5152db6d926a1c73673ed271ea895..c00f7d3a94deda2c2586d4f66b080c1a71367ca0 100644 (file)
@@ -12,7 +12,7 @@ using namespace std;
 namespace Marklin {
 
 LocoType::LocoType(unsigned an):
-       art_nr(an)
+       VehicleType(an)
 { }
 
 unsigned LocoType::get_max_function() const
@@ -24,15 +24,14 @@ unsigned LocoType::get_max_function() const
 
 
 LocoType::Loader::Loader(LocoType &lt):
-       Msp::DataFile::BasicLoader<LocoType>(lt)
+       VehicleType::Loader(lt)
 {
        add("function", &Loader::function);
-       add("name",     &LocoType::name);
 }
 
 void LocoType::Loader::function(unsigned i, const string &f)
 {
-       obj.funcs[i] = f;
+       static_cast<LocoType &>(obj).funcs[i] = f;
 }
 
 } // namespace Marklin