X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fvehicletype.h;h=145a08dec64c992ab4da7e261675711c5af3af1c;hb=64d23de66c33d0f77454c3db2e40cccc18f7851b;hp=d8bec87a31a1ff9d47ddc2b702e26d1c190389f0;hpb=a993f204ba2cd282637814caec3ab115040fc0cc;p=r2c2.git diff --git a/source/libr2c2/vehicletype.h b/source/libr2c2/vehicletype.h index d8bec87..145a08d 100644 --- a/source/libr2c2/vehicletype.h +++ b/source/libr2c2/vehicletype.h @@ -2,15 +2,15 @@ #define LIBR2C2_VEHICLETYPE_H_ #include -#include "articlenumber.h" #include "geometry.h" +#include "objecttype.h" namespace R2C2 { -class VehicleType +class VehicleType: public ObjectType { public: - class Loader: public Msp::DataFile::ObjectLoader + class Loader: public Msp::DataFile::DerivedObjectLoader { private: std::map rod_tags; @@ -18,6 +18,7 @@ public: public: Loader(VehicleType &); private: + virtual void finish(); void axle(); void bogie(); void function(unsigned, const std::string &); @@ -125,8 +126,6 @@ public: typedef std::map FunctionMap; private: - ArticleNumber art_nr; - std::string name; bool locomotive; FunctionMap functions; bool swap_direction; @@ -142,8 +141,6 @@ private: public: VehicleType(const ArticleNumber &); - 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; const FunctionMap &get_functions() const { return functions; }