1 #ifndef LIBR2C2_CATALOGUE_H_
2 #define LIBR2C2_CATALOGUE_H_
5 #include <msp/datafile/objectloader.h>
6 #include "articlenumber.h"
19 class Loader: public Msp::DataFile::ObjectLoader<Catalogue>
24 void ballast_profile();
28 void scale(float, float);
29 void signal(ArticleNumber);
31 void track(ArticleNumber);
32 void vehicle(unsigned);
33 void vehicle(ArticleNumber);
36 typedef std::map<ArticleNumber, TrackType *> TrackMap;
37 typedef std::map<ArticleNumber, VehicleType *> VehicleMap;
38 typedef std::map<ArticleNumber, SignalType *> SignalMap;
40 sigc::signal<void, const TrackType &> signal_track_added;
41 sigc::signal<void, const VehicleType &> signal_vehicle_added;
42 sigc::signal<void, const SignalType &> signal_signal_added;
48 Profile ballast_profile;
50 std::string track_technique;
60 float get_scale() const { return scale; }
61 float get_gauge() const { return gauge; }
62 float get_rail_elevation() const;
63 const Profile &get_rail_profile() const { return rail_profile; }
64 const Profile &get_ballast_profile() const { return ballast_profile; }
65 const Profile &get_path_profile() const { return path_profile; }
66 const std::string &get_track_technique() const { return track_technique; }
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 void add_signal(SignalType &);
77 const SignalType &get_signal(const ArticleNumber &) const;
78 const SignalMap &get_signals() const { return signals; }
80 Layout &get_layout() { return layout; }