+/* $Id$
+
+This file is part of the MSP Märklin suite
+Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa
+Distributed under the GPL
+*/
+
#ifndef LIBMARKLIN_TURNOUT_H_
#define LIBMARKLIN_TURNOUT_H_
namespace Marklin {
class Control;
+class Reply;
class Turnout
{
+private:
+ 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);
unsigned get_address() const { return addr; }
unsigned get_route() const { return route; }
private:
- Control &control;
- unsigned addr;
- unsigned route;
-
void command(bool);
- void status_reply(Error, const std::string &);
+ void status_reply(const Reply &, bool);
bool switch_timeout();
void turnout_event(unsigned, bool);
};
-typedef std::list<Turnout *> TurnoutSeq;
-typedef std::map<unsigned, Turnout *> TurnoutMap;
} // namespace Marklin