+#ifndef LIBMARKLIN_TRAFFICMANAGER_H_
+#define LIBMARKLIN_TRAFFICMANAGER_H_
+
+#include "section.h"
+#include "train.h"
+
+namespace Marklin {
+
+class Control;
+class Layout;
+class Turnout;
+
+class TrafficManager
+{
+public:
+ TrafficManager(Control &, Layout &);
+ Control &get_control() const { return control; }
+ Section *get_section_by_track(const Track *) const;
+ void add_train(Train *);
+private:
+ Control &control;
+ Layout &layout;
+ SectionSeq sections;
+ TrainSeq trains;
+
+ void turnout_route_changed(unsigned, Turnout *);
+};
+
+} // namespace Marklin
+
+#endif