]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/aicontrol.h
Add control enumeration to Controller
[r2c2.git] / source / libr2c2 / aicontrol.h
index 0d84218875848f69b111cb668ab25348f5150118..8d9ff11591eba395c414b6197d99652454eb06d6 100644 (file)
@@ -18,16 +18,24 @@ class Train;
 class AIControl: public Controller, public sigc::trackable
 {
 private:
+       enum State
+       {
+               NORMAL,
+               APPROACH,
+               BLOCKED,
+               FOLLOW
+       };
+
        Train &train;
        Controller *next_ctrl;
        Control target_speed;
-       bool blocked;
-       bool approach;
+       State state;
 
 public:
        AIControl(Train &, Controller *);
        virtual ~AIControl();
 
+       virtual const char *enumerate_controls(unsigned) const;
        virtual void set_control(const std::string &, float);
        virtual const Control &get_control(const std::string &) const;