1 #ifndef MARKLIN_3D_BLOCK_H_
2 #define MARKLIN_3D_BLOCK_H_
23 Endpoint(Track *, unsigned);
27 TrafficManager &trfc_mgr;
30 std::set<Track *> tracks;
31 std::vector<Endpoint> endpoints;
35 Block(TrafficManager &, Track &);
36 unsigned get_sensor_id() const { return sensor_id; }
37 const std::set<Track *> &get_tracks() const { return tracks; }
38 const std::vector<Endpoint> &get_endpoints() const { return endpoints; }
39 int get_endpoint_by_link(const Block &) const;
40 int traverse(unsigned) const;
41 void check_link(Block &);
42 Block *get_link(unsigned) const;
43 bool reserve(const Train *);
44 const Train *get_train() const { return train; }
47 void find_routes(Track &, unsigned, unsigned, std::set<Track *> &);
49 static unsigned next_id;
51 typedef std::list<Block *> BlockSeq;
53 } // namespace Marklin