X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Fcatalogue.h;h=4ce6fb1b712de8daa3d32f988d5ec5d43f0b6623;hb=6109a2122226e1c71e9cc71e4c21036e99e43601;hp=6277158df699246952fe29e5286c6bd3bb02f60f;hpb=52cbe8d99669f843f8f75c51128e2748584dd03a;p=r2c2.git diff --git a/source/libmarklin/catalogue.h b/source/libmarklin/catalogue.h index 6277158..4ce6fb1 100644 --- a/source/libmarklin/catalogue.h +++ b/source/libmarklin/catalogue.h @@ -1,3 +1,10 @@ +/* $Id$ + +This file is part of the MSP Märklin suite +Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa +Distributed under the GPL +*/ + #ifndef LIBMARKLIN_CATALOGUE_H_ #define LIBMARKLIN_CATALOGUE_H_ @@ -6,29 +13,32 @@ namespace Marklin { +class LocoType; class TrackType; class Catalogue { public: - class Loader: public Msp::DataFile::Loader + class Loader: public Msp::DataFile::BasicLoader { public: Loader(Catalogue &); private: - Catalogue &cat; - + void locomotive(unsigned); void track(unsigned); }; + private: std::map tracks; + std::map locos; public: ~Catalogue(); - TrackType &get_track(unsigned); + TrackType &get_track(unsigned) const; const std::map &get_tracks() const { return tracks; } - void load(const std::string &); + LocoType &get_locomotive(unsigned) const; + const std::map &get_locomotives() const { return locos; } }; } // namespace Marklin