]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/locotype.cpp
Support dual-address locomotives with extra functions on the second address
[r2c2.git] / source / libmarklin / locotype.cpp
index 6dcd6ae302920757072eee25c0fb5d00eb168ed6..7a1becf35ac5152db6d926a1c73673ed271ea895 100644 (file)
@@ -15,6 +15,13 @@ LocoType::LocoType(unsigned an):
        art_nr(an)
 { }
 
+unsigned LocoType::get_max_function() const
+{
+       if(funcs.empty())
+               return 0;
+       return (--funcs.end())->first;
+}
+
 
 LocoType::Loader::Loader(LocoType &lt):
        Msp::DataFile::BasicLoader<LocoType>(lt)