X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftracktype.h;h=267d5d0f1ace2c7984d93c35d09db2ae63015ca5;hb=1a213318d4f26ef7bc3a82fc805ecbfec9f1c74a;hp=56d164f1b652a308a58a7ec1b0cf7505d6491631;hpb=145ba6391812e2b1040a78a8f0fda5888bfea610;p=r2c2.git diff --git a/source/libr2c2/tracktype.h b/source/libr2c2/tracktype.h index 56d164f..267d5d0 100644 --- a/source/libr2c2/tracktype.h +++ b/source/libr2c2/tracktype.h @@ -28,20 +28,26 @@ public: class Loader: public Msp::DataFile::DerivedObjectLoader { + public: + typedef Msp::DataFile::Collection Collection; + private: + Collection &coll; bool state_bits_set; public: - Loader(TrackType &); + Loader(TrackType &, Collection &); + + virtual Collection &get_collection() const { return coll; } private: virtual void finish(); + void appearance(const std::string &); void part(); - void position(float, float, float); void state_bits(unsigned); }; private: - const TrackAppearance &appearance; + const TrackAppearance *appearance; std::vector parts; std::vector endpoints; unsigned state_bits; @@ -49,9 +55,10 @@ private: std::string object; public: - TrackType(const ArticleNumber &, const TrackAppearance &); + TrackType(); - const TrackAppearance &get_appearance() const { return appearance; } + const TrackAppearance &get_appearance() const; + float get_gauge() const; float get_total_length() const; float get_path_length(int) const; unsigned get_paths() const;