X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftrain.h;h=b72fbf635c1d613c8e7f4aab07333dc4fb29eed3;hb=251270c97a5e5eb8630bc1662a406255dedae90e;hp=48ee867a597c7c22e56045dc88df27a7b29bf88c;hpb=d18d5c1c3cf417e20840238eec4f3caa431fa2b5;p=r2c2.git diff --git a/source/libr2c2/train.h b/source/libr2c2/train.h index 48ee867..b72fbf6 100644 --- a/source/libr2c2/train.h +++ b/source/libr2c2/train.h @@ -1,7 +1,7 @@ /* $Id$ This file is part of R²C² -Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa +Copyright © 2006-2011 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ @@ -19,6 +19,7 @@ namespace R2C2 { class ArticleNumber; class Route; +class SpeedQuantizer; class Timetable; class Vehicle; class VehicleType; @@ -40,7 +41,7 @@ public: void block(unsigned); void block_hint(unsigned); void name(const std::string &); - void real_speed(unsigned, float, float); + void quantized_speed(); void route(const std::string &); void timetable(); void vehicle(ArticleNumber); @@ -63,15 +64,6 @@ private: RouteRef(const Route *, unsigned = 0); }; - struct RealSpeed - { - float speed; - float weight; - - RealSpeed(); - void add(float, float); - }; - typedef std::list BlockList; Layout &layout; @@ -104,7 +96,7 @@ private: Msp::Time::TimeStamp last_entry_time; float travel_dist; bool pure_speed; - std::vector real_speed; + SpeedQuantizer *speed_quantizer; bool accurate_position; float overshoot_dist;