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_sensor_id() const { return sensor_id; }
46 unsigned get_turnout_id() const { return turnout_id; }
47 const std::set<Track *> &get_tracks() const { return tracks; }
48 const std::vector<Endpoint> &get_endpoints() const { return endpoints; }
49 int get_endpoint_by_link(const Block &) const;
50 unsigned traverse(unsigned, float * =0) const;
51 void check_link(Block &);
52 Block *get_link(unsigned) const;
53 bool reserve(const Train *);
54 const Train *get_train() const { return train; }
57 void find_paths(Track &, unsigned, unsigned, std::set<Track *> &);
59 static unsigned next_id;
62 } // namespace Marklin