]> git.tdb.fi Git - r2c2.git/blob - source/libr2c2/objecttype.h
Rework article numbers
[r2c2.git] / source / libr2c2 / objecttype.h
1 #ifndef LIBR2C2_OBJECTTYPE_H_
2 #define LIBR2C2_OBJECTTYPE_H_
3
4 #include <string>
5 #include <msp/datafile/objectloader.h>
6 #include "articlenumber.h"
7 #include "geometry.h"
8
9 namespace R2C2 {
10
11 class ObjectType
12 {
13 public:
14         class Loader: public Msp::DataFile::ObjectLoader<ObjectType>
15         {
16         public:
17                 Loader(ObjectType &);
18
19         private:
20                 void article_number();
21         };
22
23 protected:
24         ArticleNumber art_nr;
25         std::string name;
26         std::string description;
27         Shape *shape;
28
29         ObjectType();
30 public:
31         virtual ~ObjectType();
32
33         const ArticleNumber &get_article_number() const { return art_nr; }
34         const std::string &get_name() const { return name; }
35         const std::string &get_description() const { return description; }
36         const Shape *get_shape() const { return shape; }
37 };
38
39 } // namespace R2C2
40
41 #endif