namespace Marklin {
LocoType::LocoType(unsigned an):
- art_nr(an)
+ VehicleType(an)
{ }
+unsigned LocoType::get_max_function() const
+{
+ if(funcs.empty())
+ return 0;
+ return (--funcs.end())->first;
+}
+
LocoType::Loader::Loader(LocoType <):
- 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