]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/allocation.h
New approach for displaying track state
[r2c2.git] / source / 3d / allocation.h
diff --git a/source/3d/allocation.h b/source/3d/allocation.h
new file mode 100644 (file)
index 0000000..87ea309
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef R2C2_3D_ALLOCATION_H_
+#define R2C2_3D_ALLOCATION_H_
+
+#include <msp/gl/color.h>
+#include "libr2c2/train.h"
+#include "utility.h"
+
+namespace R2C2 {
+
+class Layout3D;
+class Path3D;
+
+class Allocation3D: public Utility3D, public sigc::trackable
+{
+private:
+       typedef std::list<Path3D *> PathList;
+       typedef std::map<Block *, PathList> PathMap;
+
+       Train &train;
+       Msp::GL::Color color;
+       PathMap paths;
+
+public:
+       Allocation3D(Layout3D &, Train &);
+
+       void set_color(const Msp::GL::Color &);
+
+private:
+       void block_reserved(Block &, Train *);
+       void train_advanced(Block &);
+};
+
+} // namespace R2C2
+
+#endif