]> git.tdb.fi Git - r2c2.git/blob - source/libr2c2/trackappearance.h
Move gauge to TrackAppearance
[r2c2.git] / source / libr2c2 / trackappearance.h
1 #ifndef LIBR2C2_TRACKAPPEARANCE_H_
2 #define LIBR2C2_TRACKAPPEARANCE_H_
3
4 #include <string>
5 #include <msp/datafile/objectloader.h>
6 #include "profile.h"
7
8 namespace R2C2 {
9
10 class TrackAppearance
11 {
12 public:
13         class Loader: public Msp::DataFile::ObjectLoader<TrackAppearance>
14         {
15         public:
16                 Loader(TrackAppearance &);
17
18         private:
19                 void ballast_profile();
20                 void gauge(float);
21                 void rail_profile();
22                 void tie_length(float);
23                 void tie_profile();
24                 void tie_spacing(float);
25         };
26
27 private:
28         float gauge;
29         Profile rail_profile;
30         Profile ballast_profile;
31         Profile tie_profile;
32         float tie_length;
33         float tie_spacing;
34         std::string technique;
35
36 public:
37         TrackAppearance();
38
39         float get_gauge() const { return gauge; }
40         float get_rail_elevation() const;
41         const Profile &get_rail_profile() const { return rail_profile; }
42         const Profile &get_ballast_profile() const { return ballast_profile; }
43         const Profile &get_tie_profile() const { return tie_profile; }
44         float get_tie_length() const { return tie_length; }
45         float get_tie_spacing() const { return tie_spacing; }
46         const std::string &get_technique() const { return technique; }
47 };
48
49 } // namespace R2C2
50
51 #endif