blob: 9ca929538be017ca92885782d6ae8cde609e3c8f [file] [log] [blame]
Thomas Psota0187a4e2020-04-30 15:12:54 +02001#ifndef BASYX_SUBMODEL_MAP_V2_QUALIFIER_REFERABLE_H
2#define BASYX_SUBMODEL_MAP_V2_QUALIFIER_REFERABLE_H
3
4#include <BaSyx/submodel/api_v2/qualifier/IReferable.h>
5#include <BaSyx/submodel/map_v2/common/LangStringSet.h>
6
7#include <BaSyx/vab/ElementMap.h>
8
9namespace basyx {
10namespace submodel {
11namespace map {
12
13
14class Referable :
15 public virtual api::IReferable,
16 public virtual vab::ElementMap
17{
18public:
19 struct Path {
20 static constexpr char IdShort[] = "idShort";
21 static constexpr char Category[] = "category";
22 static constexpr char Description[] = "description";
23 static constexpr char Parent[] = "parent";
24 };
25private:
26 map::LangStringSet description;
Thomas Psotade5ea072020-05-08 19:42:05 +020027 const IReferable * const parent = nullptr;
Thomas Psota0187a4e2020-04-30 15:12:54 +020028public:
29 virtual ~Referable() = default;
30
31 // Constructors
32 Referable(const std::string & idShort, const Referable * parent = nullptr);
Thomas Psotade5ea072020-05-08 19:42:05 +020033 //Referable(const IReferable & other);
Thomas Psota0187a4e2020-04-30 15:12:54 +020034
35 // Inherited via IReferable
36 virtual const std::string & getIdShort() const override;
37 virtual const std::string * const getCategory() const override;
38 virtual LangStringSet & getDescription() override;
39 virtual const LangStringSet & getDescription() const override;
40
41 virtual const IReferable * const getParent() const override;
42
43 // not inherited
44 void setIdShort(const std::string & shortID);
45 void setCategory(const std::string & category) override;
46
47 bool hasParent() const noexcept;
48 bool hasDescription() const noexcept;
49 bool hasCategory() const noexcept;
50};
51
52
53}
54}
55}
56
57#endif /* BASYX_SUBMODEL_MAP_V2_QUALIFIER_REFERABLE_H */