OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
QuantityDescription.h
Go to the documentation of this file.
1#pragma once
2#include <string>
3#include <stdint.h>
4#include <vector>
5
6#include "OTCore/Variable.h"
7#include "OTCore/CoreTypes.h"
8
9#include "MetadataQuantity.h"
11
13class __declspec(dllexport) QuantityDescription
14{
15public:
16 QuantityDescription() = default;
17 QuantityDescription& operator=(const QuantityDescription& _other) = default;
18 QuantityDescription& operator=(QuantityDescription&& _other) noexcept = default;
19 QuantityDescription(const QuantityDescription& _other) = default;
20 QuantityDescription(QuantityDescription&& _other) noexcept = default;
21
22 virtual ~QuantityDescription() {}
23
24 const std::string& getName() const { return m_metadataQuantity.quantityName; }
25 void setName(const std::string& _quantityName)
26 {
27 m_metadataQuantity.quantityName = _quantityName;
28 }
29
31 void addValueDescription(const std::string _valueName, const std::string _valueDataType, const std::string _valueUnit);
32 void clearValueDescriptions()
33 {
34 m_metadataQuantity.valueDescriptions.clear();
35 }
36
37 MetadataQuantity& getMetadataQuantity() { return m_metadataQuantity; }
38
40 ot::UID getFirstValueQuantityIndex() const;
41
43 ot::UID getSecondValueQuantityIndex() const;
44
45protected:
46 MetadataQuantity m_metadataQuantity;
47
48
49 inline bool invariant() const
50 {
51 return true;
52 }
53
54};
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27