]> git.tdb.fi Git - r2c2.git/blob - source/3d/allocation.h
87ea3096be28c6fe19faea8aa02647d30fce5941
[r2c2.git] / source / 3d / allocation.h
1 #ifndef R2C2_3D_ALLOCATION_H_
2 #define R2C2_3D_ALLOCATION_H_
3
4 #include <msp/gl/color.h>
5 #include "libr2c2/train.h"
6 #include "utility.h"
7
8 namespace R2C2 {
9
10 class Layout3D;
11 class Path3D;
12
13 class Allocation3D: public Utility3D, public sigc::trackable
14 {
15 private:
16         typedef std::list<Path3D *> PathList;
17         typedef std::map<Block *, PathList> PathMap;
18
19         Train &train;
20         Msp::GL::Color color;
21         PathMap paths;
22
23 public:
24         Allocation3D(Layout3D &, Train &);
25
26         void set_color(const Msp::GL::Color &);
27
28 private:
29         void block_reserved(Block &, Train *);
30         void train_advanced(Block &);
31 };
32
33 } // namespace R2C2
34
35 #endif