]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/block.h
Simplify some interfaces by using track and block iterators
[r2c2.git] / source / libr2c2 / block.h
index 3592992c03ca16d152b61566760c04a71ad0fe8d..23fb3c789c6c77a0c0768b7d52dd9c140b678e82 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of R²C²
-Copyright © 2006-2010  Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
 #ifndef LIBR2C2_BLOCK_H_
 #define LIBR2C2_BLOCK_H_
 
@@ -38,6 +31,8 @@ public:
                unsigned paths;
 
                Endpoint(Track *, unsigned);
+
+               TrackIter track_iter() const;
        };
 
        sigc::signal<void, Train *> signal_reserved;
@@ -75,7 +70,7 @@ public:
        Train *get_train() const { return train; }
        void tick(const Msp::Time::TimeDelta &);
 private:
-       void find_paths(TrackIter, unsigned);
+       void find_paths(const TrackIter &, unsigned);
        void determine_id();
        void sensor_event(unsigned, bool);
 };