3 This file is part of R²C²
4 Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef LIBR2C2_CATALOGUE_H_
9 #define LIBR2C2_CATALOGUE_H_
12 #include <msp/datafile/loader.h>
13 #include "articlenumber.h"
25 class Loader: public Msp::DataFile::BasicLoader<Catalogue>
30 void ballast_profile();
34 void scale(float, float);
36 void track(ArticleNumber);
37 void vehicle(unsigned);
38 void vehicle(ArticleNumber);
41 typedef std::map<ArticleNumber, TrackType *> TrackMap;
42 typedef std::map<ArticleNumber, VehicleType *> VehicleMap;
44 sigc::signal<void, const TrackType &> signal_track_added;
45 sigc::signal<void, const VehicleType &> signal_vehicle_added;
51 Profile ballast_profile;
61 float get_scale() const { return scale; }
62 float get_gauge() const { return gauge; }
63 float get_rail_elevation() const;
64 const Profile &get_rail_profile() const { return rail_profile; }
65 const Profile &get_ballast_profile() const { return ballast_profile; }
66 const Profile &get_path_profile() const { return path_profile; }
68 void add_track(TrackType &);
69 const TrackType &get_track(const ArticleNumber &) const;
70 const TrackMap &get_tracks() const { return tracks; }
72 void add_vehicle(VehicleType &);
73 const VehicleType &get_vehicle(const ArticleNumber &) const;
74 const VehicleMap &get_vehicles() const { return vehicles; }
76 Layout &get_layout() { return layout; }