X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fdriver.h;h=ec143e83d244c24f32b308fa8d3b646f07e4d68d;hb=ce29d0ccf89840c9581314301de0ea2b5b261c43;hp=d9d11270eb697c5d4155d6eb87026c535b1839b6;hpb=1ff06c5bc46a677fa389ef86c6b26664368f1653;p=r2c2.git diff --git a/source/libr2c2/driver.h b/source/libr2c2/driver.h index d9d1127..ec143e8 100644 --- a/source/libr2c2/driver.h +++ b/source/libr2c2/driver.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #ifndef LIBR2C2_DRIVER_H_ #define LIBR2C2_DRIVER_H_ @@ -13,6 +6,9 @@ Distributed under the GPL namespace R2C2 { +class TrackType; +class VehicleType; + class Driver { public: @@ -20,7 +16,7 @@ public: sigc::signal signal_halt; sigc::signal signal_loco_speed; sigc::signal signal_loco_function; - sigc::signal signal_turnout; + sigc::signal signal_turnout; sigc::signal signal_sensor; protected: @@ -35,14 +31,14 @@ public: virtual const char *enumerate_protocols(unsigned) const = 0; virtual unsigned get_protocol_speed_steps(const std::string &) const = 0; - virtual void add_loco(unsigned, const std::string &) = 0; + virtual void add_loco(unsigned, const std::string &, const VehicleType &) = 0; virtual void set_loco_speed(unsigned, unsigned) = 0; virtual void set_loco_reverse(unsigned, bool) = 0; virtual void set_loco_function(unsigned, unsigned, bool) = 0; - virtual void add_turnout(unsigned) = 0; - virtual void set_turnout(unsigned, bool) = 0; - virtual bool get_turnout(unsigned) const = 0; + virtual void add_turnout(unsigned, const TrackType &) = 0; + virtual void set_turnout(unsigned, unsigned) = 0; + virtual unsigned get_turnout(unsigned) const = 0; virtual void add_sensor(unsigned) = 0; virtual void set_sensor(unsigned, bool) = 0;