]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/trackchain.h
Rewrite goal initialization for TrainRouteMetric
[r2c2.git] / source / libr2c2 / trackchain.h
index e2d6176f2c1733ff093975d39ef5afe132bbebc4..74d194884e48eac531991f3f552bd95302abd612 100644 (file)
@@ -23,6 +23,13 @@ public:
 class TrackChain: public sigc::trackable
 {
 public:
+       enum Direction
+       {
+               UNSPECIFIED,
+               UP,
+               DOWN
+       };
+
        typedef std::set<Track *> TrackSet;
 
 protected:
@@ -63,6 +70,10 @@ private:
 public:
        const TrackSet &get_tracks() const { return tracks; }
        bool has_track(Track &) const;
+       virtual TrackIter iter_for(Track &, Direction) const;
+       TrackIter get_end(unsigned) const;
+       virtual TrackIter get_end(Direction) const { return get_end(0); }
+       bool is_loop() const;
 
 private:
        void object_removed(Object &);
@@ -71,6 +82,10 @@ public:
        virtual Msp::DataFile::Statement save_reference() const = 0;
 };
 
+
+void operator<<(Msp::LexicalConverter &, TrackChain::Direction);
+void operator>>(const Msp::LexicalConverter &, TrackChain::Direction &);
+
 } // namespace R2C2
 
 #endif