X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Flibmarklin%2Fvehicletype.h;h=7844825ea17111188e6c560475c9afffcf1d5e0c;hb=9b05c573a38639827697fe393d55b7c76f5bde45;hp=2edf3bf55fee5242a11c73cb363327fcd70f4f61;hpb=378f04522aa762729c0d5651fb60ad7e4d8ba9f3;p=r2c2.git diff --git a/source/libmarklin/vehicletype.h b/source/libmarklin/vehicletype.h index 2edf3bf..7844825 100644 --- a/source/libmarklin/vehicletype.h +++ b/source/libmarklin/vehicletype.h @@ -9,6 +9,7 @@ Distributed under the GPL #define LIBMARKLIN_VEHICLETYPE_H_ #include +#include "articlenumber.h" namespace Marklin { @@ -42,6 +43,7 @@ public: float position; float wheel_dia; bool powered; + std::string object; Axle(); }; @@ -66,7 +68,7 @@ public: }; private: - unsigned art_nr; + ArticleNumber art_nr; std::string name; bool locomotive; std::map functions; @@ -78,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; @@ -90,6 +92,8 @@ public: float get_height() const { return height; } const std::vector &get_axles() const { return axles; } const std::vector &get_bogies() const { return bogies; } + float get_front_axle_offset() const; + float get_back_axle_offset() const; const std::string &get_object() const { return object; } };