]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/vehicletype.h
Support more complex article numbers
[r2c2.git] / source / libmarklin / vehicletype.h
index 9ef1c5ec9d22798620674d486588789cecb24e07..7844825ea17111188e6c560475c9afffcf1d5e0c 100644 (file)
@@ -9,6 +9,7 @@ Distributed under the GPL
 #define LIBMARKLIN_VEHICLETYPE_H_
 
 #include <msp/datafile/objectloader.h>
+#include "articlenumber.h"
 
 namespace Marklin {
 
@@ -67,7 +68,7 @@ public:
        };
 
 private:
-       unsigned art_nr;
+       ArticleNumber art_nr;
        std::string name;
        bool locomotive;
        std::map<unsigned, std::string> functions;
@@ -79,9 +80,9 @@ private:
        std::string object;
 
 public:
-       VehicleType(unsigned);
+       VehicleType(const ArticleNumber &);
 
-       unsigned get_article_number() const { return art_nr; }
+       const ArticleNumber &get_article_number() const { return art_nr; }
        const std::string &get_name() const { return name; }
        bool is_locomotive() const { return locomotive; }
        unsigned get_max_function() const;