Constantin Ziesche | 02817f1 | 2020-08-04 21:40:43 +0200 | [diff] [blame^] | 1 | #ifndef BASYX_SIMPLE_SDK_VIEW_H |
| 2 | #define BASYX_SIMPLE_SDK_VIEW_H |
| 3 | |
| 4 | #include <BaSyx/submodel/api_v2/parts/IView.h> |
| 5 | |
| 6 | #include <BaSyx/submodel/simple/qualifier/HasDataSpecification.h> |
| 7 | #include <BaSyx/submodel/simple/qualifier/Referable.h> |
| 8 | #include <BaSyx/submodel/simple/common/ElementContainer.h> |
| 9 | |
| 10 | namespace basyx { |
| 11 | namespace submodel { |
| 12 | namespace simple { |
| 13 | |
| 14 | class View |
| 15 | : public virtual api::IView |
| 16 | , public virtual HasDataSpecification |
| 17 | , public virtual Referable |
| 18 | { |
| 19 | private: |
| 20 | ElementContainer<api::IReferable> contained_elements; |
| 21 | Reference semanticId; |
| 22 | public: |
| 23 | View(const std::string & idShort, const Referable * parent = nullptr); |
| 24 | |
| 25 | //Inherited via api::IView |
| 26 | const api::IElementContainer<IReferable> & getContainedElements() const override; |
| 27 | |
| 28 | //not inherited |
| 29 | void addContainedElement(std::unique_ptr<Referable> referable); |
| 30 | |
| 31 | //inherited via IHasSemantics |
| 32 | const api::IReference & getSemanticId() const override; |
| 33 | void setSemanticId(const api::IReference & reference) override; |
| 34 | }; |
| 35 | |
| 36 | } |
| 37 | } |
| 38 | } |
| 39 | #endif //BASYX_SIMPLE_SDK_VIEW_H |