]> git.tdb.fi Git - r2c2.git/blob - source/libr2c2/objecttype.h
Add a common base class for tangible objects
[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
8 namespace R2C2 {
9
10 class ObjectType
11 {
12 public:
13         class Loader: public Msp::DataFile::ObjectLoader<ObjectType>
14         {
15         public:
16                 Loader(ObjectType &);
17         };
18
19 protected:
20         ArticleNumber art_nr;
21         std::string name;
22         std::string description;
23
24         ObjectType(const ArticleNumber &a): art_nr(a) { }
25 public:
26         virtual ~ObjectType() { }
27
28         const ArticleNumber &get_article_number() const { return art_nr; }
29         const std::string &get_name() const { return name; }
30         const std::string &get_description() const { return description; }
31 };
32
33 } // namespace R2C2
34
35 #endif