3 This file is part of the MSP Märklin suite
4 Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef LIBMARKLIN_CATALOGUE_H_
9 #define LIBMARKLIN_CATALOGUE_H_
12 #include <msp/datafile/loader.h>
25 class Loader: public Msp::DataFile::BasicLoader<Catalogue>
30 void ballast_profile();
33 void locomotive(unsigned);
35 void scale(float, float);
37 void vehicle(unsigned);
40 sigc::signal<void, const TrackType &> signal_track_added;
41 sigc::signal<void, const VehicleType &> signal_vehicle_added;
47 Profile ballast_profile;
49 std::map<unsigned, TrackType *> tracks;
50 std::map<unsigned, VehicleType *> vehicles;
57 float get_scale() const { return scale; }
58 float get_gauge() const { return gauge; }
59 const Profile &get_rail_profile() const { return rail_profile; }
60 const Profile &get_ballast_profile() const { return ballast_profile; }
61 const Profile &get_path_profile() const { return path_profile; }
63 void add_track(TrackType &);
64 const TrackType &get_track(unsigned) const;
65 const std::map<unsigned, TrackType *> &get_tracks() const { return tracks; }
67 void add_vehicle(VehicleType &);
68 const VehicleType &get_vehicle(unsigned) const;
69 const LocoType &get_locomotive(unsigned) const;
70 const std::map<unsigned, VehicleType *> &get_vehicles() const { return vehicles; }
72 Layout &get_layout() { return layout; }
75 } // namespace Marklin