]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/turnout.h
Correctly handle slope when snapping tracks
[r2c2.git] / source / libmarklin / turnout.h
index 82b50d5c05e482019da642278ba43a79bce19f9d..279571499e5ce0c2bb3f4e2ba64b31167fa60b19 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of the MSP Märklin suite
-Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
+Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa
 Distributed under the GPL
 */
 
@@ -21,22 +21,25 @@ class Reply;
 
 class Turnout
 {
+public:
+       sigc::signal<void, unsigned> signal_route_changing;
+       sigc::signal<void, unsigned> signal_route_changed;
+
 private:
-       Control  &control;
+       Control &control;
        unsigned addr;
        unsigned route;
+       bool dual;
 
 public:
-       sigc::signal<void, unsigned> signal_route_changed;
-
-       Turnout(Control &, unsigned);
+       Turnout(Control &, unsigned, bool =false);
 
-       void     set_route(unsigned);
+       void set_route(unsigned);
        unsigned get_address() const { return addr; }
-       unsigned get_route() const   { return route; }
+       unsigned get_route() const { return route; }
 private:
        void command(bool);
-       void status_reply(const Reply &);
+       void status_reply(const Reply &, bool);
        bool switch_timeout();
        void turnout_event(unsigned, bool);
 };