]> git.tdb.fi Git - r2c2.git/blob - source/3d/typemap.h
Don't crash if a train has no router
[r2c2.git] / source / 3d / typemap.h
1 #ifndef R2C2_3D_TYPEMAP_H_
2 #define R2C2_3D_TYPEMAP_H_
3
4 #include <msp/core/meta.h>
5 #include "signal.h"
6 #include "signaltype.h"
7 #include "track.h"
8 #include "tracktype.h"
9 #include "vehicle.h"
10 #include "vehicletype.h"
11
12 namespace R2C2 {
13
14 template<typename T>
15 struct TypeMap3D;
16
17 template<typename T>
18 struct TypeMap3D<const T>: TypeMap3D<T>
19 { };
20
21 template<> struct TypeMap3D<Signal> { typedef Signal3D Type3D; };
22 template<> struct TypeMap3D<SignalType> { typedef SignalType3D Type3D; };
23 template<> struct TypeMap3D<Track> { typedef Track3D Type3D; };
24 template<> struct TypeMap3D<TrackType> { typedef TrackType3D Type3D; };
25 template<> struct TypeMap3D<Vehicle> { typedef Vehicle3D Type3D; };
26 template<> struct TypeMap3D<VehicleType> { typedef VehicleType3D Type3D; };
27
28 } // namespace R2C2
29
30 #endif