]> git.tdb.fi Git - r2c2.git/blob - source/libmarklin/locotype.h
bce5c57249ff8f8601e5e78289f8672203240f15
[r2c2.git] / source / libmarklin / locotype.h
1 #ifndef LIBMARKLIN_LOCOTYPE_H_
2 #define LIBMARKLIN_LOCOTYPE_H_
3
4 #include <msp/datafile/loader.h>
5
6 namespace Marklin {
7
8 class LocoType
9 {
10 public:
11         class Loader: public Msp::DataFile::Loader
12         {
13         private:
14                 LocoType &ltype;
15
16         public:
17                 Loader(LocoType &);
18                 LocoType &get_object() const { return ltype; }
19         private:
20                 void function(unsigned, const std::string &);
21         };
22
23 private:
24         unsigned art_nr;
25         std::string name;
26         std::map<unsigned, std::string> funcs;
27
28 public:
29         LocoType(unsigned);
30         unsigned get_article_number() const { return art_nr; }
31         const std::string &get_name() const { return name; }
32         const std::map<unsigned, std::string> &get_functions() const { return funcs; }
33 };
34
35 } // namespace Marklin
36
37 #endif