]> git.tdb.fi Git - r2c2.git/blob - source/libr2c2/trackappearance.h
a108ec0e011de0f449331c84c55d9d461e566a46
[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 rail_profile();
21                 void tie_length(float);
22                 void tie_profile();
23                 void tie_spacing(float);
24         };
25
26 private:
27         Profile rail_profile;
28         Profile ballast_profile;
29         Profile tie_profile;
30         float tie_length;
31         float tie_spacing;
32         std::string technique;
33
34 public:
35         TrackAppearance();
36
37         float get_rail_elevation() const;
38         const Profile &get_rail_profile() const { return rail_profile; }
39         const Profile &get_ballast_profile() const { return ballast_profile; }
40         const Profile &get_tie_profile() const { return tie_profile; }
41         float get_tie_length() const { return tie_length; }
42         float get_tie_spacing() const { return tie_spacing; }
43         const std::string &get_technique() const { return technique; }
44 };
45
46 } // namespace R2C2
47
48 #endif