X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftrack.h;h=a2f8efffad90021b632f0a4a5b04b43954ab21e6;hb=9a2fd67cec715e371e293be638b126e0d1b2148d;hp=79365afbcceb04c8d1e291ab7b37fee54d85c9a9;hpb=a5e1363ceac1ab552849640c9021fcda362c4416;p=r2c2.git diff --git a/source/libr2c2/track.h b/source/libr2c2/track.h index 79365af..a2f8eff 100644 --- a/source/libr2c2/track.h +++ b/source/libr2c2/track.h @@ -23,12 +23,13 @@ public: public: Loader(Track &); private: + void path(unsigned); void position(float, float, float); void rotation(float); - void sensor_id(unsigned); + void sensor_address(unsigned); void slope(float); void tilt(float); - void turnout_id(unsigned); + void turnout_address(unsigned); }; typedef std::list AttachmentList; @@ -42,12 +43,14 @@ private: Block *block; float slope; bool flex; + unsigned turnout_addr; unsigned turnout_id; - unsigned sensor_id; + unsigned sensor_addr; std::vector links; unsigned active_path; bool path_changing; AttachmentList attachments; + int preferred_exit; Track(const Track &); Track &operator=(const Track &); @@ -70,10 +73,12 @@ private: void check_slope(); public: - void set_turnout_id(unsigned); - void set_sensor_id(unsigned); - unsigned get_turnout_id() const { return turnout_id; } - unsigned get_sensor_id() const { return sensor_id; } + void set_turnout_address(unsigned); + void set_sensor_address(unsigned); + unsigned get_turnout_address() const { return turnout_addr; } + unsigned get_sensor_address() const { return sensor_addr; } + void set_preferred_exit(int); + int get_preferred_exit() const { return preferred_exit; } void set_active_path(unsigned); unsigned get_active_path() const { return active_path; } bool is_path_changing() const { return path_changing; } @@ -103,8 +108,10 @@ public: AttachmentList get_attachments_ordered(unsigned) const; void save(std::list &) const; + void save_dynamic(std::list &) const; private: void turnout_event(unsigned, unsigned); + void turnout_failed(unsigned); }; } // namespace R2C2