}
}
-const Route *TrainRouter::get_route_for_block(const Block &block) const
-{
- const set<Track *> &tracks = block.get_tracks();
- for(RouteList::const_iterator i=routes.begin(); i!=routes.end(); ++i)
- for(set<Track *>::const_iterator j=tracks.begin(); j!=tracks.end(); ++j)
- if((*i)->has_track(**j))
- return *i;
-
- return 0;
-}
-
void TrainRouter::create_metrics()
{
for(vector<TrainRouteMetric *>::iterator i=metrics.begin(); i!=metrics.end(); ++i)
private:
void block_reserved(Block &, Train *);
void train_advanced(Block &);
- const Route *get_route_for_block(const Block &) const;
void create_metrics();
Route *create_lead_route(Route *, const Route *);