]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/track.h
Maintain a Block pointer in Track
[r2c2.git] / source / libmarklin / track.h
index aff73966b36199b86751d75b972e0afce129aa1e..f3d89815b72cb2a0a9338d583f02c2f4806396cf 100644 (file)
@@ -16,6 +16,7 @@ Distributed under the GPL
 
 namespace Marklin {
 
+class Block;
 class Layout;
 class TrackType;
 
@@ -35,6 +36,7 @@ public:
 private:
        Layout &layout;
        const TrackType &type;
+       Block *block;
        Point pos;
        float rot;
        float slope;
@@ -53,6 +55,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);