3 This file is part of the MSP Märklin suite
4 Copyright © 2006-2009 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;
38 std::set<Track *> tracks;
39 std::vector<Endpoint> endpoints;
43 Block(TrafficManager &, Track &);
45 unsigned get_id() const { return id; }
46 unsigned get_sensor_id() const { return sensor_id; }
47 unsigned get_turnout_id() const { return turnout_id; }
48 const std::set<Track *> &get_tracks() const { return tracks; }
49 const std::vector<Endpoint> &get_endpoints() const { return endpoints; }
50 int get_endpoint_by_link(const Block &) const;
51 unsigned traverse(unsigned, float * =0) const;
52 void check_link(Block &);
53 Block *get_link(unsigned) const;
54 bool reserve(const Train *);
55 const Train *get_train() const { return train; }
58 void find_paths(Track &, unsigned, unsigned, std::set<Track *> &);
61 } // namespace Marklin