]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/trafficmanager.h
Support using a mesh as a background
[r2c2.git] / source / libmarklin / trafficmanager.h
index 2707e098fb6caad5f339cfa57f805c8caeec9d3e..293783f112d8f914dcc027c903c16c4b8d1ae841 100644 (file)
@@ -1,3 +1,10 @@
+/* $Id$
+
+This file is part of the MSP Märklin suite
+Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
+Distributed under the GPL
+*/
+
 #ifndef LIBMARKLIN_TRAFFICMANAGER_H_
 #define LIBMARKLIN_TRAFFICMANAGER_H_
 
@@ -12,6 +19,12 @@ class Turnout;
 
 class TrafficManager
 {
+private:
+       Control &control;
+       Layout &layout;
+       std::list<Block *> blocks;
+       std::list<Train *> trains;
+
 public:
        sigc::signal<void, const Block &, const Train *> signal_block_reserved;
 
@@ -19,16 +32,12 @@ public:
        ~TrafficManager();
 
        Control &get_control() const { return control; }
+       const std::list<Block *> &get_blocks() const { return blocks; }
        Block &get_block_by_track(const Track &) const;
-       const TrainSeq &get_trains() const { return trains; }
+       const std::list<Train *> &get_trains() const { return trains; }
        void add_train(Train *);
        void tick();
 private:
-       Control &control;
-       Layout &layout;
-       std::list<Block *> blocks;
-       std::list<Train *> trains;
-
        void turnout_route_changed(unsigned, Turnout *);
 };