3 This file is part of R²C²
4 Copyright © 2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef LIBR2C2_VEHICLETYPE_H_
9 #define LIBR2C2_VEHICLETYPE_H_
11 #include <msp/datafile/objectloader.h>
12 #include "articlenumber.h"
19 class Loader: public Msp::DataFile::ObjectLoader<VehicleType>
22 Loader(VehicleType &);
26 void function(unsigned, const std::string &);
34 class Loader: public Msp::DataFile::ObjectLoader<Axle>
40 void wheel_diameter(float);
53 class Loader: public Msp::DataFile::ObjectLoader<Bogie>
63 std::vector<Axle> axles;
74 std::map<unsigned, std::string> functions;
78 std::vector<Axle> axles;
79 std::vector<Bogie> bogies;
83 VehicleType(const ArticleNumber &);
85 const ArticleNumber &get_article_number() const { return art_nr; }
86 const std::string &get_name() const { return name; }
87 bool is_locomotive() const { return locomotive; }
88 unsigned get_max_function() const;
89 const std::map<unsigned, std::string> &get_functions() const { return functions; }
90 float get_length() const { return length; }
91 float get_width() const { return width; }
92 float get_height() const { return height; }
93 const std::vector<Axle> &get_axles() const { return axles; }
94 const std::vector<Bogie> &get_bogies() const { return bogies; }
95 float get_front_axle_offset() const;
96 float get_back_axle_offset() const;
97 const std::string &get_object() const { return object; }