X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Fcatalogue.h;h=61a336f5f6c2e7441f6cb05cd38aa934b54e8734;hb=e5cd9e4fbc577036a0385c985b6b65df8218d0a2;hp=7ce3e73c0d30a3d98cd252a8f0d47a726d200b88;hpb=3e9c210ddc036cd015228504cc0803c909e27f84;p=r2c2.git diff --git a/source/libmarklin/catalogue.h b/source/libmarklin/catalogue.h index 7ce3e73..61a336f 100644 --- a/source/libmarklin/catalogue.h +++ b/source/libmarklin/catalogue.h @@ -1,7 +1,7 @@ /* $Id$ This file is part of the MSP Märklin suite -Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa +Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ @@ -10,38 +10,64 @@ Distributed under the GPL #include #include +#include "layout.h" +#include "profile.h" namespace Marklin { class LocoType; class TrackType; +class VehicleType; class Catalogue { public: - class Loader: public Msp::DataFile::Loader + class Loader: public Msp::DataFile::BasicLoader { public: Loader(Catalogue &); private: - Catalogue &cat; - + void ballast_profile(); + void gauge(float); + void layout(); void locomotive(unsigned); + void rail_profile(); + void scale(float, float); void track(unsigned); }; + sigc::signal signal_track_added; + sigc::signal signal_loco_added; + private: + float scale; + float gauge; + Profile rail_profile; + Profile ballast_profile; + Profile path_profile; std::map tracks; std::map locos; + Layout layout; public: + Catalogue(); ~Catalogue(); - TrackType &get_track(unsigned) const; + float get_scale() const { return scale; } + float get_gauge() const { return gauge; } + const Profile &get_rail_profile() const { return rail_profile; } + const Profile &get_ballast_profile() const { return ballast_profile; } + const Profile &get_path_profile() const { return path_profile; } + + void add_track(TrackType &); + const TrackType &get_track(unsigned) const; const std::map &get_tracks() const { return tracks; } - LocoType &get_locomotive(unsigned) const; + + void add_locomotive(LocoType &); + const LocoType &get_locomotive(unsigned) const; const std::map &get_locomotives() const { return locos; } - void load(const std::string &); + + Layout &get_layout() { return layout; } }; } // namespace Marklin