]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/block.h
Add Id tags and copyright notices to files
[r2c2.git] / source / libmarklin / block.h
index f18ba8d6f49d52a53844045078aa17f5dd766a96..bdbcc3f3eb0ed2687a6d09e6e5d743782cef5ce9 100644 (file)
@@ -1,3 +1,10 @@
+/* $Id$
+
+This file is part of the MSP Märklin suite
+Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
+Distributed under the GPL
+*/
+
 #ifndef MARKLIN_3D_BLOCK_H_
 #define MARKLIN_3D_BLOCK_H_
 
@@ -33,21 +40,22 @@ private:
 
 public:
        Block(TrafficManager &, Track &);
+
        unsigned get_sensor_id() const { return sensor_id; }
        const std::set<Track *> &get_tracks() const { return tracks; }
        const std::vector<Endpoint> &get_endpoints() const { return endpoints; }
        int get_endpoint_by_link(const Block &) const;
-       int traverse(unsigned) const;
+       int traverse(unsigned, float * =0) const;
        void check_link(Block &);
        Block *get_link(unsigned) const;
        bool reserve(const Train *);
+       const Train *get_train() const { return train; }
        void print_debug();
 private:
        void find_routes(Track &, unsigned, unsigned, std::set<Track *> &);
 
        static unsigned next_id;
 };
-typedef std::list<Block *> BlockSeq;
 
 } // namespace Marklin