]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/turnout.h
Prevent a crash if a layout file contains empty routes
[r2c2.git] / source / libmarklin / turnout.h
index ae6865406523007285bf34ba561ae55105b1375a..01d37377dd8603a695c16e8151b94562ea77aa88 100644 (file)
@@ -21,20 +21,22 @@ class Reply;
 
 class Turnout
 {
+public:
+       sigc::signal<void, unsigned> signal_path_changing;
+       sigc::signal<void, unsigned> signal_path_changed;
+
 private:
-       Control  &control;
+       Control &control;
        unsigned addr;
-       unsigned route;
-       bool     dual;
+       unsigned path;
+       bool dual;
 
 public:
-       sigc::signal<void, unsigned> signal_route_changed;
-
        Turnout(Control &, unsigned, bool =false);
 
-       void     set_route(unsigned);
+       void set_path(unsigned);
        unsigned get_address() const { return addr; }
-       unsigned get_route() const   { return route; }
+       unsigned get_path() const { return path; }
 private:
        void command(bool);
        void status_reply(const Reply &, bool);