3 This file is part of the MSP Märklin suite
4 Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef MARKLIN_3D_BLOCK_H_
9 #define MARKLIN_3D_BLOCK_H_
30 Endpoint(Track *, unsigned);
34 TrafficManager &trfc_mgr;
37 std::set<Track *> tracks;
38 std::vector<Endpoint> endpoints;
42 Block(TrafficManager &, Track &);
44 unsigned get_sensor_id() const { return sensor_id; }
45 const std::set<Track *> &get_tracks() const { return tracks; }
46 const std::vector<Endpoint> &get_endpoints() const { return endpoints; }
47 int get_endpoint_by_link(const Block &) const;
48 int traverse(unsigned, float * =0) const;
49 void check_link(Block &);
50 Block *get_link(unsigned) const;
51 bool reserve(const Train *);
52 const Train *get_train() const { return train; }
55 void find_routes(Track &, unsigned, unsigned, std::set<Track *> &);
57 static unsigned next_id;
60 } // namespace Marklin