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);
39 sigc::signal<void, const TrackType &> signal_track_added;
40 sigc::signal<void, const LocoType &> signal_loco_added;
46 Profile ballast_profile;
48 std::map<unsigned, TrackType *> tracks;
49 std::map<unsigned, LocoType *> locos;
56 float get_scale() const { return scale; }
57 float get_gauge() const { return gauge; }
58 const Profile &get_rail_profile() const { return rail_profile; }
59 const Profile &get_ballast_profile() const { return ballast_profile; }
60 const Profile &get_path_profile() const { return path_profile; }
62 void add_track(TrackType &);
63 const TrackType &get_track(unsigned) const;
64 const std::map<unsigned, TrackType *> &get_tracks() const { return tracks; }
66 void add_locomotive(LocoType &);
67 const LocoType &get_locomotive(unsigned) const;
68 const std::map<unsigned, LocoType *> &get_locomotives() const { return locos; }
70 Layout &get_layout() { return layout; }
73 } // namespace Marklin