]> git.tdb.fi Git - r2c2.git/blob - source/libr2c2/catalogue.h
cd59e9ca2922e06ac723af9f432fbb45de517403
[r2c2.git] / source / libr2c2 / catalogue.h
1 #ifndef LIBR2C2_CATALOGUE_H_
2 #define LIBR2C2_CATALOGUE_H_
3
4 #include <map>
5 #include <msp/datafile/collection.h>
6 #include "articlenumber.h"
7 #include "layout.h"
8 #include "trackappearance.h"
9
10 namespace R2C2 {
11
12 class ObjectType;
13
14 class Catalogue: public Msp::DataFile::Collection
15 {
16 public:
17         class Loader: public Msp::DataFile::Collection::Loader
18         {
19         private:
20                 Catalogue &cat;
21
22         public:
23                 Loader(Catalogue &);
24         private:
25                 void layout();
26                 void scale(float, float);
27                 void signal(const std::string &);
28                 void terrain(const std::string &);
29                 void track(const std::string &);
30                 void vehicle(const std::string &);
31         };
32
33 private:
34         float scale;
35         Layout layout;
36
37 public:
38         Catalogue();
39
40         float get_scale() const { return scale; }
41         Layout &get_layout() { return layout; }
42 };
43
44 } // namespace R2C2
45
46 #endif