]> git.tdb.fi Git - r2c2.git/blob - source/libr2c2/signaltype.h
Rework article numbers
[r2c2.git] / source / libr2c2 / signaltype.h
1 #ifndef LIBR2C2_SIGNALTYPE_H_
2 #define LIBR2C2_SIGNALTYPE_H_
3
4 #include <msp/datafile/objectloader.h>
5 #include "objecttype.h"
6
7 namespace R2C2 {
8
9 class SignalType: public ObjectType
10 {
11 public:
12         struct Indication
13         {
14                 class Loader: public Msp::DataFile::ObjectLoader<Indication>
15                 {
16                 public:
17                         Loader(Indication &);
18                 };
19
20                 std::string name;
21                 unsigned aspect;
22                 unsigned free_blocks;
23         };
24
25         class Loader: public Msp::DataFile::DerivedObjectLoader<SignalType, ObjectType::Loader>
26         {
27         public:
28                 Loader(SignalType &);
29         private:
30                 void indication(const std::string &);
31         };
32
33         typedef std::list<Indication> IndicationList;
34
35 private:
36         IndicationList indications;
37         std::string object;
38
39 public:
40         SignalType();
41
42         const IndicationList &get_indications() const { return indications; }
43         const std::string &get_object() const { return object; }
44 };
45
46 } // namespace R2C2
47
48 #endif