]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/controller.h
Rename the project to R²C²
[r2c2.git] / source / libmarklin / controller.h
diff --git a/source/libmarklin/controller.h b/source/libmarklin/controller.h
deleted file mode 100644 (file)
index ac5128b..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/* $Id$
-
-This file is part of the MSP Märklin suite
-Copyright © 2010  Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
-#ifndef LIBMARKLIN_CONTROLLER_H_
-#define LIBMARKLIN_CONTROLLER_H_
-
-#include <string>
-#include <sigc++/signal.h>
-#include <msp/time/timedelta.h>
-
-namespace Marklin {
-
-/**
-Interface class for train controllers.  Takes input through a uniform named
-control interface.  Provides information about train movement on output.
-*/
-class Controller
-{
-public:
-       struct Control
-       {
-               enum Type
-               {
-                       BINARY,
-                       DISCRETE,
-                       CONTINUOUS
-               };
-
-               std::string name;
-               Type type;
-               float min_value;
-               float max_value;
-               float step;
-               float value;
-
-       private:
-               Control() { }
-
-       public:
-               void set(float);
-
-               static Control binary(const std::string &);
-               static Control discrete(const std::string &, float, float, float);
-               static Control continuous(const std::string &, float, float);
-       };
-
-       sigc::signal<void, const Control &> signal_control_changed;
-
-protected:
-       Controller() { }
-public:
-       virtual ~Controller() { }
-
-       virtual void set_control(const std::string &, float) = 0;
-       virtual const Control &get_control(const std::string &) const = 0;
-
-       /** Returns the current speed.  Always non-negative. */
-       virtual float get_speed() const = 0;
-
-       /** Returns true if traveling in reverse. */
-       virtual bool get_reverse() const = 0;
-
-       /** Determines the distance required to come to a full stop. */
-       virtual float get_braking_distance() const = 0;
-
-       virtual void tick(const Msp::Time::TimeDelta &) = 0;
-};
-
-} // namespace Marklin
-
-#endif