From: Mikko Rasa Date: Tue, 12 Feb 2013 12:40:07 +0000 (+0200) Subject: Add a flag to Track to indicate that its path is changing X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=05afa986fa3d923a0ee239bb9200bdec7c6f1b5f;p=r2c2.git Add a flag to Track to indicate that its path is changing --- diff --git a/source/libr2c2/track.cpp b/source/libr2c2/track.cpp index 540c247..d4e9d12 100644 --- a/source/libr2c2/track.cpp +++ b/source/libr2c2/track.cpp @@ -21,7 +21,8 @@ Track::Track(Layout &l, const TrackType &t): turnout_id(0), sensor_id(0), links(type.get_endpoints().size()), - active_path(0) + active_path(0), + path_changing(false) { if(type.is_turnout()) turnout_id = layout.allocate_turnout_id(); @@ -143,6 +144,7 @@ void Track::set_active_path(unsigned p) if(!(type.get_paths()&(1< links; unsigned active_path; + bool path_changing; Track(const Track &); Track &operator=(const Track &); @@ -69,6 +70,7 @@ public: unsigned get_sensor_id() const { return sensor_id; } void set_active_path(unsigned); unsigned get_active_path() const { return active_path; } + bool is_path_changing() const { return path_changing; } int get_endpoint_by_link(Track &) const; Vector get_endpoint_position(unsigned) const;