]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/track.h
Make LCD output selectable at runtime through an extra I/O pin
[r2c2.git] / source / libmarklin / track.h
index 008b81dd4a169c46429e17f4f972f7cb14322eac..f065cb673e43a030115581d9e2380a1a54db2589 100644 (file)
@@ -16,6 +16,7 @@ Distributed under the GPL
 
 namespace Marklin {
 
+class Block;
 class Layout;
 class TrackType;
 
@@ -32,9 +33,12 @@ public:
                void turnout_id(unsigned);
        };
 
+       sigc::signal<void, unsigned> signal_path_changed;
+
 private:
        Layout &layout;
        const TrackType &type;
+       Block *block;
        Point pos;
        float rot;
        float slope;
@@ -53,6 +57,8 @@ public:
        Layout &get_layout() const { return layout; }
        const TrackType &get_type() const { return type; }
 
+       void set_block(Block *);
+       Block &get_block() const;
        void set_position(const Point &);
        void set_rotation(float);
        void set_slope(float);
@@ -70,16 +76,15 @@ public:
        void set_active_path(unsigned);
        unsigned get_active_path() const { return active_path; }
 
-       int get_endpoint_by_link(const Track &) const;
+       int get_endpoint_by_link(Track &) const;
        Point get_endpoint_position(unsigned) const;
        float get_endpoint_direction(unsigned) const;
-       bool snap_to(Track &, bool);
+       bool snap_to(Track &, bool, float = 0);
        bool snap(Point &, float &) const;
        void break_link(Track &);
        void break_links();
        const std::vector<Track *> &get_links() const { return links; }
        Track *get_link(unsigned) const;
-       unsigned traverse(unsigned, unsigned) const;
        TrackPoint get_point(unsigned, unsigned, float) const;
        TrackPoint get_point(unsigned, float) const;