OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
MetadataQuantity.h
Go to the documentation of this file.
1#pragma once
2#include <stdint.h>
3#include <string>
4#include <map>
5#include <list>
6#include <vector>
7#include <memory>
8
9#include "OTCore/Variable.h"
10#include "MetadataEntry.h"
11
12struct __declspec(dllexport) MetadataQuantityValueDescription
13{
14 /****************** Are set by the campaign handling class *********************/
15 ot::UID quantityIndex = 0;
16
17 //Label which is unique in a series. In case that the unique name is already taken, the name is extended with a number.
18 std::string quantityValueLabel = "";
19 /******************************************************************************/
20
21 std::string quantityValueName = "";
22
23
24 std::string dataTypeName = "";
25
26 std::string unit = "";
27 //Attention: The result collection extender relies heavily on the logic of this method. Changes should be considered in the method for the creation of a new series.
28 const bool operator==(const MetadataQuantityValueDescription& other) const
29 {
30 const bool isEqual = this->quantityValueName == other.quantityValueName &&
31 this->unit == other.unit &&
32 this->dataTypeName == other.dataTypeName;
33 return isEqual;
34 }
35};
36
37struct __declspec(dllexport) MetadataQuantity
38{
39 std::string quantityName = "";
40
41 /****************** Is set by the campaign handling class *********************/
42
43 //Identical with the first value description ID
44 ot::UID quantityIndex = 0;
45
46 //Label which is unique in a series. In case that the unique name is already taken, the name is extended with a number.
47 std::string quantityLabel = "";
48 /******************************************************************************/
49
50
51 //E.g. {3,3} for a 3x3 Matrix
52 std::vector<uint32_t> dataDimensions;
53
54 std::vector<ot::UID> dependingParameterIds;
55 std::list<MetadataQuantityValueDescription> valueDescriptions;
56
57 std::map < std::string, std::shared_ptr<MetadataEntry>> metaData;
58
59 /*************************** Quantity Container Database field key ***************************************/
60 static const std::string getFieldName() { return "Quantity"; }
61 /********************************************************************************************************/
62
63 const bool operator==(const MetadataQuantity& _other) const
64 {
65 //Two metadata quantities are equal, if they have the same data structure:
66 const bool isEqual = this->quantityName == _other.quantityName &&
67 this->dataDimensions == _other.dataDimensions &&
68 this->valueDescriptions == _other.valueDescriptions;
69 return isEqual;
70 }
71 const bool operator!=(const MetadataQuantity& _other) const
72 {
73 return !(*this == _other);
74 }
75};
bool operator==(const FaceSelection &left, const FaceSelection &right)
Definition Model.cpp:55
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27