X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftracktype.h;h=afc85215bfe0366e0e107d21371a218ea8ab282a;hb=8b7d4054b05002d82338775ac9b4ee764a8560e4;hp=a292e5532b625439de120555899ff3637391047b;hpb=e75f12451201fb6540ad2155e8796c2b5aee8d4c;p=r2c2.git diff --git a/source/libr2c2/tracktype.h b/source/libr2c2/tracktype.h index a292e55..afc8521 100644 --- a/source/libr2c2/tracktype.h +++ b/source/libr2c2/tracktype.h @@ -4,11 +4,12 @@ #include #include "articlenumber.h" #include "geometry.h" +#include "objecttype.h" #include "trackpart.h" namespace R2C2 { -class TrackType +class TrackType: public ObjectType { public: struct Endpoint @@ -18,9 +19,12 @@ public: unsigned paths; Endpoint(float, float, float, unsigned); + + bool has_path(unsigned p) const { return paths&(1< + class Loader: public Msp::DataFile::DerivedObjectLoader { private: bool state_bits_set; @@ -35,8 +39,6 @@ public: }; private: - ArticleNumber art_nr; - std::string description; std::vector parts; std::vector endpoints; unsigned state_bits; @@ -46,8 +48,6 @@ private: public: TrackType(const ArticleNumber &); - const ArticleNumber &get_article_number() const { return art_nr; } - const std::string &get_description() const { return description; } float get_total_length() const; float get_path_length(int) const; unsigned get_paths() const;