3 This file is part of the MSP Märklin suite
4 Copyright © 2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef LIBMARKLIN_VEHICLETYPE_H_
9 #define LIBMARKLIN_VEHICLETYPE_H_
11 #include <msp/datafile/objectloader.h>
18 class Loader: public Msp::DataFile::ObjectLoader<VehicleType>
21 Loader(VehicleType &);
25 void function(unsigned, const std::string &);
33 class Loader: public Msp::DataFile::ObjectLoader<Axle>
39 void wheel_diameter(float);
52 class Loader: public Msp::DataFile::ObjectLoader<Bogie>
62 std::vector<Axle> axles;
73 std::map<unsigned, std::string> functions;
77 std::vector<Axle> axles;
78 std::vector<Bogie> bogies;
82 VehicleType(unsigned);
84 unsigned get_article_number() const { return art_nr; }
85 const std::string &get_name() const { return name; }
86 bool is_locomotive() const { return locomotive; }
87 unsigned get_max_function() const;
88 const std::map<unsigned, std::string> &get_functions() const { return functions; }
89 float get_length() const { return length; }
90 float get_width() const { return width; }
91 float get_height() const { return height; }
92 const std::vector<Axle> &get_axles() const { return axles; }
93 const std::vector<Bogie> &get_bogies() const { return bogies; }
94 float get_front_axle_offset() const;
95 float get_back_axle_offset() const;
96 const std::string &get_object() const { return object; }
99 } // namespace Marklin