#ifndef QUERIES_TRAIN_LOCATIONS_H_
#define QUERIES_TRAIN_LOCATIONS_H_

#include "model_root.h"
#include "segment.h"
#include "turnout.h"

typedef struct _TrainLocationsFrame {
  Segment *location;
  Train *train;
} TrainLocationsFrame;

typedef struct _TrainLocationsMatch {
  Segment *location;
  Train *train;
} TrainLocationsMatch;

typedef struct _TrainLocationsMatchSet {
  int size;
  TrainLocationsMatch matches[200];
} TrainLocationsMatchSet;

void train_locations_matcher(ModelRoot *model, TrainLocationsFrame *frame,
                             int startOpIndex, TrainLocationsMatchSet *results);

#endif // QUERIES_TRAIN_LOCATIONS_H_
