]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/trackappearance.h
Move track appearance properties into a separate class
[r2c2.git] / source / libr2c2 / trackappearance.h
diff --git a/source/libr2c2/trackappearance.h b/source/libr2c2/trackappearance.h
new file mode 100644 (file)
index 0000000..8a18cd4
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef LIBR2C2_TRACKAPPEARANCE_H_
+#define LIBR2C2_TRACKAPPEARANCE_H_
+
+#include <string>
+#include <msp/datafile/objectloader.h>
+#include "profile.h"
+
+namespace R2C2 {
+
+class TrackAppearance
+{
+public:
+       class Loader: public Msp::DataFile::ObjectLoader<TrackAppearance>
+       {
+       public:
+               Loader(TrackAppearance &);
+
+       private:
+               void ballast_profile();
+               void rail_profile();
+       };
+
+private:
+       Profile rail_profile;
+       Profile ballast_profile;
+       std::string technique;
+
+public:
+       float get_rail_elevation() const;
+       const Profile &get_rail_profile() const { return rail_profile; }
+       const Profile &get_ballast_profile() const { return ballast_profile; }
+       const std::string &get_technique() const { return technique; }
+};
+
+} // namespace R2C2
+
+#endif